1 2015-12-04 Release Manager
5 2015-07-16 Release Manager
9 2015-04-22 Release Manager
13 2015-01-30 Joseph Myers <joseph@codesourcery.com>
15 * class.c, expr.c, jcf-parse.c, jvspec.c: All callers of
16 fatal_error changed to pass input_location as first argument.
18 2015-10-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20 * builtins.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
21 fixed-value.h function.h hard-reg-set.h hashtab.h insn-config.h
22 real.h statistics.h stmt.h varasm.h.
24 2015-01-09 Michael Collison <michael.collison@linaro.org>
26 * boehm.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
27 input.h, alias.h, symtab.h, options.h, fold-const.h,
28 wide-int.h, and inchash.h due to flattening of tree.h.
31 * constants.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
32 input.h, alias.h, symtab.h, options.h, fold-const.h,
33 wide-int.h, and inchash.h due to flattening of tree.h.
35 * except.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
36 input.h, alias.h, symtab.h, fold-const.h,
37 wide-int.h, and inchash.h due to flattening of tree.h.
38 * expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
39 input.h, alias.h, symtab.h, fold-const.h,
40 wide-int.h,inchash.h and real.h due to flattening of tree.h.
41 * gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
42 input.h, alias.h, symtab.h, options.h, fold-const.h,
43 wide-int.h, and inchash.h due to flattening of tree.h.
48 * lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
49 input.h, alias.h, symtab.h, fold-const.h,
50 wide-int.h, and inchash.h due to flattening of tree.h.
51 * mangle.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
52 input.h, alias.h, symtab.h, options.h, fold-const.h,
53 wide-int.h, and inchash.h due to flattening of tree.h.
54 * mangle_name.c: Ditto.
57 * verify-glue.c: Ditto.
58 * verify-impl.c: Ditto.
60 2015-01-05 Jakub Jelinek <jakub@redhat.com>
62 Update copyright years.
64 * jcf-dump.c (version): Update copyright notice dates.
66 2014-11-24 Richard Biener <rguenther@suse.de>
69 * class.c (build_classdollar_field): Do not set TREE_READONLY.
71 2014-11-19 David Malcolm <dmalcolm@redhat.com>
73 Merger of git branch "gimple-classes-v2-option-3".
74 * ChangeLog.gimple-classes: New.
75 * java-gimplify.c (java_gimplify_block): Strengthen local "outer"
76 from gimple to gbind *.
78 2014-11-11 David Malcolm <dmalcolm@redhat.com>
80 * gcc/ChangeLog.jit: New.
82 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
84 * builtins.c, java-tree.h, typeck.c: Remove redundant enum from
87 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
89 * class.c: Adjust include files.
94 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
96 * java-gimplify.c: Adjust include files.
98 2014-10-22 Alan Modra <amodra@gmail.com>
100 * mangle.c (finish_mangling): Cast result of obstack_base to (char *).
101 * typeck.c (build_java_argument_signature): Likewise.
102 (build_java_signature): Likewise.
104 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
106 * class.c: Adjust include files.
107 * resource.c: Likewise.
109 2014-10-15 Evgeny Stupachenko <evstupac@gmail.com>
112 * lang.c (java_print_error_function): Add check on NULL function
115 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
117 * class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use
118 hash_table instead of hashtab.
120 2014-10-07 Marek Polacek <polacek@redhat.com>
122 * jvgenmain.c (main): Provide declarations for JvRunMain{,Name}.
124 2014-07-08 Mark Wielaard <mjw@redhat.com>
126 * builtins.c (putVolatile_builtin): Use build_qualified_type
127 instead of build_type_variant.
128 (getVolatile_builtin): Likewise.
129 (build_classdollar_field): Likewise.
131 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
135 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
137 * java/class.c (build_utf8_ref): Update handling for section names
138 that are no longer trees.
139 (emit_register_classes_in_jcr_section): Update.
141 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
143 * class.c (build_utf8_ref): Use set_decl_section_name.
144 (emit_register_classes_in_jcr_section): Likewise.
145 (emit_register_classes_in_jcr_section): Likewise.
147 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
149 * class.c (add_method_1): Adjust.
150 (java_treetreehash_new): Likewise.
151 * constants.c (set_constant_entry): Likewise.
152 (cpool_for_class): Likewise.
153 * decl.c (make_binding_level): Likewise.
154 (java_dup_lang_specific_decl): Likewise.
155 * expr.c (add_type_assertion): Likewise.
156 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
157 (lang_decl): don't use variable_size gty attribute.
158 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Adjust.
159 (lang_type): Don't use variable_size gty attribute.
160 * jcf-parse.c (java_parse_file): Adjust.
161 (process_zip_dir): Likewise.
162 * jcf.h: Remove usage of variable_size gty attribute.
163 * jcf-reader.c (jcf_parse_constant_pool): Adjust.
164 (jcf_parse_bootstrap_methods): Likewise.
166 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
168 * constants.c (set_constant_entry): Adjust.
170 2014-05-06 Richard Sandiford <r.sandiford@uk.ibm.com>
172 * boehm.c (mark_reference_fields): Don't update the mask when
173 setting pointer_after_end.
175 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
176 Mike Stump <mikestump@comcast.net>
177 Richard Sandiford <rdsandiford@googlemail.com>
179 * boehm.c: Include wide-int.h.
180 (mark_reference_fields): Use a wide_int mask.
181 (get_boehm_type_descriptor): Use wide-int interfaces.
182 * expr.c: Include wide-int.h.
183 (build_newarray): Remove bogus "== INTEGER_CST".
184 (expand_java_pushc): Use real_from_integer.
185 (build_field_ref): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
186 * jcf-parse.c: Include wide-int.h.
187 (get_constant): Use wide-int interfaces.
189 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
191 Update copyright years
193 2014-01-02 Tobias Burnus <burnus@net-b.de>
195 * jcf-dump.c (version): Update copyright notice dates.
196 * gcj.texi: Bump @copying's copyright year.
198 2013-12-19 Jakub Jelinek <jakub@redhat.com>
201 * class.c (hashUtf8String): Compute hash in unsigned type.
202 * javaop.h (WORD_TO_INT): Avoid signed integer overflow.
204 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
206 * java-gimplify.c: Add required include files from gimple.h.
208 2013-11-22 David Malcolm <dmalcolm@redhat.com>
210 * class.c (maybe_layout_super_class): Update comment.
211 * decl.c (java_add_stmt): Remove use of input_filename macro.
212 * jcf-parse.c (set_source_filename): Remove use of
213 input_filename macro.
214 (parse_class_file): Remove use of input_line and input_filename
216 (java_parse_file): Remove use of input_filename macro.
218 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
220 * class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi
223 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
225 * class.c, expr.c: Replace host_integerp (..., 0) with
226 tree_fits_shwi_p throughout.
228 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
230 * java-gimplify.c: Include only gimplify.h and gimple.h as needed.
232 2013-11-14 Diego Novillo <dnovillo@google.com>
234 * builtins.c: Include stor-layout.h.
235 Include stringpool.h.
236 * class.c: Include stringpool.h.
237 Include stor-layout.h.
239 * constants.c: Include stringpool.h.
240 Include stor-layout.h.
241 * decl.c: Include stor-layout.h.
242 Include stringpool.h.
244 * except.c: Include stringpool.h.
245 Include stor-layout.h.
246 * expr.c: Include stringpool.h.
247 Include stor-layout.h.
248 * jcf-parse.c: Include stringpool.h.
249 * mangle.c: Include stringpool.h.
250 * resource.c: Include stringpool.h.
251 Include stor-layout.h.
252 * typeck.c: Include stor-layout.h.
253 Include stringpool.h.
254 * verify-glue.c: Include stringpool.h.
256 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
258 * java-gimplify.c: Include gimplify.h.
260 2013-11-07 Jeff Law <law@redhat.com>
262 * builtins.c (initialize_builtins): Provide __builtin_trap.
264 2013-10-29 David Malcolm <dmalcolm@redhat.com>
266 Patch autogenerated by refactor_symtab.py from
267 https://github.com/davidmalcolm/gcc-refactoring-scripts
268 revision 58bb219cc090b2f4516a9297d868c245495ee622
270 * decl.c (java_mark_decl_local): Update for conversion of symtab types
271 to a true class hierarchy.
273 2013-10-14 David Malcolm <dmalcolm@redhat.com>
275 * lang.c (java_handle_option): Update for introduction of
278 2013-09-25 Tom Tromey <tromey@redhat.com>
280 * Make-lang.in (jvspec.o): Remove.
281 (CFLAGS-java/jvspec.o): New variable.
282 ($(XGCJ)$(exeext), java_OBJS): Use java/jvspec.o
283 (java/jvspec.o-warn): Rename from jvspec.o-warn.
284 (JAVA_TREE_H, java/jcf-dump.o, java/boehm.o, java/builtins.o)
285 (java/class.o, java/constants.o, java/decl.o, java/except.o)
286 (java/expr.o, java/jcf-depend.o, java/jcf-parse.o)
287 (java/jvgenmain.o, java/lang.o, java/mangle.o, java/mangle_name.o)
288 (java/resource.o java/typeck.o, java/win32-host.o)
289 (java/verify-glue.o, java/verify-impl.o, java/zextract.o)
290 (java/java-gimplify.o, java/jcf-io.o, java/jcf-path.o): Remove.
292 2013-09-25 Tom Tromey <tromey@redhat.com>
294 * Make-lang.in (jvspec.o): Don't use subshell.
296 2013-06-05 Jan Hubicka <jh@suse.cz>
298 * class.c (emit_register_classes_in_jcr_section): Use DECL_PRESERVE_P
299 instead of mark_decl_referenced.
301 2013-05-29 Jan Hubicka <jh@suse.cz>
303 * decl.c (java_mark_decl_local): Update for new symtab flags.
305 2013-05-22 Matthias Klose <doko@ubuntu.com>
307 * jvspec.c (jvgenmain_spec): Add %I to cc1 call.
309 2013-05-16 Jason Merrill <jason@redhat.com>
311 * Make-lang.in (jc1$(exeext)): Use link mutex.
313 2013-05-06 Jakub Jelinek <jakub@redhat.com>
316 * class.c (emit_symbol_table): Use array type of the
317 right size for the_syms_decl and its DECL_INITIAL, instead
318 of symbols_array_type. Set TREE_TYPE (the_syms_decl) to it.
319 (emit_assertion_table): Use array type of the right size
320 for table_decl and its DECL_INITIAL.
322 2013-04-15 Gerald Pfeifer <gerald@pfeifer.com>
324 * gcj.texi (Configure-time Options): Refer to GCC, not gcc.
325 (Resources): Adjust reference to Mauve.
326 Remove link to java.sun.com.
327 Refer to GCC, not gcc.
329 2013-04-09 Richard Biener <rguenther@suse.de>
331 * expr.c (build_java_binop): Pass a type to build_int_cst.
333 2013-03-22 Kai Tietz <ktietz@redhat.com>
335 * lang.c (put_decl_node): Don't iterate over end_params_node.
337 2013-01-03 Jakub Jelinek <jakub@redhat.com>
339 * jcf-dump.c (version): Update copyright notice dates.
341 2012-11-16 Diego Novillo <dnovillo@google.com>
343 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
345 * boehm.c: Use new vec API in vec.h.
347 * constants.c: Likewise.
350 * java-tree.h: Likewise.
351 * jcf-parse.c: Likewise.
352 * resource.c: Likewise.
353 * verify-glue.c: Likewise.
355 2012-11-15 Jan Hubicka <jh@suse.cz>
357 * builtins.c (define_builtin): Accept ECF flags and
358 use set_call_expr_flags.
359 (initialize_builtins): Update.
361 2012-10-01 Lawrence Crowl <crowl@google.com>
363 * Make-lang.in (JAVA_OBJS): Add dependence on hash-table.o.
364 (JCFDUMP_OBJS): Add dependence on hash-table.o.
365 (jcf-io.o): Add dependence on hash-table.h.
366 * jcf-io.c (memoized_class_lookups): Change to use type-safe hash table.
368 2012-09-24 Lawrence Crowl <crowl@google.com>
370 * decl.c (java_init_decl_processing): Change to new double_int API.
371 * jcf-parse.c (get_constant): Likewise.
372 * boehm.c (mark_reference_fields): Likewise.
373 (get_boehm_type_descriptor): Likewise.
375 2012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com>
377 * jcf.h (CPool): Use the "atomic" GTY option for the tags field.
378 (bootstrap_method): Likewise for the bootstrap_arguments field.
380 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
382 * java-gimplify.c: Include dumpfile.h instead of tree-dump.h
383 * Make-lang.in: Fix dependencies.
385 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
387 * java-tree.h (force_evaluation_order): Remove prototype.
388 * expr.c (force_evaluation_order): Remove unused function.
390 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
392 * decl.c: Do not include libfuncs.h.
393 * class.c: Do not include defaults.h.
394 * jvgenmain.c: Likewise.
395 * magnle.c: Likewise.
396 * Make-lang.in (decl.o): Fix dependencies.
398 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
400 * verify.h: Do not include system.h and coretypes.h here.
401 * verify-impl.c: Include them here instead.
403 2012-07-05 Uros Bizjak <ubizjak@gmail.com>
405 * jcf-io.c (read_zip_member): Initialize d_stream.
407 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
409 * resource.c: Do not include output.h.
411 2012-05-21 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
414 * class.c (emit_register_classes_in_jcr_section): Revise placement
415 of #ifdef JCR_SECTION_NAME.
417 2012-04-22 Jan Hubicka <jh@suse.cz>
419 * class.c (build_utf8_ref): Do not mark varpool node as needed.
421 2012-04-20 Jan Hubicka <jh@suse.cz>
423 * class.c (make_local_function_alias): Do not mark symbol referenced.
425 2012-04-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
427 * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1
428 results to long to match formats.
430 2012-04-11 Andrew Haley <aph@redhat.com>
432 * jcf-reader.c (jcf_parse_bootstrap_methods): Add
435 2012-04-11 Andrew Haley <aph@redhat.com>
437 * jcf.h (bootstrap_method): New.
438 (BootstrapMethods): New.
439 (JCF): Add BootstrapMethods.
440 (enum cpool_tag): Add MethodHandle, MethodType, and InvokeDynamic.
441 * jcf-reader.c (jcf_parse_bootstrap_methods): New.
442 (jcf_parse_constant_pool): Handlers for MethodHandle, MethodType,
444 (jcf_parse_bootstrap_methods): New.
445 * javaop.def (invokedynamic): New opcode.
446 * jcf-parse.c (get_constant): An unknown constant type should not
447 be an internal error, but a fatal one. Make it so.
448 * jcf-dump.c (HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE): New.
449 (HANDLE_END_BOOTSTRAP_METHODS): New.
450 (print_constant): Handlers for MethodHandle, MethodType, and
453 2012-04-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
455 * class.c (emit_register_classes_in_jcr_section): Set DECL_USER_ALIGN.
458 2012-03-29 Steven Bosscher <steven@gcc.gnu.org>
461 * class.c (emit_register_classes_in_jcr_section): New function.
462 (emit_Jv_RegisterClass_calls): New function, split out from ...
463 (emit_register_classes): ... here. Reorganize. Do not call
466 2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
468 * lang.c (java_init_options_struct): Set
469 frontend_set_flag_trapping_math.
471 2012-01-01 Jakub Jelinek <jakub@redhat.com>
473 * jcf-dump.c (version): Update copyright notice dates.
475 2011-12-03 Matthias Klose <doko@ubuntu.com>
477 * expr.c (SPECIAL_WIDE): Fix typo in message.
479 2011-11-23 Jeffrey A Law (law@cygnus.com)
481 * lang.c (java_init_options_struct): Disable optimizations
482 which assume a NULL pointer dereference will cause a fault.
484 2011-11-07 Richard Henderson <rth@redhat.com>
486 * builtins.c (compareAndSwapInt_builtin): Use can_compare_and_swap_p.
487 (compareAndSwapLong_builtin): Likewise.
488 (compareAndSwapObject_builtin): Likewise.
489 (VMSupportsCS8_builtin): Likewise.
491 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
493 * Make-lang.in (jvspec.o): Pass SHLIB instead of SHLIB_LINK.
495 2011-10-15 Tom Tromey <tromey@redhat.com>
496 Dodji Seketeli <dodji@redhat.com>
498 * jcf-parse.c (set_source_filename): Adjust to the new map API.
500 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
502 * class.c (build_static_field_ref): Delete old interface with two
503 parallel arrays to hold standard builtin declarations, and replace
504 it with a function based interface that can support creating
505 builtins on the fly in the future. Change all uses, and poison
506 the old names. Make sure 0 is not a legitimate builtin index.
507 * decl.c (java_init_decl_processing): Ditto.
508 * except.c (compareAndSwapLong_builtin): Ditto.
509 (compareAndSwapObject_builtin): Ditto.
510 (putVolatile_builtin): Ditto.
511 (define_builtin): Ditto.
512 (check_for_builtin): Ditto.
513 * expr.c (rewrite_arglist_getcaller): Ditto.
514 (expand_java_field_op): Ditto.
516 2011-08-24 Joseph Myers <joseph@codesourcery.com>
518 * Make-lang.in (CFLAGS-java/jcf-io.o, CFLAGS-java/jcf-path.o):
520 (java/jcf-io.o, java/jcf-path.o): Remove explicit compilation
523 2011-08-18 Peter Collingbourne <peter@pcc.me.uk>
525 * expr.c (expand_invoke) Use the type of the method rewrite
528 2011-08-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
530 * jcf-dump.c (print_constant): Cast first frexp arg.
532 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
534 * Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS).
536 2011-07-19 Richard Guenther <rguenther@suse.de>
538 * builtins.c (static): Use fold_build_pointer_plus.
539 * class.c (make_class_data): Likewise.
540 (build_symbol_entry): Likewise.
541 * except.c (build_exception_object_ref): Likewise.
542 * expr.c (build_java_arrayaccess): Likewise.
543 (build_field_ref): Likewise.
544 (build_known_method_ref): Likewise.
545 (build_invokevirtual): Likewise.
547 2011-07-06 Richard Guenther <rguenther@suse.de>
549 * decl.c (java_init_decl_processing):
550 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
552 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
554 * builtins.c: Add sync_ or SYNC__ to builtin names.
555 * expr.c: Add sync_ or SYNC__ to builtin names.
557 2011-06-07 Richard Guenther <rguenther@suse.de>
559 * decl.c (java_init_decl_processing): Call build_common_nodes,
560 build_common_nodes_2 at the beginning. Remove then duplicate
563 2011-06-07 Richard Guenther <rguenther@suse.de>
565 * decl.c (java_init_decl_processing): Properly initialize
568 2011-05-30 Joern Rennecke <joern.rennecke@embecosm.com>
571 * expr.c: Include "tm.h" .
573 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
575 * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs.
576 * expr.c (build_jni_stub): Likewise.
578 2011-05-24 Joseph Myers <joseph@codesourcery.com>
580 * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead
583 2011-05-20 Joseph Myers <joseph@codesourcery.com>
585 * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and
587 (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o.
588 (JVGENMAIN_OBJS): Remove errors.o and intl.o.
589 (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H).
590 * jcf-dump.c: Include diagnostic.h.
591 (main): Initialize diagnostics.
592 * jvgenmain.c: Include diagnostic.h.
593 (main): Initialize diagnostics.
595 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
597 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
599 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
601 * java-tree.h (global_bindings_p): Adjust prototype.
602 * decl.c (global_bindings_p): Return bool.
604 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
606 * expr.c (expand_java_switch): Call build_case_label.
607 (expand_java_add_case): Likewise.
609 2011-04-29 Richard Guenther <rguenther@suse.de>
612 * constants.c (build_constants_constructor): Use ptr_type_node for
615 2011-04-20 Jim Meyering <meyering@redhat.com>
617 * jcf-parse.c (java_parse_file): Remove useless if-before-free.
619 2011-04-18 Jim Meyering <meyering@redhat.com>
621 * jcf-parse.c: Fix typo in comment.
623 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
625 * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
627 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
629 * java-tree.h (union lang_tree_node): Check for TS_COMMON before
632 2011-04-11 Martin Jambor <mjambor@suse.cz>
634 * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
635 cgraph_node and handle returned NULL.
637 2011-03-25 Kai Tietz <ktietz@redhat.com>
639 * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
641 (set_source_filename): Likewise.
642 * win32-host.c (jcf_open_exact_case): Likewise.
644 2011-03-21 Kai Tietz <ktietz@redhat.com>
647 * lang.c (java_attribute_table): Adjust table.
649 2011-02-13 Joseph Myers <joseph@codesourcery.com>
651 * jvspec.c (jvgenmain_spec): Remove %{a*}.
653 2011-01-21 Kai Tietz <kai.tietz@onevision.com>
656 * decl.c (java_init_decl_processing): Remove
657 va_list_type_node related type initializations.
659 2011-01-11 Kai Tietz <kai.tietz@onevision.com>
662 * decl.c (java_init_decl_processing): Initialize
663 long_integer_type_node.
665 2011-01-07 Kai Tietz <kai.tietz@onevision.com>
668 * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
670 2011-01-07 Kai Tietz <kai.tietz@onevision.com>
672 * decl.c (java_init_decl_processing): Setup va_list_type_node.
674 2011-01-03 Jakub Jelinek <jakub@redhat.com>
676 * jcf-dump.c (version): Update copyright notice dates.
678 2010-12-15 Dave Korn <dave.korn.cygwin@gmail.com>
680 * decl.c (java_init_decl_processing): Initialise integer_three_node.
681 * lang.c (put_decl_node): Handle nested function decls.
683 2010-12-07 Joseph Myers <joseph@codesourcery.com>
685 * jcf-parse.c: Don't include assert.h.
686 (java_parse_file): Use gcc_assert.
688 2010-12-03 Joseph Myers <joseph@codesourcery.com>
690 * lang.opt (static-libgcj): New option.
692 2010-12-01 Joseph Myers <joseph@codesourcery.com>
694 * jcf-parse.c: Don't include toplev.h.
695 * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
697 2010-11-30 Joseph Myers <joseph@codesourcery.com>
699 * boehm.c: Don't include toplev.h.
700 * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
702 2010-11-30 Joseph Myers <joseph@codesourcery.com>
704 * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
705 verify-glue.c: Don't include toplev.h.
706 * Make-lang.in: Dependencies for above files changed to remove
709 2010-11-29 Joseph Myers <joseph@codesourcery.com>
711 * boehm.c: Include "config.h" instead of <config.h>.
712 * builtins.c: Don't include <stdarg.h>.
713 * class.c: Don't include "stdio.h".
714 (O_BINARY): Don't define here.
715 * jcf-depend.c: Don't include <assert.h>.
716 (jcf_dependency_set_dep_file, jcf_dependency_init,
717 jcf_dependency_write): Use gcc_assert.
718 * jcf-io.c (O_BINARY): Don't define here.
719 * jcf-path.c: Don't include "tm.h".
720 (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
721 * resource.c: Don't include "stdio.h".
722 (O_BINARY): Don't define here.
723 * verify-impl.c: Don't include <stdio.h>.
725 2010-11-17 Joseph Myers <joseph@codesourcery.com>
727 * jcf-parse.c (java_parse_file): Take no arguments.
728 * java-tree.h (java_parse_file): Update prototype.
730 2010-11-09 Joern Rennecke <amylaar@spamcop.net>
731 Andrew Haley <aph@redhat.com>
734 * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
736 2010-11-12 Joseph Myers <joseph@codesourcery.com>
738 * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
739 * lang.c (java_handle_option): Take location_t parameter.
741 2010-11-10 Joseph Myers <joseph@codesourcery.com>
743 * expr.c (expand_java_field_op): Use %' in diagnostic.
744 * jcf-parse.c (java_parse_file): Use %' in diagnostics.
745 * jvspec.c (lang_specific_driver): Use %' in diagnostic.
746 * lang.c (java_post_options): Use %' in diagnostics.
748 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
751 * class.c: Include target.h.
752 (make_local_function_alias):
753 Use targetm.asm_out.generate_internal_label.
754 * expr.c (lookup_label, generate_name): Likewise.
756 2010-11-03 Joern Rennecke <joern.rennecke@embecosm.com>
759 * jfc-parse.c (target.h): Include.
760 (handle_constant): Use targetm.words_big_endian and
761 targetm.float_words_big_endian.
762 (get_constant): Use targetm.float_words_big_endian.
764 2010-10-13 Richard Henderson <rth@redhat.com>
766 * lang.c (java_eh_personality): Update call to
767 build_personality_function.
769 2010-10-12 Joseph Myers <joseph@codesourcery.com>
771 * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
774 2010-10-11 Nathan Froyd <froydnj@codesourcery.com>
776 * decl.c (java_init_decl_processing): Use build_function_type_list
777 instead of build_function_type.
778 * jcf-parse.c (java_emit_static_constructor): Likewise.
779 * builtins.c (initialize_builtins): Likewise.
781 2010-10-08 Joseph Myers <joseph@codesourcery.com>
783 * lang.c (java_init_options_struct): New. Split out from
785 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
787 2010-10-04 Andi Kleen <ak@linux.intel.com>
789 * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
792 2010-09-29 Joseph Myers <joseph@codesourcery.com>
794 * lang.opt: Don't use VarExists.
796 2010-09-29 Joseph Myers <joseph@codesourcery.com>
798 * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
799 flag_force_classes_archive_check, flag_redundant, flag_newer,
800 flag_use_divide_subroutine, flag_use_atomic_builtins,
801 flag_use_boehm_gc, flag_hash_synchronization,
802 flag_check_references, flag_optimize_sci, flag_indirect_classes,
803 flag_indirect_dispatch, flag_store_check,
804 flag_reduced_reflection): Remove.
805 * jcf-dump.c (flag_newer): Remove.
806 * jcf.h (quiet_flag): Remove.
807 * parse.h (quiet_flag): Remove.
809 2010-09-28 Richard Henderson <rth@redhat.com>
811 * lang.c: Include "target.h".
812 (java_eh_personality): Use targetm.except_unwind_info.
813 * Make-lang.in (lang.o): Update deps.
815 2010-09-27 Andrew Haley <aph@redhat.com>
818 * jvgenmain.c (main): Fix arg processing.
820 2010-09-22 Joseph Myers <joseph@codesourcery.com>
822 * jvspec.c (lang_specific_driver): Handle OPT__help instead of
824 * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
825 -dependencies, -encoding, -extdirs, -include-directory,
826 -include-directory=, -output-class-directory,
827 -output-class-directory=, -resource, -resource=,
828 -user-dependencies): New.
830 2010-09-16 Richard Guenther <rguenther@suse.de>
832 * jcf-parse.c (current_file_list): Remove.
833 (java_parse_file): Use build_translation_unit_decl. Adjust.
835 2010-09-03 Joseph Myers <joseph@codesourcery.com>
839 2010-09-03 H.J. Lu <hongjiu.lu@intel.com>
842 * jvgenmain.c (main): Check "-D XXX=YYY".
844 2010-09-02 Joseph Myers <joseph@codesourcery.com>
846 * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
848 2010-09-02 Joseph Myers <joseph@codesourcery.com>
850 * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
851 fCLASSPATH=): Mark as Java options and as aliases.
852 * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
853 (lang_specific_driver): Don't handle options marked as aliases.
854 * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
856 2010-08-22 Joseph Myers <joseph@codesourcery.com>
858 * Make-lang.in (jvspec.o): Update dependencies.
859 * jvspec.c: Include opts.h.
861 (find_spec_file): Do not add leading -specs=.
862 (lang_specific_driver): Use cl_decoded_option structures.
863 * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
864 extdirs, fmain=, s-bc-abi): New options.
866 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
868 * class.c: Use FOR_EACH_VEC_ELT.
870 * jcf-parse.c: Likewise.
871 * resource.c: Likewise.
873 2010-08-16 Joseph Myers <joseph@codesourcery.com>
875 * lang.opt (MD_, MMD_, version): Mark RejectDriver.
877 2010-08-05 David Daney <ddaney@caviumnetworks.com>
879 * class.c (build_utf8_ref): Fix code formatting from previous commit.
881 2010-08-05 David Daney <ddaney@caviumnetworks.com>
883 * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
885 2010-07-27 Joseph Myers <joseph@codesourcery.com>
887 * lang.c (java_handle_option): Update prototype and return value
890 2010-07-27 Joseph Myers <joseph@codesourcery.com>
892 * lang.c (java_option_lang_mask): New.
893 (java_init_options): Update prototype.
894 (LANG_HOOKS_OPTION_LANG_MASK): Define.
896 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
898 * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
903 * jcf-parse.c: Likewise.
904 * typeck.c: Likewise.
905 * verify-glue.c: Likewise.
907 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
909 * boehm.c: Include diagnostic-core.h in every file that includes
912 * constants.c: Likewise.
914 * except.c: Likewise.
916 * jcf-parse.c: Likewise.
917 * mangle.c: Likewise.
918 * mangle_name.c: Likewise.
919 * resource.c: Likewise.
920 * typeck.c: Likewise.
921 * verify-glue.c: Likewise.
923 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
926 * class.c (make_class_data): Cast result of VEC_length calls to int.
928 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
930 * constants.c (build_constants_constructor): Use build_constructor
931 instead of build_constructor_from_list.
932 * class.c (make_method_value): Likewise.
933 (get_dispatch_table): Likewise.
934 (make_class_data): Likewise.
935 (emit_indirect_register_classes): Likewise.
936 (emit_symbol_table): Likewise.
937 (add_assertion_table_entry): Likewise.
938 (emit_assertion_table): Likewise.
939 (make_field_value): Use build_constructor_single instead of
940 build_constructor_from_list.
942 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
944 * java-tree.h (struct lang_type) [catch_classes]: Change type to a
946 * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
947 instead of tree_cons.
948 * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
949 (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
951 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
953 * lang.c: Do not include except.h
954 * except.c: Likewise.
955 (doing_eh): New, moved from except.c (in gcc/) but removed the
957 (maybe_start_try): Update doing_eh call.
958 * Make-lang.in: Update dependencies.
960 2010-06-23 Anatoly Sokolov <aesok@post.ru>
962 * decl.c (java_init_decl_processing): Use double_int_to_tree instead
963 of build_int_cst_wide.
964 * boehm.c (set_bit): Remove.
965 (mark_reference_fields): Use double_int type for 'mask' argument.
966 Use double_int_setbit instead of set_bit.
967 (get_boehm_type_descriptor): Use double_int_setbit instead of
968 set_bit. Use double_int_to_tree instead of build_int_cst_wide.
970 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
972 * gcj.texi: Move to GFDL version 1.3. Fix copyright years.
974 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
976 * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
978 * jcf-parse.c (java_parse_file): Likewise.
979 (process_zip_dir): Likewise.
981 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
982 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
984 * expr.c (add_type_assertion): Likewise.
986 * decl.c (make_binding_level): Likewise.
987 (java_dup_lang_specific_decl): Likewise.
989 * constants.c (set_constant_entry): Likewise.
990 (cpool_for_class): Likewise.
992 * class.c (add_method_1): Likewise.
993 (java_treetreehash_new): Likewise.
995 * java-tree.h (struct lang_type): Add variable_size GTY option.
996 (struct lang_decl): Likewise.
998 * jch.h (struct cpool_entry): Likewise.
1000 * java-tree.h (java_treetreehash_create): Remove parameter ggc.
1002 * except.c (prepare_eh_table_type): Update
1003 java_treetreehash_create call.
1005 * class.c (add_method_1): Update java_treetreehash_create call.
1006 (java_treetreehash_create): Remove parameter gc. Use
1009 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1011 * jvspec.c (lang_specific_driver): Use GCC-specific formats in
1014 2010-05-30 Steven Bosscher <steven@gcc.gnu.org>
1016 * except.c: Include tm.h.
1018 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1020 * jvspec.c (lang_specific_driver): Use fatal_error instead of
1021 fatal. Use warning instead of error for warnings.
1023 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
1025 * expr.c (get_symbol_table_index): Add spaces in expression.
1027 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
1029 * java-tree.h (method_entry): Declare. Declare VECs containing it.
1030 (struct lang_type): Change type of otable_methods, atable_methods, and
1031 itable_methods to VECs. Fix comment for atable_methods.
1032 (emit_symbol_table): Take a VEC instead of a tree.
1033 (get_symbol_table_index): Take a VEC * instead of a tree *.
1034 * class.c (add_table_and_syms): Take a VEC instead of a tree.
1035 (emit_symbol_table): Update for changed parameter type.
1036 * expr.c (get_symbol_table_index): Likewise.
1038 2010-05-27 Steven Bosscher <steven@gcc.gnu.org>
1040 * buildings.c: Pretend to be a backend file by undefining
1041 IN_GCC_FRONTEND (still need rtl.h here).
1043 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
1045 * java-tree.h (struct lang_decl_func): Change type of throws_list
1047 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
1048 of DECL_FUNCTION_THROWS.
1049 * class.c (make_method_value): Likewise.
1051 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
1053 * class.c (utf8_decl_list): Delete.
1054 (build_utf8_ref): Remove references to it.
1055 * java-tree.h (all_class_list): Delete.
1056 (predef_filenames): Delete.
1057 (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
1059 * jcf-parse.c (parse_roots): Decrease size to 2.
1060 (current_file_list): Convert to a VEC.
1061 (all_class_list): Declare.
1062 (jcf_parse): Adjust for new type of all_class_list.
1063 (java_layout_seen_class_methods): Likewise.
1064 (predefined_filenames): Declare.
1065 (add_predefined_file): Use it.
1066 (predefined_filename_p): Likewise.
1067 (java_parse_file): Adjust for new type of current_file_list.
1069 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1071 * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
1075 * java-tree.h (pending_static_fields): New extern declaration.
1076 (java_write_globals): New prototype.
1077 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
1078 * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
1079 of a static field push it into pending_static_fields vector.
1080 * class.c (pending_static_fields): New variable.
1081 (add_field): If static field is not DECL_EXTERNAL, push it into
1082 pending_static_fields vector.
1083 (java_write_globals): New function.
1085 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
1087 * expr.c (quick_stack): Change type to a VEC. Update comment.
1088 (tree_list_free_list): Delete.
1089 (flush_quick_stack): Update for quick_stack type change.
1090 (push_value): Likewise.
1091 (pop_value): Likewise.
1093 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
1095 * java-gimplify.c: Do not include tm.h, toplev.h.
1096 * typeck.c: Do not include tm.h.
1097 * mangle_name.c: Do not include tm.h.
1098 * jcf-dump.c: Do not include tm.h, ggc.h.
1099 * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
1100 * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
1102 * jcf-parse.c: Do not include tm.h and tm_p.h.
1103 * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
1104 target.h, and expr.h.
1105 * except.c: Do not include tm.h, rtl.h, function.h.
1106 * builtins.c: Do not include convert.h. Explain why RTL headers
1107 have to be included here.
1108 * verify-glue.c: Do not include tm.h.
1109 * jcf-depend.c: Do not include tm.h.
1110 * jcf-reader.c: Include ggc.h.
1111 * jcf-io.c: Do not include tm.h, toplev.h.
1112 * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
1114 * lang.c: Do not include rtl.h, expr.h.
1115 * Make-lang.in: Update dependencies.
1117 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
1119 * jcf-parse.c: Include bitmap.h.
1120 * Make-lang.in: Update dependencies.
1122 2010-05-20 Jakub Jelinek <jakub@redhat.com>
1125 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
1128 2010-05-19 Anatoly Sokolov <aesok@post.ru>
1130 * jcf-parse.c (get_constant): Use double_int_to_tree instead of
1131 build_int_cst_wide_type.
1133 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1135 * expr.c (pop_arguments): Fix use of undeclared variable.
1137 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1139 * expr.c (expand_java_multianewarray): Use build_call_vec instead of
1141 (pop_arguments): Return a VEC instead of a tree. Take a method type
1142 rather than a list of argument types.
1143 (rewrite_rule): Change signature. of rewrite_arglist member.
1144 (rewrite_arglist_getcaller): Update signature.
1145 (rewrite_arglist_getclass): Likewise.
1146 (maybe_rewrite_invocation): Update for rewrite_arglist change.
1147 (build_known_method_ref): Take a VEC instead of a tree.
1148 (invoke_build_dtable): Likewise.
1149 (expand_invoke): Update calls to pop_arguments. Use build_call_vec
1150 instead of build_call_list.
1151 (build_jni_stub): Use build_call_vec instead of build_call_list.
1152 * java-tree.h (maybe_rewrite_invocation): Update declaration.
1153 (build_known_method_ref): Likewise.
1154 (invoke_build_dtable): Likewise.
1156 2010-05-14 Nathan Froyd <froydnj@codesourcery.com>
1159 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
1160 vector. Move call to build_constructor...
1161 (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear
1162 TREE_CONSTANT on the constructor.
1163 (PUSH_SUPER_VALUE): Change first argument to a vector.
1164 (PUSH_FIELD_VALUE): Likewise.
1165 * resource.c (compile_resource_data): Update calls to above macros.
1166 * constants.c (build_constants_constructor): Likewise.
1167 * class.c (build_utf8_ref): Likewise.
1168 (make_field_value): Likewise.
1169 (make_method_value): Likewise.
1170 (add_table_and_syms): New function.
1171 (make_class_data): Call it. Update calls to above macros.
1172 (build_symbol_table_entry): New function.
1173 (build_symbol_entry): Call it. Update calls to above macros.
1174 (emit_symbol_table): Likewise.
1175 (make_catch_class_record): Update calls to above macros.
1176 (build_assertion_table_entry): New function.
1177 (add_assertion_table_entry): Call it.
1178 (emit_assertion_table): Likewise.
1180 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
1183 * lang.c (java_handle_option): Add argument kind.
1185 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1187 * decl.c (java_init_decl_processing): Remove argument in call to
1188 initialize_sizetypes
1190 2010-04-07 Jakub Jelinek <jakub@redhat.com>
1192 * exception.cc (_Jv_Throw): Avoid set but not used warning.
1193 * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
1194 sizeof to avoid set but not used warnings.
1196 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
1198 * lang.c (java_post_options): Constify variable "dot".
1200 * jcf-parse.c (set_source_filename): Constify variable "dot".
1201 (load_class): Constify variable "separator".
1202 Use get_identifier_with_length.
1204 * jvspec.c (lang_specific_driver): Constify two variables named "p".
1206 2010-01-09 Jakub Jelinek <jakub@redhat.com>
1208 * jcf-dump.c (version): Update copyright notice dates.
1210 2009-11-28 Jakub Jelinek <jakub@redhat.com>
1212 * jvspec.c (lang_specific_driver): Remove unused
1213 saw_verbose_flag variable.
1214 * jcf-dump.c (main): Remove unused general_purpose_bits
1216 * builtins.c (initialize_builtins): Remove unused float_ftype_float
1218 * expr.c (java_stack_pop): Remove unused val variable.
1219 (build_jni_stub): Remove unused res_type variable.
1220 * verify-impl.c (check_field_constant): Remove unused len variable.
1222 2009-10-20 Joel Dice <dicej@mailsnare.net>
1225 * mangle_name.c (append_unicode_mangled_name): Fix mangling
1226 of names with multiple underscores and "U".
1227 (unicode_mangling_length): Likewise.
1229 2009-10-03 Simon Baldwin <simonb@google.com>
1231 * config-lang.in (lang_dirs): Remove zlib.
1233 2009-09-28 Richard Henderson <rth@redhat.com>
1235 * builtins.c (initialize_builtins): Update call to
1236 build_common_builtin_nodes.
1237 * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
1239 2009-09-14 Richard Henderson <rth@redhat.com>
1241 * builtins.c (initialize_builtins): Update call to
1242 build_common_builtin_nodes.
1243 * decl.c (java_init_decl_processing): Don't call
1244 default_init_unwind_resume_libfunc.
1245 * except.c: Include tree-iterator.h.
1246 (build_exception_object_var): New.
1247 (build_exception_object_ref): Use it.
1248 (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
1249 Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
1250 * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
1252 2009-09-13 Richard Guenther <rguenther@suse.de>
1253 Rafael Avila de Espindola <espindola@google.com>
1255 * decl.c (do_nothing): Remove.
1256 (java_init_decl_processing): Do not set lang_eh_runtime_type.
1257 * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
1258 * lang.c (java_eh_personality): New.
1259 (java_eh_personality_decl): Likewise.
1260 (LANG_HOOKS_EH_PERSONALITY): Define.
1262 2009-09-03 Diego Novillo <dnovillo@google.com>
1264 * lang.c (lang_hooks): Remove const qualifier.
1266 2009-09-01 Jakub Jelinek <jakub@redhat.com>
1268 * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
1271 2009-09-01 Richard Guenther <rguenther@suse.de>
1273 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
1274 * java-tree.h (java_mark_addressable): Likewise.
1275 * typeck.c (java_mark_addressable): Likewise.
1277 2009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1279 * Make-lang.in (java.install-pdf): Install gcj.pdf in
1280 $(pdfdir)/gcc, alongside the other manuals.
1282 2009-08-12 Andrew Haley <aph@redhat.com>
1284 * builtins.c (compareAndSwapInt_builtin): Use
1285 flag_use_atomic_builtins.
1286 (compareAndSwapLong_builtin): Likewise.
1287 (compareAndSwapObject_builtin): Likewise.
1288 * jvspec.c: Add flag_use_atomic_builtins.
1289 * gcj.texi: Likewise.
1290 * java-tree.h: Likewise.
1291 * lang.opt: Likewise.
1293 2009-08-11 Dodji Seketeli <dodji@redhat.com>
1296 * lang.c (put_decl_node): Outputs different level of information
1297 depending on the verbosity level.
1299 2009-07-31 Andrew Haley <aph@redhat.com>
1302 * decl.c (java_replace_references): Set EXPR_LOCATION on all
1303 generated expressions.
1304 (binding_level.loc): new field.
1305 (clear_binding_level): Initialize loc.
1306 (set_input_location): New function.
1307 (pushlevel): Set new binding_level.loc.
1308 (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
1309 (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
1310 (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
1312 2009-07-17 Richard Guenther <rguenther@suse.de>
1315 * java-gimplify.c (java_genericize): Do not gimplify here.
1316 But replace all local references.
1317 (java_gimplify_expr): Do not replace local references here.
1318 (java_gimplify_modify_expr): Likewise.
1319 * jcf-parse.c (java_parse_file): Do not finalize the CU or
1320 optimize the cgraph here.
1321 * decl.c (java_replace_reference): Make static.
1322 (java_replace_references): New function.
1323 (end_java_method): Clear base_decl_map.
1324 * java-tree.h (java_replace_references): Declare.
1325 (java_replace_reference): Remove.
1327 2009-07-14 Taras Glek <tglek@mozilla.com>
1328 Rafael Espindola <espindola@google.com>
1330 * Make-lang.in (java.install-plugin): New target for
1331 installing plugin headers.
1333 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1335 * class.c: Replace %J by an explicit location. Update all calls.
1337 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1339 * jcf-parse.c: Replace %H by an explicit location. Update all calls.
1341 2009-06-29 Andrew Haley <aph@redhat.com>
1344 * java-tree.h (cxx_keyword_p): New declaration.
1345 * mangle_name.c (utf8_cmp): Move here from mangle.c.
1346 (cxx_keywords): Likewise.
1347 (cxx_keyword_p): Likewise.
1348 (MANGLE_CXX_KEYWORDS): New macro.
1349 (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
1350 (append_gpp_mangled_name): Likewise.
1351 * mangle.c: Move code to mangle_name.c.
1352 (mangle_member_name): Don't call cxx_keyword_p.
1354 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
1356 * java-gimplify.c (java_gimplify_block): New argument to
1358 * expr.c (force_evaluation_order): Same.
1359 * typeck.c: Add location to build_decl or PUSH_FIELD calls.
1362 * jcf-parse.c: Same.
1363 * constants.c: Same.
1368 * java-tree.h (PUSH_FIELD): Add location field.
1370 2009-06-09 Ian Lance Taylor <iant@google.com>
1372 * verify.h: Remove extern "C".
1374 2009-06-07 Ian Lance Taylor <iant@google.com>
1376 * jcf-parse.c (handle_constant): Change local variable 'kind' to
1379 2009-06-01 Ian Lance Taylor <iant@google.com>
1381 * jcf-io.c (find_class): Use CONST_CAST.
1383 2009-05-27 Ian Lance Taylor <iant@google.com>
1385 * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
1387 (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
1389 2009-05-26 Ian Lance Taylor <iant@google.com>
1391 * Make-lang.in (jvspec.o): Use $(COMPILER).
1392 ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
1393 (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
1395 2009-05-12 Alexandre Oliva <aoliva@redhat.com>
1397 * Make-lang.in (GCJ): Renamed to...
1400 2009-04-27 Ian Lance Taylor <iant@google.com>
1402 * builtins.c (java_builtins): Add casts to enum type.
1403 * verify-impl.c (check_class_constant): Add cast to enum type.
1404 (check_constant, check_wide_constant): Likewise.
1406 2009-04-27 Richard Guenther <rguenther@suse.de>
1409 * constants.c (build_constants_constructor): Retain the old
1410 pointer type as valid TYPE_POINTER_TO after patching the
1411 type of the constant pool decl.
1413 2009-04-24 Ian Lance Taylor <iant@google.com>
1415 * jcf-parse.c (handle_constant): Add cast to enum type.
1417 2009-04-21 Taras Glek <tglek@mozilla.com>
1419 * builtins.c: Update GTY annotations to new syntax
1421 * java-tree.h: Likewise
1425 2009-04-21 Joseph Myers <joseph@codesourcery.com>
1427 * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
1430 2009-04-18 Ian Lance Taylor <iant@google.com>
1432 * verify-impl.c (verify_instructions_0): Add cast to enum type.
1434 2009-04-09 Paolo Bonzini <bonzini@gnu.org>
1436 * builtins.c (compareAndSwapLong_builtin,
1437 compareAndSwapInt_builtin, compareAndSwapObject_builtin,
1438 VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
1440 2009-03-31 Richard Guenther <rguenther@suse.de>
1442 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
1443 the first operand of binary and comaprison expressions.
1445 2009-03-30 Joseph Myers <joseph@codesourcery.com>
1447 PR rtl-optimization/323
1448 * lang.c (java_post_options): Set flag_excess_precision_cmdline.
1449 Give an error for -fexcess-precision=standard for processors where
1450 the option is significant.
1452 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1454 * lang.opt: Unify help text for -Wdeprecated.
1456 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1458 * jcf-dump.c (version): Update copyright notice dates.
1460 2009-01-16 Richard Guenther <rguenther@suse.de>
1462 PR tree-optimization/38835
1464 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
1466 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
1469 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
1471 2008-11-04 Andrew Haley <aph@redhat.com>
1474 * jcf-parse.c (java_emit_static_constructor): Don't call
1475 cgraph_build_static_cdtor. Rewrite.
1477 2008-10-24 Jakub Jelinek <jakub@redhat.com>
1479 * Make-lang.in (check-java-subtargets): New target.
1481 2008-10-16 David Edelsohn <edelsohn@gnu.org>
1484 * Make-lang.in (class.o): Depend on $(TM_P_H).
1486 * class.c: Include tm_p.h.
1487 * expr.c: Include tm_p.h.
1489 2008-10-14 Andrew Haley <aph@redhat.com>
1491 * constants.c (build_constant_data_ref): Make sure we only build
1492 one copy of the decl for the constant pool.
1494 2008-09-22 Andrew Haley <aph@redhat.com>
1496 * expr.c (rules): Add new rule for
1497 gnu.java.lang.VMCPStringBuilder.toString.
1498 (rewrite_rule.new_classname): New field.
1499 (maybe_rewrite_invocation): Use new_classname field instead of
1500 DECL_CONTEXT (*method_p).
1501 Allow rewrite_arglist to be NULL.
1503 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1505 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1506 (java_get_callee_fndecl): Kill.
1508 2008-09-17 Jan Hubicka <jh@suse.cz>
1511 * class.c (add_method_1): Do not initialize DECL_INLINE.
1512 (make_local_function_alias): Likewise.
1513 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
1514 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
1516 2008-09-09 Richard Guenther <rguenther@suse.de>
1518 * decl.c (build_result_decl): Remove no longer applicable
1521 2008-09-05 David Daney <ddaney@avtrex.com>
1523 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
1525 2008-08-21 David Daney <ddaney@avtrex.com>
1527 * class.c (make_class_data): Don't add field_index when
1528 flag_reduced_reflection set.
1530 2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
1532 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
1534 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1537 * lang.c (java_handle_option): Replace set_Wunused with
1540 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1542 * gcj.texi: Update copyright years. Do not list GPL as
1545 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1547 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
1550 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
1553 2008-07-29 Jan Hubicka <jh@suse.cz>
1555 * lang.c (java_post_options): Remove handling of flag_no_inline.
1557 2008-07-28 Richard Guenther <rguenther@suse.de>
1559 Merge from gimple-tuples-branch.
1561 2008-07-18 Richard Guenther <rguenther@suse.de>
1563 * expr.c: Include tree-iterator.h.
1564 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
1566 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1568 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
1571 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1573 * java-gimplify.c (java_gimplify_expr): Same.
1574 (java_gimplify_modify_expr): Same.
1575 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
1577 2008-05-02 Diego Novillo <dnovillo@google.com>
1579 * expr.c (build_java_throw_out_of_bounds_exception): Fix
1580 mixed declarations and code.
1582 2008-05-02 Doug Kwan <dougkwan@google.com>
1584 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
1585 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
1587 2008-02-19 Diego Novillo <dnovillo@google.com>
1589 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1591 * java-gimplify.c (java_gimplify_self_mod_expr): Change
1592 gimple_seq arguments to gimple_seq *. Update all users.
1594 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
1596 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
1598 (java_gimplify_self_mod_expr): Same.
1599 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
1602 2008-07-24 Jan Hubicka <jh@suse.cz>
1604 * java/decl.c: Include cgraph.h
1605 (end_java_method): Remove non-unit-at-a-time code.
1606 (java_mark_decl_local): Likewise; sanity check that we don't touch
1609 2008-07-15 Jan Hubicka <jh@suse.cz>
1611 * lang.c (java_init_options): Enable unit-at-a-time by default.
1613 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1615 * Make-lang.in (jvspec.o): Fix dependencies.
1617 2008-07-06 Tom Tromey <tromey@redhat.com>
1619 * Make-lang.in (java/parse.o-warn): Remove.
1620 (java/jcf-io.o-warn): Remove.
1622 2008-07-05 Tom Tromey <tromey@redhat.com>
1624 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
1625 (compare_path): Remove.
1626 (java_or_class_file): Likewise.
1627 (memoized_dirlist_entry): Likewise.
1628 (memoized_dirlist_hash): Likewise.
1629 (memoized_dirlist_lookup_eq): Likewise.
1630 (memoized_dirlists): Likewise.
1631 (caching_stat): Likewise.
1632 (find_class): Use stat.
1633 * jcf.h (JCF_USE_SCANDIR): Remove.
1635 2008-06-30 Joshua Sumali <jsumali@redhat.com>
1637 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1638 doc/rebuild-gcj-db.1
1639 (java.uninstall): Likewise.
1640 (java.maintainer-clean): Likewise.
1641 (aot-compile.pod): New rule.
1642 (rebuild-gcj-db.pod): New rule.
1643 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1644 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1646 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1648 * Make-lang.in (java/jcf-io.o-warn): New.
1650 2008-06-24 Tom Tromey <tromey@redhat.com>
1652 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1653 * expr.c (add_type_assertion): Rename argument.
1654 (build_java_arrayaccess): Don't name variable 'throw'.
1655 (ARRAY_NEW_MULTI): Don't name variable 'class'.
1656 * jcf-io.c (find_class): Don't name variable 'class'.
1657 * mangle.c (compression_table_add): Don't name variable 'new'.
1658 * constants.c (cpool_for_class): Rename argument.
1659 (alloc_constant_fieldref): Likewise.
1660 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1662 (read_class): Likewise.
1663 (parse_zip_file_entries): Likewise.
1664 (process_zip_dir): Likewise.
1665 * decl.c (java_mark_class_local): Rename argument.
1666 * class.c (GEN_TABLE): Use type_name, not typename.
1667 (gen_indirect_dispatch_tables): Likewise.
1668 (add_field): Rename argument.
1669 (is_compiled_class): Likewise.
1670 (safe_layout_class): Likewise.
1671 (emit_assertion_table): Likewise.
1672 * typeck.c (has_method): Rename argument.
1674 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1676 * class.c (ident_subst, mangled_classname, unmangle_classname,
1677 gen_indirect_dispatch_tables, add_method_1,
1678 build_fieldref_cache_entry, make_local_function_alias,
1679 layout_class, java_treetreehash_find, java_treetreehash_new,
1680 split_qualified_name): Fix for -Wc++-compat.
1681 * constants.c (set_constant_entry, cpool_for_class): Likewise.
1682 * decl.c (make_binding_level, java_dup_lang_specific_decl,
1683 start_java_method): Likewise.
1684 * except.c (prepare_eh_table_type): Likewise.
1685 * expr.c (type_assertion_hash, note_instructions): Likewise.
1686 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1687 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1688 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1690 * jcf-parse.c (reverse, java_read_sourcefilenames,
1691 annotation_grow, rewrite_reflection_indexes, java_parse_file,
1692 process_zip_dir): Likewise.
1693 * jcf-path.c (add_entry, add_path, jcf_path_init,
1694 jcf_path_extdirs_arg): Likewise.
1695 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1696 * jvgenmain.c (do_mangle_classname): Likewise.
1697 * lang.c (put_decl_string): Likewise.
1698 * verify-impl.c (make_state_copy, make_state, add_new_state):
1701 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1703 * gcj.texi: Expand TABs, remove whitespace from blank lines.
1705 2008-06-14 Tom Tromey <tromey@redhat.com>
1708 * class.c (build_class_ref): Initialize this_classdollar when
1711 2008-05-23 Andrew Haley <aph@redhat.com>
1713 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1714 pathname of source file.
1716 2008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1718 * jcf-dump.c (print_constant): Use
1719 HOST_LONG_LONG_FORMAT.
1721 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1723 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1726 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1728 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1729 (build_classdollar_field): Don't set TREE_INVARIANT.
1730 (get_dispatch_table): Don't set TREE_INVARIANT.
1731 (make_class_data): Don't set TREE_INVARIANT.
1732 (build_symbol_entry): Don't set TREE_INVARIANT.
1733 (emit_symbol_table): Don't set TREE_INVARIANT.
1734 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1735 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1736 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1737 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1739 2008-04-03 Tom Tromey <tromey@redhat.com>
1741 * Make-lang.in (java_OBJS): New variable.
1743 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1745 * java-tree.h (insert_block): Kill.
1746 * decl.c (insert_block): Kill.
1748 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1750 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1751 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1754 2008-03-27 Tom Tromey <tromey@redhat.com>
1756 * Make-lang.in: Revert automatic dependency patch.
1758 2008-03-25 Tom Tromey <tromey@redhat.com>
1760 * Make-lang.in: Removed most explicit .o targets.
1761 (java/jvspec.o): Reduce to variable setting. Moved to java/.
1762 ($(GCJ)$(exeext)): Update.
1763 (JAVA_OBJS): New variable.
1764 (JCFDUMP_OBJS): Reformat.
1765 (java_OBJS): New variable.
1766 (java/jvspec.o-warn): Update.
1767 (java/parse.o-warn): Remove.
1768 (JAVA_TREE_H): Remove.
1769 (java/jcf-io.o): Reduce to variable setting.
1770 (ALL_CPPFLAGS): Likewise.
1772 2008-03-12 Paolo Bonzini <bonzini@gnu.org>
1774 * mangle.c (java_mangle_decl): Remove dead check.
1776 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1778 * jcf-parse.c (java_parse_file): Assert binding levels are
1780 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1783 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1785 * jcf-dump.c (version): Update copyright notice dates.
1787 2008-02-29 Tom Tromey <tromey@redhat.com>
1789 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1791 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1793 2008-02-26 Tom Tromey <tromey@redhat.com>
1795 * lang.c (java_post_options): Remove conditional.
1796 * expr.c (expand_byte_code): Remove old location code.
1797 * jcf-parse.c (set_source_filename): Remove old location code.
1798 (give_name_to_class): Likewise.
1799 (jcf_parse): Likewise.
1800 (duplicate_class_warning): Likewise.
1801 (parse_class_file): Likewise.
1802 (java_parse_file): Likewise.
1803 * decl.c (finish_method): Remove old location code.
1804 * class.c (push_class): Remove old location code.
1806 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1809 * Make-lang.in (jc1): Add $(GMPLIBS).
1811 2008-01-23 David Daney <ddaney@avtrex.com>
1813 * class.c (hide) Rename to...
1814 (java_hide_decl) ... this throughout, and make public.
1815 * resource.c (Jr_count): Remove.
1816 (compile_resource_data): Call java_mangle_resource_name to generate
1817 decl name. Make resource decl public and hidden.
1818 * mangle.c (java_mangle_resource_name): New function.
1819 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1822 2008-01-04 Andrew Haley <aph@redhat.com>
1825 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1828 2008-01-03 Andrew Haley <aph@redhat.com>
1831 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1832 we're about to re-layout the type.
1834 2007-12-20 Alexandre Oliva <aoliva@redhat.com>
1836 * lang.c (java_classify_record): Don't return
1837 RECORD_IS_INTERFACE for now.
1839 2007-12-18 Andrew Haley <aph@redhat.com>
1842 * jcf-parse.c (java_parse_file): Remove call to
1843 java_mark_class_local.
1844 (parse_class_file): Reinstate call to java_mark_class_local here.
1845 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1846 already set, call java_mangle_decl() and make_decl_rtl() to
1847 rewrite its name as a hidden alias.
1849 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1852 * lang.c (java_classify_record): New.
1853 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1855 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1858 * decl.c (finish_method): Pass 'false' for the new
1859 allocate_struct_function parameter.
1861 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1863 * expr.c (build_jni_stub): Use the computed jni func type for
1866 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1868 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1870 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1872 * expr.c (type_assertion_hash): Hash type uids rather than
1875 2007-11-17 David Daney <ddaney@avtrex.com>
1876 Andrew Haley <aph@redhat.com>
1878 * constants.c (build_constants_constructor): Use POINTER_SIZE
1879 insead of BITS_PER_WORD in big-endian work around.
1881 2007-11-07 Tom Tromey <tromey@redhat.com>
1884 * gcj.texi (Input Options): Add missing noun.
1886 2007-11-02 Tom Tromey <tromey@redhat.com>
1889 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1890 * zipfile.h (ZIPEMPTYMAGIC): New define.
1892 2007-11-01 Tom Tromey <tromey@redhat.com>
1894 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1895 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1896 (java/jcf-io.o): Depend on zipfile.h.
1898 2007-10-17 Richard Guenther <rguenther@suse.de>
1900 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1903 2007-10-03 Andrew Haley <aph@redhat.com>
1906 * class.c (mangled_classname): Detect and replace illegal
1907 characters in assembly language symbols.
1908 (gen_indirect_dispatch_tables): Call mangled_classname() on
1911 2007-09-27 Jakub Jelinek <jakub@redhat.com>
1913 * lang.c (java_print_error_function): Add third argument.
1915 2007-09-15 Tom Tromey <tromey@redhat.com>
1917 * java-tree.h (struct lang_decl_func) <function_decl_body>:
1919 <init_final>: Likewise.
1920 * lang.c (java_dump_tree): Update.
1921 * java-tree.h (DECL_FUNCTION_BODY): Remove.
1923 2007-09-11 Jan Hubicka <jh@suse.cz>
1925 * decl.c (java_expand_body): Kill.
1926 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1928 2007-09-06 Tom Tromey <tromey@redhat.com>
1930 * jcf-parse.c (parse_class_file): Re-enter the current file.
1932 2007-09-07 Roman Zippel <zippel@linux-m68k.org>
1934 * boehm.c (mark_reference_fields): Move misaligned pointer check
1935 after JREFERENCE_TYPE_P test
1937 2007-09-06 Roman Zippel <zippel@linux-m68k.org>
1939 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1940 if pointer is misaligned.
1942 2007-09-06 Tom Tromey <tromey@redhat.com>
1944 * lang.c (java_post_options): Update.
1945 * jcf-parse.c (set_source_filename): Update.
1946 (give_name_to_class): Update.
1947 (jcf_parse): Update.
1948 (duplicate_class_warning): Update.
1949 (parse_class_file): Update.
1950 (java_parse_file): Update.
1951 * expr.c (expand_byte_code): Update.
1953 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1955 * decl.c (finish_method): Use set_cfun.
1957 2007-09-04 Andrew Haley <aph@redhat.com>
1959 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1960 when using the ARM EABI.
1962 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1964 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1966 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1968 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1970 * jcf.h (JCF_FINISH): Likewise.
1972 2007-08-28 Tom Tromey <tromey@redhat.com>
1974 * Make-lang.in (java.tags): Don't tag '*.y' files.
1976 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1978 * lang.c (java_decl_ok_for_sibcall): Likewise.
1980 2007-08-21 Paul Brook <paul@codesourcery.com>
1981 Nathan Sidwell <nathan@codesourcery.com>
1982 Mark Mitchell <mark@codesourcery.com>
1983 Joseph Myers <joseph@codesourcery.com>
1985 * jcf-dump.c (version): Use pkgversion_string. Update copyright
1988 2007-08-20 Richard Guenther <rguenther@suse.de>
1990 * lang.c (java_tree_inlining_walk_subtrees): Remove.
1991 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1993 2007-08-17 Tom Tromey <tromey@redhat.com>
1995 * typeck.c (find_method_in_interfaces): Update.
1996 * jcf-parse.c (load_class): Update.
1997 * java-gimplify.c (java_gimplify_component_ref): Removed.
1998 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
2000 (java_gimplify_expr): Update.
2001 * decl.c (java_init_decl_processing): Update.
2002 * class.c (set_constant_value): Update.
2003 (make_class_data): Update.
2004 (finish_class): Update.
2005 (build_static_field_ref): Update.
2006 (is_compiled_class): Update.
2007 (maybe_layout_super_class): Update.
2008 (layout_class): Update.
2009 (layout_class_method): Update.
2010 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
2011 (lang_decl_var) <am, final_iud, cif>: Removed fields.
2012 (lang_decl_func) <init_calls_this>: Removed field.
2013 (lang_type) <dot_class, verify_method>: Removed fields.
2014 (FIELD_NESTED_ACCESS): Removed.
2015 (FIELD_NESTED_ACCESS_P): Removed.
2016 (DECL_FIELD_FINAL_IUD): Removed.
2017 (DECL_LOCAL_FINAL_IUD): Removed
2018 (LOCAL_FINAL_P): Removed.
2019 (FINAL_VARIABLE_P): Removed.
2020 (CLASS_FINAL_VARIABLE_P): Removed.
2021 (DECL_BIT_INDEX): Removed.
2022 (DECL_INIT_CALLS_THIS): Removed.
2023 (FIELD_LOCAL_ALIAS): Removed.
2024 (FIELD_LOCAL_ALIAS_USED): Removed.
2025 (FIELD_THISN): Removed.
2026 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
2027 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
2028 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
2029 (TYPE_DOT_CLASS): Removed.
2030 (TYPE_VERIFY_METHOD): Removed.
2031 (ID_CLASSDOLLAR_P): Removed.
2032 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
2034 (classdollar_identifier_node): Removed.
2035 (TYPE_UNKNOWN): Removed.
2036 (CLASS_FROM_SOURCE_P): Removed.
2037 * expr.c (build_jni_stub): Update.
2038 (force_evaluation_order): Update.
2039 (build_java_empty_stmt): Update.
2040 (build_class_init): Update.
2041 (java_stack_swap): Update.
2042 (build_jni_stub): Update.
2044 2007-08-17 Tom Tromey <tromey@redhat.com>
2046 * java-tree.h (LABEL_TYPE_STATE): Removed.
2047 (load_type_state): Removed.
2048 (LABEL_PC): Removed.
2049 (LABEL_VERIFIED): Removed.
2050 (type_states): Declare.
2051 * expr.c (type_states): New global.
2052 (load_type_state): Now static. Use type_states. Changed
2054 (lookup_label): Don't set LABEL_PC.
2055 (expand_byte_code): Don't use LABEL_VERIFIED.
2056 (note_instructions): Initialize type_states.
2057 * verify-glue.c (vfy_note_stack_depth): Rewrote.
2058 (vfy_note_stack_type): Use type_states.
2059 (vfy_note_local_type): Likewise.
2061 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2063 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
2064 * jcf.h (JCF_FINISH): Likewise.
2066 2007-07-31 Nick Clifton <nickc@redhat.com>
2068 * java-gimplify.c: Change copyright header to refer to version 3
2069 of the GNU General Public License and to point readers at the
2070 COPYING3 file and the FSF's license web page.
2071 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
2072 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
2073 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
2074 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
2075 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
2076 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
2077 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
2079 2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2081 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
2083 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2085 * lang.c (java_get_callee_fndecl): Constify.
2087 2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2089 * mangle.c (set_type_package_list): Constify.
2090 * verify-glue.c (vfy_make_string): Delete.
2091 * verify.h (vfy_make_string): Likewise.
2093 2007-07-26 Tom Tromey <tromey@redhat.com>
2095 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
2096 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
2097 EXIT_BLOCK_LABELED_BLOCK): Likewise.
2098 * lang.c (java_tree_inlining_walk_subtrees): Update.
2099 (java_dump_tree): Likewise.
2100 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
2102 * decl.c (push_labeled_block, pop_labeled_block): Remove.
2103 * java-gimplify.c (java_gimplify_labeled_block_expr,
2104 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
2105 (java_gimplify_expr): Update.
2107 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2109 * class.c (java_treetreehash_hash, java_treetreehash_compare):
2111 * expr.c (type_assertion_eq): Likewise.
2112 * jcf-io.c (compare_path): Likewise.
2113 * jcf-parse.c (cmpstringp): Likewise.
2114 * verify-impl.c (get_one_type, compute_argument_types,
2115 compute_return_type): Likewise.
2117 2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2121 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
2123 2007-07-12 Richard Guenther <rguenther@suse.de>
2125 * expr.c (expand_java_return): RETURN_EXPR has void type.
2126 (build_jni_stub): Likewise. Use a comparison against zero
2127 for null-pointer test in COND_EXPR.
2128 (build_field_ref): Build POINTER_PLUS_EXPR with correct
2129 type. Convert result instead.
2130 (build_invokevirtual): Likewise.
2132 2007-07-09 Geoffrey Keating <geoffk@apple.com>
2135 * lang.c (java_init): Remove setting of force_align_functions_log.
2136 * class.c (add_method_1): Set DECL_ALIGN of non-static method
2137 to cope with ptrmemfunc_vbit_in_pfn.
2139 2007-07-03 David Daney <ddaney@avtrex.com>
2141 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
2143 (doc/gcj.dvi): Same.
2144 (doc/gcj.pdf): Same.
2145 (java/index.html): Same.
2147 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2149 * class.c (make_class_data): Build the index in sizetype.
2150 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
2151 adding to a pointer type.
2152 (build_symbol_entry): Likewise.
2153 * expr.c (build_java_arrayaccess): Likewise.
2154 (build_field_ref): Likewise.
2155 (build_known_method_ref): Likewise.
2156 (build_invokevirtual): Likewise.
2157 * except.c (build_exception_object_ref): Do a
2158 NEGATIVE and then a POINTER_PLUS_EXPR instead
2161 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
2163 * typeck.c (java_signed_type): Remove.
2164 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
2165 * java-tree.h (java_signed_type): Remove.
2167 2007-05-18 Geoffrey Keating <geoffk@apple.com>
2169 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
2170 (print_constant): Likewise.
2172 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
2174 * expr.c (build_java_binop): Use unsigned_type_for instead of
2176 * java-tree.h (java_unsigned_type): Remove.
2177 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2178 * typeck.c (java_unsigned_type): Remove.
2180 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
2182 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
2183 instead of checking GIMPLE_STMT_P in chain_next.
2185 2007-04-06 Colin Walters <walters@redhat.com>
2187 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
2188 * jcf-io.c (open_class): Copy 'filename'.
2190 2007-04-03 Andrew Haley <aph@redhat.com>
2192 * jvgenmain.c (main): Change main to use class$, not class$$.
2193 (do_mangle_classname): Likewise.
2194 * class.c (hide): New function.
2195 (add_field): Hide everything that shouldn't be visible outside a
2197 (build_static_class_ref): Likewise.
2198 (build_classdollar_field): Likewise.
2199 (make_class_data): Likewise.
2200 (layout_class_method): Likewise.
2201 * expr.c (special_method_p): New function.
2203 * class.c (push_class): Don't bogusly guess the source filename.
2204 * jcf-parse.c (give_name_to_class): Don't set input_location from
2205 DECL_ARTIFICIAL decls.
2207 2007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
2209 * typeck.c (java_signed_or_unsigned_type): Removed.
2210 (java_signed_type): use get_signed_or_unsigned_type instead of
2211 java_signed_or_unsigned_type.
2212 (java_unsigned_type): Ditto.
2213 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
2214 * java-tree.h (java_signed_or_unsigned_type): Removed.
2216 2007-03-26 Tom Tromey <tromey@redhat.com>
2218 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
2219 (java.maintainer-clean): Likewise.
2220 (java.install-man): Likewise.
2221 (.INTERMEDIATE): Removed grmiregistry.pod.
2222 (grmiregistry.pod): Removed.
2223 * gcj.texi (Invoking gcjh): Removed.
2224 (Invoking gjnih): Likewise.
2225 (Invoking grmiregistry): Likewise.
2226 (direntry): Updated.
2228 (which-gcj): Removed.
2230 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2232 * Make-lang.in: Add install-pdf target as copied from
2233 automake v1.10 rules.
2235 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
2237 * gcj.texi: Standardize title page.
2239 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
2241 * class.c: Fix a comment typo.
2243 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2244 Brooks Moses <brooks.moses@codesourcery.com>
2245 Lee Millward <lee.millward@codesourcery.com>
2247 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
2249 (BUILD_MONITOR_EXIT): Likewise.
2251 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
2252 (java_gimplify_modify_expr): Likewise.
2254 * class.c (cache_this_class_ref): Use build_call_expr.
2255 (build_static_field_ref): Likewise.
2256 (emit_indirect_register_classes): Likewise.
2257 (emit_register_classes): Likewise.
2259 * resource.c (write_resource_constructor): Use build_call_expr.
2261 * builtins.c (builtin_creator_function): Change interpretation of
2262 the second parameter to be the whole CALL_EXPR instead of the arglist.
2263 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
2264 (min_builtin): Likewise.
2265 (abs_builtin): Likewise.
2266 (java_build_function_call_expr): Likewise.
2267 (convert_real): Likewise.
2268 (UNMARSHAL3): Likewise.
2269 (UNMARSHAL4): Likewise.
2270 (UNMARSHAL5): Likewise.
2271 (build_arglist_for_builtin): Delete. Fix callers to use
2272 build_call_expr instead.
2273 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
2275 (compareAndSwapInt_builtin): Likewise.
2276 (compareAndSwapLong_builtin): Likewise.
2277 (compareAndSwapObject_builtin): Likewise.
2278 (putVolatile_builtin): Likewise.
2279 (getVolatile_builtin): Likewise.
2280 (VMSupportsCS8_builtin): Likewise.
2281 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
2284 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
2285 (build_java_throw_out_of_bounds_exception): Likewise.
2286 (java_check_reference): Likewise.
2287 (build_java_arraystore_check): Likewise.
2288 (build_newarray): Likewise.
2289 (build_anewarray): Likewise.
2290 (expand_java_multinewarray): Use build_call_list instead of build3.
2291 (build_java_monitor): Use build_call_nary instead of build3.
2292 (java_create_object): Likewise.
2293 (expand_java_NEW): Likewise.
2294 (build_instanceof): Likewise.
2295 (expand_java_CHECKCAST): Likewise.
2296 (build_java_soft_divmod): Likewise.
2297 (build_java_binop): Likewise.
2298 (build_field_ref): Likewise.
2299 (build_class_init): Likewise.
2300 (rewrite_arglist_getcaller): Use build_call_expr.
2301 (build_invokeinterface): Use build_call_nary instead of build3.
2302 (expand_invoke): Use build_call_list instead of build3.
2303 (build_jni_stub): Use build_call_nary, build_call_list, or
2304 build_call_expr instead of build3.
2305 (expand_java_field_op): Use build_call_expr instead of build3.
2306 (force_evaluation_order): Use new CALL_EXPR accessors.
2308 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
2310 2007-02-15 David Daney <ddaney@avtrex.com>
2312 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
2313 (java.maintainer-clean):Add gc-analyze.1.
2314 (.INTERMEDIATE): Add gc-analyze.pod.
2315 (gc-analyze.pod): New rule.
2316 (java.install-man): Install gc-analyze.1
2317 * gcj.texi: Add new section for the gc-analyze program.
2319 2007-02-07 Andrew Haley <aph@redhat.com>
2321 * class.c (uncache_this_class_ref): New.
2322 * expr.c (build_jni_stub): Initialize the class.
2323 (expand_byte_code): Call uncache_this_class_ref after generating
2326 2007-02-06 Tom Tromey <tromey@redhat.com>
2329 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
2331 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
2333 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
2335 2007-02-02 Andrew Haley <aph@redhat.com>
2337 * expr.c (expand_byte_code): Call cache_this_class_ref() and
2338 cache_cpool_data_ref().
2339 Set TYPE_CPOOL_DATA_REF.
2340 (cache_cpool_data_ref): New function.
2341 * constants.c (build_ref_from_constant_pool): Remove special-case
2342 code for flag_indirect_classes.
2343 (build_constant_data_ref): Move special-case code for
2344 flag_indirect_classes here from build_ref_from_constant_pool.
2345 * decl.c (finish_method): Move class initialization from here to
2346 cache_this_class_ref.
2347 * class.c (cache_this_class_ref): New function.
2348 (build_class_ref): Use this_classdollar for the ouput class.
2350 2007-02-02 David Daney <ddaney@avtrex.com>
2352 * class.c (is_compiled_class): Move check to avoid reloading
2354 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
2357 2007-02-01 Andrew Haley <aph@redhat.com>
2360 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
2362 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
2364 * class.c, jcf-parse.c: Fix comment typos.
2366 2007-01-30 Tom Tromey <tromey@redhat.com>
2368 * gcj.texi (Strings): Fix documentation for JvNewString.
2370 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2372 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
2375 2007-01-30 Ben Elliston <bje@au.ibm.com>
2377 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
2379 2007-01-29 Tom Tromey <tromey@redhat.com>
2382 * jvspec.c (lang_specific_driver): Handle separate -I argument.
2383 * lang.opt (-I): Add 'Separate'.
2385 2007-01-29 Andrew Haley <aph@redhat.com>
2387 * class.c (add_method_1): Mark fndecl as external unless we are
2388 compiling it into this object file.
2390 2007-01-24 Andrew Haley <aph@redhat.com>
2392 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
2393 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
2395 2007-01-22 Andrew Haley <aph@redhat.com>
2397 * builtins.c (VMSupportsCS8_builtin): New function.
2399 2007-01-23 Andrew Pinski <pinskia@gmail.com>
2402 * jcf-io.c (opendir_in_zip): Close the file
2403 and free zipf before returning after an error.
2405 2007-01-16 Tom Tromey <tromey@redhat.com>
2407 * java-tree.def: Added copyright header.
2409 2007-01-15 Tom Tromey <tromey@redhat.com>
2411 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
2413 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
2415 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
2416 (EXPR_WFL_NODE): Likewise.
2417 (EXPR_WFL_LINECOL): Likewise.
2418 (EXPR_WFL_FILENAME): Likewise.
2419 (EXPR_WFL_LINENO): Likewise.
2420 (build_expr_wfl, expr_add_location): Don't declare.
2421 (build_unknown_wfl): Removed.
2422 (EXPR_WFL_FILENAME_NODE): Removed.
2423 (EXPR_WFL_COLNO): Removed.
2424 (EXPR_WFL_SET_LINECOL): Removed.
2425 (DECL_FUNCTION_WFL): Removed.
2426 (DECL_FIELD_FINAL_WFL): Removed.
2427 (struct lang_decl_func) <wfl>: Removed field.
2428 <called_constructor>: Likewise.
2429 <inner_access>: Likewise.
2430 (struct lang_decl_var) <wfl>: Removed field.
2431 (DECL_CONSTRUCTOR_CALLS): Removed.
2432 (DECL_FUNCTION_ACCESS_DECL): Likewise.
2433 (DECL_FUNCTION_INNER_ACCESS): Likewise.
2434 (DECL_SPECIFIC_COUNT): Likewise.
2435 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
2436 * expr.c (build_expr_wfl): Removed.
2437 (expr_add_location): Likewise.
2439 2007-01-12 Tom Tromey <tromey@redhat.com>
2441 * jcf-dump.c (main): Updated call to find_class.
2442 * lang.c (java_init): Removed dead code.
2443 * jcf-parse.c (read_class): Don't use java_source field. Removed
2445 (parse_zip_file_entries): Don't use java_source field.
2446 (process_zip_dir): Likewise.
2447 (jcf_parse): Removed dead code.
2448 (java_parse_file): Likewise.
2449 (read_class): Updated call to find_class.
2450 * jcf-io.c (find_class): Don't use java_source field. Removed
2451 'source_ok' argument, .java logic.
2452 * jcf.h (JCF) <java_source>: Removed field.
2453 (JCF_ZERO): Updated. (find_class): Updated.
2454 * decl.c: Removed dead code.
2455 * class.c: Removed dead code.
2457 2007-01-11 Tom Tromey <tromey@redhat.com>
2459 * typeck.c (convert): Don't use flag_emit_class_files.
2460 * lang.c (java_post_options): Don't use flag_emit_class_files.
2461 (java_handle_option): Don't use flag_extraneous_semicolon or
2463 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
2464 flag_emit_class_files.
2465 (load_class): Likewise.
2466 * java-tree.h (flag_emit_class_files): Don't declare.
2467 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
2468 (flag_extraneous_semicolon): Don't declare.
2469 (flag_not_overriding): Likewise.
2470 (flag_static_local_jdk1_1): Likewise.
2471 (flag_redundant): Likewise.
2472 * expr.c (build_newarray): Don't use flag_emit_class_files.
2473 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
2474 flag_emit_class_files.
2475 (build_class_ref): Likewise.
2476 * builtins.c (check_for_builtin): Don't use
2477 flag_emit_class_files.
2479 2007-01-10 Tom Tromey <tromey@redhat.com>
2481 * lang.c (java_can_use_bit_fields_p): Removed.
2482 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
2484 2007-01-09 Andrew Haley <aph@redhat.com>
2486 * expr.c (build_java_arrayaccess): Rewrite to generate array
2487 access in canonical form.
2488 (expand_java_arraystore): Use build_fold_addr_expr() on address of
2491 2007-01-03 Andrew Haley <aph@redhat.com>
2494 * expr.c (expand_java_field_op): If we're initializing a field's
2495 declaring interface we should not also initialize the class
2496 context in which it was referenced.
2498 2007-01-02 Tom Tromey <tromey@redhat.com>
2500 * java-tree.h (compiling_from_source, current_encoding,
2501 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
2502 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
2503 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
2504 JTI_WFL_OPERATOR): Removed
2505 (finit_identifier_node, instinit_identifier_node,
2506 length_identifier_node, super_identifier_node,
2507 continue_identifier_node, access0_identifier_node, wfl_operator):
2509 (cyclic_inheritance_report,
2510 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
2511 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
2512 DECL_FIXED_CONSTRUCTOR_P): Removed.
2513 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
2515 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
2516 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
2517 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
2518 import_list, import_demand_list>: Removed.
2519 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
2520 cxx_keyword_p): Removed.
2521 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
2522 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
2523 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
2524 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
2525 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
2526 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
2527 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
2528 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
2529 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
2530 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
2531 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
2532 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
2533 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
2534 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
2535 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
2536 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
2537 java_parse_abort_on_error, extract_field_decl): Removed.
2539 * lang.c: (compiling_from_source, current_encoding): Removed.
2540 (java_handle_option): Ignore -fencoding.
2541 * parse.h: Don't include lex.h.
2542 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
2543 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
2544 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
2545 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
2546 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
2547 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
2548 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
2549 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
2550 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
2551 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
2552 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
2553 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
2554 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
2555 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
2556 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
2557 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
2558 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
2559 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
2560 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
2561 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
2562 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
2563 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
2564 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
2565 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
2566 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
2567 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
2568 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
2569 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
2570 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
2571 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
2572 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
2573 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
2574 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
2575 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
2576 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
2577 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
2578 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
2579 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
2580 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
2581 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
2582 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
2583 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
2584 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
2585 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
2586 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
2587 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
2588 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
2589 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
2590 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
2591 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
2592 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
2593 SET_CPC_STATIC_INITIALIZER_STMT,
2594 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
2595 java_complete_class, java_check_circular_reference,
2596 java_fix_constructors, java_layout_classes, java_reorder_fields,
2597 java_method_add_stmt, java_get_line_col, reset_report,
2598 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
2599 java_finish_classes, ctxp, ctxp_for_generation,
2600 ctxp_for_generation_last): Removed.
2601 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
2602 * mangle.c (utf8_cmp): New function.
2603 (cxx_keywords): New global.
2604 (cxx_keyword_p): New function.
2605 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
2606 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
2607 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
2608 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
2609 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
2610 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
2611 * Make-lang.in (java.srcextra): Do nothing.
2612 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
2613 (JAVA_OBJS): Don't mention deleted files.
2614 (java.mostlyclean): Likewise.
2615 (java.clean): Likewise.
2616 (JAVA_LEX_C): Removed.
2617 (buffer.o, check-init.o, parse.o): Remove unused targets.
2618 (typeck.o): Updated.
2619 * jcf-parse.c (read_class): Comment out unused code.
2620 (java_layout_seen_class_methods): New function.
2621 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2623 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
2624 (init_jcf_parse): Removed.
2625 * config-lang.in (gtfiles): Remove deleted files.
2626 * decl.c (java_init_decl_processing): Don't initialize
2627 finit_identifier_node, instinit_identifier_node,
2628 length_identifier_node, super_identifier_node,
2629 continue_identifier_node, access0_identifier_node. Don't call
2631 * class.c (cyclic_inheritance_report): New global.
2632 (add_method_1): Don't use
2633 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2634 (maybe_layout_super_class): Comment out code.
2635 (safe_layout_class): New function.
2636 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2637 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2638 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2639 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2640 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2641 (java_gimplify_case_expr): Removed.
2642 (java_gimplify_default_expr): Likewise.
2643 (java_gimplify_new_array_init): Likewise.
2645 * keyword.gperf, keyword.h: Removed.
2646 * chartables.h: Removed.
2647 * check-init.c: Removed.
2648 * buffer.c, buffer.h: Removed.
2649 * convert.h: Removed.
2650 * gen-table.pl: Removed.
2651 * lex.c, lex.h: Removed.
2653 2007-01-02 Andrew Haley <aph@redhat.com>
2655 * expr.c (expand_java_arraystore): Make sure we perform a bounds
2656 check at runtime before we perform a type check.
2658 2006-12-19 Andrew Haley <aph@redhat.com>
2660 * decl.c: Bump minor BC ABI version.
2662 2006-12-13 Gary Benson <gbenson@redhat.com>
2664 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2666 2006-12-12 Tom Tromey <tromey@redhat.com>
2668 * lang-specs.h: Pass -M options to jc1.
2669 * jcf-depend.c (jcf_dependency_add_file): Don't emit
2672 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
2674 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2676 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
2678 * lang-specs.h: Pass '%U'-based options as separate arguments.
2680 2006-12-05 Tom Tromey <tromey@redhat.com>
2683 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2685 * class.c (add_field): Handle ACC_SYNTHETIC.
2686 (add_method_1): Likewise. Handle bridge and varargs.
2687 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2689 (set_class_decl_access_flags): Handle synthetic and annotation.
2690 * java-tree.h (METHOD_BRIDGE): New macro.
2691 (METHOD_VARARGS): Likewise.
2692 (TYPE_SYNTHETIC): Likewise.
2693 (TYPE_ANNOTATION): Likewise.
2694 (lang_type): New fields 'synthetic' and 'annotation'.
2695 (lang_decl_func): New fields 'varargs' and 'bridge'.
2697 2006-12-04 Andrew Haley <aph@redhat.com>
2699 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2702 2006-11-29 Gary Benson <gbenson@redhat.com>
2704 * expr.c (rewrite_arglist_getcaller): Reorder.
2706 2006-11-29 Andrew Haley <aph@redhat.com>
2708 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2709 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2711 2006-11-23 Andrew Haley <aph@redhat.com>
2713 * expr.c (rewrite_arglist_getcaller): New.
2714 (rewrite_arglist_getclass): Fix indentation.
2715 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
2716 gnu.classpath.VMStackWalker.getCallingClassLoader().
2717 * builtins.c (initialize_builtins): Remove duplicate def'n of
2719 Add __builtin_return_address.
2721 2006-11-22 Andrew Haley <aph@redhat.com>
2723 * jcf-reader.c (get_attribute): Mark attr_type unused.
2725 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2727 2007-01-08 Richard Guenther <rguenther@suse.de>
2729 * lex.c (do_java_lex): Use build_int_cst_wide_type.
2730 * jcf-parse.c (get_constant): Likewise.
2732 2006-11-12 Jan Hubicka <jh@suse.cz>
2734 * resource.c (compile_resource_data): Update for new varpool names.
2735 * java/class.c (build_utf8_ref): Likewise.
2737 2006-11-12 David Daney <ddaney@avtrex.com>
2740 * typeck.c (build_java_array_type): Increase buffer sizes.
2742 2006-11-11 Richard Guenther <rguenther@suse.de>
2744 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2745 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2747 2006-11-06 Andrew Haley <aph@redhat.com>
2749 * java-tree.h (CONSTANT_LazyFlag): New.
2750 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2751 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2753 (handle_constant): Return 0 for dummy cpool entries.
2754 Handle constants of kind Class.
2755 Handle constants of kind NameAndType.
2756 (handle_enclosingmethod_attribute): New.
2757 (handle_signature_attribute): New.
2758 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2759 (HANDLE_SIGNATURE_ATTRIBUTE): New.
2760 (handle_constant): Use unmangle_classname()rather than calling
2761 identifier_subst() directly.
2763 2006-11-02 Andrew Haley <aph@redhat.com>
2765 * java-tree.h (FIELD_ENUM): New.
2766 (lang_decl_var.field_enum): New.
2767 (lang_type.enum_class): New.
2769 * class.c (set_class_decl_access_flags): Handle enum types.
2770 (add_field): Handle enum fields.
2771 (get_access_flags_from_decl): Likewise.
2773 * class.c (make_class_data): Put reflection_data into rodata.
2775 2006-11-01 Andrew Haley <aph@redhat.com>
2777 * jcf-parse.c (field_offsets, bit_obstack): New variables.
2778 (jcf_parse): Write end marker to annotation_data.
2779 (java_parse_file): Create field_offsets bitmap. Destroy it.
2780 (annotation_grow, annotation_rewrite_byte)
2781 (annotation_rewrite_short, annotation_rewrite_int)
2782 (annotation_read_short, annotation_write_byte)
2783 (annotation_write_short, annotation_write_int)
2784 (handle_long_constant, handle_constant, handle_element_value)
2785 (handle_annotation, handle_annotations)
2786 (handle_annotation_attribute, rewrite_reflection_indexes)
2787 (handle_member_annotations, handle_parameter_annotations)
2788 (handle_default_annotation): New functions.
2789 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2790 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2791 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2792 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2793 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2794 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
2795 (TYPE_REFLECTION_DATA): New.
2796 (TYPE_REFLECTION_DATASIZE): New.
2797 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2799 * jcf-reader.c (get_attribute): Pass field/method index and
2800 attribute type to get_attribute().
2801 * constants.c (find_class_or_string_constant): Make nonstatic.
2802 (cpool_for_class): Likewise.
2803 (build_constants_constructor): Separate string and scalar types.
2804 * class.c (make_class_data): Generate field_indexes permutation.
2805 Pass it to rewrite_reflection_indexes().
2806 (make_class_data): Generate constructor for reflection_data field.
2808 2006-10-20 Tom Tromey <tromey@redhat.com>
2810 * gcj.texi (Top): Don't mention jv-scan.
2811 (Invoking gcj): Likewise.
2812 (Invoking gcjh): Likewise.
2813 (Invoking gjnih): Likewise.
2814 (Invoking gij): Likewise.
2815 (Invoking gcj-dbtool): Likewise.
2816 (Invoking jv-scan): Removed.
2817 * parse-scan.y: Removed.
2818 * jv-scan.c: Removed.
2819 * config-lang.in (stagestuff): Don't mention jv-scan.
2820 * Make-lang.in (java): Removed jv-scan.
2821 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2822 (JVSCAN_OBJS): Removed.
2823 (jv-scan$(exeext)): Likewise.
2824 (JAVA_MANFILES): Removed jv-scan.1.
2825 (java.uninstall): Don't mention jv-scan.
2826 (java.mostlyclean): Likewise.
2827 (java.maintainer-clean): Likewise.
2828 (.INTERMEDIATE): Likewise.
2829 (java/jv-scan.o): Removed.
2830 (jv-scan.pod): Likewise.
2831 (java.srcextra): Don't mention parse-scan.c.
2832 (java.mostlyclean): Likewise.
2833 (java/parse-scan.c): Removed.
2834 (java/parse-scan.o-warn): Removed.
2835 (java/parse-scan.o): Removed.
2837 2006-10-20 Tom Tromey <tromey@redhat.com>
2839 * lang.c (java_handle_option): Don't use
2840 jcf_write_base_directory.
2841 * jcf.h (jcf_write_base_directory): Removed.
2842 * parse.y (java_expand_classes): Don't call write_classfile.
2843 * config-lang.in (gtfiles): Removed jcf-write.c.
2844 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2845 (java/jcf-write.o): Removed.
2846 * jcf-parse.c (parse_class_file): Don't call write_classfile.
2847 * java-tree.h (write_classfile): Removed declaration.
2848 * jcf-write.c: Removed.
2850 2006-10-20 Tom Tromey <tromey@redhat.com>
2852 * Make-lang.in (java): Removed gjnih, gcjh.
2853 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2854 (GCJH_OBJS): Removed.
2855 (GJNIH_OBJS): Likewise.
2856 (gjnih$(exeext)): Likewise.
2857 (gcjh$(exeext)): Likewise.
2858 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2859 (java.install-common): Don't special case gcjh.
2860 (java.uninstall): Don't mention gcjh, gjnih.
2861 (java.mostlyclean): Likewise.
2862 (java.maintainer-clean): Likewise.
2863 (.INTERMEDIATE): Likewise.
2864 (gcjh.pod): Removed.
2865 (gjnih.pod): Likewise.
2866 (GCJH_TARGET_INSTALL_NAME): Removed.
2867 (java/gjavah-jni.o): Removed.
2868 (java/gjavah.o): Likewise.
2869 * config-lang.in (stagestuff): Removed gjnih, gcjh.
2870 * gjavah.c: Removed.
2872 2006-10-17 Tom Tromey <tromey@redhat.com>
2874 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2877 2006-10-17 Tom Tromey <tromey@redhat.com>
2879 * jvgenmain.c (main): Handle -findirect-dispatch.
2880 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2883 2006-10-06 Andrew Haley <aph@redhat.com>
2885 * builtins.c (compareAndSwapInt_builtin): Check that we really do
2886 have a compare_and_swap builtin.
2887 (compareAndSwapLong_builtin): Likewise.
2888 (compareAndSwapObject_builtin): Likewise.
2890 2006-10-04 Andrew Haley <aph@redhat.com>
2892 * builtins.c (java_builtins): Add compareAndSwapInt,
2893 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2894 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2895 putObjectVolatile, getObjectVolatile, getIntVolatile,
2896 getLongVolatile, getLong.
2897 (UNMARSHAL3): New macro.
2898 (UNMARSHAL4): Likewise.
2899 (UNMARSHAL5): Likewise.
2900 (build_arglist_for_builtin): New function.
2901 (build_addr_sum, build_check_this): New functions.
2902 (putObject_builtin. compareAndSwapInt_builtin,
2903 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2904 putVolatile_builtin, getVolatile_builtin): New builtins.
2906 2006-06-08 Andrew Haley <aph@redhat.com>
2908 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2909 get_symbol_table_index().
2910 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2912 (build_known_method_ref): New arg: special. Pass it to
2913 get_symbol_table_index.
2914 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2916 (build_invokevirtual): New arg: special. Pass it to
2917 get_symbol_table_index.
2918 (expand_invoke): New variable: special.
2919 Pass it to maybe_rewrite_invocation().
2920 Pass it to build_known_method_ref().
2921 * class.c (build_symbol_entry): Add new arg: special. Use it to
2922 build the symbol table conbstructor.
2923 (emit_symbol_table): Extract SPECIAL from the method list and pass
2924 it to build_symbol_entry().
2925 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2926 special accordingly.
2928 2006-09-08 Andrew Haley <aph@redhat.com>
2930 * class.c (layout_class_method): Use build_java_signature, not
2931 build_java_argument_signature. Use lookup_java_method, not
2932 lookup_argument_method.
2934 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2935 Bryce McKinlay <bryce@mckinlay.net.nz>
2937 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2939 2006-07-18 Tom Tromey <tromey@redhat.com>
2941 * lang.opt: Added missing -W options.
2943 2006-07-12 Tom Tromey <tromey@redhat.com>
2946 * lang-specs.h: Pass '%U'-based options as separate arguments.
2947 Use -faux-classpath.
2948 * lang.c (java_handle_option): Handle OPT_faux_classpath.
2949 * lang.opt (faux-classpath): New option.
2951 2006-07-07 Tom Tromey <tromey@redhat.com>
2953 * class.c (make_class_data): Set value for reflection_data field.
2954 * decl.c (java_init_decl_processing): Add reflection_data field.
2956 2006-07-07 Tom Tromey <tromey@redhat.com>
2958 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2960 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2962 2006-07-07 Andrew Haley <aph@redhat.com>
2964 * jcf-parse.c (set_source_filename): Don't check for
2965 CLASS_FROM_CURRENTLY_COMPILED_P.
2968 2006-07-07 Andrew Haley <aph@redhat.com>
2970 * java-tree.h (java_read_sourcefilenames): Declare.
2971 * lang.c (java_handle_option): Call java_read_sourcefilenames().
2972 * lang.opt (fsource-filename): New opt.
2973 * lang-specs.h: Add -fsource-filename.
2974 * jcf-parse.c (num_files, filenames): New variables.
2975 (reverse, cmpstringp, java_read_sourcefilenames,
2976 find_sourcefile): New.
2977 (set_source_filename): Call find_sourcefile to find the real name
2980 2006-06-27 Tom Tromey <tromey@redhat.com>
2982 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2983 Signature, LocalVariableTypeTable, annotation attributes.
2984 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2985 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2986 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2987 (HANDLE_METHOD): Likewise.
2988 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2989 (print_annotation): New function.
2990 (print_element_value): Likewise.
2992 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2993 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2994 (print_parameter_annotations): New function.
2995 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2996 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2998 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2999 (print_annotations): New function.
3001 2006-06-23 Tom Tromey <tromey@redhat.com>
3003 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
3004 emitting class files, always use 1.5.
3005 * gcj.texi (Input Options): Document -fsource.
3006 (Code Generation): Document -ftarget.
3008 2006-06-21 Tom Tromey <tromey@redhat.com>
3011 * expr.c (expand_java_field_op): Initialize field's declaring
3014 2006-06-20 Tom Tromey <tromey@redhat.com>
3016 * expr.c (push_value): Always flush quick stack.
3018 2006-06-19 Tom Tromey <tromey@redhat.com>
3020 * expr.c (push_value): Also flush quick stack if value is a
3023 2006-06-19 Tom Tromey <tromey@redhat.com>
3025 * expr.c (push_value): Flush quick stack if value has side
3028 2006-06-13 Tom Tromey <tromey@redhat.com>
3030 * class.c (is_compiled_class): Explicitly check for current
3033 2006-06-09 Tom Tromey <tromey@redhat.com>
3035 * gjavah.c (decompile_method): Don't decompile a static field
3038 2006-06-06 Tom Tromey <tromey@redhat.com>
3040 * lang-specs.h <jc1>: Add .jar file to command line if
3041 -fsaw-java-file. Also, remove -ffilelist-file in this case.
3043 2006-06-05 Tom Tromey <tromey@redhat.com>
3045 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
3046 synthetic, enum, annotation.
3047 * jcf.h (ACC_BRIDGE): New macro.
3048 (ACC_VARARGS): Likewise.
3049 (ACC_SYNTHETIC): Likewise.
3050 (ACC_ENUM): Likewise.
3051 (ACC_ANNOTATION): Likewise.
3053 2006-06-04 Tom Tromey <tromey@redhat.com>
3055 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
3056 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
3058 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
3059 when needed. Handle classpath-setting.
3060 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
3061 * lang-specs.h: Rewrote.
3063 2006-06-04 Tom Tromey <tromey@redhat.com>
3065 * jcf-io.c (find_class): Set source_ok to 0.
3066 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
3067 (parse_class_file): Don't call java_mark_class_local.
3068 (java_parse_file): Skip .java files. Call java_mark_class_local
3069 before lowering any code.
3070 (parse_zip_file_entries): Don't call duplicate_class_warning
3072 (process_zip_dir): ... call it here.
3073 * class.c (add_field): Don't mark field external if it is being
3074 compiled into this object.
3075 (make_class_data): Handle situation where class_dtable_decl is
3076 created before Class is compiled.
3077 (is_compiled_class): Don't assume files in zip are compiled into
3079 (layout_class_method): Don't mark method external if it is being
3080 compiled into this object.
3082 2006-06-04 Tom Tromey <tromey@redhat.com>
3084 * jcf-path.c (jcf_path_compute): New function.
3085 * jcf.h (jcf_path_compute): Declare.
3087 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3089 * decl.c: Include langhooks.h.
3090 (builtin_function): Remove.
3091 (java_init_decl_processing): Replace calls to builtin_function
3092 with add_builtin_function.
3093 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
3094 (java/decl.o): Depend on langhooks.h.
3095 * java-tree.h (builtin_function): Remove.
3097 2006-10-10 Brooks Moses <bmoses@stanford.edu>
3099 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
3101 2006-09-12 Tom Tromey <tromey@redhat.com>
3103 * expr.c (push_value): Always flush quick stack.
3105 2006-09-12 Tom Tromey <tromey@redhat.com>
3108 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
3109 the push of the called method's return result.
3111 2006-09-12 Tom Tromey <tromey@redhat.com>
3113 * jvspec.c (lang_specific_driver): Read spec file even if
3116 2006-09-12 Tom Tromey <tromey@redhat.com>
3119 * expr.c (expand_java_field_op): Initialize field's declaring
3120 interface if necessary.
3122 2006-09-12 Tom Tromey <tromey@redhat.com>
3125 * expr.c (expand_java_field_op): No error for assignments not in
3126 class initializer or constructor.
3128 2006-08-22 Andrew Haley <aph@redhat.com>
3130 * decl.c (java_add_stmt): Give the statement list a type.
3132 2006-08-16 Jakub Jelinek <jakub@redhat.com>
3133 Bryce McKinlay <bryce@mckinlay.net.nz>
3135 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
3137 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
3140 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
3141 or '--' is used with a constant operand.
3142 (java_complete_lhs): When processing a '++' or '--' expression,
3143 don't call java_complete_tree but java_complete_lhs, so that a
3144 static final variable operand is never replaced by its value. This
3145 avoids an ICE later on.
3146 (patch_unaryop): Fixed typo in comment.
3148 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3150 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
3152 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
3154 * builtins.c (check_for_builtin): If a builtin could result in a
3155 direct call being generated, don't use it if flag_indirect_dispatch
3158 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
3160 * gcj.texi (Invocation): Corrections for Invocation API example.
3162 2006-07-04 Andrew Haley <aph@redhat.com>
3164 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
3167 2006-06-21 Andrew Haley <aph@redhat.com>
3169 * java-tree.h (update_aliases): Remove
3170 * expr.c (expand_iinc): Remove call to update_aliases().
3171 (STORE_INTERNAL): Likewise.
3172 * decl.c (update_aliases, initialize_local_variable)
3173 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
3175 2006-06-19 Andrew Haley <aph@redhat.com>
3179 * expr.c (java_modify_addr_for_volatile): New function.
3180 (expand_java_field_op): Handle volatile fields.
3181 * java-gimplify.c (java_gimplify_component_ref): Call
3182 java_modify_addr_for_volatile to give the field_ref the correct
3184 (java_gimplify_modify_expr): Likewise.
3185 * java-tree.h (java_modify_addr_for_volatile): New decl.
3187 2006-06-17 Karl Berry <karl@gnu.org>
3189 * gcj.texi (@dircategory): Use "Software development" instead
3190 of "Programming", following the Free Software Directory.
3192 2006-06-16 Andrew Haley <aph@redhat.com>
3194 * class.c (make_class_data): When using flag_indirect_classes,
3195 don't initialize the vtable of Class instances.
3197 2006-06-09 Andrew Haley <aph@redhat.com>
3201 * builtins.c (initialize_builtins): Add __sync_synchronize().
3202 * class.c (add_field): Mark volatile fields.
3203 * java-gimplify.c (java_gimplify_expr): Call new functions to
3204 handle self-modifying exprs and COMPONENT_REFs.
3205 (java_gimplify_component_ref): New.
3206 (java_gimplify_modify_expr): Add handling for volatiles.
3208 2006-06-08 Tom Tromey <tromey@redhat.com>
3210 * gcj.texi (libgcj Runtime Properties): Document
3211 gnu.gcj.user.realname.
3213 2006-06-08 Andrew Haley <aph@redhat.com>
3215 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
3216 get_symbol_table_index().
3217 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
3219 (build_known_method_ref): New arg: special. Pass it to
3220 get_symbol_table_index.
3221 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
3223 (build_invokevirtual): New arg: special. Pass it to
3224 get_symbol_table_index.
3225 (expand_invoke): New variable: special.
3226 Pass it to maybe_rewrite_invocation().
3227 Pass it to build_known_method_ref().
3228 * class.c (build_symbol_entry): Add new arg: special. Use it to
3229 build the symbol table conbstructor.
3230 (emit_symbol_table): Extract SPECIAL from the method list and pass
3231 it to build_symbol_entry().
3232 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
3233 special accordingly.
3235 2006-06-06 David Daney <ddaney@avtrex.com>
3237 * gcj.texi (libgcj Runtime Properties): Document
3238 gnu.gcj.runtime.NameFinder.show_raw and
3239 gnu.gcj.runtime.NameFinder.remove_unknown.
3241 2006-06-06 Tom Tromey <tromey@redhat.com>
3243 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
3244 synthetic, enum, annotation.
3245 * jcf.h (ACC_BRIDGE): New macro.
3246 (ACC_VARARGS): Likewise.
3247 (ACC_SYNTHETIC): Likewise.
3248 (ACC_ENUM): Likewise.
3249 (ACC_ANNOTATION): Likewise.
3251 2006-06-06 Mike Stump <mrs@apple.com>
3253 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
3254 installing during build.
3256 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
3258 * gcj.texi (Extensions): Document the new gcj-dbtool-based
3259 classname-to-library resolution mechanism.
3260 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
3261 mechanism deprecated.
3262 (libgcj Runtime Properties): Document
3263 gnu.gcj.runtime.VMClassLoader.library_control's new default.
3265 2006-05-29 Jakub Jelinek <jakub@redhat.com>
3267 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
3269 (jword): Define to uint64 on 64-bit arches.
3270 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
3272 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
3274 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
3277 2006-05-26 Tom Tromey <tromey@redhat.com>
3279 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
3280 * verify-glue.c (vfy_class_type): New function.
3281 * verify-impl.c (check_constant): Allow 'ldc class'.
3282 * verify.h (vfy_class_type): Declare.
3284 2006-05-25 Andrew Haley <aph@redhat.com>
3287 * decl.c (maybe_pushlevels): When variable ranges are non-nested
3288 update all lifetimes, not just the first one.
3290 2006-05-24 Tom Tromey <tromey@redhat.com>
3292 * java-tree.h: Fixed flag documentation.
3294 2006-05-24 Tom Tromey <tromey@redhat.com>
3297 * jcf.h (ACC_INVISIBLE): Changed value.
3299 2006-05-24 Andrew Haley <aph@redhat.com>
3302 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
3305 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3307 * lang.opt (femit-class-file): Remove VarExists.
3309 2006-05-16 Tom Tromey <tromey@redhat.com>
3311 * verify-impl.c (verify_instructions_0) <op_return>: Special case
3314 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3317 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
3320 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
3322 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
3323 (java/expr.o): Replace target.h with $(TARGET_H).
3324 (java/parse.o): Likewise.
3326 2006-05-10 Andrew Haley <aph@redhat.com>
3328 * class.c (emit_indirect_register_classes): Fix comment.
3330 2006-05-04 Tom Tromey <tromey@redhat.com>
3332 * java-tree.h (uses_jv_markobj_p): Declare.
3333 * class.c (uses_jv_markobj_p): Removed.
3334 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
3335 (get_boehm_type_descriptor): Use it.
3336 (uses_jv_markobj_p): Moved from class.c. Return bool.
3338 2006-05-04 Tom Tromey <tromey@redhat.com>
3340 * java-tree.def (THIS_EXPR): Now a tcc_expression.
3342 2006-05-04 Andrew Haley <aph@redhat.com>
3344 * class.c (make_field_value): Always build_address_of fdecl if
3345 there is an initializer.
3347 2006-05-03 Andrew Haley <aph@redhat.com>
3350 * expr.c (maybe_rewrite_invocation): New function.
3351 (rewrite_arglist_getclass): Likewise.
3353 (expand_invoke): Call maybe_rewrite_invocation.
3354 * parse.y (patch_invoke): Likewise.
3355 * java-tree.h: (maybe_rewrite_invocation): New function.
3357 2006-04-21 Andrew Haley <aph@redhat.com>
3359 * lang.c (java_init): Handle flag_indirect_classes.
3360 * jvgenmain.c: Use "class$$" instead of "class$".
3361 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
3363 (mangle_class_field): Special case "class$$" as well as "class$".
3364 * constants.c (build_ref_from_constant_pool): If
3365 flag_indirect_classes, generate a ref into the heap.
3366 * decl.c (constants_field_decl_node,
3367 constants_data_field_decl_node): New.
3368 * class.c (build_static_class_ref): New.
3369 (build_classdollar_field): Factor out from build_class_ref().
3370 (make_field_value): Handle static fields in heap.
3371 (make_class_data): Make sure we get a static ref to class.
3372 Make class initializer const if flag_indirect_classes.
3373 (register_class): Build a class_ref for initialization if
3374 flag_indirect_classes.
3375 (emit_indirect_register_classes): New.
3377 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
3379 * expr.c, gjavah.c: Fix comment typos.
3381 2006-04-03 Andrew Haley <aph@redhat.com>
3384 * expr.c (build_field_ref): Don't check the field offset if
3387 2006-03-30 Andrew Haley <aph@redhat.com>
3390 * lang.c (java_attribute_table): New.
3391 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
3392 * expr.c (build_field_ref): Add a null pointer check for all
3393 fields of offset > 4k. Don't do so for accesses via the this
3394 pointer, which we know can never be null.
3395 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
3398 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
3400 * Make-lang.in: Rename docdir to gcc_docdir.
3402 2006-03-30 Tom Tromey <tromey@redhat.com>
3405 * parse.y (java_reorder_fields): Reset superclass field's size as
3408 2006-03-28 Tom Tromey <tromey@redhat.com>
3411 * parse.y (find_most_specific_methods_list): Added 'class'
3413 (lookup_method_invoke): Updated.
3415 2006-03-15 Tom Tromey <tromey@redhat.com>
3417 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
3418 non-static method calls.
3420 2006-03-15 David Daney <ddaney@avtrex.com>
3422 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
3425 2006-03-15 David Daney <ddaney@avtrex.com>
3427 * lang.opt (-freduced-reflection): New option.
3428 * lang.c (java_post_options): Generate an error if
3429 -freduced-reflection used with -fjni or -findirect-dispatch.
3430 * java-tree.h (flag_reduced_reflection): Declare new variable.
3431 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
3432 if bitmap overflows and flag_reduced_reflection set.
3433 * class.c (uses_jv_markobj_p): New function.
3434 (make_class_data): Moved generation of vtable to before
3435 reflection data, generate less reflection data if
3436 flag_reduced_reflection set.
3437 * gcj.texi: Document -freduced-reflection.
3439 2006-03-15 Tom Tromey <tromey@redhat.com>
3442 * class.c (get_interface_method_index): Don't put <clinit> into
3445 2006-03-15 Tom Tromey <tromey@redhat.com>
3447 * parse.y (analyze_clinit_body): Ignore empty statements.
3449 2006-03-08 David Daney <ddaney@avtrex.com>
3451 * gcj.texi: Document -static-libgcj option.
3453 2006-02-20 Andrew Haley <aph@redhat.com>
3455 * jcf-parse.c (parse_class_file): Set input_location from
3458 2006-02-15 Andrew Haley <aph@redhat.com>
3460 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
3461 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
3462 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
3464 2006-02-09 Andrew Haley <aph@redhat.com>
3467 * expr.c (expand_invoke): Allow methods in arrays to be resolved
3468 in their superclass.
3470 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
3473 2006-02-08 Tom Tromey <tromey@redhat.com>
3476 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
3477 * builtins.c (convert_real): New function.
3478 (java_builtins): Handle Float.intBitsToFloat,
3479 Float.floatToRawIntBits, Double.longBitsToDouble,
3480 Double.doubleToRawLongBits.
3482 2006-02-07 Andrew Haley <aph@redhat.com>
3484 * expr.c (expand_invoke): (BC mode.) If we find a method in a
3485 class other than the one in which we expected to find it, ignore
3489 * constants.c (build_constants_constructor): move initializer into
3490 first halfword on a 64-bit big-endian machine.
3492 2006-02-04 Tom Tromey <tromey@redhat.com>
3495 * builtins.c (max_builtin): Skip floating point 'max'.
3496 (min_builtin): Skip floating point 'min'.
3497 (check_for_builtin): Never return NULL_TREE.
3499 2006-02-04 Tom Tromey <tromey@redhat.com>
3502 * expr.c (push_type): Avoid side effect in gcc_assert.
3504 2006-02-04 Roger Sayle <roger@eyesopen.com>
3506 * decl.c (java_init_decl_processing): Create char_type_node as a
3507 regular INTEGER_TYPE node.
3508 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
3509 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
3510 test for char_type_node and promoted_char_type_node as special
3511 instances of INTEGER_TYPE tree codes.
3512 (promote_type,build_java_signature): Likewise.
3513 * jcf-write.c (adjust_typed_op): Likewise.
3514 * mangle.c (mangle_type): Likewise.
3515 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
3516 * parse.h (JINTEGRAL_TYPE_P): Likewise.
3518 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
3520 * expr.c (java_stack_swap): Revert gcc_assert patch.
3522 2006-02-03 Ben Elliston <bje@au.ibm.com>
3524 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
3525 * typeck.c: Likewise.
3526 * verify-impl.c: Likewise.
3527 * class.c: Likewise.
3529 * jcf-parse.c: Likewise.
3530 * constants.c: Likewise.
3531 * check-init.c: Likewise.
3532 * jcf-write.c: Likewise.
3533 * verify-glue.c: Likewise.
3534 * mangle.c: Likewise.
3537 * boehm.c: Likewise.
3539 2006-02-01 Jan Hubicka <jh@suse.cz>
3541 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
3542 * lang.c (java_init_options): Set no_unit_at_a_time_default.
3544 2006-01-30 Andrew Haley <aph@redhat.com>
3547 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
3549 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
3551 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
3552 Update copyright notice dates.
3554 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3556 * jvspec.c (lang_specific_spec_functions): Remove.
3558 2006-01-06 Tom Tromey <tromey@redhat.com>
3560 * gcj.texi (Arrays): Added more documentation for
3562 (Primitive types): Correct information about primitive classes.
3563 (Reference types): New node.
3566 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
3568 * jcf-parse.c (set_source_filename): Set the decl source location
3569 even when returning early.
3571 2005-12-15 Tom Tromey <tromey@redhat.com>
3572 Andrew Haley <aph@redhat.com>
3575 * parse.y (resolve_expression_name): Don't generate accessor
3576 methods for constant fields.
3578 2005-12-13 Andrew Haley <aph@redhat.com>
3582 * class.c (maybe_layout_super_class): Update current_class before
3583 calling do_resolve_class.
3585 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
3588 * jcf-write.c (write_classfile): Use PID in temporary class
3589 file. Save/restore errno when reporting error.
3591 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
3594 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
3595 to bare_function_type and including the return type
3596 * builtins.c (initialize_builtins) : Change builtin mangled name
3597 constants to conform to new mangling scheme
3599 2005-12-08 Andrew Haley <aph@redhat.com>
3602 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
3603 (soft_abstractmethod_node): New.
3604 * expr.c (build_field_ref): Add in-line check for missing field.
3605 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
3607 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3609 * Make-lang.in (java.all.build, java.install-normal): Remove.
3611 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3613 * Make-lang.in: Remove all dependencies on s-gtype, except for
3616 2005-12-07 Richard Sandiford <richard@codesourcery.com>
3618 * class.c (build_utf8_ref, emit_register_classes): Use
3619 switch_to_section and get_section.
3621 2005-12-06 Tom Tromey <tromey@redhat.com>
3624 * parse.y (patch_new_array_init): Revert previous patch.
3625 (lookup_method_invoke): Use size-less array type when creating an
3626 anonymous constructor.
3628 2005-12-05 Tom Tromey <tromey@redhat.com>
3630 * parse.y (patch_new_array_init): Don't set length on array.
3632 2005-12-02 Richard Guenther <rguenther@suse.de>
3634 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3635 buildN instead of build.
3636 * class.c (finish_class): Likewise.
3637 * expr.c (java_create_object): Likewise.
3639 2005-11-28 Tom Tromey <tromey@redhat.com>
3642 * expr.c (build_jni_stub): Unwrap the return value.
3643 * java-tree.h (soft_unwrapjni_node): New define.
3644 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3645 * decl.c (java_init_decl_processing): Initialize
3646 soft_unwrapjni_node.
3648 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
3650 * gcj.texi (gij options): Add -Xss documentation.
3652 2005-11-08 Wil Mahan <wmahan@gmail.com>
3655 * zextract.c (read_zip_archive): Fix out of memory error when
3656 reading jar files with zip-style comments.
3658 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
3660 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3662 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3664 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
3665 Wil Mahan <wmahan@gmail.com>
3668 * class.c (make_class): Create empty binfo here.
3669 (set_super_info): Only create binfo if we have superclasses.
3671 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
3674 * parse.y (method_header): Make the result of the rule a NULL_TREE
3675 when a parsing error occurs.
3677 2005-09-29 Tom Tromey <tromey@redhat.com>
3680 * jcf-io.c (memoized_dirlist_hash): New function.
3681 (caching_stat): Use it.
3683 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
3686 * class.c (inherits_from_p): Try to lay out super class
3687 if it is not already laid out.
3688 (maybe_layout_super_class): Handle the case where SUPER_CLASS
3691 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
3693 * builtins.c (max_builtin, min_builtin, abs_builtin,
3694 java_build_function_call_expr): Use fold_buildN.
3695 * class.c (layout_class_method): Likewise.
3696 * expr.c (java_truthvalue_conversion, build_java_jsr,
3697 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3698 build_java_binop, build_field_ref, expand_compare,
3699 build_known_method_ref, build_invokevirtual,
3700 process_jvm_instruction): Likewise.
3701 * parse.y (patch_binop, patch_exit_expr): Likewise.
3702 * typeck.c (convert_ieee_real_to_integer): Likewise.
3703 (convert): Don't call fold after convert_ieee_real_to_integer.
3705 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
3708 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3709 the newly created type. Set import lists here, not in create_class.
3710 (jdep_resolve_class): Set current_class.
3711 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
3712 the current package context, not ctxp->package.
3713 (cicp_cache): Removed.
3714 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3715 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3716 * java-tree.h (TYPE_PACKAGE): New macro.
3717 (struct lang_type): New member 'package'.
3719 2005-09-09 Andrew Haley <aph@redhat.com>
3722 * expr.c (pop_type_0): If the expected type is object or ptr
3723 (i.e. void*), return the type of the object we just popped from
3726 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
3728 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3729 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3731 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
3733 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3734 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3735 typos. Follow spelling conventions.
3737 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
3740 * typeck.c (lookup_do): Look up interfaces for the original class,
3742 * parse.y (java_check_regular_methods): Fix diagnostic message for
3743 more restrictive overriding of a method from an interface.
3745 2005-08-16 Tom Tromey <tromey@redhat.com>
3747 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3748 class' initial state.
3750 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3753 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3754 `literal_token' for large numeric input tokens.
3756 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3759 * parse.y (nested_field_access_p): Rename to nested_member_access_p
3760 and expand to handle method accesses across nested classes.
3761 (build_outer_method_access_method): Rename to
3762 build_nested_method_access_method. Minor adjustments to comments.
3763 (resolve_expression_name): Use the newly-renamed
3764 nested_member_access_p method.
3765 (resolve_qualified_expression_name): Likewise.
3766 (patch_method_invocation): Also consider static methods for access
3767 method generation. Minor adjustments to comments.
3768 (maybe_use_access_method): Use the more general
3769 nested_memeber_access_p to determine access across nested class
3770 boundaries. Allow THIS_ARG to be NULL (for static methods).
3772 2005-08-15 Tom Tromey <tromey@redhat.com>
3775 * expr.c (build_field_ref): Don't generate otable reference when
3776 DECL_FIELD_OFFSET is 0.
3777 * class.c (maybe_layout_super_class): Pass outer class to
3780 2005-08-15 Tom Tromey <tromey@redhat.com>
3782 * java-tree.h (LABEL_IN_SUBR): Removed.
3783 (LABEL_IN_SUBR): Likewise.
3784 (LABEL_IS_SUBR_START): Likewise.
3785 (LABEL_SUBR_START): Likewise.
3786 (LABEL_SUBR_CONTEXT): Likewise.
3787 (LABEL_CHANGED): Likewise.
3788 (LABEL_RETURN_LABEL): Likewise.
3789 (LABEL_RETURN_TYPE_STATE): Likewise.
3790 (LABEL_RETURN_LABELS): Likewise.
3791 (RETURN_MAP_ADJUSTED): Likewise.
3792 (LABEL_PENDING_CHAIN): Likewise.
3794 2005-08-15 Tom Tromey <tromey@redhat.com>
3796 * Make-lang.in (JAVA_OBJS): Removed verify.o
3797 (java/verify.o): Removed.
3798 * verify.c: Removed.
3799 * lang.c (flag_new_verifier): Removed.
3800 (java_post_options): Updated.
3801 * java-tree.h (flag_new_verifier): Removed.
3802 (verify_jvm_instructions): Removed.
3803 * expr.c (pop_type_0): Assume flag_new_verifier is true.
3804 (build_java_check_indexed_type): Likewise.
3805 (expand_java_arraystore): Likewise.
3806 (expand_java_arrayload): Likewise.
3807 (pop_arguments): Likewise.
3808 (expand_byte_code): Likewise.
3809 (process_jvm_instruction): Likewise.
3811 2005-08-10 Andrew Haley <aph@redhat.com>
3813 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3814 type mismatches to make legal GIMPLE.
3816 2005-08-10 Robin Green <greenrd@greenrd.org>
3819 * parse.y (maybe_use_access_method): Generalize check from
3820 java.lang.Object to any superclass of current_class
3822 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
3824 * class.c (build_class_ref): Wrap the primary class type in a
3826 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3827 primary class type from the NOP_EXPR in which it was placed.
3829 2005-07-28 Diego Novillo <dnovillo@redhat.com>
3831 * expr.c (expand_load_internal): Fix missing parens in
3834 2005-07-28 Andrew Haley <aph@redhat.com>
3836 * expr.c (expand_load_internal): Convert to destination type.
3838 2005-07-22 Manfred Hollstein <mh@suse.com>
3840 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3841 (check_constant): Likewise.
3842 (check_wide_constant): Likewise.
3844 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
3846 Make CONSTRUCTOR use VEC to store initializers.
3847 * check-init.c (check_init): Update to cope with VEC in
3849 * class.c (make_field_value, make_method_value, get_dispatch_table,
3850 make_class_data, emit_symbol_table, emit_catch_table,
3851 emit_assertion_table): Use build_constructor_from_list instead of
3853 * constants.c (build_constants_constructor): Likewise.
3854 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3855 VEC in CONSTRUCTOR_ELTS.
3856 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3857 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3859 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3861 * parse.y (build_new_array_init): Use build_constructor_from_list
3862 instead of build_constructor.
3863 (patch_new_array_init): Update to cope with VEC in
3865 (array_constructor_check_entry): Likewise.
3867 2005-07-12 Tom Tromey <tromey@redhat.com>
3869 * jvspec.c (lang_specific_driver): Put filelist_filename first on
3872 2005-07-12 Tom Tromey <tromey@redhat.com>
3875 * parse-scan.y (interface_member_declaration): Added
3878 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
3880 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3881 (LABEL_PENDING_CHAIN): Ditto.
3883 (DECL_BIT_INDEX): Ditto.
3885 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3888 * parse.y (inner_class_accessible): New function. Logic moved from
3889 check_inner_class_access.
3890 (check_inner_class_access): Use inner_class_accessible.
3891 (resolve_inner_class): Simplify arguments. Create circularity hash
3892 here. Keep looking for classes if we found one that was inaccessible.
3893 Return the inaccessible class only if there is no other match.
3894 (do_resolve_class): Update for new resolve_inner_class arguments.
3895 Don't create circularity_hash here.
3897 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3900 * parse.y (add_exception_to_throws): New function.
3901 (purge_unchecked_exceptions): Removed.
3902 (get_constructor_super): Renamed from verify_constructor_super. Now
3903 returns the super constructor after verification.
3904 (java_complete_expand_method): Don't use purge_unchecked_exceptions
3905 or save/restore the exception list.
3906 (check_thrown_exceptions): Add uncaught exceptions in anonymous
3907 class initializers and constructors to the throws clause of the method.
3909 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
3912 * parse.y (interface_member_declaration): Allow empty statements in
3913 interface declarations.
3915 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
3917 * Makefile.in (parse.o): Adjust dependencies.
3918 * parse.y: Include tree-dump.h.
3920 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
3922 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
3925 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
3927 * parse.y (issue_warning_error_from_context): Call
3928 pp_output_formatted_text to be able to get the buffer.
3930 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
3932 * parse.y (issue_warning_error_from_context): Update for the
3933 renaming of pp_format_text to pp_format.
3935 2005-06-28 Paul Brook <paul@codesourcery.com>
3937 * decl.c (java_init_decl_processing): Call
3938 default_init_unwind_resume_libfunc.
3940 2005-06-27 Tom Tromey <tromey@redhat.com>
3942 PR java/21540, PR java/13788:
3943 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3944 fold_constant_for_init.
3945 (patch_binop): Added 'folding' argument. Updated all callers.
3946 (patch_unaryop) <NOP_EXPR>: New case.
3947 (fold_constant_for_init) <NOP_EXPR>: Likewise.
3948 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3950 2005-06-25 Jan Hubicka <jh@suse.cz>
3952 * builtins.c (define_builtin): Accept new flags parameter.
3953 (initialize_builtins): Mark the builtins const and nothrow accordingly.
3955 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
3957 * all files: Update FSF address in copyright headers.
3959 2005-06-24 Tom Tromey <tromey@redhat.com>
3961 * verify-impl.c (verify_instructions_0): Correctly handle
3962 situation where PC falls off end.
3964 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
3967 * parse.y (find_most_specific_methods_list): Remove special case for
3970 2005-06-15 Tom Tromey <tromey@redhat.com>
3973 * class.c (make_method_value): Use soft_abstractmethod_node for
3975 * java-tree.h (soft_abstractmethod_node): New define.
3976 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3977 * decl.c (java_init_decl_processing): Initialize
3978 soft_abstractmethod_node.
3980 2005-06-13 Geoffrey Keating <geoffk@apple.com>
3982 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3984 2005-06-13 Per Bothner <per@bothner.com>
3986 * expr.c (int highest_label_pc_this_method,
3987 start_label_pc_this_method): New globals.
3988 (lookup_label): Add start_label_pc_this_method to pc for label, and
3989 update highest_label_pc_this_method. This prevents conflicts between
3990 labels from different methods.
3991 * java-tree.h: Declare new globals.
3992 * jcf-parse.c (parse_class_file): If needed bump
3993 start_label_pc_this_method and reset highest_label_pc_this_method.
3995 2005-06-13 Tom Tromey <tromey@redhat.com>
3998 * parse.y (nested_field_access_p): Handle case where outer field
3999 is inherited by enclosing class.
4001 2005-06-12 Per Bothner <per@bothner.com>
4003 * class.c (inherits_from_p): Do load_class if needed.
4005 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4007 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
4008 * java-tree.h (parse_error_context): Move...
4009 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
4010 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
4011 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
4013 2005-06-08 Roger Sayle <roger@eyesopen.com>
4015 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
4017 2005-06-06 Jakub Jelinek <jakub@redhat.com>
4019 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
4020 msgid for argument name.
4021 * gjavah.c (error): Likewise.
4022 * java-tree.h (parse_error_context): Likewise.
4023 * parse.y (parse_error_context, parse_warning_context,
4024 issue_warning_error_from_context): Likewise.
4026 2005-06-01 Tom Tromey <tromey@redhat.com>
4029 * class.c (build_static_field_ref): Don't fold constant fields if
4030 current class is from a .class file and we're using indirect
4033 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4035 * java/verify-glue.c: Don't include errors.h and include toplev.h.
4036 * java/Make-lang.in: Updates dependencies.
4038 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
4041 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
4042 NESTED_FIELD_ACCESS_IDENTIFIER_P.
4043 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
4044 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
4045 * jcf-write.c (generate_classfile): Use
4046 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
4047 OUTER_FIELD_ACCESS_IDENTIFIER_P.
4048 * parse.y (build_outer_field_access): Rename to
4049 build_nested_field_access. Support static fields and outer-to-inner
4051 (outer_field_access_p): Rename to nested_field_access_p. Support
4052 static fields and generalise to outer-to-inner class and sibling
4053 inner class accesses.
4054 (outer_field_expanded_access_p): Rename to
4055 nested_field_expanded_access_p and support static fields.
4056 (outer_field_access_fix): Rename to nested_field_access_fix and
4057 support static fields.
4058 (build_outer_field_access_expr): Rename to
4059 build_nested_field_access_expr and support static fields.
4060 (build_outer_field_access_methods): Rename to
4061 build_nested_field_access_methods and support static fields. For
4062 static fields, generate accessors without class instance parameters.
4063 (build_outer_field_access_method): Rename to
4064 build_nested_field_access_method and support static fields.
4065 (build_outer_method_access_method): Use
4066 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
4067 OUTER_FIELD_ACCESS_IDENTIFIER_P.
4068 (resolve_expression_name): Consider static field accesses across
4070 (resolve_qualified_expression_name): Likewise.
4071 (java_complete_lhs): Use nested_field_access_fix instead of
4072 outer_field_access_fix.
4073 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
4074 Use nested_field_expanded_access_p instead of
4075 outer_field_expanded_access_p. Use nested_field_access_fix instead
4076 of outer_field_access_fix.
4077 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
4078 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
4080 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
4082 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
4083 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
4084 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
4085 MINOR_BINARYCOMPAT_ABI_VERSION): New.
4086 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
4087 (parse_version): Calculate version ID using new method. Use bit-flags
4088 for flag_indirect_dispatch and flag_bootstrap_classes.
4090 2005-05-25 Richard Henderson <rth@redhat.com>
4093 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
4094 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
4095 DECL_CONTEXT; avoid pushdecl_top_level.
4096 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
4097 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
4098 (layout_class_method): Likewise.
4099 * decl.c (java_mark_cni_decl_local): New.
4100 (java_mark_class_local): Use it.
4101 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
4102 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
4103 (struct lang_decl_func): Add local_cni;
4104 (struct lang_decl_var): Add class_field, vtable.
4105 (java_mangle_decl): Declare.
4106 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
4107 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
4108 (mangle_obstack_1): New.
4109 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
4110 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
4111 lhd_set_decl_assembler_name for things that don't need mangling.
4112 (mangle_class_field): Rename from java_mangle_class_field, make
4113 static, don't call init_mangling or finish_mangling.
4114 (mangle_vtable): Similarly.
4115 (mangle_local_cni_method_decl): New.
4116 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
4117 gcc_assert, and MANGLE_RAW_STRING.
4118 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
4120 2005-05-25 DJ Delorie <dj@redhat.com>
4122 * class.c (set_constant_value): Move warning control from if() to
4125 2005-05-24 Richard Henderson <rth@redhat.com>
4127 * builtins.c (define_builtin): Don't call make_decl_rtl.
4128 * constants.c (build_constant_data_ref): Likewise.
4129 * class.c (build_utf8_ref): Likewise.
4130 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
4131 (get_dispatch_table, layout_class_method): Likewise.
4132 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
4134 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
4135 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
4136 to determine if we need a non-zero address.
4137 * decl.c (builtin_function): Don't call make_decl_rtl.
4138 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
4139 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
4140 * resource.c (compile_resource_data): Likewise.
4141 * parse.y (resolve_field_access): Re-word comment to avoid
4144 2005-05-24 Richard Henderson <rth@redhat.com>
4146 * class.c (registered_class): Take it out of class_roots; turn into
4148 (register_class): Make static. Don't duplicate decl node. Use
4150 (emit_register_classes): Use VEC_iterate. Use output_constant
4151 instead of assemble_integer. Don't call mark_decl_referenced
4153 * java-tree.h (register_class): Remove decl.
4155 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
4159 * parse.y (register_package, package_list): Remove.
4160 (package_declaration): Do not call register_package.
4161 (do_resolve_class): Do not use package_list.
4163 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
4165 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
4168 2005-05-15 Tom Tromey <tromey@redhat.com>
4171 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
4174 2005-05-12 Aaron Luchko <aluchko@redhat.com>
4176 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
4178 2005-05-11 Tom Tromey <tromey@redhat.com>
4180 * gcj.texi (Code Generation): Document -fbootstrap-classes.
4181 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
4182 (parse_version): Use it.
4183 * lang.opt (-fbootstrap-classes): New option.
4185 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
4188 * class.c (maybe_layout_super_class): Look for imports in this_class.
4189 * parse.h (ctxp_for_generation_last): New.
4190 (do_resolve_class): Add a parameter.
4191 * parse.y (ctxp_for_generation_last): New.
4192 (java_pop_parser_context): Add at end of list.
4193 (find_in_imports, find_in_imports_on_demand): Look in ctxp
4194 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
4195 the given type are NULL.
4196 (do_resolve_class): Look into the imports of the new second parameter.
4197 Adjust recursive calls.
4198 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
4199 calls to do_resolve_class.
4200 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
4201 (java_complete_class): Do not do that here.
4203 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
4206 * Make-lang.in (java): Add gjnih.
4207 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
4208 (GJNIH_OBJS): New variable.
4209 (gjnih$(exeext)): New target.
4210 (JAVA_MANFILES): Add gjnih.1.
4211 (java.uninstall): Add gjnih.1.
4212 (java.mostlyclean): Add gjnih.
4213 (java.maintainer-clean): Add gjnih.1.
4214 (java/gjavah-jni.o): New target.
4215 (.INTERMEDIATE): Add gjnih.pod.
4216 (gjnih.pod): New target.
4217 * config-lang.in (stagestuff): Add gjnih.
4218 * gcj.texi (Top): Add gjnih node.
4219 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
4220 -bootclasspath options.
4221 (Invoking gjnih): New node.
4222 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
4223 (TOOLNAME): New macro.
4224 (error): Replace hard-coded gcjh with TOOLNAME.
4225 (process_file): Likewise.
4227 (version): Likewise.
4228 (help): Likewise. Add help output for -force, -old, -trace and -J
4230 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
4231 (options): Add force, old, trace and J fields.
4232 (main): Handle -force, -old, -trace and -J options.
4234 2005-05-03 Tom Tromey <tromey@redhat.com>
4237 * gjavah.c (main): Unlink output file on error.
4239 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
4241 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
4244 2005-04-29 Tom Tromey <tromey@redhat.com>
4246 * expr.c (build_jni_stub): Updated for change to build_block.
4248 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
4250 * expr.c (force_evaluation_order): Declare 'saved' earlier.
4252 2005-04-28 Andrew Haley <aph@redhat.com>
4255 * java-tree.h (soft_resolvepoolentry_node): New.
4256 (alloc_constant_fieldref): Declare.
4257 * expr.c (expand_java_field_op): Don't call class_init for
4258 accesses to static fields with indirect dispatch.
4259 * builtins.c (initialize_builtins): Add "__builtin_expect".
4260 * decl.c (soft_resolvepoolentry_node): New variable.
4261 (java_init_decl_processing): Create a decl for
4262 "_Jv_ResolvePoolEntry".
4263 * class.c (build_fieldref_cache_entry): New function.
4264 (build_static_field_ref): Rewrite for indirect dispatch.
4265 * constants.c (find_name_and_type_constant_tree): New function.
4266 (alloc_constant_fieldref): Likewise.
4267 (build_constants_constructor): Handle CONSTANT_Fieldref and
4268 CONSTANT_NameAndType.
4271 * expr.c (force_evaluation_order): Convert outgoing args smaller
4274 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
4276 * gcj.texi (libgcj Runtime Properties): Remove obsolete
4277 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
4278 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
4280 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4282 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
4283 to `unlock_stream' with `unlock_std_streams'.
4285 2005-04-25 Jakub Jelinek <jakub@redhat.com>
4287 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
4288 instead of just expr.h.
4290 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4292 * gjavah.c (main): Unlock the stdio streams.
4293 * jcf-dump.c (main): Likewise.
4294 * jv-scan.c (main): Likewise.
4295 * jvgenmain.c (main): Likewise.
4297 2005-04-23 DJ Delorie <dj@redhat.com>
4299 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
4300 parse.y: Adjust warning() callers.
4302 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
4304 * gcj.texi (Object fields): Change "Integer" to "Int" in example
4307 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
4309 * gcj.texi: Fix typos and bogus example.
4311 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
4313 * except.c: Fix a comment typo.
4315 2005-04-19 Julian Brown <julian@codesourcery.com>
4317 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
4318 indirect dispatch with PIC.
4320 2005-04-18 Andrew Haley <aph@redhat.com>
4322 * java-except.h (struct eh_range.handler): Remove unused field.
4323 (handle_nested_ranges): Remove function declaration.
4324 (sanity_check_exception_range): Add function declaration.
4325 * verify.c (verify_jvm_instructions): Remove call to
4326 handle_nested_ranges.
4327 * verify-glue.c (verify_jvm_instructions_new): Call
4328 sanity_check_exception_range.
4329 * except.c (link_handler, eh_range_freelist, link_handler,
4330 handle_nested_ranges): Remove.
4331 (add_handler): Rewrite.
4332 (sanity_check_exception_range): New function.
4333 (print_ranges): New function.
4335 2005-04-13 Julian Brown <julian@codesourcery.com>
4337 * decl.c (finish_method): Give methods once-only linkage.
4339 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
4341 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
4343 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4345 * java-tree.h: Don't use PARAMS().
4347 2005-04-07 Per Bothner <per@bothner.com>
4349 * class.c (push_class): By default, suppress debug output.
4350 (finish_class): Enable debug output for classes we're emitting.
4352 2005-04-07 Andrew Haley <aph@redhat.com>
4354 * gcj.texi: Correct gcj-dbtool instructions.
4356 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
4358 * gcj.texi: Fix a typo.
4359 * lang.c: Fix a comment typo.
4361 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
4363 * gcj.texi (Invoking gij): Add descriptions of new -X options.
4364 Mention recognized-and-ignored compatibility options.
4365 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
4367 (About CNI): Add Memory allocation section.
4369 2005-04-01 Tom Tromey <tromey@redhat.com>
4371 * decl.c (java_init_decl_processing): Fix types of
4372 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
4373 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
4374 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
4376 2005-03-31 Jan Hubicka <jh@suse.cz>
4378 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
4379 * class.c: Include cgraph.h
4380 (make_local_functoin_alias): Mark aslias as needed.
4381 * resource.c: Include cgraph.h
4382 (compile_resource_data): Go via cgraph interface.
4384 2005-03-30 Ian Lance Taylor <ian@airs.com>
4386 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
4388 2005-03-30 Tom Tromey <tromey@redhat.com>
4390 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
4391 inner_class_info_index==0 or outer_class_info_index==0.
4393 2005-03-29 Tom Tromey <tromey@redhat.com>
4395 * gcj.texi (libgcj Runtime Properties): Document
4396 gnu.gcj.runtime.endorsed.dirs.
4398 2005-03-24 Anthony Green <green@redhat.com>
4400 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
4403 2005-03-23 Tom Tromey <tromey@redhat.com>
4405 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
4406 (parse_version): Use it.
4408 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
4410 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
4412 2005-03-18 Andrew Haley <aph@redhat.com>
4415 * decl.c (update_aliases): Don't update variables that are about
4417 (maybe_poplevels): Add comment.
4419 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
4422 * jcf-parse.c (duplicate_class_warning): New function.
4423 (java_parse_file): Call duplicate_class_warning if
4424 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
4425 (parse_zip_file_entries): Likewise. Also set
4426 CLASS_FROM_CURRENTLY_COMPILED_P.
4428 2005-03-16 Andrew Haley <aph@redhat.com>
4430 * expr.c (expand_java_arrayload): Don't generate a
4431 NullPointerException based on the type of the node.
4432 (build_java_array_length_access): Likewise.
4434 2005-03-15 Zack Weinberg <zack@codesourcery.com>
4436 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
4438 2005-03-11 Tom Tromey <tromey@redhat.com>
4440 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
4441 (libgcj Runtime Properties): Document the default .db.
4443 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
4446 * parse.y (checks_throws_clauses): Check exceptions list even when
4447 the base class does not come from a source file being compiled.
4448 (java_complete_lhs): Remove unused variable 'wfl'.
4450 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
4453 * decl.c (finish_method): Emit _Jv_InitClass for private static
4454 methods inside inner classes as well.
4456 2005-03-08 Julian Brown <julian@codesourcery.com>
4457 * Revert patch from 2005-03-08 for causing bootstrap failure on
4460 2005-03-08 Julian Brown <julian@codesourcery.com>
4462 * decl.c (finish_method): Give methods once-only linkage.
4464 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4466 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
4468 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
4470 * verify-glue.c (vfy_is_assignable_from): Perform static check using
4471 can_widen_reference_to if the C++ ABI is in use.
4472 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
4473 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
4474 type_isresolved, init_state, set_pc, state_get_pc,
4475 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
4476 (verify_fail): Report the current PC from the verifier context.
4477 (free_state): Remove #if 0 block to enable this function.
4478 (free_verifier_context): Call free_state on state_list iterator
4479 values before freeing them.
4480 * expr.c (pop_type_0): Pop correct type for error message when stack
4481 contains a multi-word type.
4483 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4485 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
4486 for known NULL array length access.
4488 2005-03-07 Tom Tromey <tromey@redhat.com>
4490 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
4492 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
4494 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
4495 typeck.c: Update copyright.
4497 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
4500 * xref.c, xref.h: Remove file.
4501 * Make-lang.in (java/xref.o): Remove.
4502 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
4503 * lang.c (flag_emit_xref): Remove definition.
4504 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
4505 * typeck.c (convert): Remove use of do_not_fold.
4506 * parse.y (do_not_fold): Remove definition.
4507 (parser grammar): Remove xref code.
4508 (maybe_create_class_interface_decl, create_class): Likewise.
4509 (register_fields, method_header, finish_method_declaration): Likewise.
4510 (declare_local_variables, source_end_java_method): Likewise.
4511 (java_complete_expand_classes): Do not set do_not_fold.
4512 (java_complete_expand_method): Remove xref code.
4513 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
4514 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
4515 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
4516 (patch_synchronized_statement, patch_throw_statement): Likewise.
4517 (maybe_build_class_init_for_field): Likewise.
4519 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
4521 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
4522 instead of IS_NON_TYPE_CODE_CLASS.
4524 2005-03-04 Andrew Haley <aph@redhat.com>
4527 * class.c (set_method_index): Don't set method_index if it is
4529 (layout_class_method): Don't complain about "non-static method foo
4530 overrides static method" in the case of indirect dispatch.
4532 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4534 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
4536 * Make-lang.in: Don't elide warnings in jcf-io.c.
4538 2005-03-01 Per Bothner <per@bothner.com>
4541 * check-init.c (wfl): Remove static.
4542 (final_assign_error, check_init): Replace calls to parse_error_context
4544 (check_init): Save, set, and restore input_location for each exp.
4546 2005-03-01 Per Bothner <per@bothner.com>
4548 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
4549 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
4550 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
4552 2005-03-01 Per Bothner <per@bothner.com>
4554 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
4556 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
4559 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
4562 2005-02-22 Tom Tromey <tromey@redhat.com>
4565 * verify-impl.c (EITHER): New define.
4566 (types_compatible): Handle it.
4567 (check_field_constant): Use it.
4569 2005-02-18 Tom Tromey <tromey@redhat.com>
4572 * verify-impl.c (types_equal): Fixed test.
4575 * verify-glue.c (vfy_class_has_field): New function.
4576 * verify.h (vfy_class_has_field): Declare.
4577 * verify-impl.c (check_field_constant): Added 'putfield'
4579 (verify_instructions_0): Updated.
4580 (types_equal): New function.
4582 2005-02-14 Tom Tromey <tromey@redhat.com>
4585 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
4586 stack effect of multianewarray.
4588 2005-02-14 Andrew Haley <aph@redhat.com>
4591 * expr.c (expand_byte_code): Call promote_arguments().
4592 (promote_arguments): New function.
4593 * decl.c (check_local_unnamed_variable): Remove special case for
4595 (find_local_variable): Promote all boolean types to int
4596 when searching for local variable decls.
4598 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
4600 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
4601 parse-scan.y: Update copyright.
4603 2005-02-11 Per Bothner <per@bothner.com>
4606 * parse-scan.y (input_location): Remove variable.
4607 (main_input_filename): New - replaces input_filename, which isn't
4608 settable if USE_MAPPED_LOCATION.
4609 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
4610 so we don't reference input_location or wfl_operator in that case.
4611 * jv-scan.c (expand_location): Remove - no longer used.
4612 (main): Set main_input_filename rather than input_filename.
4614 2005-02-09 Richard Henderson <rth@redhat.com>
4616 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
4617 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
4619 2005-02-08 Marcin Dalecki <martin@dalecki.de>
4621 * expr.c (add_type_assertion): Use the proper enumeration type,
4622 since this is what htab_find_slot() is expecting.
4624 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
4626 * gcj.texi: Update copyright dates.
4628 2005-02-02 Tom Tromey <tromey@redhat.com>
4630 * gcj.texi (libgcj Runtime Properties): Default library_control
4633 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
4636 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4637 (modifiers) when square brackets are present in a declaration for
4639 * jv-scan.c (main): Set input_filename and input_line.
4641 2005-02-01 Tom Tromey <tromey@redhat.com>
4644 * gjavah.c (get_field_name): Don't override name for JNI header.
4646 2005-02-01 Roger Sayle <roger@eyesopen.com>
4648 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4649 of unsigned types using iushr and lushr JVM bytecodes.
4651 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4654 * gjavah.c (jni_print_float): Do not emit floating-point
4655 initialiser for a static final field.
4656 (jni_print_double): Likewise.
4658 2005-02-01 Mark Mitchell <mark@codesourcery.com>
4661 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4662 * gjavah.c (print_field_info): Mark static data members of
4663 floating-point type with "__extension__".
4665 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4667 * gjavah.c (print_field_info): Mark static data members of
4668 floating-point type with "__extension__".
4670 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4673 * parse.y (build_string_concatenation): Remove redundant if.
4674 (patch_conditional_expr): Attempt to patch_string() the condition
4675 of a ?: as well, in addition to its other operands.
4677 2005-01-25 Tom Tromey <tromey@redhat.com>
4679 * Make-lang.in (java/java-tree-inline.o): Removed.
4681 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
4684 * parse.y (patch_binop): Allow comparisons against NULL only
4685 if the other operand is of a reference type.
4687 2005-01-24 Tom Tromey <tromey@redhat.com>
4689 * java-tree.h (gcj_abi_version): Declare.
4690 * class.c (make_class_data): Push gcj_abi_version into "next"
4691 field. Renamed field.
4692 * decl.c (gcj_abi_version): New global.
4693 (parse_version): New function.
4694 (java_init_decl_processing): Call it. Renamed 'next' field.
4696 (GCJ_BINARYCOMPAT_ADDITION): New define.
4698 2005-01-24 Roger Sayle <roger@eyesopen.com>
4701 * jcf-write.c (generate_bytecode_insns): Conversions between
4702 integer types of the same precision shouldn't generate widening
4703 or narrowing conversion bytecodes.
4705 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
4707 * java-except.h, java-tree.h: Remove unused prototypes.
4709 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
4712 * jcf-write.c (perform_relocations): Don't call memcpy if source
4713 and destination are the same.
4715 2005-01-17 Tom Tromey <tromey@redhat.com>
4717 * verify-impl.c (get_short): Sign extend.
4718 (get_int): Likewise.
4720 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
4722 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4725 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4727 * verify.c: Revert to the version before the BC-ABI merge.
4729 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4732 * check-init.c (check_init): Take care of references that do not
4733 have an explicit final variable declaration (e.g. array length
4734 access) for pre/post in/de-crement operators.
4736 2005-01-08 Mark Wielaard <mark@klomp.org>
4738 * parse.y (process_imports): Allocate (and free) original_name only
4739 when not already defined.
4740 * jcf-parse.c (read_class): Free results of find_class() and
4742 (java_parse_file): Keep pointer to head of file_list and free when
4743 done. Free result of lrealpath().
4745 2005-01-05 Tom Tromey <tromey@redhat.com>
4747 * gcj.texi (Standard Properties): java.ext.dirs is now used.
4749 2004-12-20 Andrew Haley <aph@redhat.com>
4751 * typeck.c: Use fold_convert for ints and booleans.
4753 2004-12-17 Andrew Haley <aph@redhat.com>
4756 * typeck.c (convert): Use a CONVERT_EXPR when converting to
4757 BOOLEAN_TYPE or CHAR_TYPE.
4758 (convert_to_boolean, convert_to_char) : Remove.
4759 * convert.h (convert_to_boolean, convert_to_char) : Remove.
4760 * expr.c (expand_load_internal): Do type conversion if type is not
4763 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
4766 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4769 2004-12-07 Andrew Haley <aph@redhat.com>
4772 * jcf-parse.c (load_class): Remove sanity test for missing inner
4775 2004-12-06 Tom Tromey <tromey@redhat.com>
4777 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4778 (java.uninstall): Likewise.
4779 (java.maintainer-clean): Likewise.
4780 (.INTERMEDIATE): Likewise.
4781 (java.install-man): Likewise.
4782 (gcj-dbtool.pod): New target.
4783 * gcj.texi (Code Generation): Document -findirect-dispatch.
4784 (libgcj Runtime Properties): Document
4785 gnu.gcj.precompiled.db.path.
4786 (Top): Link to "Invoking gcj-dbtool".
4788 2004-12-06 Tom Tromey <tromey@redhat.com>
4791 * java-tree.h (extract_field_decl): Declare.
4792 * parse.y (extract_field_decl): Renamed from
4793 strip_out_static_field_access_decl. No longer static.
4794 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4796 2004-12-03 Tom Tromey <tromey@redhat.com>
4798 * lang.c (flag_new_verifier): Define.
4799 (java_post_options): Set flag_new_verifier if indirect dispatch
4801 * lang.opt (fnew-verifier): Removed.
4803 2004-12-03 Tom Tromey <tromey@redhat.com>
4806 * Make-lang.in (java.install-common): Only install transformed
4807 gcjh if gcj-cross exists.
4809 2004-12-03 Andrew Haley <aph@redhat.com>
4812 * except.c (link_handler): Patch 'outer' field of siblings of the
4813 range we're demoting.
4815 2004-12-03 Andrew Haley <aph@redhat.com>
4818 * class.c (layout_class_method): Don't fail to override a method
4819 simply because it has DECL_ARTIFICIAL set.
4821 2004-12-02 Tom Tromey <tromey@redhat.com>
4824 * parse.y (craft_constructor): Special case null_pointer_node.
4826 2004-12-02 Tom Tromey <tromey@redhat.com>
4829 * java-gimplify.c (java_gimplify_expr): Don't call
4830 SET_EXPR_LOCATION unless wrapped tree is an expression.
4832 2004-11-27 Per Bothner <per@bothner.com>
4834 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
4835 Fix fencepost error in 'i', which got executed one too many times.
4836 Also, fold memcpy into explicit loop, as originally intended.
4837 Also, free temporary 'buf' which otherwise leaks.
4839 2004-11-27 Per Bothner <per@bothner.com>
4841 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4842 local static variables if not USE_MAPPED_LOCATION.
4844 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
4846 * class.c, decl.c, expr.c: Fix comment typos.
4848 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
4851 * decl.c (end_java_method): Call
4852 attach_init_test_initialization_flags on all the init_decls.
4853 * parse.y (attach_init_test_initialization_flags): Move to ...
4854 * expr.c (attach_init_test_initialization_flags): here and
4855 support BIND_EXPR also.
4856 * java-tree.h (attach_init_test_initialization_flags): Prototype.
4857 * jcf-parse.c (parse_class_file): Don't disable class init
4860 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
4862 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4865 2004-11-24 Richard Henderson <rth@redhat.com>
4867 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4868 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4870 2004-11-24 Tom Tromey <tromey@redhat.com>
4872 * verify.c (defer_merging): Don't use C++-style comment.
4873 * verify.h (java_opcode): Added java_opcode_end.
4874 * class.c (build_class_ref): Remove C++ comment and old FIXME.
4876 * verify-impl.c (vfy_push_type): Removed bogus "return".
4877 (initialize_stack): Use vfy_alloc and vfy_free.
4878 (verify_instructions_0): Likewise.
4880 * Merged gcj-abi-2-dev-branch to trunk.
4882 2004-11-24 Andrew Haley <aph@redhat.com>
4884 * jcf-parse.c (parse_class_file): Set file_start_location.
4886 2004-11-10 Tom Tromey <tromey@redhat.com>
4888 * class.c (make_field_value): Don't call build_static_field_ref.
4889 (build_static_field_ref): Don't emit direct references when using
4892 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
4893 -verbose:class into man page synopsis.
4895 2004-11-09 Tom Tromey <tromey@redhat.com>
4897 * expr.c (build_java_arraystore_check): Still generate check if
4898 element type is itself an array.
4900 2004-11-08 Tom Tromey <tromey@redhat.com>
4902 * java-tree.h (soft_check_assignment_node): Removed.
4903 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4904 * decl.c (java_init_decl_processing): Don't initialize
4905 soft_check_assignment_node.
4907 2004-11-05 Tom Tromey <tromey@redhat.com>
4909 * class.c (layout_class_methods): Don't add Miranda methods when
4910 using indirect dispatch.
4912 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
4914 * class.c (make_class_data): Call emit_assertion_table to set the
4915 'assertion_table' field.
4916 (build_signature_for_libgcj): Move here from expr.c.
4917 (add_assertion_table_entry): New function. Callback for assertion
4918 hashtable traversal.
4919 (emit_assertion_table): New. Take class argument, and generate
4920 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4921 * decl.c (init_decl_processing): Define assertion_entry_type record.
4922 Push 'assertion_table' class field instead of 'verify'.
4923 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4924 (type_assertion_hash): Include 'assertion_code' in hash.
4925 (add_type_assertion): Rewritten. Take class and assertion_code
4926 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4927 (can_widen_reference_to): Use new add_type_assertion() arguments.
4928 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4929 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4930 (verify_identifier_node): Removed.
4931 (assertion_entry_type, assertion_table_type): New.
4932 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4933 assertion code definitions.
4934 (struct type_assertion): Add assertion_code. Rename 'source_type' and
4935 'target_type' to 'op1' and 'op2'.
4936 (add_type_assertion): Declare.
4937 (lang_printable_name_wls): Remove unused definition.
4938 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4939 to emit runtime assertion.
4940 (vfy_note_stack_type): Clean up non-C90 declarations.
4941 (vfy_note_local_type): Likewise.
4942 * verify.h (vfy_is_assignable_from): Declare.
4943 * verify-impl.c (is_assignable_from_slow): Remove unused function.
4944 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4945 instead of is_assignable_from_slow().
4946 (types_compatible): Reinstate ref_compatible() call.
4948 2004-11-04 Tom Tromey <tromey@redhat.com>
4950 * class.c (build_static_field_ref): Reverted previous patch.
4952 * class.c (build_static_field_ref): Don't emit direct references
4953 when using indirect dispatch.
4955 2004-11-03 Tom Tromey <tromey@redhat.com>
4957 * expr.c (expand_java_arrayload): Set lhs_type_node.
4958 (expand_java_arraystore): Set rhs_type_node.
4960 2004-11-02 Tom Tromey <tromey@redhat.com>
4962 * jcf-parse.c (compute_class_name): Use filename length from zip
4963 directory, not strlen.
4965 * expr.c (expand_invoke): Mark new interface methods as abstract.
4967 2004-11-01 Tom Tromey <tromey@redhat.com>
4969 * verify-impl.c (push_jump): Removed check for uninitialized
4971 (push_exception_jump): Likewise.
4972 (handle_ret_insn): Likewise.
4973 (handle_jsr_insn): Likewise.
4974 (state_check_no_uninitialized_objects): Removed.
4976 * decl.c (check_local_unnamed_variable): Recognize
4977 promoted-to-int parameters when using the new verifier.
4978 * expr.c (expand_java_arraystore): Explicitly request array type
4979 when using new verifier.
4980 (expand_java_arrayload): Likewise.
4981 (invoke_build_dtable): Don't pass object_type_node as
4982 expression argument to build_java_indirect_ref.
4983 (build_java_check_indexed_type): Do nothing.
4984 (build_java_arraystore_check): Handle case where array doesn't
4986 (build_java_array_length_access): Likewise.
4987 (expand_invoke): Handle case where interface overrides a method
4989 (pop_type_0): Always succeed for reference types.
4990 (process_jvm_instruction): Don't pop a value in a dead
4992 (pop_arguments): Convert arguments to correct types.
4994 2004-10-29 Andrew Haley <aph@redhat.com>
4996 * jcf-parse.c (give_name_to_class): Remove line that was
4999 2004-10-29 Andrew Haley <aph@redhat.com>
5001 * jcf-parse.c (set_source_filename): Add code to build new sfname.
5003 2004-10-20 Andrew Haley <aph@redhat.com>
5005 * decl.c (end_java_method): Don't expand if flag_syntax_only.
5007 2004-10-26 Tom Tromey <tromey@redhat.com>
5009 * verify.h (vfy_notify_verified): Removed.
5010 * verify-glue.c (vfy_notify_verified): Removed.
5012 2004-10-26 Tom Tromey <tromey@redhat.com>
5014 * verify-impl.c (debug_print_state): Declare `i' before code.
5015 (merge_types): Modify `t' when it is null_type.
5017 2004-10-26 Tom Tromey <tromey@redhat.com>
5019 * verify-impl.c (type_print): Renamed from print. Now static and
5021 (debug_print_state): Use type_print.
5023 2004-10-25 Tom Tromey <tromey@redhat.com>
5025 * expr.c (build_invokeinterface): Compute correct offset for
5026 index into interface methods.
5028 2004-10-20 Tom Tromey <tromey@redhat.com>
5030 * java-tree.h (verify_jvm_instructions_new): Declare.
5032 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
5035 * verify-impl.c (verify_instructions): Correctly handle wide
5037 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
5038 (vfy_get_component_type): Strip pointer types.
5039 (vfy_find_class): Use get_type_from_signature. Strip pointer
5041 Include java-except.h.
5043 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
5045 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
5046 vfy_push_type_t, set_variable, add_new_state, merge_into,
5047 handle_jsr_insn, branch_prepass, check_class_constant,
5048 check_wide_constant, get_one_type, compute_static_types,
5049 verify_instructions_0): Clean up C99 declarations after statements.
5051 2004-10-20 Tom Tromey <tromey@redhat.com>
5053 * verify-impl.c (merge_refs): Compare reference against iterator,
5056 * verify-glue.c (vfy_tag): Mask off resolved flag.
5058 2004-10-19 Tom Tromey <tromey@redhat.com>
5060 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
5061 (init_state_with_stack): Initialize `this_type' in state.
5062 (verify_method): Use debug_print.
5063 * verify-glue.c (vfy_is_primitive): Removed debugging print.
5064 (vfy_note_stack_depth): Reverted last patch.
5065 (vfy_note_stack_type): Note pointer to Object, not Object.
5066 (vfy_note_local_type): Likewise.
5068 * verify.h (vfy_note_instruction_seen): Declare.
5069 * verify-glue.c (verify_jvm_instructions_new): Set
5070 BCODE_EXCEPTION_TARGET on target instruction.
5071 (vfy_note_instruction_seen): New function.
5072 * verify-impl.c (FLAG_INSN_SEEN): New define.
5073 (verify_instructions_0): Set flag on instruction. Save state for
5075 (verify_instructions): Call vfy_note_instruction_seen.
5077 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
5078 (verify_jvm_instructions_new): Call method_init_exceptions,
5079 add_handler, and handle_nested_ranges.
5080 * verify-impl.c (verify_method): Return 1 on success.
5081 (verify_instructions_0): Save the state at PC=0.
5083 * verify-impl.c (init_type_from_class): Set is_resolved and
5084 ref_next on new ref_intersection.
5085 (init_type_from_string): Likewise.
5087 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
5089 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
5090 if flag_new_verifier is set.
5091 * java-tree.h (flag_new_verifier): Declare.
5092 * lang.opt (fnew-verifier): New option.
5093 * verify-impl.c: Work around namespace pollution by undef'ing
5095 (struct verifier_context): Make 'bytecode' const.
5096 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
5097 (types_compatible): For the BC-ABI, always consider reference types
5099 (check_class_constant): Use vfr->current_class.
5100 (check_constant): Likewise.
5101 (check_wide_constant): Likewise.
5102 (check_field_constant): Check for 'L' at start of type name.
5103 (get_one_type): Return pointer instead of type. Set type result in
5104 caller via passed type pointer.
5105 (compute_argument_types): Update to use new get_one_type arguments.
5106 (compute_return_type): Likewise.
5107 (make_verifier_context): New. Allocate and initialize 'vfr'.
5108 (free_verifier_context): New. Free 'vfr' and its contents.
5109 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
5110 and free_verifier_context.
5112 2004-10-15 Tom Tromey <tromey@redhat.com>
5114 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
5115 * verify.h (vfy_fail): Fixed formatting.
5117 * verify-impl.c (vfr): Fixed comment formatting.
5118 (collapse_type): New function.
5119 (verify_instructions): Notify compiler about type map.
5120 * verify.h (vfy_note_stack_depth): Updated.
5121 (vfy_note_stack_type): Likewise.
5122 (vfy_note_local_type): Likewise.
5123 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
5125 * verify-glue.c (vfy_note_stack_depth): Correctly size type
5126 state. Added `method' argument.
5127 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
5129 (vfy_note_local_type): New function.
5130 (vfy_unsuitable_type): Likewise.
5131 (vfy_return_address_type): Likewise.
5132 (vfy_null_type): Likewise.
5134 * verify.h (VFY_IN_GCC): Removed.
5135 (VFY_WANT_TYPEMAP): Removed.
5136 * verify-impl.c (verify_instructions_0): Removed useless "\".
5137 (struct state) <next>: Uncomment.
5139 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
5141 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
5144 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
5146 * Make-lang.in (verify.o): Re-enabled this target.
5147 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
5148 (vfy_get_interface): Likewise.
5149 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
5150 * verify.h (verify_jvm_instructions_new): Declare.
5151 * verify-impl.c (free_state): Temporarily comment out unused
5154 2004-10-06 Tom Tromey <tromey@redhat.com>
5156 * java-tree.h (JV_STATE_READ): New enum value.
5158 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
5160 * verify.h: New file.
5162 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
5164 * verify-impl.c, verify-glue.c, verify.h: New files.
5165 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
5167 2004-09-24 Andrew Haley <aph@redhat.com>
5169 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
5170 for a slot if it's of pointer type.
5172 2004-09-14 Tom Tromey <tromey@redhat.com>
5174 * class.c (make_class_data): Correctly initialize "state" field.
5175 Initialize "engine" field.
5176 * decl.c (java_init_decl_processing): Add "engine" field.
5178 2004-09-10 Andrew Haley <aph@redhat.com>
5181 * expr.c (build_invokeinterface): Use fast method for interface
5183 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
5184 JTI_ITABLE_PTR_TYPE.
5185 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
5186 (emit_symbol_table): Add new arg, element_size.
5187 * decl.c (java_init_decl_processing): Initialize Class.itable.
5188 * class.c (GEN_TABLE): New macro.
5189 (gen_indirect_dispatch_tables): Use it. Add itable.
5190 (make_class_data): Add new arg for emit_symbol_table().
5192 (add_miranda_methods): Make sure search_class has been parsed.
5193 (emit_symbol_table): Add new arg, element_size.
5195 2004-09-06 Andrew Haley <aph@redhat.com>
5197 * verify.c (merge_types): Return Object for all merges of
5199 * expr.c (add_type_assertion): Don't generate assertions when
5200 source type is array of Object.
5202 2004-09-03 Andrew Haley <aph@redhat.com>
5204 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
5206 * lang.c (java_post_options): Force flag_verify_invocations if
5207 we're not using indirect dispatch.
5209 * expr.c (pop_type_0): Move test for interfaces before call to
5210 can_widen_reference_to().
5211 (build_signature_for_libgcj): Remove generation of canonical array
5213 (add_type_assertion): Canonicalize both arrays.
5214 Don't assert that type X can be assigned to Object.
5215 Don't assert that type X an be assigned to type X.
5216 Don't assert that Object can be assigned to type X.
5217 (can_widen_reference_to): Warn whenever we generate an assertion.
5218 (process_jvm_instruction): Use throwable_type_node for the type of
5221 2004-09-01 Andrew Haley <aph@redhat.com>
5223 * decl.c (java_init_decl_processing): Change
5224 verify_identifier_node to "__verify".
5225 * expr.c (add_type_assertion): Use verify_identifier_node for name.
5226 * java-tree.h (verify_identifier_node): Change to "__verify".
5228 * expr.c (build_signature_for_libgcj): New function.
5229 (add_type_assertion): Use it to construct signatures for
5230 source_type and target_type.
5232 2004-08-27 Andrew Haley <aph@redhat.com>
5234 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
5235 (verify_identifier_node): New.
5236 (TYPE_VERIFY_METHOD): New.
5237 (struct type_assertion): New type.
5238 * expr.c (type_assertion_eq): New function.
5239 (type_assertion_hash): New function.
5240 (add_type_assertion): New function.
5241 (can_widen_reference_to): Call add_type_assertion().
5242 * decl.c (java_init_decl_processing): Add verify_identifier_node.
5243 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
5244 (finish_class): Output TYPE_VERIFY_METHOD (type).
5246 * decl.c (end_java_method): Nullify unused fields.
5248 2004-08-17 Andrew Haley <aph@redhat.com>
5250 * verify.c (defer_merging): Quieten.
5251 * jcf-parse.c (load_class): Only try to open a class file if it's
5252 java.lang.Object or if it's part of the current compilation.
5253 Check that the class we just tried to load is the class we just
5255 (java_parse_file): Set flag_verify_invocations off if we're
5256 compiling from .class.
5257 (parse_zip_file_entries): Abort if we try to read a dummy class.
5258 * expr.c (can_widen_reference_to): Quieten.
5259 (build_invokevirtual): Abort if we try to invokevirtual an
5261 (expand_invoke): Don't build a non-interface call to an interface.
5262 (build_instanceof): Don't do premature optimization if
5263 flag_verify_invocations is not set.
5264 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
5266 (build_static_field_ref): Add correct type conversion for
5268 (add_miranda_methods): Disable generation of Miranda methods for
5270 (layout_class_method): Don't complain about non-static method
5271 overrides static method with dummy classes.
5273 2004-08-13 Tom Tromey <tromey@redhat.com>
5275 * class.c (build_static_field_ref): Re-enable atable lookups for
5278 * parse.y (strip_out_static_field_access_decl): Indentation fix.
5280 2004-08-11 Tom Tromey <tromey@redhat.com>
5282 * gcj.texi (libgcj Runtime Properties): Document new properties.
5284 2004-08-06 Andrew Haley <aph@redhat.com>
5286 * jcf-parse.c (load_class): Check that we really have loaded the
5287 class we're looking for.
5289 2004-07-19 Andrew Haley <aph@redhat.com>
5291 * verify.c (verify_jvm_instructions): Comment change only.
5293 * typeck.c (build_java_array_type): Add size field to array name.
5295 * java-tree.h (LOCAL_SLOT_P): New.
5296 (update_aliases): Add PC argument.
5297 (pushdecl_function_level): New function.
5299 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5300 MODIFY_EXPR, and SAVE_EXPR.
5301 (java_gimplify_modify_expr): New function.
5303 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5304 (expand_iinc): Pass PC to update_aliases().
5305 (STORE_INTERNAL): Likewise.
5306 (process_jvm_instruction): Likewise.
5308 * decl.c (base_decl_map): New variable.
5309 (uniq): New variable.
5310 (update_aliases): Rewrite with more thorough checking.
5311 (debug_variable_p): New function.
5312 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5313 (check_local_named_variable): Delete whole function.
5314 (initialize_local_variable): New function.
5315 (check_local_unnamed_variable): Add checks and comments.
5316 (find_local_variable): Rewrite.
5317 (java_replace_reference): New function.
5318 (function_binding_level): New variable.
5319 (pushdecl_function_level): New function.
5320 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5321 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5322 (start_java_method): Reset uniq. Create base_decl_map. Set
5323 function_binding_level.
5324 (end_java_method): Null unused fields to save memory.
5326 2004-06-29 Andrew Haley <aph@redhat.com>
5328 * except.c (expand_start_java_handler): Push a new binding level.
5329 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
5330 register_exception_range() to register where we'll do it.
5331 (expand_end_java_handler): Remove old bogus code. Replace with
5332 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5333 the top of the expression we're curently building.
5334 (maybe_end_try): Delete.
5335 * decl.c (binding_level.exception_range): New field.
5336 (clear_binding_level): Add field exception_range. Reformat.
5337 (poplevel): Call expand_end_java_handler().
5338 (poplevel): Call java_add_stmt only if functionbody is false.
5339 (maybe_poplevels): Don't call maybe_end_try() from here.
5340 (end_java_method): Clear no longer used trees in function decl.
5341 (register_exception_range): New function.
5342 * java-tree.h (register_exception_range, struct eh_range): Declare.
5344 2004-06-22 Andrew Haley <aph@redhat.com>
5346 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
5348 * check-init.c (get_variable_decl): Teach check-init about
5349 FIELD_DECLs addressed via the otable.
5350 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
5353 2004-05-28 Andrew Haley <aph@redhat.com>
5355 * jcf-parse.c (load_class): Don't try to read a class that we've
5358 * expr.c (build_invokeinterface): Use the old-fashioned way of
5359 doing indirect dispatch: look up interfaces by name.
5360 * java-tree.h (enum java_tree_index): Add
5361 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
5362 * decl.c (java_init_decl_processing): Add
5363 soft_lookupinterfacemethodbyname_node.
5365 * gjavah.c (print_method_info): Final methods have vtable entries,
5366 so gjavah needs to output them.
5367 * class.c (layout_class_method): Generate vtable entries for final
5369 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
5370 dispatch, even if a method is final.
5372 2004-05-25 Andrew Haley <aph@redhat.com>
5374 * class.c (build_symbol_entry): Convert the names of constructors
5375 to init_identifier_node when generating an entry for the indirect
5378 * expr.c (build_known_method_ref): Generate indirect calls for
5379 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
5381 2004-05-24 Andrew Haley <aph@redhat.com>
5383 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
5384 atable element is of the right type.
5386 * class.c (build_static_field_ref): Cast pointer to correct type
5389 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
5391 * Merged with HEAD as of 20040514. Diff against
5392 gcj-abi-2-merge-20040514.
5394 2004-04-16 Andrew Haley <aph@redhat.com>
5396 * verify.c (check_pending_block): Disable subroutine checks.
5397 (defer_merging): New function.
5398 (merge_types): If types are dummy, use defer_merging to combine them.
5399 (verify_jvm_instructions): If invocation is invokeinterface and
5400 target is dummy, assume target really is an interface.
5402 * parse.y (patch_invoke): Break out call to java_create_object.
5404 * lang.c (flag_verify_invocations): New.
5406 * jcf-parse.c (load_class): If we've already failed to load a
5407 class, don't try again.
5408 (load_class): If we can't find a .class file, don't fail, but emit
5410 (parse_class_file): Don't act on dummy methods.
5412 * java-tree.h (flag_verify_invocations): New.
5414 (lang_type.dummy_class): New field.
5415 (java_create_object): New function.
5416 (METHOD_DUMMY): New.
5418 * expr.c (build_field_ref): Widen field offset.
5419 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
5420 that each of its elements is compatible with the one we're
5422 (pop_type_0): Issue a warning to say that we need to generate a
5424 (java_create_object): New function.
5425 (build_field_ref): Only generate hard refs if we're not using
5427 (expand_java_field_op): If we're using !verify_invocations and we
5428 see a missing field, generate a decl for it.
5430 (expand_invoke): If a class doesn't have the method we seek and
5431 we're using !flag_verify_invocations, generate a decl for the
5434 (build_known_method_ref): Always use indirect dispatch via the
5435 atable for static methods.
5437 (expand_java_NEW): Break out object creation into new function,
5440 (can_widen_reference_to): Issue a warning to say that we need to
5441 generate a runtime check.
5443 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
5444 (make_method_value): Also use index for interfaces.
5445 (make_class_data): Skip dummy field for inherited data.
5446 Don't build method array for dummy methods.
5447 Set size_in_byte to -1 when using inirect dispatch
5448 Don't build a hard class ref if we don't have a hard ref to our
5449 superclass, or if we're using inirect dispatch.
5450 Null out dispatch tables.
5452 (layout_class_method): Don't complain about non-static method
5453 overrides static method is method is artificial.
5455 (build_static_field_ref): Disable atable references to static
5456 fields for the time being.
5458 (layout_class_methods): Check for CLASS_INTERFACE as
5459 well as CLASS_ABSTRACT.
5461 2004-11-24 Steven Bosscher <stevenb@suse.de>
5463 * class.c (make_class_data): Don't check flag_inline_functions.
5464 * lang.c (flag_really_inline): Remove unused flag.
5465 (java_handle_option): Don't set it here. Remove special handling
5466 of flag_inline_functions for Java.
5467 (java_init): Don't set flag_inline_trees here. Already done...
5468 (java_post_options): ...here. Don't clear flag_inline_functions.
5470 2004-11-24 Steven Bosscher <stevenb@suse.de>
5472 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
5473 (java_gimplify_exit_block_expr): New function.
5474 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
5476 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
5477 (EXIT_BLOCK_EXPR): Likewise.
5478 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
5479 (LABELED_BLOCK_BODY): Likewise.
5480 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
5481 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
5482 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
5484 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
5485 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
5486 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
5487 second operand of EXIT_BLOCK_EXPR.
5488 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
5490 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
5492 2004-11-23 Ben Elliston <bje@au.ibm.com>
5494 * xref.h (xref_flag_value): Remove.
5495 (xref_set_data, xref_get_data): Likewise.
5496 (xref_set_current_fp): Likewise.
5497 (XREF_NONE): Likewise.
5498 (XREF_GET_DATA): Likewise.
5499 * xref.c (xref_flag_value): Remove.
5500 (xref_set_data, xref_get_data): Likewise.
5501 (xref_set_current_fp): Likewise.
5503 2004-11-23 Ben Elliston <bje@au.ibm.com>
5505 * gjavah.c (output_directory): Make static.
5506 (temp_directory): Likewise.
5508 2004-11-15 Tom Tromey <tromey@redhat.com>
5510 * decl.c (instn_ptr_type_node): Removed.
5511 (lineNumbers_ptr_type_node): Removed.
5512 (jint_type): Removed.
5513 (jint_ptr_type): Removed.
5515 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
5518 * check-init.c (check_init): Ignore DECL_EXPR.
5519 * expr.c (always_initialize_class_p): Reenable.
5520 (build_class_init): Use a variable to store the decl. Also use
5521 boolean_false_node instead of integer_zero_node.
5522 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
5525 2004-11-08 Tom Tromey <tromey@redhat.com>
5528 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
5529 generating a JNI header.
5530 (print_field_info): Handle JNI headers.
5531 (jni_print_float): Likewise.
5532 (jni_print_double): Likewise.
5534 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
5536 * decl.c (end_java_method): Remove duplicated code.
5538 2004-11-06 Zack Weinberg <zack@codesourcery.com>
5539 Gerald Pfeifer <gerald@pfeifer.com>
5541 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
5544 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
5547 * class.c: Reinstate 2004-08-18 patch.
5548 (make_local_function_alias): Don't create an alias for extern (native)
5551 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
5554 * class.c (make_local_function_alias): Revert 2004-08-18 change.
5555 (make_method_value): Likewise.
5557 2004-10-21 Andrew Haley <aph@redhat.com>
5560 * jcf-parse.c (set_source_filename): Add code to build new sfname.
5562 2004-10-20 Andrew Haley <aph@redhat.com>
5564 * decl.c (end_java_method): Don't expand if flag_syntax_only.
5565 Remove duplicated code block.
5567 2004-10-18 Steven Bosscher <stevenb@suse.de>
5569 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
5570 New rules to work around old Bison warnings.
5572 2004-10-17 Steven Bosscher <stevenb@suse.de>
5574 * class.c (ident_subst): Always alloca buffer.
5575 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
5576 opcode after including javaop.def.
5577 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
5578 conditional expression that exits, to avoid warnings.
5579 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
5580 a user of an extension.
5581 * win32-host.c: Move check down to have non-empty file when
5582 WIN32 is not defined.
5584 * Make-lang.in (java-warn): Add STRICT_WARN.
5585 (java/jcf-io.o-warn): Don't have Werror for this file.
5586 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
5588 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
5590 * expr.c (expr_add_location): Move declaration to before all
5592 * parse.y (java_expand_classes): Ditto.
5593 * lex.c (java_peek_unicode): Ditto.
5595 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5597 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
5598 if possible, else convert `foo' to 'foo'.
5599 * class.c: Likewise.
5602 * jcf-io.c: Likewise.
5603 * jcf-parse.c: Likewise.
5606 * parse.h: Likewise.
5608 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5610 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
5611 rename parameter 'msg' to 'msgid' in function declaration.
5612 (issue_warning_error_from_context): Likewise.
5613 (yyerror): Rename parameter 'msg' to 'msgid'.
5614 (all over): Use new quoting style for diagnostics.
5616 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
5618 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
5619 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
5622 2004-10-14 Matt Austern <austern@apple.com>
5624 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5627 2004-10-13 Tom Tromey <tromey@redhat.com>
5630 * lang.opt (--extdirs): Document.
5631 * jvspec.c (lang_specific_driver): Recognize -encoding and
5634 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
5636 * parse.y (issue_warning_error_from_context): Use va_list *
5637 instead of va_list parameter.
5638 (parse_error_context): Update call.
5639 (parse_warning_context): Likewise.
5641 2004-10-05 Zack Weinberg <zack@codesourcery.com>
5643 * parse.y, parse-scan.y: Add list of diagnostic messages to
5644 insulate translation template from version of yacc/bison used
5645 to compile the grammar.
5647 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
5649 Prepare for %q, %< and %> in diagnostic message strings.
5650 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5651 Name second parameter 'msgid'.
5652 * parse.y: Additionally include pretty-print.h and diagnostic.h.
5653 (issue_warning_error_from_context): Use pretty-printer functions
5654 instead of vsprintf for constructing formatted messages. Rename
5655 parameter 'msg' to 'msgid'.
5656 (parse_error_context): Rename parameter 'msg' to 'msgid'.
5657 (parse_warning_context): Likewise.
5659 2004-10-05 Andrew Haley <aph@redhat.com>
5662 * jcf-parse.c (parse_zip_file_entries): If a class has a
5663 superclass and a TYPE_SIZE of zero, lay it out.
5665 2004-09-30 Andrew Haley <aph@redhat.com>
5668 * jcf-parse.c (compute_class_name): Rewrite.
5670 2004-10-01 Jan Hubicka <jh@suse.cz>
5672 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5674 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5676 * lex.c: Fix a comment typo.
5678 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5680 * java-tree.h: Fix a comment typo.
5682 2004-09-30 Per Bothner <per@bothner.com>
5684 Simplify lexer. Implement --enable-mapped-location support.
5685 * jcf-parse.c (parse_class_file): Use linemap_line_start.
5686 (parse_source_file_1): Pass filename as extra parameter, so we can call
5687 linemap_add and set input_location here, rather than in both callers.
5688 (read_class): Pass copied filename to parse_source_file_1.
5689 Don't initialize wfl_operator - only needed for source compilation.
5690 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
5691 * lex.h: Remove a bunch of debugging macros.
5692 * lex.h (struct_java_line, struct java_error): Remove types.
5693 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
5694 (struct java_lc_s): Remove prev_col field.
5695 (struct java_lexer): New fields next_unicode, next_columns, and
5696 avail_unicode. New position field, and maybe token_start field.
5697 Don't need hit_eof field - use next_unicode == -1 instead.
5698 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
5699 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
5700 * parse.h: Various changes for USE_MAPPED_LOCATION.
5701 (EXPR_WFL_EMIT_LINE_NOTE): XXX
5702 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5703 (struct parser_ctxt): New file_start_location field.
5704 Remove p_line, c_line fields since we no longer save lines.
5705 Remove elc, lineno, and current_jcf fields - no longer used.
5706 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
5707 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5708 source_location and is probably not needed anymore anyway.
5709 Use new expr_add_Location function.
5710 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
5711 (java_pop_parser_context): Minor cleanup.
5712 (java_parser_context_save_global, java_parser_context_restore_global,
5713 java_pop_parser_context): Save/restore input_location as a unit.
5714 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
5715 a source_location instead of a wfl context node.
5716 (check_class_interface_creation): input_filename is not addressable.
5717 (create_artificial_method): Calling java_parser_context_save_global
5718 and java_parser_context_restore_global is overkill. Instead,
5719 temporarily set input_location from class decl.
5720 (java_layout_seen_class_methods): Set input_location from method decl.
5721 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5722 (finish_loop_body): Likewise.
5723 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
5724 (java_sprint_unicode): Take a character, not index in line.
5725 (java_sneak_uncode): Replaced by java_peek_unicode.
5726 (java_unget_unicode): No longer used.
5727 (java_allocate_new_line. java_store_unicode): Removed, since we
5728 no longer remember "lines".
5729 (java_new_lexer): Update for new data structures.
5730 (java_read_char): Move unget_value checking to java_read_unicode.
5731 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5732 efficient functions that are used directly when lexing.
5733 (java_read_unicode_collapsing_terminators): No longer needed.
5734 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5735 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5736 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
5737 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
5738 combine switch branches, and test for common token kinds earlier.
5739 (java_lex_error): Rewrite.
5740 * jv-scan.c (expand_location): New function, copied from tree.c.
5741 (main): Set ctxp->filename instead of setting input_filename directly.
5743 2004-09-30 Per Bothner <per@bothner.com>
5745 More cleanup for --enable-mapped-location.
5746 * class.c (push_class): If USE_MAPPED_LOCATION don't set
5747 input_location here. Instead do it in give_name_to_class.
5748 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5749 * expr.c (expand_byte_code): Call linemap_line_start.
5750 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
5751 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
5752 (expr_add_location): New function, if USE_MAPPED_LOCATION.
5753 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
5754 to USE_MAPPED_LOCATION case.
5756 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
5757 * jcf-parse.c (java_parse_file): Don't set input_filename.
5758 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5759 Create a list of TRANSLATION_UNIT_DECL.
5760 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
5761 reason is so we can set a DECL_SOURCE_LOCATION for each file.
5762 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5763 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5764 (file_start_location): New static.
5765 (set_source_filename): Avoid extra access to input_filename macro.
5766 Concatenate new name with class's package prefix.
5767 (set_source_filename, give_name_to_class): Update.
5768 (give_name_to_class): Set class's "line 0" input_location here.
5769 (parse_class_file): Set input_location as a unit.
5771 * jcf-parse.c (load_class): Sanity test if missing inner class file.
5773 2004-09-29 Per Bothner <per@bothner.com>
5775 * java-tree.h: Redefine some macros and add some declaration
5776 to handle the USE_MAPPED_LOCATION case.
5777 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
5778 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
5779 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5780 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5782 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5783 * decl.c (finish_method, java_add_stmt): Likewise.
5784 * java-gimplify.c (java-gimplify.c): Likewise.
5785 * jcf-write.c (generate_bytecode_insns): Likewise.
5786 * lang.c (java_post_options): Likewise - call linemap_add.
5788 2004-09-29 Andrew Haley <aph@redhat.com>
5791 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5792 result of TRUNC_MOD_EXPR.
5793 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5794 * decl.c (java_init_decl_processing): Mark
5795 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5797 2004-09-28 Tom Tromey <tromey@redhat.com>
5800 * class.c (add_miranda_methods): Load superinterface if not
5803 2004-09-28 Andrew Haley <aph@redhat.com>
5806 * jcf-parse.c (load_class): Don't try to read a class that we've
5809 2004-09-28 Andrew Haley <aph@redhat.com>
5811 * jcf-parse.c (load_class): Back out previous broken patch.
5813 2004-09-28 Andrew Haley <aph@redhat.com>
5816 * jcf-parse.c (load_class): Don't try to read a class that we've
5818 Check that we really did read the right class.
5820 2004-09-25 Tom Tromey <tromey@redhat.com>
5823 * parse.y (create_artificial_method): Use add_method_1.
5825 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
5827 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5829 * gcj.texi: Fix typos.
5831 2004-09-24 Tom Tromey <tromey@redhat.com>
5834 * parse.y (class_instance_creation_expression): Set `$$' to NULL
5835 in error parts of rule.
5836 (unary_expression): Don't call error_if_numeric_overflow when $1
5839 2004-09-24 Tom Tromey <tromey@redhat.com>
5842 * parse.y (resolve_qualified_expression_name): Set
5843 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5844 * expr.c (force_evaluation_order): Check for empty argument list
5845 after stripping COMPOUND_EXPR.
5847 2004-09-23 Andrew Haley <aph@redhat.com>
5850 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5853 2004-09-23 Tom Tromey <tromey@redhat.com>
5856 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5857 where operand is null.
5859 2004-09-23 Tom Tromey <tromey@redhat.com>
5862 * parse.y (not_accessible_p): Allow access to protected members
5863 even when class is not static.
5865 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
5867 * Make-lang.in: Revert the gcc-none.o change.
5869 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
5871 * parse.y (patch_anonymous_class): VEC_space returns true if there
5874 2004-09-21 Matt Austern <austern@apple.com>
5877 * gjavah.c (free_method_name_list): Fix function definition so
5878 it's a proper C prototype.
5880 2004-09-21 Tom Tromey <tromey@redhat.com>
5883 * gjavah.c (free_method_name_list): New method.
5886 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
5887 Zack Weinberg <zack@codesourcery.com>
5889 * java-tree.def: Use tree_code_class enumeration constants
5890 instead of code letters.
5891 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5892 new tree-class enumeration constants.
5894 2004-09-13 Tom Tromey <tromey@redhat.com>
5897 * class.c (layout_class_method): Put synthetic methods into the
5900 2004-09-11 Andrew Pinski <apinski@apple.com>
5902 * Make-lang.in (java/ggc-none.c): Change dependency
5903 for ggc.h into $(GGC_H).
5905 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5907 * Make-lang.in (java/win32-host.o): Add dependency on
5909 * win32-host.c: Add includes for coretypes.h, jcf.h
5911 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5913 * Make-lang.in (GCJH_OBJS): Change dependency from
5914 ggc-none.o to java/ggc-none.o
5915 (JCFDUMP_OBJS): Likewise.
5916 (java/ggc-none.o): New target.
5918 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
5920 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
5921 * class.c (build_utf8_ref, build_static_field_ref,
5922 make_field_value, make_method_value, get_dispatch_table,
5923 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5924 * constants.c (get_tag_node, build_ref_from_constant_pool,
5925 build_constants_constructor): Likewise.
5926 * decl.c (java_init_decl_processing): Likewise.
5927 * expr.c (build_java_array_length_access, build_newarray,
5928 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5929 build_java_binop, build_field_ref, expand_java_add_case,
5930 expand_java_call, build_known_method_ref, build_invokevirtual,
5931 build_invokeinterface, build_jni_stub): Likewise.
5932 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5933 * jcf-parse.c (get_constant): Likewise.
5934 * lex.c (do_java_lex): Likewise.
5935 * parse.y (patch_binop, patch_unaryop, patch_cast,
5936 build_newarray_node, patch_newarray): Likewise.
5937 * resource.c (compile_resource_data): Likewise.
5938 * typeck.c (build_prim_array_type): Likewise.
5940 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
5942 * decl.c (java_init_decl_processing): Adjust
5943 initialize_sizetypes call.
5945 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
5947 * jv-scan.c (fancy_abort): Add.
5949 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
5951 * expr.c (build_java_arrayaccess): Use convert to change
5954 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
5956 * class.c (make_local_function_alias): Allocate extra space for 'L'
5957 in name buffer. Reported by Thomas Neumann.
5959 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
5961 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5962 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
5963 * lex.c (do_java_lex): Adjust.
5964 (error_if_numeric_overflow): Likewise.
5966 2004-08-18 Andrew Pinski <apinski@apple.com>
5968 * class.c (make_local_function_alias): Only make a new decl if we
5969 support alias attribute on all decls.
5971 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
5973 * class.c (make_local_function_alias): New function. Create local
5974 alias for public method DECL.
5975 (make_method_value): Use make_local_function_alias.
5976 * parse.y (craft_constructor): Don't special-case anonymous classes.
5977 Always set ctor_name to init_identifier_node.
5978 (lookup_method_invoke): Call layout_class_method when creating
5979 anonymous class constructor.
5981 2004-08-18 Richard Henderson <rth@redhat.com>
5983 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5984 default case. Treat '<' similarly. Update for
5985 is_gimple_formal_tmp_var name change.
5987 2004-08-17 Andrew Haley <aph@redhat.com>
5989 * lang.c (lang_printable_name): Obey verbose flag.
5990 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5991 lang_printable_name().
5992 (verify_constructor_circularity, get_printable_method_name,
5993 check_abstract_method_definitions, java_check_regular_methods,
5994 java_check_abstract_methods, check_inner_class_access,
5995 fix_constructors, patch_method_invocation, patch_return):
5997 * expr.c (pop_type_0): Likewise.
5999 * java-tree.h (lang_printable_name_wls): Delete.
6001 2004-08-16 Tom Tromey <tromey@redhat.com>
6004 * parse.y (primary): Changed for initialized and uninitialized
6006 (array_access): Handle array_creation_initialized.
6007 (array_creation_expression): Split into
6008 array_creation_initialized and array_creation_uninitialized.
6010 2004-08-16 Andrew Haley <aph@redhat.com>
6012 * jcf-write.c (find_constant_index): Canonicalize NaNs when
6013 generating bytecode.
6015 2004-08-16 Elliot Lee <sopwith@redhat.com>
6018 * jcf-parse.c (java_parse_file): Handle filenames with embedded
6019 spaces, and quoted filelists.
6021 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
6023 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
6024 * class.c (build_utf8_ref, build_static_field_ref,
6025 make_field_value, make_method_value, get_dispatch_table,
6026 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
6027 * constants.c (get_tag_node, build_ref_from_constant_pool,
6028 build_constants_constructor): Likewise.
6029 * decl.c (java_init_decl_processing): Likewise.
6030 * expr.c (build_java_array_length_access, build_newarray,
6031 expand_java_multianewarray, expand_java_pushc, expand_iinc,
6032 build_java_binop, build_field_ref, expand_java_add_case,
6033 expand_java_call, build_known_method_ref, build_invokevirtual,
6034 build_invokeinterface, build_jni_stub): Likewise.
6035 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6036 * jcf-parse.c (get_constant): Likewise.
6037 * lex.c (do_java_lex): Likewise.
6038 * parse.y (patch_binop, patch_unaryop, patch_cast,
6039 build_null_of_type, patch_newarray): Likewise.
6040 * resource.c (compile_resource_data): Likewise.
6041 * typeck.c (build_prim_array_type): Likewise.
6043 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
6045 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
6046 Don't create BLOCK here or call java_gimplify_block.
6048 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
6050 * java-tree.h (flag_deprecated): Removed.
6051 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
6052 * parse.y (check_deprecation): Check warn_deprecated instead of
6055 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
6057 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
6058 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
6059 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
6060 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
6061 flag_force_classes_archive_check, flag_optimize_sci,
6062 flag_indirect_dispatch): Remove explicit declarations.
6063 * lang.opt: Add implicit declare/define/assign. Remove obsolete
6066 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
6069 * Make-lang.in (java.install-man): Install from either build
6070 tree or source tree, whichever has the file first.
6072 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
6074 * jcf-parse.c (get_constant): Adjust force_fit_type call.
6075 * lex.h (SET_LVAL_NODE_TYPE): Remove.
6076 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
6077 (do_java_lex): Likewise. Adjust force_fit_type call.
6079 2004-08-04 Roger Sayle <roger@eyesopen.com>
6080 Andrew Haley <aph@redhat.com>
6082 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
6083 checking trees as they're being built.
6084 (convert): Call convert_ieee_real_to_integer if we're
6085 converting a constant, even if we're writing a class file.
6087 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
6090 * parse.y (fold_constant_for_init): Call resolve_field_access with
6091 correct current_class context.
6093 2004-08-01 Roger Sayle <roger@eyesopen.com>
6095 * decl.c (update_aliases, initialize_local_variable): Replace calls
6096 to build with calls to buildN.
6097 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
6098 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
6099 * parse.h (BUILD_THROW): Likewise.
6100 * parse.y (switch_expression, synchronized_statement,
6101 catch_clause_parameter, array_creation_expression,
6102 conditional_expression, make_qualified_name,
6103 resolve_qualified_expression_name, patch_method_invocation,
6104 patch_invoke, build_method_invocation, build_new_invocation,
6105 build_assignment, patch_assignment, build_binop, patch_binop,
6106 build_string_concatenation, build_incdec, patch_unaryop,
6107 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
6108 patch_return, build_if_else_statement, build_labeled_block,
6109 build_new_loop, build_loop_body, build_bc_statement,
6110 build_assertion, encapsulate_with_try_catch, build_try_statement,
6111 build_try_finally_statement, patch_synchronized_statement,
6112 emit_test_initialization): Likewise, replace build with buildN.
6114 2004-07-28 Eric Christopher <echristo@redhat.com>
6116 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
6117 (java_unsafe_for_reeval): Ditto.
6119 2004-07-26 <hp@bitrange.com>
6121 * parse.y (build_super_invocation): Adjust declaration order to
6122 avoid declaration after statement.
6124 2004-07-25 Bernardo Innocenti <bernie@develer.com>
6126 * decl.c: Rename all identifiers named `class' to `cl'.
6128 2004-07-25 Richard Henderson <rth@redhat.com>
6130 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
6132 2004-07-23 Mike Stump <mrs@apple.com>
6134 * boehm.c (set_bit): Improve type safety wrt unsignedness.
6135 * gjavah.c (throwable_p, decode_signature_piece,
6136 print_full_cxx_name, print_include, add_namelet, add_class_decl,
6137 process_file): Likewise.
6138 * jcf-dump.c (main): Likewise.
6139 * jcf-io.c (read_zip_member): Likewise.
6140 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
6141 give_name_to_class, get_class_constant): Likewise.
6142 * jcf-write.c (find_constant_wide, push_long_const,
6143 generate_classfile): Likewise.
6144 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
6145 * parse.y (read_import_dir): Likewise.
6146 * typeck.c (parse_signature_type): Likewise.
6147 * verify.c (verify_jvm_instructions): Likewise.
6148 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
6150 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
6152 * Make-lang.in: Replace rmic and rmiregistry references with
6153 grmic and grmiregistry.
6154 * gcj.texi: Likewise.
6156 2004-07-20 Andrew Haley <aph@redhat.com>
6159 * verify.c (verify_jvm_instructions): Comment change only.
6161 * typeck.c (build_java_array_type): Add size field to array name.
6163 * java-tree.h (LOCAL_SLOT_P): New.
6164 (update_aliases): Add PC argument.
6165 (pushdecl_function_level): New function.
6167 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
6168 MODIFY_EXPR, and SAVE_EXPR.
6169 (java_gimplify_modify_expr): New function.
6171 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
6172 (expand_iinc): Pass PC to update_aliases().
6173 (STORE_INTERNAL): Likewise.
6174 (process_jvm_instruction): Likewise.
6176 * decl.c (base_decl_map): New variable.
6177 (uniq): New variable.
6178 (update_aliases): Rewrite with more thorough checking.
6179 (debug_variable_p): New function.
6180 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
6181 (check_local_named_variable): Delete whole function.
6182 (initialize_local_variable): New function.
6183 (check_local_unnamed_variable): Add checks and comments.
6184 (find_local_variable): Rewrite.
6185 (java_replace_reference): New function.
6186 (function_binding_level): New variable.
6187 (pushdecl_function_level): New function.
6188 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
6189 (maybe_pushlevels): Call pushdecl() on each of the new decls.
6190 (start_java_method): Reset uniq. Create base_decl_map. Set
6191 function_binding_level.
6192 (end_java_method): Null unused fields to save memory.
6194 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
6196 * class.c (add_interface_do): Remove.
6197 (set_super_info, interface_of_p, maybe_add_interface,
6198 add_interface, make_class_data, layout_class,
6199 add_miranda_methods): Adjust BINFO accessors and addition.
6200 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
6202 * jcf-write.c (generate_classfile): Likewise.
6203 * parse.y (patch_anonymous_class, check_inner_circular_reference,
6204 check_circular_reference, java_complete_class,
6205 check_abstract_method_definitions,
6206 java_check_abstract_method_definitions,
6207 check_interface_throws_clauses, java_check_abstract_methods,
6208 lookup_java_interface_method2,
6209 find_applicable_accessible_methods_list): Adjust BINFO accessors
6211 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
6213 2004-07-18 Roger Sayle <roger@eyesopen.com>
6215 * builtins.c (max_builtin, min_builtin,
6216 java_build_function_call_expr): Replace calls to build with buildN.
6217 * class.c (build_class_ref, build_static_field_ref,
6218 get_dispatch_table, make_class_data, layout_class_method): Likewise.
6219 * constants.c (build_ref_from_constant_pool): Likewise.
6220 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
6221 add_stmt_to_compound): Likewise.
6222 * except.c (build_exception_object_ref, expand_end_java_handler):
6224 * java-gimplify.c (java_gimplify_case_expr,
6225 java_gimplify_default_expr, java_gimplify_block,
6226 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
6227 * jcf-write.c (generate_bytecode_insns): Likewise.
6228 * typeck.c (convert_ieee_real_to_integer): Likewise.
6230 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
6232 * java-tree.h (builtin_function): Declare.
6234 2004-07-16 Steven Bosscher <stevenb@suse.de>
6236 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
6237 abuse restore_line_number_status.
6239 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
6242 * jcf-parse.c (java_emit_static_constructor): Specify default
6245 2004-07-13 Per Bothner <per@bothner.com>
6247 * java-tree.h (all_class_filename): Remove useless macro.
6248 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
6249 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
6250 * parse.y (java_parser_context_restore_global): Replace
6251 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
6252 * jcf-parse.c (read_class, java_parse_file): Likewise.
6254 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
6257 gjavah.c (print_field_info): Emit constant only if field is static.
6259 2004-07-11 Roger Sayle <roger@eyesopen.com>
6261 * expr.c (java_truthvalue_conversion, flush_quick_stack,
6262 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
6263 build_java_ret, build_java_throw_out_of_bounds_exception,
6264 build_java_array_length_access, java_check_reference,
6265 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
6266 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
6267 expand_java_arrayload, build_java_monitor, expand_java_return,
6268 expand_load_internal, expand_java_NEW, build_get_class,
6269 build_instanceof, expand_java_CHECKCAST, expand_iinc,
6270 build_java_soft_divmod, build_java_binop, build_field_ref,
6271 expand_compare, expand_java_goto, expand_java_switch,
6272 expand_java_add_case, build_class_init, build_known_method_ref,
6273 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
6274 expand_invoke, build_jni_stub, expand_java_field_op,
6275 java_expand_expr, expand_byte_code, STORE_INTERNAL,
6276 force_evaluation_order, emit_init_test_initialization): Convert
6277 calls to "build" into calls to the prefered "buildN" functions.
6279 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
6281 * java-tree.h (set_block): Remove.
6282 * lang.c (java_clear_binding_stack): New.
6283 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
6284 * decl.c (struct binding_level): Remove this_block.
6285 (clear_binding_level): Likewise.
6286 (poplevel): Don't handle this_block.
6287 (set_block): Remove.
6289 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
6291 * class.c (common_enclosing_context_p): Remove statement with no
6294 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
6297 * parse.y (create_anonymous_class): Remove 'location' argument. Use
6298 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
6299 (craft_constructor): Inherit access flags for implicit constructor
6300 from the enclosing class.
6301 (create_class): Fix comment typo.
6302 (resolve_qualified_expression_name): Pass type of qualifier to
6303 not_accessible_p, not the type in which target field was found.
6304 (not_accessible_p): Handle inner classes. Expand protected
6305 qualifier-subtype check to enclosing instances, but don't apply this
6306 check to static members. Allow protected access to inner classes
6307 of a subtype. Allow private access within common enclosing context.
6308 (build_super_invocation): Get WFL line number info from current
6310 (build_incomplete_class_ref): Update for new create_anonymous_class
6312 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
6313 common_enclosing_instance_p.
6314 * class.c (common_enclosing_context_p): New. Determine if types
6315 share a common enclosing context, even across static contexts.
6316 (common_enclosing_instance_p): Renamed from
6317 common_enclosing_context_p. Determines if types share a common
6318 non-static enclosing instance.
6319 * java-tree.h (common_enclosing_instance_p): Declare.
6320 * jcf-write.c (get_method_access_flags): New. Surpress private flag
6321 for inner class constructors.
6322 (generate_classfile): Use get_method_access_flags.
6324 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
6326 * class.c (interface_of_p): Check for null TYPE_BINFO.
6328 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
6330 * class.c (make_class): Do not create binfo here.
6331 (set_super_info): Create it here.
6332 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
6334 2004-07-08 Richard Henderson <rth@redhat.com>
6336 * expr.c (case_identity, get_primitive_array_vtable,
6337 java_expand_expr, emit_init_test_initialization): Remove.
6338 * java-tree.h (java_expand_expr): Remove.
6339 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
6341 2004-07-07 Per Bothner <per@bothner.com>
6343 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
6344 get internal error due to mismatched types.
6346 * gcj.texi (Invoking gij): Document new -verbose:class flag.
6348 * gcj.texi (Linking): New node. Document -lgij usage.
6350 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
6352 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
6353 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
6354 * java/class.c (set_super_info, class_depth, interface_of_p,
6355 maybe_add_interface, add_interface, make_class_data,
6356 layout_class, add_miranda_methods): Adjust BINFO macros.
6357 * expr.c (can_widen_reference_to, lookup_field): Likewise.
6358 * jcf-write.c (generate_classfile): Likewise.
6359 * parse.y (patch_anonymous_class,
6360 check_inner_circular_reference, check_circular_reference,
6361 java_complete_class, check_abstract_method_definitions,
6362 java_check_abstract_method_definitions,
6363 check_interface_throws_clauses, java_check_abstract_methods,
6364 lookup_java_interface_method2,
6365 find_applicable_accessible_methods_list): Likewise.
6366 * typeck.c (find_method_in_interface): Likewise.
6367 * verify.c (merge_types): Likewise.
6369 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
6371 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
6372 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
6374 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
6376 * class.c (make_class): Use make_tree_binfo.
6377 (set_super_info, add_interface_do): Likewise.
6378 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
6380 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6382 * verify.c: Correct array element access formatting thinko.
6384 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6386 * verify.c: Insert a short blurb at the start referring to the JVMS.
6387 (merge_type_state): Remove redundant nested if statement.
6388 (verify_jvm_instructions): Ensure current_subr is initialised to
6390 Minor formatting fixes all over the place.
6392 2004-07-02 Richard Henderson <rth@redhat.com>
6394 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
6396 2004-07-01 Richard Henderson <rth@redhat.com>
6398 * class.c (registerClass_libfunc): Remove.
6399 (init_class_processing): Don't set it.
6400 (emit_register_classes): Take list_p parameter. Fill it in
6401 with _Jv_RegisterClass calls.
6402 * decl.c (java_init_decl_processing): Don't call
6403 init_resource_processing.
6404 * jcf-parse.c (java_emit_static_constructor): New.
6405 (java_parse_file): Call it.
6406 * resource.c (registerResource_libfunc): Remove.
6407 (init_resource_processing): Remove.
6408 (write_resource_constructor): Take list_p parameter. Fill it in
6409 with _Jv_RegisterResource calls.
6410 * java-tree.h: Update prototypes.
6412 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
6415 * class.c (layout_class_method): Do not override package-private
6416 method if its in a different package.
6417 (split_qualified_name): Move here from parse.y. Rename from
6418 breakdown_qualified. Add comment.
6419 (in_same_package): Move here from parse.y. Add comment.
6420 * java-tree.h (break_down_qualified, in_same_package): Declare.
6421 (in_same_package): Likewise.
6422 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
6425 2004-06-29 Andrew Haley <aph@redhat.com>
6427 * except.c (expand_start_java_handler): Push a new binding level.
6428 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
6429 register_exception_range() to register where we'll do it.
6430 (expand_end_java_handler): Remove old bogus code. Replace with
6431 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
6432 the top of the expression we're curently building.
6433 (maybe_end_try): Delete.
6434 * decl.c (binding_level.exception_range): New field.
6435 (clear_binding_level): Add field exception_range. Reformat.
6436 (poplevel): Call expand_end_java_handler().
6437 (poplevel): Call java_add_stmt only if functionbody is false.
6438 (maybe_poplevels): Don't call maybe_end_try() from here.
6439 (end_java_method): Clear no longer used trees in function decl.
6440 (register_exception_range): New function.
6441 * java-tree.h (register_exception_range, struct eh_range): Declare.
6443 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
6445 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
6447 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
6450 * expr.c (class_has_finalize_method): Fix method name indentation.
6451 (expand_java_call): Remove K&R style parameter declaration.
6452 (expand_invoke): Fix statement indentation.
6453 (expand_java_field_op): Likewise.
6454 * parse-scan.y: Fix typo.
6455 (reset_report): Fix method name indentation.
6456 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
6458 * verify.c (verify_jvm_instructions): Document parameters, insert
6460 * lang.c (lang_init_source): Fix method name indentation.
6461 * class.c (common_enclosing_context_p): Likewise.
6462 (emit_symbol_table): Fix parameter list indentation.
6463 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
6464 parameter declaration.
6465 * constants.c: Fix copyright notice indentation.
6466 * typeck.c (find_method_in_superclasses): Fix parameter list
6468 (find_method_in_interfaces): Likewise.
6469 * zextract.c (makelong): Fix method name indentation.
6471 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6474 * parse.y (create_interface): Set correct access modifiers for
6476 * jcf-write.c (get_classfile_modifiers): New function.
6477 (generate_classfile): Use get_classfile_modifiers, not
6480 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6482 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
6483 dependency to current parser context, not NULL_TREE, for top-level
6485 (jdep_resolve_class): Enable member access check for all inner
6488 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6490 * parse.y (qualify_and_find): Pass type decl, not identifier, to
6493 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6496 * expr.c (expand_java_field_op): Ensure that target class for static
6497 field access has been loaded.
6499 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6500 Ranjit Mathew <rmathew@hotmail.com>
6502 PR java/1207, java/16178
6503 * jcf-parse.c (load_class): Return immediately if passed a type decl
6504 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
6505 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
6506 before calling load_class.
6507 (qualify_and_find): Likewise.
6508 (find_in_imports_on_demand): Likewise.
6509 (find_applicable_accessible_methods_list): Likewise.
6511 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
6513 * parse.y (java_layout_seen_class_methods): Don't call load_class
6514 on class defined by source parser.
6516 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
6518 * parse.y (set_nested_class_simple_name_value): Removed.
6519 (java_complete_expand_class): Remove calls to
6520 set_nested_class_simple_name_value.
6522 2004-06-22 Andrew Haley <aph@redhat.com>
6523 Ranjit Mathew <rmathew@hotmail.com>
6525 Fixes PR java/16113.
6526 * decl.c (force_poplevels): Remove call to expand_end_bindings.
6528 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
6530 * parse.y (create_class): Correct diagnostic message about
6531 java.lang.Object extending anything else.
6533 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6535 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
6536 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
6537 * constants.c (build_ref_from_constant_pool): Likewise.
6538 * expr.c (build_java_array_length_access): Likewise.
6539 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
6540 (invoke_build_dtable, build_invokevirtual): Likewise.
6541 (build_invokeinterface, java_expand_expr): Likewise.
6542 (emit_init_test_initialization): Likewise.
6543 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6544 * parse.y (make_qualifed_name, build_array_ref): Likewise.
6546 2004-06-21 Andrew Haley <aph@redhat.com>
6548 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
6551 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
6553 * jcf.h (struct JCF): Change java_source, right_zip and finished
6555 * lex.h (struct java_lexer): Change hit_eof, read_anything,
6556 byte_swap and use_fallback to unsigned int.
6557 * parse.h (struct _jdep): Change flag0 to unsigned int.
6559 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
6562 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
6563 before trying to lay out its methods.
6564 * jcf-parse.c (read_class): Track parsed files using canonical paths
6565 obtained via lrealpath from libiberty.
6566 (java_parse_file): Likewise.
6567 (parse_source_file_1): Rename formal parameter to reflect its
6568 modified purpose. Minor formatting fix.
6570 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
6572 * class.c (emit_register_classes): Make the function uninlinable,
6573 do not set current_function_cannot_inline.
6574 * resource.c (write_resource_constructor): Do not reset
6575 flag_inline_functions around rest_of_compilation.
6577 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
6580 * expr.c (java_truthvalue_conversion): Handle
6581 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
6582 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
6583 i.e. return the expression.
6585 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
6587 * gjavah.c: Include version.h
6589 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
6591 * jcf-write.c (generate_bytecode_conditional): Correct handling
6592 of unordered conditionals. Add comment.
6594 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
6595 Per Bothner <per@bothner.com>
6597 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
6598 local variable was initialised upon declaration.
6599 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
6600 variable was final and initialised upon declaration.
6601 * check-init.c (check_final_reassigned): Give error only if a blank
6602 final is not definitely unassigned or if an initialised final is
6604 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
6605 assignment expressions. Remove case MODIFY_EXPR, label do_default.
6606 (check_init): Perform initialised-variable-removing-optimisation
6607 only on non-final local variables.
6609 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6611 * jcf-write.c (generate_bytecode_conditional): Handle binops
6612 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
6614 (generate_bytecode_insns): Likewise.
6616 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6618 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
6619 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
6621 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6623 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6624 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6626 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6628 * decl.c (struct binding_level): Add GTY marker. Compile
6629 binding_depth unconditionally.
6630 (current_binding_level, free_binding_level, global_binding_level):
6632 (clear_binding_level): Unconditionally set binding_depth.
6633 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6635 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6637 * lex.c (java_new_lexer): Set 'encoding'.
6638 (java_read_char): Improve error message for unrecognized characters.
6639 * lex.h (struct java_lexer): New field 'encoding'.
6641 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6643 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6645 2004-05-21 Mark Wielaard <mark@klomp.org>
6647 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6650 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
6652 * typeck.c: Remove non-printable character 160.
6654 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
6656 * check-init.c: Correct minor typos.
6658 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6660 * Make-lang.in, expr.c, java-gimplify.c: Rename
6661 tree-simple.[ch] to tree-gimple.[ch].
6663 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
6665 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6667 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6669 Merge from tree-ssa-20020619-branch. See
6670 ChangeLog.tree-ssa for details.
6672 * Make-lang.in, builtins.c, check-init.c, class.c,
6673 constants.c, decl.c, except.c, expr.c, java-except.h,
6674 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6675 lang.c, lang.opt, parse.y, resource.c: Merged.
6676 * java-gimplify.c: New file.
6678 2004-05-10 Andrew Haley <aph@redhat.com>
6680 * parse.y (create_class): Set TYPE_VFIELD.
6681 * decl.c (java_init_decl_processing): Likewise.
6683 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6684 * class.c (make_method_value): Replace DECL_VINDEX with call to
6686 (get_dispatch_vector): Likewise.
6687 (layout_class_method): Likewise.
6688 Replace set of DECL_VINDEX with call to set_method_index().
6689 (set_method_index): New function.
6690 (get_method_index): New function.
6691 * java-tree.h (set_method_index): New function decl.
6692 (get_method_index): New function decl.
6694 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
6696 * parse.y (check_pkg_class_access): Add new argument
6697 and use it when cl is NULL to call lookup_cl on it.
6698 (parser_check_super_interface): Do not call lookup_cl.
6699 Pass this_decl to check_pkg_class_access and NULL
6700 instead of lookup_cl.
6701 (parser_check_super): Update for change in
6702 check_pkg_class_access.
6703 (do_resolve_class): Likewise.
6704 (process_imports): Likewise.
6705 (find_in_imports_on_demand): Likewise.
6706 (resolve_qualified_expression_name): Likewise.
6708 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
6710 Fixes PR java/9685, PR java/15073
6711 * parse.y (accessibility_string): New method.
6712 (not_accessible_field_error): Use accessibility_string()
6713 instead of java_accstring_lookup().
6714 (resolve_qualified_expression_name): Check with
6715 check_pkg_class_access() before allowing access using
6718 Use check_pkg_class_access() instead of not_accessible_p()
6719 for unqualified types.
6720 (not_accessible_p): Use DECL_CONTEXT (member) instead of
6721 REFERENCE for package-private access checking.
6722 (patch_method_invocation): Use accessibility_string() instead
6723 of java_accstring_lookup().
6725 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
6728 * gjavah.c (struct method_name): Add member is_native.
6729 (overloaded_jni_method_exists_p): Match candidate method only if
6731 (print_method_info): Initialise is_native flag from the method's
6734 2004-04-30 Roger Sayle <roger@eyesopen.com>
6736 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6737 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6739 2004-04-22 Roger Sayle <roger@eyesopen.com>
6741 * resource.c (write_resource_constructor): Guard call to possibly
6742 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6744 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
6746 * class.c (make_class_data): Add new field aux_info.
6747 * decl.c (java_init_decl_processing): Push type and decl for
6750 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6752 * expr.c (expand_java_NEW): Don't use size argument for
6753 _Jv_AllocObject calls.
6754 * parse.y (patch_invoke): Likewise.
6756 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6758 * expr.c (build_invokeinterface): Remove unused variables to
6761 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6763 * class.c (get_interface_method_index): New function. Return dispatch
6764 index for interface method.
6765 (make_method_value): For interface methods, set index field to
6766 iface dispatch index, not DECL_VINDEX.
6767 * expr.c (build_invokeinterface): Use get_interface_method_index.
6769 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6771 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6773 2004-03-31 Andrew Haley <aph@redhat.com>
6776 * jcf-io.c (opendir_in_zip): Tidy up error handling.
6778 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6780 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6781 form of GTY markers.
6783 2004-03-25 Marcus Meissner <meissner@suse.de>
6786 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6788 2004-03-23 Tom Tromey <tromey@redhat.com>
6791 * jcf-write.c (make_class_file_name): Don't report if mkdir
6794 2004-03-23 Tom Tromey <tromey@redhat.com>
6796 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6798 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
6800 * class.c, gjavah.c, lang.c: Fix comment typos.
6801 * gcj.texi: Fix typos.
6803 2004-03-19 Per Bothner <per@bothner.com>
6805 * gcj.texi (Code Generation): Document new flags and assert defaults.
6807 * class.c (assume_compiled_node_struct): Rename type to
6808 class_flag_node_struct, as it is now also used for enable_assertions.
6809 Rename assume_compiled_node typedef. Rename excludep field to value.
6810 (find_assume_compiled_node): Rename function to find_class_flag_node.
6811 Minor optimization - avoid needless strlen.
6812 (add_assume_compiled): Some tweaking and optimization.
6813 Rename and generalize to add_class_flag takem an extra parameter.
6814 (add_assume_compled): New just calls add_class_flag.
6815 (add_enable_assert, enable_assertions): New functions.
6816 (enable_assert_tree): New static.
6817 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6818 * lang.opt (fenable-assertions, fenable-assertions=,
6819 fdisable-assertions, fdisable-assertions=): New options.
6820 * lang.c (java_handle_option): Handle new options.
6821 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
6822 class in an interface - create helper class nested in outer interface.
6823 (build_assertion): Short-circuit if enable_assertions is false.
6825 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6827 * java-tree.h: Changes throughout to add checking to macros
6828 and numerous whitespace changes.
6829 (VAR_OR_FIELD_CHECK): New macro.
6830 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6831 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6833 2004-03-16 Per Bothner <per@bothner.com>
6835 * jcf-jump.c (options): New --print-constants option.
6836 * gcj.texi (Invoking jcf-dump): Document --print-constants.
6838 * jcf-dump.c (flag_print_constant_pool): Default to off.
6839 (print_constant_terse_with_index): New helper function.
6840 (various places): Check flag_print_constant_pool where missing.
6841 (main): If verbose set flag_print_constant_pool.
6842 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
6844 2004-03-15 Andrew Haley <aph@redhat.com>
6847 * parse.y (java_complete_lhs): Check that final variable has an
6850 2004-03-12 Andrew Haley <aph@redhat.com>
6853 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6856 2004-02-29 Roger Sayle <roger@eyesopen.com>
6858 * jcf-parse.c (java_parse_file): Handle the case that input_filename
6861 2004-02-27 Per Bothner <per@bothner.com>
6863 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
6864 suggestion: Use build_incomplete_class_ref.
6865 This fixes PR java/13508, java/11714.
6867 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
6869 * java/parse.h: Update copyright.
6871 2004-02-26 Andrew Haley <aph@redhat.com>
6874 * parse.y (check_interface_throws_clauses): Check for
6875 !METHOD_INVISIBLE (iface_method).
6876 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6877 well as CLASS_ABSTRACT.
6879 2004-02-25 Per Bothner <per@bothner.com>
6881 * parse.y (build_assertion): If we're in an inner class, create the
6882 class$ helper routine in the outer class.
6884 2004-02-19 Richard Henderson <rth@redhat.com>
6886 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6888 2004-02-16 Geoffrey Keating <geoffk@apple.com>
6890 * Make-lang.in (java.install-man): Add extra dependencies.
6892 2004-02-13 Geoffrey Keating <geoffk@apple.com>
6894 * Make-lang.in: Install man pages under the same names
6895 (possibly transformed) as the program they document.
6897 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
6899 * gjavah.c: Include "intl.h".
6900 (error): New function.
6901 (main): Call gcc_init_libintl.
6902 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6903 print_stub_or_jni, process_file, main): Use error rather than
6905 (print_method_info, usage, help, version, main): Mark strings for
6906 translation with _. Avoid splitting up sentences. Send
6907 information messages to stdout.
6908 * jcf-dump.c: Include "intl.h".
6909 (main): Call gcc_init_libintl.
6910 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6911 Mark error, usage and version messages for translation with _.
6912 Avoid splitting up sentences.
6913 * jv-scan.c: Include "intl.h".
6914 (fatal_error, warning): Change parameter s to msgid. Translate
6916 (main): Call gcc_init_libintl.
6917 (usage, help, version): Mark error, usage and version messages for
6918 translation with _. Avoid splitting up sentences.
6919 * jvgenmain.c: Include "intl.h".
6920 (main): Call gcc_init_libintl.
6921 (usage, main): Mark error messages for translation with _.
6922 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6923 JVGENMAIN_OBJS): Add intl.o.
6924 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6925 java/jvgenmain.o): Update dependencies.
6927 2004-02-08 Per Bothner <per@bothner.com>
6929 * parse.y (resolve_qualified_expression_name): In case of inaccessible
6930 class don't use not_accessible_field_error, which can get confused.
6932 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6934 Make-lang.in (po-generated): Delete.
6936 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6938 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6940 * decl.c: Include target.h.
6941 (start_java_method): Replace PROMOTE_PROTOTYPES with
6942 targetm.calls.promote_prototypes.
6943 * expr.c: Include target.h.
6944 (pop_arguments): Replace PROMOTE_PROTOTYPES with
6945 targetm.calls.promote_prototypes.
6946 * parse.y: Include target.h.
6947 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6948 with targetm.calls.promote_prototypes.
6950 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6952 * typeck.c: Update copyright.
6954 2004-02-02 Tom Tromey <tromey@redhat.com>
6956 * decl.c (java_init_decl_processing): Remove duplicate
6959 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
6961 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6963 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
6965 * expr.c (build_field_ref): Move variable
6968 2004-01-28 Andrew Haley <aph@redhat.com>
6970 * expr.c (build_field_ref): Widen field offset.
6972 2004-01-27 Andrew Haley <aph@redhat.com>
6975 * parse.y (check_interface_throws_clauses): Make sure class_decl
6978 2004-01-22 Jeff Sturm <jsturm@one-point.com>
6981 * parse.y (patch_assignment): Don't modify lhs_type for
6982 reference assignments.
6984 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6986 * Make-lang.in: Replace $(docdir) with doc.
6987 (java.info, java.srcinfo, java.man, java.srcman): New rules.
6988 (java.install-man): Revamp rule.
6990 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6992 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6993 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6994 instead of deferred backquote.
6996 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
6998 * typeck.c (find_method_in_interfaces): Move variable
7001 2004-01-16 Andrew Haley <aph@redhat.com>
7004 * typeck.c (shallow_find_method): New.
7005 (find_method_in_superclasses): New.
7006 (find_method_in_interfaces): New.
7007 (lookup_do): Rewrite.
7008 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
7010 * jcf-parse.c (read_class): Save and restore output_class.
7011 * decl.c (java_expand_body): Set output_class from fndecl.
7013 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
7015 * class.c (gen_indirect_dispatch_tables): Fix string length
7018 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
7020 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
7021 (java.srcextra): Copy above back to source directory if requested.
7022 (po-generated): Delete reference to $(parsedir).
7023 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
7026 2004-01-14 Jan Hubicka <jh@suse.cz>
7028 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
7031 2004-01-09 Mark Mitchell <mark@codesourcery.com>
7033 * java-tree.h (java_expand_expr): Change prototype.
7034 * expr.c (java_expand_expr): Add alt_rtl parameter.
7036 2004-01-09 Andrew Haley <aph@redhat.com>
7039 * parse.y (java_fix_constructors): Set output_class.
7040 (java_reorder_fields): Likewise.
7041 (java_layout_classes): Likewise.
7042 (java_expand_classes): Generate indirect dispatch tables.
7043 (java_expand_classes): Set output_class.
7044 (java_finish_classes): Likewise.
7045 * lang.c (java_init): Turn on always_initialize_class_p if we're
7046 using indirect dis[atch.
7047 (java_decl_ok_for_sibcall): Use output_class, not current_class.
7048 (java_get_callee_fndecl): Use class local atable.
7050 (always_initialize_class_p): Decl moved to java-tree.h.
7051 (HANDLE_CLASS_INFO): Set output_class.
7052 (read_class): Likewise.
7053 (parse_class_file): Call gen_indirect_dispatch_tables.
7054 (parse_zip_file_entries): Set output_class.
7055 (java_parse_file): Set output_class. Don't emit symbol tables.
7056 * java-tree.h (output_class): New.
7057 Remove global declarations for otable, atable, and ctable.
7058 (always_initialize_class_p): moved here from decl.c.
7060 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
7061 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
7062 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
7063 (struct lang_type): Add otable_methods, otable_decl,
7064 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
7065 ctable_decl, catch_classes, type_to_runtime_map.
7066 * expr.c (build_field_ref): Make otable, atable, and ctable class
7067 local rather than global.
7068 (build_known_method_ref): Likewise.
7069 (build_invokeinterface): Likewise.
7070 (java_expand_expr): Pass runtime type (rather than actual type) to
7072 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
7073 this class. Look up each class in that map to delete duplicates.
7074 (expand_end_java_handler): Pass runtime type (rather than actual
7075 type) to expand_start_catch.
7076 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
7078 (java_init_decl_processing): Rearrange things. Remove global
7079 declarations of otable, atable, and ctable.
7080 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
7081 (java_expand_body): Set output_class.
7082 * constants.c (build_constant_data_ref): Use output_class, not
7084 (alloc_name_constant): Likewise.
7085 * class.c (gen_indirect_dispatch_tables): New.
7086 (build_class_ref): Generate hard reference to superclass, even if
7087 using indirect dispatch.
7088 (build_static_field_ref): Use class local atable.
7089 (make_class_data): Generate hard reference to superclass, even if
7090 using indirect dispatch.
7091 Generate symbolic references to interfaces when using indirect
7093 (make_class_data): Emit otable, atable, and ctable.
7094 Make otable, atable, and ctable class local rather than global.
7095 (emit_catch_table): Make otable, atable, and ctable class local
7098 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
7100 * parse.y (catch_clause_parameter): Fix typo.
7103 * parse.y: (catch_clause_parameter): Return early if $3, aka
7104 formal_parameter, is null.
7106 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
7108 * class.c: Remove uses of "register" specifier in
7109 declarations of arguments and local variables.
7112 * gjavah.c: Likewise.
7113 * jcf-dump.c: Likewise.
7114 * jcf-io.c: Likewise.
7115 * jcf-parse.c: Likewise.
7116 * jcf-write.c: Likewise.
7117 * keyword.h: Likewise.
7118 * parse.y: Likewise.
7119 * typeck.c: Likewise.
7120 * verify.c: Likewise.
7122 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
7124 * Make-lang.in (GCJ_CROSS_NAME): Delete.
7125 (java.install_common, java.install-man): Adjust for above.
7126 (java.uninstall): Likewise.
7128 2003-12-03 Michael Koch <konqueror@gmx.de>
7130 * class.c (make_class_data):
7131 Push field value to 'hack_signers' instead of 'signers'.
7132 * decl.c (java_init_decl_processing):
7133 Push field 'hack_signers' instead of 'signers'.
7135 2003-12-03 Zack Weinberg <zack@codesourcery.com>
7137 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
7140 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
7143 * parse.y (qualify_ambiguous_name): Remove lots of broken
7144 field access processing - there's no need to do that here,
7145 because we have resolve_field_access. Remove
7146 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
7147 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
7150 2003-12-01 Jeff Sturm <jsturm@one-point.com>
7153 * parse.y (java_complete_lhs): Save location prior to patching
7156 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
7159 * resource.c (write_resource_constructor): Append
7160 "_resource" to constructor identifier name.
7162 2003-11-25 Jeff Sturm <jsturm@one-point.com>
7165 * constants.c (cpool_for_class): New function.
7166 (outgoing_cpool): Remove global variable.
7167 (alloc_name_constant): Use cpool_for_class.
7168 (build_constants_constructor): Likewise.
7169 * decl.c (java_expand_body): Set current_class.
7170 * java-tree.h (outgoing_cpool) Remove declaration.
7171 (init_outgoing_cpool): Likewise.
7172 * jcf-parse.c (init_outgoing_cpool): Remove function.
7173 (parse_class_file): Don't call init_outgoing_cpool.
7174 * parse.y (java_complete_expand_methods): Don't call
7175 init_outgoing_cpool. Don't save outgoing_cpool.
7176 (java_expand_classes): Don't restore outgoing_cpool.
7177 (java_finish_classes): Likewise.
7179 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
7181 * Make-lang.in: (java.install-common) Add
7182 symlink for $(target_noncanonical)-gcjh for
7185 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
7187 * Make-lang.in (java.extraclean): Delete.
7189 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
7191 * Make-lang.in (check-java): Add.
7193 2003-11-19 Jeff Sturm <jsturm@one-point.com>
7196 * except.c (prepare_eh_table_type): Allocate variable-sized
7197 buffer `buf' with alloca.
7199 2003-11-17 Jeff Sturm <jsturm@one-point.com>
7203 decl.c (java_init_decl_processing): Don't initialize
7204 class_not_found_type_node, no_class_def_found_type_node.
7206 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
7207 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
7208 (class_not_found_type_node, no_class_def_found_type_node):
7211 parse.y (build_dot_class_method_invocation): Add this_class
7212 argument. Qualify method invocations to a different class.
7213 (create_new_parser_context): Initialize saved_data_ctx to 0.
7214 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
7215 (build_dot_class_method): Don't load classes. Register
7217 (build_incomplete_class_ref): Special cases for interfaces
7218 and inner classes. Move build_dot_class_method call to here...
7219 (patch_incomplete_class_ref): ...from here. Pass current_class
7220 to build_dot_class_method_invocation.
7221 (build_assertion): Pass class_type to
7222 build_dot_class_method_invocation.
7223 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
7225 2003-11-17 Jeff Sturm <jsturm@one-point.com>
7228 * java-tree.h (BLOCK_EMPTY_P): Define.
7229 * parse.y (java_complete_lhs): Check for empty blocks
7230 in TRY_FINALLY_EXPR case.
7232 2003-11-17 Andrew Haley <aph@redhat.com>
7234 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
7235 (struct lang_decl_var:freed): New variable.
7236 * decl.c (poplevel): Mark local vars that have gone out of scope.
7237 (push_jvm_slot): Don't use the RTL of a var that has gone out of
7240 2003-11-16 Jason Merrill <jason@redhat.com>
7242 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
7243 and TAGS files that include them for each front end.
7245 2003-11-15 Tom Tromey <tromey@redhat.com>
7247 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
7249 2003-11-12 Jason Merrill <jason@redhat.com>
7251 PR optimization/12547
7252 * lang.c (java_tree_inlining_walk_subtrees): Just walk
7253 BLOCK_EXPR_BODY directly.
7255 2003-11-12 Andrew Haley <aph@redhat.com>
7258 * parse.y (fold_constant_for_init): Check that we really do have a
7262 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
7263 init_test_decls being inlined.
7266 * parse.y (do_resolve_class): Check return value from
7267 breakdown_qualified().
7269 2003-11-11 Tom Tromey <tromey@redhat.com>
7272 * parse.y (merge_string_cste): Handle case where we have a
7273 pointer that happens to be zero, not null_pointer_node.
7275 2003-11-10 Tom Tromey <tromey@redhat.com>
7277 * jcf-parse.c (classify_zip_file): Correctly compare
7278 filename_length against length of manifest file's name.
7280 2003-11-08 Tom Tromey <tromey@redhat.com>
7283 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
7285 2003-11-06 Andrew Haley <aph@redhat.com>
7287 * expr.c (java_stack_swap): Make sure destination stack slots are
7288 of the correct type.
7290 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
7292 * Make-lang.in (dvi): Move targets to $(docobjdir).
7293 (gcj.dvi): Simplify rule and adjust target.
7294 (gcj.info): Simplify rule.
7295 (gcj.pod): New intermediate rule.
7296 (gcjh.pod): Likewise.
7297 (jv-scan.pod): Likewise.
7298 (jcf-dump.pod): Likewise.
7299 (gij.pod): Likewise.
7300 (jv-convert.pod): Likewise.
7301 (rmic.pod): Likewise.
7302 (rmiregistry.pod): Likewise.
7305 (jv-scan.1): Delete.
7306 (jcf-dump.1): Delete.
7308 (jv-convert.1): Delete.
7310 (rmiregistry.1): Delete.
7312 2003-11-02 Jeff Sturm <jsturm@one-point.com>
7314 Fixes PR java/12866.
7315 * parse.y (resolve_qualified_expression_name): Move test
7316 for outer field access methods from here...
7317 (check_thrown_exceptions) ...to here.
7319 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
7321 * .cvsignore: Delete.
7323 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
7325 * verify.c (verify_jvm_instructions): Don't warn about legal
7326 eh binding regions generated for example by jdk 1.4.1.
7328 2003-10-24 David S. Miller <davem@redhat.com>
7330 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
7332 2003-10-22 Andrew Haley <aph@redhat.com>
7334 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
7335 (java_get_callee_fndecl): New.
7337 * jcf-parse.c (java_parse_file): Call emit_catch_table().
7339 * java-tree.h (ctable_decl): New.
7340 (catch_classes): New.
7341 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
7343 * decl.c (java_init_decl_processing): Add catch_class_type.
7345 Add catch_classes field.
7347 * class.c (build_indirect_class_ref): Break out from
7349 (make_field_value): Check flag_indirect_dispatch.
7350 (make_class_data): Ditto.
7351 Tidy uses of PUSH_FIELD_VALUE.
7352 Add field catch_classes.
7353 (make_catch_class_record): New.
7355 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
7357 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7359 * jcf-write.c: Follow spelling conventions.
7360 * parse.y: Likewise.
7362 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7364 * ChangeLog: Fix typos.
7365 * expr.c: Fix comment typos.
7366 * jcf-write.c: Likewise.
7369 * mangle.c: Likewise.
7370 * parse-scan.y: Likewise.
7371 * parse.y: Likewise.
7373 2003-10-22 Tom Tromey <tromey@redhat.com>
7375 * expr.c (expand_byte_code): Only warn about dead bytecode when
7376 extra_warnings is set.
7378 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
7380 Fix for PR java/12586.
7381 * mangle.c (find_compression_record_match): Don't iterate through
7382 package namespace elements unless they all match compression_table
7385 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
7387 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
7388 (generate-manpages): Likewise.
7389 (java.maintainer-clean): Likewise.
7390 (gcj.info): Likewise.
7393 (jv-scan.1): Likewise.
7394 (jcf-dump.1): Likewise.
7396 (jv-convert.1): Likewise.
7398 (rmiregistry.1): Likewise.
7399 (java.install-man): Likewise.
7400 (parse-scan.o): Move and define complete compile line.
7401 (parse.o): Likewise.
7402 (jcf-tree-inline.o): Move.
7404 2003-10-20 Mark Mitchell <mark@codesourcery.com>
7406 * Make-lang.in (info): Update dependencies.
7407 (java.install-info): Remove.
7408 ($(srcdir)/java/gcj.info): Replace with ...
7409 ($(docobjdir)/gcj.info): ... this.
7411 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
7413 * Make-lang.in: Replace uses of $(target_alias) with
7414 $(target_noncanonical).
7416 2003-10-09 Tom Tromey <tromey@redhat.com>
7418 * decl.c (java_init_decl_processing): Declare signers field.
7419 * class.c (make_class_data): Set signers field.
7421 2003-10-09 Jason Merrill <jason@redhat.com>
7423 * parse.y (patch_assignment): Use make_node to create a BLOCK.
7424 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
7427 2003-10-06 Mark Mitchell <mark@codesourcery.com>
7429 * Make-lang.in (java.info): Replace with ...
7431 (java.dvi): Replace with ...
7433 (java.generated-manpages): Replace with ...
7435 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
7437 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
7439 2003-10-01 Andrew Haley <aph@redhat.com>
7441 * jcf-parse.c (java_parse_file): Write otable and atable.
7442 * java-tree.h (atable_methods): New.
7444 (atable_syms_decl): New.
7445 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
7446 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
7447 (symbol_*type): Rename method_symbol* to symbol*type.
7448 (emit_offset_symbol_table): Delete.
7449 (emit_symbol_table): New.
7450 (get_symbol_table_index): New.
7452 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
7453 (build_known_method_ref): Likewise.
7454 (get_symbol_table_index): Rename from get_offset_table_index.
7455 Parameterize to allow re-use by differing types of symbol table.
7456 (build_invokevirtual): Pass table to get_offset_table_index.
7457 * decl.c (java_init_decl_processing): Push types and decls for
7458 atable and atable_syyms.
7459 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
7460 (make_class_data): Add new fields atable and atable_syms.
7461 (emit_symbol_table): Rename from emit_offset_symbol_table.
7462 Parameterize to allow re-use by different types of symbol table.
7463 (build_symbol_entry): Renamed from build_method_symbols_entry.
7465 2003-09-30 Roger Sayle <roger@eyesopen.com>
7467 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
7468 semantics for SAVE_EXPR, by caching the result in a temporary.
7470 2003-09-28 Richard Henderson <rth@redhat.com>
7472 * check-init.c (check_init): Save and restore input_location
7473 instead of file and line separately.
7474 * decl.c (java_expand_body): Likewise.
7475 * jcf-write.c (generate_bytecode_insns): Likewise.
7476 * parse.y (safe_layout_class): Likewise.
7477 * jcf-parse.c (read_class, parse_class_file): Likewise.
7478 (java_parse_file): Use %H for warning locator.
7480 2003-09-28 Roger Sayle <roger@eyesopen.com>
7482 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
7483 with void-type branches instead of using a COMPOUND_EXPR.
7485 2003-09-28 Jeff Sturm <jsturm@one-point.com>
7487 * decl.c (java_optimize_inline, dump_function): Remove.
7488 * java-tree.h (java_optimize_inline): Remove declaration.
7489 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
7490 * parse.y (source_end_java_method, java_expand_classes):
7491 Likewise. Remove dead code.
7493 2003-09-27 Roger Sayle <roger@eyesopen.com>
7495 * lang.c (java_init_options): Set flag_evaluation_order.
7496 * expr.c (force_evaluation_order): Don't attempt to force
7497 evaluation order of binary operations using save_expr.
7498 * parse.y (java_complete_lhs): No longer need to call
7499 force_evaluation_order when constructing binary operators.
7501 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
7502 Bryce McKinlay <bryce@mckinlay.net.nz>
7505 * parse.y (not_accessible_field_error): New function.
7506 (resolve_expression_name): Check field access permissions.
7507 (resolve_qualified_expression_name): Use
7508 not_accessible_field_error.
7509 (resolve_qualified_expression_name): Likewise.
7511 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7513 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
7515 2003-09-23 Roger Sayle <roger@eyesopen.com>
7517 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
7518 with equal operands without side-effects.
7520 2003-09-22 Jeff Sturm <jsturm@one-point.com>
7522 * decl.c (java_init_decl_processing): Don't emit otable decls
7523 if flag_indirect_dispatch is not set.
7525 2003-09-21 Richard Henderson <rth@redhat.com>
7527 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7530 2003-09-21 Richard Henderson <rth@redhat.com>
7532 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7533 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
7535 2003-09-20 Richard Henderson <rth@redhat.com>
7537 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
7539 2003-09-18 Roger Sayle <roger@eyesopen.com>
7541 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
7542 * check-init.c (check_init): Likewise.
7544 2003-09-18 Roger Sayle <roger@eyesopen.com>
7546 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
7548 2003-09-16 Andrew Haley <aph@redhat.com>
7550 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
7552 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
7555 * mangle.c (find_compression_record_match): Skip
7556 over a "6JArray" (the array template mangled string)
7558 (mangle_array_type): Correct minor typo.
7559 (atms): Move definition to the beginning.
7561 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
7563 * class.c (add_miranda_methods): Ensure super-interfaces are laid
7564 out. Fix for PR java/12254.
7566 2003-09-11 Richard Henderson <rth@redhat.com>
7568 * parse.y (source_end_java_method): Update for new
7569 cgraph_finalize_function argument.
7571 2003-09-09 Richard Henderson <rth@redhat.com>
7573 * parse.y (source_end_java_method): Update call to
7574 cgraph_finalize_function.
7576 2003-09-03 Jeff Sturm <jsturm@one-point.com>
7578 * decl.c (java_expand_body): New function.
7579 * expr.c (build_class_init): Set DECL_IGNORED_P.
7580 * java-tree.h (start_complete_expand_method,
7581 java_expand_body): Declare.
7582 * jcf-parse.c (cgraph.h): Include.
7583 (java_parse_file): Handle flag_unit_at_a_time.
7584 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
7585 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
7586 (java_estimate_num_insns): Use walk_tree_without_duplicates.
7587 (java_start_inlining): New function.
7588 * parse.h (java_finish_classes): Declare.
7589 * parse.y: Include cgraph.h.
7590 (block): Don't special-case empty block production.
7591 (craft_constructor): Set DECL_INLINE.
7592 (source_end_java_method): Handle flag_unit_at_a_time.
7593 Replace inline code with call to java_expand_body.
7594 (start_complete_expand_method): Remove static modifier.
7595 (java_expand_method_bodies): Patch function tree for
7596 class initialization and/or synchronization as needed.
7597 Don't begin RTL expansion yet.
7598 (java_expand_classes): Check flag_unit_at_a_time before
7599 calling finish_class.
7600 (java_finish_classes): New function.
7601 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
7602 (patch_assignment): Set DECL_CONTEXT on temporary variable.
7603 (emit_test_initialization): Set DECL_IGNORED_P.
7605 2003-09-03 Roger Sayle <roger@eyesopen.com>
7607 * builtins.c (enum builtin_type): Delete unused enumeration.
7608 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
7610 2003-08-28 Tom Tromey <tromey@redhat.com>
7612 * gcj.texi (Extensions): Document gcjlib URLs.
7614 2003-08-20 Tom Tromey <tromey@redhat.com>
7616 * gcj.texi (Extensions): Added xref.
7617 (libgcj Runtime Properties): Document
7618 gnu.gcj.runtime.VMClassLoader.library_control.
7620 2003-08-20 Andrew Haley <aph@redhat.com>
7622 * except.c (prepare_eh_table_type): Use new encoding for exception
7623 handlers when using -fno-assume-compiled.
7625 2003-08-13 Tom Tromey <tromey@redhat.com>
7627 * gcj.texi (Invoking gij): Document -X and -?.
7629 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
7631 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7632 GCJH_OBJS, JCFDUMP_OBJS
7633 * win32-host.c: Removed the unnecessary and broken dependency
7636 2003-08-11 Tom Tromey <tromey@redhat.com>
7638 * parse.y (java_check_regular_methods): Typo fixes. Call
7639 check_interface_throws_clauses. Use
7640 check_concrete_throws_clauses.
7641 (check_interface_throws_clauses): New function.
7642 (check_concrete_throws_clauses): New function.
7643 (hack_is_accessible_p): New function.
7644 (find_most_specific_methods_list): Added FIXME.
7645 * typeck.c (lookup_do): Use `flags' argument to decide what to
7647 (lookup_argument_method_generic): New function.
7648 (lookup_argument_method2): Removed.
7649 * jcf.h (ACC_INVISIBLE): New define.
7650 * jcf-write.c (generate_classfile): Skip invisible methods.
7651 * class.c (add_miranda_methods): New function.
7652 (layout_class_methods): Use it.
7653 (get_access_flags_from_decl): Use ACC_INVISIBLE.
7654 * java-tree.h (METHOD_INVISIBLE): New define.
7655 (lang_decl_func) [invisible]: New field.
7656 (lookup_argument_method_generic): Declare.
7657 (SEARCH_INTERFACE): New define.
7658 (SEARCH_SUPER): Likewise.
7659 (SEARCH_ONLY_INTERFACE): Likewise.
7660 (SEARCH_VISIBLE): Likewise.
7661 (lookup_argument_method2): Removed declaration.
7663 2003-08-05 Tom Tromey <tromey@redhat.com>
7665 Fix for PR java/11600:
7666 * parse.y (java_complete_lhs): See whether we're calling a method
7668 (check_thrown_exceptions): Added `is_array_call' argument;
7669 fixed `clone' checking; updated all callers.
7671 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
7673 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7675 2003-08-03 Tom Tromey <tromey@redhat.com>
7677 * java-tree.h (METHOD_TRANSIENT): Removed.
7678 * decl.c (pushdecl): Removed some dead code.
7679 * class.c (get_access_flags_from_decl): Can't have transient
7681 (add_method_1): Can't have a transient method.
7683 2003-07-28 Andreas Jaeger <aj@suse.de>
7685 * jvspec.c: Convert to ISO C90 prototypes.
7687 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
7689 * decl.c (force_poplevels): Fix warning call.
7691 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7693 * expr.c (expand_java_field_op): Don't use xxx_with_decl
7694 (expand_java_field_op): Likewise.
7695 * class.c (layout_class_method): Likewise
7696 (emit_register_classes): Likewise.
7697 * decl.c (pushdecl): Likewise.
7698 (poplevel): Likewise.
7699 (force_poplevels): Likewise.
7700 (give_name_to_locals): Likewise.
7701 * check-init.c (check_for_initialization): Likewise.
7703 2003-07-24 Jason Merrill <jason@redhat.com>
7705 * java-tree.h: Move boolean_type_node et al to the back end.
7707 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7709 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7712 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
7714 * lang.opt: Don't show -MD_ and -MDD_.
7716 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
7718 * lang-options.h: Remove.
7719 * lang.opt: Add help text.
7721 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
7723 * expr.c: Remove the last argument to expand_assignment().
7725 2003-07-09 Jan Hubicka <jh@suse.cz>
7727 * java-tree.h (DECL_NUM_STMTS): Rename to...
7728 (DECL_ESTIMATED_INSNS): ... this.
7729 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7730 New static functions.
7731 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7732 * parser.y (add_stmt_to_compound): Do not account statements.
7734 2003-07-08 Mark Wielaard <mark@klomp.org>
7736 * gcj.texi: CNI now expands to Compiled Native Interface.
7738 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7740 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7742 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
7744 * expr.c (expand_byte_code): Adjist emit_line_note call.
7746 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
7748 * lang.c (java_handle_option): Don't handle filenames.
7750 2003-07-02 Zack Weinberg <zack@codesourcery.com>
7752 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7755 * jcf-write.c: Don't default-define DIR_SEPARATOR.
7756 * jcf.h: Delete COMPARE_FILENAMES definition.
7758 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
7760 * lang.c (java_init_options): Update prototype.
7762 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
7764 * decl.c (poplevel): Adjust define_label call.
7766 2003-06-27 Zack Weinberg <zack@codesourcery.com>
7768 * gjavah.c (flag_jni): Make non-static.
7769 * parse-scan.y (ctxp): Make non-static.
7771 * class.c (build_method_symbols_entry)
7772 * expr.c (get_offset_table_index)
7773 * jcf-parse.c (jcf_parse):
7774 Mark the definition static, matching the forward declaration.
7776 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
7778 * lang.c (java_handle_option): Don't check for missing arguments.
7780 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
7782 * class.c (push_class): Use a location_t to save place.
7783 (emit_register_classes): Set input_location. Adjust
7784 expand_function_end call.
7785 * resource.c (write_resource_constructor): Likewise.
7786 * decl.c (end_java_method): Adjust expand_function_end call.
7787 * parse.y (source_end_java_method): Likewise.
7789 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
7791 * lang.c (java_handle_option): Likewise.
7793 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
7795 * lang.c (java_handle_option): Special-casing of optional
7796 joined arguments no longer needed.
7797 * lang.opt: Update switches that take optional argument.
7799 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7801 * lang.opt: Declare Java.
7802 * lang.c (java_init_options): Update.
7804 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7806 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7808 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7810 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7811 * lang.c (java_handle_option): -MD and -MMD have an underscore.
7812 * lang.opt: -MD and -MMD have an underscore.
7814 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
7816 * class.c (emit_register_classes): Adjust init_function_start
7818 * decl.c (complete_start_java_method): Likewise.
7819 * resource.c (write_resource_constructor): Likewise.
7821 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7823 * Make-lang.in: Update to use options.c and options.h.
7824 * lang.c: Include options.h not j-options.h.
7825 (java_handle_option): Abort on unrecognized option.
7826 (java_init_options): Request Java switches.
7828 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
7830 * Make-lang.in: Handle mostlyclean.
7832 2003-06-11 Tom Tromey <tromey@redhat.com>
7834 * lang.c (java_handle_option): Update dependency_tracking for
7837 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7840 2003-06-10 Andrew Haley <aph@redhat.com>
7842 * resource.c (write_resource_constructor): Use expand_expr to
7843 generate the address of the label attached to a resource.
7844 * Make-lang.in (java/resource.o): Add expr.h
7846 2003-06-10 Andrew Haley <aph@redhat.com>
7848 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7849 (java_decl_ok_for_sibcall): New.
7851 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
7853 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7854 (java/j-options.c, java/j-options.h): New.
7855 * java-tree.h (resource_name, compile_resource_file,
7856 compile_resource_data): Constify.
7857 * jcf-write.c (jcf_write_base_directory): Similarly.
7858 * jcf.h (jcf_write_base_directory): Similarly.
7859 * lang.c: Include j-options.h.
7860 (cl_options_count, cl_options, string_option, java_decode_option,
7861 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7862 process_option_with_no): Remove.
7863 (resource_name): Constify.
7864 (LANG_HOOKS_HANDLE_OPTION): Override.
7865 (java_handle_option): New.
7866 (java_init): Don't call jcf_path_init.
7867 (java_init_options): Call jcf_path_init.
7869 * resource.c (compile_resource_data, compile_resource_file): Constify.
7871 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
7873 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7874 (struct lang_decl_func): Add last_line field.
7875 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7876 DECL_SOURCE_LINE_LAST): Remove.
7877 * parse.y (missing_return_error, finish_method_declaration,
7878 lookup_cl, start_artificial_method_body, source_end_java_method,
7879 start_complete_expand_method): Adjust.
7881 2003-06-08 Tom Tromey <tromey@redhat.com>
7883 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7884 fno-assume-compiled.
7886 2003-06-08 Roger Sayle <roger@eyesopen.com>
7888 * builtins.c (define_builtin_type, builtin_types): Delete.
7889 (define_builtin): Rewritten to take just the built-in code,
7890 the function's name, type and fallback library function name.
7891 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7892 (initialize_builtins): Overhaul to define the GCC builtins
7893 used by gcj manually, providing the Java run-time's
7894 implementations as the fallback library function.
7896 2003-06-08 Anthony Green <green@redhat.com>
7898 * parse.y (patch_cast): Fix conversions from floating-point to
7901 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
7903 * Make-lang.in: Update.
7904 * lang.c: Include opts.h. Define cl_options_count and cl_options.
7906 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
7908 * lang.c (java_init_options): Update.
7910 2003-06-05 Jan Hubicka <jh@suse.cz>
7912 * Make-lang.in: Add support for stageprofile and stagefeedback
7914 2003-05-31 Roger Sayle <roger@eyesopen.com>
7916 * lang.c (java_init_options): Prescribe wrap-around two's
7917 complement arithmetic overflow by setting flag_wrapv.
7919 2003-05-29 Roger Sayle <roger@eyesopen.com>
7921 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7922 (builtin_record): Add an additional builtin_code field to
7923 record which GCC built-in corresponds to the Java function.
7924 (java_builtins): Add new entries for atan, atan2, exp, log,
7926 (max_builtin, min_builtin, abs_builtin): Perform constant
7927 folding on the resulting tree.
7928 (java_build_function_call_expr): Likewise, perform constant
7929 folding on the resulting tree.
7930 (initialize_builtins): The NULL creators are now allowed in
7931 the java_builtins table, which is now terminated by an entry
7932 with builtin_code == END_BUILTINS.
7933 (check_for_builtin): Likewise. If the matching creator is
7934 NULL, construct the call using java_build_function_call_expr
7935 directly with the decl for the corresponding builtin_code.
7937 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
7939 * win32-host.c: Normalize copyright boilerplate.
7941 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7943 * parse.y (print_int_node): Use string concatentation on
7944 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7945 function calls into one.
7947 2003-05-13 Zack Weinberg <zack@codesourcery.com>
7949 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7950 fatal_io_error with calls to fatal_error; add ": %m" to the end of
7951 all the affected error messages.
7953 2003-05-13 Richard Henderson <rth@redhat.com>
7955 * class.c (layout_class_method): Set DECL_EXTERNAL.
7956 * decl.c (java_mark_decl_local, java_mark_class_local): New.
7957 * java-tree.h (java_mark_class_local): Declare.
7958 * jcf-parse.c (parse_class_file): Use it.
7959 * parse.y (java_expand_classes): Likewise.
7961 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
7963 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7964 * lex.h: #include input.h.
7965 * jv-scan.c (input_filename): Remove.
7967 2003-05-02 Tom Tromey <tromey@redhat.com>
7970 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7971 (handle_inner_classes): New function.
7973 2003-05-01 Tom Tromey <tromey@redhat.com>
7976 * parse.y (finish_for_loop): Do nothing if update expression is a
7977 EXPR_WFL_NODE wrapping nothing.
7978 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7980 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
7982 * lex.h (input_lineno): Remove declaration.
7983 * parse-scan.y: #include input.h.
7984 (input_filename): Remove declaration.
7985 (input_location): Add definition.
7986 (input_line): Remove definition.
7988 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
7990 * lex.h (lineno): Rename to ...
7991 (input_line): ... here
7992 * parse-scan.y (lineno): Rename to ...
7993 (input_line): ... here.
7994 (reset_report): Rename lineno to input_line.
7995 * check-init.c (check_init): Likewise.
7996 * class.c (push_class): Likewise.
7997 * decl.c (complete_start_java_method, end_java_method): Likewise.
7998 * expr.c (expand_byte_code): Likewise.
7999 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
8000 * jcf-write.c (generate_bytecode_insns): Likewise.
8001 * lex.c (java_init_lex, java_allocate_new_line,
8002 do_java_lex): Likewise.
8003 * parse.h (YYNOT_TWICE): Likewise.
8004 * parse.y (empty_statement, expression_statement,
8005 java_pop_parser_context, java_parser_context_save_global,
8006 yyerror, register_fields, method_header, safe_layout_class,
8007 find_in_imports_on_demand, create_artificial_method,
8008 source_end_java_method, start_complete_expand_method,
8009 build_thisn_assign, java_complete_lhs,
8010 maybe_absorb_scoping_block): Likewise.
8012 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
8014 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
8015 '/' when computing java source filename
8017 2003-04-13 Tom Tromey <tromey@redhat.com>
8019 * gjavah.c (print_c_decl): Indentation fix.
8021 2003-04-12 Zack Weinberg <zack@codesourcery.com>
8023 * class.c (make_field_value, make_method_value, get_dispatch_table)
8024 (make_class_data, emit_offset_symbol_table)
8025 * constants.c (build_constants_constructor)
8026 * java-tree.h (START_RECORD_CONSTRUCTOR)
8027 * parse.y (maybe_build_array_element_wfl):
8028 Use build_constructor.
8030 2003-04-10 Eric Blake <ebb9@email.byu.edu>
8033 * parse.y (string_convert_int_cst): Always use at least one digit
8034 in string conversion. Remove ASCII dependence.
8035 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
8037 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
8039 * Make-lang.in: added win32-host.c
8040 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
8041 resolves to open() on non-Win32 platforms and
8042 Win32-specific jcf_open_exact_case() on Win32
8043 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
8044 when trying .java and .class files
8045 * win32-host.c: added to repository. Defines
8046 Win32-specific jcf_open_exact_case()
8048 2003-04-10 Andrew Haley <aph@redhat.com>
8050 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
8051 (maybe_free_localvar): Renamed from localvar_free.
8052 Add new arg, really.
8053 (generate_bytecode_insns): Set new variable, jsrs.
8054 Only free local vars if no jsr insns have been emittted.
8055 Call maybe_free_localvar, not localvar_free.
8057 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
8059 * gcj.texi: Remove @ at start of file.
8061 2003-03-25 Tom Tromey <tromey@redhat.com>
8063 * parse.y (create_interface): Call CHECK_DEPRECATED.
8065 2003-03-23 Zack Weinberg <zack@codesourcery.com>
8067 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
8069 2003-03-21 Zack Weinberg <zack@codesourcery.com>
8071 * javaop.h (jfloat, jdouble): Make them structures mirroring
8072 the bit fields of IEEE float and double respectively.
8073 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
8074 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
8075 (union Word, union DWord): Delete.
8076 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
8078 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
8079 D_NAN_MASK): Delete.
8080 (jni_print_float, jni_print_double): New. Generate
8081 hexadecimal floating constants.
8082 (print_field_info): Use jni_print_float/double.
8084 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
8085 finite floating point numbers for output; special case
8088 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
8090 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
8091 Replace 0 and 1 with true and false in return statements.
8093 2003-03-19 Tom Tromey <tromey@redhat.com>
8095 * lex.c (do_java_lex): Renamed from java_lex.
8096 (java_lex): New function.
8099 2003-03-13 Tom Tromey <tromey@redhat.com>
8101 * parse.y (resolve_inner_class): Error if qualifier is a primitive
8104 2003-03-04 Andrew Haley <aph@redhat.com>
8106 * gjavah.c (is_first_data_member): New global variable.
8107 (print_c_decl): If it's the first data member, align it as the
8109 (process_file): Set is_first_data_member.
8111 2003-03-11 Tom Tromey <tromey@redhat.com>
8113 * parse.y (resolve_field_access): Initialize class if field is
8114 found in another static field.
8115 * expr.c (build_class_init): Don't optimize out initialization of
8116 implemented interface.
8118 2003-03-11 Andrew Haley <aph@redhat.com>
8120 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
8123 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
8125 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
8126 and DIR_SEPARATOR_2 for a target.
8127 Correct minor typos.
8129 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
8130 and DIR_SEPARATOR_2 for a target into account.
8132 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
8134 * lang.c (java_init): Update prototype, move code to java_post_options.
8135 (java_post_options): Similarly.
8137 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
8139 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
8140 compare file name components depending on the case-sensitivity
8141 or otherwise of the host file system.
8143 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
8144 "strcmp" to compare file name components.
8145 Use IS_DIR_SEPARATOR instead of comparing directly against
8147 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
8148 comparing directly against DIR_SEPARATOR.
8150 2003-03-04 Tom Tromey <tromey@redhat.com>
8152 * Make-lang.in (java.tags): New target.
8154 2003-03-01 Roger Sayle <roger@eyesopen.com>
8156 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
8157 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
8159 2003-03-01 Tom Tromey <tromey@redhat.com>
8161 * parse.y (jdep_resolve_class): Only check deprecation if we found
8164 2003-02-28 Tom Tromey <tromey@redhat.com>
8167 * class.c (maybe_layout_super_class): Always pass a WFL to
8169 * parse.y (do_resolve_class): Updated comment to explain
8172 2003-02-26 Tom Tromey <tromey@redhat.com>
8174 * jcf-write.c (generate_classfile): Check whether class is
8175 deprecated before writing attribute count.
8177 2003-02-25 Roger Sayle <roger@eyesopen.com>
8179 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
8180 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
8182 2003-02-23 Tom Tromey <tromey@redhat.com>
8184 * lang-options.h: Added -Wdeprecated.
8185 * gcj.texi (Warnings): Document -Wdeprecated.
8186 * java-tree.h (flag_deprecated): Declare.
8187 * lang.c (lang_W_options): Added deprecated.
8188 (flag_deprecated): New global.
8189 * chartables.h: Rebuilt.
8190 * gen-table.pl (process_one): Look at whitespace.
8191 (print_tables): Define LETTER_SPACE, LETTER_MASK.
8192 * parse.h (CLEAR_DEPRECATED): New macro.
8193 (CHECK_DEPRECATED_NO_RESET): New macro.
8194 * jcf-parse.c (handle_deprecated): New function.
8195 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
8196 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
8197 * parse.y (resolve_type_during_patch): Check deprecation.
8198 (jdep_resolve_class): Likewise.
8199 (process_imports): Likewise.
8200 (resolve_expression_name): Likewise.
8201 (check_deprecation): Strip arrays from decl. Check
8203 (patch_method_invocation): Also check the particular constructor
8205 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
8206 * jcf-write.c (append_deprecated_attribute): New function.
8207 (generate_classfile): Generate deprecated attribute when
8209 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
8210 (java_lex) [case '*']: Simplify logic.
8211 (java_start_char_p): Use LETTER_MASK.
8212 (java_part_char_p): Likewise.
8213 (java_space_char_p): New function.
8215 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
8217 Change base class access representation.
8218 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
8219 (add_interface_do): Likewise.
8221 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
8223 * decl.c (java_init_decl_processing): Change
8224 soft_lookupjnimethod_node to reflect the change in
8225 signature of _Jv_LookupJNIMethod in libjava/jni.cc
8226 * expr.c (build_jni_stub): Calculate and pass the size
8227 on the stack of the arguments to a JNI function. Use
8228 new target macro MODIFY_JNI_METHOD_CALL to allow a
8229 target to modify the call to a JNI method.
8231 2003-02-08 Roger Sayle <roger@eyesopen.com>
8233 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
8234 instead of basename to avoid compiler warnings on Tru64.
8236 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
8238 * gcj.texi: Update to GFDL 1.2.
8240 2003-01-31 Andrew Haley <aph@redhat.com>
8242 * parse.y (java_expand_classes): Scan the whole class list looking
8243 for access methods that haven't yet been expanded.
8245 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
8249 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
8250 to fix bootstrap on sparc-unknown-netbsdelf1.5.
8251 * jcf-parse.c: Likewise.
8253 2003-01-31 Mark Wielaard <mark@klomp.org>
8255 * gjavah.c (throwable_p): Allocate 1 more byte for string.
8257 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
8259 * class.c (make_class): Use BINFO_ELTS.
8260 (set_super_info): Likewse.
8261 (add_interface_do): Likewise.
8263 2003-01-30 Tom Tromey <tromey@redhat.com>
8265 * jcf-parse.c (read_class): Update identifier's class value if it
8266 changed during parsing.
8268 2003-01-30 Loren James Rittle <ljrittle@acm.org>
8270 * Make-lang.in (po-generated): Find the targets in $(parsedir).
8271 Propagate change to all other rules as required.
8272 (java/parse-scan.o): Add explicit dependency on
8273 $(parsedir)/java/parse-scan.c .
8275 2003-01-29 Tom Tromey <tromey@redhat.com>
8277 * parse.y (patch_assignment): Only transform the rhs of an
8278 assignment when compiling to native.
8280 2003-01-28 Tom Tromey <tromey@redhat.com>
8282 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
8284 2003-01-28 Tom Tromey <tromey@redhat.com>
8286 * lex.c (java_lex): Don't include UEOF as part of token.
8287 (java_read_unicode): Error if \u sequence prematurely terminated.
8289 2003-01-27 Tom Tromey <tromey@redhat.com>
8291 * parse.y (java_check_regular_methods): Check for construct after
8292 checking types in throws clause.
8294 2003-01-24 Tom Tromey <tromey@redhat.com>
8296 * class.c (build_static_field_ref): Only a String or numeric field
8297 can fold to a constant.
8299 2003-01-23 Tom Tromey <tromey@redhat.com>
8301 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
8302 file name in resource buffer.
8304 2003-01-23 Tom Tromey <tromey@redhat.com>
8306 * expr.c (build_known_method_ref): Use method's context to find
8309 2003-01-23 Tom Tromey <tromey@redhat.com>
8311 * constants.c (set_constant_entry): Allocated cleared memory.
8313 2003-01-22 Tom Tromey <tromey@redhat.com>
8315 * java-tree.h: Don't use PARAMS.
8316 * resource.c: Add prototypes for all functions.
8317 (write_resource_constructor): Use `const char *' to avoid
8320 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
8322 * jcf-parse.c (process_zip_dir): Remove unused variable.
8324 2003-01-22 Tom Tromey <tromey@redhat.com>
8326 * expr.c (build_invokeinterface): Abort if method's context is not
8329 2003-01-22 Tom Tromey <tromey@redhat.com>
8331 * gcj.texi (Input and output files): Mention non-class entries.
8332 * decl.c (java_init_decl_processing): Call
8333 init_resource_processing.
8334 * java-tree.h (compile_resource_data, write_resource_constructor,
8335 compile_resource_file, init_resource_processing): Declare.
8336 * config-lang.in (gtfiles): Added resource.c.
8337 * Make-lang.in (gt-java-resource.h): New target.
8338 (JAVA_OBJS): Added resource.o.
8339 (java/resource.o): New target.
8340 * resource.c: New file.
8341 * class.c (compile_resource_file): Moved to resource.c.
8342 (registerResource_libfunc): Likewise.
8343 (utf8_decl_list): Mark with GTY; now static.
8344 * jcf-parse.c (classify_zip_file): New function.
8345 (parse_zip_file_entries): Use it; compile .properties files.
8346 (process_zip_dir): Use classify_zip_file and compute_class_name.
8347 Don't write class name into zip directory.
8348 (java_parse_file): Call write_resource_constructor.
8349 (compute_class_name): New function.
8350 * jcf-io.c (read_zip_member): Reindented.
8352 2003-01-21 Tom Tromey <tromey@redhat.com>
8354 * class.c (supers_all_compiled): New function.
8355 (make_class_data): Use it.
8357 2003-01-21 Tom Tromey <tromey@redhat.com>
8359 * parse.y (method_header): Native method can't be strictfp.
8360 No method can be transient or volatile.
8362 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8364 Make-lang.in (jvspec.o-warn): Add -Wno-error.
8366 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
8368 * check-init.c: Fix comment typos.
8369 * class.c: Likewise.
8370 * constants.c: Likewise.
8372 * except.c: Likewise.
8374 * java-except.h: Likewise.
8375 * java-tree.h: Likewise.
8376 * javaop.h: Likewise.
8377 * jcf-dump.c: Likewise.
8378 * jcf-io.c: Likewise.
8379 * jcf-parse.c: Likewise.
8380 * jcf-write.c: Likewise.
8382 * mangle.c: Likewise.
8383 * typeck.c: Likewise.
8384 * verify.c: Likewise.
8386 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8388 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
8389 * jcf-write.c: Include "tm_p.h".
8391 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8393 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
8395 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8397 * builtins.c (java_build_function_call_expr): Renamed from
8398 build_function_call_expr. All callers changed.
8400 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
8401 * jcf-parse.c: Include tm_p.h.
8403 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
8406 2003-01-14 Tom Tromey <tromey@redhat.com>
8408 * class.c (make_class_data): Check that super is compiled before
8409 building class reference to it.
8411 2003-01-14 Andrew Haley <aph@redhat.com>
8413 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8414 varargs function -- correct.
8416 2003-01-14 Andrew Haley <aph@redhat.com>
8418 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
8420 2003-01-14 Andrew Haley <aph@redhat.com>
8422 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8423 varargs function -- correct.
8425 * parse.y (patch_assignment): Copy the rhs of an assignment into a
8426 temporary if the RHS is a reference.
8428 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8430 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
8431 * keyword.h: Regenerated.
8433 * All Files: Convert to ISO C style function definitions.
8435 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8437 * parse.y (check_pkg_class_access): ANSIfy definition.
8439 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8441 * decl.c, parse-scan.y, parse.y: Don't cast return value of
8444 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
8446 2003-01-09 Geoffrey Keating <geoffk@apple.com>
8448 Merge from pch-branch:
8450 2002-12-02 Geoffrey Keating <geoffk@apple.com>
8452 * Make-lang.in (java/gjavah.o): Update dependencies.
8453 * gjavah.c: Include ggc.h.
8455 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
8457 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
8458 (JCFDUMP_OBJS): Add ggc-none.o.
8459 (java/jcf-dump.o): Depend on GGC_H.
8460 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
8461 CPool substructures.
8462 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
8463 * jcf-dump.c: Include ggc.h.
8465 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8467 * jcf.h (union cpool_entry): New.
8468 (struct CPool): Use gengtype to mark. Change field 'data' to be
8470 (struct JCF): Use gengtype to mark.
8471 (CPOOL_UINT): Update for new cpool_entry type.
8472 (CPOOL_USHORT1): Likewise.
8473 (CPOOL_USHORT2): Likewise.
8474 (CPOOL_FINISH): Use GC to free cpool subfields.
8475 * parse.h (struct parser_ctxt): Mark field current_jcf.
8476 * lex.c (java_init_lex): Use GC to allocate struct JCF.
8477 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
8478 (main_jcf): Use gengtype to mark.
8479 (ggc_mark_jcf): Delete.
8480 (get_constant): Update for new cpool_entry type.
8481 (give_name_to_class): Likewise.
8482 (get_class_constant): Likewise.
8483 (init_outgoing_cpool): Use GGC to allocate struct CPool.
8484 (java_parse_file): Use GGC to allocate struct JCF.
8485 (init_jcf_parse): Don't call ggc_add_root.
8486 * jcf-reader.c (jcf_parse_constant_pool): Update for new
8488 * java-tree.h (current_jcf): Use gengtype to mark.
8489 (CPOOL_UTF): Update for new cpool_entry type.
8490 (outgoing_cpool): Use gengtype to mark.
8491 (struct lang_type): GC struct JCF and struct CPool.
8492 * config-lang.in (gtfiles): Add jcf.h.
8493 * constants.c (find_tree_constant): New.
8494 (set_constant_entry): Allocate cpool subfields using GGC. Update
8495 for new cpool_entry type.
8496 (find_constant1): Update for new cpool_entry type.
8497 (find_constant2): Likewise.
8498 (find_utf8_constant): Use find_tree_constant.
8499 (find_class_or_string_constant): Remove unnecessary cast to jword.
8500 Update for new cpool_entry type.
8501 (count_constant_pool_bytes): Update for new cpool_entry type.
8502 (write_constant_pool): Likewise.
8503 (alloc_name_constant): Use find_tree_constant.
8504 (build_constants_constructor): Update for new cpool_entry type.
8506 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8508 * parse.y (mark_parser_ctxt): Delete.
8509 (goal): Don't use ggc_add_root.
8510 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
8511 (java_pop_parser_context): Let GC free parser_ctxt.
8512 (java_parser_context_resume): Likewise.
8513 * parse.h (struct parser_ctxt): Use gengtype to mark.
8515 (ctxp_for_generation): Likewise.
8516 * lex.h (struct java_lc_s): Mark for gengtype.
8517 (java_lexer): Rearrange for gengtype.
8518 * config-lang.in (gtfiles): Add lex.h, parse.h.
8520 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8522 * All Files: Remove PARAMS macro.
8524 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
8525 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
8528 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
8531 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
8533 * Make-lang.in (java.install-common, java.uninstall,
8534 java.install-info, java.install-man): Prepend $(DESTDIR)
8535 to destination paths in all (un)installation commands.
8536 (java.install-common): Rewrite $(LN) command to support
8537 DESTDIR with "ln" as well as with "ln -s".
8539 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
8541 * java-tree.h: Protect against multiple inclusion.
8543 2003-01-07 Tom Tromey <tromey@redhat.com>
8545 * class.c (add_assume_compiled): Don't adjust parent if we're
8546 already at the root of tree.
8548 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8550 * lang.c (dump_compound_expr): Prototype.
8552 2003-01-03 Tom Tromey <tromey@redhat.com>
8554 Fix for PR java/8712:
8555 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
8556 when simply checking against `null'.
8558 2003-01-03 Tom Tromey <tromey@redhat.com>
8560 * gcj.texi (Standard Properties): Document http.proxyHost and
8563 * gcj.texi (GNU Classpath Properties): Document new properties.
8565 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8567 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
8568 java/lang-options.h, java/mangle.c, java/mangle_name.c,
8569 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
8571 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
8573 * Make-lang.in, boehm.c, buffer.c,
8574 buffer.h, builtins.c, class.c,
8575 config-lang.in, constants.c,
8576 convert.h, decl.c, except.c,
8577 expr.c, java-except.h,
8578 java-tree.h, javaop.def,
8579 jcf-parse.c, jcf-write.c,
8580 jv-scan.c, jvgenmain.c,
8581 jvspec.c, keyword.gperf,
8582 keyword.h, lang-options.h,
8583 lang-specs.h, lang.c, lex.c,
8584 lex.h, mangle.c, mangle_name.c,
8585 parse-scan.y, parse.h, parse.y,
8586 typeck.c, verify.c, xref.c,
8587 xref.h: Replace "GNU CC" with
8588 "GCC" in the copyright header.
8590 * check-init.c, gjavah.c, javaop.h,
8591 jcf-depend.c, jcf-dump.c, jcf-io.c,
8592 jcf-path.c, jcf-reader.c, jcf.h,
8593 zextract.c, zipfile.h: These files are
8594 "part of GCC". Also say "GCC" not "GNU CC".
8596 2002-12-30 DJ Delorie <dj@redhat.com>
8598 * Make-lang.in: Protect against texi2pod/pod2man failing.
8600 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
8602 * gcj.texi: Use @copying.
8604 2002-12-27 Mark Mitchell <mark@codesourcery.com>
8606 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
8607 print_cxx_classname.
8608 (print_cxx_classname): Add add_scope parameter.
8609 (print_class_decls): Do not emit a semicolon after the extern
8611 (process_file): Adjust calls to print_cxx_classname.
8613 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8615 * gcj.texi: Include Cover Texts in man page.
8617 2002-12-23 Jeff Sturm <jsturm@one-point.com>
8619 * class.c (build_static_field_ref): Check FIELD_FINAL.
8621 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8622 instead of current_constant_pool_data_ref.
8623 * java-tree.h (current_constant_pool_data_ref): Undefine.
8624 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8625 * jcf-parse.c (init_outgoing_cpool): Don't initialize
8626 current_constant_pool_data_ref.
8628 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8629 not build_internal_class_name.
8631 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8632 Use it when class ref isn't certain to be compiled.
8634 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8636 * gcj.texi: Include gcc-common.texi.
8637 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8638 $(srcdir)/doc/include/gcc-common.texi.
8640 2002-12-22 Anthony Green <green@redhat.com>
8642 * gcj.texi (Limitations): Add note about org.xml.sax and
8645 2002-12-20 Tom Tromey <tromey@redhat.com>
8647 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8648 where minimum case value is Integer.MIN_VALUE.
8651 2002-12-18 Andrew Haley <aph@redhat.com>
8653 * parse.y (patch_invoke): Force evaluation order when `check' is
8654 set. For PR libgcj/8945.
8656 2002-12-16 Mark Mitchell <mark@codesourcery.com>
8658 * gcj.texi: Change version number to 3.4.
8660 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
8661 Andrew Haley <aph@redhat.com>
8663 * parse.y (source_end_java_method): Remove custom encoding of line
8664 numbers for a function decl before passing it to the back end.
8666 2002-12-03 Andrew Haley <aph@redhat.com>
8668 * class.c (make_class_data): New field, "chain".
8669 * decl.c (java_init_decl_processing): Likewise.
8671 2002-12-02 Tom Tromey <tromey@redhat.com>
8674 * parse.y (do_resolve_class): Handle qualified name via
8677 2002-11-30 Zack Weinberg <zack@codesourcery.com>
8679 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8680 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8681 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8682 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8683 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8684 Include coretypes.h and tm.h.
8685 * Make-lang.in: Update dependencies.
8687 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8689 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8691 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8693 * jcf-reader.c: Don't expand JCF_readu4 inside the
8694 expansion of JCF_SKIP.
8696 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8698 * jcf-reader.c: Don't expand JCF_readu4 inside the
8699 expansion of JCF_SKIP.
8701 2002-11-22 Tom Tromey <tromey@redhat.com>
8703 * parse.y (patch_binop): Cast right hand side of shift expression
8704 to `int'. Fixes PR java/8676.
8706 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
8707 Andrew Haley <aph@redhat.com>
8709 * gcc/java/jcf-write.c (write_classfile): Remove target
8710 class file, if it exists, before renaming the temporary
8713 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
8715 * jvspec.c (lang_specific_spec_functions): New.
8717 2002-11-18 Tom Tromey <tromey@redhat.com>
8719 Fix for PR java/7912:
8720 * expr.c (can_widen_reference_to): Allow cast of array to
8721 Cloneable or Serializable.
8722 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8723 (java_io_serializable_identifier_node): Likewise.
8724 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8725 (valid_ref_assignconv_cast_p): Use new identifier nodes.
8726 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8727 java_io_serializable.
8728 * decl.c (java_init_decl_processing): Initialize
8729 java_lang_cloneable_identifier_node and
8730 java_io_serializable_identifier_node.
8731 (java_lang_cloneable_identifier_node): New global.
8732 (java_io_serializable_identifier_node): Likewise.
8734 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
8736 * buffer.c: Remove unnecessary casts.
8737 * check-init.c: Likewise.
8738 * class.c: Likewise.
8739 * constants.c: Likewise.
8741 * except.c: Likewise.
8742 * gjavah.c: Likewise.
8743 * jcf-io.c: Likewise.
8744 * jcf-parse.c: Likewise.
8745 * jcf-path.c: Likewise.
8746 * jvspec.c: Likewise.
8749 * verify.c: Likewise.
8751 2002-11-06 Tom Tromey <tromey@redhat.com>
8753 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8756 2002-11-05 Tom Tromey <tromey@redhat.com>
8758 Fix for PR java/6388.
8759 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8760 * java-tree.h (enum java_tree_index): New values
8761 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8762 (decimal_int_max, decimal_long_max): New defines.
8763 * lex.c (yylex): Rewrote range checking. Sign extend literals.
8764 (error_if_numeric_overflow): Rewrote range checking.
8765 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8768 2002-11-02 Tom Tromey <tromey@redhat.com>
8770 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8772 * class.c (make_method_value): Put class name, not signature, into
8773 `throws' field. For PR java/8415.
8775 2002-10-24 Tom Tromey <tromey@redhat.com>
8777 * gcj.texi (Invoking gij): Document --showversion.
8778 (Standard Properties): java.library.path now set.
8780 2002-10-23 Tom Tromey <tromey@redhat.com>
8782 * gjavah.c (decode_signature_piece): In JNI mode, print
8783 `jobjectArray' when array depth is nonzero.
8786 2002-10-15 Andrew Haley <aph@redhat.com>
8788 * parse.y (patch_invoke): Call force_evaluation_order on a static
8790 (resolve_qualified_expression_name): Call force_evaluation_order
8791 on a arg list that is part of a Qualified Expression Name.
8793 * lang.c (dump_compound_expr): New.
8794 (java_dump_tree): New.
8796 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
8798 * gcj.texi: Added item describing the GCJ runtime property
8801 2002-10-15 Richard Henderson <rth@redhat.com>
8803 * jcf-parse.c (get_constant): Fix type warning.
8805 2002-10-15 Andrew Haley <aph@redhat.com>
8807 * java-tree.h (java_inlining_merge_static_initializers): Declare.
8808 (java_inlining_map_static_initializers): Declare.
8810 2002-10-14 Andrew Haley <aph@redhat.com>
8812 * tree-inline.c (remap_block): All local class initialization
8813 flags go in the outermost scope.
8814 (expand_call_inline): Call java_inlining_map_static_initializers.
8815 (expand_call_inline): Call java_inlining_merge_static_initializers.
8816 * java/lang.c (merge_init_test_initialization): New.
8817 (java_inlining_merge_static_initializers): New.
8818 (inline_init_test_initialization): New.
8819 (java_inlining_map_static_initializers): New.
8821 2002-10-11 Mark Wielaard <mark@klomp.org>
8823 * gcj.texi (Compatibility): Add Limitations and Extensions section.
8825 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8827 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8829 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8831 * parse.y (merge_string_cste): Add parentheses around & within |.
8833 2002-10-08 Tom Tromey <tromey@redhat.com>
8835 * parse.y (variable_declarator_id): Simplify error path for
8836 array declarator error. For PR java/8003.
8838 2002-10-08 Zack Weinberg <zack@codesourcery.com>
8840 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8843 2002-10-08 Andrew Haley <aph@redhat.com>
8845 * parse.y (attach_init_test_initialization_flags): Check for
8848 2002-10-07 Anthony Green <green@redhat.com>
8850 * parse.y (merge_string_cste): Fix bug in string concatenation.
8852 2002-10-03 Michael Koch <konqueror@gmx.de>
8854 * gcj.texi (Standard properties):
8855 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8857 2002-10-02 Roger Sayle <roger@eyesopen.com>
8859 PR optimization/6627
8860 * lang.c (java_init): If storing the vbit in function
8861 pointers, ensure that force_align_functions_log is atleast
8862 one to aid compatability with g++ vtables.
8864 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
8866 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8867 foul of type-based aliasing.
8869 2002-09-30 Anthony Green <green@redhat.com>
8871 * gcj.texi (Invoking jv-scan): Fix texinfo.
8873 2002-09-28 Anthony Green <green@redhat.com>
8875 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8876 (Code Generation): Add -fno-assert documentation.
8877 * jv-scan.c (flag_assert): New global.
8878 (options): Add assert option.
8879 (help): Add --no-assert documentation.
8880 * parse-scan.y (flag_assert): New global.
8881 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8882 (flag_assert): New global.
8883 * java-tree.h (flag_assert): New global.
8884 * lex.c (java_lex): Obey flag_assert.
8885 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8888 2002-09-26 Andrew Haley <aph@redhat.com>
8890 * expr.c (build_java_array_length_access): Check for null pointer.
8891 * expr.c (expand_java_arrayload): Likewise.
8893 2002-09-21 Richard Henderson <rth@redhat.com>
8895 * jcf-parse.c (get_constant): Decode from IEEE no matter
8896 what the target format.
8898 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
8900 * ChangeLog: Follow spelling conventions.
8901 * class.c: Likewise.
8904 * gjavah.c: Likewise.
8905 * java-tree.h: Likewise.
8906 * jcf-dump.c: Likewise.
8907 * jcf-parse.c: Likewise.
8908 * jvspec.c: Likewise.
8910 * mangle.c: Likewise.
8911 * parse.y: Likewise.
8913 2002-09-17 Tom Tromey <tromey@redhat.com>
8915 * lex.c (java_read_unicode_collapsing_terminators): Handle case
8916 where \r appears at EOF. Fixes PR java/7950.
8918 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
8920 * jvspec.c (lang_specific_driver): Remove unused variable.
8922 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8924 * java-tree.h (union lang_tree_node): Add chain_next option.
8926 2002-09-16 Richard Henderson <rth@redhat.com>
8928 * jcf-parse.c (get_constant): Runtime check for IEEE format;
8929 use new real.h interface.
8930 * jcf-write.c (find_constant_index): Use new real.h interface.
8931 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8933 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8935 * lang.c: Follow spelling conventions.
8937 2002-09-11 Per Bothner <per@bothner.com>
8939 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
8940 constant to the type of the field.
8941 (java_complete_tree): Remove now-redundant code.
8943 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
8945 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
8948 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8949 return label if a ret instruction for the jsr has been reached.
8951 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
8953 * parse.y (DIR_SEPARATOR): Don't define.
8954 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8956 2002-08-28 Andrew Haley <aph@redhat.com>
8958 * verify.c (verify_jvm_instructions): Allow exception handler
8959 inside code that is being protected, but generate a warning.
8960 * except.c (link_handler): Initialize `expanded' in new eh_range.
8961 (binding_depth, is_class_level, current_pc): Declare extern.
8963 2002-09-01 Mark Wielaard <mark@klomp.org>
8965 * gcj.texi: Add chapter about system properties.
8968 2002-08-26 Tom Tromey <tromey@redhat.com>
8970 * parse.y (try_builtin_assignconv): Allow narrowing primitive
8971 conversion if RHS_TYPE is byte, short, or char.
8973 2002-08-22 Tom Tromey <tromey@redhat.com>
8975 * gcj.texi (Invoking gij): Document -cp and -classpath.
8977 2002-08-21 Tom Tromey <tromey@redhat.com>
8979 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8980 $(prefix)/share. For PR libgcj/7633.
8982 For PR java/6005 and PR java/7611:
8983 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8984 (java_can_use_bit_fields_p): New function.
8986 2002-08-16 Tom Tromey <tromey@redhat.com>
8988 * gcj.texi (Class Initialization): Mention class initialization of
8991 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
8993 * Make-lang.in (java-tree-inline.o): New.
8994 (JAVA_OBJS): Add java-tree-inline.o.
8995 * parse.y (source_end_java_method): Call java_optimize_inline.
8996 (java_expand_method_bodies): Save method's tree in
8998 (add_stmt_to_compound): Keep track of the number of statments.
8999 * lang.c (java_init): Enable flag_inline_trees.
9000 (java_post_options): If flag_inline_functions is on, enable
9001 flag_inline_trees instread.
9002 (decl_constant_value): New.
9003 (java_tree_inlining_walk_subtrees): New.
9004 * java-tree.h (DECL_NUM_STMTS): New macro.
9005 (java_optimize_inline): Declare.
9006 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
9007 Handle a LABEL_EXPR.
9008 * decl.c (build_result_decl): If we already have a DECL_RESULT
9010 (dump_function): New.
9011 (java_optimize_inline): New.
9012 (dump_function): New.
9014 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
9017 * parse.y (build_assertion): Invert return from
9018 desiredAssertionStatus.
9020 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9022 * jcf-write.c (get_access_flags): Return correct access flags for
9023 private and protected inner classes.
9025 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
9027 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
9029 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
9031 * mangle_name.c: Don't include obstack.h twice.
9032 * xref.c: Don't include obstack.h.
9034 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
9036 * class.c: (permanent_obstack): Delete declaration.
9037 * constants.c: (permanent_obstack): Delete declaration.
9038 * except.c: (permanent_obstack): Delete declaration.
9039 * expr.c: (permanent_obstack): Delete declaration.
9040 * jcf-parse.c: (permanent_obstack): Delete declaration.
9041 (saveable_obstack): Delete declaration.
9042 * parse.h: (permanent_obstack): Delete declaration.
9043 * typeck.c: (permanent_obstack): Delete declaration.
9045 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
9047 * gcj.texi (version-gcc): Increase to 3.3.
9049 2002-07-22 Tom Tromey <tromey@redhat.com>
9051 * lex.c (java_lex): Check for `e' or `E' after 0.
9053 2002-07-21 Richard Henderson <rth@redhat.com>
9055 * lang.c (java_unsafe_for_reeval): New.
9056 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
9058 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
9060 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
9061 (jcf_path_init): Use GET_ENVIRONMENT.
9063 2002-07-10 Roger Sayle <roger@eyesopen.com>
9064 Zack Weinberg <zack@codesourcery.com>
9066 * builtins.c (initialize_builtins): Remove defines that
9067 handled C/C++ specific junk hereby removed from builtins.def.
9069 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
9071 * lang.c (java_post_options): Update prototype.
9073 2002-07-05 Roger Sayle <roger@eyesopen.com>
9075 * builtins.c (initialize_builtins): Ignore the additional
9076 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
9077 the builtins.def file.
9079 2002-07-01 Tom Tromey <tromey@redhat.com>
9082 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
9085 2002-07-01 Roger Sayle <roger@eyesopen.com>
9087 * java/decl.c (builtin_function): Accept additional parameter.
9088 (java_init_decl_processing): Pass an additional NULL_TREE
9089 argument to builtin_function.
9091 2002-06-29 T.J. Mather <tjmather@maxmind.com>
9093 * gcj.texi: Fixed gcj invocation example so that it compiles.
9095 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9097 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
9098 * parse.y (mark_parser_ctxt): Likewise.
9099 (check_modifiers, declare_local_variables): Avoid incorrect
9100 hardcoded constant 10.
9102 * lex.c (java_read_char): Avoid "comparison is always true"
9105 2002-06-25 Andreas Schwab <schwab@suse.de>
9107 * expr.c (JSR): Avoid undefined operation on PC.
9109 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9111 * decl.c (clear_binding_level): Const-ify.
9113 2002-06-13 Akim Demaille <akim@epita.fr>
9115 * parse.y (class_declaration, interface_declaration): Make sure
9116 all their rules have an action, in order to avoid meaningless `$$
9117 = $1' and their type clashes.
9119 2002-06-11 Tom Tromey <tromey@redhat.com>
9121 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
9122 * parse-scan.y (statement_without_trailing_substatement): Added
9124 (assert_statement): New rule.
9125 * java-tree.h (struct lang_type) [assertions]: New field.
9126 (TYPE_USES_ASSERTIONS): New macro.
9127 (CLASS_USES_ASSERTIONS): Likewise.
9128 (FIELD_SYNTHETIC): New define.
9129 * lex.c (java_lval;): Added ASSERT_TK.
9130 * parse.y (ASSERT_TK): Added.
9131 (statement_without_trailing_substatement): Added assert_statement.
9132 (assert_statement): New rule.
9133 (build_assertion): New function.
9134 (maybe_generate_pre_expand_clinit): Create and initialize
9135 $assertionsDisabled.
9136 (lookup_package_type): Removed decl.
9137 * keyword.h: Rebuilt.
9138 * keyword.gperf (assert): New token.
9140 2002-06-10 Akim Demaille <akim@epita.fr>
9142 * parse.y (interface_type_list, class_member_declaration)
9143 (unary_expression_not_plus_minus): Remove duplicate %type.
9146 2002-06-09 Tom Tromey <tromey@redhat.com>
9148 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
9150 * parse.y (method_header): Give error message in all cases.
9153 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9155 Don't use RTL inlining. Fix for PR java/6820.
9156 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
9157 (flag_really_inline): New.
9158 (java_decode_option): Set flag_really_inline if -finline-functions
9160 (java_post_options): New function. Turn off inlining unless
9161 flag_really_inline is set.
9163 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9165 * gjavah.c (throwable_p): Accept argument as either a classname or
9166 signature fragment. Create null-terminated classname string for super
9167 when calling itself recursively.
9168 (decode_signature_piece): Skip first character from class name
9169 signature when calling throwable_p.
9171 2002-06-08 H.J. Lu (hjl@gnu.org)
9173 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
9175 2002-06-04 Tom Tromey <tromey@redhat.com>
9177 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
9179 2002-06-04 Michael Koch <konqueror@gmx.de>
9181 * gcj.texi (Input Options): Fixed typo.
9183 2002-06-04 Zack Weinberg <zack@codesourcery.com>
9185 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
9186 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
9187 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
9188 and all now-pointless local variables. Rename other local
9189 variables to reflect their not being handles.
9191 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
9192 #if JCF_USE_STDIO blocks.
9194 * parse.y: Add missing semicolon at end of rule.
9196 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
9198 * check-init.c (attach_initialized_static_class): Delete, unused.
9199 * parse.y: Use htab_t instead of struct hashtable, update
9201 * java-tree.h: Include hashtab.h instead of hash.h.
9202 (struct lang_decl_func): Use htab_t, set up for gengtype.
9203 (struct init_test_hash_entry): Delete.
9204 (struct treetreehash_entry): New.
9205 (java_treetreehash_find): New
9206 (java_treetreehash_new): New prototype.
9207 (java_treetreehash_create): New prototype.
9208 (java_mark_tree): Delete prototype.
9209 (java_hash_hash_tree_node): Delete prototype.
9210 (java_hash_compare_tree_node): Delete prototype.
9211 (attach_initialized_static_class): Delete prototype.
9212 * expr.c (build_class_init): Update to use java_treetreehash
9214 (java_expand_expr): Update to use htab_t.
9215 (emit_init_test_initialization): Likewise.
9216 * decl.c (java_mark_tree): Delete.
9217 * class.c (init_test_hash_newfunc): Delete.
9218 (java_hash_hash_tree_node): Delete.
9219 (java_hash_compare_tree_node): Delete.
9220 (add_method_1): Update to use java_treetreehash functions.
9221 (JAVA_TREEHASHHASH_H): New macro.
9222 (java_treetreehash_hash): New function.
9223 (java_treetreehash_compare): New function.
9224 (java_treetreehash_find): New function.
9225 (java_treetreehash_new): New function.
9226 (java_treetreehash_create): New function.
9227 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
9229 * Make-lang.in (java/parse.o): Depend on debug.h.
9230 * java-tree.h (struct lang_identifier): Use gengtype.
9231 (union lang_tree_node): New.
9232 (struct lang_decl_func): Use gengtype.
9233 (struct lang_decl_var): Likewise.
9234 (struct lang_decl): Likewise.
9235 * parse.y: Include debug.h.
9236 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
9238 * lang.c (struct language_function): New dummy structure.
9240 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
9241 descriminator for DECL_LANG_SPECIFIC.
9242 (struct lang_decl_func): Rename from struct lang_decl.
9243 (enum lang_decl_desc): New.
9244 (struct lang_decl): Make it a union. Update all the accessor macros.
9245 (struct lang_type): Use gengtype.
9246 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
9247 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
9248 are now the same size.
9249 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
9250 use discriminator to mark DECL_LANG_SPECIFIC.
9252 * Make-lang.in (gt-java-builtins.h): New rule.
9253 (java/builtins.o): Add dependency on gt-<filename>.h.
9254 * builtins.c: Use gengtype for roots.
9255 (union string_or_tree): Use gengtype.
9256 (struct builtin_record): Use gengtype.
9257 * config-lang.in (gtfiles): Add builtins.c.
9259 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
9260 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
9261 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
9262 gt-java-parse.h, gtype-java.h): Add rules to generate.
9263 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
9264 (class.o): Add dependency on gt-*.h.
9265 (constants.o): Likewise.
9268 (jcf-parse.o): Likewise.
9269 (jcf-write.o): Likewise.
9271 * config-lang.in (gtfiles): New.
9272 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9273 * constants.c: Replace uses of ggc_add_* with GTY markers.
9275 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9276 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9277 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
9278 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
9280 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
9282 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9283 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
9285 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9286 Include gtype-java.h.
9288 2002-06-02 Tom Tromey <tromey@redhat.com>
9290 Fix for PR java/5913:
9291 * parse.y (patch_binop): Call patch_string on op1.
9293 2002-06-02 Tom Tromey <tromey@redhat.com>
9295 Fix for PR java/1343, PR java/6336:
9296 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
9297 formatting. Changed return type.
9298 (anonymous_class_counter): Moved to top of file.
9299 (maybe_make_nested_class_name): Append number to class name for
9300 function-local classes.
9302 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9304 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
9305 * Make-lang.in: Update dependency lists.
9307 2002-05-18 Mark Mitchell <mark@codesourcery.com>
9309 * gjavah.c (throwable_p): Do not free the name of the class after
9310 passing it to find_class.
9311 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
9312 * jcf-io.c (dirent.h): Include it.
9313 (fnmatch.h): Likewise.
9314 (compare_path): New function.
9315 (java_or_class_file): Likewise.
9316 (memoized_dirlist_entry): New type.
9317 (memoized_dirlist_lookup_eq): New function.
9318 (memoized_dirlists): New variable.
9319 (caching_stat): New function.
9320 (memoized_class_lookup_eq): New function.
9321 (memoized_class_lookups): Likewise.
9322 (find_class): Use memoized_class_lookups and caching_stat.
9323 * jcf.h (JCF_USE_SCANDIR): Define.
9324 * parse.y (java_expand_classes): Write the class files in reverse
9327 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9329 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
9331 2002-05-13 Mark Mitchell <mark@codesourcery.com>
9333 * jcf-write.c (write_classfile): Unlink the temporary file if it
9334 cannot be renamed. Use concat to build up the name of the
9337 2002-05-08 Mark Mitchell <mark@codesourcery.com>
9339 * jcf-write.c (write_classfile): Write the file to a
9340 temporary file and then rename it.
9342 2002-05-07 Tom Tromey <tromey@redhat.com>
9344 * gjavah.c (throwable_p): Use xstrdup, not strdup.
9346 Fix for PR java/1200:
9347 * gjavah.c (throwable_p): New function.
9348 (decode_signature_piece): Use it. A `WeakReference' isn't the
9351 (gcjh_streq): New function.
9353 2002-05-07 Andreas Jaeger <aj@suse.de>
9355 * parse.y (finish_for_loop): Fix if statement.
9357 2002-05-06 Tom Tromey <tromey@redhat.com>
9359 Fix for PR java/5941:
9360 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
9361 loop update expression.
9362 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
9363 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
9365 2002-05-04 Mark Wielaard <mark@klomp.org>
9368 * parse.y (build_string_concatenation): Return just op1 only when op2
9369 is null and op1 is a STRING_CST, otherwise always construct a
9372 2002-04-27 Tom Tromey <tromey@redhat.com>
9375 * parse.y (string_convert_int_cst): New function.
9376 (merge_string_cste): Use it.
9378 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9380 * java-tree.h (java_parse_file): Update.
9381 (java_set_yydebug): Remove.
9382 * jcf-parse.c (yydebug): Remove.
9383 (java_set_yydebug): Die.
9384 (java_parse_file): Update.
9385 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9387 2002-04-24 Tom Tromey <tromey@redhat.com>
9390 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
9391 EXPR_WFL_QUALIFICATION of qual_wfl.
9393 2002-04-23 Per Bothner <per@bothner.com>
9395 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
9396 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
9397 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
9399 2002-04-23 Tom Tromey <tromey@redhat.com>
9402 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
9403 recognize `-fcompile-resource='.
9404 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
9407 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9409 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
9410 paths. Fixes PR java/2791.
9412 2002-04-19 Andrew Haley <aph@redhat.com>
9414 * jcf-write.c (push_long_const): lo, hi: New variables.
9415 Use rshift_double to extract the high part of a 64-bit long.
9416 Use WORD_TO_INT to extract the low part.
9418 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
9419 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
9420 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
9422 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9424 * typeck.c (incomplete_type_error): Remove.
9426 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9428 * class.c (make_class_data): Set DECL_ALIGN on static class data,
9429 for hash synchronization.
9430 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
9431 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
9434 2002-04-16 Mark Wielaard <mark@klomp.org>
9436 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
9439 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9441 Fix for PR java/6294:
9442 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
9445 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9447 Fix for PR java/6085:
9448 * parse.y (patch_method_invocation): Always use build_access_to_thisn
9449 to get enclosing "this" argument for inner-class constructor
9450 invocation. Pass correct arguments to build_access_to_thisn.
9452 2002-04-10 Andreas Jaeger <aj@suse.de>
9454 * gcj.texi (Input Options): Fix extdirs patch.
9456 2002-04-10 Anthony Green <green@redhat.com>
9458 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
9460 2002-04-09 Anthony Green <green@redhat.com>
9462 * gcj.texi (Input Options): Add --extdirs documentation.
9463 * jcf-dump.c (OPT_extdirs): New macro.
9464 (options): Add extdirs option.
9465 (help): Describe --extdirs.
9466 (main): Handle OPT_extdirs.
9467 * gjavah.c (OPT_extdirs): New macro.
9468 (options): Add extdirs option.
9469 (help): Describe --extdirs.
9470 (main): Handle OPT_extdirs.
9471 * jcf-path.c (jcf_path_init): Add extdirs support.
9472 (jcf_path_extdirs_arg): New function.
9473 (extensions): New variable to hold extensions path entries.
9474 * jvspec.c: Remove -fextdirs= when compiling main().
9475 * lang.c (java_decode_option): Handle -fextdirs=.
9476 * jcf.h (jcf_path_extdirs_arg): Declare new function.
9477 * Make-lang.in: Compile jcf-path with version info for use in
9478 identifying the appropriate libgcj.jar.
9480 2002-04-08 Tom Tromey <tromey@redhat.com>
9483 * .cvsignore: Added rmic.1 and rmiregistry.1.
9484 * gcj.texi (Top): Link to new nodes.
9485 (Invoking rmic): New node.
9486 (Invoking rmiregistry): Likewise.
9487 * Make-lang.in (java.generated-manpages): Added rmic.1 and
9489 (java.maintainer-clean): Likewise.
9490 ($(srcdir)/java/rmic.1): New target.
9491 ($(srcdir)/java/rmiregistry.1): Likewise.
9492 (java.install-man): Handle rmic.1 and rmiregistry.1.
9494 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9496 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
9497 Add note about handling uncaught exceptions. Add an exception handler
9500 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9502 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
9503 after using it to patch CALL_EXPR.
9505 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9507 * gcj.texi (Invocation): Document CNI invocation API.
9509 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9511 * expr.c (truthvalue_conversion): Rename. Update.
9512 (expand_compare): Update.
9513 * java-tree.h (java_truthvalue_conversion): New.
9514 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9516 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9518 * java-tree.h (java_mark_addressable): New.
9519 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9520 * typeck.c (mark_addressable): Rename, update.
9522 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9524 * expr.c (build_java_binop): Update.
9525 * java-tree.h (java_signed_type, java_unsigned_type,
9526 java_signed_or_unsigned_type): Update.
9527 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9528 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9529 * parse.y (patch_binop): Update.
9530 * typeck.c (signed_or_unsigned_type, unsigned_type,
9531 signed_type): Update.
9533 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9535 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9536 (java_dummy_print): Remove.
9537 (lang_print_error): Rename. Exit early if inhibiting output.
9538 (inhibit_error_printing_function): New.
9539 (java_init): Don't set hook.
9540 (lang_init_source): Use new boolean.
9542 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9544 * parse.y (do_resolve_class): Fix infinite recursion.
9546 2002-03-29 Tom Tromey <tromey@redhat.com>
9548 * parse.y (check_inner_circular_reference): Ignore incomplete
9551 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9553 * Make-lang.in (builtins.o): Update.
9554 * boehm.c (get_boehm_type_descriptor): Update.
9555 * builtins.c: Include langhooks.h.
9556 * decl.c (java_init_decl_processing): Update.
9557 * java-tree.h (java_type_for_mode, java_type_for_size): New.
9558 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
9560 * typeck.c (type_for_mode, type_for_size): Update.
9562 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9564 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
9566 2002-03-28 Tom Tromey <tromey@redhat.com>
9568 * except.c (expand_end_java_handler): If the handler type is NULL,
9569 use java.lang.Throwable. Fixes PR java/5986.
9571 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9573 Fix for PR java/4715:
9574 * jcf-parse.c (parse_source_file_3): New function.
9575 (read_class): Call it.
9576 (java_parse_file): Likewise.
9578 2002-03-28 Jan Hubicka <jh@suse.cz>
9580 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
9582 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9584 * parse.y (resolve_package): Initialize "decl".
9585 (lookup_package_type): Remove unused function.
9587 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9589 Fix for PR java/5993:
9590 * parse.y (resolve_package): Return the decl if resolution was
9591 successful. Don't special case "java.lang" and "java.lang.reflect"
9592 packages. Set type_name to the merged identifier.
9593 (resolved_qualified_expression_name): Print error using "name" if
9594 resolve_package returns NULL_TREE.
9596 2002-03-27 Tom Tromey <tromey@redhat.com>
9598 * expr.c (expand_invoke): Don't generate null pointer check if
9599 we're calling <init>.
9601 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9603 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
9605 * java-tree.h (java_lang_expand_expr): Similarly.
9606 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9607 (java_init): Don't set hook.
9609 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9611 Fix for PR java/5850:
9612 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
9613 context if field was not found in the current scope.
9614 * expr.c (lookup_field): Don't look in enclosing contexts.
9616 2002-03-26 Tom Tromey <tromey@redhat.com>
9618 Fix for PR java/5942:
9619 * parse.y (init_src_parse): Added sanity check.
9620 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
9623 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9625 * decl.c (lang_mark_tree): Rename java_mark_tree.
9626 * java-tree.h (java_mark_tree): New.
9627 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9629 2002-03-25 Zack Weinberg <zack@codesourcery.com>
9631 * lex.c: Change java_perform_atof to take normal parameters
9632 instead of a pointer to a parameter block. Call it directly
9635 2002-03-22 Mark Wielaard <mark@klomp.org>
9637 Fix for PR java/5368:
9638 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9639 when printing error message.
9641 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9643 * decl.c (maybe_build_cleanup): Remove.
9645 2002-03-22 Tom Tromey <tromey@redhat.com>
9647 Andrew Haley <aph@cambridge.redhat.com>
9649 * expr.c (build_field_ref): Don't build a check if the field is a
9652 2002-03-21 Eric Blake <ebb9@email.byu.edu>
9654 Fix for PR java/6026:
9655 * lex.c (java_lex): Fix parsing of consecutive floats.
9657 2002-03-21 Tom Tromey <tromey@redhat.com>
9659 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9662 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9664 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9665 insert_block, getdecls, kept_level_p, global_bindings_p): New.
9667 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9669 * gcj.texi: @code{gcj} becomes @command{gcj}.
9670 @code{gcc} becomes @command{gcc}.
9671 GcjRaw changed to gnu.gcc.RawData.
9673 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9675 * decl.c (start_java_method): Use new hook.
9676 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9677 (java_init): Remove old hook.
9679 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
9681 * builtins.c (define_builtin): Do nothing if `type' is null.
9684 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9686 * parse.y (parser_check_super_interface): Fix error message
9689 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9691 * jcf-parse.c (get_constant): Delete unused variables.
9693 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9695 * java-tree.h (java_parse_file): New.
9696 * jcf-parse.c (yyparse): Rename java_parse_file.
9697 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9699 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9701 * parse.y (craft_constructor): Return the constructor decl.
9702 (java_expand_classes): Update comments.
9703 (lookup_method_invoke): Call fix_constructors immediately for
9704 anonymous class. Fixes PR java/5935.
9706 2002-03-15 Anthony Green <green@redhat.com>
9708 * jcf-parse.c (yyparse): Don't emit class registration
9709 constructor when compiling resource files.
9711 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9713 * lang.c (java_tree_code_type, java_tree_code_length,
9714 tree_code_name): Delete.
9715 (tree_code_type, tree_code_length, tree_code_name): Define.
9716 (java_init): Don't try to copy into the various tree_code
9719 2002-03-12 Tom Tromey <tromey@redhat.com>
9721 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9722 UTF-8, not UCS-2. Fixes PR java/5923.
9724 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9725 a call_expr wrapped in a convert. Fixes PR java/5848.
9727 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9729 * jcf-write.c (write_classfile): Improve error strings.
9731 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9733 * lex.c: Adjust comments to GNU standards.
9735 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9737 Fix for PR java/5902:
9738 * lex.c (java_lex): Fix parsing of literals.
9740 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9742 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9743 to prevent it getting evaluated twice in the store checking case.
9744 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9747 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9749 * decl.c (java_init_decl_processing): Make sure class_type_node
9750 alignment is not less than 64 bits if hash synchronization is enabled.
9752 2002-03-08 Per Bothner <per@bothner.com>
9754 * parse.y (java_complete_lhs): Check if patch_assignment
9755 returned an error-mark.
9757 * parse.y (try_builtin_assignconv): Don't special-case zero.
9759 2002-03-08 Per Bothner <per@bothner.com>
9761 Fix for PR java/5812.
9762 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
9763 here instead of in JSR macro. Likewise with load_type_state call.
9764 Do the latter on if the return_pc has been verified (the jsr returns).
9765 (JSR): Now just call build_java_jsr.
9767 2002-03-07 Jeff Sturm <jsturm@one-point.com>
9769 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9770 (java.install-common): Link native driver to
9771 JAVA_TARGET_INSTALL_NAME.
9773 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
9775 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9776 * builtins.c(sin_builtin): Likewise
9777 * builtins.c(sqrt_builtin): Likewise
9779 2002-03-03 Zack Weinberg <zack@codesourcery.com>
9781 * java/expr.c, java/jcf-parse.c, java/lex.c:
9782 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9783 REAL_ARITHMETIC blocks unconditional. Delete some further
9784 #ifdef blocks predicated on REAL_ARITHMETIC.
9786 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9788 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9789 explicit sizeof/sizeof.
9790 * decl.c (java_init_decl_processing): Likewise.
9791 * jcf-parse.c (init_jcf_parse): Likewise.
9792 * parse.y (init_src_parse): Likewise.
9794 2002-03-02 Per Bothner <per@bothner.com>
9796 Make --CLASSPATH by a synonym for --classpath and -classpath.
9797 Implement --bootclasspath.
9798 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
9799 (classpath_l): Remove.
9800 (jcf_path_CLASSPATH_arg): Remove.
9801 (jcf_path_bootclasspath_arg): New function.
9802 (jcf_path_seal): Simplify accordingly.
9804 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
9805 (jcf_path_CLASSPATH): Remove declaration.
9806 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
9807 (lang_specific_driver): Translate -bootclasspath.
9808 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
9809 * lang.c (decode_lang_options): Do jcf_path_init first.
9810 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
9811 * gjavah.c: Also handle --bootclasspath.
9812 Handle --CLASSPATH as a synonum for --classpath.
9813 * jcf-dump.c: Likewise.
9815 "." is not part of system path, but is the default for --classpath.
9816 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
9817 (jcf_path_seal): Add "." if no CLASSPATH specified.
9819 * gcj.texi: Document changes.
9821 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9823 * expr.c (build_java_arraystore_check): Fix formatting.
9825 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9827 Fix for PR java/5758, java/5632:
9828 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9829 inner-class separator too.
9830 * parse.y (do_resolve_class): New local `decl_result.'
9831 Progressively build a name for what can have been loaded.
9833 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9835 * expr.c (java_array_data_offset): Removed function.
9836 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9837 (build_java_array_length_access): Obtain "length" value using a
9838 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9839 (build_java_arrayaccess): Correct comment. Access "data" using a
9840 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9841 (build_java_arraystore_check): New function.
9842 (expand_java_arraystore): Use build_java_arraystore_check.
9843 * parse.y (patch_assignment): Simplify code to insert a store check
9844 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9845 * check-init.c (check_init): Update to reflect that an array length
9846 access is now a COMPONENT_REF.
9847 * gcj.texi (Code Generation): Improve documentation of
9848 -fno-bounds-check. Add documentation for -fno-store-check.
9849 * java-tree.h (flag_store_check): Declare.
9850 (build_java_arraystore_check): Declare.
9851 * lang.c (flag_store_check): Initialize to 1.
9852 (lang_f_options): Add store-check option.
9853 * jvspec.c: Don't pass store-check option to jvgenmain.
9854 * lang-options.h: Add help string for -fno-store-check.
9856 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9858 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9859 * java-tree.h (java_dup_lang_specific_decl): New.
9860 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9862 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9864 * builtins.c, decl.c: Delete traditional-mode-related code
9865 copied from the C front end but not used, or used only to
9866 permit the compiler to link.
9868 2002-02-22 Tom Tromey <tromey@redhat.com>
9870 Fix for PR java/2369:
9871 * jvspec.c (verify_class_name): New function.
9872 (lang_specific_driver): Call it.
9873 (JAVA_START_CHAR_P): New macro.
9874 (JAVA_PART_CHAR_P): Likewise.
9876 2002-02-22 Per Bothner <per@bothner.com>
9878 * class.c: Change vtable to be more compatible with g++ v3 abi.
9879 (get_dispatch_table): Prepend offset-to-top (always 0) and
9880 type_info pointer (currently unimplemented hence NULL) to vtable.
9881 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9882 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
9883 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9884 (build_dtable_decl): Add declarations for new fields.
9886 2002-02-20 Per Bothner <per@bothner.com>
9888 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9889 to finit$ (otherwise generate_bytecode_insns drops it). However, we
9890 don't need to set it on the COMPOUND_EXPR - the caller does that.
9892 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9894 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9895 `--CLASSPATH' becomes `--classpath.'
9896 * gjavah.c: Likewise.
9897 * jcf-dump.c: Likewise.
9898 * lang-options.h: Likewise.
9900 * jcf-path.c: Updated comment.
9901 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9902 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9903 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9904 (jcf_path_CLASSPATH_arg): Ditto.
9905 (classpath_u): Updated leading comment.
9907 2002-02-20 Per Bothner <per@bothner.com>
9909 * builtins.c (check_for_builtin): New function.
9910 (build_call_or_builtin): Remove.
9911 * java-tree.h: Update accordingly.
9912 * expr.c (expand_invoke): Use build + check_for_builtin instead
9913 of build_call_or_builtin.
9914 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
9915 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9916 flag (which had caused jcf-write to incorrectly emit invokevirtual).
9918 2002-02-17 Tom Tromey <tromey@redhat.com>
9920 * java-tree.h (TYPE_STRICTFP): New macro.
9921 (struct lang_type) [strictfp]: New field.
9922 (CLASS_STRICTFP): New macro.
9923 (METHOD_STRICTFP): New macro.
9924 (struct lang_decl) [strictfp]: New field.
9925 * parse.y (method_header): Disallow strictfp constructor or
9927 (STRICT_TK): Move before MODIFIER_TK.
9928 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9929 (METHOD_MODIFIERS): Likewise.
9930 (INTERFACE_MODIFIERS): Likewise.
9931 * jcf-write.c (get_access_flags): Likewise.
9932 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9933 (add_method_1): Likewise.
9934 (get_access_flags_from_decl): Likewise.
9935 * jcf-dump.c (print_access_flags): Print in standard order. Also,
9936 recognize strictfp flag.
9937 * jcf.h (ACC_STRICT): New define.
9939 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
9941 * class.c(build_utf8_ref): Move declaration of decl_size
9943 2002-02-07 Tom Tromey <tromey@redhat.com>
9945 * gcj.texi (Input Options): --CLASSPATH does not suppress system
9948 2002-02-04 Anthony Green <green@redhat.com>
9950 * class.c (build_utf8_ref): Put UTF-8 constants into merged
9951 sections if available.
9953 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9955 * parse.y (java_expand_classes): Fix typo in static field loop.
9957 2002-02-02 Richard Henderson <rth@redhat.com>
9959 * class.c (add_field): Mark static fields external.
9960 (build_class_ref): Remove redundant set.
9961 * parse.y (java_expand_classes): Mark static fields of classes
9962 to be compiled as local.
9963 * jcf-parse.c (parse_class_file): Likewise.
9965 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9967 * gcj.texi (About CNI): New node.
9969 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
9972 * jcf-parse.c : Check for HAVE_LOCALE_H before using
9973 setlocale() with LC_CTYPE as a parameter.
9976 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
9978 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9979 Follow GNU Coding Standards for --version.
9981 2002-01-28 Tom Tromey <tromey@redhat.com>
9983 * expr.c (build_jni_stub): Ensure storage for `meth' is
9985 * parse.y (java_complete_expand_methods): Set
9986 current_function_decl before building JNI stub.
9988 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9990 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9993 2002-01-22 Tom Tromey <tromey@redhat.com>
9995 * decl.c (java_init_decl_processing): Use add_predefined_file.
9996 Predefine RawData.java.
9997 (predef_filenames): Removed.
9998 (java_init_decl_processing): Don't register predef_filenames.
9999 * jcf-parse.c (add_predefined_file): New function.
10000 (predefined_filename_p): Rewrote.
10001 (predefined_filename_p): No longer static.
10002 * decl.c (java_init_decl_processing): Call initialize_builtins.
10003 * Make-lang.in (JAVA_OBJS): Added builtins.o.
10004 (java/builtins.o): New target.
10005 * builtins.c: New file.
10006 * parse.y (patch_invoke): Use build_call_or_builtin.
10007 * java-tree.h (build_call_or_builtin): Declare.
10008 (initialize_builtins): Declare.
10009 (java_set_exception_lang_code): Removed unused declaration.
10010 (PREDEF_FILENAMES_SIZE): Removed.
10011 (java_tree_index): Added JTI_PREDEF_FILENAMES.
10012 (predef_filenames): New define.
10013 (add_predefined_file): Declare.
10014 (predefined_filename_p): Declare.
10015 * expr.c (expand_invoke): Use build_call_or_builtin.
10017 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10019 * parse.y (patch_switch_statement): Fix format specifier.
10021 2002-01-16 Tom Tromey <tromey@redhat.com>
10023 More for PR java/5365:
10024 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
10026 (process_file): Generate include for
10027 java.lang.UnsupportedOperationExceptions.
10029 2002-01-15 Andreas Jaeger <aj@suse.de>
10031 * .cvsignore: Add man pages.
10033 2002-01-15 Tom Tromey <tromey@redhat.com>
10035 Fix for PR java/5365:
10036 * gjavah.c (process_file): Turn class name into a file name.
10038 2002-01-14 Matthias Klose <doko@debian.org>
10040 * gcj.texi: Fix whitespace and formatting errors in the
10041 synopsis of the man pages. Update copyright.
10043 2002-01-14 Tom Tromey <tromey@redhat.com>
10045 For PR libgcj/5303:
10046 * Make-lang.in (java.install-man): Handle jv-convert man page.
10047 (java.generated-manpages): Added jv-convert.1.
10048 (java.uninstall): Remove jv-convert.1.
10049 (java.maintainer-clean): Likewise.
10050 ($(srcdir)/java/jv-convert.1): New target.
10051 * gcj.texi (Top): Link to jv-convert node.
10052 (Individual utilities): Likewise.
10053 (Invoking jv-convert): New node.
10055 2001-01-10 Jeff Sturm <jsturm@one-point.com>
10056 Martin Kahlert <martin.kahlert@infineon.com>
10058 * jcf-parse.c (get_constant): Don't swap lo/hi for big
10059 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
10061 2002-01-03 Graham Stott <grahams@redhat.com>
10063 * class.c (compile_resource_file): Update copyright date.
10064 Constify filename parameter.
10065 (java-tree.h): Update copyright date.
10066 (compile_resource_file): Constify filename parameter.
10068 2002-01-03 Graham Stott <grahams@redhat.com>
10070 * gcc/jcf-parse.c: Update copyright date.
10071 (yyparse): Constify resource_filename.
10073 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10075 * parse.y (src_parse_roots): Don't needlessly zero init.
10077 2001-12-31 Tom Tromey <tromey@redhat.com>
10079 * parse.y (dump_java_tree): New function.
10080 (source_end_java_method): Call it.
10081 (end_class_declaration): Likewise.
10082 * lang.c (java_decode_option): Call dump_switch_p.
10084 2001-12-28 Tom Tromey <tromey@redhat.com>
10086 * gen-table.pl: Don't process characters after \uffff. Added
10087 comment pointing to input file.
10089 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10091 * gen-table.pl: Const-ify output. Document the location of a
10092 suitable unicode input file.
10094 * chartables.h: Regenerate.
10096 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10098 * chartables.h: Const-ify.
10099 * gjavah.c (options): Likewise.
10100 * jcf-dump.c (options): Likewise.
10101 * jv-scan.c (options): Likewise.
10102 * lex.c (java_start_char_p, java_part_char_p): Likewise.
10103 * parse.y (binop_lookup): Likewise.
10105 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10107 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
10108 the static arrays that are output.
10109 * jvspec.c (jvgenmain_spec): Make static.
10110 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
10111 * keyword.h: Regenerate.
10112 * lang.c (string_option, process_option_with_no, lang_f_options,
10113 lang_W_options): Const-ify.
10114 * lex.c (java_lex): Likewise.
10116 2001-12-21 Richard Henderson <rth@redhat.com>
10118 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
10119 (get_boehm_type_descriptor): ... here. Arrange for the
10120 TREE_TYPE to get set properly.
10122 2001-12-21 Richard Henderson <rth@redhat.com>
10124 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
10125 only if the target requires collect2.
10127 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
10129 2001-12-20 Tom Tromey <tromey@redhat.com>
10132 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
10133 CAN_COMPLETE_NORMALLY for the node.
10134 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
10135 generate code for second branch if first branch can't complete
10137 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
10138 the loop head if the loop body can't complete normally.
10140 2001-12-20 Tom Tromey <tromey@redhat.com>
10143 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
10144 case where `finally' clause can't complete normally.
10146 2001-12-20 Tom Tromey <tromey@redhat.com>
10148 Fixes PR java/5057:
10149 * parse.y (analyze_clinit_body): Added this_class parameter.
10150 Check for more cases where we must keep <clinit>.
10151 (maybe_yank_clinit): Cleaned up flow control.
10153 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10155 * decl.c (java_init_decl_processing): Don't initialize
10156 finit_leg_identifier_node.
10157 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
10158 (finit_leg_identifier_node): Remove.
10159 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
10161 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10163 * mangle.c (mangle_member_name): Don't special-case for
10164 NO_DOLLAR_IN_LABEL.
10165 * mangle_name.c (unicode_mangling_length): Likewise.
10166 (append_unicode_mangled_name): Likewise.
10167 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
10170 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10172 * expr.c (build_java_array_length_access): Don't force null pointer
10173 check unless flag_check_references is set.
10175 2001-12-20 Tom Tromey <tromey@redhat.com>
10177 Fix for PR java/3417:
10178 * parse.y (patch_assignment): Added special processing for
10180 (patch_return): Don't convert booleans to integers, and don't
10181 special-case `null'.
10183 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
10185 * config-lang.in (diff_excludes): Remove.
10187 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
10189 * gcj.texi: Update link to GCC manual.
10191 2001-12-17 Tom Tromey <tromey@redhat.com>
10193 * parse.y (link_nested_class_to_enclosing): Removed useless
10196 2001-12-16 Tom Tromey <tromey@redhat.com>
10198 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
10199 Fixes PR java/5088.
10201 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
10203 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
10204 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
10207 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10209 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
10211 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10213 * decl.c (java_init_decl_processing): Build otable_type correctly.
10214 otable_decl is an otable_type.
10216 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10218 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
10219 otable_type, otable_ptr_type, method_symbol_type,
10220 method_symbols_array_type, method_symbols_array_ptr_type): New
10221 field/global tree definitions.
10222 (flag_indirect_dispatch): New flag.
10223 * decl.c (java_init_decl_processing): Initialize new otable and
10224 otable_syms type nodes and decls. Add new field "index" to
10226 * class.c (build_method_symbols_entry): New function.
10227 (make_method_value): Set "index" to to method's vtable index for
10228 virtual methods when indirect-dispatch is not used.
10229 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
10230 and set vtable_method_count to -1. Set otable and otable_syms field
10231 if indirect-dispatch is used and there was something to put in them.
10232 (build_method_symbols_entry): New function.
10233 (emit_offset_symbol_table): New function.
10234 * expr.c (get_offset_table_index): New function.
10235 (build_invokevirtual): Build array reference to otable at the index
10236 returned by get_offset_table_index, and use the result as the vtable
10238 (build_invokeinterface): Similar.
10239 * jcf-parse.c (yyparse): If indirect-dispatch, call
10240 emit_offset_symbol_table at the end of compilation, after all classes
10241 have been generated.
10242 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
10243 * lang.c (flag_indirect_dispatch): Define.
10244 (lang_f_options): Add indirect-dispatch flag.
10246 2001-12-14 Matthias Klose <doko@debian.org>
10248 * gcj.texi: Markup for man page generation. Document missing
10249 options printed by <tool> --help.
10250 Terminate description of gij's -ms option with a dot.
10251 * Make-lang.in ($(srcdir)/java/*.1): New targets.
10252 (java.generated-manpages java.install-man, java.uninstall,
10253 java-maintainer-clean) Updated.
10255 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
10257 * class.c (get_dispatch_table): Fix java vtable layout
10258 for TARGET_VTABLE_USES_DESCRIPTORS.
10259 * decl.c (java_init_decl_processing): Initialize
10260 alloc_no_finalizer_node, finalize_identifier_node.
10261 * expr.c (class_has_finalize_method): New function.
10262 (expand_java_NEW): Generate calls for finalizer-free allocation.
10263 (build_invokevirtual): Fix java vtable layout for
10264 TARGET_VTABLE_USES_DESCRIPTORS.
10265 * java-tree.h (enum java_tree_index): New entries:
10266 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
10267 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
10268 (class_has_finalize_method): declare.
10269 (HAS_FINALIZER_P): New macro.
10270 * parse.y (patch_invoke): Generate calls for finalizer-free
10273 2001-12-12 Matthias Klose <doko@debian.org>
10275 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
10276 whitespace at end of line.
10278 2001-12-11 Tom Tromey <tromey@redhat.com>
10280 * lex.c (java_init_lex): Define wfl_to_string as
10281 gnu.gcj.runtime.StringBuffer unless generating bytecode.
10283 2001-12-11 Jeff Sturm <jsturm@one-point.com>
10285 * class.c (make_method_value): Use null_pointer_node to
10286 represent empty exception table.
10288 2001-12-10 Tom Tromey <tromey@redhat.com>
10290 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
10292 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
10294 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
10296 2001-12-09 Per Bothner <per@bothner.com>
10298 * check-init.c (current_switch_has_default): New static field.
10299 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
10300 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
10301 DEFAULT_EXPR seen, simulate a default alternative that copies state.
10303 2001-12-09 Tom Tromey <tromey@redhat.com>
10305 * check-init.c (check_init): Don't allow pre- or post- increment
10306 or decrement of final variable.
10307 (final_assign_error): Minor error message rewording.
10309 2001-12-08 Tom Tromey <tromey@redhat.com>
10311 * java-tree.h: Fixed typo.
10313 * gjavah.c (decompile_method): Don't decompile to `return this'
10314 for static methods.
10316 * gjavah.c (cxx_keywords): Re-sorted.
10317 * lex.c (cxx_keywords): Re-sorted.
10319 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
10322 * gjavah.c (print_namelet): Clear subnamelets.
10323 (HANDLE_METHOD): Set `method_printed' earlier.
10325 2001-12-07 Tom Tromey <tromey@redhat.com>
10327 * lang.c (lang_f_options): Added
10328 optimize-static-class-initialization.
10329 (java_decode_option): Removed special case.
10331 2001-12-07 Per Bothner <per@bothner.com>
10333 * check-init.c (check_init): Fix typo freeing memory twice.
10335 2001-12-05 Per Bothner <per@bothner.com>
10337 Restore support for static class initialization optimization.
10338 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
10339 * check-init.c (check_int): At end of BLOCK handle initialization
10340 blocks, which used to be done in java_complete_expand_method but did
10341 not handle the case where check_for_initialization might allocate
10342 more than a word of bits.
10343 * decl.c (lang_make_tree): The smic field is now a tree.
10344 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
10345 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
10347 * parse.y (emit_test_initialization): Combine hash_lookup calls.
10349 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
10350 Change from a hash table to a list.
10351 (struct_lang_decl): Change field 'smic' to match.
10352 * class.c (add_method_1): Initialize
10353 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
10354 * parse.y (adjust_init_test_initialization): Removed - inlined into -
10355 (java_expand_method_bodies): -here, since 'smic' is now a list.
10356 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
10358 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
10360 * class.c (java_hash_compare_tree_node): Fix casts.
10362 2001-12-04 Per Bothner <per@bothner.com>
10364 * check-init.c: Handle definite unassignment to finals in addition
10365 to definite assignment.
10366 (loop_current_locals): New field.
10367 (num_current_locals, int start_current_locals, num_current_words):
10369 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
10370 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
10371 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
10372 (get_variable_decl, check_final_reassigned): New functions.
10373 (check_init, check_bool_init): Modify as needed for checking finals.
10374 (check_for_initialization): Take extra parameter and return void.
10375 Do extra start-up logic to check final fields for assignment.
10376 * parse.y (check_static_final_variable_assignment_flag,
10377 reset_static_final_variable_assignment_flag, check_final_assignment,
10378 check_final_variable_local_assignment_flag,
10379 reset_final_variable_indirect_assignment_flag,
10380 reset_final_variable_global_assignment_flag): Remove functions.
10381 (java_complete_expand_methods, outer_field_access_fix,
10382 patch_assignment): Remove no-longer used logic.
10383 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
10384 * parse.y (register_fields, java_complete_tree): Update accordingly.
10386 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
10387 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
10388 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
10390 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
10392 * java-tree.h (DECL FINAL): New bit-field.
10393 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
10394 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
10395 (DECL_INIT_CALLS_THIS): New macro.
10396 (struct lang_decl): New bit-field init_calls_this.
10397 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
10398 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
10399 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
10400 use it for both local variables and final fields.
10401 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
10403 (struct lang_type): Remove hfv bit-field.
10404 (check_for_initialization): Change to return void.
10406 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
10407 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
10408 * check-init.c (final_assign_error): New helper function.
10409 (check_final_reassigned, check_init): Use it.
10410 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
10412 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
10413 bit-fields to unsigned.
10415 2001-12-03 Per Bothner <per@bothner.com>
10417 * parse.y (patch_binop): Minor constant folding.
10419 * parse.y (build_current_thisn): Shorter 'buffer'.
10421 2001-12-03 Per Bothner <per@bothner.com>
10423 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
10424 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
10425 * jcf-write.c (generate_bytecode_insns): Remove support for
10426 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
10427 * check-init.c (check_init): Likewise.
10429 2001-12-03 Per Bothner <per@bothner.com>
10431 * verify.c (subroutine_nesting): New function.
10432 (verify_jvm_instructions): Use it to fix logic for checking that
10433 we're done with the current subroutine.
10435 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
10436 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
10438 2001-12-03 Per Bothner <per@bothner.com>
10440 * jcf.h: Fix obvious typo in comment.
10441 * typeck.c (build_null_signature): Add comment.
10443 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
10445 * expr.c: Remove leading capital from diagnostic messages, as
10446 per GNU coding standards.
10447 * jcf-io.c: Similarly.
10448 * jcf-parse.c: Similarly.
10449 * jv-scan.c: Similarly.
10450 * jvspec.c: Similarly.
10451 * mangle.c: Similarly.
10453 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
10454 Alexandre Petit-Bianco <apbianco@redhat.com>
10456 * expr.c (build_java_arrayaccess): Call save_expr on array for
10457 correct evaluation order, modified comment, fixed indentation.
10458 * parse.y: (patch_assignment): Correctly extract the array base
10459 from the tree generate by build_java_arrayaccess, added comments.
10460 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
10461 Fixes PR java/3096, PR java/3803, PR java/3965.
10463 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
10465 * expr.c (expand_byte_code): Remove trailing periods from messages.
10466 * jcf-parse.c (load_class, jcf_parse): Similarly.
10467 * jcf-write.c (generate_classfile): Similarly.
10468 * lex.c (java_lex): Similarly.
10470 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10472 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
10474 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
10476 * Make-lang.in (java.generated-manpages): New dummy target.
10478 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10480 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10482 (lang_specific_pre_link): Use set_input to set input_filename.
10483 Append `main' here.
10484 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10485 (main): Fix definition.
10486 Strip `main' from classname.
10489 2001-11-18 Roger Sayle <roger@eyesopen.com>
10491 * parse.h (java_expand_switch): Remove old prototype.
10493 2001-11-18 Tom Tromey <tromey@redhat.com>
10495 Fix for PR java/1401:
10496 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
10498 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
10501 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
10503 * lang.c (finish_parse): Rename to java_finish.
10504 (LANG_HOOKS_FINISH, java_finish): New.
10506 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
10508 * decl.c (init_decl_processing): Rename java_init_decl_processing.
10509 * java-tree.h: New prototype.
10510 * lang.c (java_init): Update prototype. Combine with old init_parse.
10512 2001-11-13 Tom Tromey <tromey@redhat.com>
10514 * gjavah.c (method_signature): New global.
10515 (HANDLE_METHOD): Set it.
10516 (decompile_return_statement): New function.
10517 (decompile_method): Use it.
10518 (print_method_info): Removed `synth' argument.
10520 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10522 * java-tree.h (java_set_yydebug): New.
10523 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
10524 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
10525 (print_lang_decl, print_lang_type, print_lang_identifier,
10526 print_lang_statistics, lang_print_xnode): Remove.
10528 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10530 * jcf-parse.c (init_lex): Remove.
10531 * lang.c (language_string, lang_identify): Remove.
10532 (struct lang_hooks): Constify.
10533 (LANG_HOOKS_NAME): Override.
10534 (init_parse): Update.
10536 2001-11-08 Andreas Franck <afranck@gmx.de>
10538 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
10539 program_transform_name the way suggested by autoconf.
10540 (java.install-common): Also transform auxiliary program names with
10541 program_transform_name.
10543 2001-11-08 Tom Tromey <tromey@cygnus.com>
10545 * parse.y (trap_overflow_corner_case): New rule.
10546 (unary_expression): Use it.
10547 * lex.c (java_init_lex): Don't set minus_seen.
10548 (yylex): Don't use minus_seen. Communicate overflow to parser for
10550 (error_if_numeric_overflow): New function.
10551 * parse.h (minus_seen): Removed field.
10552 (JAVA_RADIX10_FLAG): New define.
10554 2001-11-07 Tom Tromey <tromey@redhat.com>
10556 Patch for PR java/1414:
10557 * parse.y (case_label_list): New global.
10558 (goal): Register case_label_list with GC.
10559 (java_complete_lhs): Save new case on case_label_list.
10560 (patch_switch_statement): Check for duplicate case labels.
10562 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10564 * parse.y (patch_assignment): Removed unused third argument.
10565 (java_complete_lhs): Removed unused third argument to patch_assignment.
10567 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10569 * lang.c: Include langhooks-def.h.
10570 * Make-lang.in: Update.
10572 2001-10-31 Zack Weinberg <zack@codesourcery.com>
10574 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10576 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10578 * mangle.c (find_compression_record_match): Don't match compression
10579 records for package name elements unless they occur at the start of
10580 the name. Fix for PR java/4717.
10582 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10584 * expr.c (expand_java_field_op): Don't special-case references to
10585 java.lang.PRIMTYPE.TYPE.
10586 (build_primtype_type_ref): Removed.
10587 * java-tree.h (build_primtype_type_ref): Remove prototype.
10588 * parse.y (maybe_build_primttype_type_ref): Removed.
10589 (complete_function_arguments): Don't special-case references to
10590 java.lang.PRIMTYPE.TYPE.
10591 (patch_assignment): Likewise.
10592 (array_constructor_check_entry): Likewise.
10594 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10596 * mangle.c (static tree compression_table): Fixed leading comment.
10597 * parse.h (struct parser_ctxt): Fixed field comment.
10598 * parse.y (check_pkg_class_access): New prototype, fixed leading
10599 comment, new parameter used to emit error only if passed as true.
10600 (parse_check_super): Pass extra argument to check_pkg_class_access.
10601 (do_resolve_class): Likewise.
10602 (process_imports): Likewise.
10603 (read_import_dir): Fixed indentation.
10604 (find_in_imports_on_demand): New local class_type_name. Local
10605 node_to_use deleted. while loop changed into for loop. Report
10606 multiple definition only for accessible classes. Improved error
10608 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
10609 assigned to parameter list, fixed indentation. while loop changed
10610 into for loop, restore TREE_CHAIN on local `tem' before the next
10613 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10615 * lang.c (lang_get_alias_set): Deleted.
10617 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10619 * gjavah.c (jni_print_char): Fix thinko in last change.
10621 * gjavah.c (jni_print_char, decode_signature_piece): Use
10622 safe-ctype macros and/or fold extra calls into fewer ones.
10623 * lex.c (java_read_unicode, java_lex): Likewise.
10624 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10625 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10626 * mangle_name.c (append_unicode_mangled_name,
10627 unicode_mangling_length): Likewise.
10629 2001-10-17 Richard Henderson <rth@redhat.com>
10631 * Make-lang.in (java/lang.o): Depend on langhooks.h.
10633 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
10635 * lang.c (langhooks.h): Included.
10636 (LANG_HOOKS_INIT): Redefined.
10637 (LANG_HOOKS_INIT_OPTIONS): Likewise.
10638 (LANG_HOOKS_DECODE_OPTION): Likewise.
10639 (struct lang_hooks lang_hooks): New initialization.
10641 2001-10-11 Per Bothner <per@bothner.com>
10643 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
10644 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10645 The former is simpler, and jcf-write.c handles it better.
10646 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
10647 or WITH_CLEANUP_EXPR.
10648 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
10649 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10651 * parse.y (patch_if_else_statement): If the condition is constant,
10652 optimize away the test.
10654 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10656 * parse.y (patch_cast): Call patch_string on the first operand of
10657 the incoming node, update it if necessary. Fixes PR java/4510.
10659 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10661 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10662 when name qualifier matches a package name.
10664 2001-10-08 Tom Tromey <tromey@redhat.com>
10666 Fix for PR java/4489:
10667 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10668 force a new label when computing `body_block'.
10670 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10672 * jcf-io.c (format_uint): Const-ify.
10673 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10674 * lex.c (java_get_line_col): Likewise.
10675 * parse.y (build_incdec): Likewise.
10677 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10679 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
10680 a NULL enclosing context if appropriate. Fixes PR java/4466.
10682 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
10684 * parse.y (patch_assignment): Use lvalue's original TYPE when
10685 building the final COMPOUND_EXPR.
10686 (try_reference_assignconv): Fixed leading comment.
10688 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
10690 * parse.y (check_final_variable_indirect_assignment): For
10691 COMPOUND_EXPR, return only if finals were found initialized
10692 properly, if not, keep on checking.
10693 (check_final_variable_global_assignment_flag): New local
10694 error_found, set when appropriate and used to decide whether to
10695 report uninitialized finals. Fixed typo in comment.
10697 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10699 * decl.c (init_decl_processing): Fixed typo in predef_filenames
10700 last three initializations. Fixes PR java/4360.
10702 2001-09-21 Richard Henderson <rth@redhat.com>
10704 * class.c (get_dispatch_table): Handle function descriptors.
10705 (build_dtable_decl): Likewise.
10706 * expr.c (build_invokevirtual): Likewise.
10708 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10710 * parse.y (patch_method_invocation): Build class initialization
10711 when static finals are used to qualify method invocation.
10712 Fixes PR java/4366.
10714 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
10716 * parse.h: (WFL_STRIP_BRACKET): Re-written using
10717 build_type_name_from_array_name.
10718 (STRING_STRIP_BRACKETS): New macro.
10719 * parse.y (build_type_name_from_array_name): New function.
10720 (array_creation_expression:): Accumulate []s instead of [s.
10721 (cast_expression:): Accumulate []s instead of [s after cast type
10723 (build_array_from_name): Local string deleted, use
10724 build_type_name_from_array_name.
10725 (build_unresolved_array_type): Accumulate []s instead of [s after
10727 (register_fields): Fixed comment.
10728 (resolve_class): Local name, base deleted, new locals tname and
10729 array_dims. Use build_type_name_from_array_name. Use array_dims to
10731 (purify_type_name): Use STRING_STRIP_BRACKETS.
10733 2001-09-18 Andreas Jaeger <aj@suse.de>
10735 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10736 * jv-scan.c: Likewise.
10738 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10740 * parse.y (patch_method_invocation): Inner class creation context
10741 check not enforced within constructors. Fixes PR java/1873.
10743 2001-09-16 Tom Tromey <tromey@redhat.com>
10745 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10746 NOTE_PUSH for single-case push. Fixes PR java/4189.
10748 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10750 * java-tree.h (TYPE_IMPORT_LIST): New macro.
10751 (TYPE_IMPORT_DEMAND_LIST): Likewise.
10752 (struct lang_type): New fields import_list and import_demand_list.
10753 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10754 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10755 (do_resolve_class): New local saved_enclosing_type, initialized,
10756 passed as parameter to find_in_imports and find_in_imports_on_demand.
10757 (find_in_imports): Added paramater enclosing_type, use its
10758 TYPE_IMPORT_LIST when applicable.
10759 (find_in_imports_on_demand): Added parameter enclosing_type, use
10760 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10761 declaration and initialization.
10762 (fold_constant_for_init): Switch/restore current_class to the
10763 appropriate context.
10765 2001-09-13 Mark Mitchell <mark@codesourcery.com>
10767 * verify.c (verify_jvm_instructions): Fix typo.
10769 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10771 * expr.c (expand_invoke): Const-ification.
10772 * parse.y (patch_method_invocation): Likewise.
10774 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10776 * gjavah.c (cxx_keywords): Const-ification.
10777 * keyword.gperf (java_keyword): Likewise.
10778 * lang.c (java_tree_code_name): Likewise.
10779 * lex.c (cxx_keywords): Likewise.
10780 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10782 2001-09-11 Richard Henderson <rth@redhat.com>
10784 * parse.h (ctxp_for_generation): Mark extern.
10786 2001-09-10 Richard Henderson <rth@redhat.com>
10788 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10790 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10792 * typeck.c (java_array_type_length, build_prim_array_type):
10793 Represent empty arrays by NULL index.
10795 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
10797 * java-tree.h (compile_resource_file): Grouped with other prototypes.
10798 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10800 2001-09-06 Anthony Green <green@redhat.com>
10802 * class.c (O_BINARY): Define if necessary.
10803 (registerResource_libfunc): Declare.
10804 (init_class_processing): Initilize registerResource_libfunc.
10805 (compile_resource_file): New function.
10806 * java-tree.h (resource_name): Declare.
10807 (compile_resource_file): Declare.
10808 * jcf-parse.c (yyparse): Handle compiling java resource files.
10809 * lang.c (java_decode_option): Handle -fcompile-resource option.
10810 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10812 * gcj.texi (Code Generation): Add documentation for -R flag.
10814 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10816 * jcf-write.c (generate_classfile): Issue an error in case of
10817 field/initial value mismatch.
10818 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10819 being initialized and we're generating bytecode.
10820 (java_complete_lhs): In MODIFY_EXPR section: added comments,
10821 set DECL_INITIAL properly when appropriate.
10825 2001-09-01 Per Bothner <per@bothner.com>
10827 * parse.y (maybe_yank_clinit): A field without an initializer is not
10828 relevant. All initializers except static final and constant require
10829 <clinit>, regardless of flag_emit_class_files.
10831 2001-08-31 Per Bothner <per@bothner.com>
10833 * class.c (set_constant_value): When not emitting class files, then a
10834 String ConstantValue is a utf8const_ptr_type.
10836 2001-08-30 Per Bothner <per@bothner.com>
10838 * jcf-write.c (generate_classfile): Check that field is primitive
10839 or string before emitting ConstantValue attribute.
10841 2001-08-30 Per Bothner <per@bothner.com>
10843 * parse.y (resolve_qualified_expression_name): If creating a
10844 COMPOUND_EXPR, set it's type correctly.
10846 2001-08-30 Per Bothner <per@bothner.com>
10848 * jcf-io.c (open_class): Set filename field.
10850 * jcf-parse,c (parse_class_file): Set current_function_decl
10851 for better error message when Code attribute is missing.
10853 * lang.c (put_decl_node, lang_print_error): Re-arrange for
10854 better diagnostics, especially for constructors.
10856 2001-08-30 Per Bothner <per@bothner.com>
10858 * jcf-write.c (generate_classfile): Don't write ConstantValue
10859 attribute if field is not final, for compatibility with jdk.
10861 * jcf-write.c (generate_classfile): Convert ConstantValue values
10862 to correct type. Work-around for front-end bug.
10863 * class.c (set_constant_value): Error if constant has wrong type.
10865 2001-08-30 Per Bothner <per@bothner.com>
10867 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
10868 "Double" are printed at verbosity 1.
10870 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
10872 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
10874 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10876 * parse.y (patch_assignment): Don't verify final re-assignment here.
10877 (java_complete_lhs): Verify assignments to finals calling
10878 patch_assignment. Verify re-assignments to finals before calling
10881 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
10883 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10886 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
10888 * lex.c (java_lex): new local found_hex_digits. Set and then used
10889 in test to reject invalid hexadecimal numbers.
10890 * parse.y (java_complete_tree): Prevent unwanted cast with
10891 initialized floating point finals.
10892 (patch_binop): Emit a warning when detecting a division by zero,
10893 mark result not constant, don't simplify non integer division.
10895 2001-08-28 Per Bothner <per@bothner.com>
10897 * jcf-write.c (generate_bytecode_insns): For increments and
10898 decrements just recurse to push constant. Improvement on Mark's patch.
10900 2001-08-28 Mark Mitchell <mark@codesourcery.com>
10902 * jcf-write.c (generate_bytecode_insns): Generate an integer to
10903 real conversion for increments and decrements of reals.
10905 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10907 * parse.y (resolve_qualified_expression_name): Handle unresolved
10908 qualified expressions, prevent numerical qualifiers, fixed typo.
10911 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10913 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10914 don't report anything but deprecated class when marked so. Handle
10916 (patch_method_invocation): Check deprecation on methods and types.
10917 (patch_binop): code becomes an enum tree_code, added default: to
10918 switch to handle that. Detect division by zero, try to fold and
10919 return before using a subroutine.
10921 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10923 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10924 file smaller than 4 bytes.
10925 * parse.y (check_inner_circular_reference): New function.
10926 (check_circular_reference): Likewise.
10927 (array_initializer:): Accept {,}.
10928 (java_check_circular_reference): Rewritten using
10929 check_circular_reference and check_inner_circular_reference.
10930 (java_complete_expand_method): Unconditionally save and restore
10931 the unpurged exception list.
10932 (build_dot_class_method_invocation): Unmangle signature parameter.
10934 2001-08-21 Tom Tromey <tromey@redhat.com>
10936 * decl.c (init_decl_processing): Add `throws' field to method
10938 * class.c (make_method_value): Compute `throws' field for method.
10940 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10942 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10943 circularity is detected.
10944 (ctors_unchecked_throws_clause_p): Fixed leading comment.
10946 2001-08-17 Richard Henderson <rth@redhat.com>
10948 * class.c (emit_register_classes): Add align parameter to
10949 call to assemble_integer.
10951 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
10953 * jcf-parse.c (load_class): New locals saved and class_loaded. If
10954 loading a class_or_name fails, try considering an innerclass name
10955 and load the enclosing context.
10956 * parse.y (resolve_inner_class): New function.
10957 (find_as_inner_class): Added leading comment.
10958 (register_incomplete_type): Keep the current context as enclosing
10959 context for JDEP_FIELD dependencies.
10960 (do_resolve_class): Locals new_class_decl and super initialized to
10961 NULL. Call resolve_inner_class, explore the enclosing context
10962 superclass if necessary.
10965 2001-08-16 Tom Tromey <tromey@redhat.com>
10967 * jcf-dump.c (main): Updated for change to jcf_path_seal.
10968 * gjavah.c (main): Updated for change to jcf_path_seal.
10969 * lang.c (version_flag): New global.
10970 (java_decode_option): Recognize `-version'.
10971 (java_init): Update for change to jcf_path_seal.
10972 * jcf.h (jcf_path_seal): Added `print' argument.
10973 * jcf-path.c (jcf_path_seal): Added `print' argument.
10975 2001-08-13 Zack Weinberg <zackw@panix.com>
10977 * Make-lang.in (java/decl.o): Update dependencies.
10978 * decl.c: Include libfuncs.h, don't include toplev.h.
10980 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10982 * decl.c (init_decl_processing): exception_type_node,
10983 class_not_found_type_node, and no_class_def_found_type_node
10984 initialized. predef_filenames augmented accordingly.
10985 instinit_identifier_node initialized.
10986 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10987 * java-tree.h (enum java_tree_index): New entries
10988 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10989 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10990 (exception_type_node): New macro.
10991 (class_not_found_type_node): Likewise.
10992 (no_class_def_found_type_node): Likewise.
10993 (instinit_identifier_node): Likewise.
10994 (PREDEF_FILENAMES_SIZE): Adjusted.
10995 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10996 (struct lang_type): Fixed typo in bitfield name.
10997 (DECL_INSTINIT_P): New macro.
10998 (ID_INSTINIT_P): Likewise.
10999 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
11001 * parse.y (encapsulate_with_try_catch): New function.
11002 (generate_instinit): Likewise.
11003 (build_instinit_invocation): Likewise.
11004 (ctors_unchecked_throws_clause_p): Likewise.
11005 (add_instance_initializer): Deleted.
11006 (build_instance_initializer): Likewise.
11007 (in_instance_initializer): Likewise.
11008 (check_method_redefinition): instinit$ not to be verified.
11009 (java_complete_expand_methods): Generate instinit$, simplified code.
11010 (build_dot_class_method): Eliminated unnecessary locals. Use
11011 encapsulate_with_try_catch, removed unnecessary code.
11012 (fix_constructors): New local iii. Use build_instinit_invocation.
11013 (patch_method_invocation): Added comment.
11014 (maybe_use_access_method): Don't consider instinit$.
11015 (find_applicable_accessible_methods_list): Shorten the search for
11017 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
11018 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
11019 (patch_throw_statement): Likewise. Fixed typo.
11021 2001-08-12 David Edelsohn <edelsohn@gnu.org>
11024 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
11025 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
11027 (lang_specific_pre_link): Use set_input to set input_filename.
11028 Append `main' here.
11029 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
11030 (main): Fix definition.
11031 Strip `main' from classname.
11034 2001-08-11 Zack Weinberg <zackw@panix.com>
11036 * lex.h: Don't include setjmp.h. Don't define
11037 SET_FLOAT_HANDLER or prototype set_float_handler.
11039 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11041 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
11042 `poplevel' in the right order.
11044 2001-08-09 Richard Henderson <rth@redhat.com>
11046 * Make-lang.in (class.o): Depend on TARGET_H.
11047 * class.c (emit_register_classes): Use target hooks instead of
11048 assemble_constructor and assemble_destructor.
11050 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
11052 * check-init.c (flags.h): Include
11053 (check_init): Don't report uninitialized static class
11054 initialization flags, don't free bit index when doing static class
11055 initialization optimization.
11056 (check_for_initialization): Return type changed to `unsigned int.'
11057 (attach_initialized_static_class): New function.
11058 * class.c (add_method_1): Create the initialized static class
11059 table if necessary.
11060 (finish_class): Always emit deferred inline methods.
11061 * decl.c (emit_init_test_initialization): Moved to expr.c
11062 (complete_start_java_method): Don't traverse
11063 DECL_FUNCTION_INIT_TEST_TABLE.
11064 (lang_mark_tree): Mark hash tables in function decls.
11065 * expr.c (emit_init_test_initialization): Moved from decl.c.
11066 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
11067 initialization flag, set DECL_CONTEXT and
11068 LOCAL_CLASS_INITIALIZATION_FLAG.
11069 (java_lang_expand_expr): Emit initialization code for static class
11070 initialized flags when entering block, if necessary.
11071 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
11072 * java-tree.h (flag_optimize_sci): New global variable declaration.
11073 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
11074 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
11075 (LOCAL_FINAL_P): Fixed typo in comment.
11076 (FINAL_VARIABLE_P): Likewise.
11077 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
11078 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
11079 (struct lang_decl): New fields `ict', `smic' and `cif.'
11080 (check_for_initialization): New returned value for global.
11081 (attach_initialized_static_class): New global function.
11082 (STATIC_CLASS_INIT_OPT_P): New macro.
11083 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
11084 * lang.c (java_decode_option): Handle
11085 `-fno-optimize-static-class-initialization'
11086 * parse.y (start_complete_expand_method): New function.
11087 (java_expand_method_bodies): Likewise.
11088 (attach_init_test_initialization_flags): Likewise.
11089 (adjust_init_test_initialization): Likewise.
11090 (emit_test_initialization): Likewise.
11091 (java_complete_expand_methods): Nullify abstract and native method
11093 (java_complete_expand_method): New locals `fbody', `block_body'
11094 and `exception_copy.' Reorganized: directly return on empty method
11095 bodies, call `start_complete_expand_method', remember definitely
11096 initialized static class in function, don't expand method bodies.
11097 (java_expand_classes): Call `java_expand_method_bodies' before
11098 `finish_class' when compiling to native.
11099 (resolve_expression_name): Use `orig' after building outer class
11101 (patch_invoke): Remember static method invocations.
11103 2001-08-06 Richard Henderson <rth@redhat.com>
11105 * class.c (emit_register_classes): Pass a symbol_ref and priority
11106 to assemble_constructor.
11108 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
11110 * java-tree.h (all_class_filename): New macro.
11111 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
11112 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
11113 newly created IDENTIFIER_NODE to `all_class_filename.'
11115 2001-08-01 Jeff Sturm <jsturm@one-point.com>
11117 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
11118 Use ggc_add_tree_root to register roots.
11120 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11122 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
11123 second operand calling check_init.
11124 * decl.c (complete_start_java_method): Swaped second and third
11125 arguments while creating WITH_CLEANUP_EXPR node.
11126 * jcf-write.c (generate_bytecode_insns): Use second operand
11127 instead of third when handling WITH_CLEANUP_EXPR.
11128 * parse.y (java_complete_lhs): Expand second operand of
11129 WITH_CLEANUP_EXPR nodes.
11130 (patch_synchronized_statement): Swaped second and third arguments
11131 while creating WITH_CLEANUP_EXPR node.
11133 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
11135 * parse.y (create_interface): Avoid cyclic inheritance report when
11136 syntax error encountered during class definition.
11139 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
11141 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
11143 (lang_specific_pre_link): Use set_input to set input_filename.
11144 Append `main' here.
11145 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
11146 (main): Fix definition.
11147 Strip `main' from classname.
11150 2001-07-18 Tom Tromey <tromey@redhat.com>
11153 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
11154 * lex.c (java_new_lexer): Use ICONV_CONST.
11155 (java_read_char): Likewise.
11156 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
11157 (jv-scan$(exeext)): Likewise.
11159 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
11161 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
11162 * parse.y (check_class_interface_creation): Allow `private' if the
11163 enclosing is not an interface.
11164 (create_interface): Interface tagged public if the enclosing
11165 context is an interface.
11166 (create_class): Class tagged public if the enclosing context
11170 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
11172 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
11175 2001-07-14 Tim Josling <tej@melbpc.org.au>
11177 * check-init.c (check_init): Remove references to EXPON_EXPR.
11179 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
11181 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
11182 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
11185 2001-07-13 Tom Tromey <tromey@redhat.com>
11187 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
11190 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
11192 * parse.y (patch_method_invocation): Don't override primary if one
11193 is already provided, but let this$<n> be built. Fixed comment.
11195 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
11197 * parse.y (empty_statement:): Report empty statement error only
11198 when found at class declaration level.
11201 2001-07-12 Tom Tromey <tromey@redhat.com>
11203 * expr.c (expand_load_internal): New function.
11204 (LOAD_INTERNAL): Use it.
11206 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
11208 * parse.y (verify_constructor_super): Compare anonymous class ctor
11209 args with `valid_method_invocation_conversion_p.'
11212 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11214 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
11215 `-fsyntax-only.' Fixes PR java/3248
11217 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11219 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
11221 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11223 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
11224 current function is static. Fixes PR java/1970
11226 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11228 * parse.y (patch_method_invocation): Add enclosing context to ctor
11229 calls if necessary. Fixes PR java/2953
11231 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11233 * parse.y (resolve_package): Abort if qualified expression member
11235 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
11238 2001-07-07 Zack Weinberg <zackw@stanford.edu>
11240 * verify.c: Don't use // comments.
11242 2001-07-05 Tom Tromey <tromey@redhat.com>
11244 * lang.c (flag_assume_compiled): Removed.
11245 * java-tree.h (flag_assume_compiled): Removed.
11246 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
11247 -fhash-synchronization, -fuse-divide-subroutine,
11248 -fcheck-references, -femit-class-file, -femit-class-files,
11249 -fassume-compiled. Updated --encoding information. Changed
11250 -foutput-class-dir to `-d'.
11252 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
11254 * jcf-parse.c (parse_class_file): Add lineno parameter to
11255 debug_start_source_file call.
11257 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
11259 * gcj.texi: Use gpl.texi.
11260 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
11261 dependencies and use doc/include in search path.
11263 2001-07-03 Jeff Sturm <jsturm@one-point.com>
11265 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
11266 `this'. If so, don't build instance initializers.
11268 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
11270 * parse.y (resolve_expression_name): Improved error message for
11271 inner class cases. Fixes PR java/1958
11273 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
11275 * lang.c: #include diagnostic.h
11276 (lang_print_error): Add a `diagnostic_context *' parameter.
11277 (java_dummy_print): Likewise.
11278 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
11280 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11282 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
11283 * jcf.h (typedef struct JCF): New bitfield `finished.'
11284 (JCF_FINISH): Set `finished.'
11285 (JCF_ZERO): Reset `finished.'
11288 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11290 * parse.y (class_body_declaration:): Don't install empty instance
11294 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11296 * class.c (set_super_info): Call `set_class_decl_access_flags.'
11297 (set_class_decl_access_flags): New function.
11298 * java-tree.h (set_class_decl_access_flags): New prototype.
11299 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
11300 (parse_class_file): New local `decl_max_locals.' Take wide types
11301 into account to compute DECL_MAX_LOCALS.
11302 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
11305 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
11307 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
11309 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11311 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
11312 * parse.y (do_resolve_class): Moved comments out to leading comment
11313 section. Removed local `start', New local `_ht' and
11314 `circularity_hash.' Record `enclosing' in hash table and search
11315 it to detect circularity. Use `enclosing' as an argument to
11316 `lookup_cl.' Free the hash table when done.
11318 2001-06-19 Tom Tromey <tromey@redhat.com>
11320 * lex.c (java_read_char): Disallow invalid and overlong
11321 sequences. Fixes PR java/2319.
11323 2001-06-05 Jeff Sturm <jsturm@one-point.com>
11325 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
11327 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11329 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
11330 arguments accordingly.
11332 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
11334 * gcj.texi: Move contents to just after title page.
11336 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
11338 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
11340 (patch_incomplete_class_ref): Build the class ref, build the class
11341 init if necessary, complete the tree.
11344 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11346 * parse.y (lookup_field_wrapper): Test `name' code.
11347 (resolve_qualified_expression_name): Test `qual_wfl' code.
11348 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
11349 handle `qual_wfl' by code.
11350 (maybe_build_primttype_type_ref): Test `wfl' code.
11352 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11354 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
11356 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
11357 the dvi file in the java directory.
11359 2001-05-25 Sam TH <sam@uchicago.edu>
11361 * gen-table.pl javaop.h jcf.h lex.h,
11362 parse.h: Fix header include guards.
11364 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
11366 * jv-scan.c (version): Update copyright year.
11368 2001-05-21 Per Bothner <per@bothner.com>
11370 * jcf-parse.c (read_class): If class is from .class or .zip file
11371 and it's already been read, don't push/pop parser context.
11373 2001-05-18 Per Bothner <per@bothner.com>
11375 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
11376 command line so the jvgenmain-generated main program comes first.
11378 2001-05-15 Tom Tromey <tromey@redhat.com>
11380 * class.c (build_utf8_ref): Don't generate identifier based on
11381 utf8const contents.
11383 2001-05-12 Richard Henderson <rth@redhat.com>
11385 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
11386 * expr.c (java_lang_expand_expr): Expand it.
11387 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
11388 calling build_exception_object_ref.
11389 * parse.y (catch_clause_parameter): Likewise.
11390 (build_dot_class_method): Likewise.
11391 (try_reference_assignconv): Likewise.
11392 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
11393 * jcf-write.c (generate_bytecode_insns): Likewise.
11395 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11397 * parse.y (build_unresolved_array_type): Set
11398 EXPR_WFL_QUALIFICATION on the newly created wfl.
11399 Fixes PR java/2538. Fixes PR java/2535.
11401 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11403 * parse.y (fix_constructors): Removed unnecessary assignment to
11404 local. Moved assignment to `this$<n>', fixed comments and
11406 (build_wfl_wrap): Fixed indentation.
11407 Fixes PR java/2598, java/2579 and java/2658.
11409 2001-05-03 Mo DeJong <mdejong@redhat.com>
11411 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
11412 check for byte swap.
11414 2000-05-02 Jeff Sturm <jsturm@one-point.com>
11416 * expr.c (build_class_init): Move MODIFY_EXPR
11417 outside of COND_EXPR. Remove variable `call'.
11419 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11421 * decl.c: NULL_PTR -> NULL.
11422 * jcf-write.c: Likewise.
11424 2001-05-01 Tom Tromey <tromey@redhat.com>
11426 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
11427 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
11428 * gcj.texi: Updated copyright text. Include fdl.texi.
11429 (Top): Link to new node.
11431 2001-05-01 Per Bothner <per@bothner.com>
11433 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
11435 2001-05-01 Per Bothner <per@bothner.com>
11437 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
11438 import_list contains the name, not the TREE_PURPOSE.
11440 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11442 * jcf-io.c (read_zip_member): Cast to long in comparison with
11445 * jvspec.c (lang_specific_driver): Initialize variables.
11447 * mangle.c (find_compression_record_match): Likewise.
11449 * typeck.c (build_null_signature): Provide static prototype. Mark
11450 parameter with ATTRIBUTE_UNUSED.
11452 * verify.c (verify_jvm_instructions): Initialize variable.
11454 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11456 * parse.y (do_resolve_class): Check for cyclic inheritance during
11457 inner class resolution.
11459 2001-04-27 Per Bothner <per@bothner.com>
11461 * parse.y (java_expand_classes): Don't change ctxp_for_generation
11462 while iterating, since that could cause gc to lose stuff.
11464 2001-04-26 Per Bothner <per@bothner.com>
11466 Fix method search wrt scope of inner classes to match JLS2.
11467 * typeck.c (build_null_signature): New static function.
11468 (has_method): New function. Uses build_null_signature and lookup_do.
11469 * java-tree.h (has_method): New declaration.
11470 * parse.y (find_applicable_accessible_methods_list): Do not search
11471 context of inner classes here.
11472 (patch_method_invocation): Search scope, ie. current and outer clases,
11473 for method matching simple name, to find class.
11475 2001-04-26 Per Bothner <per@bothner.com>
11477 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
11478 Fix thinko: If a single case, use if_icmpeq, not ifeq.
11480 * constants.c (find_methodref_with_class_index): New function.
11481 (find_methodref_index): Use find_methodref_with_class_index.
11482 * java-tree.h (find_methodref_with_class_index): New declaration.
11483 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
11484 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
11485 If context changed from interface to class, don't use invokeinterface.
11487 2001-04-25 Per Bothner <per@bothner.com>
11489 * verify.c (verify_jvm_instructions): For field instructions,
11490 check that field index is valid. For invoke instructions, check that
11491 method index is valid.
11493 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
11495 * config-lang.in (target_libs): Copy from $libgcj_saved.
11497 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11499 * decl.c (init_decl_processing): Add new class "protectionDomain"
11501 * class.c (make_class_data): Set initial value for "protectionDomain".
11503 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11505 * jvspec.c (lang_specific_driver): Fix memory allocation
11506 deficit, by using concat in lieu of xmalloc/sprintf.
11508 2001-04-20 Per Bothner <per@bothner.com>
11510 Fixes to compile multiple .class files at once.
11511 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
11512 * java-tree.h (CLASS_PARSED_P): New macro.
11513 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
11514 * jcf-parse.c (jcf_parse_source): Inline into read_class.
11515 (read_class): Avoid some code duplication.
11516 Don't call JCF_FINISH for a .class file - might be needed later.
11517 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
11518 rather than CLASS_LOADED_P, since latter implies class laid out.
11519 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
11520 * parse.y: Don't need to set CLASS_LOADED_P for array types.
11522 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11524 * Make-lang.in (java/boehm.o): Depend on toplev.h.
11526 * boehm.c: Include toplev.h.
11528 2001-04-06 Tom Tromey <tromey@redhat.com>
11529 Alexandre Petit-Bianco <apbianco@redhat.com>
11531 Fix for PR gcj/1404 and PR gcj/2332:
11532 * parse.y (build_array_from_name): If we use the type_wfl then
11533 accumulate dimensions from the original type as well.
11534 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
11536 2001-04-06 Tom Tromey <tromey@redhat.com>
11538 * parse.y (analyze_clinit_body): Return true if the second operand
11539 of a METHOD_EXPR is nonzero.
11541 2001-04-06 Tom Tromey <tromey@redhat.com>
11543 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
11545 ($(srcdir)/java/parse.c): Likewise.
11547 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
11549 * gcj.texi: Use `which-gcj' instead of `which-g77.'
11550 (version-gcc): Initialized.
11551 (which-gcj): Likewise.
11553 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11555 * java-tree.h (struct lang_decl): New macro
11556 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
11557 * parse.y (build_instance_initializer): New function.
11558 (add_instance_initializer): Use it.
11559 (java_fix_constructors): Set `current_class' before fix pass.
11560 (fix_constructors): Just return if already fixed. Move `super()'
11561 invocation ahead. Use `build_instance_initializer.'
11562 Fixes PR java/1315.
11564 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11566 * parse.y (resolve_qualified_expression_name): Pass field's
11567 DECL_CONTEXT to `not_accessible_p.'
11568 (not_accessible_p): Changed parameters order in `inherits_from_p'
11571 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
11573 * lang-options.h: Add flag_check_references.
11575 2001-04-04 Per Bothner <per@bothner.com>
11577 * java-tree.h (CONSTANT_VALUE_P): New macro.
11578 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
11579 * parse.y (maybe_build_class_init_for_field): New static function.
11580 (resolve_expression_name, resolve_field_access): Use
11581 maybe_build_class_init_for_field instead of build_class_init
11582 This does not do the init if the field is compile-time-constant.
11583 (resolve_field_access): Simplify.
11585 * parse.y (fold_constant_for_init): Merge test into switch.
11587 2001-04-03 Zack Weinberg <zackw@stanford.edu>
11589 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
11591 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
11593 2001-04-02 Zack Weinberg <zackw@stanford.edu>
11595 * expr.c (pop_type_0): Save the result of the first
11596 lang_printable_name call in a scratch buffer, so it
11597 won't be clobbered by the second call.
11599 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
11601 * parse-scan.y (array_type:): Rewritten.
11602 (type_declaration:): `empty_statement' replaces `SC_TK.'
11603 (class_member_declaration:): `empty statement' added.
11604 (method_body:): Simplified.
11605 (static_initializer:): Likewise.
11606 (primary_no_new_array:): Use `type_literals.'
11607 (type_literals:): New rule.
11608 (dims:): Set and update `bracket_count.'
11609 Fixes PR java/1074. Fixes PR java/2412.
11611 2001-03-28 Hans Boehm <boehm@acm.org>
11613 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
11614 (get_boehm_type_descriptor): Set type on returned value to be a
11615 pointer length integer.
11617 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11619 * expr.c (pop_type_0): Call `concat' rather than building the
11621 (pop_type): Add format specifier in call to `error'.
11623 * parse.y (patch_method_invocation): Avoid casting away
11626 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
11628 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11630 2001-03-28 Richard Henderson <rth@redhat.com>
11632 IA-64 ABI Exception Handling:
11633 * Make-lang.in (except.o): Don't depend on eh-common.h.
11634 * check-init.c (check_init): Handle EXC_PTR_EXPR.
11635 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11636 [soft_exceptioninfo_call_node]: Remove.
11637 [eh_personality_libfunc, lang_eh_runtime_type]: New.
11638 (end_java_method): No emit_handlers.
11639 * except.c (java_set_exception_lang_code): Remove.
11640 (method_init_exceptions): Don't call it.
11641 (prepare_eh_table_type): No CATCH_ALL_TYPE.
11642 (build_exception_object_ref): New.
11643 (expand_end_java_handler): Update for except.h name changes.
11644 (emit_handlers, expand_resume_after_catch): Remove.
11645 * expr.c (java_lang_expand_expr): Update for except.h name changes.
11646 (process_jvm_instruction): Use build_exception_object_ref.
11647 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11648 (soft_exceptioninfo_call_node): Remove.
11649 (build_exception_object_ref): Declare.
11650 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11651 soft_exceptioninfo_call_node. Move processing ...
11652 [EXC_PTR_EXPR]: ... here.
11653 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11654 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11655 (source_end_java_method): No java_set_exception_lang_code or
11657 (build_dot_class_method): Use build_exception_object_ref.
11658 (try_reference_assignconv): Check EXC_PTR_EXPR not
11659 soft_exceptioninfo_call_node.
11661 2001-03-28 Richard Henderson <rth@redhat.com>
11663 * java-tree.h (throw_node): Define as a single member of
11664 java_global_trees instead of a separate array.
11665 (JTI_THROW_NODE): New.
11666 * decl.c (throw_node): Don't declare.
11667 (init_decl_processing): Init a scalar throw_node.
11668 Don't register it for gc.
11669 * check-init.c (check_init): Reference scalar throw_node.
11670 * expr.c (build_java_athrow): Likewise.
11671 * jcf-write.c (generate_bytecode_insns): Likewise.
11672 * parse.h (BUILD_THROW): Likewise.
11674 2001-03-28 Richard Henderson <rth@redhat.com>
11676 * decl.c (end_java_method): Do not save and restore
11677 flag_non_call_exceptions.
11678 * parse.y (source_end_java_method): Likewise.
11679 * lang.c (flag_exceptions): Don't declare.
11680 (java_init_options): Set flag_non_call_exceptions. Set
11681 flag_exceptions here ...
11682 (java_init): ... not here.
11684 2001-03-27 Richard Henderson <rth@redhat.com>
11686 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11687 exceptions_via_longjmp.
11689 * lang.c (flag_new_exceptions): Don't declare it.
11690 (java_init_options): Or set it.
11692 2001-03-27 Richard Henderson <rth@redhat.com>
11694 * decl.c (end_java_method): Rename asynchronous_exceptions to
11695 flag_non_call_exceptions.
11696 * parse.y (source_end_java_method): Likewise.
11698 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11700 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11702 2001-03-26 Mark Mitchell <mark@codesourcery.com>
11704 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11706 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
11708 * parse.y (find_as_inner_class): Follow current package
11709 indications not to mistakingly load an unrelated class.
11711 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11713 * constants.c (PUTN): Use memcpy, not bcopy.
11715 * lex.c (java_read_char): Use memmove, not bcopy.
11717 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11719 2001-03-23 Per Bothner <per@bothner.com>
11721 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
11722 macro for better error pin-pointing.
11723 * java-tree.h: Fix typo in comment.
11725 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
11726 Don't include jsr/goto in exception range.
11727 Check if start and end of exception range are the same (also TRY_EXPR).
11728 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11729 However, do emit the following goto even if try_block is empty.
11730 Defer freeing exception_decl until after the finalizer, to make
11731 sure the local isn't reused in the finalizer. Fixes PR java/1208.
11733 * parse.y (java_complete_lhs): If the try-clause is empty, just
11734 return the finally-clause and vice versa.
11736 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
11738 * gcj.texi (Input Options): documented the check for attribute
11739 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11740 * java-tree.h (flag_force_classes_archive_check): Declared extern.
11741 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11742 (jcf_parse): Check for the right classes archive if necessary.
11743 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11744 (jcf_parse_fields): Fixed indentation.
11745 * jcf-write.c (append_gcj_attribute): New function.
11746 (generate_classfile): Compute the attribute count, invoke
11747 `append_gcj_attribute'.
11748 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11749 turned into bit-fields. New bit-field `right_zip.'
11750 (JCF_ZERO): Set `right_zip' to zero.
11751 * lang-options.h (-fforce-classes-archive-check): Added flag.
11752 * lang.c (flag_force_classes_archive_check): New flag.
11753 (lang_f_options): New entry `force-classes-archive-check.'
11754 Fixes PR java/1213.
11756 2001-02-07 Andrew Haley <aph@redhat.com>
11758 * gcj.texi (Configure-time Options): Add -fcheck-references.
11759 * expr.c (build_java_indirect_ref): New function.
11760 (java_check_reference): New function.
11761 (build_java_array_length_access): Use build_java_indirect_ref to
11762 check for null references.
11763 (build_java_arrayaccess): Likewise.
11764 (build_get_class): Likewise.
11765 (build_field_ref): Likewise.
11766 (invoke_build_dtable): Likewise.
11767 (build_invokeinterface): Likewise.
11768 * lang.c (lang_f_options): Add flag_check_references.
11769 * jvspec.c (jvgenmain_spec): Add flag_check_references.
11770 * java-tree.h (flag_check_references): New variable.
11771 * lang.c (flag_check_references): Likewise.
11772 * parse.y (patch_invoke): Use java_check_reference.
11773 (patch_assignment): Allow for extra nesting in
11774 _Jv_CheckArrayStore.
11776 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
11778 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11779 * lex.c (cxx_keywords): Likewise.
11781 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11783 * parse.y (qualify_ambiguous_name): Broaden `length'
11784 recognition. Help MODIFY_EXPR be resolved as expression names.
11785 Fixes PR java/2066. Fixes PR java/2400.
11787 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
11789 * gjavah.c (process_file): Mark interface definitions with
11790 "__attribute__ ((java_interface))".
11792 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11794 * class.c (layout_class): Fixed push_super_field's second
11795 argument. Fixes PR java/2333.
11796 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11797 too early to lay innerclasses out.
11799 2001-03-20 Tom Tromey <tromey@redhat.com>
11800 Alexandre Petit-Bianco <apbianco@redhat.com>
11802 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11803 inside an array reference. Insertion of the array store check
11804 rewritten. Fixes PR java/2299.
11806 2001-03-20 Tom Tromey <tromey@redhat.com>
11808 * lex.c (java_read_unicode): Only accept leading `u's.
11810 2001-03-20 Tom Tromey <tromey@redhat.com>
11812 * jcf-parse.c (read_class): Initialize `class'.
11814 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11816 * jcf_parse.c (jcf_parse): Eliminate unused variable.
11818 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11820 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11821 (layout_class): Likewise.
11822 (layout_class_method): Likewise.
11823 (emit_register_classes): Likewise.
11824 * decl.c (builtin_function): Likewise.
11825 (give_name_to_locals): Likewise.
11827 2001-03-19 Per Bothner <per@bothner.com>
11829 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
11830 before trying to load an inner class.
11832 Fixes to process to command-line .class files in two passes.
11833 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
11834 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
11835 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
11836 * class.c (is_compiled_class): Fix for renamed flag.
11837 * parse.y (maybe_create_class_interface_decl): Likewise.
11838 * jcf-parse.c (yyparse): Also set if compiling .class files.
11839 * jcf-parse.c (read_class); Read current_class.
11840 (jcf_parse): Make static.
11841 (load_inner_classes): New function, with code moved from jcf_parse,
11842 because we need to inner classes after the command-line files are read.
11843 (yyparse): Set finput to NULL when it doesn't need to be closed.
11844 Reduce use of main_jcf (basically only for archive) and
11845 use finput instead of main_jcf->read_state.
11846 Inline jcf_figure_file_type into yyparse.
11847 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11848 Defer load_inner_classes and parse_class_file to a second pass,
11849 after we've correctly mapped command-line .clas fiels to classes.
11850 (jcf_figure_file_type): Removed.
11851 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
11852 (JCF_ZERO): Also clear zipd field.
11853 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
11855 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11857 * jcf-parse.c (yyparse): Change ch from char * to char.
11859 2001-03-19 Per Bothner <per@bothner.com>
11861 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
11862 Add constructed filelist-file at end, following -xjava. Thus any .o
11863 and library files are not affected by the -xjava. Also wrap
11864 explicit @FILE with -xjava and -xnone.
11866 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
11868 * class.c (build_static_field_ref): Call make_decl_rtl() after
11869 setting the DECL_EXTERNAL flag.
11871 2001-03-17 Per Bothner <per@bothner.com>
11873 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
11875 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
11876 when result is is needed (target is STACK_TARGET).
11878 * parse.h (JDEP_SOLV): Removed.
11879 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
11881 * parse.y (incomplete_class_list): Removed.
11882 (obtain_incomplete_type): Don't use or set incomplete_class_list.
11883 It doesn't work if resolve_class changes the name of an array type
11884 that is on the list and then someone else looks for the modified name.
11885 Also, seems liable to break when compiling multiple source files at
11886 once. So the simplest is to just remove incomplete_class_list -
11887 it is only a minor space win and it is not even clear it saves time.
11889 * parse.y (resolve_class): Remove unneeded promote_type.
11891 2001-03-15 Per Bothner <per@bothner.com>
11893 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
11894 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
11895 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11896 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11898 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
11899 * parse.y (java_expand_classes): Likewise.
11901 * parse.y (expand_start_java_method): Was only called once and had a
11902 misleading name, so inline in caller java_complete_expand_method.
11903 (enter_a_block): Likewise inline in enter_block and remove.
11905 Remove junk from when gcc/java was created (by copying from C/C++).
11906 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
11907 (struct binding_level): Remove fields keep, keep_if_subblocks,
11908 more_cleanups_ok, have_cleanups (which have never been used).
11909 (pushlevel, poplevel): Remove related useless code.
11911 * class.c (make_class_data): The class_dtable_decl (i.e. the
11912 vtable for Class) should be external, except when compiling Class.
11914 * jvspec.c (lang_specific_driver): Fix -C handling.
11915 Check -save-temps to see if temp @FILE should be deleted.
11916 Follow-up to/fix for February 16 patch.
11918 * verify.c (verify_jvm_instructions): Better error msgs for dup.
11919 (type_stack_dup): Remove no-longer neded error check.
11921 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
11923 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11924 to 'for_pointer'. If this type is for a pointer (argument) mangling,
11925 don't surround the element with 'N..E' if the type name is
11928 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11930 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11931 DECL_RTL_SET_P, etc.
11932 (make_method_value): Likewise.
11933 (get_dispatch_table): Likewise.
11935 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11937 2001-03-07 Tom Tromey <tromey@redhat.com>
11939 * config-lang.in (lang_requires): Define.
11941 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
11943 * typeck.c (convert): Check flag_unsafe_math_optimizations,
11944 not flag_fast_math.
11946 2001-03-05 Per Bothner <per@bothner.com>
11948 Fix a problem where rest_of_decl_compilation applied to
11949 class_dtable_decl causes problems because it was done too early,
11950 before output file was opened.
11951 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
11952 * class.c (class_dtable_decl): Add macro - element of class_roots.
11953 (make_class_data): Define class_dtable_decl.
11954 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
11956 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11958 * java/class.c, java/decl.c, java/java-tree.h: Replace all
11959 uses of 'boolean' with 'bool'.
11961 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11963 * lang-specs.h: Add zero initializer for cpp_spec field to all
11966 2001-02-16 Per Bothner <per@bothner.com>
11968 Handle compiling multiple input files at once, and @FILE syntax.
11969 * gcj.texi: Updated documentation to match.
11970 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
11971 * jcf-parse.c (parse_source_file): Split into ...
11972 (parse_source_file_1): New function - and:
11973 (parse_source_file_2): New function.
11974 (yyparse): On -ffilelist-file, open and scan named file.
11975 On first pass over files, only do parse_source_file_1.
11976 A new second pass calls parse_source_file_2 for each file to compile.
11977 (init_jcf_parse): Call init_src_parse.
11978 * jvspec.c (INDIRECT_FILE_ARG): New flag.
11979 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
11980 as multiple input file combined in one compilation.
11981 * lang-options.h: Add -ffilelist-file
11982 * lang.c (flag_filelist_file): New flag variable.
11983 (lang_f_options): Handle -ffilelist-file.
11984 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11985 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
11986 gclass_list - use global fields of src_parse_roots instead.
11987 * parse.y (src_parse_roots): New array.
11988 (incomplete_class_list, gclass_list): New macros.
11989 (push_parser_context, java_pop_parser_context,
11990 java_parser_context_resume): Don't fiddle with deleted fields.
11991 (various): Use incomplete_class gclass_list and global macros
11992 instead of parse_ctxt fields - the lists are global.
11993 (init_src_parse): New function.
11995 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11997 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11999 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
12001 * parse.y (check_inner_class_access): Moved declaration of local
12002 `enclosing_decl_type' to the right location.
12004 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
12006 * parse.y (parser_check_super_interface): Don't call
12007 check_pkg_class_access for an inner interface.
12008 (parser_check_super): Don't call check_pkg_class_access for inner
12010 (do_resolve_class): Simplify enclosing type loop. Don't call
12011 check_pkg_class_access if CL and DECL are not set.
12012 (find_in_imports_on_demand): Set DECL if class_type needed to be
12013 loaded. Don't call check_pkg_class_access for an inner class.
12014 (check_inner_class_access): Rewritten to implement member access
12015 rules as per spec 6.6.1.
12016 (check_pkg_class_access): Handle the empty package correctly.
12017 (in_same_package): New function. Determine if two classes are in the
12020 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
12022 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
12023 method into array types.
12024 * parse.y (patch_method_invocation): Bypass access check on clone call
12027 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
12029 * expr.c (build_instanceof): Check for arrays when trying fold to
12032 2001-02-15 Jim Meyering <meyering@lucent.com>
12034 * Make-lang.in (java.install-common): Depend on `installdirs'.
12035 (java.install-info): Likewise.
12037 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
12039 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
12041 2001-02-14 Tom Tromey <tromey@redhat.com>
12042 Alexandre Petit-Bianco <apbianco@cygnus.com>
12044 Fix for PR java/1261.
12045 * typeck.c (build_java_array_type): Add public `clone' method to
12047 * parse.y (resolve_qualified_expression_name): Use current_class
12048 when checking for inaccessibility.
12049 (patch_method_invocation): Fixed error message when accessibility
12050 denied. Added `from_super' argument.
12052 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
12054 * parse.y (resolve_class): Don't build a fake decl. Use the one
12056 * typeck.c (build_java_array_type): Build and assign decl to array
12059 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
12061 * parse.y (not_accessible_p): Changed leading comment. Added extra
12062 `where' argument. Use it to enforce protected access rules.
12063 (resolve_qualified_expression_name): Added extra argument to
12065 (patch_method_invocation): Use argument `primary' to provide
12066 not_accessible_p with an extra argument.
12067 (lookup_method_invoke): Added extra argument to not_accessible_p.
12068 (search_applicable_method_list): Likewise.
12070 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
12072 * parse.y (resolve_qualified_expression_name): Try to resolve as
12073 an inner class access only if `decl' is a TYPE_DECL.
12075 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12077 * decl.c (classdollar_identifier_node): Initialize.
12078 * java-tree.h (enum java_tree_index): New entry
12079 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
12080 (classdollar_identifier_node): New macro.
12081 (ID_CLASSDOLLAR_P): Likewise.
12082 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
12083 (build_dot_class_method_invocation): Likewise.
12084 (find_applicable_accessible_methods_list): `class$' can't be
12087 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
12089 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
12091 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
12093 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
12094 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
12097 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
12099 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
12100 outside of the `__U' sequence too.
12101 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
12104 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
12106 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
12108 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12110 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
12111 (JVGENMAIN_OBJS): Likewise.
12112 * java-tree.h (append_gpp_mangled_name): New prototype.
12113 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
12114 Removed cast calling `gcc_add_root.'
12115 * jvgenmain.c (mangle_obstack): New global, initialized.
12117 (do_mangle_class): Constify local `ptr.'
12118 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
12119 append_gpp_mangle_name and update `count' if necessary.
12120 Use `mangle_obstack.'
12121 * mangle.c (append_unicode_mangled_name): Removed.
12122 (append_gpp_mangled_name): Likewise.
12123 (unicode_mangling_length): Likewise.
12124 (mangle_member_name): Return type set to `void.'
12125 (mangle_field_decl): Don't append `U' in escaped names.
12126 (mangle_method_decl): Likewise.
12127 (mangle_member_name): Just use `append_gpp_mangled_name.'
12128 * mangle_name.c: New file.
12130 2001-02-07 Per Bothner <per@bothner.com>
12132 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
12134 * check-init.c (check_init): Don't call done_alternative after
12135 processing loop code, as a LOOP_EXPR never terminates normally.
12137 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
12139 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
12141 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12143 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
12146 2001-02-06 Tom Tromey <tromey@redhat.com>
12148 * lex.c (java_new_lexer): Longer error message.
12150 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
12151 Alexandre Petit-Bianco <apbianco@cygnus.com>
12153 * typeck.c (build_prim_array_type): Added leading comment.
12154 (build_java_array_type): Moved locals out of
12155 block. Always create the `data' field, fixed alignment to match
12158 2001-02-04 Tom Tromey <tromey@redhat.com>
12160 * expr.c (java_lang_expand_expr): Don't bother recomputing
12161 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
12162 Fixes PR java/1866.
12164 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12166 * parse.y (process_imports): Save the original name of the import
12167 for better error report.
12169 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
12171 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
12172 of macros used when compiling jvspec.c.
12173 * jvspec.c (lang_specific_driver): Link with the shared
12176 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12178 * check-init.c (check_init): Call internal_error instead of fatal.
12179 * expr.c (java_lang_expand_expr): Likewise.
12180 * jcf-parse.c (get_constant): Likewise.
12181 * mangle.c (java_mangle_decl): Likewise.
12182 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
12183 (operator_string): Likewise.
12184 * check-init.c (check_init): Call abort instead of fatal.
12185 * class.c (build_class_ref): Likewise.
12186 * constants.c (write_constant_pool): Likewise.
12187 * decl.c (start_java_method): Likewise.
12188 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
12189 (java_stack_dup, encode_newarray_type): Likewise.
12190 (build_java_array_length_access): Likewise.
12191 (build_java_check_indexed_type, expand_java_pushc): Likewise.
12192 (build_java_soft_divmod, build_invokeinterface): Likewise.
12193 * java-tree.h (INNER_CLASS_P): Likewise.
12194 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
12195 (give_name_to_class, get_class_constant): Likewise.
12196 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
12197 (find_constant_index, generate_bytecode_conditional): Likewise.
12198 (generate_bytecode_insns, perform_relocations): Likewise.
12199 * lex.c (java_unget_unicode, java_lex): Likewise.
12200 * mangle.c (mangle_type, mangle_record_type): Likewise.
12201 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
12202 (finish_mangling): Likewise.
12203 * parse.h (MARK_FINAL_PARMS): Likewise.
12204 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
12205 (obtain_incomplete_type, java_complete_class): Likewise.
12206 (java_check_regular_methods, java_complete_expand_method): Likewise.
12207 (cut_identifier_in_qualified, check_deprecation): Likewise.
12208 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
12209 (java_complete_lhs, lookup_name_in_blocks): Likewise.
12210 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
12211 * typeck.c (set_local_type, parse_signature_type): Likewise.
12212 (parse_signature_string, build_java_signature): Likewise;
12213 (set_java_signature): Likewise.
12214 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
12215 * class.c (add_method): Call fatal_error instead of fatal.
12216 (build_static_field_ref): Likewise.
12217 * expr.c (build_known_method_ref, expand_invoke): Likewise.
12218 * jcf-parse.c (get_constant, jcf_parse): Likewise.
12219 * lex.c (java_new_new_lexer): Likewise.
12220 * jv-scan.c (main): Likewise.
12221 (fatal_error): Renamed from fatal.
12222 * jcf-parse.c (yyparse): Call fatal_io_error instead of
12224 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
12225 (yyparse): Likewise.
12226 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
12227 * lex.c (java_get_line_col): Likewise.
12228 * jcf-parse.c (load_class): Make errors non-fatal.
12229 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
12231 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
12233 * jvgenmain.c (class_mangling_suffix): Remove unused string.
12234 (error): Remove unused function.
12235 (main): Don't use "__attribute__ alias" on generated class symbol.
12237 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12239 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
12241 * parse.y (finish_method_declaration): Code accounting for WFLed
12242 method DECL_NAMEs deleted.
12243 (check_abstract_method_definitions): Likewise.
12244 (resolve_type_during_patch): Layout resolved type.
12245 * typeck.c (lookup_do): Removed unused local.
12247 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
12249 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
12250 * decl.c (init_decl_processing): Use integer_minus_one_node, not
12251 integer_negative_one_node.
12252 * expr.c (build_java_binop): Likewise.
12254 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
12256 * zextract.c (read_zip_archive): Read file_offset before writing
12257 zipd and consequently clobbering the header contents.
12259 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12261 * Make-lang.in: Remove all dependencies on defaults.h.
12262 * decl.c: Don't include defaults.h.
12263 * expr.c: Likewise.
12264 * parse.y: Likewise.
12266 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12268 * ChangeLog (2001-01-21): Fixed typo.
12269 * class.c (layout_class_method): Code accounting for WFLed
12270 method DECL_NAMEs deleted.
12271 * constant.c (find_methodref_index): Likewise.
12272 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
12273 * java-tree.h (DECL_FUNCTION_WFL): New macro.
12274 (struct lang_decl): New field `wfl'.
12275 (java_get_real_method_name): Prototype deleted.
12276 * mangle.c (mangle_method_decl): Code accounting for WFLed
12277 method DECL_NAMEs deleted.
12278 * parse.h (GET_METHOD_NAME): Macro deleted.
12279 * parse.y (reset_method_name): Deleted.
12280 (method_header): Set DECL_FUNCTION_WFL.
12281 (check_abstract_method_header): Code accounting for WFLed method
12282 DECL_NAMEs deleted.
12283 (java_get_real_method_name): Deleted.
12284 (check_method_redefinition): Code accounting for WFLed method
12285 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
12286 (java_check_regular_methods): Likewise.
12287 (java_check_abstract_methods): Likewise.
12288 (java_expand_classes): Don't call `reset_method_name.'
12289 (search_applicable_method_list): Use DECL_NAMEs instead of
12291 * typeck.c (lookup_do): Code accounting for WFLed method
12292 DECL_NAMEs deleted.
12294 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
12296 * lex.c (java_read_char): Check for EOF from getc first.
12298 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12300 * class.c (layout_class): Don't lay the superclass out if it's
12301 already being laid out.
12302 * jcf-parse.c (handle_innerclass_attribute): New function.
12303 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
12304 handle_innerclasses_attribute.
12305 (jcf_parse): Don't load an innerclasses if it's already being
12307 * jcf-write.c (append_innerclass_attribute_entry): Static
12308 `anonymous_name' and its initialization deleted. `ocii' and `ini'
12309 to be zero for anonymous classes.
12311 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12313 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
12315 * jcf-parse.c (set_source_filename): Use
12316 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
12318 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12320 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
12321 gets a unique asm name.
12323 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12325 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
12326 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12328 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
12329 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
12330 * parse.y (lookup_package_type_and_set_next): Deleted.
12331 (resolve_package): Removed unnecessary code.
12332 (find_applicable_accessible_methods_list): `finit$' can't be
12334 * verify.c (pop_argument_types): Added missing prototype.
12336 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
12338 * config-lang.in: Disable java by default.
12340 2001-01-23 Tom Tromey <tromey@redhat.com>
12342 * gcj.texi (Copying): New node.
12343 Added copyright information.
12345 2001-01-21 Per Bothner <per@bothner.com>
12347 Various fixes to allow compiling a compressed .jar/.zip archive.
12348 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
12349 (struct ZipFile): Add fields name and next (from ZipFileCache).
12350 (struct ZipDirectory): New field zipf points to owning ZipFile.
12351 * jcf.h (struct ZipDirectory): Add forward declaration.
12352 (struct JCF): Declare zipd field to have type struct ZipDirectory.
12353 Remove seen_in_zip and zip_offset fields.
12354 (JCF_SEEN_IN_ZIP): New macro.
12355 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
12356 * jcf-io.c: Change all ZipFileCache to ZipFile.
12357 (read_zip_member): New function.
12358 (open_in_zip): Call read_zip_member.
12359 * jcf-parse.c (find_in_current_zip): Remove function.
12360 (read_class): Merge in find_in_current_zip functionality.
12361 Call read_zip_member if needed.
12362 (parse_zip_file_entries): Use read_zip_member.
12363 (process_zip_dir): Update for removed and added JCF fields.
12364 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
12366 2001-01-21 Per Bothner <per@bothner.com>
12368 Minor optimization of static ggc roots.
12369 * jcf-parse.c (parse_roots): New static field.
12370 (current_field, current_method, current_file_list): Replace by macros
12371 naming fields of parse_roots.
12372 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
12373 * class.c (class_roots): New static field.
12374 (registered_class, fields_ident, info_ident, class_list):
12375 New macros naming fields of parse_roots.
12376 (build_static_field_ref): Don't register roots here.
12377 (layout_class): Static field list replaced by macro class_list.
12378 (init_class_processing): Call ggc_add_tree_root for 4 roots.
12379 Initialize fields_ident and info_ident here.
12381 2001-01-21 Per Bothner <per@bothner.com>
12383 * jcf-parse.c (ggc_mark_jcf): New function.
12384 (init_jcf_parse): Register current_jcf as ggc root.
12386 2001-01-21 Per Bothner <per@bothner.com>
12388 * lang.c (put_decl_node): Print method's name.
12390 2001-01-21 Per Bothner <per@bothner.com>
12392 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
12393 (verify_jvm_instructions): Use it, for better error messages on loads.
12395 2001-01-21 Per Bothner <per@bothner.com>
12397 * verify.c (merge_type_state): Still may have to merge even if
12398 LABEL_VERIFIED (label).
12400 2001-01-21 Per Bothner <per@bothner.com>
12402 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
12403 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
12405 2001-01-19 Per Bothner <per@bothner.com>
12407 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
12408 if expeting an interface type. Refines Tom's change of 2000-09-12.
12410 2001-01-18 Per Bothner <per@bothner.com>
12412 * gcj.texi (Input Options): Mention .java files.
12414 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12416 * lang-options.h (-Wunsupported-jdk11): Removed.
12417 * lang.c (flag_not_overriding): Deleted.
12418 (flag_static_local_jdk1_1): Likewise.
12419 (lang_W_options): Removed "unsupported-jdk11" entry.
12420 * parse.y (java_check_methods): Removed dead code.
12422 2001-01-17 Tom Tromey <tromey@redhat.com>
12424 Changes suggested by Per Bothner:
12425 * gcj.texi (Input Options): Don't mention input files.
12426 (Code Generation): Updated --main information.
12427 (Invoking jcf-dump): Mention that --javap is incomplete.
12428 From Alexandre Petit-Bianco:
12429 (Warnings): Don't mention -Wunsupported-jdk11.
12431 (Compatibility): Mention JDK 1.2-ness of libraries.
12432 (Resources): Mention resources used when writing gcj.
12434 2001-01-17 Tom Tromey <tromey@redhat.com>
12436 * gcj.texi: New file.
12437 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
12438 (java.info): Depend on gcj.info.
12439 (java/gcj.dvi): New target.
12440 (java.dvi): Depend on gcj.dvi.
12441 (java.install-info): Wrote.
12443 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
12445 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
12446 having called make_decl_rtl.
12448 2001-01-14 Per Bothner <per@bothner.com>
12450 Various patches to emit better messages on verification errors.
12451 * expr.c (push_type_0): Return error indication on stack overflow,
12452 instead of callinfg fatal.
12453 (push_type): Now just call push_type_0 (nd fatal on overflow).
12454 (pop_type_0): Return detailed error message (in a char** argument).
12455 (pop_type): If pop_type_0 fails, print error message.
12456 (pop_argument_types): Moved to verify.c.
12457 * verify.c (pop_argument_types): Moved from expr.c.
12458 Return a (possible) error message, rather than void.
12459 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
12460 (verify_jvm_instruction): Use new macros, improving error messages.
12461 For case OPCODE_astore use object_ptr_type_node.
12462 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
12463 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
12465 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
12466 constant, return body without wrapper. (Improves constant folding.)
12467 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
12469 2001-01-13 Per Bothner <per@bothner.com>
12471 * expr.c (expand_java_field_op): Assigning to a final field outside
12472 an initializer does not violate JVM spec, so should be warning, not
12473 error. (Sun's verifier does not complain - though MicroSoft's does.)
12475 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
12477 * gjavah.c (version), jcf-dump.c (version): Update copyright year
12480 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
12482 * parse.y (resolve_expression_name): Permit instance variables from
12483 enclosing context in super constructor call.
12484 (resolve_qualified_expression_name): Permit enclosing class's qualified
12485 "this" in super constructor call.
12487 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12489 * class.c (build_utf8_ref): Remove last argument in call to
12490 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12491 (build_class_ref): Likewise.
12492 (build_static_field_ref): Likewise.
12493 (get_dispatch_table): Likewise.
12494 (layout_class_method): Likewise.
12495 (emit_register_classes): Likewise.
12496 * constants.c (build_constant_data_ref): Likewise.
12497 * decl.c (builtin_function): Likewise.
12498 (create_primitive_vtable): Likewise.
12499 * expr.c (build_known_method_def): Likewise.
12500 (build_jni_stub): Likewise.
12501 (java_lang_expand_expr): Likewise.
12503 2001-01-10 Tom Tromey <tromey@redhat.com>
12505 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
12507 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12509 * java-tree.h (lang_printable_name_wls): New prototype.
12510 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
12511 rather than `current_class' to print type name. Don't prepend type
12512 names when printing constructor names.
12513 (lang_printable_name_wls): New function.
12514 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
12515 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
12516 * parse.y (patch_method_invocation): Message tuned for constructors.
12517 (not_accessible_p): Grant `private' access from within
12518 enclosing contexts.
12520 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12522 All files with updated copyright when applicable.
12523 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
12524 * class.c (mangle_class_field): Function removed.
12525 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
12526 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
12527 (build_class_ref): Call `java_mangle_class_field' instead of
12528 `mangle_class_field.'
12529 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
12530 (layout_class): Call `java_mangle_decl' instead of
12531 `mangle_static_field.'
12532 (cxx_keywords): Initialized static array moved to `lex.c.'
12533 (layout_class_method): Changed leading comment. Simplified to
12534 call `java_mangle_decl.' Local `ptr' moved in for loop body.
12535 * decl.c (lang_mark_tree): Mark field `package_list.'
12536 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
12537 (struct lang_type): New field `package_list.'
12538 (unicode_mangling_length): Prototype removed.
12539 (append_gpp_mangled_name, append_gpp_mangled_classtype,
12540 emit_unicode_mangled_name): Likewise.
12541 (cxx_keyword_p): New prototype.
12542 (java_mangle_decl, java_mangle_class_field,
12543 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
12544 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
12546 * jvgenmain.c (main_method_prefix): Global variable removed.
12547 (main_method_suffix): Likewise.
12548 (do_mangle_classname): New function.
12549 (main): Call it. Format changed to accommodate new mangling scheme.
12550 * lex.c: (utf8_cmp): Conditionally prototyped.
12551 (cxx_keywords): Moved from class.c, conditionally defined.
12552 (utf8_cmp, cxx_keyword_p): Likewise.
12553 * mangle.c (obstack.h, ggc.h): Included.
12554 (mangle_field_decl): New function.
12555 (mangle_method_decl, mangle_type, mangle_pointer_type,
12556 mangle_array_type, mangle_record_type,
12557 find_compression_pointer_match, find_compression_array_match,
12558 find_compression_record_match,
12559 find_compression_array_template_match, set_type_package_list,
12560 entry_match_pointer_p, emit_compression_string, init_mangling,
12561 finish_mangling, compression_table_add, mangle_member_name): Likewise.
12562 (mangle_obstack): New global.
12563 (MANGLE_RAW_STRING): New macro.
12564 (unicode_mangling_length): Turned static.
12565 (append_unicode_mangled_name): Renamed from
12566 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
12567 replaces `obstack', removed from the parameter list.
12568 (append_gpp_mangled_name): Turned static. `mangle_obstack'
12569 replaces parameter `obstack', removed from the parameter list. Call
12570 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
12571 (append_gpp_mangled_classtype): Removed.
12572 (compression_table, compression_next): New static variables.
12573 * parse.y (temporary_obstack): Extern declaration removed.
12575 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12577 * parse.y (patch_binop): Compute missing type in error situations.
12579 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12581 * class.c (make_class_data): Push initial value for "arrayclass".
12582 * decl.c (init_decl_processing): Add new class field "arrayclass".
12584 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12586 From patha@softlab.ericsson.se:
12587 * parse.y (switch_label): Use build, not build1, to construct
12590 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
12592 * lang.c (lang_decode_option): Change -MA to -MP.
12593 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
12594 Update to new prototype; do quote targets.
12595 (jcf_dependency_write): Update.
12597 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
12599 Shorten primitive array allocation path:
12600 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
12601 to create new primitive arrays.
12602 * expr.c (build_newarray): If generating native code, call
12603 soft_newarray_node with a reference to the primitive TYPE identifier
12604 instead of type_value.
12606 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
12608 Fix for PRs gcj/312 and gcj/253:
12609 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
12610 dest if they arn't already.
12611 * class.c (layout_class): Call maybe_layout_super_class on
12612 superinterfaces also, but only if compiling from bytecode.
12614 Fix for PR gcj/373:
12615 * parse.y (create_class): Set ACC_STATIC if class is declared in an
12618 2000-12-15 Tom Tromey <tromey@redhat.com>
12620 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
12623 2000-12-14 Andrew Haley <aph@redhat.com>
12625 * boehm.c (mark_reference_fields): Change test to correctly detect
12628 2000-12-15 Andreas Jaeger <aj@suse.de>
12630 * config-lang.in (lang_dirs): Added.
12632 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12634 * parse.y (end_artificial_method_body): Fixed undefined behavior.
12635 Credits go to rth for finding it.
12637 2000-12-13 Mike Stump <mrs@wrs.com>
12639 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12641 2000-11-07 Tom Tromey <tromey@cygnus.com>
12643 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12644 * lex.c (java_ignorable_control_p): Removed.
12645 (java_letter_or_digit_p): Removed.
12646 (java_start_char_p): New function.
12647 (java_read_char): Return `int', not `unicode_t'. Changed
12649 (java_read_unicode): Likewise.
12650 (java_read_unicode_collapsing_terminators): Likewise.
12651 (java_get_unicode): Likewise.
12652 (java_new_lexer): Initialize hit_eof.
12653 (java_parse_end_comment): Take `int' argument.
12654 (java_parse_doc_section): Likewise.
12655 (java_parse_escape_sequence): Don't allow backlash-newline.
12657 * lex.h (JAVA_DIGIT_P): Removed.
12658 (_JAVA_LETTER_OR_DIGIT_P): Removed.
12659 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12660 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12661 (JAVA_PART_CHAR_P): New macro.
12663 (JAVA_CHAR_ERROR): Now -2.
12664 (java_lexer): New field `hit_eof'.
12665 * chartables.h: New file.
12666 * gen-table.pl: new file.
12668 2000-11-20 Tom Tromey <tromey@cygnus.com>
12669 Alexandre Petit-Bianco <apbianco@cygnus.com>
12671 * parse.y (java_complete_lhs): Only allow compound assignment of
12672 reference type if type is String.
12674 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12676 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12677 jcf-path.c: Likewise.
12679 2000-12-09 Anthony Green <green@redhat.com>
12681 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12682 filestart and filename_length as int values.
12684 2000-12-07 Mo DeJong <mdejong@redhat.com>
12686 * jcf-io.c (find_class): Correct the logic that tests to see if a
12687 .java file is newer than its .class file. The compiler was
12688 incorrectly printing a warning when file mod times were equal.
12690 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
12692 * jvgenmain.c: Use ISPRINT not isascii.
12694 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12696 * parse.y (end_artificial_method_body): Fixed typo.
12698 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
12700 * parse.y (patch_method_invocation): Pick the correct enclosing
12701 context when creating inner class instances.
12704 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
12706 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12707 Update copyright year to 2000.
12709 2000-11-23 Anthony Green <green@redhat.com>
12711 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12712 Move current_file_list out of yyparse and make it static.
12714 * expr.c: Declare quick_stack and tree_list_free_list as static
12715 (init_expr_processing): Register quick_stack and
12716 tree_list_free_list roots.
12718 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12720 * parse.y (build_outer_field_access): New local `decl_ctx', use
12721 it. Check for field's context and current class immediate outer
12722 context inheritance.
12723 (outer_field_access_p): Consider fields inherited from the last
12725 (build_access_to_thisn): Stop at the last enclosing context if
12729 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
12731 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12733 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
12735 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12738 2000-11-20 Tom Tromey <tromey@cygnus.com>
12740 * jv-scan.c (help): Document --complexity.
12741 (options): Added --complexity.
12742 (flag_complexity): New global.
12743 (main): Call `report'.
12744 * parse-scan.y (complexity): New global.
12745 (if_then_statement, if_then_else_statement,
12746 if_then_else_statement_nsi, switch_block_statement_group,
12747 while_expression, do_statement, for_begin, continue_statement,
12748 throw_statement, catch_clause, finally, method_invocation,
12749 conditional_and_expression, conditional_or_expression,
12750 conditional_expression): Update complexity.
12751 (reset_report): Reset complexity.
12752 (report): New function.
12754 2000-11-20 Tom Tromey <tromey@cygnus.com>
12756 * lex.c (yylex): Added STRICT_TK case.
12757 * parse.y (STRICT_TK): Added.
12758 * parse-scan.y (STRICT_TK): Added.
12759 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12760 `;'. Use 4, not 3, with -k option. Correctly rename resulting
12762 * keyword.h: Rebuilt.
12763 * keyword.gperf (strictfp): Added.
12765 2000-11-20 Tom Tromey <tromey@cygnus.com>
12767 * lex.c (yylex): Recognize floating point constants with leading
12770 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12772 * java-tree.h (cyclic_inheritance_report): Constify.
12773 * parse.y (cyclic_inheritance_report): Likewise.
12775 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
12777 * parse.y (goal): Remove call to ggc_add_string_root.
12779 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
12781 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12782 Create string in scratch buffer, then pass to build_string.
12784 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
12786 * parse.y (issue_warning_error_from_context): Add
12789 2000-11-11 Anthony Green <green@redhat.com>
12791 * jcf-parse.c (process_zip_dir): Add finput parameter.
12792 (jcf_figure_file_type): Call process_zip_dir with appropriate
12795 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12797 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12798 * jcf-parse.c (jcf_figure_file_type): Likewise.
12800 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
12802 * parse.y (create_new_parser_context): Use memset () instead of
12805 2000-11-08 Tom Tromey <tromey@cygnus.com>
12807 * gjavah.c (process_file): Only include gcj/cni.h when generating
12810 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
12812 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12813 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12814 instead of bzero ().
12816 2000-11-05 Tom Tromey <tromey@cygnus.com>
12818 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12819 * lex.c (IS_ZERO): New define.
12820 (java_perform_atof): Error on floating point underflow.
12822 2000-11-04 Tom Tromey <tromey@cygnus.com>
12824 * lex.c (java_parse_escape_sequence): Only read two octal
12825 characters if the first one is greater than 3. Don't allow
12826 "octal" numbers to include the digits 8 or 9.
12828 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
12830 * Make-lang.in (java.distdir): Remove.
12832 2000-11-03 Tom Tromey <tromey@cygnus.com>
12834 * Make-lang.in (java.dvi): New target.
12835 Partial fix for PR other/567.
12837 * lang-options.h: Mention -Wout-of-date.
12838 * jcf-dump.c (flag_newer): New global.
12839 * gjavah.c (flag_newer): New global.
12840 * jcf-io.c (find_class): Only warn when flag_newer set.
12841 * lang.c (flag_newer): New global.
12842 (struct string_option): New declaration.
12843 (lang_W_options): New global.
12844 (process_option_with_no): New function.
12845 (lang_decode_option): Use it.
12847 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12848 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12851 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12852 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12853 * lex.c (java_read_unicode): Removed `term_context' argument.
12854 Recognize any number of `u' in `\u'.
12855 (java_read_unicode_collapsing_terminators): New function.
12856 (java_get_unicode): Use it.
12857 (java_lineterminator): Removed.
12858 (yylex): Produce error if character literal is newline or single
12859 quote. Return if eof found in middle of `//' comment. EOF in
12860 `//' comment is only an error if pedantic.
12861 (java_ignorable_control_p): New function.
12862 (java_parse_end_comment): Return if eof found in middle of
12865 * jv-scan.c (pedantic): New global.
12867 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12869 * parse.y (outer_field_access_p): Inherited fields aren't
12870 consider outer fields.
12871 (maybe_build_thisn_access_method): Use
12872 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12873 (resolve_expression_name): Trigger an error if a static field
12874 is being accessed as an outer field.
12876 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12878 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12881 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12883 * Make-lang.in: Move all build rules here from Makefile.in,
12884 adapt to new context. Wrap all rules that change the current
12885 directory in parentheses. Expunge all references to $(P).
12886 When one command depends on another and they're run all at
12887 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12888 all object-file generation rules. Delete obsolete variables.
12890 * Makefile.in: Delete.
12891 * config-lang.in: Delete outputs= line.
12893 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12895 * parse.y (patch_method_invocation): NULLify this_arg when already
12897 (maybe_use_access_method): Handle call to methods unrelated to the
12898 current class. Fixed comment.
12901 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12903 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12906 2000-10-24 Tom Tromey <tromey@cygnus.com>
12908 * lex.c (java_new_lexer): Initialize new fields. Work around
12909 broken iconv() implementations.
12910 (java_read_char): Swap bytes if required. Use fallback decoder if
12912 (byteswap_init, need_byteswap): New globals.
12913 (java_destroy_lexer): Only close iconv handle if it is in use.
12914 * lex.h (java_lexer): New fields read_anything, byte_swap,
12916 Made out_buffer unsigned.
12918 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12920 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12921 where an enclosing context can be set on the jdep.
12922 (do_resolve_class): Fixed identation.
12924 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12926 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12928 * jcf-reader.c (peek_attribute, skip_attribute): Only define
12931 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12933 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12935 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12937 * jcf-write.c (OP1): Update `last_bc'.
12938 (struct jcf_block): Fixed indentation and typo in comments. New
12940 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12941 follows `monitorenter'.
12942 * parse.y (patch_synchronized_statement): New local `tmp'. Call
12946 2000-10-16 Tom Tromey <tromey@cygnus.com>
12948 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12949 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12950 * lang-options.h: Added -MA, -MT, -MF..
12951 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12952 (DEPEND_TARGET_SET): New macro.
12953 (DEPEND_FILE_ALREADY_SET): Likewise.
12954 (init_parse): Handle new flags.
12955 * jcf.h (jcf_dependency_print_dummies): Declare.
12956 * Make-lang.in (s-java): Added mkdeps.o.
12957 * Makefile.in (BACKEND): Added mkdeps.o.
12958 (../gcjh$(exeext)): Added mkdeps.o.
12959 (../jcf-dump$(exeext)): Added mkdeps.o.
12960 * jcf-depend.c: Include mkdeps.h.
12961 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12962 add_entry): Removed.
12963 (jcf_dependency_reset): Rewrote.
12964 (dependencies): New global.
12965 (jcf_dependency_set_target): Rewrote.
12966 (jcf_dependency_add_target): Likewise.
12967 (jcf_dependency_add_file): Likewise.
12969 (print_ents): Removed.
12970 (jcf_dependency_write): Rewrote.
12971 (print_dummies): New global.
12972 (jcf_dependency_print_dummies): New function
12973 (jcf_dependency_write): Call deps_dummy_targets if required.
12975 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12977 * gjavah.c (add_class_decl): Removed unused variables `tname',
12978 `tlen' and `name_index'.
12979 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12980 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12981 in `wfl_operator' with value.
12982 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12983 (jcf_figure_file_type): Fixed identation.
12984 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12985 * parse.y (analyze_clinit_body): New function.
12986 (static_initializer:): Reset `current_static_block'.
12987 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12988 `wfl_operator' with new value.
12989 (lookup_cl): Use EXPR_WFL_FILENAME.
12990 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12991 analyze_clinit_body.
12992 (build_outer_field_access): Access to this$<n> built from
12993 current_class, not its outer context.
12994 (build_access_to_thisn): Fixed leading comment. Tidied things up.
12995 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12996 (patch_method_invocation): Use `is_static_flag' when already
12998 (patch_newarray): Removed assignment in ternary operator.
13000 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13002 * except.c (free_eh_ranges): Don't free `whole_range'.
13004 2000-10-15 Anthony Green <green@redhat.com>
13006 * decl.c (init_decl_processing): Call init_class_processing before
13009 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13011 * check-init.c (check_init): Fixed leading comment. Use
13013 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
13014 (give_name_to_locals): Likewise.
13015 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
13016 fields in lang_decl_var.
13017 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
13018 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
13019 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
13020 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
13021 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
13022 (LOCAL_FINAL): Rewritten.
13023 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
13024 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
13025 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
13026 `init_final' fields.
13027 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
13028 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
13029 (TYPE_HAS_FINAL_VARIABLE): New macro.
13030 (struct lang_type): Added `afv' field.
13031 * parse.y (check_static_final_variable_assignment_flag): New function.
13032 (reset_static_final_variable_assignment_flag): Likewise.
13033 (check_final_variable_local_assignment_flag): Likewise.
13034 (reset_final_variable_local_assignment_flag): Likewise.
13035 (check_final_variable_indirect_assignment): Likewise.
13036 (check_final_variable_global_assignment_flag): Likewise.
13037 (add_inner_class_fields): Use LOCAL_FINAL_P.
13038 (register_fields): Handle local finals and final variables.
13039 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
13040 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
13041 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
13043 (java_complete_expand_methods): Loop to set
13044 TYPE_HAS_FINAL_VARIABLE. Call
13045 `reset_final_variable_local_assignment_flag' and
13046 `check_final_variable_local_assignment_flag' accordingly before
13047 and after constructor expansion. Call
13048 `reset_static_final_variable_assignment_flag'
13049 before expanding <clinit> and after call
13050 `check_static_final_variable_assignment_flag' if the
13051 current_class isn't an interface. After all methods have been
13052 expanded, call `check_final_variable_global_assignment_flag' and
13053 `check_static_final_variable_assignment_flag' if the current class
13055 (maybe_yank_clinit): Fixed typo in comment.
13056 (build_outer_field_access_methods): Removed old sanity check. Use
13057 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
13058 Don't create access methods for finals.
13059 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
13060 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
13061 existing DECL_INIT has been processed.
13062 (java_complete_lhs): Likewise.
13063 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
13064 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
13066 (patch_assignment): Use LOCAL_FINAL_P.
13067 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
13068 DECL_INITIAL is nullified.
13071 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13073 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
13075 * Makefile.in (parse.c, parse-scan.c): Likewise.
13077 2000-10-12 Mark Mitchell <mark@codesourcery.com>
13079 * class.c (temporary_obstack): Remove.
13080 (make_class): Don't mess with obstascks.
13081 (push_class): Likewise.
13082 (set_super_info): Likewise.
13083 (add_method_1): Likewise.
13084 (add_method): Likewise.
13085 (add_field): Likewise.
13086 (build_utf8_ref): Likewise.
13087 (build_class_ref): Likewise.
13088 (build_static_field_ref): Likewise.
13089 (finish_class): Likewise.
13090 (push_super_field): Likewise.
13091 (layout_class): Likewise.
13092 (layout_class_methods): Likewise.
13093 (init_class_processing): Likewise.
13094 * constants.c (get_tag_node): Likewise.
13095 (build_constant_data_ref): Likewise.
13096 * decl.c (ggc_p): Remove.
13097 (copy_lang_decl): Use ggc_alloc.
13098 (complete_start_java_method): Don't mess with obstacks.
13099 (start_java_method): Likewise.
13100 (end_java_method): Likewise.
13101 * except.c (link_handler): Use xmalloc.
13102 (free_eh_ranges): New function.
13103 (method_init_exceptions): Use it.
13104 (add_handler): Use xmalloc.
13105 (expand_start_java_handler): Don't mess with obstacks.
13106 (prepare_eh_table_type): Likewise.
13107 (expand_end_java_handler): Likewise.
13108 * expr.c (push_value): Likewise.
13109 (create_label_decl): Likewise.
13110 (build_jni_stub): Likewise.
13111 (java_lang_expand_expr): Likewise.
13112 (note_instructions): Use xrealloc.
13113 (java_push_constant_from_pool): Don't mess with obstacks.
13114 (process_jvm_instruction): Likewise.
13115 * java-tree.h (cyclic_inheritance_report): Remove duplicate
13117 * jcf-parse.c (get_constant): Don't mess with obstacks.
13118 (read_class): Likewise.
13119 (jcf_parse): Likewise.
13120 * lex.c (expression_obstack): Remove.
13121 (java_lex): Don't use obstack_free.
13122 * parse.h (exit_java_complete_class): Don't mess with obstacks.
13123 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
13124 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
13125 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
13126 * parse.y (gaol): Add more GC roots.
13127 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
13128 (lookup_field_wrapper): Likewise.
13129 (obtain_incomplete_type): Don't mess with obstacks.
13130 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
13132 (craft_constructor): Don't mess with obstacks.
13133 (safe_layout_class): Likewise.
13134 (java_complete_class): Likewise.
13135 (source_end_java_method): Likewise.
13136 (build_outer_field_access_methods): Likewise.
13137 (build_outer_method_access_method): Likewise.
13138 (maybe_build_thisn_access_method): Likewise.
13139 (build_dot_class_method_invocation): Likewise.
13140 (java_complete_tree): Likewise.
13141 (java_complete_lhs): Likewise.
13142 (do_merge_string_cste): Likewise.
13143 (patch_string_cst): Likewise.
13144 (array_constructor_check_entry): Likewise.
13145 * typeck.c (build_java_array_type): Likewise.
13146 (parse_signature_string): Likewise.
13147 (build_java_signature): Likewise.
13149 2000-10-12 Tom Tromey <tromey@cygnus.com>
13151 Fix for PR gcj/356:
13152 * gjavah.c (add_class_decl): Don't special-case inner classes.
13153 (add_namelet): Likewise.
13155 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
13157 * java-tree.h: Constify current_encoding.
13158 * lang.c: Constify current_encoding.
13160 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
13162 * jvgenmain.c (class_mangling_suffix): Omit `.'.
13163 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
13165 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13167 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
13168 patch. Fixes gcj/340.
13170 2000-10-10 Tom Tromey <tromey@cygnus.com>
13172 * lex.c (java_new_lexer): Initialize out_first and out_last
13174 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
13176 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13178 * parse.y (pop_current_osb): New function.
13179 (array_type:): Use `dims:', changed actions
13180 accordingly. Suggested by Anthony Green.
13181 (array_creation_expression:): Used pop_current_osb.
13182 (cast_expression:): Likewise.
13183 (search_applicable_method_list): Fixed indentation.
13185 2000-10-08 Anthony Green <green@redhat.com>
13187 * parse.y (array_type_literal): Remove production.
13188 (type_literals): Refer to array_type, not array_type_literal.
13190 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13192 Patch contributed by Corey Minyard.
13193 * decl.c (check_local_named_variable): New function.
13194 (tree check_local_unnamed_variable): Likewise.
13195 (find_local_variable): Splitted. Call check_local_{un}named_variable.
13197 2000-10-07 Anthony Green <green@redhat.com>
13199 * class.c (layout_class): Handle case where superclass can't be
13202 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
13204 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
13207 2000-10-05 Tom Tromey <tromey@cygnus.com>
13209 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
13210 * jvgenmain.c (class_mangling_prefix): Removed.
13211 (class_mangling_suffix): New global.
13213 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
13215 (print_method_info): Handle overrides for static and final
13217 (process_file): Generate declaration for class object field.
13218 * class.c (cxx_keywords): New array.
13219 (utf8_cmp): New function.
13220 (cxx_keyword_p): New function.
13221 (layout_class_method): Mangle C++ keywords by appending `$'.
13222 (mangle_field): New function.
13223 (mangle_class_field): Use mangle_field. Mangle class name as
13225 (mangle_static_field): Use mangle_field.
13227 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
13229 * decl.c (find_local_variable): Removed uncessary type check and
13230 fixed range check typo. From Corey Minyard.
13232 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13234 * decl.c (give_name_to_locals): New local `code_offset'. Call
13235 `maybe_adjust_start_pc'.
13236 * expr.c (note_instructions): New function.
13237 (expand_byte_code): Don't collect insn starts here.
13238 (peek_opcode_at_pc): New function.
13239 (maybe_adjust_start_pc): Likewise.
13240 * java-tree.h (maybe_adjust_start_pc): Declare.
13241 (note_instructions): Likewise.
13242 * jcf-parse.c (parse_class_file): Call `note_instructions'.
13244 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13246 * parse.y (field_access:): Fixed indentation.
13247 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
13249 2000-09-07 Tom Tromey <tromey@cygnus.com>
13251 Fix for PR gcj/307:
13252 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
13253 JPRIMITIVE_TYPE_P, for arithmetic operators.
13254 (patch_method_invocation): Indentation fix.
13255 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
13256 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
13257 (do_unary_numeric_promotion): Cleaned up code.
13258 (valid_cast_to_p): Handle boolean correctly.
13260 2000-09-27 Tom Tromey <tromey@cygnus.com>
13262 * lex.c (java_read_unicode): Reset bs_count when finished with
13265 2000-10-01 Mark Mitchell <mark@codesourcery.com>
13268 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
13269 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
13270 (typeck.o): Depend on ggc.h.
13271 * class.c (add_method_1): Use GC functions for allocation.
13272 (init_class_processing): Register roots.
13273 * decl.c (ggc_p): Set to 1.
13274 (pending_local_decls): Make it static.
13275 (push_jvm_slot): Use GC functions for allocation.
13276 (init_decl_processing): Register roots.
13277 (give_name_to_locals): Use GC functions for allocation.
13278 (lang_mark_tree): New function.
13279 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
13280 functions for allocation.
13281 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
13282 * lex.c (java_lex): Use build_string, rather than replicating it
13284 * parse.y (goal): Add more roots.
13285 (mark_parser_ctxt): New function.
13286 * typeck.c: Include ggc.h.
13288 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13290 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
13291 contains something else than MODIFY_EXPR.
13293 2000-09-23 Mark Mitchell <mark@codesourcery.com>
13295 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
13296 * Makefile.in (parse.o): Depend on ggc.h.
13297 (class.o): Likewise.
13298 (constants.o): Likewise.
13299 (decl.o): Likewise.
13300 (expr.o): Likewise.
13301 (jcf-parse.o): Likewise.
13302 (jcf-write.o): Likewise.
13303 (mangle.o): Likewise.
13304 * class.c: Include ggc.h.
13305 (build_static_field_ref): Register GC roots.
13306 (layout_class): Likewise.
13307 (init_class_processing): Likewise.
13308 * constants.c: Include ggc.h.
13309 (current_constant_pool_data_ref): Remove.
13310 (tag_nodes): Move it to ...
13311 (get_tag_node): ... here. Register GC roots.
13312 * decl.c: Include ggc.h. Remove many global tree definitions.
13313 (throw_node): Define.
13314 (java_global_trees): Likewise.
13315 (predef_filenames): Make the size a constant.
13316 (init_decl_processing): Adjust accordingly.
13317 (init_decl_processing): Call init_jcf_parse. Register GC roots.
13318 * expr.c: Include ggc.h.
13319 (init_expr_processing): Register GC roots.
13320 (build_invokeinterface): Likewise.
13321 * java-tree.h: Replace extern tree declarations with macros.
13322 (java_global_trees): New variable.
13323 (java_tree_index): New enumeration.
13324 (init_jcf_parse): Declare.
13325 * jcf-parse.c: Include ggc.h.
13326 (current_class): Remove declaration.
13327 (main_class): Likewise.
13328 (all_class_list): Likewise.
13329 (predefined_filename_p): Adjust for constant size of
13331 (init_jcf_parse): New function.
13332 * jcf-write.c: Include ggc.h.
13333 (generate_classfile): Register GC roots.
13334 (append_synthetic_attribute): Likewise.
13335 (append_innerclass_attribute_entry): Likewise.
13336 * lang.c: Include ggc.h.
13337 (lang_print_error): Register GC roots.
13338 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
13340 * parse.y: Include ggc.h.
13341 (wfl_operator): Remove.
13342 (goal): Register GC roots.
13343 (java_pop_parser_context): Adjust for new field names.
13344 (java_parser_context_save_global): Likewse.
13345 (java_parser_context_restore_global): Likewise.
13346 (java_parser_context_suspend): Likewise.
13347 (java_parser_context_resume): Likewise.
13348 (verify_constructor_circularity): Register GC roots.
13349 (lookup_cl): Likewise.
13350 (java_reorder_fields): Likewise.
13351 (build_current_this): Likewise.
13352 (class_in_current_package): Likewise.
13353 (argument_types_convertible): Likewise.
13354 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
13356 2000-09-14 Tom Tromey <tromey@cygnus.com>
13358 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
13360 2000-09-13 Tom Tromey <tromey@cygnus.com>
13362 * jcf-parse.c: Include <locale.h>.
13363 * jv-scan.c: Include <locale.h>.
13365 2000-09-12 Tom Tromey <tromey@cygnus.com>
13367 * expr.c (pop_type_0): Return `Object' if trying to merge two
13369 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
13370 interface types; `Object' is always a valid supertype.
13372 2000-09-12 Tom Tromey <tromey@cygnus.com>
13375 * jv-scan.c (help): Document --encoding.
13376 (options): Added `encoding' entry.
13377 (OPT_ENCODING): New define.
13378 (main): Handle --encoding.
13379 Include <langinfo.h> if nl_langinfo exists.
13380 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
13382 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
13383 (parse_source_file): Correctly call java_init_lex. Added `finput'
13384 argument. Use nl_langinfo to determine default encoding.
13385 * java-tree.h (current_encoding): Declare.
13386 * parse.y (java_parser_context_restore_global): Don't restore
13388 (java_parser_context_save_global): Don't set `finput' field.
13389 (java_pop_parser_context): Don't restore `finput'. Free old lexer
13391 * lang.c (current_encoding): New global.
13392 (lang_decode_option): Recognize `-fencoding='.
13393 (finish_parse): Don't close finput.
13394 * parse.h (struct parser_ctxt): Removed `finput' and
13395 `unget_utf8_value' fields. Added `lexer' field.
13396 (java_init_lex): Fixed declaration.
13397 * lex.c (java_new_lexer): New function.
13398 (java_destroy_lexer): Likewise.
13399 (java_read_char): Added `lex' argument. Handle iconv case.
13400 (java_read_unicode): Added `lex' argument. Count backslashes in
13402 (java_init_lex): Added `finput' and `encoding' arguments. Set
13403 `lexer' field in ctxp.
13404 (BAD_UTF8_VALUE): Removed.
13405 (java_lex): Handle seeing UEOF in the middle of a string literal.
13406 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
13407 (java_lexer): New structure.
13410 (DEFAULT_ENCODING): New define.
13411 (java_destroy_lexer): Declare.
13413 2000-09-12 Tom Tromey <tromey@cygnus.com>
13415 Fix for PR gcj/343:
13416 * lex.c (java_init_lex): Initialize java_io_serializable.
13417 * parse.y (java_io_serializable): New global.
13418 (valid_ref_assignconv_cast_p): An array can be cast to
13421 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
13423 * decl.c, expr.c: Include defaults.h if not already included.
13424 Don't define the *_TYPE_SIZE macros.
13426 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
13428 * typeck.c (build_java_array_type): Correct first parameter
13429 in ADJUST_FIELD_ALIGN invocation.
13431 2000-09-06 Tom Tromey <tromey@cygnus.com>
13433 * lang-specs.h: Also recognize `-femit-class-files'.
13435 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13437 * verify.c (merge_types): Load the types to merge if necessary.
13439 2000-09-02 Anthony Green <green@redhat.com>
13441 * jcf-io.c: Include zlib.h.
13442 (open_in_zip): Read compressed class file archives.
13443 * zipfile.h (ZipDirectory): Add uncompressed_size and
13444 compression_method fields.
13445 * zextract.c (read_zip_archive): Collect file compression info.
13447 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
13449 * parse.y (do_resolve_class): Also explore superclasses of
13450 intermediate enclosing contexts when searching for inner classes.
13452 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13454 * parse.y (variable_declarator_id:): Better error message.
13455 (expression_statement:): Use YYNOT_TWICE.
13456 (cast_expression:): Likewise.
13457 (assignment:): Likewise.
13459 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13461 * parse.y (do_merge_string_cste): New locals. Create new
13462 STRING_CSTs each time, use memcpy. Fixes gcj/311.
13464 2000-08-07 Hans Boehm <boehm@acm.org>
13466 * boehm.c (mark_reference_fields): Set marking bits for all words in
13467 a multiple-word record.
13468 (get_boehm_type_descriptor): Use the procedure marking descriptor for
13471 2000-08-31 Mike Stump <mrs@wrs.com>
13473 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
13474 jcf-dump$(exeext)): Make parallel safe.
13476 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
13478 * jcf-parse.c (set_source_filename): Constify a char *.
13479 * jcf-write.c (append_innerclasses_attribute,
13480 make_class_file_name): Constify a char *. Don't recycle a
13481 variable for an unrelated purpose.
13482 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
13483 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
13485 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13487 * expr.c (can_widen_reference_to): Fixed indentation.
13488 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
13489 * parse.y: `finit$' replaces `$finit$' in comments.
13490 (try_builtin_assignconv): Fixed leading comment.
13492 2000-08-25 Greg McGary <greg@mcgary.org>
13494 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
13496 2000-08-24 Greg McGary <greg@mcgary.org>
13498 * lang.c (lang_decode_option): Use ARRAY_SIZE.
13499 * parse.y (BINOP_LOOKUP): Likewise.
13501 2000-08-22 Andrew Haley <aph@cygnus.com>
13503 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
13504 sign extending. Fixes gcj/321.
13505 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
13506 combining to make a jlong. Fixes gcj/321.
13508 2000-08-21 Nix <nix@esperi.demon.co.uk>
13510 * lang-specs.h: Do not process -o or run the assembler if
13513 2000-08-16 Andrew Haley <aph@cygnus.com>
13515 * typeck.c (build_java_array_type): Rewrite code to do array
13516 alignment. Take into account back-end macros when aligning array
13517 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
13518 user to set alignment. Fixes gcj/252 and 160.
13520 2000-08-09 Tom Tromey <tromey@cygnus.com>
13522 * parse.y (check_abstract_method_definitions): Now return `int'.
13523 Check implemented interfaces. Fixes PR gcj/305.
13525 * parse.y (patch_switch_statement): Disallow `long' in switch
13526 expressions. Fixes PR gcj/310.
13528 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13530 * decl.c (finit_leg_identifier_node): New global.
13531 (init_decl_processing): Use `finit$' to initialize
13532 finit_identifier_node. Use `$finit$' to initialize
13533 finit_leg_identifier_node.
13534 * expr.c (expand_java_field_op): Use ID_FINIT_P.
13535 * java-tree.h (finit_identifier_node): Changed attached comment.
13536 (finit_leg_identifier_node): New declaration.
13537 (ID_FINIT_P): Take finit_identifier_node and
13538 finit_leg_identifier_node into account. This is a backward
13539 compatibility hack.
13541 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13543 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
13545 (generate_bytecode_insns): Check `nargs' before emitting it.
13546 * verify.c (merge_type_state): Fixed typo.
13547 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
13548 generate_bytecode_{conditional,insns}.
13550 2000-08-13 Anthony Green <green@redhat.com>
13552 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
13555 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13557 * class.c (maybe_layout_super_class): Fixed indentation.
13558 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
13559 (java_check_methods): New function declaration.
13560 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
13561 instead of `str_ptr'.
13562 * jcf-write.c (generate_bytecode_insns): Emit number the of args
13563 of a `invokeinterface' at the right time.
13564 * parse.h (WFL_STRIP_BRACKET): New macro.
13565 (SET_TYPE_FOR_RESOLUTION): Use it.
13566 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
13567 (check_class_interface_creation): Don't check for cross package
13568 innerclass name clashes.
13569 (method_header): Behave properly if MDECL is `error_mark_node'.
13570 (method_declarator): Return `error_mark_node' if bogus current
13572 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
13573 (resolve_and_layout): New local `decl_type', set and used. Call
13574 java_check_methods.
13575 (java_check_methods): New method.
13576 (java_layout_classes): Use it.
13577 (resolve_qualified_expression_name): No EH check necessary in
13579 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
13581 (patch_assignment): Set DECL_INITIAL on integral final local.
13583 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
13585 * java-tree.h (flag_extraneous_semicolon): New extern.
13586 * lang-options.h: (-Wextraneous-semicolon): New option.
13587 * lang.c (flag_redundant): Fixed typo in leading comment.
13588 (flag_extraneous_semicolon): New global.
13589 (lang_decode_option): Set `flag_extraneous_semicolon' when
13590 -Wall. Decode `-Wextraneous-semicolon'.
13591 * parse.y (type_declaration:): Removed `SC_TK' hack, added
13592 `empty_statement' rule.
13593 (class_body_declaration): Likewise.
13594 (method_body:): Accept `;' as a method body.
13595 (static_initializer:): Removed `SC_TK' hack.
13596 (constructor_block_end:): Likewise.
13597 (empty_statement:): Report deprecated empty declaration. Fixes
13600 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13602 * parse.y (build_dot_class_method_invocation): Changed parameter
13603 name to `type'. Build signature from `type' and convert it to a
13604 STRING_CST if it's an array.
13605 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
13606 to use `ref_type' directly.
13608 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
13610 * lang-options.h: Added a comma after the last element to avoid
13611 syntax errors when other languages define additional options.
13613 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
13615 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
13616 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
13617 (jc1): Link with $(BACKEND).
13618 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
13620 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
13622 * jvspec.c: Adjust type of second argument to
13623 lang_specific_driver, and update code as necessary.
13625 * class.c (build_dtable_decl): Initialize dummy.
13627 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13629 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13630 method bodies not to rule out discarding `<clinit>'; don't use
13631 <clinit> to initialize static fields with constant initializers.
13633 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13635 * gjavah.c (print_method_info): Added `synth' parameter. Skip
13637 (method_synthetic): New global.
13638 (HANDLE_METHOD): Recognize synthetic method and tell
13639 `print_method_info' about it.
13640 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13641 processing a synthetic method.
13642 * jcf-reader.c (skip_attribute): New function.
13643 ( skip_attribute): Likewise.
13645 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13647 * parse.y (build_outer_field_access): Fixed comments.
13648 (fix_constructors): Emit the initialization of this$<n> before
13650 (resolve_qualified_expression_name): Build an access to `decl' if
13653 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13655 * parse-scan.y (curent_class): Non longer const.
13656 (inner_qualifier, inner_qualifier_length): Deleted.
13657 (current_class_length): New global.
13658 (bracket_count): Fixed typo in leading comment.
13659 (anonymous_count): New global.
13660 (class_instance_creation_expression:): Handle anonymous classes.
13661 (anonymous_class_creation:): New rule.
13662 (push_class_context): Rewritten.
13663 (pop_class_context): Likewise.
13664 (INNER_QUALIFIER): Macro deleted.
13665 (report_class_declaration): call `push_class_context' when
13666 entering the function. `fprintf' format modified not to use
13668 (report_class_declaration): Assign `package_name' and
13669 `current_class' to NULL separately.
13671 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13673 * expr.c (build_invokeinterface): Call layout_class_methods on
13676 2000-07-27 Tom Tromey <tromey@cygnus.com>
13677 Anthony Green <green@cygnus.com>
13678 Alexandre Petit-Bianco <apbianco@cygnus.com>
13680 * class.c (make_class_data): Create vtable for abstract classes.
13681 (get_dispatch_table): Changed to cope with abstract classes.
13683 2000-07-27 Tom Tromey <tromey@cygnus.com>
13685 * parse.y (patch_method_invocation): Don't reverse the argument
13686 list when dealing with anonymous class constructors. Fixed typo in
13689 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13691 * parse.y (build_alias_initializer_parameter_list): Reverse
13692 crafted list when building aliases for anonymous class
13695 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13697 * parse.y (jdep_resolve_class): Don't bother checking potential
13698 innerclass access if `decl' is NULL.
13699 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13702 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13704 * parse.c: Remove (again.)
13706 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13708 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13709 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13710 outside the `if' statement, alias to innerclass removed, `decl'
13711 used to mark the class complete.
13713 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13715 * parse.y (simple_name:): Fixed typo in error message.
13717 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13719 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13720 or its first operand can be error marks.
13722 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13724 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13725 * parse.y (method_header): Likewise.
13727 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13729 * parse.y (process_imports): Consider that one might be trying to
13730 import an innerclass. Fixes gcj/254
13732 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13734 * parse.y (find_as_inner_class): Handle the case where the
13735 enclosing context of an innerclass has been loaded as bytecode.
13737 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13739 * parse.y (simple_name:): Reject `$' in type names.
13740 (resolve_type_during_patch): Use `type' as a second
13741 argument to resolve_no_layout. Fixes gcj/257.
13743 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
13745 * parse.y (find_most_specific_methods_list): Select the only
13746 non-abstract method even if max has been set.
13747 Fixes gcj/285, gcj/298.
13749 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
13751 * lang-specs.h: Added %(jc1) to java compiler options.
13753 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
13755 * .cvsignore: New file.
13757 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13759 * parse.y (not_accessible_p): Access granted to innerclasses
13760 (indirectly) extending the reference type. Fixes gcj/249.
13762 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13764 * parse.y (patch_method_invocation): Fixed comment.
13765 (maybe_use_access_method): Build this$<n>s to the context of the
13766 target method, or a type that extends it. Fixes gcj/242.
13768 2000-07-13 Mark Mitchell <mark@codesourcery.com>
13772 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13774 * parse.y (fold_constant_for_init): Avoid bullish conversion.
13776 2000-07-13 Tom Tromey <tromey@cygnus.com>
13778 * lang-specs.h: Added %{I*}.
13780 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13782 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13784 2000-07-12 Mark Mitchell <mark@codesourcery.com>
13786 * parse-scan.c: Remove.
13788 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13790 * class.c (set_super_info): Handled protected inner classes.
13791 (common_enclosing_context_p): Bail early if arguments aren't both
13793 (get_access_flags_from_decl): Handle private and protected inner
13795 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13796 (CLASS_PROTECTED): Likewise.
13797 (struct lang_type): New bitfield `poic'.
13798 * parse.y (jdep_resolve_class): Call check_inner_class_access on
13799 inner classes only.
13800 (check_inner_class_access): Renamed arguments, added
13801 comments. Handles protected inner classes (fixes gcj/225)
13802 (not_accessible_p): Fixed comments. Avoid handling inner classes.
13804 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13806 * parse.y (resolve_qualified_expression_name): Verify qualified
13807 access to `this'. Fixes gcj/239.
13809 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13811 * jcf-write.c (generate_classfile): Don't install ConstantValue
13814 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13816 * parse.y (resolve_qualified_expression_name): Handle inner class
13817 access. Fixes gcj/256.
13819 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13821 * jcf-write.c (generate_classfile): Properly install the
13822 ConstantValue attribute and the initial value constant pool index
13823 on string constants.
13824 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13827 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13829 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13831 * parse.y (find_as_inner_class): Fixed typo.
13832 (do_resolve_class): Explore enclosing contexts when searching for
13833 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13834 (check_inner_class_access): Check `decl' which can be null in case
13835 of previous errors.
13837 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13839 * java-tree.h (java_debug_context): Declared `extern'.
13840 (safe_layout_class): Likewise.
13841 * parse.y (resolve_field_access): Field must be `static' in order
13842 to be replaced by its initial value. Added comments.
13843 (find_applicable_accessible_methods_list): Fixed typo.
13844 (find_most_specific_methods_list): Methods found in innerclasses
13845 take over methods founds in the enclosing contexts.
13846 (java_complete_tree): Loosen restrictions on the type of DECLs
13847 that can be replaced by their initialization values.
13848 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13850 2000-07-05 Tom Tromey <tromey@cygnus.com>
13852 * Make-lang.in (PARSE_DIR): New macro.
13853 (PARSE_RELDIR): Likewise.
13854 (PARSE_C): Likewise.
13855 (PARSE_SCAN_C): Likewise.
13856 ($(PARSE_C)): New target.
13857 ($(PARSE_SCAN_C)): Likewise.
13858 (SET_BISON): New macro.
13859 (BISONFLAGS): Likewise.
13860 (JAVABISONFLAGS): Likewise.
13862 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
13864 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13865 argument on the first pass for CNI as well as JNI.
13866 (print_method_info): Set up method name on the first pass only.
13868 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13870 * parse.y (parser_qualified_classname): Removed parameter
13872 (create_interface): Removed first passed parameter to
13873 parser_qualified_classname.
13874 (create_class): Likewise. Don't install alias on static
13875 innerclasses. Fixes gcj/275.
13877 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13879 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13880 debugable statement with empty_stmt_node. Fixes gcj/272
13882 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13884 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13887 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13889 * jcf-write.c (push_long_const): Appropriately cast short negative
13892 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13894 * parse.y (verify_constructor_super): Use loop variable
13895 `m_arg_type' initialized with `mdecl_arg_type'.
13897 2000-06-29 Tom Tromey <tromey@cygnus.com>
13899 * parse.y (resolve_field_access): Handle case where `type_found'
13902 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13904 * expr.c (lookup_field): The same field can be found through two
13905 different interface. Don't declare it ambiguous in that case.
13907 2000-06-27 Tom Tromey <tromey@cygnus.com>
13909 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
13910 follows \r, then unget it at a lower level.
13912 2000-06-26 Tom Tromey <tromey@cygnus.com>
13914 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13915 java_complete_tree.
13917 2000-06-25 Tom Tromey <tromey@cygnus.com>
13919 * parse.y (for_statement): Wrap expression in a WFL if it is a
13920 constant. For PR gcj/268.
13922 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13924 * parse.y (do_resolve_class): Minor optimiztion in the package
13925 list search. Removed unnecessary test and return statement.
13926 (valid_ref_assignconv_cast_p): Order of arguments to
13927 enclosing_context_p fixed.
13929 2000-06-24 Tom Tromey <tromey@cygnus.com>
13931 * expr.c (lookup_field): Print error and return error_mark_node if
13932 field reference is ambiguous.
13934 * parse.y (check_abstract_method_definitions): Also check if
13935 `other_method' is abstract.
13937 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13939 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13941 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13942 (struct lang_type): New field `pic'.
13943 (CLASS_PRIVATE): New macro.
13944 * parse.y (check_inner_class_access): New function.
13945 (jdep_resolve_class): Call it.
13947 2000-06-23 Tom Tromey <tromey@cygnus.com>
13949 * parse.y (patch_incomplete_class_ref): Initialize the returned
13950 class. For PR gcj/260.
13952 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13954 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13956 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13958 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13959 Java specific checks.
13960 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13961 screened by DECL_P.
13962 * java-tree.def (CASE_EXPR): Marked 'e'.
13963 (DEFAULT_EXPR): Likewise.
13964 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13965 screened by DECL_P.
13966 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13967 Java specific checks.
13968 (generate_bytecode_insns): Test try_block for BLOCK before using
13970 * parse.y (build_wfl_wrap): Added `location' argument. Set
13971 EXPR_WFL_LINECOL accordingly.
13972 (dim_expr:): Wrap constants with WFLs.
13973 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13974 (resolve_package): Check for `stmt' not being a BLOCK before
13975 building a debuggable statement with it.
13976 (make_qualified_primary): Added extra parameter to build_wfl_wrap
13978 (resolve_field_access): Make sure `decl' is a DECL before treating
13980 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13981 IDENTIFIER_NODE before treating it as such.
13982 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13983 treating it as such.
13984 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13985 to be applied only on non array types.
13987 2000-06-16 Per Bothner <per@bothner.com>
13989 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
13990 define in terms of DECL_RESULT, as that fails when --enable-checking.
13992 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13994 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
13995 types the same in comparison.
13996 (CHECK_OP): Add static prototype.
13998 2000-06-13 Jakub Jelinek <jakub@redhat.com>
14000 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
14001 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
14002 * parse.c: Rebuilt.
14004 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14006 * decl.c (create_primitive_vtable): Prototype.
14008 * jcf-write.c (generate_bytecode_insns): Initialize variable
14011 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
14013 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
14015 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
14016 to track searched classes, and do not search the same class more than
14017 once. Call find_applicable_accessible_methods_list on immediate
14018 superclass, instead of search_applicable_method_list on all ancestors.
14019 Fix for PR gcj/238.
14021 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
14023 * parse.y (register_fields): Permit static fields in inner classes
14024 if they are final. Fix for PR gcj/255.
14026 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
14028 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
14029 * parse.y (find_in_imports): Returned type changed to void,
14030 leading comment fixed.
14031 (register_package): New function.
14032 (qualify_and_find): Likewise.
14033 (package_declaration:): Use `register_package'.
14034 (single_type_import_declaration:): Removed local variable
14035 `node'. Added missing `;' for consistency.
14036 (type_import_on_demand_declaration:): Use `chainon' to link new
14038 (lookup_field_wrapper): Lookup local variables defined in outer
14040 (java_complete_class): Don't reverse the list of imported on demand.
14041 (do_resolve_class): Reorganized. Removed local variable
14042 `original_name'. Call `qualify_and_find' with the current package
14043 name, invoke `find_in_imports_on_demand' right after. Call
14044 `qualify_and_find' with the packages we've seen so far. Fixed
14045 operations numbering in comments.
14046 (java_expand_class): Don't reverse `package_list'.
14047 (find_most_specific_methods_list): New local variables `abstract'
14048 and `candidates'. Use them to pick the right method.
14050 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
14052 * parse.y (check_modifiers_consistency): Don't subtract out
14053 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
14055 2000-06-04 Philipp Thomas <pthomas@suse.de>
14057 * Makefile.in (INTLLIBS): New.
14061 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14063 * class.c (get_dispatch_table): Build the vtable dummy entry list
14064 element with a null purpose. Fixed leading comment.
14065 (build_dtable_decl): Build an accurate dtable type when appropriate
14068 2000-06-02 Richard Henderson <rth@cygnus.com>
14070 * lang.c (lang_get_alias_set): New.
14072 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
14074 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
14075 before using it as the accessed field.
14077 2000-05-31 Tom Tromey <tromey@cygnus.com>
14079 * java-tree.h (boolean_array_vtable, byte_array_vtable,
14080 char_array_vtable, short_array_vtable, int_array_vtable,
14081 long_array_vtable, float_array_vtable, double_array_vtable):
14083 * expr.c (get_primitive_array_vtable): New function.
14084 (create_primitive_vtable): New function.
14085 (java_lang_expand_expr): Enable code to statically generate
14087 * decl.c (init_decl_processing): Create primitive vtables.
14088 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
14089 short_array_vtable, int_array_vtable, long_array_vtable,
14090 float_array_vtable, double_array_vtable): Define.
14092 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
14094 * java/parse.y (find_applicable_accessible_methods_list):
14095 Don't add an uninitialized value to the list.
14097 2000-05-25 Tom Tromey <tromey@cygnus.com>
14099 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
14100 when trying to see if field's class should be initialized. Always
14101 initialize field's declaring class, not qualified class.
14104 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
14105 `wfl_operator', to maybe_build_primttype_type_ref.
14108 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
14110 * parse.y (patch_method_invocation): Don't try to lookup methods
14111 in primitive types.
14113 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14115 * parse.y (resolve_field_access): Call the appropriate <clinit>
14116 before accessing the length of a static array. Craft a decl for
14117 the field while its time. Fixes PR gcj/129.
14119 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14121 * parse.y (resolve_package): Correctly set `*next' (was off by
14123 (resolve_qualified_expression_name): Fixed comment.
14125 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14127 * jcf-parse.c (jcf_parse_source): Reset current_class and
14128 current_function_decl to NULL before parsing a new file.
14130 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14132 * parse.y (block_end:): If the collected block doesn't feature a
14133 statement, insert an empty statement.
14135 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14137 * parse.y (maybe_yank_clinit): New function.
14138 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
14139 end of the list of methods belonging to a class.
14140 (java_complete_expand_method): Check whether <clinit> is really
14141 necessary and expand it accordingly.
14143 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14145 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
14146 processed by the method's switch statement.
14148 2000-05-19 Tom Tromey <tromey@cygnus.com>
14150 * java-tree.h: Added init state enum.
14151 * decl.c (emit_init_test_initialization): Initialize class
14152 initialization check variable by looking at class' state.
14154 2000-05-19 Tom Tromey <tromey@cygnus.com>
14156 * java-tree.h (build_instanceof): Declare.
14157 (build_get_class): Declare.
14158 * parse.y (patch_binop): Use build_instanceof.
14159 * expr.c (build_instanceof): New function. If class is final,
14160 don't make a function call.
14161 (expand_java_INSTANCEOF): Use it.
14162 (build_get_class): New function.
14164 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
14166 * jcf-write.c (generate_classfile): Scan the source_file for
14167 slashes with the right pointer variable.
14169 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
14171 * lang.c (lang_decode_option): Update -Wunused flags by calling
14173 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
14175 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
14177 * check_init.c (check_init): Constify local char *.
14178 * class.c (push_class): Constify local char *.
14179 * java_tree.h: Update prototypes.
14180 * jcf-io.c (open_class): Constify filename parameter and
14182 (find_class): Remove redundant string copy. Cast return from
14184 * jcf-parse.c (read_class, parse_class_file, yyparse):
14185 Constify local char *.
14186 * jcf-write.c (generate_bytecode_insns, generate_classfile):
14187 Constify local char *.
14188 * jcf.h (JCF): Constify filename and classname.
14189 (JCF_FINISH): Cast args to FREE to char * when appropriate.
14190 * lang.c (init_parse): Constify parameter and return value.
14191 * lex.c (java_get_line_col): Constify filename parameter.
14192 * parse.h: Constify parser_ctxt.filename. Update prototypes.
14193 * parse.y (java_parser_context_suspend,
14194 issue_warning_error_from_context, safe_layout_class): Constify
14196 * parse.c: Regenerate.
14198 2000-05-08 Tom Tromey <tromey@cygnus.com>
14200 * expr.c (build_jni_stub): Cache the result of
14201 _Jv_LookupJNIMethod.
14203 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14205 * decl.c (predef_filenames_size): Now 7.
14206 (predef_filenames): New seventh entry.
14208 2000-05-04 Tom Tromey <tromey@cygnus.com>
14210 * boehm.c (mark_reference_fields): Don't mark RawData fields.
14211 Keep track of when we've seen a reference field after a
14212 non-reference field.
14213 (get_boehm_type_descriptor): Handle case where we see
14214 non-reference fields but no trailing reference field.
14215 * decl.c (rawdata_ptr_type_node): Define.
14216 (init_decl_processing): Initialize rawdata_ptr_type_node.
14217 * java-tree.h (rawdata_ptr_type_node): Declare.
14219 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14221 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
14222 specifiers in calls to fprintf.
14224 2000-05-03 Andrew Haley <aph@cygnus.com>
14226 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
14228 * javaop.h (WORD_TO_INT): New function.
14229 (IMMEDIATE_s4): Use WORD_TO_INT.
14230 * jcf.h (JPOOL_INT): Ditto.
14232 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
14235 2000-04-19 Tom Tromey <tromey@cygnus.com>
14237 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
14238 on native function.
14239 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
14241 * expr.c (build_jni_stub): New function.
14242 * lang-specs.h: -fjni and -femit-class-file are incompatible.
14243 * parse.c: Rebuilt.
14244 * parse.y (java_complete_expand_methods): Expand a native method
14245 and call build_jni_stub if -fjni given.
14246 * lang-options.h: Document -fjni.
14247 * lang.c (flag_jni): New global.
14248 (lang_f_options): Added `jni' entry.
14249 * java-tree.h (soft_lookupjnimethod_node,
14250 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
14252 (flag_jni): Declare.
14253 (build_jni_stub): Declare.
14254 (struct lang_decl): Added `native' flag.
14255 (METHOD_NATIVE): Redefined to use `native' field of lang specific
14257 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
14258 soft_jnipopsystemframe_node): New globals.
14259 (init_decl_processing): Set them. _Jv_InitClass only takes one
14262 * java-tree.def: Put into `C' mode.
14264 2000-04-27 Tom Tromey <tromey@cygnus.com>
14267 * expr.c (expand_invoke): Generate check to see if object pointer
14268 is null in nonvirtual invocation case.
14269 * java-tree.h (soft_nullpointer_node): Declare.
14270 * decl.c (soft_nullpointer_node): New global.
14271 (init_decl_processing): Initialize soft_nullpointer_node.
14272 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14273 or `private' methods.
14274 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14276 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14278 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
14281 2000-04-26 Tom Tromey <tromey@cygnus.com>
14283 * zextract.c (find_zip_file_start): New function.
14284 (read_zip_archive): Use it.
14286 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14288 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
14290 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14292 * class.c (common_enclosing_context_p): New function.
14293 * java-tree.h (common_enclosing_context_p): Added prototype.
14294 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
14295 classes sharing an outer context with the current instance.
14296 * parse.y (build_access_to_thisn): Fixed leading comment.
14297 (verify_constructor_super): New local `supper_inner'. Skip
14298 enclosing context argument in the case of inner class constructors.
14299 (patch_method_invocation): Insert proper context as second
14300 parameter to pure inner class constructor super invocations.
14302 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14304 * parse.y (end_class_declaration): Reset the interface number
14307 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14309 * parse.y (source_start_java_method): Deleted unnecessary code.
14310 (patch_method_invocation): Fixed comment.
14312 2000-04-24 Robert Lipe <robertlipe@usa.net>
14314 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
14316 2000-04-23 Tom Tromey <tromey@cygnus.com>
14318 * boehm.c (mark_reference_fields): Use int_byte_position.
14320 2000-04-22 Tom Tromey <tromey@cygnus.com>
14322 * boehm.c (mark_reference_fields): Only call byte_position on
14325 2000-04-22 Tom Tromey <tromey@cygnus.com>
14327 * boehm.c (mark_reference_fields): Added `last_view_index'
14328 argument. Use DECL_FIELD_OFFSET to determine field's offset.
14330 2000-04-20 Mo DeJong <mdejong@cygnus.com>
14332 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
14333 * parse.y (check_class_interface_creation): Fixed comments. Select
14334 permitted modifiers for (inner) interfaces. Changed error message
14335 to report rejected modifiers used with local classes.
14337 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14339 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
14340 of directly inherited type considered in scope.
14341 * parse.y (do_resolve_class): Search inherited classes for inner
14344 2000-04-20 Tom Tromey <tromey@cygnus.com>
14346 * parse.y (not_accessible_p): Use member's class, not current
14347 class, when doing inheritance check for protected reference.
14350 2000-04-20 Jason Schroeder <shrode@subnature.com>
14352 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
14354 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14356 * parse.y (lookup_field_wrapper): Search for final local aliases.
14357 (resolve_expression_name): Let lookup_field_wrapper search for
14358 final local aliases. Force the value of `name' if one is found.
14359 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
14360 an expression name. Fixed comments.
14362 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14364 * parse.y (yyerror): `msg' can be null, don't use it in that case.
14366 2000-04-19 Tom Tromey <tromey@cygnus.com>
14368 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
14370 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14372 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
14374 2000-04-18 Tom Tromey <tromey@cygnus.com>
14377 * gjavah.c (utf8_cmp): Changed return value.
14378 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
14380 (cxx_keywords): New global.
14381 (get_field_name): Handle new result of cxx_keyword_subst.
14382 (print_method_info): Likewise.
14384 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
14386 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
14387 with a newline, for CNI.
14388 (print_stub_or_jni): Print a space or newline before method name for
14389 CNI as well as JNI.
14390 (print_cxx_classname): Don't write leading "::" in CNI stub method.
14391 (process_file): Include gcj/cni.h if generating CNI stubs.
14393 2000-04-16 Tom Tromey <tromey@cygnus.com>
14395 * gjavah.c (decompile_method): Use print_field_name.
14398 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14400 * parse.y (java_expand_classes): Reverse the package list once.
14401 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
14403 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
14404 the `==' and `!=' operators.
14406 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14408 * jcf-write.c (generate_bytecode_insns): At invocation time,
14409 always relate an interface method to the type of its selector.
14411 2000-04-05 Tom Tromey <tromey@cygnus.com>
14414 * expr.c (expand_invoke): Generate check to see if object pointer
14415 is null in nonvirtual invocation case.
14416 * java-tree.h (soft_nullpointer_node): Declare.
14417 * decl.c (soft_nullpointer_node): New global.
14418 (init_decl_processing): Initialize soft_nullpointer_node.
14419 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14420 or `private' methods.
14421 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14423 2000-04-05 Tom Tromey <tromey@cygnus.com>
14425 Fix for PR gcj/140:
14426 * parse.y (check_final_assignment): Recognize assignments to the
14427 `length' field of an array when generating class files.
14429 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14431 * class.c (decl_hash): Prototype removed.
14432 (decl_compare): Likewise.
14434 2000-04-05 Tom Tromey <tromey@cygnus.com>
14436 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
14437 * parse.y (check_modifiers_consistency): Check for final/volatile
14438 clash. Fixes PR gcj/164.
14440 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14442 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
14444 (java_hash_compare_tree_node): Renamed from `decl_compare, made
14446 (add_method_1): Use `java_hash_hash_tree_node' and
14447 `java_hash_compare_tree_node'.
14448 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
14449 (java_hash_compare_tree_node): Likewise.
14450 * parse.y (find_applicable_accessible_methods_list): Create,
14451 delete and use a hash table to remember already searched interfaces.
14453 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
14455 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
14458 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14460 * boehm.c (mark_reference_fields, set_bit): Prototype.
14461 (set_bit): Un-ANSI-fy definition.
14463 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
14466 * decl.c (emit_init_test_initialization): Likewise.
14468 * gjavah.c (jni_print_char): Likewise.
14470 * parse.y (create_new_parser_context): Likewise.
14472 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
14474 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
14475 patch missing hunk. Fixed indentation.
14477 2000-03-30 Tom Tromey <tromey@cygnus.com>
14479 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
14480 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
14482 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14484 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14485 when negative *before* using it as an array index.
14486 * ChangeLog: Fixed typo.
14488 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14490 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14491 to 0 when it reaches -1.
14493 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14495 * jcf-parse.c (get_constant): Properly cast `num' during the
14496 invocation of `add_double'.
14497 * jcf-write.c (push_long_const): Properly cast `lo' before
14498 comparing it to short bounds.
14499 * parse-scan.y (interface_declaration:): Rule re-arrange so that
14500 `interface_body:' is reduced after the current interface is
14503 2000-03-26 Tom Tromey <tromey@cygnus.com>
14505 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
14506 Java-specific `-f' option.
14508 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14510 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
14511 Adjust order of making types.
14512 Make bitsize_*_node values.
14514 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14516 * class.c (make_field_value): Use byte_position.
14517 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
14518 (java_array_data_offset): Likewise.
14519 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
14522 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14524 * parse.y (check_abstract_method_definitions): New local
14525 `end_type_reached'. Make sure we also consider `end_type'.
14526 (java_check_abstract_method_definitions): Make sure we eventually
14527 consider `java.lang.Object'.
14528 (maybe_use_access_method): Don't use access method if not in the
14529 context of a pure inner class or if the method's context is right.
14530 (find_applicable_accessible_methods_list): New static flag
14531 `object_done'. Don't search abstract classes as interfaces. Fixed
14532 indentation. Fixed the `java.lang.Object' only search. Search
14533 class interface(s) first, then fully search enclosing contexts.
14534 (find_most_specific_methods_list): Pick the closest candidate when
14535 they're all abstract.
14537 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14539 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14540 properly initialize `finished_label'. Don't emit gotos for empty
14543 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14545 * except.c (emit_handlers): Clear catch_clauses_last.
14547 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14549 * parse.y (check_method_types_complete): New function.
14550 (create_class): Reset anonymous class counter only when seeing an
14552 (java_complete_class): JDEP_METHOD: Don't recompute signature
14555 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14557 * class.c (build_static_ref): Fixed indentation in comment.
14558 * java-tree.def (TRY_EXPR): Fixed typo in name.
14559 (CLASS_LITERAL): Likewise.
14560 * java-tree.h: (TYPE_DOT_CLASS): New macro.
14561 (struct lang_type): New field `dot_class'.
14562 * jcf-write.c (generate_bytecode_insns): Fixed error message.
14563 (generate_classfile): Method `class$' is synthetic.
14564 * parse.y (build_do_class_method): New function.
14565 (build_dot_class_method_invocation): Likewise.
14566 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
14567 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
14568 (qualify_ambiguous_name): Likewise.
14569 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
14570 (build_try_statement): Fixed leading comment.
14572 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14574 * class.c (make_field_value): Properly handle sizes.
14575 (get_dispatch_vector): Use tree_low_cst and host_integerp.
14576 (layout_class_method): Count using trees.
14577 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
14578 * expr.c (java_array_data_offset): Use int_bit_position.
14579 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
14580 (build_invokevirtual): Use tree_low_cst and do computations with trees.
14582 2000-03-16 Tom Tromey <tromey@cygnus.com>
14584 * lang.c (flag_hash_synchronization): New global.
14585 (lang_f_options): Added `hash-synchronization'.
14586 * lang-options.h: Mention -fhash-synchronization.
14587 * java-tree.h (flag_hash_synchronization): Declare.
14588 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
14589 hash table synchronization is disabled.
14590 * decl.c (init_decl_processing): Only push `sync_info' value when
14591 hash table synchronization is disabled.
14592 * class.c (make_class_data): Only push `sync_info' field when hash
14593 table synchronization is disabled. Removed dead code.
14595 2000-03-16 Tom Tromey <tromey@cygnus.com>
14597 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
14599 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14601 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
14603 * parse.y (patch_method_invocation): Handle anonymous classes
14604 creation in static context.
14606 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14608 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
14609 * parse.y (resolve_qualified_expression_name): Use it.
14610 (patch_method_invocation): Likewise.
14612 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14614 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
14615 depending on the type of dependency which dictates what the
14617 (unresolved_type_p): Resolved types limited to the current class.
14619 2000-03-15 Tom Tromey <tromey@cygnus.com>
14621 * decl.c (init_decl_processing): Set type of `sync_info' to be
14624 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14625 Correctly compute bit number for current slot. Zero `high' and
14626 `low' in DS_LENGTH case. Don't skip inherited fields. Use
14627 mark_reference_fields.
14628 (mark_reference_fields): New function.
14630 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14632 * parse.y (register_incomplete_type): Fixed initialization of
14635 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14637 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14639 (push_class_context, pop_class_context): New function.
14640 (class_body:): Call pop_class_context.
14641 (interface_body:): Likewise.
14642 (INNER_QUALIFIER): New macro.
14643 (report_class_declaration): Changed output format and use
14644 INNER_QUALIFIER. Call push_class_context.
14646 2000-02-14 Andrew Haley <aph@cygnus.com>
14648 * check-init.c (check_init): Add new cases for unary and binary
14651 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14653 * parse.y (resolve_package): Set `next' once a type name has been
14654 progressively discovered.
14655 (resolve_qualified_expression_name): Propagate resolution only if
14656 there are remaining qualifiers. Take into account `q' might have
14657 been cleared after re-qualification.
14658 * parse.y (patch_method_invocation): New local `resolved'.
14659 Section dealing with qualified expression rewritten to use
14660 resolve_field_access.
14662 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14664 * parse.h (PUSH_CPC): Fixed indentation.
14665 (DEBUG_CPC): New macro.
14666 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
14667 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
14668 * parse.y (class_body_declaration:): Use
14669 SET_CPC_INSTANCE_INITIALIZER_STMT.
14670 (method_declaration:): Check for null current_function_decl.
14671 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14672 (java_parser_context_pop_initialized_field): Better handling of
14674 (maybe_make_nested_class_name): Mark nested class name as
14675 qualified when necessary.
14676 (end_class_declaration): Don't call java_parse_context_resume when
14677 one or more error occurred.
14678 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14679 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
14680 SET_CPC_INITIALIZER_STMT.
14681 (method_header): Check for inner classes declaring static methods.
14682 (resolve_qualified_expression_name): Handle situation where `this'
14685 2000-03-13 Hans Boehm <boehm@acm.org>
14687 * typeck.c (build_prim_array_type): Correctly set the high word too.
14689 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14691 * parse.y (java_complete_expand_methods): Leave <clinit> out of
14693 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14694 list of methods for interfaces.
14696 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14698 * parse.y (qualify_ambiguous_name): Properly handle expressions
14701 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14703 * parse.y (check_final_assignment): Extended to process
14705 (patch_assignment): Have check_final_assignment called only once.
14707 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14709 * java-tree.h (IS_INIT_CHECKED): New flag.
14710 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14711 * parse.y (patch_string): Call force_evaluation_order on the
14712 completed string concatenation tree.
14713 * expr.c (force_evaluation_order): Call force_evaluation_order on
14714 function's arguments too.
14716 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14718 * decl.c (emit_init_test_initialization): Mark KEY as unused.
14719 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14720 (build_anewarray): Likewise.
14721 * parse.y (patch_newarray): Likewise.
14722 * parse.c: Regenerated.
14724 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14726 * decl.c (init_decl_processing): Added new class fields `depth',
14727 `ancestors', and `idt' to class_type_node. Use
14728 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14729 * class.c (make_class_data): Push initial values for new fields.
14730 * java-tree.h: Updated prototype for `build_invokeinterface'.
14731 * expr.c (build_invokeinterface): Changed parameters to accept
14732 `method' tree. Calculate index of `method' in its declaring
14733 interface. Build call to _Jv_LookupInterfaceMethodIdx.
14734 (expand_invoke): Call `build_invokeinterface' with new parameters.
14735 * parse.y (patch_invoke): Call `build_invokeinterface' with new
14738 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14740 * typeck.c (lookup_do): Search superinterfaces first
14741 when looking up an interface method. From Godmar Back
14742 <gback@cs.utah.edu>
14744 2000-03-06 Tom Tromey <tromey@cygnus.com>
14746 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14748 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14750 * java-tree.h (lookup_argument_method2): Declared.
14751 (safe_layout_class): Prototype moved from parse.h.
14752 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14753 * parse.y (java_check_regular_methods): Local `super_class' gone.
14754 Call lookup_argument_method2 instead of lookup_argument_method.
14755 Perform modifier match for methods found declared in implemented
14756 interfaces. Fixed indentation problem. Overriding/hiding error
14757 report to take place only for methods found in classes.
14758 * typeck.c (lookup_argument_method): Changed leading
14759 comment. Re-written by calling lookup_do.
14760 (lookup_argument_method2): New function.
14761 (lookup_java_method): Re-written by calling lookup_do.
14762 (lookup_do): New function.
14764 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14766 * check-init.c (check_init): Removed dead code. Handle (blank)
14768 * parse.y (declare_local_variables): New local `final_p', set it
14769 and use it to initialize LOCAL_FINAL.
14770 (check_final_assignment): Only check FIELD_DECLs.
14772 2000-02-17 Tom Tromey <tromey@cygnus.com>
14774 * Makefile.in (JAVA_OBJS): Added boehm.o.
14775 (boehm.o): New target.
14776 * Make-lang.in (JAVA_SRCS): Added boehm.c.
14777 * java-tree.h (flag_use_boehm_gc): Declare.
14778 (get_boehm_type_descriptor): Declare.
14779 * lang.c (lang_f_options): Added `use-boehm-gc'.
14780 (flag_use_boehm_gc): New global.
14781 * lang-options.h: Added -fuse-boehm-gc.
14782 * boehm.c: New file.
14783 * class.c (get_dispatch_table): If class uses a Boehm type
14784 descriptor, put it in the vtable.
14785 (make_class_data): Removed dead code.
14787 2000-03-03 Per Bothner <per@bothner.com>
14789 * decl.c (init_decl_processing): Initialize sizetype properly.
14791 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14793 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14794 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14795 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14796 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14797 (jcf_parse): New local `current'. Load innerclasses seen in outer
14798 context being processed.
14799 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14800 * jcf-write.c (append_innerclasses_attribute): New function.
14801 (append_innerclasses_attribute_entry): Likewise.
14802 (get_access_flags): Handle static classes. Set anonymous and local
14803 classes to be private.
14804 (generate_classfile): Attribute count adjusted. Call
14805 append_innerclasses_attribute.
14806 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14807 PURE_INNER_CLASS_TYPE_P.
14808 * parse.y (parser_qualified_classname): New parameter `is_static',
14809 produce non qualified name accordingly.
14810 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14811 (create_interface): Added argument to parser_qualified_classname.
14812 (create_class): Added argument to parser_qualified_classname. Setup
14813 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14814 (add_inner_class_fields): Fixed indentation.
14815 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14816 (method_declarator): Fixed typo in comment.
14817 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14818 (build_current_thisn): Likewise.
14819 (patch_method_invocation): Likewise.
14821 2000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
14823 * decl.c (current_function_decl): Move to toplev.c.
14825 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14827 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14828 (DECL_BIT_INDEX): Use underlying representation.
14829 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14831 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14833 * expr.c (build_java_ret): Pass proper type to size_binop.
14835 2000-02-25 Anthony Green <green@cygnus.com>
14837 * expr.c (build_class_init): Mark the decl to be ignored by
14839 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14840 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14841 * class.c (init_test_hash_newfunc): New function.
14842 (decl_hash): New function.
14843 (decl_compare): New function.
14844 * decl.c (emit_init_test_initialization): New function.
14845 (complete_start_java_method): Traverse the init test hashtable,
14846 calling emit_init_test_initialization.
14847 (always_initialize_class_p): Define.
14848 * expr.c (build_class_init): Use initialization tests when
14849 emitting class initialization code.
14850 (always_initialize_class_p): Declare.
14851 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14853 * java-tree.h: Include hash.h.
14854 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14855 (struct lang_decl): Add init_test_table field.
14856 (init_test_hash_entry): Define.
14858 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14860 * gjavah.c (main): Avoid using `argi' to report unimplemented
14863 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14865 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14866 initialize locals to avoid warnings. Local `exception_type' moved
14869 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14871 * parse.y (resolve_expression_name): Use `orig' as a second
14872 argument to resolve_field_access.
14873 (resolve_field_access): Removed unnecessary code when dealing with
14876 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14878 * class.c (push_super_field): Don't push the field twice.
14879 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14880 * parse.h (java_reorder_fields): Prototyped.
14881 * parse.y (java_reorder_fields): New function.
14882 (java_layout_class): Simplified not to worry about re-ordering.
14884 2000-02-23 Tom Tromey <tromey@cygnus.com>
14886 * gjavah.c (print_name): In JNI case, correctly quote string.
14887 (print_method_info): Don't handle overrides in JNI mode.
14889 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14891 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14892 value type set to `boolean_type_node'.
14894 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14896 * jcf-dump.c (main): Test for correct condition after
14897 output file creation.
14899 2000-02-19 Anthony Green <green@cygnus.com>
14901 * jcf-depend.c (add_entry): Fix test for first list entry.
14903 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14905 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14906 * constants.c (build_constants_constructor): Likewise.
14908 2000-02-19 Anthony Green <green@cygnus.com>
14910 * jcf-depend.c (add_entry): Add entries to the end of the list.
14912 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
14914 * decl.c (INT_TYPE_SIZE): Define if necessary.
14915 (expand_java_return): Handle the case of a native integer smaller
14916 than a JVM integer.
14918 2000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
14920 * gjavah.c (help): Use GCCBUGURL.
14921 * jv-scan.c (help): Likewise.
14922 * jcf-dump.c (help): Likewise.
14924 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14926 * jcf-write.c (generate_bytecode_insns): Don't generate empty
14929 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14931 * jcf-parse.c (load_class): Call `fatal' if no file containing
14932 the target class are found.
14934 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
14936 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14937 lex.c, lex.h, and PARSE_H to...
14938 (parse.o, parse-scan.o): ...here, respectively.
14940 * lex.c: Split out code that may trigger SIGFPE from yylex()
14941 to its own function.
14942 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14944 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14946 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14948 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14950 * parse.y (outer_field_access_p): Stop in time when outer contexts
14952 (resolve_qualified_expression_name): Properly qualify *everything*
14953 after a package.type to be resoled as expression names.
14954 (find_applicable_accessible_methods_list): Save/restore `class' to
14955 isolate it from a possible outer context search.
14957 2000-02-15 Tom Tromey <tromey@cygnus.com>
14959 * gjavah.c (jni_print_char): New function.
14960 (print_full_cxx_name): Use it.
14961 (decode_signature_piece): Likewise.
14962 (print_cxx_classname): Likewise.
14964 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14966 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14968 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14970 * gjavah.c: Include version.h.
14972 * jcf-dump.c: Likewise.
14974 * jv-scan.c: Likewise.
14976 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14978 * parse.y (outer_field_access_fix): First parameter now a tree
14979 node. Check for assignment to final. First argument to
14980 build_outer_field_access_fix modified to accommodate prototype.
14981 (build_outer_field_access): Don't check for assignment to final
14983 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14984 possibly returned by outer_field_access_fix. Changed
14985 outer_field_access_fix's first argument.
14986 (check_final_assignment): $finit$'s context is OK.
14987 (patch_unaryop): Use node instead of its line/column value when
14988 calling outer_field_access_fix.
14990 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14992 * parse.y (interface_declaration:): No longer tagged
14993 <node>. Re-installed default action.
14994 (class_member_declaration:): Handle inner interfaces.
14995 (interface_member_declaration): Handle inner interfaces and
14997 (create_interface): Push error if one seen. Suspend parsing
14998 context when processing an inner interface.
14999 (register_fields): Inner class static field limitations not to
15000 apply to inner interfaces.
15002 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15004 * jcf-parse.c (load_class): Update `java_error_count' when a
15005 class' file can't be found.
15006 (parse.y): Avoid (byte)code generation when errors seen.
15008 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15010 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
15011 decodes a valid node.
15012 (patch_binop): Handle TRUNC_DIV_EXPR.
15014 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15016 * parse.y (resolve_package): New local `acc'. Try to progressively
15017 build and guess a package and type name.
15019 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15021 * parse.y (find_applicable_accessible_methods_list): Load and
15022 layout the search class if necessary.
15023 (java_complete_tree): Keep to original type of the folded initial
15026 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15028 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
15029 Generate error message if circularity is detected. New static
15031 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
15032 * jcf-write.c (generate_bytecode_insns): Very simply handle
15034 * parse.y (java_check_circular_reference): Use
15035 `cyclic_inheritance_report' during report, if necessary.
15036 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
15037 walking NEW_ARRAY_INIT twice.
15039 2000-02-09 Tom Tromey <tromey@cygnus.com>
15041 * parse.y (check_class_interface_creation): Allow inner classes to
15042 be `private' or `protected', check modifiers' consistency. Prevent
15043 block local classes from bearing any modifiers.
15045 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15047 * except.c (check_start_handlers): Re-add prototype lost in last
15049 (maybe_start_try): Remove excess argument to `check_start_handlers'.
15051 2000-02-09 Andrew Haley <aph@cygnus.com>
15053 * decl.c (clear_binding_level): Remove excess initializer.
15054 (maybe_poplevels): Remove unused variable.
15055 (force_poplevels): Ditto.
15056 (struct binding_level): Add comment.
15058 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
15060 * jcf-write.c (generate_classfile): Don't consider
15061 pre-initialization with reference value (use <clinit> instead.)
15062 * parse.y (java_fix_constructors): No generated constructor for
15064 (build_outer_field_access): Removed debug message.
15065 (outer_field_expanded_access_p): Adapted to bytecode generation.
15066 (build_outer_field_access_method): Use fix_method_argument_names.
15067 (build_outer_method_access_method): Fixed indentation. Added
15068 comment. Handle access method generation for static and also void
15070 (build_access_to_thisn): Inserted debug message.
15071 (maybe_build_thisn_access_method): Use fix_method_argument_names.
15072 (resolve_qualified_expression_name): Fixed comment.
15073 (not_accessible_p): Adapted to bytecode generation. Added comment.
15074 (patch_method_invocation): Added comment.
15075 (maybe_use_access_method): Fixed leading comment. Handle static
15077 (java_complete_lhs): Don't shortcut handling of initialized upon
15078 declaration String type static fields when generating bytecode.
15079 (patch_unaryop): Handle outer field access when generating
15082 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
15084 * java-tree.h (FIELD_THISN): New macro.
15085 * jcf-write.c (append_synthetic_attribute): New function.
15086 (generate_classfile): Set "Synthetic" attribute on this$<n>,
15087 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
15088 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
15090 (build_outer_field_access): Turned on access functions usage and
15091 generation when compiling to bytecode.
15092 (maybe_use_access_method): Likewise.
15094 2000-01-25 Andrew Haley <aph@cygnus.com>
15096 * java-except.h (struct eh_range): Add `expanded' field.
15097 (maybe_start_try): Add end_pc arg.
15098 (maybe_end_try): Ditto.
15099 * java-tree.h (force_poplevels): new function.
15100 * expr.c (expand_byte_code): Don't call maybe_start_try or
15102 * except.c (add_handler): Reset expanded.
15103 (expand_start_java_handler): Set expanded.
15104 (check_start_handlers): Don't expand a start handler that's
15105 already been expanded.
15106 (maybe_start_try): Add end_pc arg. Only expand a handler which
15108 (expand_end_java_handler): call force_poplevels.
15109 (force_poplevels): new function.
15110 * decl.c (binding_level): Add start_pc of binding level.
15111 (maybe_pushlevels): Call maybe_start_try when pushing binding
15113 (maybe_poplevels): Call maybe_end_try when popping binding levels.
15114 (LARGEST_PC): Define.
15115 (clear_binding_level): Use LARGEST_PC.
15117 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
15118 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
15119 (binding_depth, is_class_level, current_pc): new variables.
15120 (struct binding_level): ditto.
15121 (indent): new function.
15122 (push_jvm_slot): add debugging info.
15123 (maybe_pushlevels): ditto.
15124 (maybe_poplevels): ditto.
15125 (pushlevel): ditto.
15127 (start_java_method): ditto.
15128 (give_name_to_locals): comment only.
15129 * except.c (binding_depth, is_class_level, current_pc):
15131 (expand_start_java_handler): add debugging info.
15132 (expand_end_java_handler): ditto.
15134 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15136 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
15137 (print_name_for_stub_or_jni, process_file): Constify a char*.
15139 2000-02-03 Tom Tromey <tromey@cygnus.com>
15141 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
15143 2000-01-31 Scott Bambrough <scottb@netwinder.org>
15145 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
15146 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
15149 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15151 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
15152 * java-tree.h (TYPE_II_STMT_LIST): New macro.
15153 (struct lang_type): New field `ii_block'.
15154 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
15155 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
15156 * parse.h (struct parser_ctxt): New field `instance_initializers'.
15157 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
15158 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
15159 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
15161 * parse.y (add_instance_initializer): New function.
15162 (in_instance_initializer): New static global.
15163 (class_body_declaration:): Link instance initializer block.
15164 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
15165 (array_creation_expression:): Remove unused local.
15166 (java_parser_context_push_initialized_field): Fixed leading
15167 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
15168 CPC_INSTANCE_INITIALIZER_LIST.
15169 (java_parser_context_pop_initialized_field): Likewise.
15170 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
15171 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
15172 CPC_INITIALIZER_STMT.
15173 (fix_constructors): New local `class_type'. Use it. Call
15174 add_instance_initializer.
15175 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
15176 (patch_return): Forbid return in instance initializers.
15177 (patch_throw_statement): Enforce exception handling in the context
15178 of instance initializers.
15180 2000-02-03 Tom Tromey <tromey@cygnus.com>
15182 * Make-lang.in (java.mostlyclean): Remove executables in
15185 2000-01-31 Scott Bambrough <scottb@netwinder.org>
15187 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
15188 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
15189 (java_float_finite): Convert to use union Word from javaop.h.
15190 (java_double_finite): Convert to use union DWord from javaop.h.
15192 2000-02-02 Tom Tromey <tromey@cygnus.com>
15194 * gjavah.c (options): Added `jni' entry.
15195 (help): Document -jni.
15196 (flag_jni): New global.
15197 (process_file): Handle JNI output. Don't print text from
15198 -prepend, -add, etc, when generating stubs. Only remove `.class'
15199 suffix if it actually exists.
15200 (main): Create a `.c' file when run with `--jni --stubs'. Create
15201 correct output file name with `--jni'.
15202 (print_include): Mangle header name differently in JNI case.
15203 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
15205 (print_method_info): Handle JNI case. Put signature info into
15206 method name. Handle case when STREAM is NULL.
15207 (print_name_for_stub_or_jni): New function.
15208 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
15209 (print_cxx_classname): Handle JNI.
15210 (print_full_cxx_name): Likewise.
15211 (decode_signature_piece): Likewise.
15212 (overloaded_jni_method_exists_p): New function.
15213 (struct method_name): Added `signature' and `sig_length' fields.
15214 (HANDLE_END_FIELD): Do nothing in JNI mode.
15216 2000-02-02 Tom Tromey <tromey@cygnus.com>
15218 * jv-scan.c: Include version.c, <getopt.h>.
15219 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
15220 (options): New array.
15221 (usage): New function.
15222 (version): New function.
15223 (main): Use getopt_long to parse command line.
15224 * jcf-dump.c: Include version.c, <getopt.h>.
15225 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
15226 OPT_JAVAP): New macros.
15227 (options): New array.
15228 (usage): Return `void'. Changed message.
15229 (help): New function.
15230 (version): New function.
15231 (main): Use getopt_long_only to parse command line.
15232 * gjavah.c: Include <getopt.h>.
15233 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
15234 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
15235 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
15236 (options): New array.
15237 (java_no_argument): Removed.
15238 (help): Updated with missing options.
15239 (main): Use getopt_long_only to parse command line.
15240 (usage): Changed message.
15242 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15244 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
15245 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
15246 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
15247 * parse.y (array_creation_expression:): Handle anonymous arrays.
15248 (build_array_from_name): Don't set `ret_name' if null.
15249 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
15250 (qualify_ambiguous_name): Likewise.
15251 (java_complete_expand_class): Likewise.
15253 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15255 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
15256 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
15257 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
15258 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
15259 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
15260 AIPL_FUNCTION_COMPLETED_INVOCATION.
15261 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
15262 AIPL_FUNCTION_INVOCATION_READY.
15263 (AIPL_FUNCTION_DECLARATION): New enum entry.
15264 * parse.y (reorder_static_initialized): New function.
15265 (java_parser_context_pop_initialized_field): Use it.
15266 (add_inner_class_fields): Use
15267 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
15268 augmented. Install marker after last alias initializer, if any.
15269 (generate_finit): Fixed typo. Don't try to retain only the used
15271 (method_header): Compute and set DECL_FUNCTION_NAP.
15272 (method_declarator): Fixed comment. Insert alias initializer in
15274 (build_alias_initializer_parameter_list): Fixed leading
15275 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
15276 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
15277 (java_complete_expand_class): Code to retain only used aliases
15279 (java_complete_expand_methods): New local `first_decl'. Generate
15280 $finit$ first, then expand the constructors, regular methods and
15282 (java_complete_expand_method): Don't report error on missing
15283 return statement if previously detected bogus.
15284 (fix_constructors): Don't patch constructor parameters list.
15285 (patch_method_invocation): Use new AIPL enum values. Reverse
15286 alias initializer list for anonymous classes.
15288 2000-01-30 Anthony Green <green@redhat.com>
15290 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
15291 determine how many stack slots to pop.
15293 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15295 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
15296 error handling/recovery.
15297 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
15299 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
15301 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
15302 FIELD_LOCAL_ALIAS_USED): New macros.
15303 (DECL_FUNCTION_NAP): New macro.
15304 (struct lang_decl): New field `nap'.
15305 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
15306 (struct lang_type): New fields `finit_stmt_list' and
15307 `clinit_stmt_list'.
15308 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
15309 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
15310 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
15311 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
15312 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
15313 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
15314 (BUILD_THROW): Macro line separator re-indented.
15315 * parse.y (end_class_declaration): New function.
15316 (maybe_generate_pre_expand_clinit): New name for
15317 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
15318 pre-expand static fields.
15319 (maybe_generate_clinit): Function deleted.
15320 (check_for_static_method_reference): Prototype's parameter list
15322 (generate_finit): New name for maybe_generate_finit. Changed
15323 leading comment. Function rewritten to use
15324 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
15325 (build_alias_initializer_parameter_list): New function.
15326 (java_parser_context_pop_initialized_field): Likewise.
15327 (add_inner_class_fields): Likewise.
15328 (type_declaration:): Call end_class_declaration.
15329 (class_member_declaration:): Likewise.
15330 (formal_parameter_list:): Fixed typos.
15331 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
15332 element. Improved error handling.
15333 (block_statement:): Call end_class_declaration.
15334 (anonymous_class_creation:): Likewise.
15335 (create_anonymous_class): Fixed comments.
15336 (create_class): Call add_inner_class_fields.
15337 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
15338 (method_header): Use MARK_FINAL_PARMS.
15339 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
15340 (method_declarator): Propagate final argument flag.
15341 (craft_constructor): New local `artificial'. Call
15342 build_alias_initializer_parameter_list. Use
15343 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
15344 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
15346 (complete_expand_class): Get rid of unused outer context local
15348 (java_complete_expand_methods): Fixed leading
15349 comment. Generate/pre-expand <clinit> first. Changed method
15350 expansion order to regular, $finit$, constructors, <clinit>.
15351 (java_complete_expand_method): Set current_function_decl.
15352 (fix_constructors): Fix constructor parameter list to account for
15353 outer context local alias initializers.
15354 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15355 (resolve_expression_name): Lookup outer context local aliases. New
15356 local `access', use it.
15357 (patch_method_invocation): Patch inner class ctor invocation with
15358 outer context local aliases initialization values. $finit$
15359 invocation patching now includes things generated with
15360 build_alias_initializer_parameter_list.
15361 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15362 (build_super_invocation): Likewise.
15363 (patch_assignment): Changed comment.
15365 2000-01-27 Andrew Haley <aph@cygnus.com>
15367 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
15371 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15373 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
15375 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
15377 * parse.y (register_fields): Don't pass a format specifier to
15378 OBSOLETE_MODIFIER_WARNING.
15379 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
15380 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
15382 (check_modifiers): Change function into a macro.
15383 (check_class_interface_creation): Pass a literal format string.
15385 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15387 * buffer.h: PROTO -> PARAMS.
15388 * check-init.c: Likewise.
15389 * class.c: Likewise.
15390 * constants.c: Likewise.
15391 * convert.h: Likewise.
15392 * decl.c: Likewise.
15393 * except.c: Likewise.
15394 * expr.c: Likewise.
15395 * gjavah.c: Likewise.
15396 * java-except.h: Likewise.
15397 * java-tree.h: Likewise.
15398 * jcf-depend.c: Likewise.
15399 * jcf-dump.c: Likewise.
15400 * jcf-parse.c: Likewise.
15401 * jcf-path.c: Likewise.
15402 * jcf-reader.c: Likewise.
15403 * jcf-write.c: Likewise.
15405 * jv-scan.c: Likewise.
15406 * jvgenmain.c: Likewise.
15407 * jvspec.c: Likewise.
15408 * lang.c: Likewise.
15411 * parse-scan.y: Likewise.
15412 * parse.h: Likewise.
15413 * parse.y: Likewise.
15414 * typeck.c: Likewise.
15415 * verify.c: Likewise.
15416 * xref.c: Likewise.
15417 * xref.h: Likewise.
15418 * zextract.c: Likewise.
15419 * zipfile.h: Likewise.
15421 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15423 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15424 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
15425 * constants.c (build_constant_data_ref): Check for cached
15426 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
15427 in TYPE_CPOOL_DATE_REF.
15428 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
15429 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
15430 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
15431 (LOCAL_FINAL): New macro.
15432 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
15433 constant pool -- don't try to reuse.
15434 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
15435 TYPE_LANG_SPECIFIC.
15436 (find_in_current_zip): Use TYPE_JCF.
15437 * parse.h (java_check_final): Prototype removed.
15438 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
15439 (maybe_create_class_interface_decl,
15440 check_class_interface_creation): Likewise.
15441 (java_expand_finals): Function removed.
15442 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
15443 (block_statement:): Fixed comment.
15444 (anonymous_class_creation:): Likewise.
15445 (check_class_interface_creation): Reversed Jan 12, 2000 extra
15447 (check_class_interface_creation): Loosened error report on (inner)
15448 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
15449 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
15450 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
15452 (create_interface): Likewise.
15453 (anonymous_class_counter): New static global.
15454 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
15455 patch. Fixed comments.
15456 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
15457 anonymous_class_counter when declaring a toplevel class.
15458 (craft_constructor): Fixed constructor name when handling
15459 anonymous classes. Anonymous class constructors to feature hidden
15460 this$<n> parameter.
15461 (java_fix_constructors): Added comment.
15462 (java_check_final): Function removed.
15463 (java_complete_expand_methods): Fixed comment. Don't generate
15464 class data, save its outgoing constant pool instead.
15465 (verify_constructor_super): Skip anonymous class constructor
15466 hidden this$<n> parameter.
15467 (java_expand_classes): New local `saved_ctxp'. Removed call to
15468 java_expand_finals and java_check_final. Expand anonymous class
15469 constructors. Generate class data.
15470 (build_super_invocation): Skip anonymous class hidden this$<n>
15472 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
15473 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15474 (set_java_signature): Likewise.
15476 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
15478 * gjavah.c: Delete ACC_VISIBILITY define.
15479 * jcf.h: Add ACC_VISIBILITY define.
15480 * parse.y: final: rule tagged <value>.
15481 (java_check_regular_methods): Use ACC_VISIBILITY define for
15482 default package access check.
15483 (local_variable_declaration_statement): Use final: rule.
15485 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
15487 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
15488 (final:): New rule.
15490 2000-01-17 Tom Tromey <tromey@cygnus.com>
15492 * gjavah.c (print_field_info): Allow non-static final fields.
15494 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15496 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
15497 * parse.y (patch_anonymous_class): New function.
15498 (create_anonymous_class): Register incomplete type when the
15499 class/interface to extends/implement isn't known yet.
15500 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
15501 (verify_constructor_super): Tuned error message.
15503 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15505 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
15506 (ANONYMOUS_CLASS_P): New macro.
15507 (TYPE_SIGNATURE, TYPE_JCF): New macros.
15508 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
15509 * parse.y (create_class): Added leading argument.
15510 (maybe_create_class_interface_decl,
15511 check_class_interface_creation): Likewise.
15512 (craft_constructor): New function.
15513 (verify_constructor_super): Added argument in prototype.
15514 (class_declaration:): Inserted leading argument.
15515 (for_begin:): Use FOR_LOOP_P.
15516 (anonymous_class_creation): Create WFL of the anonymous class to
15517 instantiate. Call build_new_invocation. Added comments.
15518 (check_class_interface_creation): Handle parameter `anonymous' in
15519 verbose mode class creation announce.
15520 (link_nested_class_to_enclosing): Exclude anonymous classes.
15521 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
15522 anonymous class, even though they appear to have an enclosing
15524 (create_interface): Pass extra argument to
15525 check_class_interface_creation.
15526 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
15527 (create_class): Call check_class_interface_creation and
15528 maybe_create_class_interface_decl with extra new argument. Don't
15529 add private this$<n> to anonymous classes.
15530 (method_declarator): Insert hidden this$<n> to anonymous class
15532 (java_fix_constructors): Deleted code creating default
15533 constructor. Call craft_constructor instead.
15534 (java_check_regular_methods): Set `saw_constructor' to 1 for
15536 (fix_constructors): Pass extra argument to verify_constructor_super.
15537 (verify_constructor_super): New local `sdecl', use it. Search for
15538 matching constructor (possibly featuring arguments) in super
15540 (lookup_method_invoke): Craft constructor according to arguments
15541 list when dealing with anonymous class constructors.
15542 (build_super_invocation): Pass arguments to anonymous class super
15544 (search_loop): Use FOR_LOOP_P.
15545 (labeled_block_contains_loop_p): Likewise.
15547 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15549 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
15550 (enclosing_context_p): New function.
15551 (get_access_flags_from_decl): Handle CLASS_STATIC.
15552 (maybe_layout_super_class): Extra first argument passed to
15554 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
15556 * decl.c (access0_identifier_node): New global.
15557 (init_decl_processing): access0_identifier_node initialized.
15558 (pushdecl): Set DECL_CONTEXT only on non type decls.
15559 * expr.c (lookup_field): Lookup inner class fields in enclosing
15561 (expand_invoke): Use ID_INIT_P.
15562 (expand_java_field_op): Use DECL_CLINIT_P.
15563 * java-tree.def (CLASS_LITERAL): New tree code.
15564 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
15565 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
15566 (struct lang_decl): New field `inner_access'.
15567 (enclosing_context_p): Prototyped.
15568 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
15569 ID_CLINIT_P): New macros.
15570 (CLASS_STATIC): New macro.
15571 (CLASS_ACCESS0_GENERATED_P): New macro.
15572 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
15573 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
15574 INNER_CLASS_P): New macros.
15575 (DECL_INNER_CLASS_LIST): New macro.
15576 * jcf-parse.c (yyparse): Avoid the use of ANSI string
15578 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15579 the shift value to int. Fixed typo in comment.
15580 * lex.c (inst_id, wpv_id): Initialize.
15581 * mangle.c (unicode_mangling_length): Take `$' into account.
15582 * parse.h (DRECOVER, RECOVER): Terminate properly.
15583 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
15584 (typedef struct _jdep): New field `enclosing'.
15585 (JDEP_ENCLOSING): New macro.
15586 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
15587 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
15588 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
15589 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
15590 GET_ENCLOSING_CPC_CONTEXT): New macros.
15591 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
15592 (do_resolve_class): Added extra argument in prototype.
15593 * parse.y (resolve_class): Added extra argument in prototype.
15594 (maybe_create_class_interface_decl): Likewise.
15595 (maybe_use_access_method, build_wfl_wrap): New functions.
15596 (java_complete_expand_classes, java_complete_expand_class):
15598 (java_parser_context_push_initialized_field,
15599 java_parser_context_suspend, java_parser_context_resume):
15601 (maybe_make_nested_class_name, make_nested_class_name,
15602 set_nested_class_simple_name_value,
15603 link_nested_class_to_enclosing, find_as_inner_class,
15604 find_as_inner_class_do, check_inner_class_redefinition,
15605 build_thisn_assign, build_current_thisn, build_access_to_thisn,
15606 maybe_build_thisn_access_method, build_outer_field_access,
15607 build_outer_field_access_methods, build_outer_field_access_expr,
15608 build_outer_method_access_method, build_new_access_id,
15609 build_outer_field_access_method, outer_field_access_p,
15610 outer_field_expanded_access_p, outer_field_access_fix,
15611 build_incomplete_class_ref, patch_incomplete_class_ref,
15612 create_anonymous_class): Likewise.
15613 (inst_id, wpv_id): New static global variables.
15614 (synchronized:): New rule, tagged <node>.
15615 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
15617 (anonymous_class_creation:): New rule, tagged <node>.
15618 (NEW_TK): Tagged <node>.
15619 (type_literals, array_type_literal): New rules, tagged <node>.
15620 (class_declaration:): Removed action when reducing by class_body:
15621 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
15622 using GET_CPC in sub-rules.
15623 (class_member_declaration): Handle inner classes.
15624 (method_declaration): When reducing method_header:, reset
15625 current_function_decl when appropriate.
15626 (method_declarator:): Set the number of formal parameter to 0 for
15627 method declared without arguments.
15628 (constructor_declarator:): Likewise.
15629 (static_initializer:): List of elements kept in a list.
15630 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
15631 use of the keyword `static' for type declarations.
15632 (block_statement:): Handle inner class declarations.
15633 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
15634 type qualified `this'.
15635 (class_instance_creation_expression): Use anonymous_class_creation:
15636 to handle inner class instances creation. Handle qualified `new'.
15637 (something_dot_new): Added appropriate actions.
15638 (create_new_parser_context): New function.
15639 (java_push_parser_context, java_parser_context_save_global,
15640 java_parser_context_suspend): Use create_new_parser_context.
15641 (check_modifiers): Changed leading comment.
15642 (check_class_interface_creation): Handle interclasses.
15643 (add_superinterfaces): Fixed comment.
15644 (create_interface): Build qualified name from the raw_name instead
15645 of its matching WFL. Push the initialized fields list. raw_name added
15646 as an extra argument to maybe_create_class_interface_decl.
15647 (create_class): Build qualified name from the raw_name instead of
15648 its matching WFL. Removed assignment to current_parsed_class_un.
15649 Call PUSH_ERROR before returning an error. Suspend the current
15650 parser context when processing an inner class. Push the
15651 initialized fields list. raw_name added as an extra argument to
15652 maybe_create_class_interface_decl. Add the private this$<n>
15654 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15655 (register_fields): Get the class type from GET_CPC and handle
15656 previous errors. Added code to handle the creation of static
15657 fields in inner classes. Initialized fields initialization
15658 statements kept in a list of lists.
15659 (maybe_generate_finit): Initialized fields initialization
15660 statements kept in a list of lists. Use GET_CPC.
15661 (maybe_generate_clinit): Likewise.
15662 (method_header): Use GET_CPC and GET_CPC_UN.
15663 (parser_qualified_classname): Handle inner classes.
15664 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15665 (java_fix_constructors): Hide pointer to enclosing context
15666 instance in constructor list when dealing with inner classes.
15667 (jdep_resolve_class): Call resolve_class with extra first argument
15669 (resolve_class): Add enclosing context as a first extra argument
15670 to do_resolve_class.
15671 (do_resolve_class): Call find_as_inner_class. Handle WFLs
15673 (resolve_no_layout): Extra argument added to resolve_class
15675 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15676 (java_get_real_method_name): Use GET_CPC_UN.
15677 (check_abstract_method_definitions): Use DECL_CLINIT_P.
15678 (java_check_abstract_methods): Handle static method declared in
15679 inner classes by an error.
15680 (java_check_regular_methods): Use DECL_CLINIT_P.
15681 (source_start_java_method): Also set DECL_MAX_LOCALS.
15682 (create_artificial_method): Call java_parser_context_save_global
15683 and java_parser_context_restore_global instead of saving/restoring
15684 the context by hand.
15685 (expand_start_java_method): Improved verbose mode message.
15686 (java_complete_expand_methods): Fixed leading comment. Use
15688 (fix_constructors): Added assignment to this$<n> if necessary.
15689 (java_expand_classes): Call java_complete_expand_classes instead
15690 of java_complete_expand_methods.
15691 (make_qualified_primary): Simplified.
15692 (merge_qualified_name): Optimized for missing left or right parts.
15693 (resolve_expression_name): Handle access to outer class fields from
15695 (resolve_qualified_expression_name): New macro
15696 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15697 classes. Report error on non appropriate qualification of
15698 `new'. Handle qualified `this'.
15699 (not_accessible_p): Allow access to outer class private fields from
15701 (patch_method_invocation): Handle method invocations through
15702 access methods and inner class constructor invocations.
15703 (find_applicable_accessible_methods_list): Search enclosing
15704 contexts of an inner class.
15705 (search_applicable_methods_list): Fixed typo.
15706 (argument_types_convertible): Handle inner class constructors'
15707 hidden outer context reference argument.
15708 (qualify_ambiguous_name): Handle qualified `this'.
15709 (java_complete_lhs): Handle use of field accessed through
15710 artificial access methods in various cases of assignments. Handle
15711 CLASS_LITERAL node.
15712 (check_final_assignment): Use DECL_CLINIT_P.
15713 (valid_ref_assignconv_cast_p): Handle the destination being an
15714 enclosing context of the source.
15715 (patch_unaryop): Handle use of field accessed through artificial
15717 (patch_return): Use DECL_CLINIT_P.
15718 (patch_throw_statement): Use DECL_CLINIT_P.
15719 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15720 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15723 2000-01-16 Anthony Green <green@cygnus.com>
15725 * parse.y (build_string_concatenation): Only use
15726 StringBuffer(String) shortcut if String arg is constant.
15728 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15730 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15731 the shift value to int. Fixed typo in comment.
15733 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
15735 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15736 * jcf-write.c: Likewise.
15737 * parse.y: Likewise.
15738 * parse.c: Regenerate.
15740 2000-01-09 Anthony Green <green@cygnus.com>
15742 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15743 bytecodes in the correct order.
15745 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15747 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15749 2000-01-06 Anthony Green <green@cygnus.com>
15751 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15752 before building constant array decl.
15754 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
15756 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15757 method invocation and typo in conditional expression.
15758 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15759 the appropriate NOTE_POP.
15760 * parse.y (patch_binop): Shift value mask to feature the right
15763 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15765 * class.c (assume_compiled, assume_compiled_node): Add static
15767 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15769 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15771 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15773 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15774 to `__modifier' to avoid stringifying it.
15776 * parse.y (verify_constructor_circularity): Don't call a variadic
15777 function with a non-literal format string.
15778 (java_check_abstract_methods): Move unreachable code inside
15779 `continue' statement.
15780 (lookup_method_invoke): Call xstrdup, not strdup.
15782 * expr.c (expand_java_field_op): Avoid the use of ANSI string
15785 * jcf-parse.c (yyparse): Likewise.
15787 * jv-scan.c (main): Likewise.
15789 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15791 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15792 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15793 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15796 * parse.y (synchronized, variable_redefinition_error,
15797 check_class_interface_creation, create_interface, create_class,
15798 method_header, finish_method_declaration,
15799 check_modifiers_consistency, method_declarator,
15800 complete_class_report_errors, check_abstract_method_definitions,
15801 java_check_regular_methods, check_throws_clauses,
15802 java_check_abstract_methods, read_import_dir,
15803 check_pkg_class_access, declare_local_variables, fix_constructors,
15804 cut_identifier_in_qualified, resolve_expression_name,
15805 resolve_qualified_expression_name, patch_method_invocation,
15806 java_complete_lhs, patch_assignment, try_builtin_assignconv,
15807 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15808 patch_exit_expr, patch_exit_expr, patch_switch_statement,
15809 patch_try_statement, patch_synchronized_statement,
15810 patch_throw_statement, check_thrown_exceptions,
15811 patch_conditional_expr): Likewise.
15813 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15815 * Makefile.in (LIBDEPS): Added gcc's errors.o
15816 (../jcf-dump$(exeext):): Link with gcc's errors.o
15817 (../gcjh$(exeext):): Likewise.
15818 * expr.c (expand_java_NEW): Layout the entire target type instead of
15819 laying out its methods only.
15820 (lookup_field): Layout the class after having loaded it.
15821 * java-tree.h (java_debug_context): Declared.
15822 * jcf-io.c (toplev.h): Included.
15823 (find_class): Removed assignment to jcf's outofsynch
15824 field. Force source file to be read if newer than its matching
15825 class file. Tweaked debug messages.
15826 * jcf-parse.c (jcf_out_of_synch): Deleted.
15827 (read_class): Call to jcf_out_of_synch removed.
15828 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15829 (jcf_out_of_synch): Prototype deleted.
15830 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15831 `deprecated' and `class_err': integer turned into bit-fields.
15832 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15833 * parse.y (package_list): New global.
15834 (package_declaration:): Record newly parsed package name.
15835 (extra_ctxp_pushed_p): Static global deleted.
15836 (java_parser_context_save_global): Create buffer context for the
15837 purpose of saving globals, if necessary.
15838 (java_parser_context_restore_global): Pop context pushed for the
15839 purpose of saving globals, if necessary.
15840 (java_debug_context_do): New prototype and function.
15841 (java_debug_context): Likewise.
15842 (do_resolve_class): Use already parsed package names to qualify
15843 and lookup class candidate.
15844 (java_pre_expand_clinit): Removed unnecessary local variable.
15846 1999-12-17 Tom Tromey <tromey@cygnus.com>
15848 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
15850 (process_file): Use `\n\' at end of each line in string.
15852 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15854 * expr.c (expand_invoke): Layout the loaded class before
15855 attempting to use it.
15856 (expand_java_field_op): Allow final field assignments to take
15858 * typeck.c (convert): Return error_mark_node if expr is null.
15860 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15862 * class.c (class_depth): Return -1 if the class doesn't load
15864 * expr.c (can_widen_reference_to): Check for errors during depth
15865 computation and return 0 accordingly.
15866 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15867 create default constructors and add an other error check.
15868 * parse.h (java_fix_constructors): Prototyped.
15869 * parse.y (java_pre_expand_clinit): Likewise.
15870 (build_super_invocation): Re-prototyped to feature one argument.
15871 (java_check_circular_reference): Directly use `current'.
15872 (java_fix_constructors): New function.
15873 (java_check_regular_methods): Don't create default constructors
15874 here, but abort if none were found.
15875 (java_complete_expand_methods): Pre-process <clinit> calling
15876 java_pre_expand_clinit.
15877 (java_pre_expand_clinit): New function.
15878 (fix_constructors): build_super_invocation invoked with the
15879 current method declaration as an argument.
15880 (build_super_invocation): Use the context of the processed method
15881 decl argument instead of current_class.
15882 * typeck.c (lookup_java_method): Take WFLs in method names into
15885 1999-12-14 Per Bothner <per@bothner.com>
15887 * class.c (make_class_data): flag_keep_inline_functions to keep
15888 private methods in the method array.
15890 1999-12-15 Anthony Green <green@cygnus.com>
15892 * check-init.c (check_init): Take into account both types of
15893 `throw's when checking for uninitialized variables.
15895 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15897 * parse.y (java_complete_lhs): Force conversion of array
15898 dimensions to int_type_node, that's what runtime's ABI expects.
15900 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15902 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15903 operand of a WFL, until the Java front-end gets fixed with regard
15904 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15906 1999-12-10 Andrew Haley <aph@cygnus.com>
15908 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15909 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15910 expr.c (build_java_athrow): Add support for sjlj-exceptions.
15911 java-tree.h: Ditto.
15912 jcf-write.c: Ditto.
15914 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
15916 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15917 before calling expand_eh_region_start and expand_start_all_catch.
15918 * except.c (expand_start_java_handler): Switch to permanent
15919 obstack before calling expand_eh_region_start.
15920 (expand_end_java_handler): Switch to permanent obstack before
15921 calling expand_start_all_catch.
15923 1999-12-5 Anthony Green <green@cygnus.com>
15925 * decl.c (init_decl_processing): Mark throw_node as a noreturn
15926 function with side effects.
15927 (init_decl_processing): Mark all memory allocating DECLs with
15930 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15932 * except.c (expand_end_java_handler): Call
15933 expand_resume_after_catch and end_catch_handler.
15935 1999-11-30 Anthony Green <green@cygnus.com>
15937 * verify.c (verify_jvm_instructions): Create new return label
15938 chain if non existent (don't rely on the verified state of the jsr
15941 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15943 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15944 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15946 * parse.y (patch_assignment): Removed bogus final class test on
15947 lhs when checking on whether to emit an ArrayStoreException runtime
15949 * expr.c (expand_java_arraystore): Likewise.
15951 1999-11-28 Anthony Green <green@cygnus.com>
15953 * decl.c (find_local_variable): Reuse single slot decls when
15956 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15958 * jcf-parse.c (saw_java_source): Global variable removed.
15959 (read_class): Don't use `saw_java_source'. Added extra braces.
15960 (yyparse): Code setting `saw_java_source' removed.
15962 1999-11-24 Mark Mitchell <mark@codesourcery.com>
15964 * except.c (emit_handlers): Zero catch_clauses after emitting them.
15966 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15968 * verify.c (merge_type_state): Non verified subroutines being
15969 considered more than once to trigger passive type merge.
15971 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15973 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15974 in case of error. Error message tuned.
15976 1999-11-21 Anthony Green <green@cygnus.com>
15978 * constants.c (find_methodref_index): Unwrap method names before
15979 inserting them in the constant pool.
15981 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15983 * class.c (assume_compiled_node): New typedef.
15984 (assume_compiled_tree): New static data.
15985 (find_assume_compiled_node): New function.
15986 (add_assume_compiled): New function.
15987 (assume_compiled): New function.
15988 * class.c (make_class_data): Use assume_compiled.
15989 (is_compiled_class): Use assume_compiled.
15991 * java-tree.h (add_assume_compiled): Declare.
15993 * lang.c (lang_decode_option): Parse new options.
15995 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15997 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15998 int_type_node: that's what `_Jv_AllocObject' expects.
16000 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16002 * parse.y (lookup_method_invoke): Use lang_printable_name to
16003 reliably build the type name during error report. Fixes PR gcj/97.
16005 1999-11-09 Tom Tromey <tromey@cygnus.com>
16007 * jcf-path.c: Include <sys/stat.h>.
16008 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
16009 (DIR_UP): New macro.
16011 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16013 * parse.y (source_end_java_method): Resume permanent allocation,
16014 reversing Apr 27 1998 patch.
16015 (patch_string_cst): Pop obstacks after having pushed the permanent
16018 1999-11-05 Tom Tromey <tromey@cygnus.com>
16020 * class.c (finish_class): Emit inlined methods if any native
16021 methods exist in the class. Fixes PR gcj/85.
16023 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
16025 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
16026 (qualify_ambiguous_name): Likewise.
16028 1999-11-03 Godmar Back <gback@cs.utah.edu>
16030 * typeck.c: (lookup_java_method): search all inherited
16031 interfaces when looking up interface method.
16033 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16035 * parse.y (method_header:): Issue error message for rule `type
16037 (synchronized:): Error report when not using synchronized.
16039 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16041 * parse.y (resolve_qualified_expression_name): Prevent `this' from
16042 being used before the superclass constructor has been called.
16043 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
16044 instead of `CALL_THIS_CONSTRUCTOR_P'.
16046 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
16048 * check-init.c: Fix typo in comment.
16050 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
16052 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
16055 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
16057 * parse.y (expression_statement:): Call function to report
16058 improper invocation of a constructor.
16059 (parse_ctor_invocation_error): New function.
16061 1999-10-26 Mark Mitchell <mark@codesourcery.com>
16063 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
16066 1999-10-21 Tom Tromey <tromey@cygnus.com>
16068 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
16069 in generated `main'.
16071 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
16073 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
16074 (qualify_ambiguous_name): Likewise.
16076 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16078 * parse.y (java_complete_tree): fold_constant_for_init to work on
16080 (java_complete_lhs): Likewise.
16081 (array_constructor_check_entry): Complete an initializer element
16082 on permanent_obstack.
16084 1999-10-19 Tom Tromey <tromey@cygnus.com>
16086 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
16087 From Mike Moreton <mike@pillim.demon.co.uk>.
16089 1999-10-15 Greg McGary <gkm@gnu.org>
16091 * java-tree.h (flag_bounds_check): Remove extern decl.
16092 * lang.c (flag_bounds_check): Remove global variable.
16093 (lang_f_options): Remove "bounds-check" entry.
16094 (lang_init_options): Default flag_bounds_check to "on".
16096 1999-10-14 Tom Tromey <tromey@cygnus.com>
16098 * jvgenmain.c (usage): New function.
16099 (main): Use it. Also, handle `-D' options.
16100 * jvspec.c (lang_specific_driver): Recognize -D.
16101 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
16103 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
16105 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16107 * jcf-dump.c (print_constant, disassemble_method): Don't call a
16108 variadic function with a non-literal format string.
16110 * parse-scan.y (report_main_declaration): Likewise.
16112 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
16114 * parse.y (read_import_dir, patch_assignment, patch_binop,
16115 patch_array_ref): Likewise.
16117 * typeck.c (build_java_array_type): Likewise.
16119 * verify.c (verify_jvm_instructions): Likewise.
16121 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16123 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
16125 1999-10-07 Anthony Green <green@cygnus.com>
16127 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
16128 where CHECK_PUT may fail for valid reasons.
16130 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
16131 UNSAFE_PUTN): New macros.
16133 1999-10-04 Tom Tromey <tromey@cygnus.com>
16135 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
16136 well. Fixes Java PR gcj/59.
16137 * parse-scan.y (yyerror): Report errors.
16139 1999-09-24 Glenn Chambers <GChambers@provsol.com>
16141 * decl.c (insert_block): Remove unconditional `abort'.
16143 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
16145 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
16146 FUNCTION_CODE now of type int. All callers changed.
16147 Set the builtin's DECL_BUILT_IN_CLASS.
16149 1999-09-23 Tom Tromey <tromey@cygnus.com>
16151 * jvspec.c (lang_specific_driver): Don't read spec file if
16152 -fsyntax-only given.
16154 1999-09-22 Tom Tromey <tromey@cygnus.com>
16156 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
16158 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
16159 (WORDS_TO_LONG): Likewise.
16160 (WORDS_TO_DOUBLE): Likewise.
16162 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16164 * jcf-write.c (RELOCATION_VALUE_0): New macro.
16165 (RELOCATION_VALUE_1): Likewise.
16166 (emit_iinc, emit_reloc, push_constant1, push_constant2,
16167 push_in_const, push_long_const): Prototyped.
16168 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
16169 (push_constant2): Likewise.
16170 (push_int_const): Cast find_constant1's integer arguments to `jword'.
16171 (find_constant_wide): Cast find_constant2's integer arguments to
16173 (find_constant_index): Cast find_constant2's and find_constant2's
16174 integer arguments to `jword'.
16175 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
16176 (emit_switch_reloc): Use RELOCATION_VALUE_0.
16177 (emit_if): Use RELOCATION_VALUE_1.
16178 (emit_goto): Likewise.
16179 (emit_jsr): Likewise.
16180 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
16181 argument to push_long_const to HOST_WIDE_INT.
16183 1999-09-15 Andreas Schwab <schwab@suse.de>
16185 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
16187 1999-09-20 Nick Clifton <nickc@cygnus.com>
16189 * lang.c (lang_decode_option): Extend comment.
16191 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16193 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
16196 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16198 * gjavah.c (get_field_name, print_method_info, print_include,
16199 add_namelet): Use xmalloc, not malloc.
16201 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
16202 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
16205 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
16207 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
16209 * jcf-path.c (add_entry): Likewise.
16211 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
16213 * jv-scan.c (xmalloc): Remove definition.
16215 * jvgenmain.c (xmalloc): Likewise.
16217 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
16219 * lex.c (java_store_unicode): Use xrealloc, not realloc.
16221 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
16222 concat, not xmalloc/sprintf.
16223 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
16224 (xstrdup): Remove definition.
16226 * parse.y (duplicate_declaration_error_p,
16227 constructor_circularity_msg, verify_constructor_circularity,
16228 check_abstract_method_definitions, java_check_regular_methods,
16229 java_check_abstract_methods, patch_method_invocation,
16230 check_for_static_method_reference, patch_assignment, patch_binop,
16231 patch_cast, array_constructor_check_entry, patch_return,
16232 patch_conditional_expr): Use xstrdup, not strdup.
16234 * zextract.c (ALLOC): Use xmalloc, not malloc.
16236 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16238 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
16240 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
16241 (do_spec, lang_specific_pre_link, lang_specific_driver,
16242 input_filename, input_filename_length): Don't declare.
16243 (main_class_name, jvgenmain_spec, lang_specific_driver):
16245 (lang_specific_driver): All calls to the function pointer
16246 parameter now explicitly call `fatal'.
16248 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16250 * parse.y (find_applicable_accessible_methods_list): Search
16251 abstract classes as interfaces.
16253 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16255 * class.c (finish_class): We're now outside a valid method
16256 declaration. Tell the rest of gcc so.
16258 1999-09-08 Bruce Korb autogen@linuxbox.com
16260 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
16262 1999-09-07 Tom Tromey <tromey@cygnus.com>
16264 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
16266 (decode_signature_piece): Don't emit "::" in JArray<>.
16267 (print_namelet): Only print trailing `;' when printing a class.
16269 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
16271 * java-tree.h: Delete declarations for all tree nodes now moved to
16273 * decl.c: Delete their definitions.
16275 1999-09-04 Mark Mitchell <mark@codesourcery.com>
16277 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
16278 * Makefile.in (OBJS): Add ggc-callbacks.o.
16279 (OBJDEPS): Likewise.
16281 1999-09-03 Tom Tromey <tromey@cygnus.com>
16283 * parse.y (strip_out_static_field_access_decl): Return operand if
16284 it satisfies JDECL_P.
16286 1999-09-02 Tom Tromey <tromey@cygnus.com>
16288 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
16289 Handle nested arrays, like `[[I'.
16291 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16293 * class.c (finish_class): Remove unused parameter, all callers
16296 * expr.c (build_java_athrow): Change return type to void.
16297 (java_lang_expand_expr): Make sure each case in switch returns a
16300 * java-tree.h (finish_class): Fix prototype to take void args.
16302 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
16303 (main): Issue return from main, not exit.
16305 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
16307 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
16309 * jv-scan.c (main): Issue return from main, not exit.
16311 * parse.y (check_abstract_method_definitions,
16312 java_check_abstract_method_definitions): Add static prototypes.
16313 (java_complete_expand_methods): Fix call to `finish_class'.
16315 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
16318 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16320 * lang.c (language_string): Constify.
16322 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16324 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
16325 Remove hacks for stuff which comes from libiberty.
16327 * Make-lang.in: Likewise.
16329 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
16331 * Makefile.in (xref.o): Depend on xref.c explicitly.
16333 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16335 * java-tree.h (lang_printable_name): Constify a char*.
16337 * lang.c (lang_printable_name): Likewise.
16339 1999-08-27 Jeffrey A Law (law@cygnus.com)
16341 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
16342 comments in C code.
16344 1999-08-26 Tom Tromey <tromey@cygnus.com>
16346 * gjavah.c (print_cxx_classname): Print "::" before qualified
16349 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16351 * parse.y (lookup_cl): Changed leading comment. Now does its best
16352 to set the column number.
16353 (qualify_ambiguous_name): Take WFL wrappers into account.
16355 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
16357 * verify.c (verify_jvm_instructions): Don't check instruction
16358 validity beyond end of method.
16360 1999-08-25 Tom Tromey <tromey@cygnus.com>
16362 * jvspec.c (lang_specific_driver): Correctly handle --help again.
16364 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16366 * gjavah.c (print_name, print_base_classname, utf8_cmp,
16367 cxx_keyword_subst, generate_access, name_is_method_p,
16368 get_field_name, print_field_name, super_class_name, print_include,
16369 decode_signature_piece, print_class_decls, usage, help,
16370 java_no_argument, version, add_namelet, print_namelet): Add static
16372 (print_base_classname, utf8_cmp, cxx_keyword_subst,
16373 name_is_method_p): Constify a char*.
16374 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
16375 Provide a final else clause in an if-else-if.
16376 (print_field_info): Add missing final arg in function call to
16377 `print_field_name'.
16378 (print_method_info, decompile_method, decode_signature_piece,
16379 print_c_decl, print_full_cxx_name, print_stub,
16380 print_mangled_classname, super_class_name, print_include,
16381 add_namelet, add_class_decl, print_class_decls, process_file,
16382 help): Constify a char*.
16384 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
16385 push_int_const, find_constant_wide, find_constant_index,
16386 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
16387 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
16388 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
16389 emit_if, emit_goto, emit_jsr, call_cleanups,
16390 make_class_file_name): Add static prototypes.
16391 (generate_bytecode_return, generate_bytecode_insns): Pass a
16392 NULL_PTR, not a NULL_TREE.
16394 * jv-scan.c: Include "jcf.h".
16395 (main): Declare using DEFUN macro.
16397 * jvspec.c (find_spec_file, lang_specific_pre_link,
16398 lang_specific_driver): Add prototypes.
16399 (find_spec_file): Constify a char*.
16401 * keyword.gperf (hash, java_keyword): Add prototypes.
16403 * lang.c (lang_print_error): Add static prototype.
16404 (lang_init): Prefer memcpy over bcopy to avoid casts.
16406 * lex.c (yylex): Add static prototype.
16408 * parse-scan.y: Include "lex.c" earlier.
16410 * parse.h: Remove redundant declaration for `yylex'.
16412 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
16413 labeled_block_contains_loop_p): Add static prototypes.
16414 (not_accessible_p): Make static to match prototype.
16416 * verify.c (start_pc_cmp): Don't needlessly cast away const.
16418 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16420 * parse.y (check_method_redefinition): Changed leading comment.
16421 (check_abstract_method_definitions): New function.
16422 (java_check_abstract_method_definitions): New function.
16423 (java_check_regular_methods): Call it.
16424 (verify_constructor_super): Fixed indentation.
16425 (lookup_method_invoke): Likewise.
16427 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16429 * parse.y (method_header): Return a null pointer if the current
16430 class node is null.
16431 (finish_method_declaration): Return if the current function decl
16433 (source_start_java_method): Likewise.
16434 (java_method_add_stmt): Likewise.
16436 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16438 * class.c (emit_register_class): Removed unnecessary call to
16440 * parse.y (labeled_block_contains_loop_p): Removed unused local
16443 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16445 * parse.y (java_refold): Added prototype.
16447 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16449 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
16450 (java_stabilize_reference): Removed unnecessary `else'.
16451 (java_complete_lhs): Set flag to remember boolean. Call
16452 java_refold. Added comments.
16453 (java_decl_equiv): New function.
16454 (binop_compound_p): Likewise.
16455 (java_refold): Likewise.
16456 (patch_unaryop): Striped static field access assigned to decl and
16457 op. Changed promotion scheme for ++/-- operators.
16458 (search_loop): New function.
16459 (labeled_block_contains_loop_p): Likewise.
16460 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
16462 (patch_bc_statement): Call search_loop. Fixed comment.
16464 1999-08-14 Anthony Green <green@cygnus.com>
16466 * expr.c (java_lang_expand_expr): Mark static array data as
16469 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
16471 * jvgenmain.c (main): NUL-terminate name_obstack.
16473 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16475 * check-init.c (check_bool2_init, done_alternative): Add static
16478 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
16479 (add_method, build_utf8_ref, build_class_ref,
16480 append_gpp_mangled_type, layout_class_method): Constify a char*.
16482 * decl.c (push_promoted_type, make_binding_level): Add static
16484 (push_promoted_type, pushdecl): Constify a char*.
16486 * except.c (find_handler_in_range, link_handler,
16487 check_start_handlers): Add static prototypes.
16489 * expr.c (process_jvm_instruction): Constify a char*.
16491 * gjavah.c (main): Constify a char*.
16493 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
16496 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
16498 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
16499 munge, print_ents): Constify a char*.
16501 * jcf-dump.c (disassemble_method): Constify a char*.
16502 (print_constant_pool, print_exception_table): Add static prototypes.
16503 (print_constant, print_exception_table, main, disassemble_method):
16506 * jcf-io.c (find_classfile, find_class): Likewise.
16508 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
16509 (set_source_filename, predefined_filename_p): Add static prototypes.
16510 (set_source_filename, get_constant, get_class_constant,
16511 find_in_current_zip): Constify a char*.
16513 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
16515 (add_entry, add_path, jcf_path_classpath_arg,
16516 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16518 * jcf-reader.c (get_attribute, jcf_parse_preamble,
16519 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
16520 jcf_parse_one_method, jcf_parse_methods,
16521 jcf_parse_final_attributes): Add static prototypes.
16522 (get_attribute): Constify a char*.
16524 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
16525 jcf_dependency_add_target, jcf_path_classpath_arg,
16526 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16528 * jv-scan.c (main): Constify a char*.
16529 (gcc_obstack_init): Add prototype arguments.
16531 * jvgenmain.c (gcc_obstack_init): Likewise.
16532 (main): Constify a char*.
16534 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
16536 (put_decl_string, lang_print_error): Constify a char*.
16537 (lang_init): Remove redundant extern prototype.
16539 * mangle.c (emit_unicode_mangled_name): Constify a char*.
16541 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
16542 Add static prototypes.
16543 (get_type_from_signature): Constify a char*.
16545 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
16546 Add static prototypes.
16547 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
16548 (verify_jvm_instructions): Constify a char*.
16550 * xref.c (xref_flag_value): Likewise.
16552 * xref.h (xref_flag_value): Likewise.
16554 * zextract.c (makeword, makelong): Add static prototypes.
16555 (makeword, makelong): Constify a uch*.
16557 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16559 * lang.c (java_dummy_print): Constify a char*.
16560 (lang_print_error): Likewise.
16561 (lang_init): Remove redundant prototype for `print_error_function'.
16562 (lang_init_source): Likewise.
16563 (lang_identify): Constify a char*.
16565 1999-08-09 Tom Tromey <tromey@cygnus.com>
16567 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
16568 (WORDS_TO_LONG): Likewise.
16569 (WORDS_TO_DOUBLE): Likewise.
16571 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16573 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
16575 * expr.c (java_stack_pop, java_array_data_offset,
16576 build_java_throw_out_of_bounds_exception, case_identity,
16577 build_java_check_indexed_type): Add static prototypes.
16578 (linenumber_table, expand_invoke, expand_java_field_op,
16579 build_primtype_type_ref, expand_byte_code): Constify a char*.
16581 * java-tree.h (build_primtype_type_ref, linenumber_table):
16583 (java_lang_expand_expr): Add prototype.
16585 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
16586 `java_lang_expand_expr'.
16588 * lex.c (java_lex_error): Constify a char*.
16589 (java_get_unicode, java_read_char, java_allocate_new_line,
16590 java_unget_unicode, java_sneak_unicode): Prototype.
16592 * parse-scan.y (current_class, package_name, method_declarator,
16593 report_class_declaration, yyerror): Constify a char*.
16595 * parse.h (java_report_errors): Prototype.
16596 (yyerror): Constify a char*.
16598 * parse.y (classitf_redefinition_error, check_modifiers,
16599 parse_jdk1_1_error, lookup_package_type,
16600 lookup_package_type_and_set_next, get_printable_method_name,
16601 purify_type_name): Constify a char*.
16602 (build_super_invocation, maybe_generate_finit,
16603 verify_constructor_super, parser_add_interface,
16604 add_superinterfaces, jdep_resolve_class, note_possible_classname,
16605 java_complete_expand_methods, java_expand_finals,
16606 cut_identifier_in_qualified, java_stabilize_reference,
16607 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
16608 merge_string_cste): Prototype.
16609 (single_type_import_declaration, yyerror,
16610 variable_redefinition_error, build_array_from_name,
16611 build_unresolved_array_type, check_class_interface_creation,
16612 resolve_class, complete_class_report_errors,
16613 note_possible_classname, read_import_dir,
16614 find_in_imports_on_demand, resolve_package, fix_constructors,
16615 check_deprecation, lookup_method_invoke,
16616 maybe_build_primttype_type_ref, array_constructor_check_entry):
16618 (java_complete_expand_methods, java_expand_finals): Make static.
16619 (convert_narrow): Remove static prototype.
16621 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
16623 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16625 1999-08-02 Richard Henderson <rth@cygnus.com>
16627 * decl.c: Include defaults.h instead of expr.h.
16628 * parse.y: Likewise.
16630 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
16632 * java/decl.c (start_java_method): Change all uses of
16633 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16634 Ensure expr.h is included.
16635 * java/expr.c (pop_arguments): Ditto.
16636 * java/parse.y (expand_start_java_method): Ditto.
16638 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16640 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16642 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
16644 * decl.c: Include "function.h".
16645 * except.c: Likewise.
16646 * parse.y: Likewise.
16647 * Makefile.in: Update dependencies.
16649 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16651 * expr.c (build_java_soft_divmod): Provide a default case in switch.
16652 (java_lang_expand_expr): Mark parameters `target', `tmode' and
16653 `modifier' with ATTRIBUTE_UNUSED.
16655 * gjavah.c (process_file): Add braces around ambiguous `else'.
16657 * jcf-dump.c (print_access_flags, localvar_free): Change return
16660 * parse.y (java_complete_expand_method): Initialize variable
16662 (resolve_qualified_expression_name): Likewise for `field_decl'.
16663 (patch_method_invocation): Likewise for `class_to_search'.
16664 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16665 (patch_assignment): Likewise for `lhs_type'.
16667 * verify.c (verify_jvm_instructions): Remove unused variable
16670 1999-07-25 Richard Henderson <rth@cygnus.com>
16672 * decl.c (va_list_type_node): New.
16674 1999-07-25 Anthony Green <green@cygnus.com>
16676 * gjavah.c (print_stub): New function.
16677 (METHOD_IS_NATIVE): New macro.
16678 (print_mangled_classname): Make static.
16679 (HANDLE_END_FIELD): Don't emit fields during stub generation.
16680 (process_file): Perform stub generation.
16681 (HANDLE_METHOD): Don't emit class decls during stub
16683 (HANDLE_END_METHOD): Take into account stub generation.
16684 (print_method_info): Handle stub generation.
16685 (print_stub): New function.
16686 (print_cxx_classname): Make signature consistant with others.
16687 (help): Describe -stubs option.
16688 (main): Create stub file.
16689 (version): Use version.c.
16690 (print_full_cxx_name): New function.
16691 (print_c_decl): Use print_full_cxx_name.
16693 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16695 * check-init.c (check_init): Handle MAX_EXPR.
16697 1999-07-15 Andrew Haley <aph@cygnus.com>
16699 * lang.c (flag_use_divide_subroutine): New variable.
16700 * typeck.c: (convert_ieee_real_to_integer): Bounds check
16701 fp-to-integer conversion.
16702 (convert): Call convert_ieee_real_to_integer when flag_fast_math
16705 * expr.c (build_java_soft_divmod): New function.
16706 (build_java_binop): Call build_java_soft_divmod if
16707 flag_use_divide_subroutine is set.
16708 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16709 soft_lrem_node: new builtin functions.
16710 (init_decl_processing) Initialize the new builtins.
16711 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16712 soft_lrem_node: new builtin functions.
16713 (build_java_soft_divmod): New function.
16714 * parse.y: Call build_java_soft_divmod if
16715 flag_use_divide_subroutine is set.
16716 * parse.c: Rebuilt.
16718 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16719 a --specs= arg) even if not linking.
16720 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16721 -fuse-divide-subroutine
16723 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16725 * parse.y (resolve_and_layout): Check methods only once.
16726 (resolve_qualified_expression_name): Verify thrown exceptions
16728 (check_thrown_exceptions): Reject exceptions thrown in
16729 initializer. Error message tuned.
16731 1999-07-14 Andrew Haley <aph@cygnus.com>
16733 * expr.c (expand_expr): Do not return the last statement in a
16734 block as the block's value.
16736 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16738 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16739 CALL_EXPR, to avoid order of evaluation changes.
16741 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16743 * parse.y (qualify_ambiguous_name): Do not use
16744 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16746 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16748 * check-init.c (check_init): Handle MAX_EXPR.
16749 * expr.c (force_evaluation_order): Force method call arguments to
16750 be evaluated in left-to-right order.
16751 * parse.y (qualify_ambiguous_name): Loop again to qualify
16752 NEW_ARRAY_EXPR properly.
16754 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16756 * parse.y (patch_invoke): Resolve unresolved invoked method
16758 (qualify_ambiguous_name): STRING_CST to qualify expression for
16759 type name resolution.
16761 1999-06-24 Andrew Haley <aph@cygnus.com>
16763 * class.c (finish_class): Whenever a deferred method is
16764 output, rescan the list of methods to see if a new candidate for
16765 output can be found.
16767 1999-06-28 Tom Tromey <tromey@cygnus.com>
16769 * jvspec.c (lang_specific_driver): Recognize --help.
16771 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16773 * parse.y (resolve_package): Fixed bogus return statement.
16774 (patch_method_invocation): Resolve method invocation beginning with
16775 a package name qualifier.
16777 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16779 * Make-lang.in (java.stage1): Depend on stage1-start.
16780 (java.stage2): Likewise for stage2-start.
16781 (java.stage3): Likewise for stage3-start.
16782 (java.stage4): Likewise for stage4-start.
16784 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16786 * parse.y (java_complete_lhs): When doing cross referencing, don't
16787 try to keep file location on a WFL expanded as a CALL_EXPR.
16789 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16791 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16792 compiling to class file a void method with an empty method body.
16793 As a side effect, the bytecode backend will generate the
16794 appropriate `return' instruction.
16796 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16798 * parse.y (lookup_package_type_and_set_next): New function prototype.
16799 (resolve_package): Search current and imported packages.
16800 (lookup_package_type_and_set_next): New function.
16802 1999-06-22 Andrew Haley <aph@cygnus.com>
16804 * verify.c (verify_jvm_instructions): Check for pending blocks
16805 before invalid PC test and opcode switch, not after.
16807 1999-06-21 Andrew Haley <aph@cygnus.com>
16809 * except.c (find_handler_in_range): The upper limit for exception
16810 ranges is exclusive, not inclusive: (start <= pc < end).
16811 (link_handler): find child pointer which points to outer by
16812 searching sibling list: previous code incorrectly assumed that
16813 outer->outer->first_child must point to outer.
16814 * verify.c (verify_jvm_instructions): FIXME added to code for
16816 (verify_jvm_instructions): Do not assume that the last block
16817 processed in a subroutine is a block which ends with a `ret'
16818 instruction. With some control flows it is possible that the last
16819 block ends with an `athrow'.
16821 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16823 * parse.y (qualify_ambiguous_name): Reorganized the post
16824 evaluation of non WFL leading expression nodes.
16826 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16828 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16831 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16833 * parse.y (qualify_ambiguous_name): Handle qualified expression
16834 beginning with a STRING_CST.
16836 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16838 * parse.y (register_fields): Set DECL_INITIAL on both
16839 pre-initialized static and public fields.
16840 (resolve_field_access): Static field access expressions to always
16842 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16843 qualification. CONVERT_EXPR to be resolved as an expression name.
16844 (java_complete_lhs): Identify and access qualified final
16845 initialized field in switch statement case expression.
16846 (fold_constant_for_init): Pre-initialized field decl constant to
16849 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16851 * parse.y (note_possible_classname): Mark returned node with
16852 QUALIFIED_P only if the original class name contained a '/'.
16854 1999-06-05 Anthony Green <green@cygnus.com>
16856 * Make-lang.in (gcjh): More parallel build fixes.
16858 1999-06-03 Mike Stump <mrs@wrs.com>
16860 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16862 1999-06-02 Anthony Green <green@cygnus.com>
16864 * except.c (link_handler): Chain exception handlers in order.
16866 1999-06-02 Anthony Green <green@cygnus.com>
16868 * expr.c (expand_byte_code): Fill unreachable bytecode regions
16869 with nops and process as usual in order to always set correct EH
16870 ranges. Emit detailed warnings about unreachable bytecodes.
16872 1999-06-02 Anthony Green <green@cygnus.com>
16874 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16877 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16879 * parse.y (lookup_field_wrapper): Unified returned value to NULL
16880 or the searched field decl.
16882 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16884 * parse.y (fold_constant_for_init): Convert numerical constant
16885 values to the type of the assigned field.
16887 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16889 * expr.c (lookup_field): Relaxed the test on class loading error
16891 * parse.y (fold_constant_for_init): Enabeled old code.
16893 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16895 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16896 decide the validity of the cast of a java.lang.Cloneable reference
16898 (patch_conditional_expr): Fixed first argument passed to
16899 binary_numeric_promotion.
16901 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16903 * parse.y (qualify_ambiguous_name): Take into account that a
16904 CONVERT_EXPR might specify a type as a WFL.
16906 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16908 * parse.y (patch_assignment): Save the rhs before using it as an
16909 argument to _Jv_CheckArrayStore.
16911 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16913 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16915 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16917 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16918 floating point literal only when the exponent indicator has been
16921 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16923 * parse.y (formal_parameter:): Construct argument tree list
16924 element even if a yet unsupported final parameter was encountered.
16926 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16928 * parse.y (finish_method_declaration): Issue errors for native or
16929 abstract methods declared with a method body, as well as for non
16930 native or non abstract methods with no method body.
16932 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16934 * class.c (build_utf8_ref): Initialize variable `field'.
16936 * decl.c (init_decl_processing): Initialize variable `field'.
16938 * expr.c (build_known_method_ref): Mark parameters `method_type',
16939 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16940 (process_jvm_instruction): Likewise for parameter `length'.
16942 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16943 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16946 * parse.y (maybe_generate_clinit): Remove unused variable
16947 `has_non_primitive_fields'.
16948 (find_in_imports_on_demand): Initialize variables `node_to_use'
16950 (patch_binop): Likewise for variable `prom_type'.
16951 (patch_unaryop): Likewise for variable `prom_type'.
16953 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16955 * xref.c (xref_table): Add missing initializer.
16957 1999-05-14 Tom Tromey <tromey@cygnus.com>
16959 * java-except.h (struct eh_range): Removed unused `next' member.
16960 * verify.c (verify_jvm_instructions): Call check_nested_ranges
16961 after adding all exception handlers. Sort exception ranges in
16963 (struct pc_index): New structure.
16964 (start_pc_cmp): New function.
16965 * except.c (add_handler): Return `void'. Don't call link_handler;
16966 instead construct an ordinary linked list and do range
16968 (check_nested_ranges): New function.
16969 (link_handler): Changed interface to allow merging of eh_ranges.
16970 Split overlapping ranges. Return `void'.
16972 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16974 * parse.y (constructor_block_end:): New rule, tagged <node>.
16975 (constructor_body:): Use `constructor_block_end' instead of
16978 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16980 * parse.y (statement_nsi:): Pop `for' statement block.
16981 (java_complete_lhs): Labeled blocks containing no statement are
16982 marked as completing normally.
16984 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16986 * xref.c (xref_set_current_fp): New function, defined.
16987 * xref.h (xref_set_current_fp): New function, prototyped.
16989 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16991 * check-init.c (check_init): Take into account that
16992 LABELED_BLOCK_STMT can be empty.
16994 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16996 * parse.y (java_check_regular_methods): Warning check on not
16997 overriding methods with default access in other packages does not
16998 apply to `<clinit>'.
16999 (java_complete_lhs): If block body is an empty_stmt_node, replace
17000 it by NULL_TREE. This prevents gcc from generating an irrelevant
17003 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
17005 * check-init.c (check_init): Removed code accepting to see things
17006 falling through default:, when doing xrefs.
17007 * java-tree.h (do_not_fold): New global variable, declared.
17008 * parse.y (do_not_fold): New global variable, defined.
17009 (java_complete_expand_method): Set `do_not_fold' to the value of
17010 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
17011 and reinstall them after them have been purged; do not check for
17012 initializations; do not issue missing return errors.
17013 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
17015 (patch_binop): Skip the fold part when doing xrefs.
17016 (build_string_concatenation): Skip the concatenation part when
17018 (patch_synchronized_statement): Do not generate a try-finally when
17020 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
17021 and keep the location where the throw was seen.
17022 * typeck.c (convert): When `do_not_fold' is set, do not attempt
17023 any treatment on the converted node an simply return a NOP_EXPR of
17025 * xref.c (xref_get_data): New function, defined.
17026 * xref.h (xref_get_data): New function, declared.
17027 (XREF_GET_DATA): Use xref_get_data.
17029 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17031 * gjavah.c (print_include): Cast the result of `strlen' to int
17032 when comparing against a signed value.
17033 (add_namelet): Likewise.
17035 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17037 * expr.c (expand_invoke): Mark parameter `nargs' with
17039 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
17041 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
17044 * jcf-reader.c (get_attribute): Cast a value to long
17045 when comparing against a signed expression. Likewise.
17047 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
17048 HOST_BITS_PER_CHAR.
17050 1999-05-11 Andrew Haley <aph@cygnus.com>
17052 * parse.y (source_end_java_method): If the current method contains
17053 any exception handlers, force asynchronous_exceptions: this is
17054 necessary because signal handlers in libjava may throw exceptions.
17055 * decl.c (end_java_method): Ditto.
17057 1999-05-11 Tom Tromey <tromey@cygnus.com>
17059 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
17061 * jvspec.c (THREAD_NAME): Removed.
17062 (GC_NAME): Likewise.
17063 (MATHLIB): Likewise.
17064 (WITHLIBC): Likewise.
17066 (THREADLIB): Likewise.
17067 (MATH_LIBRARY): Likewise.
17068 (lang_specific_driver): Don't add `-l' options to command line.
17069 Instead, add a single --specs option. Recognize `-L' options and
17070 use them to search for spec file.
17071 (find_spec_file): New function.
17072 (SPEC_FILE): New define.
17074 1999-05-11 Dave Brolley <brolley@cygnus.com>
17076 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
17077 cpplib-enabled build.
17079 1999-05-05 Per Bothner <bothner@cygnus.com>
17081 * class.c (make_field_value): DECL_INITIAL may be a string literal;
17082 temporarily zero it while calling rest_of_decl_compilation.
17084 * java-tree.h (string_ptr_type_node): Add declaration.
17085 * decl.c: Define and initialize string_ptr_type_node.
17086 * parse.y (patch_string_cst): Use string_ptr_type_node.
17088 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
17089 * parse.y (for_statement): Now unconditionally exit_block.
17090 (finish_labeled_statement): No longer exit_block if for-loop.
17091 (patch_loop_statement): Check harder if the loop is already labeled.
17093 * parse.y (patch_initialized_static_field): Removed function.
17094 (maybe_generate_clinit): Removed special handling for interfaces.
17095 (java_complete_expand_methods): Do a preliminary java_complete_tree
17096 on <clinit> to determine if it can be removed.
17097 (java_complete_expand_method): Remove special handling for <clinit>.
17098 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
17099 optimize if we get back empty_stmt_node.
17100 For MODIFY_EXPR, re-do checking of static initializers.
17101 (fold_constant_for_init): Don't return immediate if VAR_DECL.
17102 For VAR_DECL, pass correct context.
17104 * verify.c (verify_jvm_instructions): Better error messages.
17106 1999-05-03 Tom Tromey <tromey@cygnus.com>
17108 * parse-scan.y (interface_declaration): Call
17109 report_class_declaration for interfaces.
17111 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
17113 * Makefile.in: Remove -v from bison command lines.
17115 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17117 * check-init.c (check_init): Exclude a case of error when doing
17119 * class.c (layout_class_method): Don't generate the error message
17120 twice when compiling from source.
17121 * lang-options.h: Added `-Wredundant-modifers' and
17122 `-Wunusupported-jdk11' flags and help text.
17123 * lang.c (lang_decode_option): Added support for
17124 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
17125 flag_static_local_jdk11 and flag_redundant set accordingly.
17126 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
17127 * parse.h (EXPR_WFL_ADD_COL): New macro.
17128 (DECL_END_SOURCE_LINE): Likewise.
17129 (DECL_INHERITED_SOURCE_LINE): Likewise.
17130 * parse.y (static_ref_err): New function, prototyped.
17131 (CCB_TK): Now tagged <operator>.
17132 (class_body:): Remember the location of the closing '}' of a class
17133 definition when doing xrefs.
17134 (block:): Likewise.
17135 (block_end:): Likewise.
17136 (create_class): Remember the location of the inherited class
17137 identifier when doing xrefs.
17138 (register_fields): Added test on first operand of `init' before
17139 testing it TREE_CODE.
17140 (method_header): Store the location of the class identifier in the
17141 class decl when doing xrefs.
17142 (finish_method_declaration): Don't combine first/last method line
17144 (java_check_regular_methods): Warning check on not overriding
17145 methods with default access on other packages move before check on
17146 static methods. Initialization of `aflags' also moved up.
17147 (resolve_expression_name): Call static_ref_err to report the error.
17148 (static_ref_err): New function, implemented.
17149 (resolve_field_access): Returned simplified static field access
17151 (resolve_qualified_expression_name): Check for illegal use of
17152 static fields in a non static context. Call static_ref_err to
17153 report error in various places.
17154 (java_complete_tree): Do not fold initialized static fields when
17156 (java_complete_lhs): Likewise.
17158 1999-04-29 Anthony Green <green@cygnus.com>
17160 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
17161 create internal labels.
17162 (lookup_label): Ditto.
17164 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
17166 * class.c (layout_class_method): Generate <clinit>'s rtl for
17168 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
17169 for interfaces' <clinit>.
17170 * expr.c (lookup_field): Search for fields in interfaces.
17171 (expand_invoke): Fixed indentation.
17172 (expand_java_field_op): Likewise. Use IS_CLINIT.
17173 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
17174 (IS_CLINIT): New macro.
17175 * parse.y (type_declaration:): Call maybe_generate_clinit after an
17176 interface was parsed.
17177 (maybe_generate_clinit): Don't generate if the current class is an
17178 interface with only fields of primitive types.
17179 (reset_method_name): Use IS_CLINIT.
17180 (java_complete_expand_method): Expand <clinit> when it exists for
17181 interfaces. Use IS_CLINIT.
17182 (resolve_expression_name): Use DECL_CONTEXT instead of
17183 current_class to build static field references.
17184 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
17185 ARRAY_REF when doing xreferencing.
17186 (check_final_assignment): Fixed typo in leading comment. Use
17188 (patch_array_ref): Don't fully expand array references when
17190 (patch_return): Use IS_CLINIT.
17191 (patch_throw_statement): Likewise.
17193 1999-04-22 Tom Tromey <tromey@cygnus.com>
17195 * Make-lang.in (JAVA_SRCS): Added check-init.c.
17197 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
17199 * decl.c (predef_filenames, predef_filenames_size): New globals
17200 (init_decl_processing): predef_filenames and predef_filenames_size
17202 * java-tree.h (predef_filenames, predef_filenames_size): Declared
17204 * jcf-parse.c (predefined_filename_p): New function.
17205 (yyparse): Check that files on the command line are specified only
17206 once and issue a warning otherwise.
17207 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
17208 * parse.y (source_end_java_method): Nullify NOP method bodies, to
17209 avoid a gcc warning with -W -Wall turned on.
17210 (java_expand_classes): Abort if errors were encountered.
17211 (java_complete_lhs): If the cross reference flag is set, wrap
17212 field DECL node around a WFL when resolving expression name.
17214 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17216 * lang.c (lang_decode_option): Fixed returned value when parsing
17217 `-fxref=...' and `-Wall'.
17218 * parse.y (source_end_java_method): Do not generate code when
17219 flag_emit_xref is set.
17220 (resolve_expression_name): Do not build static field access when
17221 flag_emit_xref is set.
17222 (resolve_field_access): No special treatment on `length' when
17223 flag_emit_xref is set. Do not build qualified static field access
17224 when flag_emit_xref is set.
17225 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
17226 when flag_emit_xref is set.
17227 (patch_assignment): Do not generate array store runtime check when
17228 flag_emit_xref is set.
17229 * xref.c (xref_flag_value): Fixed function declaration
17231 (xset_set_data): New function.
17232 * xref.h (xref_set_data): Added prototype for new function.
17233 (typedef struct xref_flag_table): New field data.
17234 (XREF_GET_DATA): New macro.
17236 1999-04-19 Tom Tromey <tromey@cygnus.com>
17238 * xref.h (enum): Removed trailing comma.
17240 * parse.y (resolve_qualified_expression_name): Added missing
17243 1999-04-15 Anthony Green <green@cygnus.com>
17245 * gjavah.c: New prototypes for java_float_finite and
17246 java_double_finite.
17248 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17250 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
17253 1999-04-06 Jeffrey A Law (law@cygnus.com)
17255 * Makefile.in (TREE_H): Add tree-check.h.
17256 (RTL_H): Add genrtl.h.
17258 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
17260 * parse.y (patch_assignment): Added ArrayStoreException runtime
17263 1999-04-06 Per Bothner <bothner@cygnus.com>
17265 * expr.c (pop_type_0): New function.
17266 (pop_type): Use pop_type_0.
17267 * java-tree.h (pop_type_0): New declaration.
17268 * verify.c (verify_jvm_instructions): Check return instructions.
17270 * parse.y (patch_binop): Don't fold if non-constant and emiting
17273 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17275 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
17277 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
17278 (main_jcf): Don't define.
17279 (process_file): Don't set `main_jcf'.
17281 * java-tree.h (main_jcf): Don't declare.
17283 * jcf-parse.c (main_jcf): Add static definition.
17285 * lang.c (main_jcf): Don't define.
17287 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17289 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
17291 * decl.c (copy_lang_decl): Likewise for `bcopy'.
17293 * jcf-depend.c: Include "config.h", not <config.h>.
17295 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
17298 * jcf-path.c: Include "config.h", not <config.h>.
17300 * lex.c: Don't include various system header files.
17301 (java_init_lex): Cast the argument of `bzero' to PTR
17303 * parse-scan.y (java_push_parser_context): Likewise.
17305 * parse.y (java_push_parser_context): Likewise.
17306 (patch_bc_statement): Match format specifier to variable argument.
17308 * xref.c: Don't include <stdio.h>.
17310 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
17312 * parse.y (struct parser_ctxt *ctxp): Now global.
17313 (declare_local_variables): Use WFL compound value for the
17314 declaration source line value, when doing cross-referencing.
17316 1999-03-31 Tom Tromey <tromey@cygnus.com>
17318 * gjavah.c (print_field_info): Allow constants of other types.
17319 (print_include): Generate include when new name is proper prefix
17320 of already printed name.
17321 (add_namelet): Likewise.
17322 (cxx_keyword_subst): New function.
17323 (print_method_info): Use it.
17324 (print_field_name): New function.
17325 (get_field_name): New function.
17326 (print_field_info): Use get_field_name and print_field_name.
17328 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17330 * Makefile.in (keyword.h): Generate using gperf language 'C', not
17331 'KR-C', so gperf uses the `const' keyword on strings.
17333 * keyword.gperf (java_keyword): Const-ify a char*.
17335 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17337 * parse.y (patch_bc_statement): Fixed identation and a bogus
17340 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17342 * parse.y (patch_assignment): Allow static variables in other
17343 classes to be assigned.
17345 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17347 * class.c (maybe_add_interface): Remove unused variable
17349 (make_class_data): Use = for assignment, not ==. Likewise.
17350 (emit_register_classes): Remove unused variable `decl'.
17352 * lex.c: Fix comment so as not to contain an embedded `/*'.
17354 * verify.c (verify_jvm_instructions): Remove unused variable
17357 1999-03-27 Per Bothner <bothner@cygnus.com>
17359 * parse.y (complete_loop_body): Rename to finish_loop_body.
17360 (complete_labeled_statement): Rename to finish_labeled_statement.
17361 (complete_for_loop): Rename to finish_for_loop.
17362 (complete_method_declaration): Rename to finish_method_declaration.
17364 * java-tree.h (continue_identifier_node): New global node.
17365 * decl.c: Define and initialize continue_identifier_node.
17366 * parse.y (generate_labeled_block): Remove - no longer needed.
17367 (build_loop_body): Use continue_identifier_node for continue block.
17368 (finish_labeled_statement): Also do pop_labeled_block actions.
17369 (java_complete_lhs): POP_LOOP even if error.
17370 (build_labeled_block): Special handling for continue_identifier_node.
17371 (patch_loop_statement): Re-organize.
17372 (patch_bc_statement): Re-write.
17374 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17376 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
17377 using a WFL compound value.
17378 * parse.y (xref.h): Include.
17379 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
17380 WFL compound value.
17381 (register_fields): Set WFL compound value to lineno if doing
17383 (java_complete_expand_method): Call expand_xref if flag_emit_xref
17385 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
17386 * xref.h (expand_xref): Prototype renamed from xref_generate.
17388 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17390 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
17391 (GET_CURRENT_BLOCK): New macro.
17392 * parse.y (current_static_block): New global variable.
17393 (method_body:): Define action.
17394 (complete_method_declaration): Set current_function_decl to NULL
17395 when work on the current method is done.
17396 (declare_local_variables): Use GET_CURRENT_BLOCK.
17397 (java_method_add_stmt): Likewise.
17398 (java_complete_expand_method): Disable the use of `this' when
17399 expanding <clinit>.
17400 (enter_a_block): If no current method exist, use
17401 current_static_block to link static initializer blocks.
17402 (exit_block): Rewritten to use current_static_block when no current
17403 method decl exists.
17404 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
17405 (patch_return): Forbid the use of `return' in static initializers.
17406 (patch_throw_statement): Fixed indentation. Issue specific error
17407 for uncaught thrown checked exception in static initializer
17408 blocks. Removed FIXME.
17410 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
17412 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
17413 Link gcj from gcc.o.
17415 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
17417 * parse.y (find_applicable_accessible_methods_list): When dealing
17418 with interface: ensure that a given interface or java.lang.Object
17419 are searched only once.
17421 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17423 * gjavah.c (print_c_decl): Remove unused argument `flags'.
17425 * jcf-dump.c (print_access_flags): Add braces around if-else.
17427 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
17430 * lex.c (build_wfl_node): Add static prototype.
17432 * lex.h (build_wfl_node): Remove static prototype.
17434 * parse.y: Include lex.c early enough to declare everything needed.
17435 Ensure calls to `build_wfl_node' pass the proper arguments.
17436 (create_class): Remove unused variable `super_decl'.
17437 (get_printable_method_name): Initialize variable `name'.
17439 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17441 * Changelog: Fixed 1999-03-22 typos.
17442 * lang.c (lang_decode_option): Fixed typo in error string in the
17445 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17447 * Makefile.in (JAVA_OBJS): Added entry xref.o.
17448 (xref.o): New rule.
17449 * java-tree.h (flag_emit_xref): Declared extern.
17450 * lang.c (xref.h): Included.
17451 (flag_emit_xref): New global variable.
17452 (lang_decode_option): Added support for -fxref.
17454 * xref.h: Likewise.
17456 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
17458 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
17461 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17463 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
17464 $(srcdir)/../system.h and $(JAVA_TREE_H).
17465 (jcf-io.o): Depend on $(JAVA_TREE_H).
17466 (mangle.o): Likewise.
17468 * check-init.c (check_cond_init): Add static prototype.
17470 * class.c (build_java_method_type, hashUtf8String,
17471 make_field_value, get_dispatch_vector, get_dispatch_table,
17472 append_gpp_mangled_type, mangle_static_field): Likewise.
17473 (strLengthUtf8): Hide unused definition.
17474 (hashUtf8String): Const-ify.
17475 (make_field_value): Un-ANSI-fy.
17477 * constants.c: Move inclusion of jcf.h above java-tree.h.
17478 (set_constant_entry, find_class_or_string_constant,
17479 find_name_and_type_constant, get_tag_node,
17480 build_constant_data_ref): Add static prototype.
17482 * decl.c (push_jvm_slot, builtin_function,
17483 lookup_name_current_level): Likewise.
17484 (builtin_function): Const-ify.
17486 * except.c (expand_start_java_handler, expand_end_java_handler):
17487 Add static prototype.
17489 * expr.c (flush_quick_stack, push_value, pop_value,
17490 java_stack_swap, java_stack_dup, build_java_athrow,
17491 build_java_jsr, build_java_ret, expand_java_multianewarray,
17492 expand_java_arraystore, expand_java_arrayload,
17493 expand_java_array_length, build_java_monitor, expand_java_pushc,
17494 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
17495 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
17496 expand_compare, expand_test, expand_cond, expand_java_goto,
17497 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
17498 expand_java_field_op, java_push_constant_from_pool): Likewise.
17500 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
17501 (build_java_arraynull_check): Mark parameters `node' and `type'
17502 with ATTRIBUTE_UNUSED.
17503 (note_label): Likewise for parameter `current_pc'.
17504 (expand_java_call, expand_java_ret): Hide unused definition.
17506 * java-tree.h (make_class, build_constants_constructor,
17507 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
17508 init_outgoing_cpool, register_class, emit_register_classes,
17509 java_layout_seen_class_methods): Prototype.
17510 (unicode_mangling_length): Const-ify.
17511 (append_gpp_mangled_name, append_gpp_mangled_classtype,
17512 emit_unicode_mangled_name, format_int, format_uint,
17513 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
17514 jcf_print_utf8_replace, open_class): Prototype.
17516 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
17517 <stdio.h>. Include tree.h/java-tree.h.
17518 (utf8_equal_string usage, process_class): Add static prototype.
17519 (open_class): Don't prototype this here.
17520 (utf8_equal_string): Match arguments to format specifiers.
17521 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
17522 TABLE_SWITCH, disassemble_method): Likewise.
17524 * jcf-io.c: Include tree.h/java-tree.h.
17525 (open_class, find_classfile, jcf_print_utf8,
17526 jcf_print_utf8_replace): Const-ify.
17528 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
17529 parse_class_file): Add static prototype.
17530 (find_in_current_zip): Match definition to existing static
17533 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
17534 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
17535 finish_jcf_block, define_jcf_label, get_jcf_label_here,
17536 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
17537 write_chunks, adjust_typed_op, generate_bytecode_conditional,
17538 generate_bytecode_return, perform_relocations, init_jcf_state,
17539 init_jcf_method, release_jcf_state, generate_classfile):
17540 Add static prototype.
17541 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
17542 (make_class_file_name): Const-ify.
17544 * jcf.h (find_classfile): Const-ify.
17546 * jv-scan.c (reset_report): Remove prototype.
17548 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
17549 (error): Rewrite to allow varargs.
17551 * lang.c (lang_f_options): Const-ify.
17553 * lex.c (java_parse_escape_sequence): Add static prototype.
17554 (java_allocate_new_line): Match definition to existing static
17557 * mangle.c Include tree.h/java-tree.h.
17558 (unicode_mangling_length, emit_unicode_mangled_name,
17559 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
17561 * parse.h (jdep_code): Remove trailing comma in enumeration.
17562 (java_get_line_col): Move prototype outside of !JC1_LITE test.
17563 (reset_report): Add prototype.
17565 * verify.c (push_pending_label, merge_types): Add static
17568 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
17570 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17572 * parse.y (find_applicable_accessible_methods_list): Extend the
17573 search to superinterfaces when relevant.
17574 (search_applicable_methods_list): New function.
17576 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
17578 * class.c (unmangle_classname): Implemented stricter testing
17579 before setting the QUALIFIED_P flag on an identifier.
17581 1999-03-16 Per Bothner <bothner@cygnus.com>
17583 * parse.y (java_complete_lhs): Call force_evaluation_order
17584 after patch_newarray.
17585 (patch_binop): Don't call fold if there are side effects.
17587 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
17589 * parse.y (java_stabilize_reference): Use save_expr instead of
17590 building a SAVE_EXPR node.
17591 (java_complete_lhs): Patch the resulting string of the `+='
17592 operator (if necessary) and complete the RHS after having built
17595 1999-03-15 Per Bothner <bothner@cygnus.com>
17597 * class.c (make_class): Don't set CLASS_P here (because
17598 this function is also called by build_java_array_type).
17599 (push_class): Set CLASS_P here instead.
17600 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
17602 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
17603 context. If the context is class, perfer "super" over "synchronized".
17604 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
17606 * parse.y (create_class): Don't call parser_check_super here;
17607 it is not robust. Always wait until later.
17609 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
17610 match what JDK 1.2 does), but don't set ACC_PUBLIC.
17612 1999-03-13 Per Bothner <bothner@cygnus.com>
17614 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
17615 * lex.h (UNGETC): Change misleading macro.
17617 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17619 * parse.y (java_stabilize_reference): Return NODE when patching a
17621 (java_complete_lhs): Put parenthesis around truth values.
17623 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17625 * class.c (layout_class_method): Don't make rtl for interface
17627 * parse.h (GET_TYPE_NAME): New macro.
17628 * parse.y (if_then_statement:): Fixed indentation.
17629 (if_then_else_statement:): Likewise.
17630 (for_statement:): Fixed spacing.
17631 (try_statement:): Fixed indentation.
17632 (create_interface): Don't force interfaces to be abstract.
17633 (method_header): Abstract methods are OK in interfaces.
17634 (declare_local_variables): Fixed typo in comment.
17635 (java_complete_expand_method): Fixed indentation.
17636 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17637 non accessible fields.
17638 (java_stabilize_reference): New function.
17639 (java_complete_lhs): Fixed indentation. Use
17640 java_stabilize_reference in compound assignment. Insert the
17641 cast. If not processing `+' fix string constants before processing
17644 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17646 * constants.c (find_class_or_string_constant): Cast variable `j'
17647 to a `jword' when comparing against one.
17649 * expr.c (java_lang_expand_expr): Remove unused variables
17650 `has_finally_p' and `op0'.
17652 * gjavah.c (print_field_info): Cast a value to jint when comparing
17653 against one. Likewise for a jlong.
17654 (add_namelet): Likewise cast a `sizeof' to an int when comparing
17655 against a signed quantity.
17657 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17658 (print_signature): Don't needlessly dereference variable `str'
17660 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17661 `max_locals' with ATTRIBUTE_UNUSED.
17662 (jcf_parse_class): Likewise for variable `index'.
17664 * parse.h (reverse_jdep_list): Remove static prototype.
17666 * parse.y (build_jump_to_finally): Remove prototype and definition.
17667 (reverse_jdep_list): Add static prototype.
17669 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17670 `assignment' and `expr_decl'.
17672 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17674 1999-03-12 Andrew Haley <aph@cygnus.com>
17676 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
17677 we'll need a directory separator and a null character.
17679 1999-03-10 Per Bothner <bothner@cygnus.com>
17681 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
17683 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
17685 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17688 1999-03-05 Per Bothner <bothner@cygnus.com>
17690 * lex.c (java_parse_end_comment): Take extra parameter (next char).
17692 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
17694 * class.c (layout_class_method): A static method in a base class
17695 is never overridden, so treat it like it doesn't exist.
17696 However, do complain about private non-static method overriding
17697 public static method.
17699 * parse.y: Don't set unused INITIALIZED_P flag.
17700 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
17702 * parse.y (find_expr_with_wfl): Optimize tail-calls.
17703 (build_array_from_name): Re-order &index[string] to &string[index].
17705 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
17706 error_mark (it might catch more errors, but it is more likely to lose).
17708 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17710 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17711 (parse-scan.o): Depend on toplev.h.
17713 * class.c (make_method_value): Add prototype. Make it static.
17714 Remove unused second argument, caller changed.
17716 * expr.c (java_lang_expand_expr): Remove unused variable
17719 * java-tree.h: Don't prototype find_in_current_zip.
17720 Add prototypes for verify_constant_pool, start_java_method,
17721 end_java_method, give_name_to_locals, expand_byte_code,
17722 open_in_zip, set_constant_value, find_constant1, find_constant2,
17723 find_utf8_constant, find_string_constant, find_class_constant,
17724 find_fieldref_index, find_methodref_index, write_constant_pool,
17725 count_constant_pool_bytes and encode_newarray_type.
17727 * jcf-dump.c: Remove unused variable `LONG_temp'.
17729 * jcf-parse.c: Include parse.h.
17730 (jcf_parse_source): Remove unused parameter, all callers changed.
17731 (jcf_figure_file_type): Add static prototype.
17732 (find_in_current_zip): Likewise. Also remove unused parameter,
17733 all callers changed.
17734 (read_class): Initialize variable `saved_pos'.
17736 * jcf-reader.c (jcf_parse_preamble): Mark variables
17737 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17739 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17740 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17741 (java_parse_doc_section): Initialize variable `seen_star'.
17742 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17743 (java_lex_error): Mark parameters `msg' and `forward' with
17745 (java_get_line_col): Mark parameters `filename' and `line' with
17748 * parse-scan.y: Include toplev.h.
17749 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17751 * parse.h: use `struct JCF', not plain `JCF'.
17752 (java_parser_context_save_global, java_expand_classes
17753 java_parser_context_restore_global, java_parse): Add prototypes.
17755 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17758 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
17760 * check-init.c (check_init): COPYN takes word count, not bit count.
17762 1999-02-26 Per Bothner <bothner@cygnus.com>
17764 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
17765 explicit build_decl. (Avoids crash in reload when optimizing.)
17767 1999-02-25 Per Bothner <bothner@cygnus.com>
17769 * decl.c (complete_start_java_method): Handle synchronized method
17770 even when compiling from bytecode.
17772 1999-02-26 Tom Tromey <tromey@cygnus.com>
17774 * gjavah.c (add_class_decl): Only generate `#include' if outer
17775 class is not the name of the class we are processing. Correctly
17776 append `.h' in #include.
17777 (process_file): Clean up newlines around generated `#include's.
17778 (decode_signature_piece): Correctly handle inner classes.
17779 (struct include): New structure.
17780 (all_includes): New global.
17781 (print_include): New function.
17782 (add_class_decl): Use it.
17783 (process_file): Likewise.
17784 (add_class_decl): Generate include for java-array.h if array
17786 (process_file): Don't generate java-array.h include.
17788 * gjavah.c (add_namelet): Check for standard package names here.
17789 (add_class_decl): Don't check for standard package names here.
17791 1999-02-25 Tom Tromey <tromey@cygnus.com>
17793 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17794 When reading a zip file, only use strncmp if both strings are
17795 bigger than the buffer length. Initialize `k' when looping
17798 1999-02-24 Tom Tromey <tromey@cygnus.com>
17800 * gjavah.c (struct namelet): New structure.
17801 (add_namelet): New function.
17802 (print_namelet): New function.
17803 (print_class_decls): Use add_namelet and print_namelet to generate
17804 namespaces and not classes.
17805 (method_printed): New global.
17806 (HANDLE_END_METHOD): Examine method_printed.
17807 (print_method_info): Set method_printed when required. Print
17808 error if function to be ignored is marked virtual. Handle $finit$
17810 (METHOD_IS_FINAL): New macro.
17811 (print_field_info): Use it.
17812 (HANDLE_METHOD): Clear method_printed.
17813 (method_pass): New global.
17814 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17815 (process_file): Do two passes over both fields and methods.
17816 (HANDLE_METHOD): Examine method_pass.
17817 (root): New global.
17818 (add_class_decl): New function.
17819 (print_class_decls): Don't scan over entire constant pool.
17821 1999-02-23 Tom Tromey <tromey@cygnus.com>
17823 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17824 disable linking in that case.
17826 1999-02-20 Tom Tromey <tromey@cygnus.com>
17828 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17831 1999-02-21 Per Bothner <bothner@cygnus.com>
17833 * decl.c (build_result_decl), java-tree.h: New method.
17834 (complete_start_java_method): Handle synchronized methods.
17835 Don't build DECL_RESULT here. (Ordering dependency problem.)
17836 (start_java_method): Call build_result_decl here instead ...
17837 * parse.y (java_complete_expand_method): ... and here.
17838 (expand_start_java_method): Don't call complete_start_java_method here.
17839 (java_complete_expand_method): Call it here instead.
17840 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
17841 * java-tree.h: ... here.
17843 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
17844 * parse.y (java_complete_lhs): Don't call force_evaluation_order
17845 for ARRAY_REF - it doesn't work when array bounds are checked.
17846 (patch_array_ref): Handle it here instead.
17848 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
17850 1999-02-19 Per Bothner <bothner@cygnus.com>
17852 Force left-to-right evaluation of binary operations etc.
17853 * expr.c (force_evaluation_order), java-tree.h: New function.
17854 * parse.y (java_complete_lhs): Pass binary operations, procedure
17855 calls, and ARRAY_REFs to force_evaluation_order.
17856 (various): Set TREE_SIDE_EFFECTS more carefully.
17858 Tolerate random (non-UTF8) encoding in comments without complaining.
17859 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
17860 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
17862 * parse.y (resolve_qualified_expression_name): Handle error_mark.
17863 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
17865 * parse.y (java_complete_lhs): Ignore an empty statement in a
17866 COMPOUND_EXPR. Don't complain about empty statement after return.
17868 1999-02-19 Per Bothner <bothner@cygnus.com>
17870 * parse.y (obtain_incomplete_type): Don't wrap unknown types
17871 in TREE_LIST - just chain the POINTER_TYPEs together.
17872 (resolve_class): If type already resolved, return decl.
17873 After resolving, update TREE_TYPE(class_type), and name (if array).
17874 * parse.h (do_resolve_class), parse.y: Make non-static.
17875 * class.c (maybe_layout_super_class): Take this_class argument.
17876 Do do_resolve_class if necessary.
17877 (layout_class, layout_class_methods): Adjust calls appropriately.
17878 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17879 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
17880 * typeck.c (build_java_array_type): Don't call layout_class.
17882 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17884 * parse.y (check_pkg_class_access): Allow private class access
17885 within the same package.
17886 (strip_out_static_field_access_decl): New function.
17887 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17888 operator argument before testing its nature.
17890 1999-02-03 Per Bothner <bothner@cygnus.com>
17892 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
17893 (TRY_EXPR): Simplify - it no longer has a finally clause.
17894 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
17895 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17896 * expr.c (java_lang_expand_expr): Likewise.
17897 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
17898 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
17899 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
17900 (build_try_statement): Remove finally parameter and handling.
17901 (build_try_finally_statement): New function.
17902 (patch_try_statement): No longer need to support finally clause.
17903 (try_statement): Update grammar action rules.
17904 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
17905 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17907 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
17909 * jcf-parse.c (get_constant): Add braces around computation of 'd'
17910 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
17912 1999-02-17 Andrew Haley <aph@cygnus.com>
17914 * class.c (build_utf8_ref): Back out broken patch which was
17915 intended to to output signatures using '.' as a separator.
17917 * class.c (make_class_data): Output signatures using '.' as a
17918 separator, rather than '/'.
17919 (mangled_classname): Likewise.
17920 (make_field_value): Likewise.
17921 (make_method_value): Likewise.
17922 * constants.c (alloc_class_constant): Likewise.
17923 * expr.c (build_invokeinterface): Likewise.
17925 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17927 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17928 of an ancient workaround.
17930 1999-02-10 Jeffrey A Law (law@cygnus.com)
17932 * jvspec.c (xmalloc): Kill the prototype. It does not belong
17935 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17937 * lex.c (yylex): Encode \0 as UTF8.
17939 1999-02-10 Tom Tromey <tromey@cygnus.com>
17941 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17942 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17943 (libgcj_zip): Renamed.
17944 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17946 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17948 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17949 (GC_NAME): Renamed -lgc to -lgcjgc.
17951 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17953 * lex.c (java_lang_cloneable): Initialize.
17954 * parse.y (java_lang_cloneable): New static variable.
17955 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17956 doing one more qualification round.
17957 (valid_ref_assignconv_cast_p): Reject null source or
17958 destination. Allow an array to be cast into java.lang.Cloneable.
17959 (patch_cast): Swapped two first arguments to first call to
17960 valid_ref_assignconv_cast_p.
17962 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
17964 * parse.h: DECL_P renamed JDECL_P.
17965 * parse.y: DECL_P replaced by JDECL_P.
17966 (build_array_from_name): Always use pointer's type.
17967 (patch_bc_statement): Extra code to search continue target in a
17968 for loop. Fixed comments. Continue target is current loop when
17971 1999-02-05 Andrew Haley <aph@cygnus.com>
17973 * class.c (make_class_data): The superclass of an interface should
17974 be null, not class Object.
17976 * lex.c (java_lex): Sign extend hex literals.
17978 1999-02-04 Andrew Haley <aph@cygnus.com>
17980 * class.c (build_utf8_ref): Output signatures using '.' as a
17981 separator, rather than '/'.
17982 (make_class_data): Likewise.
17984 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
17986 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17987 mkstemp.o. Get them from libiberty now.
17989 1999-02-02 Jeffrey A Law (law@cygnus.com)
17991 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17993 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17995 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17998 1999-02-02 Per Bothner <bothner@cygnus.com>
18000 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
18001 * jcf-write.c (generate_bytecode_return): New function.
18002 (generate_bytecode_insns): Use it, for RETURN_EXPR.
18004 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
18005 generate special [fd]const_[01] instructions.
18007 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
18009 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
18010 handling OPCODE_lookupswitch or OPCODE_tableswitch.
18012 1999-02-01 Per Bothner <bothner@cygnus.com>
18014 * parse.y (patch_method_invocation): Handle calling static methods,
18015 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
18017 * parse.y (java_complete_lhs): Don't complain about unreachable
18018 exit condition in a do-while statement.
18020 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
18022 * lex.c (java_read_char): Fixed utf8 decoding.
18023 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
18025 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
18026 comments. Local variable `all_primitive' is gone. Broadened
18027 acceptance of `0' to floating point targets. `long' can now be
18028 widened to `double' or `float'.
18029 (valid_method_invocation_conversion_p): Added leading
18030 comment. Fixed tabulation.
18031 (build_string_concatenation): Optimize out left or right empty
18034 1999-01-28 Per Bothner <bothner@cygnus.com>
18036 * jcf-write.c (localvar_alloc): Only emit entry for
18037 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
18038 (generate_bytecode_insns): Only call put_linenumber if
18039 debug_info_level > DINFO_LEVEL_NONE.
18040 * jvspec.c (lang_specific_driver): If no -O* or -g* option
18041 is specified, add -g1 (for compatibility wih javac).
18043 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
18045 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
18046 gjavah.o, check-init.o, jv-scan.o
18048 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18050 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
18052 * gjavah.c: Include config.h and system.h.
18054 * javaop.h (inline): Don't define, its handled by system.h.
18055 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
18056 from `inline' to `static inline'.
18058 * jcf.h (inline): Don't define, its handled by system.h.
18060 * lex.c (inline): Likewise.
18062 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
18064 * lang-specs.h: Map -Qn to -fno-ident.
18066 1999-01-29 Richard Henderson <rth@cygnus.com>
18068 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
18070 1999-01-29 Tom Tromey <tromey@cygnus.com>
18072 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
18073 then cast it to Object before calling `append' method.
18075 1999-01-28 Per Bothner <bothner@cygnus.com>
18077 * check-init.c (check_bool2_init, check_bool_init, check_init):
18078 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
18079 * jcf-write.c (generate_bytecode_insns): Likewise.
18081 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
18083 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
18084 * parse.y (patch_cast): Allow a boolean to be cast into a
18087 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
18089 * parse.y: (class_declaration:): Fixed indentation.
18090 (class_member_declaration:): Extra `;' after field declaration now
18092 (interface_declaration:): Removed debug messages in error reports.
18093 (patch_binop): Nodes created and returned inherit the orignal
18094 node's COMPOUND_ASSIGN_P flag value.
18095 (patch_cast): Fix cast from char to floating point.
18097 1999-01-25 Andrew Haley <aph@cygnus.com>
18099 * except.c, java-except.h (expand_resume_after_catch): new
18101 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
18102 to branch back to main flow of control after a catch block.
18104 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18106 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
18107 $(srcdir)/../system.h.
18108 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
18109 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
18110 (jcf-write.o): Likewise.
18111 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18112 (mangle.o): Depend on $(srcdir)/../toplev.h.
18113 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18114 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18116 * class.c: Include output.h and parse.h.
18117 (mangled_classname): Add the `const' keyword to a char*.
18118 (find_named_method): Hide unused function definition.
18119 (build_utf8_ref): Change type of variable `c' to unsigned char.
18120 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
18121 (build_class_ref): Add the `const' keyword to a char*.
18122 (layout_class_method): Remove unused variable `buf'.
18124 * decl.c (find_local_variable): Remove unused variable `rtl'.
18125 (pushdecl): Likewise for variables `different_binding_level' and
18127 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
18128 (maybe_build_cleanup): Likewise for parameter `decl'.
18130 * except.c (expand_start_java_handler): Mark parameter `range'
18131 with ATTRIBUTE_UNUSED.
18133 * expr.c: Include except.h.
18134 (pop_type): Remove unused variable `i'.
18135 (pop_value): Likewise for variables `n_words' and `i'.
18136 (expand_java_arrayload): Likewise for variable `convert'.
18137 (java_lang_expand_expr): Likewise for variables `op0', `type',
18138 `mode', `unsignedp', `node' and `elements'.
18139 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
18141 (process_jvm_instruction): Add a `const' qualifier to a char*.
18143 * gjavah.c (output_directory): Add the `const' keyword to a char*.
18144 (temp_directory): Likewise.
18145 (print_c_decl): Likewise.
18146 (print_method_info): Likewise.
18147 (decode_signature_piece): Likewise.
18148 (print_mangled_classname): Likewise.
18150 * java-except.h: Provide prototypes for maybe_start_try,
18151 maybe_end_try and add_handler.
18153 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
18154 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
18155 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
18156 init_expr_processing, push_super_field, init_class_processing,
18157 can_widen_reference_to, class_depth, verify_jvm_instructions,
18158 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
18159 set_local_type, merge_type_state, push_type, load_type_state,
18160 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
18161 emit_unicode_mangled_name): Add prototypes.
18163 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
18164 (print_signature_type): Use ISDIGIT, not isdigit.
18165 (print_signature): Remove unused variable `j'.
18167 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
18168 int when comparing against one.
18170 * jcf-parse.c: Include toplev.h.
18172 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
18173 (localvar_free): Remove unused variable `i'.
18174 (generate_bytecode_conditional): Likewise for variable `kind'.
18176 * jv-scan.c: Include config.h and system.h. Remove redundant
18177 OS header and gansidecl.h includes.
18178 (warning): Add the `const' keyword to a char*. Also add
18179 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
18180 __STDC__, when determining whether to use ANSI-isms.
18181 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
18182 (xmalloc): Don't redundantly prototype here.
18183 (main): Remove unused parameter `envp'. Also fix the arguments
18184 passed to function `fatal' to match the format specifier.
18186 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
18188 * mangle.c: Include toplev.h.
18189 (emit_unicode_mangled_name): Declare parameter `len'.
18191 * parse.y (parse_warning_context): Add the `const' keyword to a
18192 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
18193 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
18194 (issue_warning_error_from_context): Add the `const' keyword to
18196 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
18197 not `__STDC__' for whether to use ANSI-isms.
18199 * typeck.c (incomplete_type_error): Mark parameters `value' and
18200 `type' with ATTRIBUTE_UNUSED.
18201 (parse_signature_type): Use ISDIGIT, not isdigit.
18203 * verify.c (check_pending_block): Add the `const' keyword to a char*.
18204 (verify_jvm_instructions): Likewise. Remove unused variables
18205 `field_name' and `default_val'.
18207 * zextract.c: Include config.h and system.h. Remove redundant
18208 OS header includes.
18210 * zipfile.h: Prototype `read_zip_archive'.
18212 1999-01-21 Andrew Haley <aph@cygnus.com>
18214 * typeck.c (convert): Allow conversions to void type: some
18215 optimizations in gcc do this.
18217 1999-01-21 Andrew Haley <aph@cygnus.com>
18219 * typeck.c (convert_ieee_real_to_integer): New function.
18220 (convert): When not using fast-math and using hardware fp, convert
18221 an IEEE NaN to zero.
18223 1999-01-18 Andrew Haley <aph@cygnus.com>
18225 * parse.y (patch_binop): Do a type conversion from signed to
18226 unsigned and then back to signed when a ">>>" is found.
18228 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
18230 * java-tree.h: (check_for_initialization): Added prototype.
18231 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
18232 * parse.y (do_resolve_class): Removed unused locals.
18233 (read_import_dir): Likewise.
18234 (resolve_qualified_expression_name): Array creation
18235 expressions are valid primary expressions.
18236 (qualify_ambiguous_name): Likewise.
18237 (patch_synchronized_statement): Removed unused local.
18239 1999-01-17 Jeffrey A Law (law@cygnus.com)
18241 * Makefile.in (zextract.o): Add dependencies.
18243 * Makefile.in: Do not put ^Ls at the start of a line.
18245 1999-01-15 Per Bothner <bothner@cygnus.com>
18247 * expr.c (process_jvm_instruction): Coerce to correct Throwable
18248 sub-type the result of the call that gets the exception value.
18250 * parse.y (java_complete_expand_methods): If flags_syntax_only,
18251 don't call finish_class.
18253 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
18254 clear found before continuing.
18256 * verify.c (verify_jvm_instructions): On an array load, allow
18257 and handle top of stack to be TYPE_NULL.
18259 * gjavah.c (generate_access): Translate Java package private or
18260 protected access to C++ public, but with a comment.
18262 1999-01-13 Andrew Haley <aph@cygnus.com>
18264 * expr.c (generate_name): Name prefix changed to avoid clashes
18265 with assembler temp labels.
18267 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
18268 MODIFY_EXPR. Without this, code for the assignment may not be
18269 generated at all and the synchronized statement will read an
18270 uninitialized variable.
18272 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
18274 * class.c (maybe_layout_super_class): Fixed returned value.
18275 * lex.c: Added 1999 to the copyright.
18276 (java_init_lex): Initialize java_lang_imported.
18277 * lex.h: Added 1999 to the copyright.
18278 * parse.h: Added 1999 to the copyright.
18279 (REGISTER_IMPORT): Fixed typo in trailing macro.
18280 (CURRENT_OSB): New macro.
18281 (struct parser_ctxt): New fields osb_depth, osb_limit.
18282 * parse.y (java_lang_id): New global variable.
18283 (type_import_on_demand_declaration): Don't import java.lang.* twice.
18284 (array_creation_expression:): Use CURRENT_OSB.
18285 (dims:): Uses a stack to keep track of array dimensions.
18286 (cast_expression:): Use CURRENT_OSB.
18287 (find_expr_with_wfl): Return NULL if node found doesn't meet the
18289 (register_fields): Fixed typos in comment.
18290 (check_method_redefinition): Fixed comment indentation.
18291 (java_check_regular_methods): Set saved found wfl to NULL after
18292 having reinstalled it in the previously found DECL_NAME.
18294 1999-01-10 Richard Henderson <rth@cygnus.com>
18296 * gjavah.c (java_float_finite): Use a union to do type punning.
18297 (java_double_finite): Likewise.
18299 1999-01-09 Per Bothner <bothner@cygnus.com>
18301 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
18302 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
18303 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
18304 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
18305 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
18306 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
18308 1999-01-08 Per Bothner <bothner@cygnus.com>
18310 * check-init.c (check_init): If compiling to native, we don't
18311 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
18313 1999-01-08 Tom Tromey <tromey@cygnus.com>
18315 * parse-scan.y (variable_declarator_id): Set or increment
18317 (bracket_count): New global.
18318 (formal_parameter): Handle case where bracket pairs trail variable
18321 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
18323 * jcf-parse.c (yyparse): variable len changed from a char to an
18324 int to prevent overflow.
18326 1999-01-06 Per Bothner <bothner@cygnus.com>
18328 * java-tree.h: Declare read_class.
18329 * jcf-parse.c (read_class): New function.
18330 (load_class): Now just call read_class.
18332 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
18333 * jcf-parse.c (parse_source_file): Declare save_error_count,
18334 which is needed by java_parse_abort_on_error macro,
18335 * parse.y (java_layout_classes, java_expand_classes): Likewise.
18337 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
18338 constructor, if initializing a static field.
18339 (patch_new_array_init): Set TREE_CONSTANT if it is.
18340 * expr.c (java_lang_expand_expr): For a static array constructor
18341 of primitive elements, allocate the array itself statically.
18342 Disabled until we can set the vtable field statically.
18344 * check-init.c: New file. Checks for definite assignment.
18345 * Makefile.in (JAVA_OBJS): Add check-init.o.
18346 * parse.y (java_complete_expand_method): Call check_for_initialization.
18347 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
18349 1999-01-06 Graham <grahams@rcp.co.uk>
18351 * parse.y : include system.h instead of including
18352 standard headers directly with the exception of <dirent.h>.
18354 1999-01-06 Per Bothner <bothner@cygnus.com>
18356 * lex.h: Moved static function declarations to lex.c,
18357 to shut up some -Wall warnings.
18358 * lex.c: Static function declarations moved here.
18359 * jcf-dump.c: Small fixes to shut up -Wall warnings.
18361 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18363 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
18365 1998-12-22 Per Bothner <bothner@cygnus.com>
18367 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
18368 * verify.c (verify_jvm_instructions): Fix off-by-one error.
18370 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
18371 (localvar_alloc): Change return type to void,
18372 (emit_unop): Remove unused variable size.
18374 * jcf-write.c (struct jcf_block): Add new union.
18375 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
18376 (call_cleanups): New functions.
18377 (struct jcf_partial): New fields num_finalizers and return_value_decl.
18378 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
18379 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
18380 * lang.c (lang_init): Call using_eh_for_cleanups.
18381 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
18382 completing operands to patch_synchronized_statement.
18383 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
18384 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
18385 WITH_CLEANUP_EXPR instead of TRY_EXPR.
18387 1998-12-20 John F. Carr <jfc@mit.edu>
18389 * Make-lang.in: Comment out control-Ls; they upset some makes.
18391 1998-12-18 Tom Tromey <tromey@cygnus.com>
18393 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
18396 1998-12-17 Tom Tromey <tromey@cygnus.com>
18398 * parse.y (DIR_SEPARATOR): New define.
18399 (check_class_interface_creation): Use it.
18401 * parse-scan.y (report_main_declaration): Recognize
18402 `java.lang.String' in argument to main.
18404 1998-12-16 Per Bothner <bothner@cygnus.com>
18406 * parse.y (create_interface): Remove bogus test.
18408 1998-12-16 Per Bothner <bothner@cygnus.com>
18410 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
18411 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
18413 1998-12-16 Tom Tromey <tromey@cygnus.com>
18415 * parse-scan.y (qualified_name): Use correct sprintf format.
18417 1998-12-15 Tom Tromey <tromey@cygnus.com>
18419 * gjavah.c (print_field_info): Changed how most negative number is
18422 1998-12-14 Per Bothner <bothner@cygnus.com>
18424 * parse.y (fold_constant_for_init): New function.
18425 (resolve_expression_name): Don't replace static final
18426 constant-initialized fields by its value.
18427 (java_complete_lhs): New. Same as java_complete_tree, except does
18428 not replace static final constant-initialized fields by their values.
18429 (register_fields): If there is an initializer, set DECL_INITIAL and
18430 MODIFY_EXPR_FROM_INITIALIZATION_P.
18431 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
18432 Only call patch_initialized_static_field if
18433 MODIFY_EXPR_FROM_INITIALIZATION_P.
18434 (patch_initialized_static_field): If not valid constant, clear
18437 * parse.y (lookup_field_wrapper): Fix thinko.
18439 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
18440 set and restore global lineno.
18442 1998-12-14 Tom Tromey <tromey@cygnus.com>
18444 * gjavah.c (print_field_info): If value to print is the smallest
18445 value of its size, then print as hex to avoid later warnings from
18448 1998-12-14 Tom Tromey <tromey@cygnus.com>
18450 * gjavah.c (decompile_method): Decompile `return null'.
18451 (process_file): Generate `#pragma interface'.
18452 (method_declared): New global.
18453 (print_method_info): Set it.
18454 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
18455 (print_method_info): Handle abstract methods.
18457 1998-12-13 Per Bothner <bothner@cygnus.com>
18459 * parse.y (patch_method_invocation): If class_decl is null
18460 (e.g. an array type), use original type.
18462 * parse.y (check_thrown_exceptions): Temporary hack to suppress
18463 errors about uncaught exception from clone (of array, specifically).
18465 1998-12-13 Tom Tromey <tromey@cygnus.com>
18467 * gjavah.c (decompile_method): Handle all types of `return'
18468 opcode. Decompile `return this' and `return'.
18469 (method_access): New global.
18470 (print_method_info): Set it.
18471 (decompile_method): Don't decompile a synchronized method.
18473 1998-12-13 Tom Tromey <tromey@cygnus.com>
18475 * jcf-reader.c (jcf_parse_one_method): Recognize
18477 * gjavah.c (HANDLE_END_METHOD): New macro.
18478 (HANDLE_CODE_ATTRIBUTE): New macro.
18479 (decompile_method): New function.
18480 (print_method_info): Don't print `;\n' at end of function decl.
18481 Include java-opcodes.h.
18482 (decompiled): New global.
18484 1998-12-12 Per Bothner <bothner@cygnus.com>
18486 * class.c (build_class_ref): Handle PRIMTYPE.class if
18487 flag_emit_class_files.
18488 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
18489 if flag_emit_class_files.
18490 * parse.y (java_complete_tree): Pre-liminary support for
18491 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
18493 * parse.y (patch_synchronized_statement): Don't call monitorexit
18494 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
18496 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
18498 * zipfile.h (opendir_in_zip): New declaration.
18499 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
18500 (opendir_in_zip): New function, using code from open_in_zip.
18501 (open_in_zip): Call opendir_in_zip.
18502 (find_class): Remove no-longer-used do_class_file parameter,
18503 but add source_ok parameter. Change logic so if we find a .java file,
18504 we don't look for .class in later classpath emtries.
18505 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
18506 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
18507 * gjavah.c: Update call to find_class.
18508 * jcf-dump.c: Likewise.
18510 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
18511 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
18512 nothing if body is empty_stmt_node.
18513 Various little fixes so SP gets correctly adjusted.
18514 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
18515 For CALL_EXPR, test if static first.
18516 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
18517 such as the ones we create for Object and Class.
18518 Set and restore current_function_decl.
18519 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
18520 (note_possible_classname): New function.
18521 (read_import_entry): Removed. Merged with read_import_dir.
18522 (read_import_dir): Don't call find_class - that only gives us
18523 the first classpath entry having the needed package.
18524 Use the struct buffer data structure from buffer.h.
18525 (read_import_dir, find_in_imports_on_demand): The remembered
18526 class names now use '.' (not '/') as package separator.
18528 * parse.y (java_complete_expand_methods): Call write_classfile
18529 here, and not in java_expand_classes (which only gets first class).
18531 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
18533 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
18534 (register_fields): If a static fields has an initializer, just
18535 chain it on ctxp->static_initialized, and handle later.
18536 (java_complete_expand_methods): Force <clinit> first.
18537 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
18538 - it's already been completed.
18539 (patch_initialized_static_field): New function.
18540 (java_complete_field): Call it.
18542 1998-12-12 Per Bothner <bothner@cygnus.com>
18544 * expr.c (encode_newarray_type, build_new_array): New functions.
18545 * java-tree.h: Declare build_new_array.
18546 * jcf-write.c (patch_newarray): Use build_new_array.
18548 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
18549 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
18551 * parse.y (patch_new_array_init): Re-organize.
18552 Now is passed the actual array (pointer) type of the value.
18553 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
18554 (patch_array_constructor): Removed - merged into patch_new_array_init.
18555 (java_complete_tree): Update patch_new_array_init.
18557 * jcf-write.c (find_constant_index): New function.
18558 (generate_bytecode_insns): Use find_constant_index.
18559 (generate_classfile): Use find_constant_index for ConstantValue.
18561 1998-12-11 Tom Tromey <tromey@cygnus.com>
18563 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
18564 * decl.c (init_decl_processing): Renamed dtable -> vtable.
18565 * class.c (make_class_data): Renamed dtable -> vtable, and
18566 dtable_method_count -> vtable_method_count.
18568 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18570 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
18571 global variables, initialized.
18572 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
18573 Declared new global variables.
18574 * lex.c (java_lex): Return long_zero_node, float_zero_node,
18575 double_zero_node, integer_zero_node upon direct matching.
18576 * parse.y (purify_type_name): Added function prototype.
18577 (duplicate_declaration_error_p): Consider new_type as potentially
18578 being a incomplete type. Use purify_type_name on type string.
18579 (method_header): saved_type: unused variable removed. Don't figure
18580 return type if method name is invalid.
18581 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
18582 processed by patch_unaryop.
18583 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
18584 increment/decrement node into its original type after binary
18585 numeric promotion on its operands.
18587 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18589 * parse.y (array_initializer:): Array init operand is NULL_TREE
18590 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
18591 now an error. Fixed indentation problems.
18592 (patch_string): Handle error_mark_node as an argument.
18593 (patch_new_array_init): Fixed indentation problems.
18594 (array_constructor_check_entry): Removed check on null wfl_value.
18595 Return an error if wfl_value's walk returns an error.
18597 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
18599 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
18600 * lex.c (java_lex): Remember column position before advancing one
18601 token. Retain location information on OCB_TK.
18602 * lex.h (typedef struct java_lc): Added new field.
18603 * parse.h (GET_SKIP_TYPE): New macro.
18604 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
18605 * parse.y (build_new_array_init, patch_new_array_init,
18606 patch_array_constructor, maybe_build_array_element_wfl,
18607 array_constructor_check_entry): New function prototypes.
18608 (switch_block:): Tagged <node>.
18609 (OCB_TK): Tagged <operator>.
18610 (array_initializer:): Installed actions.
18611 (variable_initializer): Build location information on element if
18613 (switch_statement:): Fixed indentation typo.
18614 (switch_block:): Redefined default action.
18615 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
18616 (patch_assignment): Removed duplicate code.
18617 (maybe_build_array_element_wfl, build_new_array_init,
18618 patch_new_array_init, patch_array_constructor,
18619 array_constructor_check_entry): New functions.
18621 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
18623 * parse.y (array_initializer): Tagged <node>.
18624 (variable_initializer:): Use default rule.
18625 (array_initializer:): Defined actions.
18626 (variable_initializers:): Likewise.
18627 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
18628 non-static field accesses.
18629 (patch_invoke): Fixed indentation typo.
18630 (java_complete_tree): Likewise.
18631 (build_labeled_block): Changed leading comment. Generate an error
18632 in case of duplicate loop labels.
18633 (patch_conditional_expr): Patch results of string concatenation
18636 1998-12-06 Per Bothner <bothner@cygnus.com>
18638 * constants.c (find_methodref_index): When the class is an interface,
18639 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18641 * decl.c (finit_identifier_node): Use "$finit$", rather than
18642 "<finit>" (which Sun's verifier rejects).
18643 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
18644 (generate_field_initialization_code): Removed.
18645 (fix_constructors) Don't add call to $finit$ here (wrong order).
18646 (patch_method_invocation): Add $finit$ call here.
18648 * java-tree.h (CALL_USING_SUPER): New macro.
18649 * parse.y (patch_invoke): Remove im local variable.
18650 (patch_method_invocation, patch_invoke): Don't pass super parameter.
18651 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
18652 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
18654 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
18656 * parse.y (java_complete_tree): Don't complain about unreachable
18657 statement if it is empty_stmt_node.
18659 * jcf-write.c (find_constant_wide): New function.
18660 (push_long_const): Use find_constant_wide.
18662 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
18663 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
18664 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18665 Emit invokeinterface when calling an interface method.
18666 Emit invokespecial also when calling super or private methods.
18668 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
18670 1998-12-06 Per Bothner <bothner@cygnus.com>
18672 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
18674 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
18676 * java-tree.h (java_layout_seen_class_methods): New function
18678 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18679 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18680 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18681 * parse.y (method_declarator:): Defined action.
18682 (issue_warning_error_from_context): input_filename saved, set to
18683 the appropriate value and restored after java_error is called.
18684 (build_unresolved_array_type): Fixed comment.
18685 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18686 (method_header): Deal with return type the same way type are
18687 handled for fields and method's parameters and local variables
18689 (check_method_redefinition): Removed extra CR.
18690 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18691 (java_layout_seen_class_methods): New function.
18692 (java_layout_classes): Call java_layout_seen_class_methods.
18694 1998-12-03 Per Bothner <bothner@cygnus.com>
18696 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
18698 1998-12-03 Per Bothner <bothner@cygnus.com>
18700 * jcf-dump.c (main): Fix error message.
18701 * jcf-path.c (add_entry): Style fix.
18703 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18705 * class.c (layout_class_method): Call build_java_argument_signature
18706 on constructors too.
18707 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18708 (patch_method_invocation): Define a primary when resolving an
18709 expression name. Augmented comment on code checking illegal `this'
18710 usage. Loosened it test by accepting NEW_CLASS_EXPR.
18712 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
18714 * class.c (layout_class_method): Don't report error on non-static
18715 overriding static if the method is private.
18716 * java-tree.h (finish_class): Prototype added.
18717 * lex.c (java_get_line_col): Handle col argument -2 value.
18718 * parse.h: All static method declarations moved to parse.y.
18719 * parse.y: Now contains all static method declarations previously
18721 (find_expr_with_wfl, missing_return_error,
18722 unreachable_stmt_error): New functions.
18723 (java_get_real_method_name): Identify constructors bearing class
18724 names in source code compiled classes only.
18725 (java_complete_expand_methods): Call missing_return_error.
18726 (invocation_mode): Private methods invoked as static methods.
18727 (java_complete_tree): Call unreachable_stmt_error.
18729 1998-12-01 Tom Tromey <tromey@cygnus.com>
18731 * Makefile.in (+target): Removed.
18732 (+xmake_file): Likewise.
18733 (+tmake_file): Likewise.
18734 (.NOEXPORT): Removed duplicate.
18736 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18738 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18740 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
18742 * jvgenmain.c: Remove the xmalloc prototype, we get it from
18743 libiberty.h. Provide an xmalloc definition.
18745 * jvspec.c: Remove the xmalloc prototype.
18747 * parse-scan.y: Include config.h and system.h. Don't include
18748 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
18749 Provide an xstrdup definition.
18751 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
18753 * jcf-path.c (add_entry): Recognize ".jar" too.
18754 * lang-specs.h: Likewise.
18756 1998-11-26 Per Bothner <bothner@cygnus.com>
18758 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
18759 soft_monitorenter_node, soft_monitorexit_node, throw_node.
18761 * jcf-write.c (generate_bytecode_insns):
18762 Handle pre/post-increment/decrement of long.
18764 * jcf-write.c (generate_bytecode_insns):
18765 Handle missing exception handler (finally for synchronized).
18767 1998-11-25 Per Bothner <bothner@cygnus.com>
18769 * java-tree.h (end_params_node): Declare global.
18770 * decl.c (end_params_node): New global.
18771 (init_decl_processing, start_java_method): Use end_params_node for
18772 end of list of parameter types. Follows correct gcc conventions.
18773 * expr.c (pop_argument_types, pop_arguments): Likewise.
18774 * lang.c (put_decl_node): Likewise.
18775 * typeck.c (various places): Likewise.
18776 * class.y (various places): Likewise.
18777 * parse.y (various places): Likewise.
18779 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
18780 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
18782 * class.c: Add #include flags.h, remove no-longer needed declaration.
18784 * class.c (layout_class_method): Remove commented-out code, re-format.
18785 Don't add vtable entry (or index) for private methods.
18786 * expr.c (expand_invoke): A private method is implicitly final.
18787 * class.c (make_class_data): If inlining or optimizing,
18788 skip private methods.
18790 * class.c (finish_class): New function. Calls existing methods,
18791 but alls emits deferred inline functions.
18792 * jcf-parse.c (parse_class_file): Call finish_class.
18793 * parse.y (java_complete_expand_methods): Likewise.
18795 * expr.c (build_java_binop): Explicit default, to silence -Wall.
18797 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
18799 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
18801 * jcf-write.c (generate_bytecode_conditional): Fix typo.
18803 1998-11-24 Per Bothner <bothner@cygnus.com>
18805 * (generate_classfile): Always write class access flag with
18808 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
18810 * class.c (maybe_layout_super_class): New function.
18811 (layout_class): Reorganized. Loop on class methods dispatched into
18812 a new function. Call maybe_layout_super_class.
18813 (layout_class_methods, layout_class_method): New functions.
18814 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18816 (expand_invoke): Likewise.
18817 * java-tree.h (all_class_list): New global variable declared.
18818 (layout_class_methods, layout_class_method): New function
18820 (LAYOUT_SEEN_CLASS_METHODS): New macro.
18821 * jcf-parse.c (all_class_list): New global variable.
18822 (load_class): Extended what class_or_name can be. Use parser
18823 context mechanism to save globals before calling jcf_parse.
18824 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18825 is set on the file name.
18826 (jcf_parse): Layout class methods when Object is loaded, otherwise
18827 record class in all_class_list for delayed method layout.
18828 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18829 * lang.c (put_decl_node): Decode <init> into the decl context
18831 * lex.c (java_allocate_new_line): Use xmalloc.
18832 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18833 pointers, not TREE_LIST elements.
18834 (struct parser_ctxt): Fixed comment indentations, added comments
18835 and reordered some fields.
18836 (java_check_methods): Function prototype removed.
18837 * parse.y (java_push_parser_context): Use xmalloc.
18838 (java_parser_context_restore_global): Pop extra pushed ctxp only
18839 when there's nothing next.
18840 (maybe_create_class_interface_decl): Fixed comment, add new
18841 created class decl to all_class_list.
18842 (method_header): Use GET_REAL_TYPE on argument's types.
18843 (method_declarator): Use GET_REAL_TYPE, change type to the real
18844 type in TREE_LIST dependency node. Build argument list with the
18846 (create_jdep_list): Use xmalloc. Removed allocation error message.
18847 (obtain_incomplete_type): Fixed leading comment. Broadened
18848 incoming argument meaning.
18849 (register_incomplete_type): Use xmalloc. Removed allocation error
18851 (safe_layout_class): Fixed leading comment.
18852 (jdep_resolve_class): Reversed if statement condition and switch
18853 if and else bodies.
18854 (resolve_and_layout): Fixed leading comment. Broadened incoming
18856 (complete_class_report_errors): New local variable name, for
18857 clarity. purify_type_name used for all error cases.
18858 (java_get_real_method_name): Stricter check on constructors.
18859 (java_check_regular_methods): Reverse methods list only if not
18860 already laid out. Layout artificial constructor.
18861 (java_check_methods): Deleted.
18862 (source_start_java_method): Obtain incomplete type for patchable
18864 (java_layout_classes): Fixed leading comment. Use
18865 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18866 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18867 before returning. Fixed comments.
18868 (java_expand_classes): Check for errors up front.
18869 (patch_method_invocation): Class to search is resolved and laid
18872 1998-11-24 Per Bothner <bothner@cygnus.com>
18874 * expr.c (java_lang_expand_expr): Add missing emit_queue.
18876 * javaop.h (int8): Removed - not used.
18877 (jbyte): Redefine portably with correct signedness.
18879 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
18881 * jcf-write.c (generate_bytecode_insns): Fix typo
18882 OPCODE_getstatic to OPCODE_getfield.
18884 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
18885 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
18886 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18888 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
18890 * jcf-parse.c (jcf_parse_source): Function returned type is
18891 void. Added prototype.
18892 (jcf_parse): Function returned type is void.
18893 (yyparse): Remove call to fclose on the last parsed file.
18895 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18897 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
18899 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18900 (layout_class): Cope with methods featuring WFL in decl names.
18901 * decl.c (unqualified_object_id_node): New global variable,
18903 (build_decl_no_layout): Removed.
18904 * expr.c (build_primtype_type_ref): Handle Double.
18905 (java_lang_expand_expr): Fixed indentations.
18906 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18907 (flag_wall, flag_redundant, flag_not_overriding,
18908 flag_static_local_jdk1_1, unqualified_object_id_node): Global
18909 variable declarations.
18910 (build_decl_no_layout): Removed prototype.
18911 (java_get_real_method_name): Added prototype.
18912 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18913 (java_parse_abort_on_error): Macro now just returns.
18914 * jcf-parse.c (jcf_parse_source): Check fclose returned
18915 value. Call emit_register_classes if java_report_errors returns
18917 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18918 flag_static_local_jdk1_1): New integer flags.
18919 (lang_decode_option): New flags set here.
18920 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18921 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18922 the flag_redundant variable.
18923 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18924 when parsing java.lang.Object class.
18925 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18926 NULL_TREE to build.
18927 (resolve_qualified_expression_name): Fixed indentation.
18928 (patch_array_ref): Changed prototype.
18929 (not_initialized_as_it_should_p): Prototype removed.
18930 (java_report_errors): Added function prototype.
18931 * parse.y (formal_parameter:): Changed error message for not yet
18932 supported final parameters.
18933 (class_type_list:): Set both PURPOSE and VALUE of created
18934 TREE_LIST to be class_type.
18935 (primary_no_new_array:): Handle class literals on primitive types.
18936 (parse_warning_context): Reinstalled correct force_error and
18937 do_warning flags setups.
18938 (java_report_errors): Changed prototype. Return java_error_count
18940 (variable_redefinition_error): Consider treating variable type as
18942 (create_interface): Warn about redundant abstract modifier if
18943 flag_redundant is set. Changed error message.
18944 (lookup_field_wrapper): Save/restore globals before/after looking
18946 (duplicate_declaration_error_p): Consider treating declaration
18947 type as a fake pointer.
18948 (register_fields): Extract real type from dependency node. Check
18949 for duplicate field declaration after type adjustment. Use
18950 DECL_INITIAL to store static final initialized values.
18951 (method_header): Extract real function type from dependency node.
18952 (check_abstract_method_header): Use GET_METHOD_NAME.
18953 (obtain_incomplete_type): Layout fake pointer type.
18954 (safe_layout_class): Don't try to check for methods before layout.
18955 (java_complete_class): Don't check for correct throws clause
18956 elements inheritance here.
18957 (resolve_and_layout): Broadened name parameter meaning.
18958 (reset_method_name): Use GET_METHOD_NAME.
18959 (java_get_real_method_name): New function.
18960 (java_check_regular_methods): Don't check methods in
18961 java.lang.Object. Verify lineage of throws clause elements. Use
18962 flag_no_overriding in warning report.
18963 (check_throws_clauses): Don't check if class was from
18964 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18965 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18966 (declare_local_variables): Use flag_static_local_jdk1_1 to report
18967 warning on unsupported final local variables. Use build_decl
18968 instead of build_decl_no_layout. Get real local variable type from
18970 (source_start_java_method): Get real parameter type from
18971 dependency node. Call build_decl instead of build_decl_no_layout.
18972 (java_layout_classes): Reverse tree and layout type and class as
18973 required. Mark class as loaded when done.
18974 (resolve_field_access): Fixed indentation. Restricted condition
18975 leading to static field access code generation. Set field_type
18976 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18977 (resolve_qualified_expression_name): Initialize type_found to
18978 null. Handle static field resolved during qualification. Fixed
18979 layout on non primitive field decl types.
18980 (not_accessible_p): Fixed typo in comment.
18981 (patch_method_invocation): Resolve and layout class to search from
18983 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18984 layout non primitive type, if necessary. Make method node only to
18986 (find_applicable_accessible_methods_list): Consider WFL'ed method
18987 decl names. Fixed indentation.
18988 (argument_types_convertible): Resolve and layout target type if
18990 (java_complete_tree): Fixed indentation problems. Rewrote
18991 CALL_EXPR thrown exceptions check. Re-installed further processing
18992 of the assignment in certain cases.
18993 (patch_assignment): Call maybe_build_primttype_type_ref to perform
18994 inlining on class literals.
18995 (valid_builtin_assignconv_identity_widening_p): Cope with constant
18997 (valid_method_invocation_conversion_p): Likewise.
18998 (patch_string): Temporary disable forbidden use of `this' in
18999 explicit constructor invocations when doing string concatenation
19000 within their scope.
19001 (patch_unaryop): Added comment. Reinstalled code to disable
19002 further check on assignment operation with cast expression RHS.
19003 (patch_switch_statement): Fixed indentation.
19004 (build_try_statement): Call build_decl instead of
19005 build_decl_no_layout.
19006 (patch_synchronized_statement): Likewise.
19007 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
19008 IS_UNCHECKED_EXPRESSION_P.
19009 (check_thrown_exceptions_do): Changed leading comment. Resolve and
19010 layout argument exception type.
19011 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
19012 of IS_UNCHECKED_EXPRESSION_P.
19014 1998-11-18 Anthony Green <green@cygnus.com>
19016 * jcf-parse.c (yyparse): Open class file in binary mode.
19018 1998-11-15 Per Bothner <bothner@cygnus.com>
19020 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
19022 * jcf-write.c (perform_relocations): Move check out one loop.
19024 1998-11-15 Anthony Green <green@hoser.cygnus.com>
19026 * Make-lang.in: Fix reference to srcdir.
19027 * jv-scan.c: Add missing xmalloc prototype.
19028 * jvgenmain.c: Ditto.
19030 1998-11-15 Per Bothner <bothner@cygnus.com>
19032 * decl.c (error_mark_node), java-tree.h: New global.
19033 * parse.y: Use empty_stmt_node instead of size_zero_node.
19034 (build_if_else_statement): If missing else, use empty_stmt_node.
19036 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
19037 (java_complete_expand_method): Complain if return is missing.
19038 (java_check_regular_methods): Comment out incorrect error check.
19039 (not_accessible_p): Fix incorrect handling of protected methods.
19040 (patch_method_invocation): Pass correct context to not_accessible_p.
19041 (find_applicable_accessible_methods_list): Likewise.
19042 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
19043 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
19044 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
19045 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
19047 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
19048 (push_int_const): Remove reundant NOTE_PUSH.
19049 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
19050 (- case SWITCH_EXPR): Fix code generation bug.
19051 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
19052 (generate_classfile): More robust for abstract methods.
19054 1998-11-15 Anthony Green <green@cygnus.com>
19056 * Makefile.in: jv-scan and jvgenmain all require libiberty.
19057 * Make-lang.in: Ditto.
19059 * jv-scan.c: Remove xmalloc and xstrdup definitions.
19060 * jvgenmain: Ditto.
19062 1998-11-15 Per Bothner <bothner@cygnus.com>
19064 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
19066 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
19068 1998-11-14 Per Bothner <bothner@cygnus.com>
19070 Allow uses of interface types to verify. This is not really
19071 type-safe, but it matches what Sun does, and is OK as long as
19072 there are appropriate run-time checks.
19073 * verify.c (merge_types): If merging two interface types,
19074 just set the result to java.lang.Object.
19075 * expr.c (pop_type): Any interface is matches by java.lang.Object.
19077 1998-11-13 Tom Tromey <tromey@cygnus.com>
19079 * gjavah.c (main): Handle --output-class-directory argument.
19080 * jvspec.c (lang_specific_driver): Translate `-d' into
19081 -foutput-class-dir.
19082 * jcf.h (jcf_write_base_directory): Declare.
19083 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
19084 * lang-options.h: Mention -foutput-class-dir.
19085 * jcf-write.c (jcf_write_base_directory): New global.
19086 (make_class_file_name): Put generated .class file into `-d'
19087 directory, or into source directory if -d not given. Function now
19089 (write_classfile): Free class file name. Handle case where class
19091 (DIR_SEPARATOR): New macro.
19092 Include <sys/stat.h>
19094 * Makefile.in (prefix): New macro.
19096 1998-11-12 Per Bothner <bothner@cygnus.com>
19098 * parse.y (patch_invoke): Do less if flag_emit_class_files.
19099 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
19100 here (done in patch_invoke instead).
19101 (case_identity): Moved here from parse.y.
19103 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
19104 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
19105 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
19106 so they can be efficiently scanned without recursion.
19107 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
19108 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
19109 in BLOCK iteratively, rather than recursively.
19111 * parse.y (do_unary_numeric_promotion): New function.
19112 (patch_unaryop, patch_binop, patch_array_ref): Use it.
19114 * parse.y (patch_newarray): Various fixes.
19116 Re-do handling of switch statements (for proper block scoping).
19117 * parse.y: Add just a single block for the enture switch block,
19118 but don't create any "case blocks".
19119 (group_of_labels): Rmeoved unneeded non-terminal.
19120 CASE_EXPR and DEFAULT_EXPR are added to current block.
19121 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
19122 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
19123 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
19124 * parse.y (wfl_operator, print_int_node): Make non-static.
19125 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
19126 as part of recursive scan of block.
19127 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
19128 (patch_switch_statement): Most tests move dinto java_complete_tree.
19130 * parse.y: Make various production be non-typed (void).
19131 * parse.y (parse_error): Merged into issue_warning_error_from_context.
19132 * parse.y (add_stmt_to_compound): Don't create/change extra node.
19133 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
19135 * jcf-write.c (struct jcf_handler): New type.
19136 (struct jcf_switch_state): New type.
19137 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
19138 (alloc_handler, emit_unop, emit_reloc): New functions.
19139 (adjust_typed_op): Add extra parameter ("max type" offset).
19140 (emit_switch_reloc, emit_case-reloc): New function.
19141 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
19142 (generate_bytecode_insns): Support REAL_CST, switch statements,
19143 exception handling, method calls, object/array creation, and more.
19145 * class.c: Remove some unused variables.
19146 * constants.c (find_string_constant): New function.
19147 (count_constant_pool_bytes): Fix to correctly handle wide constants.
19148 * decl.c (complete_start_java_method): Don't _Jv_InitClass
19149 if flag_emit_class_files.
19151 1998-11-12 Tom Tromey <tromey@cygnus.com>
19153 * jcf-io.c (find_class): Added explanatory comment.
19155 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
19156 trailing slash to `.zip' entries.
19158 * jvspec.c (lang_specific_driver): Correctly handle case where
19159 GC_NAME not defined.
19161 1998-11-11 Tom Tromey <tromey@cygnus.com>
19163 * jvspec.c (GC_NAME): New define.
19164 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
19166 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
19168 1998-11-11 Per Bothner <bothner@cygnus.com>
19170 * jcf-dump.c (TABLE_SWITCH): Fix typos.
19172 1998-11-11 Tom Tromey <tromey@cygnus.com>
19174 * jcf-dump.c (main): Correctly recognize `--'-style long options.
19176 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
19178 * class.c (is_compiled_class): Call safe_layout_class for class
19179 compiled from source.
19180 * conver.h (convert_to_integer, convert_to_real,
19181 convert_to_pointer): Added prototypes.
19182 * decl.c (init_decl_processing): Non longer push the decls of
19183 `methodtable', `constants', `Class', `Field', `dispatchTable'
19184 `jexception' and `Method'.
19185 * expr.c (build_invokeinterface): New function.
19186 (expand_invoke): static variable CLASS_IDENT now in
19187 build_invokeinterface. Use build_invokeinterface.
19188 (expand_java_field_op): Moved code to inline
19189 java.lang.PRIMTYPE.TYPE into a function.
19190 (build_primtype_type_ref): New function.
19191 * java-tree.def (INSTANCEOF_EXPR): New tree code.
19192 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
19193 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
19194 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
19195 (DECL_LOCAL_STATIC_VALUE): New macro.
19196 (build_invokeinterface, build_primtype_type_ref): New function
19198 (java_parse_abort_on_error): Macro rewritten.
19199 * jcf-parse.c (current_method): Add comment to declaration.
19200 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
19201 Function prototypes fixed.
19202 (jcf_parse_source): push/pop parser context. save/restore global.
19203 (parse_source_file): Fixed leading comment. Now take a
19204 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
19205 classes and pop the parser context anymore.
19206 (yyparse): Push parser context, save globals, parse the source
19207 file, restore globals and pop the parser context when processing a
19209 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
19210 * lex.c (java_parse_doc_section): New function.
19211 (java_lex): Call java_parse_doc_section when appropriate. Build an
19212 operator around INSTANCEOF_TK.
19213 * lex.h (java_lineterminator, java_sprint_unicode,
19214 java_unicode_2_utf8, java_lex_error, java_store_unicode):
19215 Prototypes rewritten.
19216 (java_parse_escape_sequence, java_letter_or_digit_p,
19217 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
19218 java_read_unicode, java_store_unicode, java_read_char,
19219 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
19220 Added function prototypes.
19221 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
19223 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
19225 (struct parser_ctxt): New fields: deprecated,
19226 current_parsed_class_un, gclass_list.
19227 (fix_method_argument_names, issue_warning_error_from_context,
19228 resolve_package, lookup_package_type): New function prototypes.
19229 (resolve_expression_name): Fixed function prototype.
19230 (find_applicable_accessible_methods_list): Fixed indentation, added
19231 extra argument in prototype.
19232 (check_final_assignment, build_null_of_type, check_deprecation,
19233 check_method_redefinition, reset_method_name,
19234 java_check_regular_methods, java_check_abstract_methods,
19235 maybe_build_primttype_type_ref): New function prototype.
19236 * parse.y (conver.h): Include.
19237 (INSTANCEOF_TK): Tagged <operator>.
19238 (single_type_import_declaration): Use REGISTER_IMPORT macro.
19239 (relational_expression:): Build binop for instanceof.
19240 (java_push_parser_context): Remember ctxp->gclass_list across
19242 (java_pop_parser_context): Simply return if no context
19243 exists. Remember gclass_list across contexts.
19244 (issue_warning_error_from_context): New function.
19245 (parse_error_context): Don't setup ctxp->elc here. Call
19246 issue_warning_error_from_context instead.
19247 (parse_warning_context): Likewise.
19248 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
19249 setup. Link new class/interface to ctxp->gclass_list.
19250 (add_superinterfaces): Register interface as incomplete if not
19252 (create_class): Remember class unqualified name in
19253 ctxp->current_parsed_class_un. Check class deprecation.
19254 (register_fields): Check field deprecation. Remember static final
19255 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
19257 (method_header): New local variable ORIG_ARG. Use unqualified
19258 current class name for check on constructor errors. Promote return
19259 type if of record type. Argument list fix moved in
19260 fix_method_argument_names, called here. Check method deprecation.
19261 (fix_method_argument_names): New function.
19262 (method_declarator): Promote record typed arguments.
19263 (safe_layout_class): Check class methods before layout.
19264 (java_complete_class): Compute field layout when patched.
19265 (do_resolve_class): Try to load class after having it renamed
19266 after the package name.
19267 (get_printable_method_name): Use DECL_CONTEXT.
19268 (reset_method_name): New function.
19269 (check_method_redefinition): Use reset_method_name.
19270 (java_check_regular_methods): New local variable
19271 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
19272 names for error report. Check for compile-time error when method
19273 found has default (package) access.
19274 (java_check_abstract_methods): Now takes an interface DECL node as
19275 an argument. Also reinstall real name on unchecked
19276 overriding/hiding methods for error report.
19277 (java_check_methods): Fixed leading comment. Get classes to verify
19278 from ctxp->gclass_list. Use CHECK_METHODS macro and set
19279 CLASS_METHOD_CHECKED_P on class verification.
19280 (lookup_java_method2): Get real method name if necessary.
19281 (find_in_imports): Don't check package class access here.
19282 (resolve_package, lookup_package_type): New functions.
19283 (java_layout_classes): Fixed leading comment. Take classes to be
19284 laid out from ctxp->gclass_list.
19285 (java_complete_expand_methods): Don't expand native and abstract
19287 (java_expand_classes): New function.
19288 (resolve_expression_name): Use additional argument ORIG. Retrieve
19289 values of static final field of primitive types.
19290 (resolve_field_access): Handles static final field of promotive
19292 (resolve_qualified_expression_name): Handle STRING_CST as
19293 primaries and package name resolution. Check deprecation on found
19294 decls. Set where_found and type_found on non static field resolved
19295 during qualification. Layout non primitive field decl types.
19296 (check_deprecation): New function.
19297 (maybe_access_field): Simplified.
19298 (patch_method_invocation_stmt): Local variable CLASS_TYPE
19299 removed. Reverse method's argument when primary is a type. Don't
19300 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
19301 instead. Include abstract class in the list of class searchable
19302 for constructors. Use DECL_CONTEXT of found method for access
19303 checks. Check method deprecation.
19304 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
19305 converting arguments. Handle INVOKE_INTERFACE.
19306 (lookup_method_invoke): Search constructor using existing
19307 infrastructure (don't rely on lookup_java_constructor anymore).
19308 (find_applicable_accessible_methods_list): Extra argument flag
19309 LC. Now include constructor in the search.
19310 (qualify_ambiguous_name): Conditional expression are primaries.
19311 (not_initialized_as_it_should_p): static final are always
19313 (java_complete_tree): Pass extra NULL argument to
19314 resolve_expression_name. Stricter test to carry on patching
19315 assignments. New case for INSTANCEOF_EXPR.
19316 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
19317 (check_final_assignment, maybe_build_primttype_type_ref): New
19319 (patch_assignment): Detect resolved static finals and carry normal
19320 assignment error check on them. Inline PRIMTYPE.TYPE read access.
19321 (try_builtin_assignconv): Access constant 0 on all primitive
19323 (valid_builtin_assignconv_identity_widening_p): Accept identical
19324 types. Accept all promoted type on int type.
19325 (valid_ref_assignconv_cast_p): Accept a null pointer to be
19326 assigned to a reference.
19327 (valid_method_invocation_conversion_p): Accept to check null
19329 (build_binop): Merge declaration and initialization of local
19331 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
19332 numeric types. Improved validity test for qualify operators on
19334 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
19335 and PREINCREMENT_EXPR. Also detect resolved static finals of a
19336 primitive type and issue the appropriate error message.
19337 (resolve_type_during_patch): Mark class loaded when resolved.
19338 (patch_cast): Allow null to be cased to reference types.
19339 (build_null_of_type): New function.
19340 (patch_array_ref): Handle array on references correctly.
19341 (patch_return): Removed unused local variable MODIFY. Force
19342 boolean to be returned as integers. Allows null to be returned by
19343 a function returning a reference.
19344 * typeck.c (convert_to_integer, convert_to_real,
19345 convert_to_pointer): Prototypes moved to convert.h
19346 (lookup_argument_method): Use method real name, if necessary.
19348 1998-10-30 Tom Tromey <tromey@cygnus.com>
19350 * class.c (build_class_ref): Changed name of primitive classes to
19353 * class.c (make_class_data): Renamed fields: nmethods to
19354 method_count, method_count to dtable_method_count. Always set
19355 `state' field to 0.
19356 * decl.c (init_decl_processing): Likewise.
19358 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
19360 * class.c (layout_class): Don't mangle <finit>, produce
19361 __finit<class> instead. Don't verify artificial methods.
19362 * decl.c (finit_identifier_node): New declared global.
19363 (init_decl_processing): finit_identifier_node initialized.
19364 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
19365 * java-tree.h (finit_identifier_node): Declared as extern.
19366 (struct lang_decl): New field called_constructor.
19367 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
19368 (CLASS_HAS_FINIT_P): New macro.
19369 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
19370 explicit constructor invocation.
19371 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
19372 CALL_SUPER_CONSTRUCTOR_P): New macros.
19373 (write_classfile): Added prototype.
19374 * jcf-parse.c (jcf_parse_source): Parse and remember for
19375 generation if the file was seen on the command line.
19376 (parse_source_file): Don't write the class file here.
19377 (yyparse): Loop on files rewritten. Set current_jcf.
19378 (parse_zip_file_entries): Parse class file only if it was found.
19379 * lang.c (init_parse): Don't open command line provided filename
19381 (lang_parse): Don't set main_jcf anymore.
19382 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
19383 (JCONSTRUCTOR_CHECK): New macro.
19384 (JBSC_TYPE_P): New macro.
19385 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
19386 (COMPLETE_CHECK_OP_2): New macro.
19387 (struct parse_ctxt): New field explicit_constructor_p.
19388 (check_class_interface_creation): Fixed prototype indentation.
19389 (patch_method_invocation_stmt): Prototype reflects added argument.
19390 (patch_invoke): Likewise.
19391 (complete_method_declaration, build_super_invocation,
19392 verify_constructor_circularity,
19393 build_this_super_qualified_invocation, get_printable_method_name,
19394 patch_conditional_expr, maybe_generate_finit, fix_constructors,
19395 verify_constructor_super, create_artificial_method,
19396 start_artificial_method_body, end_artificial_method_body,
19397 generate_field_initialization_code): New function prototypes.
19398 * parse.y: Fixed leading comment
19399 (constructor_header:, constructor_body:, block_end:): Rules tagged
19401 (type_declaration:): Call maybe_generate_finit.
19402 (method_declaration:): Action for method_body: placed in new
19403 function complete_method_declaration, called here.
19404 (constructor_declaration:): Defined actions. Removed leading
19406 (constructor_header:): New rule with action.
19407 (constructor_body:): Rule rewritten using block_begin: and
19408 block_end:. Defined actions.
19409 (constructor_declarator:, explicit_constructor_invocation:):
19411 (block:): Use new rules block_begin: block_end:.
19412 (block_begin:, block_end:): New rules and actions.
19413 (block_statements:): Fixed error message for explicit
19415 (method_invocation:): Call build_this_super_qualified_invocation
19416 if primary is `this' or `super' was seen.
19417 (conditional_expression:): Action defined.
19418 (extra_ctxp_pushed_p): New static global flag.
19419 (java_parser_context_save_global): Create parser context if
19420 necessary. Use extra_ctxp_pushed_p to remember it.
19421 (java_parser_context_restore_global): Pop extra parser context if
19423 (build_array_from_name): Array on primitive types are marked
19425 (register_fields): Restore new name in field initializer
19426 expression if type was altered. Non static fields initialized upon
19427 declaration marked initialized.
19428 (maybe_generate_finit): New function.
19429 (maybe_generate_clinit): Use create_artificial_method,
19430 start_artificial_method_body, end_artificial_method_body. Generate
19431 debug info for enclosed initialization statements.
19432 (method_header): Fixed leading comment. Check constructor
19433 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
19435 (complete_method_declaration, constructor_circularity_msg,
19436 verify_constructor_circularity): New functions.
19437 (get_printable_method_name): New function.
19438 (check_method_redefinition): Don't rename <finit> methods. Fix
19439 declared constructor names. Error message for
19440 constructors modified.
19441 (java_check_regular_methods): Local variable seen_constructor
19442 renamed saw_constructor. Skip verification on constructors. Create
19443 default constructor with create_artificial_method.
19444 (java_check_methods): Removed unnecessary empty line.
19445 (create_artificial_method, start_artificial_method_body,
19446 end_artificial_method_body): New functions.
19447 (java_layout_classes): Changed leading comment. Reverse fields
19448 list if necessary. Always layout java.lang.Object if being
19450 (java_complete_expand_methods): Verify constructor circularity.
19451 (java_complete_expand_method): Call fix_constructor on
19452 constructors. Local variable no_ac_found removed. Restore
19453 bindings if method body expansion failed.
19454 (fix_constructors, verify_constructor_super,
19455 generate_field_initialization_code): New function.
19456 (java_expand_classes): Fixed leading comment. Write class file
19458 (resolve_expression_name): Check for illegal instance variable
19459 usage within the argument scope of an explicit constructor
19461 (resolve_qualified_expression_name): Pass extra from_super flag
19462 when invoking patch_method_invocation_stmt. New case for
19463 conditional expression when used as a primary. Check for error
19464 when acquiring super.
19465 (patch_method_invocation_stmt): Added extra argument super. New
19466 local variable is_static_flag. Set class_to_search according to
19467 the nature of the constructor invocation. Don't add `this'
19468 argument when expanding NEW_CLASS_EXPR. Check for illegal method
19469 invocation within the argument scope of explicit constructor
19470 invocation. Set is_static according to is_static_flag. Provide
19471 extra `super' argument to patch_invoke invocation.
19472 (patch_invoke): New argument from_super. Loop on arguments
19473 indentation fixed. Pass from_super to invocation_mode. New switch
19474 case INVOKE_SUPER. Fixed error message in switch default case.
19475 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
19477 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
19478 (lookup_method_invoke): Fixed prototypes in candidates list. Error
19479 message takes constructors into account.
19480 (find_applicable_accessible_methods_list): Fixed indentation.
19481 (qualify_ambiguous_name): Take explicit constructor invocation
19482 into account. Deal with a conditional expression as a primary to
19484 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
19485 case. Added extra argument to patch_method_invocation_stmt.
19486 Register calls made to explicit constructor `this'. Don't call
19487 save_expr in ARRAY_REF case when emitting class files. Check for
19488 illegal use of this when expanding explicit constructor invocation
19490 (complete_function_arguments): Set and reset parser context
19491 explicit_constructor_p field value when appropriate.
19492 (build_super_invocation, build_this_super_qualified_invocation):
19494 (patch_assignment): Fixed typo.
19495 (patch_unaryop): Check on final fields occurs only when a decl
19497 (patch_return): Take constructors into account.
19498 (patch_conditional_expr): New function.
19499 * typeck.c (build_java_signature): Removed unnecessary empty line.
19501 1998-10-28 Jeffrey A Law (law@cygnus.com)
19503 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
19505 1998-10-28 Tom Tromey <tromey@cygnus.com>
19507 * decl.c (init_decl_processing): Renamed fields.
19508 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
19509 interface_len, msize fields.
19511 * class.c (make_class_data): Removed subclass_head and
19512 subclass_next fields.
19513 * decl.c (init_decl_processing): Removed subclass_head and
19514 subclass_next fields.
19516 1998-10-28 Jeffrey A Law (law@cygnus.com)
19518 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
19519 * mangle.c (emit_unicode_mangled_name): Similarly.
19521 1998-10-26 Nick Clifton <nickc@cygnus.com>
19523 * jcf-parse.c (get_constant): Place braces around code to compute
19524 'd' when REAL_ARITHMETIC is not defined.
19526 1998-10-25 H.J. Lu (hjl@gnu.org)
19528 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
19531 1998-10-23 Tom Tromey <tromey@cygnus.com>
19533 * lang-specs.h: `.zip' files are input to jc1.
19535 1998-10-22 Per Bothner <bothner@cygnus.com>
19537 * jvspecs.c: Add (but don't enable) support for combining multiple
19538 .class and .java input filenames to a single jc1 invocation.
19539 Add support for -C flag (copile to .class files).
19540 Translate -classpath and -CLASSPATH arguments.
19541 * lang-specs.h: Don't set %2 spec.
19543 1998-10-22 Tom Tromey <tromey@cygnus.com>
19545 * jcf-path.c (add_entry): Don't add trailing separator if entry is
19547 (add_path): Don't add trailing separator to non-empty path
19550 * lang.c (lang_decode_option): Check for -fclasspath and
19551 -fCLASSPATH before examining other `-f' options.
19553 * java-tree.h (finalize_identifier_node): Don't declare.
19554 * class.c (make_class_data): Don't push "final" field.
19555 * decl.c (init_decl_processing): Don't push "final" field.
19556 (finalize_identifier_node): Removed.
19557 (init_decl_processing): Don't set finalize_identifier_node.
19559 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
19561 1998-10-11 Anthony Green <green@cygnus.com>
19563 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
19564 (JV_SCAN_SOURCES): New macro.
19565 (JCF_DUMP_SOURCES): Likewise.
19566 (jcf-dump$(exeext)): New target.
19567 (jv-scan$(exeext)): New target.
19569 1998-10-22 Tom Tromey <tromey@cygnus.com>
19571 * Makefile.in (LEX): Removed.
19572 (LEXFLAGS): Likewise.
19573 (SET_BISON): New macro.
19575 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
19576 spurious diffs in parse.c.
19577 ($(PARSE_SCAN_C)): Likewise.
19578 (PARSE_DIR): New macro.
19580 (PARSE_SCAN_C): Likewise.
19581 (PARSE_RELDIR): New macro.
19583 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
19585 * jcf-io.c (find_class): Use saw_java_source to determine when to
19586 look for `.java' file.
19587 * jcf-parse.c (saw_java_source): New global.
19588 (yyparse): Set it if `.java' file seen.
19590 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
19591 (GCJH_SOURCES): Likewise.
19592 * Makefile.in (datadir): New macro.
19593 (libjava_zip): Likewise.
19594 (JAVA_OBJS): Added jcf-path.o.
19595 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19596 (../gcjh$(exeext)): Likewise.
19597 (jcf-path.o): New target.
19598 * java-tree.h (fix_classpath): Removed decl.
19599 * jcf-parse.c (fix_classpath): Removed.
19600 (load_class): Don't call fix_classpath.
19601 * parse.y (read_import_dir): Don't call fix_classpath.
19602 * lex.h: Don't mention classpath.
19603 * lex.c (java_init_lex): Don't initialize classpath.
19604 * jcf-io.c (classpath): Removed global.
19605 (find_class): Use jcf_path iteration functions. Correctly search
19606 class path for .java file.
19607 (open_in_zip): New argument `is_system'.
19608 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
19609 classpath-related options.
19610 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
19612 (lang_init): Call jcf_path_init.
19613 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
19614 * lang-specs.h: Handle -I. Minor cleanup to -M options.
19615 Correctly put braces around second string in each entry.
19616 * gjavah.c (main): Call jcf_path_init. Recognize all the new
19617 classpath-related options.
19618 (help): Updated for new options.
19619 * jcf.h: Declare functions from jcf-path.c. Don't mention
19620 `classpath' global.
19621 * jcf-path.c: New file.
19623 * jcf-depend.c: Include jcf.h.
19625 * jcf-write.c (localvar_alloc): Returns `void'.
19626 (localvar_free): Removed unused variable.
19628 * lang.c (OBJECT_SUFFIX): Define if not already defined.
19629 (init_parse): Use OBJECT_SUFFIX, not ".o".
19631 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
19633 * class.c (emit_register_classes): Renamed from
19634 emit_register_class.
19635 * java-tree.h (emit_register_classes): Prototype renamed from
19636 emit_register_class.
19637 * jcf-parse.c (yyparse): Call emit_register_classes once before
19639 * parse.y (java_expand_classes): No longer register classes.
19641 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
19643 * class.c (is_compiled_class): New local variable
19644 seen_in_zip. Identify classes found in currently compiled source
19646 * decl.c (complete_start_java_method): Fixed typo.
19647 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
19648 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
19649 (CLASS_P): Moved around.
19650 (java_parse_abort_on_error): Macro moved from jcf-parse.c
19651 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
19653 (jcf_parse_source): Changed leading comment. Removed unnecessary
19654 fclose and CLASS_FROM_SOURCE_P marking.
19655 (parse_source_file): New local variables remember_for_generation
19656 and filename. Mark parsed file name identifier node. Removed block
19657 executed when parse_only was null. Set remember_for_generation.
19658 Use it as an argument to java_pop_parser_context.
19659 (yyparse): New local variables several_files, list, next node and
19660 current_file_list. Split ampersand separated file names into
19661 current_file_list. Iterate through the list and parse accordingly.
19662 * parse.h (java_pop_parser_context): New function prototype.
19663 * parse.y (ctxp_for_generation): New static global variable.
19664 (java_pop_parser_context): New argument generate. Link popped ctxp
19665 to ctxp_for_generation list accordingly.
19666 (java_complete_expand_methods): Fixed indentation.
19667 (java_expand_classes): New function.
19669 1998-10-17 Per Bothner <bothner@cygnus.com>
19671 * Makefile.in: Link with libiberty.a instead of memmove.o.
19673 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
19675 * lex.c (setjmp.h): No longer included.
19676 * lex.h (setjmp.h): Included.
19677 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19678 (duplicate_declaration_error_p): Renamed from
19679 duplicate_declaration_error.
19680 (build_array_from_name): New function prototype.
19681 * parse.y (setjmp.h): No longer included.
19682 (variable_declarator_id): Define action.
19683 (build_array_from_name): New function.
19684 (duplicate_declaration_error_p): Renamed from
19685 duplicate_declaration_error. Fixed leading comment.
19686 (register_fields): Main `for' loop reorganized. Uses
19687 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19688 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19689 build_array_from_name.
19690 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19692 (read_import_dir): Don't try to skip `.' and `..'.
19693 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19694 build_array_from_name. Main `for' loop reorganized.
19695 (resolve_qualified_expression_name): When building access to a
19696 field, use the type where the field was found, not its own type.
19697 (maybe_access_field): Use field DECL_CONTEXT if the type where the
19698 field was found is null.
19699 (qualify_ambiguous_name): Sweep through all successive array
19702 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
19704 * java-tree.h (pop_labeled_block, lang_printable_name,
19705 maybe_add_interface, set_super_info, get_access_flags_from_decl,
19706 interface_of_p, inherits_from_p, fix_classpath,
19707 complete_start_java_method, emit_handlers, init_outgoing_cpool,
19708 make_class_data, register_class, alloc_name_constant): New
19709 function prototypes.
19710 * lang.c (lang_decode_option): Set argc argument unused. Fixed
19711 indentation. Added cast to remove warning.
19712 (lang_printable_name): Set v argument unused.
19713 (lang_print_error): Added argument to lang_printable_name call.
19714 (java_dummy_print, print_lang_decl, print_lang_type,
19715 print_lang_identifier, lang_print_xnode): All argument marked
19717 * lex.c (java_unget_unicode): Removed unnecessary argument.
19718 (java_allocate_new_line): Unused local variable is gone.
19719 (java_read_char): Added parenthesis in expressions to remove
19720 warnings. Added final return statement.
19721 (java_read_unicode): Added parenthesis in expression to remove
19723 (java_parse_end_comment): Fixed java_unget_unicode invocation.
19724 (java_parse_escape_sequence): Likewise.
19725 (java_lex): Unused local variables are gone. Fixed
19726 java_unget_unicode invocation.
19727 * lex.h (set_float_handler): Prototype added when JC1_LITE not
19729 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19730 lang_printable_name invocation in macro.
19731 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19733 (duplicate_declaration_error): Suppressed unused argument in
19735 (identical_subpath_p): Function declaration is gone.
19736 (patch_invoke): Suppressed unused argument in prototype.
19737 (patch_cast, build_labeled_block, check_thrown_exceptions):
19739 * parse.y (setjmp.h): Included
19740 (toplev.h): Likewise.
19741 (field_declaration:): Suppressed unused local
19742 (label_decl:): Fixed build_labeled_block invocation.
19743 (java_pop_parser_context): Put extra parenthesis around assignment
19745 (yyerror): Suppressed unused local variables.
19746 (variable_redefinition_error): Fixed lang_printable_name
19748 (create_interface): Suppressed unused local variables.
19749 (create_class): Likewise.
19750 (duplicate_declaration_error): Suppressed unused argument. Fixed
19751 lang_printable_name invocation.
19752 (register_fields): Suppressed unused local variable. Fixed
19753 duplicate_declaration_error invocation.
19754 (method_header): Suppressed unused local variable.
19755 (method_declarator, parser_check_super): Likewise.
19756 (java_complete_class): Suppressed unused local variable. Fixed
19757 fatal error message.
19758 (complete_class_report_errors): Added default: in switch.
19759 (java_check_regular_methods): Fixed lang_printable_name
19761 (check_throws_clauses): Likewise.
19762 (java_check_abstract_methods): Suppressed unused local
19763 variable. Fixed lang_printable_name invocation.
19764 (read_import_entry): Added supplemental return statement.
19765 (read_import_dir): Suppressed unused local variables.
19766 (check_pkg_class_access, declare_local_variables): Likewise.
19767 (source_start_java_method): Suppressed unused extern variable
19769 (expand_start_java_method): Suppressed unused extern and local
19770 variable declarations.
19771 (java_complete_expand_methods): Likewise.
19772 (java_complete_expand_method): Suppressed unused local variables.
19773 (make_qualified_name): Likewise.
19774 (resolve_qualified_expression_name): Added default: in
19775 switch. Fixed lang_printable_name invocation.
19776 (class_instance_creation_expression): Added parenthesis around
19778 (patch_method_invocation_stmt): Fixed lang_printable_name and
19779 patch_invoke invocations.
19780 (check_for_static_method_reference): Fixed lang_printable_name
19782 (patch_invoke): Suppressed unused arguments and local variables.
19783 (lookup_method_invoke): Suppressed unused local variables.
19784 (qualify_ambiguous_name): Added default: in switch.
19785 (identical_subpath_p): Function removed.
19786 (patch_assignment): Suppressed unused local variables. Suppressed
19787 unnecessary if statement. Fixed lang_printable_name invocations.
19788 (try_builtin_assignconv): Fixed lang_printable_name invocations.
19789 (valid_ref_assignconv_cast_p): Parenthesis around
19790 expression. Suppressed unused local variables.
19791 (build_binop): Suppressed unused local variables. fixed
19792 lang_printable_name invocations.
19793 (string_constant_concatenation): Suppressed unused local
19795 (patch_unaryop): Fixed lang_printable_name invocation.
19796 (patch_cast): Suppressed unnecessary argument. Fixed
19797 lang_printable_name invocation.
19798 (patch_array_ref): Fixed lang_printable_name invocation.
19799 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19800 (build_labeled_block): Suppressed unused argument.
19801 (generate_labeled_block): Fixed build_labeled_block invocation.
19802 (build_loop_body): Suppressed unused local variables.
19803 (patch_loop_statement): Likewise.
19804 (patch_exit): Fixed lang_printable_name invocation.
19805 (patch_switch_statement): Likewise.
19806 (case_identity): First argument marked unused.
19807 (patch_try_statement): Fixed lang_printable_name invocations.
19808 (patch_synchronized_statement, patch_throw_statement): Likewise.
19809 (check_thrown_exceptions): Fixed check_thrown_exceptions and
19810 lang_printable_name invocations.
19811 (check_thrown_exceptions_do): Suppressed unused argument.
19813 1998-10-14 Tom Tromey <tromey@cygnus.com>
19815 * jcf-write.c (write_classfile): Add output class file as target.
19816 * lang-options.h: Added -MD, -MMD, -M, and -MM.
19817 * jcf.h: Added declarations for dependency-tracking functions.
19818 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19819 * lang.c (lang_decode_option): Recognize -MD and -MMD.
19820 (finish_parse): Call jcf_dependency_write.
19821 (dependency_tracking): New global.
19822 (DEPEND_SET_FILE): New define.
19823 (DEPEND_ENABLE): New define.
19824 (init_parse): Enable dependency tracking if required.
19826 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19827 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19828 (../gcjh$(exeext)): Likewise.
19829 (jcf-depend.o): New target.
19830 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19831 (GCJH_SOURCES): Likewise.
19832 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
19834 (find_classfile): Added dep_name argument.
19835 (find_class): Compute name of dependency.
19836 (open_in_zip): Call jcf_dependency_add_file.
19837 * gjavah.c (output_file): No longer global.
19838 (usage): Don't mention "gjavah".
19840 (java_no_argument): Likewise.
19841 (version): Likewise.
19842 (main): Recognize and handle -M family of options.
19843 (print_mangled_classname): Return is void.
19844 (process_file): Handle case where output is suppressed.
19845 (HANDLE_END_FIELD): Likewise.
19846 (HANDLE_METHOD): Likewise.
19847 * jcf-depend.c: New file.
19849 1998-10-13 Jeffrey A Law (law@cygnus.com)
19851 * java-tree.def: Add missing newline at EOF.
19853 1998-10-13 Tom Tromey <tromey@cygnus.com>
19855 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19856 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
19858 Include <config.h> and "system.h".
19859 (disassemble_method): Undefine RET to avoid clash with
19860 config/i386/i386.h.
19862 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
19864 * decl.c (runtime_exception_type_node, error_exception_type_node):
19865 New global variables.
19866 (init_decl_processing): Initialized.
19867 * expr.c (java_lang_expand_expr): Set caught exception type to
19868 null if catch handler argument doesn't exit.
19869 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19871 * java-tree.h (runtime_exception_type_node,
19872 error_exception_type_node): Global variables declared.
19873 (DECL_FUNCTION_THROWS): New macro.
19874 (DECL_FUNCTION_BODY): Modified comment.
19875 (DECL_SPECIFIC_COUNT): Likewise.
19876 (struct lang_decl): New field throws_list.
19877 (IS_UNCHECKED_EXPRESSION_P): New macro.
19878 * lex.c (java_lex): Generate location information for THROW_TK.
19879 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19880 EXCEPTIONS_P): New macros.
19881 (enum jdep_code): New value JDEP_EXCEPTION.
19882 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19883 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19884 PATCH_METHOD_RETURN_ERROR): New macros.
19885 (patch_method_invocation_stmt): Added new argument to prototype.
19886 (patch_synchronized_statement, patch_throw_statement,
19887 check_thrown_exceptions, check_thrown_exceptions_do,
19888 purge_unchecked_exceptions, check_throws_clauses): New function
19890 * parse.y Fixed typo in keyword section.
19891 (throw:): Rule tagged <node>.
19892 (THROW_TK): Keyword tagged <operator>.
19893 (method_header:): Last argument to call to method_header passed
19895 (throws:, class_type_list:, throw_statement:,
19896 synchronized_statement:, synchronized:): Defined actions.
19897 (method_header): New local variable current. Register exceptions
19898 from throws clause.
19899 (java_complete_tree): Complete and verify exceptions from throws
19901 (complete_class_report_errors): Error message on exceptions not
19903 (java_check_regular_methods): Fixed typo. Shortcut on private
19904 overriding methods. Changed error message on method
19905 redefinition. Check for throws clause compatibility.
19906 (check_throws_clauses): New function.
19907 (java_check_abstract_methods): Use DECL_NAME for wfl or current
19908 method. Changed error message on method redefinition.
19909 (currently_caught_type_list): New static variable.
19910 (java_complete_expand_methods): Purge unchecked exceptions from
19911 throws clause list. Call PUSH_EXCEPTIONS before walk and
19912 POP_EXCEPTIONS after.
19913 (resolve_qualified_expression_name): Pass new argument as NULL to
19914 patch_method_invocation_stmt.
19915 (patch_method_invocation_stmt): New argument ref_decl. Invoke
19916 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19917 argument list when appropriate. Use new argument if non null to
19918 store selected method decl.
19919 (patch_invoke): Convert if necessary args of builtin types before
19920 forming CALL_EXPR. Argument list no longer reversed here.
19921 (invocation_mode): Treat final methods as static methods.
19922 (java_complete_tree): New cases for THROW_EXPR: and
19923 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19925 (complete_function_arguments): No more RECORD_TYPE
19926 conversion. Function parameter nodes no longer saved.
19927 (valid_ref_assignconv_cast_p): Avoid handling null type.
19928 (patch_binop): Fixed null constant reference handling.
19929 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19930 BUILD_THROW macros.
19931 (patch_try_statement): Fixed comments. Record caught types in
19932 list, push the list, expand try block and pop the list.
19933 (patch_synchronized_statement, patch_throw_statement,
19934 check_thrown_exceptions, check_thrown_exceptions_do,
19935 purge_unchecked_exceptions): New functions.
19936 * typeck.c (lookup_argument_method): Allow WFL in place of method
19937 DECL_NAME during method definition check
19939 1998-10-09 Tom Tromey <tromey@cygnus.com>
19941 * gjavah.c (decode_signature_piece): New function.
19942 (print_c_decl): Use it. Added `name_override' argument.
19943 (print_method_info): Use name_override argument to print_c_decl.
19944 (seen_fields): Removed.
19945 (print_field_info): Don't update seen_fields.
19946 (struct method_name): New structure.
19947 (method_name_list): New global.
19948 (print_method_info): Add new method to list of methods.
19949 (name_is_method_p): New function.
19950 (print_field_info): If field name has same name as method, then
19952 (process_file): Parse methods before fields.
19953 (field_pass): New global.
19954 (HANDLE_END_FIELD): Take field_pass into account.
19956 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19958 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19959 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19961 1998-10-03 Anthony Green <green@cygnus.com>
19963 * jvspec.c: Fix bug in jvgenmain_spec patch.
19965 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19967 * Makefile.in (lang.o:): Install dependency on java-tree.def.
19968 * decl.c (soft_exceptioninfo_call_node): New global variable.
19969 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19970 takes extra integer argument. soft_exceptioninfo_call_node
19972 * except.c (java_set_exception_lang_code): New function
19973 (method_init_exceptions): Called here.
19974 (prepare_eh_table_type): New function.
19975 (expand_end_java_handler): Called here.
19976 * expr.c (build_java_throw_out_of_bounds_exception): Now features
19977 one argument. Modified generation of call to
19978 soft_badarrayindex_node to use new argument.
19979 (build_java_arrayaccess): Pass faulty index value to
19980 build_java_throw_out_of_bounds_exception.
19981 (generate_name): New function.
19982 (java_lang_expand_expr): New local variables node, current,
19983 has_finally_p. Expand TRY_EXPR node.
19984 (process_jvm_instruction): Replace top of the stack with thrown
19985 object reference when entering exception handler.
19986 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19987 specific tree codes.
19988 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19990 (DECL_SPECIFIC_COUNT): New macro.
19991 (prepare_eh_table_type, java_set_exception_lang_code,
19992 generate_name): New function declarations.
19993 (match_java_method): Declaration deleted.
19994 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19996 * lex.c (TRY_TK, CATCH_TK): Generate location information.
19997 * parse.h (redefinition_error, refine_accessible_methods_list,
19998 can_cast_to_p): Function declaration removed.
19999 (classitf_redefinition_error, variable_redefinition_error,
20000 parse_jdk1_1_error, find_applicable_accessible_methods_list,
20001 find_most_specific_methods_list, argument_types_convertible,
20002 enter_a_block, valid_builtin_assignconv_identity_widening_p,
20003 valid_cast_to_p, valid_method_invocation_conversion_p,
20004 try_reference_assignconv, add_stmt_to_compound,
20005 build_jump_to_finally, build_tree_list, patch_try_statement,
20006 java_get_catch_block): New function declarations.
20007 * parse.y (string_buffer_type): Global variable deleted.
20008 (group_of_labels, catches, catch_clause, catch_clause_parameter,
20009 finally): Rules tagged <node>.
20010 (TRY_TK, CATCH_TK): Token tagged <operator>.
20011 (class_body_declaration:, class_member_declaration:,
20012 formal_parameter:, explicit_constructor_invocation:,
20013 interface_member_declaration:, constant_declaration:,
20014 primary_no_new_array:, class_instance_creation_expression:,
20015 array_creation_expression:): Issue error on unsuported JDK1.1
20017 (try_statement:, catches:, finally:): Define actions.
20018 (catch_clause_parameter): New rule.
20019 (catch_clause:): Use new rule catch_clause_parameter.
20020 (parse_jdk1_1_error): New function.
20021 (redefinition_error): Renamed classitf_redefinition_error.
20022 (variable_redefinition_error): New function.
20023 (check_class_interface_creation): Call
20024 classitf_redefinition_error.
20025 (java_complete_tree): Added error message on JDEP_TYPE: case.
20026 (complete_class_report_errors): Fixed indentation.
20027 (declare_local_variables): Call variable_redefinition_error.
20028 (source_end_java_method): Call java_set_exception_lang_code and
20029 emit_handlers where appropriate.
20030 (java_method_add_stmt): Call add_stmt_to_block.
20031 (add_stmt_to_block): New function.
20032 (lookup_method_invoke): Fixed outside comment. new local variable
20033 candicates. Call find_applicable_accessible_methods_list and
20034 find_most_specific_methods_list when searching for a
20035 method. Modified error report to list possible candidates when
20037 (find_applicable_accessible_methods_list,
20038 find_most_specific_methods_list, argument_types_convertible): New
20040 (refine_accessible_methods_list): Function deleted.
20041 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
20042 expr (if applicable) before calling patch_array_ref.
20043 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
20044 (enter_block): Fixed comment.
20045 (enter_a_block): New function.
20046 (patch_assignment): Reorganized. Call try_reference_assignconv for
20047 references. Call valid_cast_to_p instead of can_cast_to_p.
20048 (try_reference_assignconv,
20049 valid_builtin_assignconv_identity_widening_p): New functions.
20050 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
20051 (valid_cast_to_p, valid_method_invocation_conversion_p): New
20053 (build_string_concatenation): Don't resolve StringBuffer.
20054 (patch_cast): Fixed inverted arguments.
20055 (patch_array_ref): Code to save array expr deleted. Call
20056 valid_cast_to_p instead of can_cast_to_p.
20057 (generate_labeled_block): Call generate_name.
20058 (build_jump_to_finally, build_try_statement, java_get_catch_block,
20059 patch_try_statement): New functions.
20060 * typeck.c (match_java_method): Function deleted.
20062 1998-10-02 Anthony Green <green@cygnus.com>
20064 * jvspec.c: jvgenmain_spec uses different temporary file names.
20066 1998-10-02 Anthony Green <green@cygnus.com>
20068 * jvspec.c (lang_specific_driver): Fail if user specifies
20069 --main= when not linking.
20071 1998-09-28 Tom Tromey <tromey@cygnus.com>
20073 * class.c (make_class_data): Push value for `thread' field.
20074 * decl.c (init_decl_processing): Added `thread' field to class.
20076 * class.c (add_field): Always make static fields externally
20079 1998-09-26 Anthony Green <green@cygnus.com>
20081 * expr.c (build_java_athrow,
20082 build_java_throw_out_of_bounds_exception, expand_invoke,
20083 build_newarray, expand_java_multianewarray, build_java_monitor):
20084 Update comments to reflect _Jv_* function names.
20086 1998-09-25 Per Bothner <bothner@cygnus.com>
20088 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
20089 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
20090 * parse.y (expand_start_java_method): Likewise.
20092 1998-09-24 Per Bothner <bothner@cygnus.com>
20094 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
20096 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
20097 (add_field): No longer need to convert from RECORD_TYPE to pointer,
20098 * expr.c: Remove no-longer-needed calls to promote_type.
20099 * decl.c (give_name_to_locals): Liekwise.
20100 * jcf-parse.c (get_class_constant): Compensate for new signatures.
20101 * parse.y: Add/remove promote_type calls as appropriate.
20102 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
20103 (parse_signature_string): Likewise.
20104 (build_java_array_type): Fix for now signature convenions.
20106 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
20108 1998-09-23 Tom Tromey <tromey@cygnus.com>
20110 * class.c (init_class_processing): libjava function renamed to
20113 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
20115 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
20116 * java-tree.def: Fixed DEFTREECODE third argument.
20117 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
20118 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
20119 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
20120 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20121 JAVA_THIS_EXPR): Now replaced by tree code definitions.
20122 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
20123 * lang.c (java_tree_code_type, java_tree_code_length,
20124 java_tree_code_name): New arrays.
20125 (lang_init): Append Java tree node definitions to Gcc ones.
20126 * lex.c (expression_obstack): Declared as extern when JC1_LITE
20128 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
20130 (java_lex): Allow declaration of empty string constants. Retain
20131 location information on CASE_TK and DEFAULT_TK.
20132 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
20133 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
20134 Modified to be more robust.
20135 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
20136 (build_new_invocation, try_builtin_assignconv,
20137 patch_switch_statement, string_constant_concatenation,
20138 build_string_concatenation, patch_string_cst, patch_string,
20139 java_expand_switch): New function declarations.
20140 * parse.y: Rules related to switch and EH tagged <node>.
20141 (label_id): Set to NULL_TREE
20142 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
20144 (this_or_super:): Fixed indentation.
20145 (statement:, statement_nsi:, statement_without_trailing_substatement:,
20146 statement_expression:): Removed call to RULE on all sub-rules.
20147 (switch_expression:, switch_labels:): New rules.
20148 (switch_statement:, switch_block:, switch_block_statement_groups:,
20149 switch_block_statement_group:, switch_labels:, switch_label:):
20151 (throw_statement:, synchronized_statement:, try_statement:):
20152 Defined temporary actions.
20153 (class_instance_creation_expression:): Call
20154 build_new_invocation. Fixed indentation.
20155 (field_access): Fixed indentation.
20156 (method_invocation): Likewise.
20157 (make_qualified_primary): Use THIS_EXPR.
20158 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
20159 resolving from SUPER, set *type_found.
20160 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
20161 (java_complete_tree): Removed unused local variable `location'. Case
20162 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
20163 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
20164 on MODIFY_EXPR: and all binary operator tree code cases. Removed
20165 STRING_CST: case. default: checks for patchable strings.
20166 (complete_function_arguments): Transform string constant or
20167 crafted StringBuffer if necessary.
20168 (build_method_invocation): Fixed comments.
20169 (build_new_invocation): New function.
20170 (patch_assignment): Call try_builtin_assignconv to figure a valid
20171 assignment conversion between builtin types.
20172 (try_builtin_assignconv): New function.
20173 (build_binop): Use URSHIFT_EXPR directly to call build.
20174 (operator_string): Use UNARY_PLUS_EXPR.
20175 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
20177 (do_merge_string_cste, merge_string_cste,
20178 string_constant_concatenation, build_string_concatenation,
20179 patch_string, patch_string_cst): New function.
20180 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
20181 (patch_unaryop): Likewise. New test of valid ++/-- operands.
20182 (build_newarray_node): Use NEW_ARRAY_EXPR.
20183 (build_this): Use THIS_EXPR.
20184 (build_return): Enable debug information on return statement.
20185 (build_if_else_statement): Likewise.
20186 (complete_labeled_statement): Fixed related comment.
20187 (build_loop_body): Fixed comment.
20188 (build_bc_statement): Enable debug information on break/continue
20190 (patch_bc_statement): Fixed typos. Handle SWITCH statement
20192 (patch_switch_statement, case_identity, java_expand_switch): New
20195 1998-09-21 Per Bothner <bothner@cygnus.com>
20197 * buffer.h (BUFFER_INIT): New macro.
20198 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
20199 Pass (struct jcf_partial *state) to most functions.
20200 (jcf_block, jcf_relocation): New types.
20201 Support labels, branches, conditionals, loops.
20203 1998-09-21 Tom Tromey <tromey@cygnus.com>
20205 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
20207 1998-09-21 Per Bothner <bothner@cygnus.com>
20209 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
20210 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
20211 not integer_type_node (INT_TYPE_SIZ bits).
20213 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
20215 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
20216 * jcf-dump.c (print_exception_table): New function.
20217 (disassemble_method): Better handling of wide instructions.
20218 Make more robust for bad input.
20220 1998-09-30 Jeffrey A Law (law@cygnus.com)
20222 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
20225 1998-09-17 Jeffrey A Law (law@cygnus.com)
20227 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
20229 1998-09-17 Tom Tromey <tromey@cygnus.com>
20231 * Makefile.in ($(PARSE_H)): Removed target.
20233 1998-09-17 Jeffrey A Law (law@cygnus.com)
20235 * Makefile.in (JAVA_OBJS): Add memmove.o
20236 (memmove.o): New target & rules.
20238 1998-09-15 Tom Tromey <tromey@cygnus.com>
20240 * expr.c (expand_invoke): Don't generate a call to the class init
20243 1998-09-14 Jeffrey A Law (law@cygnus.com)
20245 * Makefile.in: Add many missing dependencies.
20246 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
20248 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
20249 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
20251 1998-09-11 Per Bothner <bothner@cygnus.com>
20253 * decl.c (complete_start_java_method): If method is static (and
20254 not private) call _Jv_InitClass.
20255 * expr.c (expand_invoke): Don't call build_class_init.
20257 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
20259 1998-09-10 Jeffrey A Law (law@cygnus.com)
20261 * Make-lang.in (GCJ): Define before using.
20263 1998-09-09 Jeffrey A Law (law@cygnus.com)
20265 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
20266 losing due to namespace pollution in GNU getopt.h
20268 1998-09-09 Tom Tromey <tromey@cygnus.com>
20270 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
20271 (java.all.cross): Likewise.
20272 (java.rest.encap): Likewise.
20274 1998-09-08 Jeffrey A Law (law@cygnus.com)
20276 * gjavah.c (print_class_decls): Fix thinko in arglist
20277 * jcv-io.c (find_classfile): Similarly.
20279 1998-09-07 Jeffrey A Law (law@cygnus.com)
20281 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
20283 1998-09-05 Tom Tromey <tromey@cygnus.com>
20285 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
20286 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
20287 * Makefile.in (PARSE_C): New macro.
20288 (PARSE_H): Likewise.
20289 (PARSE_SCAN_C): Likewise.
20290 ($(PARSE_C)): Target renamed from parse.c.
20291 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
20292 (clean): Remove parse-scan.c as well.
20293 (parse.o): Depend on $(PARSE_C).
20295 1998-09-05 Anthony Green <green@cygnus.com>
20297 * README, license.terms: Removed.
20299 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
20300 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
20301 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
20302 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
20303 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
20304 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
20305 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
20306 and Java trademark attribution.
20308 1998-09-04 Tom Tromey <tromey@cygnus.com>
20310 * Makefile.in: Use gcjh, not gjavah.
20311 * config-lang.in (stagestuff): Use gcjh, not gjavah.
20312 * Make-lang.in: Changed gjavah to gcjh everywhere.
20314 1998-09-03 Per Bothner <bothner@cygnus.com>
20316 * gjavah.c: Support new -prepend -add -append flags.
20317 (print_method_info): Method is not virtual if class is final.
20319 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
20321 * jv-scan.c: Fixed copyright assignment.
20322 * keyword.gperf: Likewise.
20323 * keyword.h: Likewise.
20324 * lex.c: Fixed copyright assignment.
20325 (java_lex): Push unicode back when parsing '<'.
20326 * lex.h: Fixed copyright assignment.
20327 * parse-scan.y: Likewise.
20328 * parse.h: Fixed copyright assignment.
20329 (build_debugable_stmt, complete_for_loop): New function prototypes.
20330 * parse.y: Fixed copyright assignment.
20331 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
20332 size_zero_node when completing a loop with no exit condition.
20333 (for_statement_nsi:): Define action.
20334 (for_init:, for_update:): Return size_zero_node when empty.
20335 (declare_local_variables): Call build_debugable_stmt.
20336 (build_debugable_stmt): New function.
20337 (build_loop_body): Build debugable statement around loop
20339 (complete_loop_body): Take into account the debugable statement
20340 around the EXIT_EXPR.
20341 (complete_loop_body): New function.
20342 (patch_exit_expr): Fixed condition inversion.
20344 1998-09-02 Tom Tromey <tromey@cygnus.com>
20346 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
20347 name of thread define.
20348 * jvspec.c (THREAD_NAME): New macro.
20350 (THREADLIB): Likewise.
20351 (lang_specific_driver): Recognize attempt to link with thread
20352 library or gc library. Recognize -ljava on command line so it
20353 isn't linked against more than once.
20355 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20357 * parse-scan.y (report_main_declaration): Name of the class
20358 containing `main' can be a qualified name.
20360 1998-08-31 Tom Tromey <tromey@cygnus.com>
20362 * config-lang.in: Changed gjavac to gjc everywhere.
20363 * Make-lang.in: Changed gjavac to gjc everywhere.
20365 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20367 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
20368 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
20369 and install the files.
20370 * Makefile.in (JAVA_OBJS_LITE): New variable.
20371 (compiler:): Now include jv-scan as a dependency.
20372 (../jv-scan$(exeext), parse-scan.c): New targets.
20373 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
20374 * config-lang.in (compilers): Removed gcj, gjavah from the list.
20375 * jcf-parse.c (parse_source_file): Call java_layout_classes and
20376 check for errors even if parse_only.
20377 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
20379 (yylex): New function. Uses java_lex body.
20380 (java_lex): Removed commented out statement. Remove local variable
20381 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
20382 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
20383 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
20384 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
20385 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
20386 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
20388 (java_lex_error): Empty if JC1_LITE is defined.
20389 (java_get_line_col): Return 0 if JC1_LITE is defined.
20390 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
20391 SET_MODIFIER_CTX): Moved into the section containing the macros
20392 conditionally defined by JC1_LITE.
20393 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
20394 argument if JC1_LITE is defined.
20395 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
20396 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
20398 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
20399 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
20400 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
20401 to different values according to JC1_LITE.
20402 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
20403 declared if JC1_LITE set.
20404 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
20405 defined if JC1_LITE not set.
20406 (struct parser_ctx): Reorganized and skip the jc1 front end part
20408 (java_layout_classes): New function definition.
20409 (java_push_parser_context, java_init_lex, yyparse, yylex,
20410 yyerror): Prototype always declared. All other static function
20411 prototypes declared only if JC1_LITE is not set.
20412 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
20413 declared in parse.h.
20414 (java_layout_classes): New function.
20415 (java_complete_expand_methods): No longer layout the class here.
20416 * parse-scan.y: New file.
20417 * jv-scan.c: New file.
20419 1998-08-25 Tom Tromey <tromey@cygnus.com>
20421 * gjavah.c (main): Handle -friend option.
20422 (friend_specs): New global.
20423 (generate_access): Handle friend_specs.
20424 (process_file): Likewise.
20425 (MAX_FRIENDS): New macro.
20426 (friend_count): New global.
20427 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
20428 Changed all callers.
20430 1998-08-24 Per Bothner <bothner@cygnus.com>
20432 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
20433 (main): Handle processing all the entries of a named .zip archive.
20434 * jcf-io.c (jcf_trim_old_input): New function.
20435 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
20437 1998-08-24 Per Bothner <bothner@cygnus.com>
20439 * lang.c (flag_assume_compiled): Make default be on.
20441 1998-08-21 Per Bothner <bothner@cygnus.com>
20443 * jcf-dump.c: Add bunches of flags to control output more.
20444 (process_class): New function; support printing more than one class.
20445 (main): Support new --print-main and --javap flags.
20446 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
20447 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
20449 1998-08-20 Per Bothner <bothner@cygnus.com>
20451 Change mangling of dispatch table to match C++ vtable (w/thunks).
20452 * class.c (build_dtable_decl), java-tree.h: New function.
20453 (make_class_data): Call it.
20454 * decl.c (init_decl_processing): Likewise.
20456 1998-08-19 Warren Levy <warrenl@cygnus.com>
20458 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
20459 soft_anewarray; adjust args passed.
20460 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
20461 match _Jv_NewObjectArray.
20463 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
20465 * decl.c (push_labeled_block, pop_labeled_block): New functions.
20466 * expr.c (loopup_label): Call create_label_decl.
20467 (create_label_decl): New function.
20468 (java_lang_expand_expr): Call expand_start_bindings with argument
20470 * java-tree.h Added space after PROTO in function declarations
20472 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
20473 (create_label_decl, push_labeled_block): New function
20475 * lex.c (label_id): Initialize.
20476 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
20478 * parse.h Added space after PROTO in function declarations when
20480 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
20481 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
20482 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
20483 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
20485 (struct parser_ctxt): New fields current_loop,
20486 current_labeled_block.
20487 (build_if_else_statement, patch_if_else_statement,
20488 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
20489 generate_labeled_block, complete_labeled_statement,
20490 build_bc_statement, patch_bc_statement, patch_loop_statement,
20491 build_new_loop, build_loop_body, complete_loop_body): New function
20493 * parse.y (java_warning_count): New global variable.
20494 (label_id): New static variable.
20495 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
20496 (block:): Return size_zero_node when block is empty.
20497 (empty_statement:): Return size_zero_node.
20498 (statement:): Implement supplemental action when for_statement: is
20500 (label_decl:): New rule.
20501 (labeled_statement:): Rewritten using label_decl. Actions
20503 (labeled_statement_nsi:): Likewise.
20504 (if_then_statement): Actions implemented.
20505 (while_expression): New rule.
20506 (while_statement:): Rewritten using while_expression. Actions
20508 (while_statement_nsi:): Likewise.
20509 (do_statement_begin:): New rule.
20510 (do_statement:): Rewritten using do_statement_begin. Actions
20512 (for_statement:): Rewritten using for_begin. Actions implemented.
20513 (for_statement_nsi:): Likewise.
20514 (for_header:, for_begin:): New rules.
20515 (for_init:): Actions implemented.
20516 (statement_expression_list:, break_statement:,
20517 continue_statement:): Likewise.
20518 (yyerror): Count number of issued warning(s).
20519 (java_report_errors): Report error(s) and/or warning(s).
20520 (java_complete_class): Use build_java_argument_signature to
20521 recompute completed method signature.
20522 (java_check_regular_methods): New locals method_wfl and aflags.
20523 Use method_wfl instead of lookup_cl during error reports. Fixed
20524 indentation and modified some error messages. Use
20525 lang_printable_name in method instead of the DECL_NAME. New code
20526 to issue warnings on methods not overriding corresponding methods
20527 private to a different package.
20528 (java_method_add_stmt): Call add_stmt_to_compound.
20529 (add_stmt_to_compound): New function.
20530 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
20531 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
20532 (build_if_else_statement, patch_if_else_statement,
20533 build_labeled_block, generate_labeled_block,
20534 complete_labeled_statement, build_new_loop, build_loop_body,
20535 complete_loop_body, patch_loop_statement, build_bc_statement,
20536 patch_bc_statement, patch_exit_expr): New functions.
20537 * typeck.c (build_java_signature): Build argument signature before
20538 enclosing it in between parenthesis.
20540 1998-08-17 Warren Levy <warrenl@cygnus.com>
20542 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
20543 (JAVA_OBJS): Added reminder comment
20545 1998-08-13 Nick Clifton <nickc@cygnus.com>
20547 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
20548 be interpreted as a long long.
20550 1998-08-13 Warren Levy <warrenl@cygnus.com>
20552 * decl.c (init_decl_processing): Use _Jv_InitClass, not
20553 soft_initialise_class. Use _Jv_NewMultiArray, not
20554 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
20555 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
20556 _Jv_CheckArrayStore, not soft_checkarraystore. Use
20557 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
20559 1998-08-12 Per Bothner <bothner@cygnus.com>
20561 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
20562 length_identifier_node): New global tree node constants.
20563 * parse.y (kw_super, kw_this, kw_length): Removed globals.
20564 Replace uses by super_identifier_node etc.
20565 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
20567 * parse.y (resolve_field_access): Don't special-case ".length" if
20568 flag_emit_class_files.
20569 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
20570 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
20573 1998-08-11 Per Bothner <bothner@cygnus.com>
20575 * decl.c (init_decl_processing): Remove unused method_type_node fields.
20576 * class.c (make_method_value): Remove init for removed fields.
20578 * class.c (layout_class): Use build_java_argument_signature.
20579 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
20581 * typeck.c (push_java_argument_signature): Removed. Merged into ...
20582 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
20583 (build_java_signature): Don't use push_java_argument_signature.
20585 * typeck.c (lookup_argument_method): New function.
20586 * parse.y (java_check_regular_methods): Use lookup_argument_method
20587 instead of lookup_java_method2 followed by lookup_java_method.
20589 * parse.y (check_method_redefinition): Minor optimization.
20591 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
20592 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
20594 1998-08-10 Tom Tromey <tromey@cygnus.com>
20596 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
20599 * gjavah.c (java_float_finite): Use K&R-style definition.
20600 (java_double_finite): Likewise.
20601 (generate_access): Now returns void. Changed all callers.
20602 (last_access_generated): Removed.
20603 (process_file): Only make a single pass over the .class file.
20605 1998-07-29 Per Bothner <bothner@cygnus.com>
20607 * class.c (get_dispatch_table): Add extra dummy vtable entry,
20608 for compatibility for G++ (with -fvtable-thunks).
20609 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
20611 * gjavah.c (process_file): Use public inheritance for super-class.
20613 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
20615 * lex.c (java_init_lex): Initialize ctxp->package.
20616 * parse.h (struct parser_ctxt): package and package_len replaced
20617 by tree package, an identifier node. Field method_decl_list is
20618 gone. Fixed comments.
20619 (lookup_field_wrapper, merge_qualified_name, not_accessible,
20620 class_in_current_package): New function prototypes.
20621 * parse.y (array_type:): Set class loaded flag on primitive type
20623 (package_declaration:): Assign ctxp->package to the
20625 (method_invocation:): Handle invocation of method qualified by
20627 (single_type_import_declaration:): Removed ambiguity check.
20628 (java_pop_parser_context): New local variable `next'. Reset and
20629 set IMPORT_CLASSFILE_NAME flags on current and previous import
20631 (java_accstring_lookup): Use new local macro COPY_RETURN.
20632 (lookup_field_wrapper): New function.
20633 (parser_qualified_classname): Use merge_qualified_name.
20634 (parser_check_super_interface): Broaden error message.
20635 (do_resolve_class): Check for qualified class name in the current
20636 compilation unit if appropriate.
20637 (process_imports): Check for already defined classes.
20638 (check_pkg_class_access): Got rid of call to
20639 get_access_flags_from_decl.
20640 (java_complete_expand_methods): Call safe_layout_class based on
20641 the current class size.
20642 (make_qualified_primary): Build a WFL qualification on primary if
20644 (merge_qualified_name): New function.
20645 (make_qualified_name): Use merge_qualified_name.
20646 (resolve_expression_name): Use safe_lookup_field.
20647 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20648 (resolve_qualified_expression_name): Likewise. Check on resolved
20649 element accessibility.
20650 (not_accessible_p, class_in_current_package): New functions.
20651 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20652 (patch_method_invocation_stmt): Merged common pieces. Check
20653 accessibility of invoked method.
20654 (check_for_static_method_reference): Add returned type in error
20656 (invocation_mode): Get rid of bogus check on PRIVATE methods.
20657 (refine_accessible_methods_list): Merged two conditions in test.
20658 (java_complete_class): Sanity check on stabilize_ref gone.
20659 * zextract.c (read_zip_archive): Cast lseek second argument to long.
20661 1998-07-28 Per Bothner <bothner@cygnus.com>
20663 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
20665 1998-07-24 Tom Tromey <tromey@cygnus.com>
20667 * gjavah.c (F_NAN): Removed.
20668 (F_NAN_MASK): New macro.
20669 (F_POSITIVE_INFINITY): Removed.
20670 (F_NEGATIVE_INFINITY): Likewise.
20671 (java_float_finite): Rewrote.
20672 (D_NAN_MASK): Renamed.
20673 (java_double_finite): Rewrote.
20674 (D_POSITIVE_INFINITY): Removed.
20675 (D_NEGATIVE_INFINITY): Likewise.
20677 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20678 If verbose, print underlying representation of value in hex.
20680 1998-07-24 Per Bothner <bothner@cygnus.com>
20682 * buffer.h, buffer.c: New files.
20683 * Makefile.in (JAVA_OBJS): Add buffer.o.
20685 Support locals variables and writing their debug entries to .class.
20686 * jcf-write.c: Simplify some by user new buffer type.
20687 (vode_buffer_grow): Removed.
20688 (struct localvar_info): New type.
20689 (localsvars, localvartable): New buffers.
20690 (localvar_alloc, localvar_free): New functions.
20691 (generate_bytecode_insns): Handle local variables.
20692 (generate_classfile): Write LocalVariableTable attribute.
20694 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
20696 * jcf-io.c (open_in_zip): Check the zipfile magic number.
20697 * zipfile.h (ZIPMAGIC): New macro.
20699 1998-07-24 Tom Tromey <tromey@cygnus.com>
20701 * Makefile.in (gjavah.o): Updated dependencies.
20702 (jcf-dump.o): Likewise.
20703 (all.indirect): Use ../gjavah.
20704 (../gjavah$(exeext)): Likewise.
20705 (clean): Don't remove gjavah.
20706 (clean): Remove parse.c, not java/parse.c.
20707 * Make-lang.in (java): Added gjavah.
20708 (gjavah$(exeext)): New target.
20709 (GJAVAH_SOURCES): New macro.
20710 (java.all.build): Added gjavah.
20711 (java.all.cross): Likewise.
20712 (java.rest.encap): Likewise.
20713 * config-lang.in (compilers, stagestuff): Added gjavah.
20715 1998-07-23 Tom Tromey <tromey@cygnus.com>
20717 * gjavah.c (java_float_finite): New function.
20718 (java_double_finite): Likewise.
20719 (F_POSITIVE_INFINITY): New macro.
20720 (F_NEGATIVE_INFINITY): Likewise.
20722 (D_POSITIVE_INFINITY): Likewise.
20723 (D_NEGATIVE_INFINITY): Likewise.
20725 (print_field_info): Use java_float_finite and java_double_finite.
20727 1998-07-23 Per Bothner <bothner@cygnus.com>
20729 * parse.y (method_header): Name "this" implicit argument.
20731 1998-07-22 Per Bothner <bothner@cygnus.com>
20733 * jcf-write.c: Write out LineNumberTable attribute in .class file.
20734 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
20735 (put_linenumber): New function.
20736 (generate_bytecode_insns, generate_classfile): Write line numbers.
20738 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
20740 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20741 (lookup_name, build_known_method_ref, build_class_init,
20742 build_invokevirtual, invoke_build_dtable, match_java_method,
20743 build_field_ref, pushdecl_force_head, build_java_binop,
20744 binary_numeric_promotion, build_decl_no_layout,
20745 build_java_arrayaccess, build_newarray, build_anewarray,
20746 build_java_array_length_access, build_java_arraynull_check): New
20747 extern function prototypes.
20748 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20749 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20751 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20753 * jcf.h (jcf_out_of_synch): New extern function prototype.
20754 * parse.h: Static/global function implemented in parse.y
20755 prototyped and declarations moved at the end of the file.
20756 (DECL_P): Check that the argument isn't null.
20757 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20758 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20759 (QUAL_DECL_TYPE): New macro.
20760 (PARAMS): Macro definition removed.
20761 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20762 (return_statement:): Call build_return.
20763 (field_access:): Call make_qualified_primary in sub rule.
20764 (method_invocation:): Build method invocation and call
20765 make_qualified_primary when processing primaries.
20766 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20767 get_type_from_signature.
20768 (java_check_regular_method): Extra integer 0 argument when calling
20769 lookup_java_method2.
20770 (lookup_java_interface_method2): Extra method DECL argument when
20771 calling lookup_java_interface_method2.
20772 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20773 COMPOUND_EXPR node.
20774 (java_complete_expand_method): Layout current class iff not
20775 already done. Don't process interface's methods.
20776 (java_complete_expand_method): Use super class only if it
20777 exists. Use current class otherwise.
20778 (make_qualified_primary): New function.
20779 (resolve_expression_name): Process qualified expression or
20780 expression from primary the same way.
20781 (resolve_expression_name): Two last arguments to
20782 resolve_field_access are now NULL_TREEs.
20783 (resolve_field_access): New variable is_static. Local field must
20784 be DECLs. is_static computed on field DECLs only. Append code in
20785 where_found to the field access if necessary. Use QUAL_DECL_TYPE
20786 to initialize field_type.
20787 (resolve_qualified_expression_name): New local variable,
20788 previous_call_static and is_static. Handle primaries with function
20789 calls, casts, array references and `this'. `super' now handled as
20790 `(super_class)this'. Use is_static to clarify boolean expressions.
20791 Added code to handle case where a proper handle is required to
20792 access a field. Use QUAL_DECL_TYPE where applicable.
20793 (maybe_access_field): New function.
20794 (patch_method_invocation_stmt): New arguments primary, where,
20795 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20796 deleted. Use `where' as a type to search from if specified. Check
20797 for static method reference where forbidden. Append primary or
20798 current_this to the argument list if not calling constructor nor
20800 (check_for_static_method_reference): New function.
20801 (patch_invoke): Layout the class on which new is done if
20803 (lookup_method_invoke): Changed format to report errors on
20805 (qualify_ambiguous_name): New local variable this_found. Now
20806 handle things from primaries. Method call are considered
20808 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20809 changed into NULLs.
20810 (not_initialized_as_it_should_p): Comply with the new DECL_P.
20811 (java_complete_tree): New case fo RETURN_EXPR. Process function
20812 call arguments in separate function.
20813 (complete_function_arguments): New function.
20814 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20816 (patch_assignment): Take the return function slot into account as
20817 a RHS. Distinguish assignment from a return.
20818 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20819 when checking methods in interfaces.
20820 (resolve_type_during_patch): NULL argument to unresolve_type_p
20821 instead of NULL_TREE.
20822 (patch_newarray): Fixed typo in comment.
20823 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20824 (build_return, patch_return): New functions.
20825 * typeck.c (lookup_java_constructor): Fixed typo in comment.
20827 1998-07-21 Per Bothner <bothner@cygnus.com>
20829 * constants.c (find_name_and_type_constant, find_fieldref_index,
20830 find_methodref_index): New methods.
20831 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
20832 just return given method. Also, rename to build_known_method_ref.
20833 (expand_invoke): Rename call to build_invoke_non_interface.
20834 * java-tree.h, parse.h: Update prototype.
20835 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
20836 (such as expand_expr_stmt) if flag_emit_class_files.
20837 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20838 STACK_TARGET, IGNORE_TARGET): New macros.
20839 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
20840 (generate_bytecode_insn): New function to generate method's bytecode.
20841 (generate_classfile): Node generate Code attribute for a method.
20842 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20843 push_long_const, field_op, adjust_typed_op, maybe_wide):
20844 New functions used by generate_bytecode_insn.
20846 * typeck.c (signature_include_return): Remove variable.
20847 (push_java_argument_signature, build_java_argument_signature): New.
20848 (build_java_signature): Use push_java_argument_signature.
20849 * parse.y: Use build_java_argument_signature instead of fiddling
20850 with signature_include_return.
20852 1998-07-17 Tom Tromey <tromey@cygnus.com>
20854 * gjavah.c (print_c_decl): Always generate JArray<>* for array
20857 * Makefile.in (all.indirect): Added gjavah$(exeext).
20858 (gjavah$(exeext)): Added $(exeext).
20861 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
20863 * class.c (layout_class): Call to java_layout_parsed_class replace
20864 by safe_layout_class.
20865 * expr.c (build_java_array_length_access): Removed static storage
20866 class in the function definition.
20867 (build_java_arraynull_check): Likewise.
20868 Also fixed typos in two comments.
20869 * lex.c (java_init_lex): Initialize static global kw_length.
20870 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20871 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20873 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20874 * parse.h (resolve_no_layout): New static function declaration.
20875 (get_identifier_in_static): Declaration removed.
20876 (java_layout_parsed_class): Function name declaration changed to
20878 (build_newarray_node, patch_newarray, resolve_type_during_patch,
20879 not_initialized_as_it_should_p, build_this): New static function
20881 (pushdecl_force_head, build_java_binop, int_fits_type_p,
20882 binary_numeric_promotion, stabilize_reference,
20883 build_decl_no_layout, build_java_arrayaccess): Extern function
20884 declarations moved into their own section.
20885 (build_newarray, build_anewarray, build_java_array_length_access,
20886 build_java_arraynull_check): New extern function declarations.
20887 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20888 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20890 (CALL_CONSTRUCTOR_P): New macro.
20891 * parse.y (kw_length): New static global tree node.
20892 (return_statement): Tagged <node>.
20893 (RETURN_TK): Tagged <operator>.
20894 (variable_declarator_id:): Build variable declaration with an
20895 empty initialization value if a syntax error was found in the
20896 initialization part of the variable declaration.
20897 (statement_without_trailing_substatement:): return_statement: now
20898 uses the default rule.
20899 (return_statement:): Temporarily fixed to return NULL_TREE.
20900 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20901 (class_instance_creation_expression:): Class creation rules now
20902 call build_method_invocation upon reduction.
20903 (array_creation_expression:): Rules call build_newarray_node upon
20905 (dim_exprs:): Build a list of dimension expressions.
20906 (dim_expr:): Store location of the OSB_TK in the dimension
20908 (method_invocation:): Added a new error rule.
20909 (build_unresolved_array_type): WFL argument may also be an array
20910 on a primitive type. Name of the argument changed to reflect this.
20911 (method_declarator): Insert argument type at the beginning of the
20912 argument type list and later reverse the list.
20913 (unresolved_type_p): Argument 'returned' may be optionally
20915 (java_layout_class_from_source): Function renamed
20917 (resolve_and_layout): Now call resolve_no_layout and
20919 (resolve_no_layout): New function.
20920 (purify_type_name): New function.
20921 (complete_class_report_errors): Call purify_type_name during error
20922 report on a type not found.
20923 (process_imports): error_found local variable doesn't need to be
20924 initialized to zero.
20925 (declare_local_variables): New local type_wfl. Fixed typo in error
20926 message. type_wfl assigned to unresolved type and used to register
20927 incomplete type. Build a WFL around the variable initialization
20928 statement so that debug info can be generated on it.
20929 (source_start_java_method): Reverse argument list after they've
20931 (current_this): New static global variable.
20932 (java_complete_expand_methods): Set current_this when appropriate.
20933 (resolve_expression_name): Build correct static and non static
20934 field access bearing a simple name.
20935 (resolve_field_access): Resolve the length field of arrays. Handle
20937 (patch_method_invocation_stmt): Set the type of the method
20938 invocation to error_mark_node. This value is later overridden by a
20939 valid type, if any. Don't handle qualified constructor invocation
20940 as qualified method invocation. Call lookup_method_invoke with its
20941 new flag. It's no longer necessary to access the selected method
20942 as the value of a tree list. Handle constructor invocation.
20943 (patch_invoke): Reverse argument list when invoking non interface
20944 methods. Insert call to new as the first argument of the
20946 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20947 defined within a final class. Return INVOKE_STATIC if the invoked
20948 method is a constructor.
20949 (lookup_method_invoke): New lc argument is a flag to indicate a
20950 constructor lookup. Now handle constructor lookup. Choose the most
20951 specific method in case several were matching the invocation
20952 requirements. Return a method decl instead of a tree list featuring
20953 one single method decl element.
20954 (refine_accessible_methods_list): New lc flag argument to
20955 indicate that a constructor is being looked up.
20956 (not_initialized_as_it_should_p): New function.
20957 (java_complete_tree): Now process fake tree codes
20958 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20959 save_expr on resolved function call arguments. Case on
20960 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20961 (patch_assignment): LHS can be a field access expression. When
20962 dealing with reference, lhs_type is the promoted type of the
20963 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20965 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20966 (patch_binop): Use not_initialized_as_it_should_p where
20968 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20969 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20971 (resolve_type_during_patch): New function.
20972 (patch_cast): Call resolve_type_during_patch to resolve type and
20973 report error accordingly.
20974 (patch_array_ref): Use not_initialized_as_it_should_p where
20975 applicable. Array base expression is saved before being
20976 used. Promote the type of an array elements if it contains non
20978 (build_newarray_node, patch_newarray, build_this): New functions.
20980 1998-07-16 Tom Tromey <tromey@cygnus.com>
20982 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20983 increment it in `for' statement.
20984 (print_field_info): If number is inf or nan, don't print it.
20985 (print_method_info): If method name is `delete', just ignore it.
20986 (print_c_decl): Special-case jstringArray.
20988 * gjavah.c (help): New function.
20989 (no_argument): New function.
20990 (usage): Changed text.
20991 (main): Rewrote argument handling. Now handles -v, --help,
20993 (version): New function.
20994 (found_error): New global.
20995 (main): Return found_error.
20996 (generate_access): Set found_error.
20997 (print_c_decl): Likewise.
20999 1998-07-15 Tom Tromey <tromey@cygnus.com>
21001 * gjavah.c (print_c_decl): Don't print "," when examining field.
21002 Skip type name when looking at "[L" types.
21003 (process_file): Now static.
21004 (generate_access): Now returns int.
21005 (last_access_generated): New global.
21006 (process_file): Clear last_access_generated; make multiple passes
21008 (print_field_info): Just return if generate_access returns true.
21009 (print_method_info): Likewise. Also, allow <init> functions to
21011 (print_c_decl): Added is_init argument. Print constructors
21013 (print_cxx_classname): Use UTF8_GET to extract characters from
21015 (print_base_classname): New function.
21016 (print_class_decls): New function.
21017 (process_file): Use it.
21018 (utf8_cmp): New function.
21020 1998-07-13 Nick Clifton <nickc@cygnus.com>
21022 * lang-options.h: Format changed to match changes in gcc/toplev.c
21023 to implement a --help option.
21025 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
21027 * decl.c (init_decl_processing): Revert change to dtable_type.
21029 1998-07-09 Per Bothner <bothner@cygnus.com>
21031 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
21033 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
21035 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
21037 * lang.c (lang_init): Default flag_exceptions to 1, without
21038 checking to see if it's 2 first.
21040 1998-07-08 Jeffrey A Law (law@cygnus.com)
21042 * constants.c: Include "system.h".
21043 * decl.c: Likewise.
21044 * lang.c (flag_new_exceptions): Get via extern now.
21045 (lang_init_options): New functions. Turn on flag_new_exceptions.
21047 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
21049 * lex.c (java_lex): Return 0 when we see an invalid character in
21052 * lex.c (java_read_char): Specify extra argument when calling
21054 (java_read_unicode, java_parse_end_comment,
21055 java_parse_escape_sequence): Likewise,
21056 (java_lex): Specify extra argument when calling
21057 java_lex_error. Test that IDs are beginning with a legal character
21058 for IDs. Handle invalid characters with an error message and a
21059 call to java_lex_error.
21060 (java_lex_error): Adjust column position by new argument
21061 `forward'. Issue an error even if in the middle of reporting an
21064 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
21066 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
21067 we don't explicitly put a null pointer when we're copying it.
21069 1998-07-07 Tom Tromey <tromey@cygnus.com>
21071 * gjavah.c (print_cxx_classname): New function.
21072 (super_class_name): Likewise.
21073 (print_super_fields): Removed.
21074 (in_super): Removed.
21075 (print_field_info): Never generate #defines.
21076 (print_c_decl): Changed generated types to match JNI. No longer
21077 print class name before method name.
21078 (print_method_info): Print "static" before static methods.
21079 Print "virtual" before non-final methods.
21080 (usage): Use exit(1), not exit(-1).
21082 (print_field_info): Use %.17g to print a double.
21083 (last_access): New globals.
21084 (process_file): Initialize last_access.
21085 (usage): Now static.
21086 (ACC_VISIBILITY): New define.
21087 (generate_access): New function.
21088 (print_field_info): Call it.
21089 (print_method_info): Likewise. Also, generate information for all
21090 methods, not just native methods. Return void.
21091 (print_c_decl): Return void.
21092 (print_field_info): Return void.
21094 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
21096 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
21097 processing the jc1 grammar file. Prefix bison functions and
21098 variables with java_.
21099 (parse.c): Dependencies on parse.h and lex.h
21100 * expr.c (build_java_arrayaccess): Function now global.
21101 * java-tree.h: Comment reorganized to carry on previous
21102 classification effort.
21103 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
21104 RESOLVE_TYPE_NAME_P): New flags on WFLs.
21105 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
21106 java_parse (new prefix java_ generated by bison).
21107 (java_layout_parsed_class, java_register_parsed_class): Function
21109 (yyparse): Removed unnecessary call to init_outgoing_cpool.
21110 * lex.c (static tree wfl_op): Variable deleted.
21111 (java_init_lex): Initialize kw_super and kw_this. Initialize more
21112 ctxp fields to NULL_TREE.
21113 (java_lex): No longer create WFL for operators. Filename caching
21114 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
21115 created as STRING_CST and later expanded. Removed extra argument
21116 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
21118 (build_wfl_node): Removed code in comments.
21119 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
21120 store token and location data in the current bison token.
21121 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
21122 static/extern function declaration at the beginning of the file.
21123 (struct qualification): Data structure definition deleted.
21124 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
21125 (qualify_ambiguous_name): Function declaration modified. Function
21126 now returns nothing.
21127 (build_array_ref, patch_array_ref, make_qualified_name,
21128 resolve_qualified_expression_name, maybe_generate_clinit,
21129 resolve_field_access): New static function declarations.
21130 (build_java_arrayaccess): New extern function declaration.
21131 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
21132 (CALL_EXPR_PRIMARY): Macro deleted.
21133 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
21134 (struct parser_ctxt): Field initialized_final
21135 removed. non_static_initialized, static_initialized: New fields.
21136 * parse.y (static tree kw_super, static tree kw_this): New global
21138 (%union): tree wfl field of operator member replaced by int
21139 location. WFLs are non longer created for operators.
21140 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
21141 (qualified_name:): Now calls make_qualified_name to build the
21143 (type_declaration:): Consider generating <clinit> when class
21145 (variable_declarator:): Directly build an assignment node when the
21146 variable is initialized when declared.
21147 (this_or_super:): Build a WFL and set current location when THIS
21148 or SUPER are parsed.
21149 (expression_statement:): Wrap statement around a WFL.
21150 (primary_no_new_array:): Fixed typo. Changed value returned by
21151 THIS_TK because of its new type (temporary).
21152 (dim_exprs:): Temporary fix because of OSB_TK's new type.
21153 (field_access:): Build qualified name with SUPER.
21154 (method_invocation:): Fixed returned value because of SUPER's new
21156 (array_access:): Use OSB_TK location information.
21157 (post_increment_expression:, post_decrement_expression:,
21158 unary_expression:, pre_increment_expression:,
21159 pre_decrement_expression:, unary_expression_not_plus_minus:,
21160 cast_expression:, multiplicative_expression:,
21161 additive_expression:, shift_expression:, relational_expression:,
21162 equality_expression:, and_expression:, exclusive_or_expression:,
21163 inclusive_or_expression:, conditional_and_expression:,
21164 conditional_or_expression:, assignment:): Use new location/token
21165 information available on operators.
21166 (create_class): Set super_decl_type to NULL_TREE when processing
21168 (register_fields): Field initialization is now a MODIFY_EXPR
21169 node. Chain initialization code to the matching lists (according
21170 to the field declaration modifiers).
21171 (maybe_generate_clinit): New function.
21172 (method_header): Don't set method's DECL_NAME to a WFL when adding
21173 methods to java.lang.Object.
21174 (resolve_and_layout): Now can return NULL_TREE if the type
21175 resolution fails. Otherwise, return the class DECL instead of its
21177 (check_method_redefinition): Don't patch method DECL_NAME if it
21178 belongs to java.lang.Object.
21179 (process_imports): Simply assign error_found to the value returned
21180 by check_pkg_class_access.
21181 (declare_local_variables): Don't use their init statements (if
21182 any) when parsing error were previously found. Reuse MODIFY_EXPR
21183 build during parsing as an init statement.
21184 (java_method_add_stmt): Now return the current method body.
21185 (java_layout_parsed_class, java_register_parsed_class): Functions
21187 (java_complete_expand_methods): Initialize the constant pool on a
21188 per class basis. Layout the classes before expanding their method
21189 bodies. Don't try expand artificial constructor code if error were
21190 found. Make the classes data and register them if no error were
21192 (java_complete_expand_method): Retrieve an artificial constructor
21193 argument list before entering its body. Assign the top block to
21194 the artificial constructor function body and set types of declared
21195 blocks and compound statements to void. Walk method body if not an
21196 artificial constructor.
21197 (make_qualified_name, cut_identifier_in_qualified): New functions.
21198 (resolve_expression_name): Fixed comments. Save/restore the
21199 current class CLASS_LOADED_P flag value. Build non qualified
21200 static field access and handle qualified expression names.
21201 (resolve_field_access, resolve_qualified_expression_name): New
21203 (patch_method_invocation_stmt): Use the new expression resolution
21204 scheme, calling resolve_field_access when the function call is
21205 resolved as an expression.
21206 (qualify_ambiguous_name): Function rewritten to work on qualified
21207 expression produced by make_qualified_name.
21208 (java_complete_tree): Promote type when function's argument are
21209 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
21210 the assignment to discover further errors if RHS is a expression
21211 name that fails to evaluate. Declare LHS initialized even though
21212 the assignment failed. Don't use the location variable and removed
21213 extra argument in patch function calls. Now handle the ARRAY_REF
21214 case and build internal string representation when STRING_CSTs are
21216 (build_method_invocation): Don't wrap function call around a WFL.
21217 (build_assignment): Likewise. Use the operator location
21219 (patch_assignment): Handle array access LHSs. Handle error
21220 provenance, resulting in a better error report.
21221 (build_binop): Use op_location from operator as binop location
21223 (build_unaryop, build_incdec, build_cast): Likewise.
21224 (patch_binop): Extract location information from the node. Fixed
21225 typo in error message.
21226 (patch_unary_op): Extract location information from the node.
21227 (build_array_ref, patch_array_ref): New functions.
21229 1998-07-01 Tom Tromey <tromey@cygnus.com>
21231 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
21232 match _Jv_IsInstanceOf.
21233 * decl.c (init_decl_processing): Use _Jv_NewArray, not
21234 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
21236 1998-06-30 Tom Tromey <tromey@cygnus.com>
21238 * decl.c (init_decl_processing): Functions are now named
21239 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
21241 1998-06-29 Per Bothner <bothner@cygnus.com>
21243 * java-tree.h (load_class): Add prototype.
21244 * class.c (is_compiled_class): Add missing arg to load_class.
21245 * expr.c (expand_java_NEW): Call load_class.
21246 * parse.y (process_import): Removed bogus use of void return value.
21248 1998-06-25 Per Bothner <bothner@cygnus.com>
21250 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
21251 Function name is "_Jv_Throw" instead of "soft_athrow".
21252 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
21253 Function name is "_Jv_AllocObject" instead of "soft_new".
21254 Takes an extra parameter (object size).
21255 * expr.c: Update calls.
21257 1998-06-24 Per Bothner <bothner@cygnus.com>
21259 * lex.c (java_get_line_col): Handle end-of-file.
21260 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
21262 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
21264 * lang.c (lang_init): Make -fexceptions the default.
21265 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
21266 exception handling is not turned on.
21268 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
21270 * lang.c (flag_new_exceptions): Make this this default.
21271 * decl.c (end_java_method): Call emit_handlers.
21272 * except.c (method_init_exceptions): Set language code and version.
21273 (expand_start_java_handler): Enable exception, and call
21274 expand_eh_region_start.
21275 (expand_end_java_handler): Enable exception, and set up catch blocks.
21276 (emit_handlers): New routine to generate the saved handlers.
21277 * java-except.h (emit_handlers): Add prototype.
21279 1998-06-12 Per Bothner <bothner@cygnus.com>
21281 We used to have three different representations of the constant pool:
21282 the CPool structure, the tree_constant_pool, and the constructures
21283 used to build the Class object (which may need class and string
21284 constants) in compiled code. None were appropriate for compiling
21285 to .class files, so I did a major overhaul.
21287 First, the tree_constant_pool array was removed. Things were
21288 modified to the CPool structure in the JCF could be used.
21289 Second, a "capacity" field was added to the CPool, and functions
21290 written to search for a matching constant, adding one if not found.
21291 The code that generated the Class object was changed to use a CPool.
21292 The actual TREE_LISTs used to build the CONSTRUCTORs used for
21293 the static Class object are now only in build_constants_constructor.
21294 Finally, I wrote code which can generate a .class file (including its
21295 constant pool) from the RECORD_TYPE of a class. This is a big step
21296 on the way to compiling Java source into .class files.
21298 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
21299 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
21301 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
21302 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
21303 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
21304 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
21305 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
21306 (lang_type): Removed constant_pool field.
21307 * jcf.h (CPool): Renamed size to count. Added field capacity.
21308 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
21309 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
21310 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
21312 * constants.c (current_constant_pool_tags, current_constant_pool_data,
21313 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
21314 * constants.c (build_constants_constructor): Use new outgoing_cpool.
21315 (set_constant_entry, find_constant1, find_constant2,
21316 find_class_constant, count_constant_pool_bytes, write_constant_pool,
21317 find_utf8_constant, find_class_or_string_constant): New functions.
21319 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
21320 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
21321 (give_name_to_class, get_class_constant): Likewise.
21322 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
21323 (get_name_and_type_constant, get_ref_constant): Removed.
21324 * parse.h (parser_ctxt): Remove field tree_constant_pool.
21325 * parse.y: Don't save/restore tree_constant_pool.
21326 * verify.c (verify_jvm_instructions): Update for new approach.
21327 * expr.c (expand_invoke, expand_java_field_op): Likewise.
21329 * lang-options.h: Added -femit-class-file, -femit-class-files.
21330 * lang.c (flag_emit_class_files), java-tree.h: New flag.
21331 (lang_f_options): Added "emit-class-file(s)".
21333 * expr.c (build_java_arrayaccess): Generate more efficient array
21334 bounds checking, by using unsigned compare.
21336 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
21338 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
21340 * parse.h: New comment on the handling of unresolved type
21341 identifiers. JDEPs are now part of the jdep_code enum.
21342 (typedef struct jdep): Now use enum jdep_code or int, depending on
21343 availability. Both are narrowed down to an 8 bits bitfield.
21344 (CALL_EXPR_PRIMARY): Fixed comment.
21346 1998-06-10 Tom Tromey <tromey@cygnus.com>
21348 * Make-lang.in (java): Added gjavac and jvgenmain.
21349 (java.start.encap): Depend on gjavac.
21350 (java.rest.encap): Depend on jvgenmain.
21352 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
21353 (JAVA_CROSS_NAME): Likewise.
21354 (java.all.build): Depend on jvgenmain and gjavac.
21355 (java.all.cross): Depend on jvgenmain and gjavac-cross.
21356 (jvgenmain$(exeext)): New target.
21357 (java.install-common): Wrote.
21358 * config-lang.in (compilers, stagestuff): Added gjavac and
21361 1998-06-10 Dave Brolley <brolley@cygnus.com>
21363 * lang.c (lang_decode_option): New argc/argv interface.
21365 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21367 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
21368 * decl.c (build_decl_no_layout): New function.
21369 * expr.c (java_lang_expand_expr): Layout declarations found in
21370 blocks before they're pushed.
21371 * jcf-parse.c (load_class): Save current line when parsing class
21373 (parse_source_file): Register class before expanding their
21375 * lang.c (put_decl_node): Produce `null' when `void *' is
21377 * lex.c (static tree wfl_op): New static global, for error report
21379 (java_init_lex): wfl_operator and wfl_op initialized
21380 here. Filename caching added for wfl_op. Return wfl_op when `(' is
21382 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
21383 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
21384 build_unresolved_array_type): New static function definitions.
21385 (build_decl_no_layout): New extern function declared.
21386 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
21387 faulty modifier exists.
21388 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
21389 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
21390 (UNARY_PLUS_EXPR): New fake operator.
21391 (struct parser_ctxt): New field osb_number.
21392 * parse.y (static tree wfl_operator): New static WFL for operator
21393 bound error messages.
21394 (DECR_TK, INCR_TK): Moved.
21395 (OP_TK): Tagged <operator>.
21396 (array_type:): Now call build_unresolved_array_type.
21397 (dim_expr:): Count the number of '[' seen.
21398 (post_increment_expression, post_decrement_expression,
21399 pre_increment_expression, pre_decrement_expression,
21400 unary_expression_not_plus_minus, unary_expression:): Actions are
21401 now building the corresponding unary expressions.
21402 (cast_expression:): Actions are now building cast expressions.
21403 (build_unresolved_array_type): New function.
21404 (create_interface): Reset the number of declared interfaces.
21405 (create_class): Likewise.
21406 (method_header): Methods declared within the scope of an interface
21407 are now implicitly set public and abstract.
21408 (java_complete_class): Variable's and parameter's type are patched
21409 with a promoted type.
21410 (declare_local_variables): Resolved non builtin types are promoted
21411 before being used to build a variable decl. Removed type patch
21412 posted on variable initialization statement.
21413 (source_start_java_method): Use build_decl_no_layout to build the
21414 decl of a parameter of incomplete type.
21415 (java_register_parsed_class): Process interfaces too. Call
21416 rest_of_decl_compilation on each processed class declarations.
21417 (java_complete_expand_methods): Don't attempt to expand things in
21419 (java_complete_tree): Process CONVERT_EXPR, even though it always
21420 has a type. Propagate error_mark_node to node's type too. Promote
21421 method's call argument type and return error_mark_node if
21422 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
21423 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
21424 handle unary operator nodes.
21425 (build_assignment): Added comment.
21426 (print_int_node): New function.
21427 (patch_assignment): New second argument. New error handling. Use
21428 print_int_node. Handle references. Use can_cast_to_p to issue
21429 different error message according to the context and check upon
21430 the initialization of the RHS.
21431 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
21432 (operator_string): Handle more operators.
21433 (patch_binop): No longer use a function static
21434 wfl_operator. Improved error message on shift distance.
21435 (build_unaryop, build_incdec, build_cast, patch_unaryop,
21436 patch_cast): New functions.
21438 1998-06-05 Per Bothner <bothner@cygnus.com>
21440 * jvspec.c: New file.
21441 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
21443 * java-tree.h (identifier_subst): Add declaration.
21445 1998-06-04 Tom Tromey <tromey@cygnus.com>
21447 * jvgenmain.c (main): Generate call to JvRunMain.
21449 * class.c (make_class_data): Push value for "sync_info" field.
21450 * decl.c (init_decl_processing): Push "sync_info" field.
21452 1998-06-03 Per Bothner <bothner@cygnus.com>
21454 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
21455 Java (source) name, not signature.
21456 Set TYPE_ALIGN to (at least) that of element_type.
21458 1998-06-02 Per Bothner <bothner@cygnus.com>
21460 * class.c: Moved classname-mangling-rekated code to ...
21461 * mangle.c: ... this new file.
21462 * jvgenmain.c: New program (needs mangle.c) to generate main program.
21463 * Makefile.in: Update for above changes.
21465 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21467 * expr.c (truthvalue_conversion): Convert integer and floating
21468 point value to their truth value.
21469 * lex.c (java_lex): Handle the `null' literal.
21470 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
21471 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
21472 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
21475 * parse.y: Reorganization/documentation on token declaration.
21476 (binop_lookup[]): New added new tree codes.
21477 (relational_expression): Build corresponding binary operators.
21478 (equality_expression, conditional_and_expression,
21479 conditional_or_expression): Likewise.
21480 (java_complete_class): Fix crash in debug message.
21481 (java_complete_tree): Check initialization of method call
21482 arguments. Further bogus node evaluation to detect more error
21483 during assignments. Handles more binary operators.
21484 (patch_assignment): Use DECL_P.
21485 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
21487 (operator_string): Handle more case. Compacted source.
21488 (patch_binop): Changed function comment. Checking for
21489 uninitialized first operand takes the compound assignment into
21490 account and uses DECL_P. Checking for uninitialized second operand
21491 delayed to routine's end. Use macros to issue type bound error
21492 messages and issue messages on both operands if their types are
21493 different. Force fixed type into node. Handle all binary
21496 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21498 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
21499 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
21500 build operator node and return tokens.
21501 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
21502 * parse.h (java_complete_tree): Changed returned type in prototype.
21503 (build_method_invocation, build_assignment, patch_assignment,
21504 patch_binop): New static function declarations.
21505 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
21506 BUILD_EXPR_WFL): New macros.
21507 * parse.y (enum tree_code binop_lookup[]): New static for token to
21509 (%union): Parser union has new sub-structure `operator'.
21510 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
21511 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
21512 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
21513 ASSIGN_ANY_TK): Tokens tagged `operator'.
21514 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
21515 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
21516 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
21517 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
21518 (assignment_operator:): Rule tagged `operator'.
21519 (expression_statement:): Re-installed default rule.
21520 (method_invocation:): Sub rules call build_method_invocation.
21521 (postfix_expression:): Don't attempt to resolve name here. Just
21523 (multiplicative_expression:): Sub-rules build corresponding binop
21525 (additive_expression:, shift_expression:, and_expression:,
21526 exclusive_or_expression:, inclusive_or_expression:): Likewise.
21527 (assignment:): Sub rule invoke build_assignment.
21528 (assignment_operator:): Default rules on sub rules.
21529 (force_error): Added documentation on this variable.
21530 (declare_local_variables): Build initialization calling
21532 (expand_start_java_method): Removed unused rtx declaration. Mark
21533 arguments as already initialized.
21534 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
21535 (java_complete_expand_methods): Don't process next method if
21536 completion of the previous one triggered errors.
21537 (java_complete_expand_method): Call source_end_java_method if no
21538 error were found during completion.
21539 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
21540 locals declaratilon. Handle names found within a class. Return
21541 error_mark_node when things aren't found.
21542 (patch_method_invocation_stmt): Return error_mark_node on failures.
21543 (patch_invoke): Removed unused local. Return the correct node.
21544 (java_complete_tree): Now returns a value. The BLOCK section binds
21545 local identifiers and the type of a BLOCK is now void. Assign the
21546 result of operand completion on COMPOUND_EXPR. Assign the
21547 encapsulated node of a WFL to the result of its completion, except
21548 when the node is an identifier. Now handle MODIFY_EXPR and several
21549 binary operators. Return error_mark_node on errors.
21550 (build_method_invocation, build_assignment, patch_assignment,
21551 build_binop, operator_string, patch_binop): New functions.
21552 * typeck.c (binary_numeric_promotion): New function.
21554 1998-05-21 Per Bothner <bothner@cygnus.com>
21556 * class.c (identifier_subst): New convenience wrapper for ident_subst.
21557 Replace most uses of ident_subst by identifier_subst.
21559 * class.c (push_class_static_dummy_field): Removed function.
21560 (build_class_ref): Find Class object decl by looking up "CNAME.class",
21561 instead of looking got "class" static field. Create that decl here.
21562 (class_identifier_node): Removed; no longer needed.
21563 (init_class_processing): Don't init class_identifier_node.
21564 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
21565 Do nreverse 0 times (instead of twice) for Object and Class.
21566 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
21568 1998-05-20 Per Bothner <bothner@cygnus.com>
21570 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
21571 while initializing linenumber_count and linenumber_table.
21572 Do it before init_function_start (which calls emit_line_note).
21573 * expr.c (expand_byte_code): Don't need to clear lineno here.
21575 1998-05-18 Tom Tromey <tromey@cygnus.com>
21577 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
21578 then mangle number as _N_.
21580 * class.c (mangle_class_field): New function.
21581 (build_class_ref): Set assembler name of class reference using
21582 mangle_class_field.
21583 (push_class_static_dummy_field): Likewise.
21585 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
21587 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
21588 of assigning to TREE_CODE. The latter method exploits a feature
21589 of GCC that is not ANSI compliant.
21591 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21593 * decl.c (pushdecl_force_head): New function.
21594 (pushlevel): Removed conditional printf.
21595 (complete_start_java_method): Don't enter local variable scope if
21596 function is compiled from source code.
21597 * expr.c: parse.h now included
21598 (java_lang_expand_expr): New function.
21599 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
21600 printf. Terminate buffer when doing directories.
21601 * jcf-parse.c (parse_source_file): Call lang_init_source before
21602 parsing and before code generation.
21603 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
21604 use printf if the macro is defined.
21605 * lang.c (lang_init): Install lang_expand_expr hook on
21606 java_lang_expand_expr.
21607 (java_dummy_print): New function.
21608 (lang_init_source): New function.
21609 * lex.c (java_lex): Remember location of an opening brace at the
21610 second nesting level.
21611 (java_is_eol): Unget character seen after a CR if it is EOF.
21612 * parse.h: Now includes lex.h
21613 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
21614 printf if the macro is defined.
21615 (expand_start_java_method, build_expr_block, enter_block,
21616 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
21617 New static function declarations.
21618 (pushdecl_force_head): New extern function declaration.
21619 (INCOMPLETE_TYPE_P): New macro.
21620 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
21621 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
21622 BLOCK_EXPR_ORIGIN): New macros.
21623 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
21624 DECL_SOURCE_LINE_LAST): New macros.
21625 (struct parser_ctxt): Removed field current_method_decl, redundant
21626 with the field current_function_decl. Added fields
21627 first_ccb_indent1 and pending_block.
21628 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
21629 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21631 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21632 (compilation_unit:): Cosmetic on sub rule.
21633 (type_declaration:): Cosmetic on sub rules. Added an error rule.
21634 (variable_initializer:): Installed default rule on expression:.
21635 (method_declaration:): method_header: starts a new
21636 method. method_body: installs the function body, absorbs blocks
21637 emitted for temporary variable scopings, pops function's body block
21638 and merges function's last statement lineno in DECL_SOURCE_LINE.
21639 (method_body:): Installed default rules.
21640 (block:): Call enter_block when an opening brace is seen. Absorb
21641 scoping blocks and call exit_block when a closing brace is seen.
21642 (block_statement:): Cosmetic changes.
21643 (method_invocation:): Create WFL around CALL_EXPR node.
21644 (patch_stage): Added comment around definition.
21645 (method_header): Try to use first_ccb_indent1 as the first line of
21646 the method, so BP debug info are emitted at the first opening
21647 brace of the function. If the function has no body, use the
21648 location of the function's name. Override currently defined method
21649 name with the matching WFL so we can point redefinition errors
21650 using the location where the function's name was declared.
21651 (check_abstract_method_header): Interprets DECL_NAME as an
21652 identifier or as a WFL, accordingly.
21653 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21654 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
21655 location and name information out of it and reinstall DECL_NAME to
21656 its original identifier node value.
21657 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
21658 function's source code).
21659 (read_import_dir): Test the value returned by find_class and issue
21660 a fatal accordingly.
21661 (declare_local_variables): Push a new block for the scope of the
21662 new variable(s) if code has been already generated at that nesting
21663 level. Pinpoint redefinition errors using the variable id
21664 WFLs. Generate initialization code if necessary. If the variable
21665 type is incomplete, register a patch on its decl.
21666 (source_start_java_method): Rewritten. Define a new block for the
21667 function's parameters. Build parameter decl out of function's
21668 arguments and register them for a patch if their types are
21670 (expand_start_java_method): Includes the part of
21671 source_start_java_method that was pushing the parameter decls and
21672 completing the method start code.
21673 (source_end_java_method): Removed call the expand_end_bindings and
21674 poplevel (already taken care of). Reinstall function's arguments
21675 and get function's last line of code before calling
21676 expand_function_end.
21677 (java_method_add_stmt): New comment before the function's
21678 code. Complement the second operand of the current COMPOUND_EXPR
21680 (java_complete_expand_methods): Don't generate debug info on line
21681 zero when expanding a generated constructor.
21682 (java_complete_expand_method): Set start and end line numbers for
21683 a artificially generated constructor to one and manually call
21684 enter_block and exit_block when defining it. For all methods:
21685 expand function's start calling the new expand_start_java_method
21686 and invoke java_complete_tree on the effective method's body, if
21688 (resolve_expression_name): Now use lookup_name_in_blocks to search
21689 local variable decls and print out an error when variables are
21691 (patch_method_invocation_stmt): Inserted comment before the
21693 (lookup_method_invoke): Chain method's arguments using chainon
21694 with the current arg list as a second argument. Inserted missing
21695 IDENTIFIER_POINTER when reporting an error on methods not found.
21696 (refine_accessible_methods_list): Don't retain constructors.
21697 (patch_arguments): Function removed.
21698 (java_complete_tree): Inserted comment before the function's
21699 code. New case for BLOCKs. Moved the WFL case a bit
21700 further. Complete function's arguments.
21701 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21702 maybe_absorb_scoping_blocks): New functions.
21704 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21706 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21708 * jcf-parse.c (parse_source_file, java_error_count): New forward
21709 and extern declarations.
21710 (java_parse_abort_on_error): Macro moved.
21711 (jcf_parse_source): fatal called if fopen fails. Now calls
21713 (parse_source_file): New parse_only parameter. Reflects the
21714 elimination of the second pass.
21715 (yyparse): parse_source_file called with argument set to 0.
21716 * jcf.h (JCF_ZERO): Sets java_source to zero.
21717 * lex.c (java_init_lex): pass argument is gone. Function modified
21718 to be called once during the analysis of a file.
21719 (java_unget_unicode): Fixed typo in fatal message.
21720 (java_get_line_col): Likewise.
21721 (java_lval): Likewise. String literals no longer built during
21723 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21725 * parse.h (MODIFIER_WFL): New macro.
21726 (parse_check_super, parser_check_super_interface): Now return int.
21727 (parser_chain_incomplete_item, not_builtin_p,
21728 complete_method_decl): Declarations removed.
21729 (build_method_invocation_stmt, build_invoke): Renamed using the
21730 `patch' instead of `build'
21731 (register-incomplete_type, obtain_incomplete_type,
21732 java_complete_tree, java_complete_expand_method,
21733 unresolved_type_p, create_jdep_list): New function declarations.
21734 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21735 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21736 (jdep): New typedef on new struct _jdep.
21737 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21738 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21739 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21740 JDEP_RESOLVED_P): New macros.
21741 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21742 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21743 JDEP_VARIABLE): New enum values and jdep kinds.
21744 (jdeplist): New typedef on struct _jdeplist.
21745 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21747 (CALL_EXPR_PRIMARY): New macro.
21748 (struct parser_ctxt): Fields java_pass, current_method_decl,
21749 method_decl_list deleted. New field jdeplist.
21750 (INCOMPLETE_P): Macro deleted.
21751 * parse.y (single_type_import_declaration:): Removed pass switch.
21752 (type_import_on_demand_declaration): Likewise.
21753 (field_declaration:): Removed pass switch on all sub rules.
21754 (class_declaration:): Call the complete_class_decl removed on
21756 (method_declaration:): Removed second pass switch. No longer chain
21757 methods decl when method_header reduced.
21758 (method_header:): Sub rules no longer depend on pass switch.
21759 (method_declarator:): Likewise.
21760 (method_body:): Likewise.
21761 (abstract_method_declaration:): Likewise.
21762 (block_statement:): Likewise.
21763 (local_variable_declaration:): Likewise.
21764 (argument_list:): Likewise.
21765 (method_invocation:): Likewise. Call to build_method_invocation_stmt
21766 removed. Partial CLASS_EXPR tree node built instead.
21767 (postfix_expression:): Removed pass switch on all sub rules.
21768 (java_pop_parser_context): Free classd_list content.
21769 (yyerror): Call obstrack_grow0 to finalize error message.
21770 (check_class_interface_creation): Comment modified to reflect new
21771 returned value meaning. Removed second pass switch. Return 1 if an
21772 error was found, 0 otherwise. Adjust pointer on filename if a
21773 leading path separator was found.
21774 (maybe_create_class_interface_decl): Removed first pass switch
21775 when linking the class decl to the class_list. Install a new
21776 jdep_list for the class.
21777 (add_superinterfaces): List of unresolved interfaces is
21778 gone. Unresolved interfaces are directly added to the current
21780 (create_interface): Second pass shortcut removed.
21781 ctpx->modifier_ctx access through MODIFIER_WFL.
21782 (create_class): Second pass shortcut removed. Call to
21783 register_incomplete_type replaces the call to
21784 parser_chain_incomplete_item.
21785 (complete_class_decl): Function removed.
21786 (duplicate_declaration_error): New way of retrieving redeclared
21788 (register_fields): Call to lookup_modifier_cl replaced by
21789 MODIFIER_WFL. New way of handling unresolved type, using
21790 unresolved_type_p and obtain_incomplete_type.
21791 register_incomplete_type replaces call to parser_chain_incomplete_item.
21792 (patch_stage): New static global variable.
21793 (method_header): New way of handling unresolved type, using
21794 unresolved_type_p and obtain_incomplete_type. patch_stage used to
21795 indicates that the method decl needs to be patched.
21796 (check_abstract_method_header): Call to lookup_modifier_cl
21797 replaced by MODIFIER_WFL.
21798 (method_declarator): Incomplete argument type are registered
21799 calling register_incomplete_type. Patch on the declared method is
21800 issued in that case.
21801 (unresolved_type_p): New function.
21802 (parser_check_super_interface): New comment to reflect function's
21803 modified returned type (int). Function and has a new argument
21804 this_wfl. Call to parse_error_context uses this_wfl instead of
21805 relying on lookup_cl.
21806 (parser_check_super): Comment reflects function's new returned
21807 type (int). Function returns nonzero value on error.
21808 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21809 register_incomplete_type, jdep_resolve_class): New functions to
21810 handle incomplete types in declarations.
21811 (java_complete_class): Rewritten to work with the new incomplete
21812 type handling scheme.
21813 (complete_class_report_errors): Likewise.
21814 (complete_method_decl): Removed: it jobs is now handled by
21815 java_complete_class.
21816 (do_resolve_class): Class loaded in not already loaded and not
21817 found in Java source code.
21818 (java_check_regular_methods, java_check_abstract_methods): Don't
21819 call complete_method_decl anymore.
21820 (lookup_modifier_cl, not_builtin_p): Functions deleted.
21821 (read_import_dir): Got rid of the pass number dependency.
21822 (declare_local_variables): New handling of unresolved types (patch
21824 (source_start_java_method): New parameter level. Function called
21825 with level set to 1 when argument types are potentially
21826 unresolved. Called to complete the job with level set to 2 once
21827 types are complete.
21828 (source_end_java_method): Call to permanent_allocation
21829 removed. Waiting to be replaced by a more suitable obstack
21831 (java_complete_expand_methods, java_complete_expand_method,
21832 java_expand_finals): New functions.
21833 (build_method_invocation_stmt): Renamed
21834 patch_method_invocation_stmt. Extracts function call expression
21835 (wfl) and arguments (args) from CALL_EXPR tree operands.
21836 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21837 call. Patch the function and argument operand of the CALL_EXPR
21839 (patch_argument, java_complete_tree): New functions.
21841 1998-04-20 Per Bothner <bothner@cygnus.com>
21843 Recover from missing fields and methods (i.e. error instead of fatal).
21844 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
21845 * expr.c (expand_invoke): Recover from missing method.
21846 (expand_java_field_op): Recover from missing field.
21847 Inline references to java.lang.{Integer,Char,...}.TYPE.
21848 * typeck.c (get_type_from_signature), java-tree.h: New function.
21849 * class.c (add_method): Use get_type_from_signature.
21850 (build_class_ref): Handle a class that was not found.
21851 * typeck.c (convert): Handle conversion to pointers (for convenience).
21852 * verify.c (verify_jvm_instructions): Use get_type_from_signature
21853 instead of lookup_field to handle missing fields.
21855 * jcf-parse.c (process_zip_dir): Set java_source.
21857 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
21859 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21861 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
21863 * jcf-parse.c (load_class): Don't change input_filename before
21864 calling jcf_parse_source (but still do it before calling
21866 (jcf_parse_source): Assign input_filename after having saved the
21868 * lex.c (java_init_lex): Chain a WFL node to the import on demand
21869 list. ctxp->modifier_ctx zeroed according to its new
21870 definition. ctxp->filename initialized. Removed
21871 JAVA_MODIFIER_CTX_UNMARK.
21872 (java_unget_unicode): Update the character based column position.
21873 (java_allocate_new_line): ref_count not used anymore. Always free
21874 ctxp->p_line. Initialize c_line->char_col to 0.
21875 (java_get_unicode): Update the character based column position.
21876 (java_lex): Use ctxp->elc to store current position in source
21877 file, at the beginning of the parsed token. Set modifier_ctx entry
21878 corresponding to the parse modifier to a WFL node. Return a WFL
21879 node when an identifier is parsed.
21880 (java_lex_error): Now uses ctxp->elc to store current position in
21882 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21883 * lex.h (build_wfl_node): New function definitions.
21884 (struct java_line): ref_count and next fields are gone. New field
21886 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21887 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21888 (JAVA_COLUMN_DELTA): New macro.
21889 (java_lc): New typedef on new struct _java_lc.
21890 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21891 (parse_error_context, parse_warning_context): Changed prototypes.
21892 (java_get_line_col): Added as an available global function.
21893 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21894 (IC_DECL): Replaced by macro IC_TYPE
21895 (DEPEND_WFL): New macro.
21896 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21898 (exit_java_complete_class): Removed a commented out statement.
21899 (struct parser_ctxt): Added comments on fields. modifier_ctx is
21900 now an array of tree nodes. Deleted fields line_list and
21901 e_line. New field elc, to replace e_line.
21902 * parse.y (array_type:): Build WFL node.
21903 (qualified_name:): Build a single WFL node out of two. Retain
21904 the location information of the first node in the resulting node.
21905 (package_declaration:): Use package name as a WFL node
21906 (single_type_import_declaration:): Use imported name as a WFL node.
21907 (type_import_on_demand_declaration:): Use root of the imported
21908 packages as a WFL node.
21909 (field_declaration:): Removed unused local variable cl.
21910 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21911 (yyerror): New static elc. Removed static error_line, error_pos.
21912 New local code_from_source. Save ctxp->elc into elc at the first
21913 pass. Call java_get_line_col to get a string of the line where
21914 the error occurred.
21915 (debug_line): Removed static function.
21916 (parse_error_context, parse_warning_context): Parameter cl is now
21917 a WFL node. Use its value to initialize ctxp->elc.
21918 (redefinition_error): Parameter cl is now a WFL node.
21919 (parse_add_interface): New parameter wfl. No longer call
21920 lookup_cl, use wfl instead.
21921 (check_class_interface_creation): Parameter cl is now a WFL node.
21922 (maybe_create_class_interface_decl): Likewise.
21923 (add_superinterfaces): New function.
21924 (create_interface): Removed local cl, node, super_decl,
21925 super_decl_type. Function now uses id as a WFL node. Better
21926 warning/error report on obsolete or forbidden mix of
21927 modifiers. Now calls add_superinterfaces to register interfaces.
21928 (create_class): Removed local cl, node. Local variable id is used
21929 as a WFL node. Better error report on forbidden modifier
21930 mix. Uses add_superinterfaces to register interfaces.
21931 (find_field): Argument cl is now a WFL node. Now store the WFL
21932 node of a fields that needs to be checked for their
21934 (method_header): Local variable node non longer used. Local
21935 variable id replaces cl.
21936 (check_modifiers_consistency): Local variable cl is now a WFL
21938 (method_declarator): Local variable cl replaced by parameter id.
21939 (parser_qualified_name): Now uses parameter name as a WFL node.
21940 (parser_check_super_interface): New parameter wfl, for achieve
21941 greater accuracy during error reports.
21942 (parser_chain_incomplete_item): New parameter named location. Used,
21943 along the decl, to construct the incomplete item node.
21944 (java_complete_class): resolve_class now uses WFL node extracted
21945 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21947 (complete_method_decl): Unresolved function's argument types are WFL.
21948 (resolve_class): Parameter cl is now a WFL node.
21949 (resolve_and_layout): Likewise.
21950 (do_resolve_class): Likewise. Try first to use cl and then do the
21951 lookup on the decl when calling check_pkg_class_access.
21952 (complete_class_report_errors): Use IC_TYPE in place of
21953 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21954 instead of doing a lookup over the decl.
21955 (java_check_final): Use WFL info from field tree list.
21956 (lookup_cl): Rewritten and returns a statically defined WFL node.
21957 (lookup_modifier_cl): Now uses information from WFL nodes.
21958 (process_imports): Likewise.
21959 (read_import_dir): name and cl arguments replaced by a single WFL
21960 node. Function modified accordingly.
21961 (find_in_imports_on_demand): Now uses WFL node.
21962 (check_pkg_class_access): cl argument is now a WFL node.
21963 (declare_local_variables): Fixed to use WFL nodes.
21964 (resolve_expression_name): Likewise.
21965 (build_method_invocation_stmt): name_combo argument renamed
21966 wfl. Function modified to use WFL nodes.
21967 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21968 (lookup_method_invoke): cl is now a WFL node. Added missing
21969 IDENTIFIER_POINTER to class type decl name.
21971 1998-04-14 Dave Brolley <brolley@cygnus.com>
21973 * lang.c (init_parse): Now returns char* containing the filename.
21975 1998-04-10 Per Bothner <bothner@cygnus.com>
21977 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
21979 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
21980 * class.c (make_class_data): If flag_assume_compiled, initial class
21981 state is CSTATE_PREPARED; make superclass and interfaces direct
21982 references, rather than constant pool indexes.
21984 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21986 * parser.y: Include flags.h. Removed debug variable pl.
21987 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21988 (block:): Likewise.
21989 (labeled_statement_nsi:): Generate debug info when reducing
21990 expression_statement:.
21991 (check_pkg_class_access): get_access_flags_from_decl invocation
21992 fixed for new CLASS_* flags location.
21993 (source_end_java_method): Save/restore parser context when
21994 entering/leaving this routine. Restore lineno to its right value
21995 before calling expand_end_bindings.
21996 (build_method_invocation_stmt): build_invoke called with the
21997 current line information.
21998 (build_invoke): New argument cl. Wrap the function call around a
22000 (refine_accessible_methods_list): Changed comment, removed
22002 * parse.h: Fixed typo in comments.
22003 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
22004 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
22005 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
22007 * lex.c (java_lex): Record the last closing curly bracket of a
22009 * jcf-parse.c (jcf_parse_source): Now calls
22010 java_check_methods. Clarified comment, fixed typo.
22012 1998-04-09 Dave Brolley <brolley@cygnus.com>
22014 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
22015 (finish_parse): Expose for non USE_CPPLIB builds.
22017 1998-04-08 Jeffrey A Law (law@cygnus.com)
22019 * lang.c (lang_print_xnode): New function.
22021 1998-04-03 Per Bothner <bothner@cygnus.com>
22023 * decl.c (class_dtable_decl), java-tree.h: New tree node.
22024 * class.c (get_dispatch_vector, get_dispatch_table): New functions
22025 used to build a class's dispatch table.
22026 (make_class_data): Generate dispatch table if flag_assume_compiled.
22027 Set dtable of class object to address of class_dtable_decl.
22029 * decl.c (int_decl_processing): Make soft_badarrayindex_node
22030 be volatile and have side effects - generates better code.
22032 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
22033 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
22035 * expr.c (expand_invoke): If class is final, method is
22036 effectively final, so can call it directly.
22038 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
22040 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
22042 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
22044 * parse.y (build_method_invocation_stmt): Removed extra argument
22047 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
22049 * expr.c (dtable_indent): Now static global.
22050 (expand_invoke): Now call invoke_build_dtable and
22051 build_invokevirtual.
22052 (invoke_build_dtable, build_invokevirtual): New functions.
22053 * jcf-io.c (find_class): Defer issuing a warning by setting
22054 jcf->outofsynch to 1.
22055 * jcf-parse.c (jcf_out_of_synch): New function.
22056 (load_class): Test this_jcf.outofsynch flag and call
22057 jcf_out_of_synch accordingly.
22058 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
22059 comment indentation.
22060 * lex.c (java_get_unicode): Fixed code indentation.
22061 (java_lex): Create string literal. Fixed typo. Removed several
22062 premature obstack_free.
22063 * parse.h: New enums for name resolution and invocation mode.
22064 (struct qualification): New data structure.
22065 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
22066 (do_resolve_class, build_method_invocation_stmt,
22067 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
22068 debug_line, identical_subpath_p, invocation_mode,
22069 refine_accessible_methods_list, build_invoke,
22070 lookup_method_invoke): New functions declared.
22071 (build_invokevirtual, invoke_build_dtable, match_java_method,
22072 build_field_ref, jcf_out_of_synch): New references to external
22074 (struct parse_ctxt): Removed artificial_constructor field.
22075 * parse.y: (array_type:): Type defined for this rule.
22076 (class_type:): Installed default rule for interface_type:.
22077 (array_type:): Now build Java array type.
22078 (qualified_name:): Now use obstack_grow0.
22079 (method_declaration:): Skip the artificial constructor added to
22081 (abstract_method_declaration:): Execute the code only during pass 1.
22082 (block:): Installed default rule in block_statements:.
22083 (block_statement:): Add the statement to the method during pass 2.
22084 (statement_expression): Installed default rule for
22085 method_invocation:.
22086 (argument_list:): Added code to build the argument list.
22087 (method_invocation:): Added call to create the method invocation
22089 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
22090 (debug_line): New function for debug.
22091 (complete_class_decl): No longer do something during pass 1.
22092 (method_header): Use BUILD_PTR_FROM_NAME.
22093 (parser_qualified_classname): Use obstack_grow0. Removed bogus
22095 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
22096 function's main comment.
22097 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
22099 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
22100 (resolve_class): Now works with arrays.
22101 (do_resolve_class, resolve_and_layout): New functions.
22102 (java_check_regular_methods): Reverse method list before and after
22103 having processed it. No longer set ctxp->artificial_constructor.
22104 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
22105 accordingly. Fixed typo in issued error message. Now use
22107 (find_in_imports_on_demand): Now use obstack_grow0.
22108 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
22109 (source_end_java_method): Call expand_expr_stmt instead of
22110 expand_expr. Calls it before calling expand_function_end.
22111 (java_method_add_stmt): Do nothing if errors were found during
22113 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
22114 (build_method_invocation_stmt, build_invoke, invocation_mode,
22115 lookup_method_invoke, refine_accessible_methods_list,
22116 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
22118 * typeck.c (build_java_signature): Properly end method signature
22119 if return type skipped.
22120 (match_java_method): New function.
22122 1998-03-16 Per Bothner <bothner@cygnus.com>
22124 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
22126 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
22128 * expr.c (build_invoke_non_interface): New function.
22129 (methods_ident, ncode_ident): Now static globals.
22130 (expand_invoke): Use build_invoke_non_interface.
22131 * java-tree.h (struct lang_decl): New field function_decl_body.
22132 (DECL_FUNCTION_BODY): New macro.
22133 * jcf-parse.c (jcf_parse_source): Deeper check before setting
22134 CLASS_FROM_SOURCE_P.
22135 (parse_source_file): Fixed typos. Call java_layout_parsed_class
22136 before starting pass 2. Call to java_generate_parsed_class replaced
22137 by java_register_parsed_class.
22138 * lex.c: Fixed typo in header. Some line width related formating.
22139 * lex.h: Some line width related formating.
22140 * parse.h (source_end_java_method, resolve_expression_name,
22141 complete_class_decl, maybe_create_class_interface_decl,
22142 check_class_interface_creation): New static function declarations.
22143 (java_layout_parsed_class, java_method_add_stmt): New function
22145 (struct parser_ctxt): Field mark_class_generate removed. New
22146 fields class_list and artificial_constructor.
22147 * parse.y: Fixed typo in header.
22148 (class_declaration:): Call complete_class_decl when class body
22150 (method_declaration:): Call source_end_java_method in pass 2 when
22151 the method body is defined.
22152 (postfix_expression:): Do expression name resolution on sub-rule
22153 name during pass 2.
22154 (create_class, create_interface): Merged common pieces.
22155 (check_class_interface_creation, maybe_create_class_interface_decl):
22157 (complete_class_decl): New function.
22158 (register_fields): Fixed line width related typo.
22159 (method_header): Correctly skip first argument when fixing
22160 argument line. Changed the loop.
22161 (java_check_circular_reference): Now use ctxp->class_list.
22162 (java_complete_class): Removed start/stop marking.
22163 (java_check_regular_methods): Now takes a class decl as an
22164 argument. Add default constructor if none were encountered.
22165 (java_check_methods): Now use ctxp->class_list. Changed call to
22166 java_check_regular_methods.
22167 (source_start_java_method): Set DECL_ARG_TYPE for each function
22169 (source_end_java_method, java_method_add_stmt): New functions.
22170 (java_generate_parsed_class): No longer exists.
22171 (java_layout_parsed_class, java_register_parsed_class): New functions.
22172 (resolve_expression_name): New function.
22174 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
22176 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
22177 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
22178 until pass initializations are done. Call read_import_dir with
22180 * parse.h: (lookup_modifier_cl): New function declared.
22181 (INTERFACE_FIELD_MODIFIERS): New macro.
22182 (OBSOLETE_MODIFIER_WARNING): New macro.
22183 * parse.y: (register_fields): Class type and current field name in
22184 local variables. Check modifier(s) if adding field(s) to an interface.
22185 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
22186 and report errors using the faulty modifier line context.
22187 (lookup_modifier_cl): New function.
22188 (read_import_dir): Detect and report default import processing
22191 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
22193 Add a pair of -fassume-compiled/-fno-assume-compiled options.
22194 * class.c (is_compiled_class): Return 1 after making sure it
22195 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
22196 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
22197 * java-tree.h (flag_assume_compiled): Add decl.
22198 * lang.c (lang_f_options): Add the flag.
22199 (flag_assume_compiled): Add decl, default to 0.
22201 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
22203 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
22204 (is_compiled_class): Likewise.
22205 (layout_class): Likewise.
22206 (layout_class): Detect and lay out classes defined in source code.
22207 (interface_of_p, add_interface_do, may_add_interface): New
22209 (add_interface): Now use add_interface_do.
22210 (add_method_1): New function.
22211 (add_method): Now use add_method_1.
22212 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
22213 (complete_start_java_method): New function.
22214 (start_java_mehod): Now call complete_start_java_method.
22215 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
22216 (expand_invoke): Likewise and fixed typo.
22217 *gjava.c: (print_super_field): Use new argument to find_class
22220 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
22221 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
22222 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
22224 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
22225 (add_method_1, push_class): New prototypes.
22226 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
22227 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
22228 directory where the class was found.
22229 (find_class): New argument DO_CLASS_FILE. Function find_class
22230 modified accordingly.
22231 *jcf-parse.c: (fix_class_path): New function.
22232 (load_class): Use new VERBOSE argument. load_class now finds and
22233 loads/parses .class/.java files. Save read_state of current_jcf
22235 (java_parser_abort_on_error): New macro.
22236 (jcf_parse_source, parse_source_file): New function.
22237 (jcf_parse): Fixed typo.
22238 (yyparse): Call parse_source_file () only.
22239 (process_zip_dir): Fixed typo, fix zdir->filename_length when
22240 writing the real class name back in the zip directory entry.
22241 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
22242 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
22243 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
22244 (find_class): Prototype fixed.
22245 *lex.c: Added 1998 time stamp.
22246 Removed all static global variables, moved into the parser
22247 context data structure.. Now include unistd.h if SEEK_SET not
22249 (java_init_lex): Rewritten.
22250 (java_sneak_unicode): Modified current unicode access in current line.
22251 (java_unget_unicode): Likewise.
22252 (java_allocate_new_line): New allocation management.
22253 (java_read_char): Modified access and storage of unget_utf8_value.
22254 New way of processing current unicode.
22255 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
22256 (java_get_unicode): Now use the parser context.
22257 (java_lineterminator): Likewise.
22258 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
22259 of the reentrant parser implementation. Function now use the
22260 parser context data structure and java_lval. Fixed production of
22261 the float and double constant "out of range" error message. Fixed
22262 obstack use. Return integer value when hitting a modifier. Now
22263 return type for TRUE, FALSE and other predefined types. Return
22264 identifier as a TREE_LIST list containing the current line context
22265 as the TREE_VALUE sub-node.
22266 (java_unicode_2_utf8): Fixed typo in declaration.
22267 (java_lex_error): Now use the parser context data structure.
22268 *lex.h: Added 1998 time stamp.
22269 (struct java_line): New fields ref_count and next.
22270 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
22271 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
22272 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
22273 *parse.h: Added 1998 time stamp.
22274 (java_parse_source_file): Renamed from parse_source_file.
22275 (YYERROR_NOW, YYNOT_TWICE): Fixed.
22276 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
22277 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
22278 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
22279 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
22280 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
22281 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
22282 (struct parser_ctxt): New data structure to keep the parser context.
22283 *parse.y: Added 1998 time stamp, got rid of static global variables.
22284 (java_error_count, ctxp): New global variables.
22285 (%union): New value field.
22286 (numeric_type, integral_type): Rules removed.
22287 (primitive_type): Rule defined to handle integral, float, double and
22289 (qualified_name, package_declaration,
22290 single_type_import_declaration, type_import_on_demand_declaration,
22291 modifiers, class_declaration, super, interfaces,
22292 interface_type_list, class_body, field_declaration,
22293 field_declaration, variable_declarators, variable_declarator,
22294 variable_declarator_id, method_declaration, method_header,
22295 formal_parameter_list, formal_parameter, method_body, block,
22296 static, interface_declaration, extends_interfaces,
22297 abstract_method_declaration, local_variable_declarators): Rules now
22299 (force_error, do_warning): New global statics.
22300 (push_parser_context, parser_context_save_global,
22301 parser_context_restore_global, pop_parser_context): New functions.
22302 (yyerror): Now uses the global parser context. Fixed use of obstack.
22303 (parse_error, parse_error_context, parse_warning_context,
22304 java_accstring_lookup, redefinition_error, check_modifiers,
22305 parser_add_interface, create_interface, create_class, find_field,
22306 duplicate_declaration_error, register_fields, method_header,
22307 check_modifiers_consistency, check_abstract_method_header,
22308 method_declarator, parser_qualified_classname,
22309 parser_check_super_interface, parser_check_super,
22310 parser_chain_incomplete_item, java_check_circular_reference,
22311 layout_class_from_source, java_complete_class,
22312 complete_method_decl, resolve_class, complete_class_report_errors,
22313 java_check_final, check_method_redefinition,
22314 java_check_regular_methods, java_check_abstract_methods,
22315 java_check_methods, lookup_java_interface_method2,
22316 lookup_java_method2, lookup_cl, find_name_in_single_imports,
22317 process_imports, find_in_imports, read_import_entry,
22318 read_import_dir, find_in_imports_on_demand,
22319 check_pkg_class_access, not_builtin_p, declare_local_variables,
22320 source_start_java_method, java_generate_parsed_class): New
22322 *typeck.c: (signature_include_return): New global variable.
22323 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
22324 to add the function returned type in the signature.
22326 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
22328 * jcf-io.c (open_in_zip): Use strncmp and LEN.
22330 1998-01-29 Dave Brolley <brolley@cygnus.com>
22332 * Make-lang.in (java.info): Added.
22333 (java.install-info): Added
22335 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
22337 * Makefile.in (clean): Also remove java/parse.c.
22339 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
22341 Add a pair of -fbounds-check/-fno-bounds-check options.
22342 * lang.c (lang_decode_option): Add code to grok arguments.
22343 (flag_bounds_check): Add decl.
22344 (lang_f_options): New array w/ the option in it.
22345 * java-tree.h (flag_bounds_check): Add decl.
22346 * lang-options.h: New file.
22347 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
22348 of a static macro value.
22349 (JAVA_ARRAY_EXCEPTION): Delete macro.
22351 1998-01-23 Per Bothner <bothner@cygnus.com>
22353 * typeck.c (build_java_array_type): Fix two bugs in previous change.
22354 * expr.c (build_anewarray): Add missing promote_type.
22356 1998-01-22 Per Bothner <bothner@cygnus.com>
22358 Add array types with known length to optimize bounds checking.
22359 * typeck.c (build_java_array_type): Take length parameter.
22360 (java_array_type_length, build_prim_array_type): New functions.
22361 * java-tree.h: Update for new functions.
22362 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
22363 * class.c: Use build_prim_array_type.
22364 * expr.c (can_widen_reference_to): Handle known-length array types.
22365 (verify_jvm_instructions): Keep track of integer push instructions
22366 followed by newarray/anewarray, so we can build known-length arrays.
22367 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
22368 (java_array_data_offset): New function.
22369 (build_java_array_length_access): New function. Optimize if constant.
22370 (build_java_arrayaccess): Constant fold bounds check.
22371 (expand_java_newarray, expand_java_anewarray): Replaced by ...
22372 (build_newarray, build_anewarray): New functions.
22373 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
22374 * verify.c (merge_types): Handle known-lengh array types.
22376 1998-01-19 Per Bothner <bothner@cygnus.com>
22378 * expr.c (expand_byte_code): Fix performace bug, which caused
22379 searching linenumber_table to be linear rather than constant.
22381 1997-12-12 Per Bothner <bothner@cygnus.com>
22383 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
22385 * decl.c, java-tree.h (soft_fmod_node): New global.
22386 * decl.c (init_decl_processing): Define __builtin_fmod.
22387 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
22388 using __builtin_fmod.
22390 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
22392 * keyword.h: New file, output of keyword.gperf as processed by
22394 * lex.c (java_lex_init): Initialize java_error_flag.
22395 * parse.c (YYERROR_NOW): Uses java_error_flag.
22396 * parse.y: New static java_error_flag. Useless definition of
22398 * parse.y (java_error): Portable error recovery using
22399 java_error_flag (not yet completely tuned).
22401 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
22403 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
22405 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
22407 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
22408 (parse.c, lex.c, keyword.h): New rules for Java source code
22410 * parse.c: Renamed into jcf-parse.c.
22411 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
22412 * keyword.gperf: New file, Java keywords.
22413 * parse.y: New file, Java language grammar.
22414 * parse.h: New file, Java language grammar definitions.
22415 * lex.c: New file, Java language lexer.
22416 * lex.h: New file, Java language lexer definitions.
22418 1997-12-03 Per Bothner <bothner@cygnus.com>
22420 * decl.c (clinit_identifier_node), java-tree.h: New global.
22421 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
22422 * verify.c (verify_jvm_instructions): Inline use of removed macros.
22423 * expr.c (expand_java_field_op): Check for invalid assignment
22426 * jcf-reader.c (get_attribute): Test for wrong attribute length.
22428 1997-10-27 Per Bothner <bothner@cygnus.com>
22430 * verify.c (verify_jvm_instructions): When processing a handler,
22431 attempt to set the current_subr to the right value.
22432 (More complicated code combines Sep 17 and Oct 22 versions.)
22434 1997-10-24 Per Bothner <bothner@cygnus.com>
22436 * class.c (push_class): Figure out (guess) name of source file.
22437 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
22438 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
22439 (parse_class_file): Change return type from int to void.
22440 Call debug_start_source_file/debug_end_source_file.
22442 * expr.c (build_java_binop): Fix masking 2nd operand.
22443 * decl.c (init_decl_processing): Set sizetype first.
22445 1997-10-22 Per Bothner <bothner@cygnus.com>
22447 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
22448 (Revert Sep 17 change.)
22450 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
22452 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
22453 .class extension in their name and fix thing so we don't process
22454 them parse_zip_file_entries().
22455 (parse_zip_file_entries): Cleaned unused local variables.
22457 1997-10-20 Per Bothner <bothner@cygnus.com>
22459 * expr.c (can_widen_reference_to): Allows equal array element types.
22460 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
22461 * jcf-dump.c (RET): Get (and print) index.
22463 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
22464 Promote element type to POINTER_TYPE.
22466 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22468 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
22469 find_in_current_zip, jcf_figure_file_type): Moved from
22470 jcf-reader.c to parse.c.
22471 * zextract.c: (read_zip_archive): takes file_comment_length possible
22472 field into account.
22474 1997-10-20 Per Bothner <bothner@cygnus.com>
22476 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
22478 * verify.c (merge_types): Handle array types even better ...
22480 1997-10-17 Per Bothner <bothner@cygnus.com>
22482 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
22484 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
22485 * class.c (make_class_data): Don't build fields_decl if no fields.
22486 When building fields_decl, skip if DECL_ARTIFICIAL.
22488 * expr.c (java_stack_swap): Update stack_type_map.
22489 * verify.c (merge_types): Handle array types better.
22491 1997-10-15 Per Bothner <bothner@cygnus.com>
22493 * class.c (add_field): Don't promote short integral fields to
22494 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
22495 * expr.c (push_value): Promote and convert short integral values.
22497 * decl.c, java-tree.h (integer_two_node): New constant node.
22498 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
22500 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
22502 * class.c (append_gpp_mangled_type): Use function argument
22503 unpromoted type to generate mangled name.
22505 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
22507 * constants.c (build_constant_data_ref): Now uses current_class
22508 instead of main_class.
22509 (build_constants_constructor): Now uses current_class instead of
22511 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
22512 of the global variable SeepZipFiles done here.
22513 * zextract.c (read_zip_archive): extra_field optional field taken
22514 into account while computing the position of the class file in the
22516 * verify.c (verify_jvm_instructions): Use current_jcf to search
22518 * parse.c (load_class): First search for the class to load in the
22519 current zip file. Saves current_jcf (restored before returning
22520 from that function). Don't call JCF_FINISH in the class was found
22521 in the current ZIP file.
22522 (jcf_parse): If the class was found in the current ZIP file, save
22523 its tree_constant_pool (for later reuse).
22524 (parse_class_file): New function. Process each method defined in
22525 the current class and record the class as to be later registered.
22526 (yyparse): Rewritten. Figure the type of the current file and switch
22528 * lang.c: New global variable current_jcf.
22529 (lang_init): Removed compiling_from_source test (done later, in
22530 yyparse). Removed call the jcf_parse ().
22531 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
22532 (typedef struct JCF): New fields seen_in_zip (to mark a class found
22533 in the current ZIP file) and zip_offset (offset to the class data in
22534 the current zip file).
22535 * jcf-reader.c: zipfile.h included.
22536 localToFile: New ZipFileCache static global variable
22537 (parse_zip_file_entries): New function. Browse the current ZIP
22538 file directory and process each class found.
22539 (process_zip_dir): New function. Register each class found in the
22540 ZIP file directory. The class aren't parsed but a valid JCF is
22541 link to each of them.
22542 (find_in_current_zip): New function. Search for a class in the
22543 current ZIP file directory. If found, prepare the class so that it
22545 (jcf_figure_file_type): New function. Examine the file structure
22546 to figure a class file, a ZIP file. If none of these categories are
22547 matched, a source file is assumed.
22548 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
22549 SeenZipFile: New global variable.
22550 (open_in_zip): Use zipmember's length to accelerate the search for
22551 a member. If zipmember was NULL and zip file successfully read,
22553 * java-tree.h: New global variable current_jcf declared. Added
22554 declaration for current_constant_pool_tags, current_constant_pool_data,
22555 current_constant_pool_length, current_constant_pool_data_ref.
22556 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
22557 store the JCF of classes seen in a zip file) and tree *constant_pool
22558 (to save a loaded class constant pool). current_class declared here.
22559 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
22560 retrieve method_ref_constant.
22561 (PUSHC): java_push_constant_from_pool now uses current_jcf.
22562 (OBJECT): get_class_constant now uses current_jcf.
22563 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
22564 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
22565 (expand_invoke): Now uses current_class instead of main_class
22566 (build_class_init): Now uses current_class instead of main_class
22567 * class.c: New static global variable registered_class.
22568 (register_class): New function.
22569 (emit_register_class): Modified to use registered_class instead of
22571 (is_compiled_class): Now take into account class seen in the archive.
22573 1997-10-06 Per Bothner <bothner@cygnus.com>
22575 * except.h: Renamed to: java-except.h.
22576 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
22577 * except.c: Add semi-working (commented out) implementation.
22579 * expr.c (expand_iinc): Add needed flush_quick_stack.
22580 * parse.c (set_source_filename): New function.
22581 (give_name_to_class): Set input_filename from package.classname.java.
22583 * jcf-io.c (find_class): Don't look first in ".".
22585 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22587 * zextract.c (read_zip_archive): Now takes into account the
22589 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
22591 1997-09-20 Per Bothner <bothner@cygnus.com>
22593 * constants.c, java-tree.h (build_internal_class_name): New function.
22594 (alloc_class_constant): Re-implement using build_internal_class_name.
22595 * class.c (make_class_data): Likewise.
22596 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
22598 1997-09-17 Per Bothner <bothner@cygnus.com>
22600 * verify.c (verify_jvm_instructions): Temporarily set current_subr
22601 to NULL before pushing an exception handler target.
22603 * expr.c (flush_quick_stack): Save from low stack indexes to high.
22604 (java_stack_swap, java_stack_dup): Re-write to be safe from
22605 clobbering registers.
22606 (build_class_init): New function.
22608 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
22610 * typeck.c (build_java_array_type): Temporary use
22611 permanent_obstack to create the array 'length' field.
22612 * expr.c (lookup_label): Temporay use permanent_obstack to create
22613 label if not found.
22614 * class.c (push_super_field): Tempory use permanent_obstack.
22616 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
22618 * typeck.c (type_for_mode): Now handles double_type_node and
22620 * verify.c (verify_jvm_instructions): The instruction following
22621 the wide bytecode is checked. OPCODE_ret added to the list of
22624 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
22626 * class.c (make_class): Temporary use permanent_obstack. Set the
22627 class CLASS_P field to 1.
22628 (push_class): Temporary use permanent_obstack.
22629 (set_super_info): Temporary use permanent_obstack.
22630 (add_method): Temporary use permanent_obstack, set
22631 METHOD_TRANSIENT().
22632 (add_field): Temporary use permanent_obstack. Sets
22633 FIELD_VOLATILE() and FIELD_TRANSIENT().
22634 (build_class_ref): Temporary use permanent_obstack if the class
22636 (build_static_field_ref): Temporary use permanent_obstack when
22637 creating field's rtl.
22638 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
22639 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
22640 and fields. Function finalized, as far as flag handling.
22641 (push_class_static_dummy_field): Temporary use permanent_obstack.
22642 (emit_register_class): Force generation of class registration at
22644 * decl.c (end_java_method): Call permanent_allocation() before
22646 * expr.c (can_widen_reference_to): Added comment to interface
22647 handling, fixed typo.
22648 (lookup_field): Now uses CLASS_P() to correct FIXME
22649 (expand_invoke): Verification on public && !static &&
22650 !abstract moved into soft_lookupinterfacemethod (kaffe).
22651 Use Object class dtable if objectref is an array when expanding
22653 (java_push_constant_from_pool): Temporary use permanent_obstack
22654 for CONSTANT_string
22655 * parse.c (get_ref_constant): Temporary use permanent_obstack to
22656 create constant references.
22657 (get_constant): Temporary use permanent_obstack to create constant.
22658 (load_class): Temporary use permanent_obstack to load class.
22659 (jcf_parse): Temporary use permanent_obstack to perform class
22661 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22662 (build_java_signature): Temporary use permanent_obstack.
22663 * verify.c: (verify_jvm_instruction): removed unnecessary verification
22665 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22666 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22669 1997-09-11 Per Bothner <bothner@cygnus.com>
22671 * class.c (append_gpp_mangled_type): Fix typo.
22672 (emit_register_class): Use main_class to get class object, rather
22673 than looking for no-longer-existing static decl starting with _CL.
22674 * typeck.c (parse_signature_type): Promote array element type
22675 if it is a RECORD_TYPE.
22677 1997-09-10 Per Bothner <bothner@cygnus.com>
22679 * class.c (push_class_static_dummy_field): New function.
22680 (mangle_static_field): New. Do G++-style mangling of static fields.
22681 (layout_class): Mandle static fields here, not in add_field.
22682 (build_class_ref): The class object is now a dummy static field.
22683 * decl.c (find_local_variable): Look for best, instead of first match.
22684 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
22685 (build_java_athrow): Don't check here if exception is Throwable.
22686 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
22687 (TYPE_USED): Removed. No longer used ...
22688 * parse.c (jcf_parse): Call push_class_static_dummy_field.
22689 * verify.c (push_pending_label): New function.
22690 (push_pending_block): Renamed to check_pending_block.
22691 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
22692 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
22693 re-checking possible handlers) after a store (less wasted work).
22694 Check for null handler (finally) before calling add_handler.
22695 Various changes to (finally?) correctly handle try/finally.
22697 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
22699 * class.c: Include stdio.h.
22701 1997-09-04 Per Bothner <bothner@cygnus.com>
22703 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22704 to make sure class is initialized before static/special invoke.
22706 * verify.c (verify_jvm_instructions): On a store instruction,
22707 call find_local_variable to force pre-allocation of decl and rtx.
22708 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
22710 1997-09-03 Per Bothner <bothner@cygnus.com>
22712 * class.c (build_class_ref): Strip off "promoted_" if need be.
22713 (make_field_value): Call build_java_signature when needed.
22714 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
22715 * expr.c (build_java_athrow): Don't push_value of exception.
22716 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22717 match specification of [fd]cmp[lg] for NaNs.
22718 (expand_byte_code): Add support for exception handler ranges.
22719 * except.c: Add skeleton for EH code-generation.
22720 * verify.c (merge_types): Treat all promoted integral types as equal.
22721 * constants.c (build_constants_constructor): To force creation of
22722 current_constant_pool_data_ref, call build_constant_data_ref.
22724 * javaop.def (lload): Fix typo.
22725 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
22727 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
22729 * parse.c: Don't include function.h.
22731 1997-08-27 Per Bothner <bothner@cygnus.com>
22733 * except.[ch]: New files.
22734 * Makefile.in (JAVA_OBJS): Add except.o
22735 * expr.c: Temporary warning about unimplemented exceptions.
22736 * verify.c: Verify exception handlers.
22738 * jcf-dump.c (disassemble_method): Print exception table.
22740 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
22742 * expr.c (verify_jvm_instructions): Started a thorough
22743 verification of invoke* bytecodes.
22744 (expand_byte_code): flush quick stack if PC is the target of a
22745 branch. and undef RET (conflicting with config/i386/i386.h).
22746 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22748 (expand_invoke): Now handles invokeinterface and do more
22749 verification according to the bytecode.
22750 (lookup_field): Don't try to load the class if processing
22752 (can_widen_reference_to): Now handles interfaces.
22753 * decl.c (init_decl_processing): New global variable
22754 soft_lookupinterfacemethod_node, declared in java-tree.h.
22755 Call set_super_info on string_type_node.
22756 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22758 * class.c (set_super_info): Fills the CLASS_* flags according to
22760 (get_access_flags_from_decl): Handles all class flags.
22762 1997-08-26 Per Bothner <bothner@cygnus.com>
22764 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
22765 * parse.c (yyparse): Check for abstract method, and missing code.
22766 * expr.c (expand_byte_code): Change interface.
22767 * lang.c (put_decl_node): Print promoted types prettier.
22768 * verify.c (verify_jvm_instruction): Change interface.
22769 Partial support for scanning exception table.
22770 For load instructions, handle promoted integral types.
22772 1997-08-21 Per Bothner <bothner@cygnus.com>
22774 * verify.c: New file, with contents moved from expr.c.
22775 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
22776 * typeck.c (is_array_type_p): Moved here from expr.c.
22777 * java-tree.h: Add some now-needed function declarations.
22778 * Makefile.in (JAVA_OBJS): Added verify.o.
22780 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22782 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22783 METHOD_ABSTRACT flag.
22785 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22786 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22787 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22789 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22791 (start_java_method): Hook for SYNCHRONIZED methods.
22793 * expr.c (build_java_jsr, build_java_ret): New functions
22794 (JSR,PRE): New macros
22795 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22796 (verify_jvm_instructions): tableswitch, lookupswitch,
22797 monitorenter, monitorexit, goto_w: verified.
22798 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22799 (build_java_monitor): New function.
22800 (MONITOR_OPERATION): Modified to call build_java_monitor()
22801 (verify_jvm_instructions): Started a thorough verification of
22804 1997-08-19 Per Bothner <bothner@cygnus.com>
22806 Support verification of jsr/ret subroutines (used for try/finally).
22807 * decl.c (return_address_type_node): New type node.
22808 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22809 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22810 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
22811 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22812 TYPE_USED): New macros for special types in type_map.
22814 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
22815 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
22817 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
22819 * expr.c (can_widen_reference_to): New function.
22820 (pop_type): Use it.
22821 (merge_type_state): Support handling start of subroutine.
22822 (push_pending_block): Return char* error message, instead of calling
22823 fatal on an error. Also handle subroutines.
22824 (verify_jvm_instructions): Handle errors from push_poending_block.
22825 Support jsr and ret instructions.
22827 1997-08-19 Per Bothner <bothner@cygnus.com>
22829 * jcf-io.c (find_classfile): Fix thinko.
22830 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
22832 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
22834 * Makefile.in (BISON): Remove.
22836 1997-08-07 Per Bothner <bothner@cygnus.com>
22838 * Makefile.in: Convert to autoconf.
22839 * config-lang.in (outputs): Added java/Makefile.
22841 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22842 Rename cc1java to jc1.
22844 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
22845 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
22847 * class.c (class_depth): Do load_class if needed.
22849 Mostly better verification.
22850 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
22851 (init_decl_processing): Change return type of soft_checkcast.
22852 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
22853 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22854 lang_print_error): New functions.
22855 (lang_init): Set global hook print_error_function to lang_print_error.
22856 * expr.c: In the type_map ptr_type_node is only used for null now.
22857 (pop_type, merge_types): Hence ptr_type_node matches any reference.
22858 (merge_types): Dererence pointer to record types before comparing.
22859 (decode_newarray_type, merge_types): On error just return NULL.
22860 (build_java_binop): Add preliminary implementation (with warning)
22861 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22862 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
22863 (expand_compare, expand_java_goto, expand_java_call): Don't
22864 push_pending_block, since that only makes sense when verifying.
22865 (merge_type_state): Different return codes.
22866 (push_pending_block): A block may need to be verified more than once.
22867 (expand_byte_code): Warn about unused code at code generation time.
22868 (verify_jvm_instruction): Changed logic, since code may need to be
22869 re-verified if type-state has changed. Also, better error handling.
22870 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22871 Improve newarray, anewarray, ?aload, athrow,
22872 * java-tree.h (LABEL_CHANGED): New macro.
22874 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
22876 * decl.c (soft_athrow_node): New global variable initialized.
22877 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22878 * typeck.c (convert): Added support for REAL_TYPE.
22879 (convert_to_char): New function.
22880 (convert): Handle CHAR_TYPE.
22881 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22882 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22883 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22885 (verify_jvm_instructions): Added break a the end of bogus unop: label.
22886 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22887 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22888 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22889 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22890 to Use The Right Things.
22891 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22892 compatible with INT. BOOLEAN is made equivalent to BYTE.
22893 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22894 OPCODE_ifnonnull): Now supported.
22895 (build_java_athrow): New function.
22897 1997-08-04 Per Bothner <bothner@cygnus.com>
22899 Rename method name <init> to match G++ (and fix mangling).
22900 * class.c (layout_class): Replace method name of <init> by class name.
22901 (make_method_value): Do inverse renaming of constructor from <init>.
22902 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
22903 * typeck.c (lookup_java_constructor): New function.
22904 * expr.c (expand_invoke): If method_name is <init>, call
22905 lookup_java_constructor to find constructor.
22907 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
22909 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22911 * parse.c (get_class_constant): Modified to handle array "classes"
22912 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22914 (convert): Modified to handle real type.
22915 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22916 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22917 variables declared.
22918 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22919 soft_multianewarray, soft_newarray_node, soft_throw_node): New
22920 global variables initialized.
22921 (find_local_variable): Handles the case of a pointer
22922 (end_java_method): Restore the use of one more scope
22923 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22924 build_java_array_length_access, expand_java_arrayload,
22925 expand_java_arraystore, expand_java_array_length,
22926 expand_java_multianewarray, expand_java_anewarray,
22927 build_java_check_indexed_type, is_array_type_p,
22928 build_java_throw_out_of_bound_exception): New functions.
22929 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22930 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22931 OPCODE_<t>aload): Implemented code for verification.
22932 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22933 ARRAY_NEW_MULTI): Macro defined.
22934 (CONVERT): Modified to invoke convert().
22935 (case OPCODE_aload2): Fixed index typo from 2 to 1.
22937 1997-07-31 Per Bothner <bothner@cygnus.com>
22939 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
22940 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
22941 (make_class_data): Field name needs '/' as package prefix.
22942 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
22944 1997-07-25 Per Bothner <bothner@cygnus.com>
22946 Implement debug information for local variables.
22947 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22948 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22949 DECL_LOCAL_SLOT_CHAIN): New macros.
22950 (struct lang_decl_var): New type.
22951 * parse.c (give_name_to_locals): Move to decl.c.
22952 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
22953 (start_java_method): Re-write parameter handling.
22954 (pending_local_decls): New global variable.
22955 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
22956 (find_local_variable): Accept pc so we can skips decls not in range.
22957 (struct binding_level): Add end_pc field.
22958 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22959 (various): Change so current pc gets passed to find_local_variable.
22961 * decl.c (init_decl_processing): Re-arrange fields in
22962 class_type_node and and method_type_node to match kaffe 0.9.1.
22963 * class.c (make_method_value, make_class_data): Update
22964 initializations to match.
22966 1997-07-16 Per Bothner <bothner@cygnus.com>
22968 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22969 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
22970 (push_super_field): New function.
22971 (make_class_data): Handle inheritance of class static initializer.
22972 (layout_class): New name mangling.
22973 * constants.c (build_constant_data_ref): Init type of data array
22974 to a one-element array.
22975 (build_constants_constructor): Set DECL_SIZE from complete array type.
22976 * decl.c: Rename class_type, object_type etc to class_type_node,
22977 object_type_node etc. Make former inherit from latter.
22978 * expr.c (expand_invoke): Add cast of function address.
22979 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
22980 * parse.c (yyparse): Don't call layout_class here.
22981 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
22983 1997-06-14 Per Bothner <bothner@cygnus.com>
22985 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
22986 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
22987 (alloc_class_constant): New.
22988 * expr.c (expand_invoke): Make sure method's class is initialized.
22989 * class.c (interits_from_p, emit_register_class): New functions.
22990 * parse.c (yyparse): Call emit_register_class.
22992 1997-06-09 Per Bothner <bothner@cygnus.com>
22994 * constants.c: New file, to handle constant pool.
22995 * Makefile.in (JAVA_OBJS): Add constants.o.
22996 * decl.c (init_decl_processing): Update, fix, finish various structs.
22997 (pushdecl_top_level): New.
22998 * parse.c (layout_class): Moved to class.c.
22999 * expr.c (java_push_constant_from_pool): New function.
23000 * class.c (build_class_ref): Make work fully
23001 (make_class_data): Emit super-class, constant pool, interface vector.
23003 1997-06-03 Per Bothner <bothner@cygnus.com>
23005 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
23006 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
23007 * class.c (class_depth): New function.
23008 (lookup_named_class): Replaced by new function lookup_class.
23009 * decl.c (object_type_node, string_type_node): New.
23010 Remove various types that we no longer need.
23011 * expr.c (verify_jvm_instructions): New separate verifier pass.
23012 (push_type, pop_type): New functions for verifier.
23013 (type_stack_dup, pop_argument_types, merge_types): Likewise.
23014 (expand_byte_code): Simplify, since we assume already verified.
23015 (expand_invoke): Now mostly works.
23016 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
23017 * lang.c (main_class): Move to parse.c. Don't make_class yet.
23018 * parse.c: Wait to allocate class object until we know its name.
23019 (layout_class): Calculate DECL_VINDEX for each virtual method.
23020 * typeck.c (get_array_type): Rename to ...
23021 (build_java_array_type): ... and provide working implementation.
23022 (build_java_signature): New function - build Java signature of type.
23023 (set_java_signature): New function - cache signature with type.
23024 (lookup_java_method): New function.
23026 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
23028 * class.c (ident_subst): Take extra SUFFIX parameter.
23029 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
23030 (set_constant_value, build_static_field_ref, is_compiled_class): New.
23031 (build_class_ref): Actually implement.
23032 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
23033 * decl.c (builtin_function): New.
23034 (init_decl_processing): Update for current Kaffe. Declare some
23035 builtin Kaffe functions.
23036 * expr.c (build_address_of): New.
23037 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
23038 Renamed (from expand_java_new etc), and added working implementations.
23039 (build_field_ref): Now also handle static fields.
23040 (expand_invoke): Implement invokestatic, and start implement rest.
23041 * java-opcodes.h: Use javaop.def to avoid duplicated list.
23042 * javaop.def: Rename invokevirt -> invokevirtual.
23043 * lang.c (use_handles): Removed.
23044 * parse.c: Add support for ConstantValue attribute.
23045 Handle nested loading of a class. (JPOOL_UTF): New.
23047 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
23049 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
23051 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
23053 * Make-lang.in (java.install-man): New empty rule.
23054 * typeck.c (set_local_type): New function.
23055 * expr.c (STORE_INTERNAL): Call find_local_variable,
23056 not find_stack_slot. Call set_local_type.
23058 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
23060 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
23061 and building RECORD_TYPE CONSTRUCTORs.
23062 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
23064 * lang.c (use_handles): Change the default to 0.
23065 * decl.c: Define and build class_type, field_type, utf8const_type.
23066 * class.c (make_class_data, make_field_value,
23067 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
23068 hashUtf8String, strLengthUtf8, mangled_classname:
23069 Functions to build reflective data structures.
23070 * parse.c (yyparse): Call make_class_data.
23072 * jcf-io.c (open_class, find_classfile): New functions.
23073 * jcf-dump.c: Support reading classfile from explicitly-named
23074 class file (without CLASSPATH searching).
23076 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
23078 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
23079 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
23080 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
23081 (get_constant): Now trivial for CONSTANT_Utf8.
23083 * jcf.h: Make NEW_CPOOL the default.
23084 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
23086 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
23091 Copyright (C) 1996-2015 Free Software Foundation, Inc.
23093 Copying and distribution of this file, with or without modification,
23094 are permitted in any medium without royalty provided the copyright
23095 notice and this notice are preserved.