1 2012-11-15 Jan Hubicka <jh@suse.cz>
3 * builtins.c (define_builtin): Accept ECF flags and
4 use set_call_expr_flags.
5 (initialize_builtins): Update.
7 2012-10-01 Lawrence Crowl <crowl@google.com>
9 * Make-lang.in (JAVA_OBJS): Add dependence on hash-table.o.
10 (JCFDUMP_OBJS): Add dependence on hash-table.o.
11 (jcf-io.o): Add dependence on hash-table.h.
12 * jcf-io.c (memoized_class_lookups): Change to use type-safe hash table.
14 2012-09-24 Lawrence Crowl <crowl@google.com>
16 * decl.c (java_init_decl_processing): Change to new double_int API.
17 * jcf-parse.c (get_constant): Likewise.
18 * boehm.c (mark_reference_fields): Likewise.
19 (get_boehm_type_descriptor): Likewise.
21 2012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com>
23 * jcf.h (CPool): Use the "atomic" GTY option for the tags field.
24 (bootstrap_method): Likewise for the bootstrap_arguments field.
26 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
28 * java-gimplify.c Include dumpfile.h instead of tree-dump.h
29 * Make-lang.in: Fix dependencies.
31 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
33 * java-tree.h (force_evaluation_order): Remove prototype.
34 * expr.c (force_evaluation_order): Remove unused function.
36 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
38 * decl.c: Do not include libfuncs.h.
39 * class.c: Do not include defaults.h.
40 * jvgenmain.c: Likewise.
42 * Make-lang.in (decl.o): Fix dependencies.
44 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
46 * verify.h: Do not include system.h and coretypes.h here.
47 * verify-impl.c: Include them here instead.
49 2012-07-05 Uros Bizjak <ubizjak@gmail.com>
51 * jcf-io.c (read_zip_member): Initialize d_stream.
53 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
55 * resource.c: Do not include output.h.
57 2012-05-21 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
60 * class.c (emit_register_classes_in_jcr_section): Revise placement
61 of #ifdef JCR_SECTION_NAME.
63 2012-04-22 Jan Hubicka <jh@suse.cz>
65 * class.c (build_utf8_ref): Do not mark varpool node as needed.
67 2012-04-20 Jan Hubicka <jh@suse.cz>
69 * class.c (make_local_function_alias): Do not mark symbol referenced.
71 2012-04-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
73 * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1
74 results to long to match formats.
76 2012-04-11 Andrew Haley <aph@redhat.com>
78 * jcf-reader.c (jcf_parse_bootstrap_methods): Add
81 2012-04-11 Andrew Haley <aph@redhat.com>
83 * jcf.h (bootstrap_method): New.
84 (BootstrapMethods): New.
85 (JCF): Add BootstrapMethods.
86 (enum cpool_tag): Add MethodHandle, MethodType, and InvokeDynamic.
87 * jcf-reader.c (jcf_parse_bootstrap_methods): New.
88 (jcf_parse_constant_pool): Handlers for MethodHandle, MethodType,
90 (jcf_parse_bootstrap_methods): New.
91 * javaop.def (invokedynamic): New opcode.
92 * jcf-parse.c (get_constant): An unknown constant type should not
93 be an internal error, but a fatal one. Make it so.
94 * jcf-dump.c (HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE): New.
95 (HANDLE_END_BOOTSTRAP_METHODS): New.
96 (print_constant): Handlers for MethodHandle, MethodType, and
99 2012-04-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
101 * class.c (emit_register_classes_in_jcr_section): Set DECL_USER_ALIGN.
104 2012-03-29 Steven Bosscher <steven@gcc.gnu.org>
107 * class.c (emit_register_classes_in_jcr_section): New function.
108 (emit_Jv_RegisterClass_calls): New function, split out from ...
109 (emit_register_classes): ... here. Reorganize. Do not call
112 2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
114 * lang.c (java_init_options_struct): Set
115 frontend_set_flag_trapping_math.
117 2012-01-01 Jakub Jelinek <jakub@redhat.com>
119 * jcf-dump.c (version): Update copyright notice dates.
121 2011-12-03 Matthias Klose <doko@ubuntu.com>
123 * expr.c (SPECIAL_WIDE): Fix typo in message.
125 2011-11-23 Jeffrey A Law (law@cygnus.com)
127 * lang.c (java_init_options_struct): Disable optimizations
128 which assume a NULL pointer dereference will cause a fault.
130 2011-11-07 Richard Henderson <rth@redhat.com>
132 * builtins.c (compareAndSwapInt_builtin): Use can_compare_and_swap_p.
133 (compareAndSwapLong_builtin): Likewise.
134 (compareAndSwapObject_builtin): Likewise.
135 (VMSupportsCS8_builtin): Likewise.
137 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
139 * Make-lang.in (jvspec.o): Pass SHLIB instead of SHLIB_LINK.
141 2011-10-15 Tom Tromey <tromey@redhat.com>
142 Dodji Seketeli <dodji@redhat.com>
144 * jcf-parse.c (set_source_filename): Adjust to the new map API.
146 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
148 * class.c (build_static_field_ref): Delete old interface with two
149 parallel arrays to hold standard builtin declarations, and replace
150 it with a function based interface that can support creating
151 builtins on the fly in the future. Change all uses, and poison
152 the old names. Make sure 0 is not a legitimate builtin index.
153 * decl.c (java_init_decl_processing): Ditto.
154 * except.c (compareAndSwapLong_builtin): Ditto.
155 (compareAndSwapObject_builtin): Ditto.
156 (putVolatile_builtin): Ditto.
157 (define_builtin): Ditto.
158 (check_for_builtin): Ditto.
159 * expr.c (rewrite_arglist_getcaller): Ditto.
160 (expand_java_field_op): Ditto.
162 2011-08-24 Joseph Myers <joseph@codesourcery.com>
164 * Make-lang.in (CFLAGS-java/jcf-io.o, CFLAGS-java/jcf-path.o):
166 (java/jcf-io.o, java/jcf-path.o): Remove explicit compilation
169 2011-08-18 Peter Collingbourne <peter@pcc.me.uk>
171 * expr.c (expand_invoke) Use the type of the method rewrite
174 2011-08-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
176 * jcf-dump.c (print_constant): Cast first frexp arg.
178 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
180 * Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS).
182 2011-07-19 Richard Guenther <rguenther@suse.de>
184 * builtins.c (static): Use fold_build_pointer_plus.
185 * class.c (make_class_data): Likewise.
186 (build_symbol_entry): Likewise.
187 * except.c (build_exception_object_ref): Likewise.
188 * expr.c (build_java_arrayaccess): Likewise.
189 (build_field_ref): Likewise.
190 (build_known_method_ref): Likewise.
191 (build_invokevirtual): Likewise.
193 2011-07-06 Richard Guenther <rguenther@suse.de>
195 * decl.c (java_init_decl_processing):
196 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
198 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
200 * builtins.c: Add sync_ or SYNC__ to builtin names.
201 * expr.c: Add sync_ or SYNC__ to builtin names.
203 2011-06-07 Richard Guenther <rguenther@suse.de>
205 * decl.c (java_init_decl_processing): Call build_common_nodes,
206 build_common_nodes_2 at the beginning. Remove then duplicate
209 2011-06-07 Richard Guenther <rguenther@suse.de>
211 * decl.c (java_init_decl_processing): Properly initialize
214 2011-05-30 Joern Rennecke <joern.rennecke@embecosm.com>
217 * expr.c: Include "tm.h" .
219 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
221 * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs.
222 * expr.c (build_jni_stub): Likewise.
224 2011-05-24 Joseph Myers <joseph@codesourcery.com>
226 * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead
229 2011-05-20 Joseph Myers <joseph@codesourcery.com>
231 * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and
233 (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o.
234 (JVGENMAIN_OBJS): Remove errors.o and intl.o.
235 (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H).
236 * jcf-dump.c: Include diagnostic.h.
237 (main): Initialize diagnostics.
238 * jvgenmain.c: Include diagnostic.h.
239 (main): Initialize diagnostics.
241 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
243 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
245 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
247 * java-tree.h (global_bindings_p): Adjust prototype.
248 * decl.c (global_bindings_p): Return bool.
250 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
252 * expr.c (expand_java_switch): Call build_case_label.
253 (expand_java_add_case): Likewise.
255 2011-04-29 Richard Guenther <rguenther@suse.de>
258 * constants.c (build_constants_constructor): Use ptr_type_node for
261 2011-04-20 Jim Meyering <meyering@redhat.com>
263 * jcf-parse.c (java_parse_file): Remove useless if-before-free.
265 2011-04-18 Jim Meyering <meyering@redhat.com>
267 * jcf-parse.c: Fix typo in comment.
269 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
271 * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
273 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
275 * java-tree.h (union lang_tree_node): Check for TS_COMMON before
278 2011-04-11 Martin Jambor <mjambor@suse.cz>
280 * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
281 cgraph_node and handle returned NULL.
283 2011-03-25 Kai Tietz <ktietz@redhat.com>
285 * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
287 (set_source_filename): Likewise.
288 * win32-host.c (jcf_open_exact_case): Likewise.
290 2011-03-21 Kai Tietz <ktietz@redhat.com>
293 * lang.c (java_attribute_table): Adjust table.
295 2011-02-13 Joseph Myers <joseph@codesourcery.com>
297 * jvspec.c (jvgenmain_spec): Remove %{a*}.
299 2011-01-21 Kai Tietz <kai.tietz@onevision.com>
302 * decl.c (java_init_decl_processing): Remove
303 va_list_type_node related type initializations.
305 2011-01-11 Kai Tietz <kai.tietz@onevision.com>
308 * decl.c (java_init_decl_processing): Initialize
309 long_integer_type_node.
311 2011-01-07 Kai Tietz <kai.tietz@onevision.com>
314 * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
316 2011-01-07 Kai Tietz <kai.tietz@onevision.com>
318 * decl.c (java_init_decl_processing): Setup va_list_type_node.
320 2011-01-03 Jakub Jelinek <jakub@redhat.com>
322 * jcf-dump.c (version): Update copyright notice dates.
324 2010-12-15 Dave Korn <dave.korn.cygwin@gmail.com>
326 * decl.c (java_init_decl_processing): Initialise integer_three_node.
327 * lang.c (put_decl_node): Handle nested function decls.
329 2010-12-07 Joseph Myers <joseph@codesourcery.com>
331 * jcf-parse.c: Don't include assert.h.
332 (java_parse_file): Use gcc_assert.
334 2010-12-03 Joseph Myers <joseph@codesourcery.com>
336 * lang.opt (static-libgcj): New option.
338 2010-12-01 Joseph Myers <joseph@codesourcery.com>
340 * jcf-parse.c: Don't include toplev.h.
341 * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
343 2010-11-30 Joseph Myers <joseph@codesourcery.com>
345 * boehm.c: Don't include toplev.h.
346 * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
348 2010-11-30 Joseph Myers <joseph@codesourcery.com>
350 * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
351 verify-glue.c: Don't include toplev.h.
352 * Make-lang.in: Dependencies for above files changed to remove
355 2010-11-29 Joseph Myers <joseph@codesourcery.com>
357 * boehm.c: Include "config.h" instead of <config.h>.
358 * builtins.c: Don't include <stdarg.h>.
359 * class.c: Don't include "stdio.h".
360 (O_BINARY): Don't define here.
361 * jcf-depend.c: Don't include <assert.h>.
362 (jcf_dependency_set_dep_file, jcf_dependency_init,
363 jcf_dependency_write): Use gcc_assert.
364 * jcf-io.c (O_BINARY): Don't define here.
365 * jcf-path.c: Don't include "tm.h".
366 (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
367 * resource.c: Don't include "stdio.h".
368 (O_BINARY): Don't define here.
369 * verify-impl.c: Don't include <stdio.h>.
371 2010-11-17 Joseph Myers <joseph@codesourcery.com>
373 * jcf-parse.c (java_parse_file): Take no arguments.
374 * java-tree.h (java_parse_file): Update prototype.
376 2010-11-09 Joern Rennecke <amylaar@spamcop.net>
377 Andrew Haley <aph@redhat.com>
380 * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
382 2010-11-12 Joseph Myers <joseph@codesourcery.com>
384 * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
385 * lang.c (java_handle_option): Take location_t parameter.
387 2010-11-10 Joseph Myers <joseph@codesourcery.com>
389 * expr.c (expand_java_field_op): Use %' in diagnostic.
390 * jcf-parse.c (java_parse_file): Use %' in diagnostics.
391 * jvspec.c (lang_specific_driver): Use %' in diagnostic.
392 * lang.c (java_post_options): Use %' in diagnostics.
394 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
397 * class.c: Include target.h.
398 (make_local_function_alias):
399 Use targetm.asm_out.generate_internal_label.
400 * expr.c (lookup_label, generate_name): Likewise.
402 2010-11-03 Joern Rennecke <joern.rennecke@embecosm.com>
405 * jfc-parse.c (target.h): Include.
406 (handle_constant): Use targetm.words_big_endian and
407 targetm.float_words_big_endian.
408 (get_constant): Use targetm.float_words_big_endian.
410 2010-10-13 Richard Henderson <rth@redhat.com>
412 * lang.c (java_eh_personality): Update call to
413 build_personality_function.
415 2010-10-12 Joseph Myers <joseph@codesourcery.com>
417 * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
420 2010-10-11 Nathan Froyd <froydnj@codesourcery.com>
422 * decl.c (java_init_decl_processing): Use build_function_type_list
423 instead of build_function_type.
424 * jcf-parse.c (java_emit_static_constructor): Likewise.
425 * builtins.c (initialize_builtins): Likewise.
427 2010-10-08 Joseph Myers <joseph@codesourcery.com>
429 * lang.c (java_init_options_struct): New. Split out from
431 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
433 2010-10-04 Andi Kleen <ak@linux.intel.com>
435 * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
438 2010-09-29 Joseph Myers <joseph@codesourcery.com>
440 * lang.opt: Don't use VarExists.
442 2010-09-29 Joseph Myers <joseph@codesourcery.com>
444 * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
445 flag_force_classes_archive_check, flag_redundant, flag_newer,
446 flag_use_divide_subroutine, flag_use_atomic_builtins,
447 flag_use_boehm_gc, flag_hash_synchronization,
448 flag_check_references, flag_optimize_sci, flag_indirect_classes,
449 flag_indirect_dispatch, flag_store_check,
450 flag_reduced_reflection): Remove.
451 * jcf-dump.c (flag_newer): Remove.
452 * jcf.h (quiet_flag): Remove.
453 * parse.h (quiet_flag): Remove.
455 2010-09-28 Richard Henderson <rth@redhat.com>
457 * lang.c: Include "target.h".
458 (java_eh_personality): Use targetm.except_unwind_info.
459 * Make-lang.in (lang.o): Update deps.
461 2010-09-27 Andrew Haley <aph@redhat.com>
464 * jvgenmain.c (main): Fix arg processing.
466 2010-09-22 Joseph Myers <joseph@codesourcery.com>
468 * jvspec.c (lang_specific_driver): Handle OPT__help instead of
470 * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
471 -dependencies, -encoding, -extdirs, -include-directory,
472 -include-directory=, -output-class-directory,
473 -output-class-directory=, -resource, -resource=,
474 -user-dependencies): New.
476 2010-09-16 Richard Guenther <rguenther@suse.de>
478 * jcf-parse.c (current_file_list): Remove.
479 (java_parse_file): Use build_translation_unit_decl. Adjust.
481 2010-09-03 Joseph Myers <joseph@codesourcery.com>
485 2010-09-03 H.J. Lu <hongjiu.lu@intel.com>
488 * jvgenmain.c (main): Check "-D XXX=YYY".
490 2010-09-02 Joseph Myers <joseph@codesourcery.com>
492 * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
494 2010-09-02 Joseph Myers <joseph@codesourcery.com>
496 * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
497 fCLASSPATH=): Mark as Java options and as aliases.
498 * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
499 (lang_specific_driver): Don't handle options marked as aliases.
500 * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
502 2010-08-22 Joseph Myers <joseph@codesourcery.com>
504 * Make-lang.in (jvspec.o): Update dependencies.
505 * jvspec.c: Include opts.h.
507 (find_spec_file): Do not add leading -specs=.
508 (lang_specific_driver): Use cl_decoded_option structures.
509 * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
510 extdirs, fmain=, s-bc-abi): New options.
512 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
514 * class.c: Use FOR_EACH_VEC_ELT.
516 * jcf-parse.c: Likewise.
517 * resource.c: Likewise.
519 2010-08-16 Joseph Myers <joseph@codesourcery.com>
521 * lang.opt (MD_, MMD_, version): Mark RejectDriver.
523 2010-08-05 David Daney <ddaney@caviumnetworks.com>
525 * class.c (build_utf8_ref): Fix code formatting from previous commit.
527 2010-08-05 David Daney <ddaney@caviumnetworks.com>
529 * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
531 2010-07-27 Joseph Myers <joseph@codesourcery.com>
533 * lang.c (java_handle_option): Update prototype and return value
536 2010-07-27 Joseph Myers <joseph@codesourcery.com>
538 * lang.c (java_option_lang_mask): New.
539 (java_init_options): Update prototype.
540 (LANG_HOOKS_OPTION_LANG_MASK): Define.
542 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
544 * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
549 * jcf-parse.c: Likewise.
550 * typeck.c: Likewise.
551 * verify-glue.c: Likewise.
553 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
555 * boehm.c: Include diagnostic-core.h in every file that includes
558 * constants.c: Likewise.
560 * except.c: Likewise.
562 * jcf-parse.c: Likewise.
563 * mangle.c: Likewise.
564 * mangle_name.c: Likewise.
565 * resource.c: Likewise.
566 * typeck.c: Likewise.
567 * verify-glue.c: Likewise.
569 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
572 * class.c (make_class_data): Cast result of VEC_length calls to int.
574 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
576 * constants.c (build_constants_constructor): Use build_constructor
577 instead of build_constructor_from_list.
578 * class.c (make_method_value): Likewise.
579 (get_dispatch_table): Likewise.
580 (make_class_data): Likewise.
581 (emit_indirect_register_classes): Likewise.
582 (emit_symbol_table): Likewise.
583 (add_assertion_table_entry): Likewise.
584 (emit_assertion_table): Likewise.
585 (make_field_value): Use build_constructor_single instead of
586 build_constructor_from_list.
588 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
590 * java-tree.h (struct lang_type) [catch_classes]: Change type to a
592 * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
593 instead of tree_cons.
594 * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
595 (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
597 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
599 * lang.c: Do not include except.h
600 * except.c: Likewise.
601 (doing_eh): New, moved from except.c (in gcc/) but removed the
603 (maybe_start_try): Update doing_eh call.
604 * Make-lang.in: Update dependencies.
606 2010-06-23 Anatoly Sokolov <aesok@post.ru>
608 * decl.c (java_init_decl_processing): Use double_int_to_tree instead
609 of build_int_cst_wide.
610 * boehm.c (set_bit): Remove.
611 (mark_reference_fields): Use double_int type for 'mask' argument.
612 Use double_int_setbit instead of set_bit.
613 (get_boehm_type_descriptor): Use double_int_setbit instead of
614 set_bit. Use double_int_to_tree instead of build_int_cst_wide.
616 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
618 * gcj.texi: Move to GFDL version 1.3. Fix copyright years.
620 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
622 * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
624 * jcf-parse.c (java_parse_file): Likewise.
625 (process_zip_dir): Likewise.
627 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
628 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
630 * expr.c (add_type_assertion): Likewise.
632 * decl.c (make_binding_level): Likewise.
633 (java_dup_lang_specific_decl): Likewise.
635 * constants.c (set_constant_entry): Likewise.
636 (cpool_for_class): Likewise.
638 * class.c (add_method_1): Likewise.
639 (java_treetreehash_new): Likewise.
641 * java-tree.h (struct lang_type): Add variable_size GTY option.
642 (struct lang_decl): Likewise.
644 * jch.h (struct cpool_entry): Likewise.
646 * java-tree.h (java_treetreehash_create): Remove parameter ggc.
648 * except.c (prepare_eh_table_type): Update
649 java_treetreehash_create call.
651 * class.c (add_method_1): Update java_treetreehash_create call.
652 (java_treetreehash_create): Remove parameter gc. Use
655 2010-06-04 Joseph Myers <joseph@codesourcery.com>
657 * jvspec.c (lang_specific_driver): Use GCC-specific formats in
660 2010-05-30 Steven Bosscher <steven@gcc.gnu.org>
662 * except.c: Include tm.h.
664 2010-05-28 Joseph Myers <joseph@codesourcery.com>
666 * jvspec.c (lang_specific_driver): Use fatal_error instead of
667 fatal. Use warning instead of error for warnings.
669 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
671 * expr.c (get_symbol_table_index): Add spaces in expression.
673 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
675 * java-tree.h (method_entry): Declare. Declare VECs containing it.
676 (struct lang_type): Change type of otable_methods, atable_methods, and
677 itable_methods to VECs. Fix comment for atable_methods.
678 (emit_symbol_table): Take a VEC instead of a tree.
679 (get_symbol_table_index): Take a VEC * instead of a tree *.
680 * class.c (add_table_and_syms): Take a VEC instead of a tree.
681 (emit_symbol_table): Update for changed parameter type.
682 * expr.c (get_symbol_table_index): Likewise.
684 2010-05-27 Steven Bosscher <steven@gcc.gnu.org>
686 * buildings.c: Pretend to be a backend file by undefining
687 IN_GCC_FRONTEND (still need rtl.h here).
689 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
691 * java-tree.h (struct lang_decl_func): Change type of throws_list
693 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
694 of DECL_FUNCTION_THROWS.
695 * class.c (make_method_value): Likewise.
697 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
699 * class.c (utf8_decl_list): Delete.
700 (build_utf8_ref): Remove references to it.
701 * java-tree.h (all_class_list): Delete.
702 (predef_filenames): Delete.
703 (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
705 * jcf-parse.c (parse_roots): Decrease size to 2.
706 (current_file_list): Convert to a VEC.
707 (all_class_list): Declare.
708 (jcf_parse): Adjust for new type of all_class_list.
709 (java_layout_seen_class_methods): Likewise.
710 (predefined_filenames): Declare.
711 (add_predefined_file): Use it.
712 (predefined_filename_p): Likewise.
713 (java_parse_file): Adjust for new type of current_file_list.
715 2010-05-25 Jakub Jelinek <jakub@redhat.com>
717 * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
721 * java-tree.h (pending_static_fields): New extern declaration.
722 (java_write_globals): New prototype.
723 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
724 * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
725 of a static field push it into pending_static_fields vector.
726 * class.c (pending_static_fields): New variable.
727 (add_field): If static field is not DECL_EXTERNAL, push it into
728 pending_static_fields vector.
729 (java_write_globals): New function.
731 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
733 * expr.c (quick_stack): Change type to a VEC. Update comment.
734 (tree_list_free_list): Delete.
735 (flush_quick_stack): Update for quick_stack type change.
736 (push_value): Likewise.
737 (pop_value): Likewise.
739 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
741 * java-gimplify.c: Do not include tm.h, toplev.h.
742 * typeck.c: Do not include tm.h.
743 * mangle_name.c: Do not include tm.h.
744 * jcf-dump.c: Do not include tm.h, ggc.h.
745 * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
746 * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
748 * jcf-parse.c: Do not include tm.h and tm_p.h.
749 * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
750 target.h, and expr.h.
751 * except.c: Do not include tm.h, rtl.h, function.h.
752 * builtins.c: Do not include convert.h. Explain why RTL headers
753 have to be included here.
754 * verify-glue.c: Do not include tm.h.
755 * jcf-depend.c: Do not include tm.h.
756 * jcf-reader.c: Include ggc.h.
757 * jcf-io.c: Do not include tm.h, toplev.h.
758 * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
760 * lang.c: Do not include rtl.h, expr.h.
761 * Make-lang.in: Update dependencies.
763 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
765 * jcf-parse.c: Include bitmap.h.
766 * Make-lang.in: Update dependencies.
768 2010-05-20 Jakub Jelinek <jakub@redhat.com>
771 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
774 2010-05-19 Anatoly Sokolov <aesok@post.ru>
776 * jcf-parse.c (get_constant): Use double_int_to_tree instead of
777 build_int_cst_wide_type.
779 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
781 * expr.c (pop_arguments): Fix use of undeclared variable.
783 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
785 * expr.c (expand_java_multianewarray): Use build_call_vec instead of
787 (pop_arguments): Return a VEC instead of a tree. Take a method type
788 rather than a list of argument types.
789 (rewrite_rule): Change signature. of rewrite_arglist member.
790 (rewrite_arglist_getcaller): Update signature.
791 (rewrite_arglist_getclass): Likewise.
792 (maybe_rewrite_invocation): Update for rewrite_arglist change.
793 (build_known_method_ref): Take a VEC instead of a tree.
794 (invoke_build_dtable): Likewise.
795 (expand_invoke): Update calls to pop_arguments. Use build_call_vec
796 instead of build_call_list.
797 (build_jni_stub): Use build_call_vec instead of build_call_list.
798 * java-tree.h (maybe_rewrite_invocation): Update declaration.
799 (build_known_method_ref): Likewise.
800 (invoke_build_dtable): Likewise.
802 2010-05-14 Nathan Froyd <froydnj@codesourcery.com>
805 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
806 vector. Move call to build_constructor...
807 (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear
808 TREE_CONSTANT on the constructor.
809 (PUSH_SUPER_VALUE): Change first argument to a vector.
810 (PUSH_FIELD_VALUE): Likewise.
811 * resource.c (compile_resource_data): Update calls to above macros.
812 * constants.c (build_constants_constructor): Likewise.
813 * class.c (build_utf8_ref): Likewise.
814 (make_field_value): Likewise.
815 (make_method_value): Likewise.
816 (add_table_and_syms): New function.
817 (make_class_data): Call it. Update calls to above macros.
818 (build_symbol_table_entry): New function.
819 (build_symbol_entry): Call it. Update calls to above macros.
820 (emit_symbol_table): Likewise.
821 (make_catch_class_record): Update calls to above macros.
822 (build_assertion_table_entry): New function.
823 (add_assertion_table_entry): Call it.
824 (emit_assertion_table): Likewise.
826 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
829 * lang.c (java_handle_option): Add argument kind.
831 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
833 * decl.c (java_init_decl_processing): Remove argument in call to
836 2010-04-07 Jakub Jelinek <jakub@redhat.com>
838 * exception.cc (_Jv_Throw): Avoid set but not used warning.
839 * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
840 sizeof to avoid set but not used warnings.
842 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
844 * lang.c (java_post_options): Constify variable "dot".
846 * jcf-parse.c (set_source_filename): Constify variable "dot".
847 (load_class): Constify variable "separator".
848 Use get_identifier_with_length.
850 * jvspec.c (lang_specific_driver): Constify two variables named "p".
852 2010-01-09 Jakub Jelinek <jakub@redhat.com>
854 * jcf-dump.c (version): Update copyright notice dates.
856 2009-11-28 Jakub Jelinek <jakub@redhat.com>
858 * jvspec.c (lang_specific_driver): Remove unused
859 saw_verbose_flag variable.
860 * jcf-dump.c (main): Remove unused general_purpose_bits
862 * builtins.c (initialize_builtins): Remove unused float_ftype_float
864 * expr.c (java_stack_pop): Remove unused val variable.
865 (build_jni_stub): Remove unused res_type variable.
866 * verify-impl.c (check_field_constant): Remove unused len variable.
868 2009-10-20 Joel Dice <dicej@mailsnare.net>
871 * mangle_name.c (append_unicode_mangled_name): Fix mangling
872 of names with multiple underscores and "U".
873 (unicode_mangling_length): Likewise.
875 2009-10-03 Simon Baldwin <simonb@google.com>
877 * config-lang.in (lang_dirs): Remove zlib.
879 2009-09-28 Richard Henderson <rth@redhat.com>
881 * builtins.c (initialize_builtins): Update call to
882 build_common_builtin_nodes.
883 * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
885 2009-09-14 Richard Henderson <rth@redhat.com>
887 * builtins.c (initialize_builtins): Update call to
888 build_common_builtin_nodes.
889 * decl.c (java_init_decl_processing): Don't call
890 default_init_unwind_resume_libfunc.
891 * except.c: Include tree-iterator.h.
892 (build_exception_object_var): New.
893 (build_exception_object_ref): Use it.
894 (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
895 Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
896 * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
898 2009-09-13 Richard Guenther <rguenther@suse.de>
899 Rafael Avila de Espindola <espindola@google.com>
901 * decl.c (do_nothing): Remove.
902 (java_init_decl_processing): Do not set lang_eh_runtime_type.
903 * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
904 * lang.c (java_eh_personality): New.
905 (java_eh_personality_decl): Likewise.
906 (LANG_HOOKS_EH_PERSONALITY): Define.
908 2009-09-03 Diego Novillo <dnovillo@google.com>
910 * lang.c (lang_hooks): Remove const qualifier.
912 2009-09-01 Jakub Jelinek <jakub@redhat.com>
914 * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
917 2009-09-01 Richard Guenther <rguenther@suse.de>
919 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
920 * java-tree.h (java_mark_addressable): Likewise.
921 * typeck.c (java_mark_addressable): Likewise.
923 2009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
925 * Make-lang.in (java.install-pdf): Install gcj.pdf in
926 $(pdfdir)/gcc, alongside the other manuals.
928 2009-08-12 Andrew Haley <aph@redhat.com>
930 * builtins.c (compareAndSwapInt_builtin): Use
931 flag_use_atomic_builtins.
932 (compareAndSwapLong_builtin): Likewise.
933 (compareAndSwapObject_builtin): Likewise.
934 * jvspec.c: Add flag_use_atomic_builtins.
935 * gcj.texi: Likewise.
936 * java-tree.h: Likewise.
937 * lang.opt: Likewise.
939 2009-08-11 Dodji Seketeli <dodji@redhat.com>
942 * lang.c (put_decl_node): Outputs different level of information
943 depending on the verbosity level.
945 2009-07-31 Andrew Haley <aph@redhat.com>
948 * decl.c (java_replace_references): Set EXPR_LOCATION on all
949 generated expressions.
950 (binding_level.loc): new field.
951 (clear_binding_level): Initialize loc.
952 (set_input_location): New function.
953 (pushlevel): Set new binding_level.loc.
954 (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
955 (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
956 (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
958 2009-07-17 Richard Guenther <rguenther@suse.de>
961 * java-gimplify.c (java_genericize): Do not gimplify here.
962 But replace all local references.
963 (java_gimplify_expr): Do not replace local references here.
964 (java_gimplify_modify_expr): Likewise.
965 * jcf-parse.c (java_parse_file): Do not finalize the CU or
966 optimize the cgraph here.
967 * decl.c (java_replace_reference): Make static.
968 (java_replace_references): New function.
969 (end_java_method): Clear base_decl_map.
970 * java-tree.h (java_replace_references): Declare.
971 (java_replace_reference): Remove.
973 2009-07-14 Taras Glek <tglek@mozilla.com>
974 Rafael Espindola <espindola@google.com>
976 * Make-lang.in (java.install-plugin): New target for
977 installing plugin headers.
979 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
981 * class.c: Replace %J by an explicit location. Update all calls.
983 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
985 * jcf-parse.c: Replace %H by an explicit location. Update all calls.
987 2009-06-29 Andrew Haley <aph@redhat.com>
990 * java-tree.h (cxx_keyword_p): New declaration.
991 * mangle_name.c (utf8_cmp): Move here from mangle.c.
992 (cxx_keywords): Likewise.
993 (cxx_keyword_p): Likewise.
994 (MANGLE_CXX_KEYWORDS): New macro.
995 (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
996 (append_gpp_mangled_name): Likewise.
997 * mangle.c: Move code to mangle_name.c.
998 (mangle_member_name): Don't call cxx_keyword_p.
1000 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
1002 * java-gimplify.c (java_gimplify_block): New argument to
1004 * expr.c (force_evaluation_order): Same.
1005 * typeck.c: Add location to build_decl or PUSH_FIELD calls.
1008 * jcf-parse.c: Same.
1009 * constants.c: Same.
1014 * java-tree.h (PUSH_FIELD): Add location field.
1016 2009-06-09 Ian Lance Taylor <iant@google.com>
1018 * verify.h: Remove extern "C".
1020 2009-06-07 Ian Lance Taylor <iant@google.com>
1022 * jcf-parse.c (handle_constant): Change local variable 'kind' to
1025 2009-06-01 Ian Lance Taylor <iant@google.com>
1027 * jcf-io.c (find_class): Use CONST_CAST.
1029 2009-05-27 Ian Lance Taylor <iant@google.com>
1031 * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
1033 (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
1035 2009-05-26 Ian Lance Taylor <iant@google.com>
1037 * Make-lang.in (jvspec.o): Use $(COMPILER).
1038 ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
1039 (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
1041 2009-05-12 Alexandre Oliva <aoliva@redhat.com>
1043 * Make-lang.in (GCJ): Renamed to...
1046 2009-04-27 Ian Lance Taylor <iant@google.com>
1048 * builtins.c (java_builtins): Add casts to enum type.
1049 * verify-impl.c (check_class_constant): Add cast to enum type.
1050 (check_constant, check_wide_constant): Likewise.
1052 2009-04-27 Richard Guenther <rguenther@suse.de>
1055 * constants.c (build_constants_constructor): Retain the old
1056 pointer type as valid TYPE_POINTER_TO after patching the
1057 type of the constant pool decl.
1059 2009-04-24 Ian Lance Taylor <iant@google.com>
1061 * jcf-parse.c (handle_constant): Add cast to enum type.
1063 2009-04-21 Taras Glek <tglek@mozilla.com>
1065 * builtins.c: Update GTY annotations to new syntax
1067 * java-tree.h: Likewise
1071 2009-04-21 Joseph Myers <joseph@codesourcery.com>
1073 * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
1076 2009-04-18 Ian Lance Taylor <iant@google.com>
1078 * verify-impl.c (verify_instructions_0): Add cast to enum type.
1080 2009-04-09 Paolo Bonzini <bonzini@gnu.org>
1082 * builtins.c (compareAndSwapLong_builtin,
1083 compareAndSwapInt_builtin, compareAndSwapObject_builtin,
1084 VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
1086 2009-03-31 Richard Guenther <rguenther@suse.de>
1088 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
1089 the first operand of binary and comaprison expressions.
1091 2009-03-30 Joseph Myers <joseph@codesourcery.com>
1093 PR rtl-optimization/323
1094 * lang.c (java_post_options): Set flag_excess_precision_cmdline.
1095 Give an error for -fexcess-precision=standard for processors where
1096 the option is significant.
1098 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1100 * lang.opt: Unify help text for -Wdeprecated.
1102 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1104 * jcf-dump.c (version): Update copyright notice dates.
1106 2009-01-16 Richard Guenther <rguenther@suse.de>
1108 PR tree-optimization/38835
1110 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
1112 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
1115 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
1117 2008-11-04 Andrew Haley <aph@redhat.com>
1120 * jcf-parse.c (java_emit_static_constructor): Don't call
1121 cgraph_build_static_cdtor. Rewrite.
1123 2008-10-24 Jakub Jelinek <jakub@redhat.com>
1125 * Make-lang.in (check-java-subtargets): New target.
1127 2008-10-16 David Edelsohn <edelsohn@gnu.org>
1130 * Make-lang.in (class.o): Depend on $(TM_P_H).
1132 * class.c: Include tm_p.h.
1133 * expr.c: Include tm_p.h.
1135 2008-10-14 Andrew Haley <aph@redhat.com>
1137 * constants.c (build_constant_data_ref): Make sure we only build
1138 one copy of the decl for the constant pool.
1140 2008-09-22 Andrew Haley <aph@redhat.com>
1142 * expr.c (rules): Add new rule for
1143 gnu.java.lang.VMCPStringBuilder.toString.
1144 (rewrite_rule.new_classname): New field.
1145 (maybe_rewrite_invocation): Use new_classname field instead of
1146 DECL_CONTEXT (*method_p).
1147 Allow rewrite_arglist to be NULL.
1149 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1151 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1152 (java_get_callee_fndecl): Kill.
1154 2008-09-17 Jan Hubicka <jh@suse.cz>
1157 * class.c (add_method_1): Do not initialize DECL_INLINE.
1158 (make_local_function_alias): Likewise.
1159 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
1160 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
1162 2008-09-09 Richard Guenther <rguenther@suse.de>
1164 * decl.c (build_result_decl): Remove no longer applicable
1167 2008-09-05 David Daney <ddaney@avtrex.com>
1169 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
1171 2008-08-21 David Daney <ddaney@avtrex.com>
1173 * class.c (make_class_data): Don't add field_index when
1174 flag_reduced_reflection set.
1176 2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
1178 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
1180 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1183 * lang.c (java_handle_option): Replace set_Wunused with
1186 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1188 * gcj.texi: Update copyright years. Do not list GPL as
1191 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1193 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
1196 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
1199 2008-07-29 Jan Hubicka <jh@suse.cz>
1201 * lang.c (java_post_options): Remove handling of flag_no_inline.
1203 2008-07-28 Richard Guenther <rguenther@suse.de>
1205 Merge from gimple-tuples-branch.
1207 2008-07-18 Richard Guenther <rguenther@suse.de>
1209 * expr.c: Include tree-iterator.h.
1210 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
1212 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1214 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
1217 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1219 * java-gimplify.c (java_gimplify_expr): Same.
1220 (java_gimplify_modify_expr): Same.
1221 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
1223 2008-05-02 Diego Novillo <dnovillo@google.com>
1225 * expr.c (build_java_throw_out_of_bounds_exception): Fix
1226 mixed declarations and code.
1228 2008-05-02 Doug Kwan <dougkwan@google.com>
1230 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
1231 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
1233 2008-02-19 Diego Novillo <dnovillo@google.com>
1235 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1237 * java-gimplify.c (java_gimplify_self_mod_expr): Change
1238 gimple_seq arguments to gimple_seq *. Update all users.
1240 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
1242 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
1244 (java_gimplify_self_mod_expr): Same.
1245 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
1248 2008-07-24 Jan Hubicka <jh@suse.cz>
1250 * java/decl.c: Include cgraph.h
1251 (end_java_method): Remove non-unit-at-a-time code.
1252 (java_mark_decl_local): Likewise; sanity check that we don't touch
1255 2008-07-15 Jan Hubicka <jh@suse.cz>
1257 * lang.c (java_init_options): Enable unit-at-a-time by default.
1259 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1261 * Make-lang.in (jvspec.o): Fix dependencies.
1263 2008-07-06 Tom Tromey <tromey@redhat.com>
1265 * Make-lang.in (java/parse.o-warn): Remove.
1266 (java/jcf-io.o-warn): Remove.
1268 2008-07-05 Tom Tromey <tromey@redhat.com>
1270 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
1271 (compare_path): Remove.
1272 (java_or_class_file): Likewise.
1273 (memoized_dirlist_entry): Likewise.
1274 (memoized_dirlist_hash): Likewise.
1275 (memoized_dirlist_lookup_eq): Likewise.
1276 (memoized_dirlists): Likewise.
1277 (caching_stat): Likewise.
1278 (find_class): Use stat.
1279 * jcf.h (JCF_USE_SCANDIR): Remove.
1281 2008-06-30 Joshua Sumali <jsumali@redhat.com>
1283 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1284 doc/rebuild-gcj-db.1
1285 (java.uninstall): Likewise.
1286 (java.maintainer-clean): Likewise.
1287 (aot-compile.pod): New rule.
1288 (rebuild-gcj-db.pod): New rule.
1289 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1290 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1292 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1294 * Make-lang.in (java/jcf-io.o-warn): New.
1296 2008-06-24 Tom Tromey <tromey@redhat.com>
1298 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1299 * expr.c (add_type_assertion): Rename argument.
1300 (build_java_arrayaccess): Don't name variable 'throw'.
1301 (ARRAY_NEW_MULTI): Don't name variable 'class'.
1302 * jcf-io.c (find_class): Don't name variable 'class'.
1303 * mangle.c (compression_table_add): Don't name variable 'new'.
1304 * constants.c (cpool_for_class): Rename argument.
1305 (alloc_constant_fieldref): Likewise.
1306 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1308 (read_class): Likewise.
1309 (parse_zip_file_entries): Likewise.
1310 (process_zip_dir): Likewise.
1311 * decl.c (java_mark_class_local): Rename argument.
1312 * class.c (GEN_TABLE): Use type_name, not typename.
1313 (gen_indirect_dispatch_tables): Likewise.
1314 (add_field): Rename argument.
1315 (is_compiled_class): Likewise.
1316 (safe_layout_class): Likewise.
1317 (emit_assertion_table): Likewise.
1318 * typeck.c (has_method): Rename argument.
1320 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1322 * class.c (ident_subst, mangled_classname, unmangle_classname,
1323 gen_indirect_dispatch_tables, add_method_1,
1324 build_fieldref_cache_entry, make_local_function_alias,
1325 layout_class, java_treetreehash_find, java_treetreehash_new,
1326 split_qualified_name): Fix for -Wc++-compat.
1327 * constants.c (set_constant_entry, cpool_for_class): Likewise.
1328 * decl.c (make_binding_level, java_dup_lang_specific_decl,
1329 start_java_method): Likewise.
1330 * except.c (prepare_eh_table_type): Likewise.
1331 * expr.c (type_assertion_hash, note_instructions): Likewise.
1332 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1333 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1334 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1336 * jcf-parse.c (reverse, java_read_sourcefilenames,
1337 annotation_grow, rewrite_reflection_indexes, java_parse_file,
1338 process_zip_dir): Likewise.
1339 * jcf-path.c (add_entry, add_path, jcf_path_init,
1340 jcf_path_extdirs_arg): Likewise.
1341 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1342 * jvgenmain.c (do_mangle_classname): Likewise.
1343 * lang.c (put_decl_string): Likewise.
1344 * verify-impl.c (make_state_copy, make_state, add_new_state):
1347 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1349 * gcj.texi: Expand TABs, remove whitespace from blank lines.
1351 2008-06-14 Tom Tromey <tromey@redhat.com>
1354 * class.c (build_class_ref): Initialize this_classdollar when
1357 2008-05-23 Andrew Haley <aph@redhat.com>
1359 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1360 pathname of source file.
1362 2008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1364 * jcf-dump.c (print_constant): Use
1365 HOST_LONG_LONG_FORMAT.
1367 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1369 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1372 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1374 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1375 (build_classdollar_field): Don't set TREE_INVARIANT.
1376 (get_dispatch_table): Don't set TREE_INVARIANT.
1377 (make_class_data): Don't set TREE_INVARIANT.
1378 (build_symbol_entry): Don't set TREE_INVARIANT.
1379 (emit_symbol_table): Don't set TREE_INVARIANT.
1380 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1381 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1382 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1383 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1385 2008-04-03 Tom Tromey <tromey@redhat.com>
1387 * Make-lang.in (java_OBJS): New variable.
1389 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1391 * java-tree.h (insert_block): Kill.
1392 * decl.c (insert_block): Kill.
1394 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1396 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1397 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1400 2008-03-27 Tom Tromey <tromey@redhat.com>
1402 * Make-lang.in: Revert automatic dependency patch.
1404 2008-03-25 Tom Tromey <tromey@redhat.com>
1406 * Make-lang.in: Removed most explicit .o targets.
1407 (java/jvspec.o): Reduce to variable setting. Moved to java/.
1408 ($(GCJ)$(exeext)): Update.
1409 (JAVA_OBJS): New variable.
1410 (JCFDUMP_OBJS): Reformat.
1411 (java_OBJS): New variable.
1412 (java/jvspec.o-warn): Update.
1413 (java/parse.o-warn): Remove.
1414 (JAVA_TREE_H): Remove.
1415 (java/jcf-io.o): Reduce to variable setting.
1416 (ALL_CPPFLAGS): Likewise.
1418 2008-03-12 Paolo Bonzini <bonzini@gnu.org>
1420 * mangle.c (java_mangle_decl): Remove dead check.
1422 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1424 * jcf-parse.c (java_parse_file): Assert binding levels are
1426 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1429 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1431 * jcf-dump.c (version): Update copyright notice dates.
1433 2008-02-29 Tom Tromey <tromey@redhat.com>
1435 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1437 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1439 2008-02-26 Tom Tromey <tromey@redhat.com>
1441 * lang.c (java_post_options): Remove conditional.
1442 * expr.c (expand_byte_code): Remove old location code.
1443 * jcf-parse.c (set_source_filename): Remove old location code.
1444 (give_name_to_class): Likewise.
1445 (jcf_parse): Likewise.
1446 (duplicate_class_warning): Likewise.
1447 (parse_class_file): Likewise.
1448 (java_parse_file): Likewise.
1449 * decl.c (finish_method): Remove old location code.
1450 * class.c (push_class): Remove old location code.
1452 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1455 * Make-lang.in (jc1): Add $(GMPLIBS).
1457 2008-01-23 David Daney <ddaney@avtrex.com>
1459 * class.c (hide) Rename to...
1460 (java_hide_decl) ... this throughout, and make public.
1461 * resource.c (Jr_count): Remove.
1462 (compile_resource_data): Call java_mangle_resource_name to generate
1463 decl name. Make resource decl public and hidden.
1464 * mangle.c (java_mangle_resource_name): New function.
1465 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1468 2008-01-04 Andrew Haley <aph@redhat.com>
1471 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1474 2008-01-03 Andrew Haley <aph@redhat.com>
1477 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1478 we're about to re-layout the type.
1480 2007-12-20 Alexandre Oliva <aoliva@redhat.com>
1482 * lang.c (java_classify_record): Don't return
1483 RECORD_IS_INTERFACE for now.
1485 2007-12-18 Andrew Haley <aph@redhat.com>
1488 * jcf-parse.c (java_parse_file): Remove call to
1489 java_mark_class_local.
1490 (parse_class_file): Reinstate call to java_mark_class_local here.
1491 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1492 already set, call java_mangle_decl() and make_decl_rtl() to
1493 rewrite its name as a hidden alias.
1495 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1498 * lang.c (java_classify_record): New.
1499 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1501 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1504 * decl.c (finish_method): Pass 'false' for the new
1505 allocate_struct_function parameter.
1507 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1509 * expr.c (build_jni_stub): Use the computed jni func type for
1512 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1514 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1516 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1518 * expr.c (type_assertion_hash): Hash type uids rather than
1521 2007-11-17 David Daney <ddaney@avtrex.com>
1522 Andrew Haley <aph@redhat.com>
1524 * constants.c (build_constants_constructor): Use POINTER_SIZE
1525 insead of BITS_PER_WORD in big-endian work around.
1527 2007-11-07 Tom Tromey <tromey@redhat.com>
1530 * gcj.texi (Input Options): Add missing noun.
1532 2007-11-02 Tom Tromey <tromey@redhat.com>
1535 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1536 * zipfile.h (ZIPEMPTYMAGIC): New define.
1538 2007-11-01 Tom Tromey <tromey@redhat.com>
1540 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1541 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1542 (java/jcf-io.o): Depend on zipfile.h.
1544 2007-10-17 Richard Guenther <rguenther@suse.de>
1546 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1549 2007-10-03 Andrew Haley <aph@redhat.com>
1552 * class.c (mangled_classname): Detect and replace illegal
1553 characters in assembly language symbols.
1554 (gen_indirect_dispatch_tables): Call mangled_classname() on
1557 2007-09-27 Jakub Jelinek <jakub@redhat.com>
1559 * lang.c (java_print_error_function): Add third argument.
1561 2007-09-15 Tom Tromey <tromey@redhat.com>
1563 * java-tree.h (struct lang_decl_func) <function_decl_body>:
1565 <init_final>: Likewise.
1566 * lang.c (java_dump_tree): Update.
1567 * java-tree.h (DECL_FUNCTION_BODY): Remove.
1569 2007-09-11 Jan Hubicka <jh@suse.cz>
1571 * decl.c (java_expand_body): Kill.
1572 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1574 2007-09-06 Tom Tromey <tromey@redhat.com>
1576 * jcf-parse.c (parse_class_file): Re-enter the current file.
1578 2007-09-07 Roman Zippel <zippel@linux-m68k.org>
1580 * boehm.c (mark_reference_fields): Move misaligned pointer check
1581 after JREFERENCE_TYPE_P test
1583 2007-09-06 Roman Zippel <zippel@linux-m68k.org>
1585 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1586 if pointer is misaligned.
1588 2007-09-06 Tom Tromey <tromey@redhat.com>
1590 * lang.c (java_post_options): Update.
1591 * jcf-parse.c (set_source_filename): Update.
1592 (give_name_to_class): Update.
1593 (jcf_parse): Update.
1594 (duplicate_class_warning): Update.
1595 (parse_class_file): Update.
1596 (java_parse_file): Update.
1597 * expr.c (expand_byte_code): Update.
1599 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1601 * decl.c (finish_method): Use set_cfun.
1603 2007-09-04 Andrew Haley <aph@redhat.com>
1605 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1606 when using the ARM EABI.
1608 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1610 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1612 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1614 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1616 * jcf.h (JCF_FINISH): Likewise.
1618 2007-08-28 Tom Tromey <tromey@redhat.com>
1620 * Make-lang.in (java.tags): Don't tag '*.y' files.
1622 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1624 * lang.c (java_decl_ok_for_sibcall): Likewise.
1626 2007-08-21 Paul Brook <paul@codesourcery.com>
1627 Nathan Sidwell <nathan@codesourcery.com>
1628 Mark Mitchell <mark@codesourcery.com>
1629 Joseph Myers <joseph@codesourcery.com>
1631 * jcf-dump.c (version): Use pkgversion_string. Update copyright
1634 2007-08-20 Richard Guenther <rguenther@suse.de>
1636 * lang.c (java_tree_inlining_walk_subtrees): Remove.
1637 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1639 2007-08-17 Tom Tromey <tromey@redhat.com>
1641 * typeck.c (find_method_in_interfaces): Update.
1642 * jcf-parse.c (load_class): Update.
1643 * java-gimplify.c (java_gimplify_component_ref): Removed.
1644 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
1646 (java_gimplify_expr): Update.
1647 * decl.c (java_init_decl_processing): Update.
1648 * class.c (set_constant_value): Update.
1649 (make_class_data): Update.
1650 (finish_class): Update.
1651 (build_static_field_ref): Update.
1652 (is_compiled_class): Update.
1653 (maybe_layout_super_class): Update.
1654 (layout_class): Update.
1655 (layout_class_method): Update.
1656 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1657 (lang_decl_var) <am, final_iud, cif>: Removed fields.
1658 (lang_decl_func) <init_calls_this>: Removed field.
1659 (lang_type) <dot_class, verify_method>: Removed fields.
1660 (FIELD_NESTED_ACCESS): Removed.
1661 (FIELD_NESTED_ACCESS_P): Removed.
1662 (DECL_FIELD_FINAL_IUD): Removed.
1663 (DECL_LOCAL_FINAL_IUD): Removed
1664 (LOCAL_FINAL_P): Removed.
1665 (FINAL_VARIABLE_P): Removed.
1666 (CLASS_FINAL_VARIABLE_P): Removed.
1667 (DECL_BIT_INDEX): Removed.
1668 (DECL_INIT_CALLS_THIS): Removed.
1669 (FIELD_LOCAL_ALIAS): Removed.
1670 (FIELD_LOCAL_ALIAS_USED): Removed.
1671 (FIELD_THISN): Removed.
1672 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1673 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1674 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1675 (TYPE_DOT_CLASS): Removed.
1676 (TYPE_VERIFY_METHOD): Removed.
1677 (ID_CLASSDOLLAR_P): Removed.
1678 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1680 (classdollar_identifier_node): Removed.
1681 (TYPE_UNKNOWN): Removed.
1682 (CLASS_FROM_SOURCE_P): Removed.
1683 * expr.c (build_jni_stub): Update.
1684 (force_evaluation_order): Update.
1685 (build_java_empty_stmt): Update.
1686 (build_class_init): Update.
1687 (java_stack_swap): Update.
1688 (build_jni_stub): Update.
1690 2007-08-17 Tom Tromey <tromey@redhat.com>
1692 * java-tree.h (LABEL_TYPE_STATE): Removed.
1693 (load_type_state): Removed.
1694 (LABEL_PC): Removed.
1695 (LABEL_VERIFIED): Removed.
1696 (type_states): Declare.
1697 * expr.c (type_states): New global.
1698 (load_type_state): Now static. Use type_states. Changed
1700 (lookup_label): Don't set LABEL_PC.
1701 (expand_byte_code): Don't use LABEL_VERIFIED.
1702 (note_instructions): Initialize type_states.
1703 * verify-glue.c (vfy_note_stack_depth): Rewrote.
1704 (vfy_note_stack_type): Use type_states.
1705 (vfy_note_local_type): Likewise.
1707 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1709 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1710 * jcf.h (JCF_FINISH): Likewise.
1712 2007-07-31 Nick Clifton <nickc@redhat.com>
1714 * java-gimplify.c: Change copyright header to refer to version 3
1715 of the GNU General Public License and to point readers at the
1716 COPYING3 file and the FSF's license web page.
1717 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1718 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1719 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1720 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1721 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1722 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1723 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1725 2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1727 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1729 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1731 * lang.c (java_get_callee_fndecl): Constify.
1733 2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1735 * mangle.c (set_type_package_list): Constify.
1736 * verify-glue.c (vfy_make_string): Delete.
1737 * verify.h (vfy_make_string): Likewise.
1739 2007-07-26 Tom Tromey <tromey@redhat.com>
1741 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1742 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1743 EXIT_BLOCK_LABELED_BLOCK): Likewise.
1744 * lang.c (java_tree_inlining_walk_subtrees): Update.
1745 (java_dump_tree): Likewise.
1746 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1748 * decl.c (push_labeled_block, pop_labeled_block): Remove.
1749 * java-gimplify.c (java_gimplify_labeled_block_expr,
1750 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1751 (java_gimplify_expr): Update.
1753 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1755 * class.c (java_treetreehash_hash, java_treetreehash_compare):
1757 * expr.c (type_assertion_eq): Likewise.
1758 * jcf-io.c (compare_path): Likewise.
1759 * jcf-parse.c (cmpstringp): Likewise.
1760 * verify-impl.c (get_one_type, compute_argument_types,
1761 compute_return_type): Likewise.
1763 2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1767 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1769 2007-07-12 Richard Guenther <rguenther@suse.de>
1771 * expr.c (expand_java_return): RETURN_EXPR has void type.
1772 (build_jni_stub): Likewise. Use a comparison against zero
1773 for null-pointer test in COND_EXPR.
1774 (build_field_ref): Build POINTER_PLUS_EXPR with correct
1775 type. Convert result instead.
1776 (build_invokevirtual): Likewise.
1778 2007-07-09 Geoffrey Keating <geoffk@apple.com>
1781 * lang.c (java_init): Remove setting of force_align_functions_log.
1782 * class.c (add_method_1): Set DECL_ALIGN of non-static method
1783 to cope with ptrmemfunc_vbit_in_pfn.
1785 2007-07-03 David Daney <ddaney@avtrex.com>
1787 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
1789 (doc/gcj.dvi): Same.
1790 (doc/gcj.pdf): Same.
1791 (java/index.html): Same.
1793 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1795 * class.c (make_class_data): Build the index in sizetype.
1796 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1797 adding to a pointer type.
1798 (build_symbol_entry): Likewise.
1799 * expr.c (build_java_arrayaccess): Likewise.
1800 (build_field_ref): Likewise.
1801 (build_known_method_ref): Likewise.
1802 (build_invokevirtual): Likewise.
1803 * except.c (build_exception_object_ref): Do a
1804 NEGATIVE and then a POINTER_PLUS_EXPR instead
1807 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
1809 * typeck.c (java_signed_type): Remove.
1810 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1811 * java-tree.h (java_signed_type): Remove.
1813 2007-05-18 Geoffrey Keating <geoffk@apple.com>
1815 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1816 (print_constant): Likewise.
1818 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
1820 * expr.c (build_java_binop): Use unsigned_type_for instead of
1822 * java-tree.h (java_unsigned_type): Remove.
1823 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1824 * typeck.c (java_unsigned_type): Remove.
1826 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1828 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1829 instead of checking GIMPLE_STMT_P in chain_next.
1831 2007-04-06 Colin Walters <walters@redhat.com>
1833 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1834 * jcf-io.c (open_class): Copy 'filename'.
1836 2007-04-03 Andrew Haley <aph@redhat.com>
1838 * jvgenmain.c (main): Change main to use class$, not class$$.
1839 (do_mangle_classname): Likewise.
1840 * class.c (hide): New function.
1841 (add_field): Hide everything that shouldn't be visible outside a
1843 (build_static_class_ref): Likewise.
1844 (build_classdollar_field): Likewise.
1845 (make_class_data): Likewise.
1846 (layout_class_method): Likewise.
1847 * expr.c (special_method_p): New function.
1849 * class.c (push_class): Don't bogusly guess the source filename.
1850 * jcf-parse.c (give_name_to_class): Don't set input_location from
1851 DECL_ARTIFICIAL decls.
1853 2007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
1855 * typeck.c (java_signed_or_unsigned_type): Removed.
1856 (java_signed_type): use get_signed_or_unsigned_type instead of
1857 java_signed_or_unsigned_type.
1858 (java_unsigned_type): Ditto.
1859 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1860 * java-tree.h (java_signed_or_unsigned_type): Removed.
1862 2007-03-26 Tom Tromey <tromey@redhat.com>
1864 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1865 (java.maintainer-clean): Likewise.
1866 (java.install-man): Likewise.
1867 (.INTERMEDIATE): Removed grmiregistry.pod.
1868 (grmiregistry.pod): Removed.
1869 * gcj.texi (Invoking gcjh): Removed.
1870 (Invoking gjnih): Likewise.
1871 (Invoking grmiregistry): Likewise.
1872 (direntry): Updated.
1874 (which-gcj): Removed.
1876 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1878 * Make-lang.in: Add install-pdf target as copied from
1879 automake v1.10 rules.
1881 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
1883 * gcj.texi: Standardize title page.
1885 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1887 * class.c: Fix a comment typo.
1889 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1890 Brooks Moses <brooks.moses@codesourcery.com>
1891 Lee Millward <lee.millward@codesourcery.com>
1893 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
1895 (BUILD_MONITOR_EXIT): Likewise.
1897 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
1898 (java_gimplify_modify_expr): Likewise.
1900 * class.c (cache_this_class_ref): Use build_call_expr.
1901 (build_static_field_ref): Likewise.
1902 (emit_indirect_register_classes): Likewise.
1903 (emit_register_classes): Likewise.
1905 * resource.c (write_resource_constructor): Use build_call_expr.
1907 * builtins.c (builtin_creator_function): Change interpretation of
1908 the second parameter to be the whole CALL_EXPR instead of the arglist.
1909 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
1910 (min_builtin): Likewise.
1911 (abs_builtin): Likewise.
1912 (java_build_function_call_expr): Likewise.
1913 (convert_real): Likewise.
1914 (UNMARSHAL3): Likewise.
1915 (UNMARSHAL4): Likewise.
1916 (UNMARSHAL5): Likewise.
1917 (build_arglist_for_builtin): Delete. Fix callers to use
1918 build_call_expr instead.
1919 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
1921 (compareAndSwapInt_builtin): Likewise.
1922 (compareAndSwapLong_builtin): Likewise.
1923 (compareAndSwapObject_builtin): Likewise.
1924 (putVolatile_builtin): Likewise.
1925 (getVolatile_builtin): Likewise.
1926 (VMSupportsCS8_builtin): Likewise.
1927 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
1930 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
1931 (build_java_throw_out_of_bounds_exception): Likewise.
1932 (java_check_reference): Likewise.
1933 (build_java_arraystore_check): Likewise.
1934 (build_newarray): Likewise.
1935 (build_anewarray): Likewise.
1936 (expand_java_multinewarray): Use build_call_list instead of build3.
1937 (build_java_monitor): Use build_call_nary instead of build3.
1938 (java_create_object): Likewise.
1939 (expand_java_NEW): Likewise.
1940 (build_instanceof): Likewise.
1941 (expand_java_CHECKCAST): Likewise.
1942 (build_java_soft_divmod): Likewise.
1943 (build_java_binop): Likewise.
1944 (build_field_ref): Likewise.
1945 (build_class_init): Likewise.
1946 (rewrite_arglist_getcaller): Use build_call_expr.
1947 (build_invokeinterface): Use build_call_nary instead of build3.
1948 (expand_invoke): Use build_call_list instead of build3.
1949 (build_jni_stub): Use build_call_nary, build_call_list, or
1950 build_call_expr instead of build3.
1951 (expand_java_field_op): Use build_call_expr instead of build3.
1952 (force_evaluation_order): Use new CALL_EXPR accessors.
1954 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
1956 2007-02-15 David Daney <ddaney@avtrex.com>
1958 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
1959 (java.maintainer-clean):Add gc-analyze.1.
1960 (.INTERMEDIATE): Add gc-analyze.pod.
1961 (gc-analyze.pod): New rule.
1962 (java.install-man): Install gc-analyze.1
1963 * gcj.texi: Add new section for the gc-analyze program.
1965 2007-02-07 Andrew Haley <aph@redhat.com>
1967 * class.c (uncache_this_class_ref): New.
1968 * expr.c (build_jni_stub): Initialize the class.
1969 (expand_byte_code): Call uncache_this_class_ref after generating
1972 2007-02-06 Tom Tromey <tromey@redhat.com>
1975 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
1977 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
1979 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
1981 2007-02-02 Andrew Haley <aph@redhat.com>
1983 * expr.c (expand_byte_code): Call cache_this_class_ref() and
1984 cache_cpool_data_ref().
1985 Set TYPE_CPOOL_DATA_REF.
1986 (cache_cpool_data_ref): New function.
1987 * constants.c (build_ref_from_constant_pool): Remove special-case
1988 code for flag_indirect_classes.
1989 (build_constant_data_ref): Move special-case code for
1990 flag_indirect_classes here from build_ref_from_constant_pool.
1991 * decl.c (finish_method): Move class initialization from here to
1992 cache_this_class_ref.
1993 * class.c (cache_this_class_ref): New function.
1994 (build_class_ref): Use this_classdollar for the ouput class.
1996 2007-02-02 David Daney <ddaney@avtrex.com>
1998 * class.c (is_compiled_class): Move check to avoid reloading
2000 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
2003 2007-02-01 Andrew Haley <aph@redhat.com>
2006 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
2008 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
2010 * class.c, jcf-parse.c: Fix comment typos.
2012 2007-01-30 Tom Tromey <tromey@redhat.com>
2014 * gcj.texi (Strings): Fix documentation for JvNewString.
2016 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2018 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
2021 2007-01-30 Ben Elliston <bje@au.ibm.com>
2023 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
2025 2007-01-29 Tom Tromey <tromey@redhat.com>
2028 * jvspec.c (lang_specific_driver): Handle separate -I argument.
2029 * lang.opt (-I): Add 'Separate'.
2031 2007-01-29 Andrew Haley <aph@redhat.com>
2033 * class.c (add_method_1): Mark fndecl as external unless we are
2034 compiling it into this object file.
2036 2007-01-24 Andrew Haley <aph@redhat.com>
2038 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
2039 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
2041 2007-01-22 Andrew Haley <aph@redhat.com>
2043 * builtins.c (VMSupportsCS8_builtin): New function.
2045 2007-01-23 Andrew Pinski <pinskia@gmail.com>
2048 * jcf-io.c (opendir_in_zip): Close the file
2049 and free zipf before returning after an error.
2051 2007-01-16 Tom Tromey <tromey@redhat.com>
2053 * java-tree.def: Added copyright header.
2055 2007-01-15 Tom Tromey <tromey@redhat.com>
2057 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
2059 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
2061 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
2062 (EXPR_WFL_NODE): Likewise.
2063 (EXPR_WFL_LINECOL): Likewise.
2064 (EXPR_WFL_FILENAME): Likewise.
2065 (EXPR_WFL_LINENO): Likewise.
2066 (build_expr_wfl, expr_add_location): Don't declare.
2067 (build_unknown_wfl): Removed.
2068 (EXPR_WFL_FILENAME_NODE): Removed.
2069 (EXPR_WFL_COLNO): Removed.
2070 (EXPR_WFL_SET_LINECOL): Removed.
2071 (DECL_FUNCTION_WFL): Removed.
2072 (DECL_FIELD_FINAL_WFL): Removed.
2073 (struct lang_decl_func) <wfl>: Removed field.
2074 <called_constructor>: Likewise.
2075 <inner_access>: Likewise.
2076 (struct lang_decl_var) <wfl>: Removed field.
2077 (DECL_CONSTRUCTOR_CALLS): Removed.
2078 (DECL_FUNCTION_ACCESS_DECL): Likewise.
2079 (DECL_FUNCTION_INNER_ACCESS): Likewise.
2080 (DECL_SPECIFIC_COUNT): Likewise.
2081 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
2082 * expr.c (build_expr_wfl): Removed.
2083 (expr_add_location): Likewise.
2085 2007-01-12 Tom Tromey <tromey@redhat.com>
2087 * jcf-dump.c (main): Updated call to find_class.
2088 * lang.c (java_init): Removed dead code.
2089 * jcf-parse.c (read_class): Don't use java_source field. Removed
2091 (parse_zip_file_entries): Don't use java_source field.
2092 (process_zip_dir): Likewise.
2093 (jcf_parse): Removed dead code.
2094 (java_parse_file): Likewise.
2095 (read_class): Updated call to find_class.
2096 * jcf-io.c (find_class): Don't use java_source field. Removed
2097 'source_ok' argument, .java logic.
2098 * jcf.h (JCF) <java_source>: Removed field.
2099 (JCF_ZERO): Updated. (find_class): Updated.
2100 * decl.c: Removed dead code.
2101 * class.c: Removed dead code.
2103 2007-01-11 Tom Tromey <tromey@redhat.com>
2105 * typeck.c (convert): Don't use flag_emit_class_files.
2106 * lang.c (java_post_options): Don't use flag_emit_class_files.
2107 (java_handle_option): Don't use flag_extraneous_semicolon or
2109 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
2110 flag_emit_class_files.
2111 (load_class): Likewise.
2112 * java-tree.h (flag_emit_class_files): Don't declare.
2113 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
2114 (flag_extraneous_semicolon): Don't declare.
2115 (flag_not_overriding): Likewise.
2116 (flag_static_local_jdk1_1): Likewise.
2117 (flag_redundant): Likewise.
2118 * expr.c (build_newarray): Don't use flag_emit_class_files.
2119 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
2120 flag_emit_class_files.
2121 (build_class_ref): Likewise.
2122 * builtins.c (check_for_builtin): Don't use
2123 flag_emit_class_files.
2125 2007-01-10 Tom Tromey <tromey@redhat.com>
2127 * lang.c (java_can_use_bit_fields_p): Removed.
2128 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
2130 2007-01-09 Andrew Haley <aph@redhat.com>
2132 * expr.c (build_java_arrayaccess): Rewrite to generate array
2133 access in canonical form.
2134 (expand_java_arraystore): Use build_fold_addr_expr() on address of
2137 2007-01-03 Andrew Haley <aph@redhat.com>
2140 * expr.c (expand_java_field_op): If we're initializing a field's
2141 declaring interface we should not also initialize the class
2142 context in which it was referenced.
2144 2007-01-02 Tom Tromey <tromey@redhat.com>
2146 * java-tree.h (compiling_from_source, current_encoding,
2147 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
2148 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
2149 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
2150 JTI_WFL_OPERATOR): Removed
2151 (finit_identifier_node, instinit_identifier_node,
2152 length_identifier_node, super_identifier_node,
2153 continue_identifier_node, access0_identifier_node, wfl_operator):
2155 (cyclic_inheritance_report,
2156 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
2157 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
2158 DECL_FIXED_CONSTRUCTOR_P): Removed.
2159 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
2161 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
2162 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
2163 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
2164 import_list, import_demand_list>: Removed.
2165 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
2166 cxx_keyword_p): Removed.
2167 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
2168 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
2169 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
2170 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
2171 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
2172 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
2173 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
2174 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
2175 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
2176 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
2177 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
2178 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
2179 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
2180 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
2181 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
2182 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
2183 java_parse_abort_on_error, extract_field_decl): Removed.
2185 * lang.c: (compiling_from_source, current_encoding): Removed.
2186 (java_handle_option): Ignore -fencoding.
2187 * parse.h: Don't include lex.h.
2188 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
2189 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
2190 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
2191 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
2192 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
2193 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
2194 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
2195 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
2196 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
2197 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
2198 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
2199 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
2200 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
2201 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
2202 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
2203 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
2204 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
2205 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
2206 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
2207 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
2208 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
2209 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
2210 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
2211 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
2212 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
2213 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
2214 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
2215 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
2216 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
2217 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
2218 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
2219 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
2220 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
2221 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
2222 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
2223 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
2224 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
2225 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
2226 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
2227 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
2228 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
2229 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
2230 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
2231 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
2232 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
2233 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
2234 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
2235 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
2236 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
2237 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
2238 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
2239 SET_CPC_STATIC_INITIALIZER_STMT,
2240 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
2241 java_complete_class, java_check_circular_reference,
2242 java_fix_constructors, java_layout_classes, java_reorder_fields,
2243 java_method_add_stmt, java_get_line_col, reset_report,
2244 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
2245 java_finish_classes, ctxp, ctxp_for_generation,
2246 ctxp_for_generation_last): Removed.
2247 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
2248 * mangle.c (utf8_cmp): New function.
2249 (cxx_keywords): New global.
2250 (cxx_keyword_p): New function.
2251 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
2252 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
2253 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
2254 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
2255 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
2256 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
2257 * Make-lang.in (java.srcextra): Do nothing.
2258 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
2259 (JAVA_OBJS): Don't mention deleted files.
2260 (java.mostlyclean): Likewise.
2261 (java.clean): Likewise.
2262 (JAVA_LEX_C): Removed.
2263 (buffer.o, check-init.o, parse.o): Remove unused targets.
2264 (typeck.o): Updated.
2265 * jcf-parse.c (read_class): Comment out unused code.
2266 (java_layout_seen_class_methods): New function.
2267 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2269 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
2270 (init_jcf_parse): Removed.
2271 * config-lang.in (gtfiles): Remove deleted files.
2272 * decl.c (java_init_decl_processing): Don't initialize
2273 finit_identifier_node, instinit_identifier_node,
2274 length_identifier_node, super_identifier_node,
2275 continue_identifier_node, access0_identifier_node. Don't call
2277 * class.c (cyclic_inheritance_report): New global.
2278 (add_method_1): Don't use
2279 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2280 (maybe_layout_super_class): Comment out code.
2281 (safe_layout_class): New function.
2282 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2283 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2284 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2285 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2286 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2287 (java_gimplify_case_expr): Removed.
2288 (java_gimplify_default_expr): Likewise.
2289 (java_gimplify_new_array_init): Likewise.
2291 * keyword.gperf, keyword.h: Removed.
2292 * chartables.h: Removed.
2293 * check-init.c: Removed.
2294 * buffer.c, buffer.h: Removed.
2295 * convert.h: Removed.
2296 * gen-table.pl: Removed.
2297 * lex.c, lex.h: Removed.
2299 2007-01-02 Andrew Haley <aph@redhat.com>
2301 * expr.c (expand_java_arraystore): Make sure we perform a bounds
2302 check at runtime before we perform a type check.
2304 2006-12-19 Andrew Haley <aph@redhat.com>
2306 * decl.c: Bump minor BC ABI version.
2308 2006-12-13 Gary Benson <gbenson@redhat.com>
2310 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2312 2006-12-12 Tom Tromey <tromey@redhat.com>
2314 * lang-specs.h: Pass -M options to jc1.
2315 * jcf-depend.c (jcf_dependency_add_file): Don't emit
2318 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
2320 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2322 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
2324 * lang-specs.h: Pass '%U'-based options as separate arguments.
2326 2006-12-05 Tom Tromey <tromey@redhat.com>
2329 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2331 * class.c (add_field): Handle ACC_SYNTHETIC.
2332 (add_method_1): Likewise. Handle bridge and varargs.
2333 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2335 (set_class_decl_access_flags): Handle synthetic and annotation.
2336 * java-tree.h (METHOD_BRIDGE): New macro.
2337 (METHOD_VARARGS): Likewise.
2338 (TYPE_SYNTHETIC): Likewise.
2339 (TYPE_ANNOTATION): Likewise.
2340 (lang_type): New fields 'synthetic' and 'annotation'.
2341 (lang_decl_func): New fields 'varargs' and 'bridge'.
2343 2006-12-04 Andrew Haley <aph@redhat.com>
2345 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2348 2006-11-29 Gary Benson <gbenson@redhat.com>
2350 * expr.c (rewrite_arglist_getcaller): Reorder.
2352 2006-11-29 Andrew Haley <aph@redhat.com>
2354 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2355 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2357 2006-11-23 Andrew Haley <aph@redhat.com>
2359 * expr.c (rewrite_arglist_getcaller): New.
2360 (rewrite_arglist_getclass): Fix indentation.
2361 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
2362 gnu.classpath.VMStackWalker.getCallingClassLoader().
2363 * builtins.c (initialize_builtins): Remove duplicate def'n of
2365 Add __builtin_return_address.
2367 2006-11-22 Andrew Haley <aph@redhat.com>
2369 * jcf-reader.c (get_attribute): Mark attr_type unused.
2371 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2373 2007-01-08 Richard Guenther <rguenther@suse.de>
2375 * lex.c (do_java_lex): Use build_int_cst_wide_type.
2376 * jcf-parse.c (get_constant): Likewise.
2378 2006-11-12 Jan Hubicka <jh@suse.cz>
2380 * resource.c (compile_resource_data): Update for new varpool names.
2381 * java/class.c (build_utf8_ref): Likewise.
2383 2006-11-12 David Daney <ddaney@avtrex.com>
2386 * typeck.c (build_java_array_type): Increase buffer sizes.
2388 2006-11-11 Richard Guenther <rguenther@suse.de>
2390 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2391 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2393 2006-11-06 Andrew Haley <aph@redhat.com>
2395 * java-tree.h (CONSTANT_LazyFlag): New.
2396 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2397 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2399 (handle_constant): Return 0 for dummy cpool entries.
2400 Handle constants of kind Class.
2401 Handle constants of kind NameAndType.
2402 (handle_enclosingmethod_attribute): New.
2403 (handle_signature_attribute): New.
2404 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2405 (HANDLE_SIGNATURE_ATTRIBUTE): New.
2406 (handle_constant): Use unmangle_classname()rather than calling
2407 identifier_subst() directly.
2409 2006-11-02 Andrew Haley <aph@redhat.com>
2411 * java-tree.h (FIELD_ENUM): New.
2412 (lang_decl_var.field_enum): New.
2413 (lang_type.enum_class): New.
2415 * class.c (set_class_decl_access_flags): Handle enum types.
2416 (add_field): Handle enum fields.
2417 (get_access_flags_from_decl): Likewise.
2419 * class.c (make_class_data): Put reflection_data into rodata.
2421 2006-11-01 Andrew Haley <aph@redhat.com>
2423 * jcf-parse.c (field_offsets, bit_obstack): New variables.
2424 (jcf_parse): Write end marker to annotation_data.
2425 (java_parse_file): Create field_offsets bitmap. Destroy it.
2426 (annotation_grow, annotation_rewrite_byte)
2427 (annotation_rewrite_short, annotation_rewrite_int)
2428 (annotation_read_short, annotation_write_byte)
2429 (annotation_write_short, annotation_write_int)
2430 (handle_long_constant, handle_constant, handle_element_value)
2431 (handle_annotation, handle_annotations)
2432 (handle_annotation_attribute, rewrite_reflection_indexes)
2433 (handle_member_annotations, handle_parameter_annotations)
2434 (handle_default_annotation): New functions.
2435 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2436 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2437 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2438 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2439 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2440 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
2441 (TYPE_REFLECTION_DATA): New.
2442 (TYPE_REFLECTION_DATASIZE): New.
2443 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2445 * jcf-reader.c (get_attribute): Pass field/method index and
2446 attribute type to get_attribute().
2447 * constants.c (find_class_or_string_constant): Make nonstatic.
2448 (cpool_for_class): Likewise.
2449 (build_constants_constructor): Separate string and scalar types.
2450 * class.c (make_class_data): Generate field_indexes permutation.
2451 Pass it to rewrite_reflection_indexes().
2452 (make_class_data): Generate constructor for reflection_data field.
2454 2006-10-20 Tom Tromey <tromey@redhat.com>
2456 * gcj.texi (Top): Don't mention jv-scan.
2457 (Invoking gcj): Likewise.
2458 (Invoking gcjh): Likewise.
2459 (Invoking gjnih): Likewise.
2460 (Invoking gij): Likewise.
2461 (Invoking gcj-dbtool): Likewise.
2462 (Invoking jv-scan): Removed.
2463 * parse-scan.y: Removed.
2464 * jv-scan.c: Removed.
2465 * config-lang.in (stagestuff): Don't mention jv-scan.
2466 * Make-lang.in (java): Removed jv-scan.
2467 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2468 (JVSCAN_OBJS): Removed.
2469 (jv-scan$(exeext)): Likewise.
2470 (JAVA_MANFILES): Removed jv-scan.1.
2471 (java.uninstall): Don't mention jv-scan.
2472 (java.mostlyclean): Likewise.
2473 (java.maintainer-clean): Likewise.
2474 (.INTERMEDIATE): Likewise.
2475 (java/jv-scan.o): Removed.
2476 (jv-scan.pod): Likewise.
2477 (java.srcextra): Don't mention parse-scan.c.
2478 (java.mostlyclean): Likewise.
2479 (java/parse-scan.c): Removed.
2480 (java/parse-scan.o-warn): Removed.
2481 (java/parse-scan.o): Removed.
2483 2006-10-20 Tom Tromey <tromey@redhat.com>
2485 * lang.c (java_handle_option): Don't use
2486 jcf_write_base_directory.
2487 * jcf.h (jcf_write_base_directory): Removed.
2488 * parse.y (java_expand_classes): Don't call write_classfile.
2489 * config-lang.in (gtfiles): Removed jcf-write.c.
2490 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2491 (java/jcf-write.o): Removed.
2492 * jcf-parse.c (parse_class_file): Don't call write_classfile.
2493 * java-tree.h (write_classfile): Removed declaration.
2494 * jcf-write.c: Removed.
2496 2006-10-20 Tom Tromey <tromey@redhat.com>
2498 * Make-lang.in (java): Removed gjnih, gcjh.
2499 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2500 (GCJH_OBJS): Removed.
2501 (GJNIH_OBJS): Likewise.
2502 (gjnih$(exeext)): Likewise.
2503 (gcjh$(exeext)): Likewise.
2504 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2505 (java.install-common): Don't special case gcjh.
2506 (java.uninstall): Don't mention gcjh, gjnih.
2507 (java.mostlyclean): Likewise.
2508 (java.maintainer-clean): Likewise.
2509 (.INTERMEDIATE): Likewise.
2510 (gcjh.pod): Removed.
2511 (gjnih.pod): Likewise.
2512 (GCJH_TARGET_INSTALL_NAME): Removed.
2513 (java/gjavah-jni.o): Removed.
2514 (java/gjavah.o): Likewise.
2515 * config-lang.in (stagestuff): Removed gjnih, gcjh.
2516 * gjavah.c: Removed.
2518 2006-10-17 Tom Tromey <tromey@redhat.com>
2520 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2523 2006-10-17 Tom Tromey <tromey@redhat.com>
2525 * jvgenmain.c (main): Handle -findirect-dispatch.
2526 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2529 2006-10-06 Andrew Haley <aph@redhat.com>
2531 * builtins.c (compareAndSwapInt_builtin): Check that we really do
2532 have a compare_and_swap builtin.
2533 (compareAndSwapLong_builtin): Likewise.
2534 (compareAndSwapObject_builtin): Likewise.
2536 2006-10-04 Andrew Haley <aph@redhat.com>
2538 * builtins.c (java_builtins): Add compareAndSwapInt,
2539 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2540 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2541 putObjectVolatile, getObjectVolatile, getIntVolatile,
2542 getLongVolatile, getLong.
2543 (UNMARSHAL3): New macro.
2544 (UNMARSHAL4): Likewise.
2545 (UNMARSHAL5): Likewise.
2546 (build_arglist_for_builtin): New function.
2547 (build_addr_sum, build_check_this): New functions.
2548 (putObject_builtin. compareAndSwapInt_builtin,
2549 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2550 putVolatile_builtin, getVolatile_builtin): New builtins.
2552 2006-06-08 Andrew Haley <aph@redhat.com>
2554 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2555 get_symbol_table_index().
2556 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2558 (build_known_method_ref): New arg: special. Pass it to
2559 get_symbol_table_index.
2560 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2562 (build_invokevirtual): New arg: special. Pass it to
2563 get_symbol_table_index.
2564 (expand_invoke): New variable: special.
2565 Pass it to maybe_rewrite_invocation().
2566 Pass it to build_known_method_ref().
2567 * class.c (build_symbol_entry): Add new arg: special. Use it to
2568 build the symbol table conbstructor.
2569 (emit_symbol_table): Extract SPECIAL from the method list and pass
2570 it to build_symbol_entry().
2571 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2572 special accordingly.
2574 2006-09-08 Andrew Haley <aph@redhat.com>
2576 * class.c (layout_class_method): Use build_java_signature, not
2577 build_java_argument_signature. Use lookup_java_method, not
2578 lookup_argument_method.
2580 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2581 Bryce McKinlay <bryce@mckinlay.net.nz>
2583 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2585 2006-07-18 Tom Tromey <tromey@redhat.com>
2587 * lang.opt: Added missing -W options.
2589 2006-07-12 Tom Tromey <tromey@redhat.com>
2592 * lang-specs.h: Pass '%U'-based options as separate arguments.
2593 Use -faux-classpath.
2594 * lang.c (java_handle_option): Handle OPT_faux_classpath.
2595 * lang.opt (faux-classpath): New option.
2597 2006-07-07 Tom Tromey <tromey@redhat.com>
2599 * class.c (make_class_data): Set value for reflection_data field.
2600 * decl.c (java_init_decl_processing): Add reflection_data field.
2602 2006-07-07 Tom Tromey <tromey@redhat.com>
2604 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2606 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2608 2006-07-07 Andrew Haley <aph@redhat.com>
2610 * jcf-parse.c (set_source_filename): Don't check for
2611 CLASS_FROM_CURRENTLY_COMPILED_P.
2614 2006-07-07 Andrew Haley <aph@redhat.com>
2616 * java-tree.h (java_read_sourcefilenames): Declare.
2617 * lang.c (java_handle_option): Call java_read_sourcefilenames().
2618 * lang.opt (fsource-filename): New opt.
2619 * lang-specs.h: Add -fsource-filename.
2620 * jcf-parse.c (num_files, filenames): New variables.
2621 (reverse, cmpstringp, java_read_sourcefilenames,
2622 find_sourcefile): New.
2623 (set_source_filename): Call find_sourcefile to find the real name
2626 2006-06-27 Tom Tromey <tromey@redhat.com>
2628 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2629 Signature, LocalVariableTypeTable, annotation attributes.
2630 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2631 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2632 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2633 (HANDLE_METHOD): Likewise.
2634 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2635 (print_annotation): New function.
2636 (print_element_value): Likewise.
2638 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2639 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2640 (print_parameter_annotations): New function.
2641 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2642 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2644 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2645 (print_annotations): New function.
2647 2006-06-23 Tom Tromey <tromey@redhat.com>
2649 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
2650 emitting class files, always use 1.5.
2651 * gcj.texi (Input Options): Document -fsource.
2652 (Code Generation): Document -ftarget.
2654 2006-06-21 Tom Tromey <tromey@redhat.com>
2657 * expr.c (expand_java_field_op): Initialize field's declaring
2660 2006-06-20 Tom Tromey <tromey@redhat.com>
2662 * expr.c (push_value): Always flush quick stack.
2664 2006-06-19 Tom Tromey <tromey@redhat.com>
2666 * expr.c (push_value): Also flush quick stack if value is a
2669 2006-06-19 Tom Tromey <tromey@redhat.com>
2671 * expr.c (push_value): Flush quick stack if value has side
2674 2006-06-13 Tom Tromey <tromey@redhat.com>
2676 * class.c (is_compiled_class): Explicitly check for current
2679 2006-06-09 Tom Tromey <tromey@redhat.com>
2681 * gjavah.c (decompile_method): Don't decompile a static field
2684 2006-06-06 Tom Tromey <tromey@redhat.com>
2686 * lang-specs.h <jc1>: Add .jar file to command line if
2687 -fsaw-java-file. Also, remove -ffilelist-file in this case.
2689 2006-06-05 Tom Tromey <tromey@redhat.com>
2691 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2692 synthetic, enum, annotation.
2693 * jcf.h (ACC_BRIDGE): New macro.
2694 (ACC_VARARGS): Likewise.
2695 (ACC_SYNTHETIC): Likewise.
2696 (ACC_ENUM): Likewise.
2697 (ACC_ANNOTATION): Likewise.
2699 2006-06-04 Tom Tromey <tromey@redhat.com>
2701 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2702 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2704 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
2705 when needed. Handle classpath-setting.
2706 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2707 * lang-specs.h: Rewrote.
2709 2006-06-04 Tom Tromey <tromey@redhat.com>
2711 * jcf-io.c (find_class): Set source_ok to 0.
2712 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2713 (parse_class_file): Don't call java_mark_class_local.
2714 (java_parse_file): Skip .java files. Call java_mark_class_local
2715 before lowering any code.
2716 (parse_zip_file_entries): Don't call duplicate_class_warning
2718 (process_zip_dir): ... call it here.
2719 * class.c (add_field): Don't mark field external if it is being
2720 compiled into this object.
2721 (make_class_data): Handle situation where class_dtable_decl is
2722 created before Class is compiled.
2723 (is_compiled_class): Don't assume files in zip are compiled into
2725 (layout_class_method): Don't mark method external if it is being
2726 compiled into this object.
2728 2006-06-04 Tom Tromey <tromey@redhat.com>
2730 * jcf-path.c (jcf_path_compute): New function.
2731 * jcf.h (jcf_path_compute): Declare.
2733 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2735 * decl.c: Include langhooks.h.
2736 (builtin_function): Remove.
2737 (java_init_decl_processing): Replace calls to builtin_function
2738 with add_builtin_function.
2739 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2740 (java/decl.o): Depend on langhooks.h.
2741 * java-tree.h (builtin_function): Remove.
2743 2006-10-10 Brooks Moses <bmoses@stanford.edu>
2745 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2747 2006-09-12 Tom Tromey <tromey@redhat.com>
2749 * expr.c (push_value): Always flush quick stack.
2751 2006-09-12 Tom Tromey <tromey@redhat.com>
2754 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2755 the push of the called method's return result.
2757 2006-09-12 Tom Tromey <tromey@redhat.com>
2759 * jvspec.c (lang_specific_driver): Read spec file even if
2762 2006-09-12 Tom Tromey <tromey@redhat.com>
2765 * expr.c (expand_java_field_op): Initialize field's declaring
2766 interface if necessary.
2768 2006-09-12 Tom Tromey <tromey@redhat.com>
2771 * expr.c (expand_java_field_op): No error for assignments not in
2772 class initializer or constructor.
2774 2006-08-22 Andrew Haley <aph@redhat.com>
2776 * decl.c (java_add_stmt): Give the statement list a type.
2778 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2779 Bryce McKinlay <bryce@mckinlay.net.nz>
2781 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2783 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
2786 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2787 or '--' is used with a constant operand.
2788 (java_complete_lhs): When processing a '++' or '--' expression,
2789 don't call java_complete_tree but java_complete_lhs, so that a
2790 static final variable operand is never replaced by its value. This
2791 avoids an ICE later on.
2792 (patch_unaryop): Fixed typo in comment.
2794 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2796 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2798 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2800 * builtins.c (check_for_builtin): If a builtin could result in a
2801 direct call being generated, don't use it if flag_indirect_dispatch
2804 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2806 * gcj.texi (Invocation): Corrections for Invocation API example.
2808 2006-07-04 Andrew Haley <aph@redhat.com>
2810 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2813 2006-06-21 Andrew Haley <aph@redhat.com>
2815 * java-tree.h (update_aliases): Remove
2816 * expr.c (expand_iinc): Remove call to update_aliases().
2817 (STORE_INTERNAL): Likewise.
2818 * decl.c (update_aliases, initialize_local_variable)
2819 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2821 2006-06-19 Andrew Haley <aph@redhat.com>
2825 * expr.c (java_modify_addr_for_volatile): New function.
2826 (expand_java_field_op): Handle volatile fields.
2827 * java-gimplify.c (java_gimplify_component_ref): Call
2828 java_modify_addr_for_volatile to give the field_ref the correct
2830 (java_gimplify_modify_expr): Likewise.
2831 * java-tree.h (java_modify_addr_for_volatile): New decl.
2833 2006-06-17 Karl Berry <karl@gnu.org>
2835 * gcj.texi (@dircategory): Use "Software development" instead
2836 of "Programming", following the Free Software Directory.
2838 2006-06-16 Andrew Haley <aph@redhat.com>
2840 * class.c (make_class_data): When using flag_indirect_classes,
2841 don't initialize the vtable of Class instances.
2843 2006-06-09 Andrew Haley <aph@redhat.com>
2847 * builtins.c (initialize_builtins): Add __sync_synchronize().
2848 * class.c (add_field): Mark volatile fields.
2849 * java-gimplify.c (java_gimplify_expr): Call new functions to
2850 handle self-modifying exprs and COMPONENT_REFs.
2851 (java_gimplify_component_ref): New.
2852 (java_gimplify_modify_expr): Add handling for volatiles.
2854 2006-06-08 Tom Tromey <tromey@redhat.com>
2856 * gcj.texi (libgcj Runtime Properties): Document
2857 gnu.gcj.user.realname.
2859 2006-06-08 Andrew Haley <aph@redhat.com>
2861 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2862 get_symbol_table_index().
2863 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2865 (build_known_method_ref): New arg: special. Pass it to
2866 get_symbol_table_index.
2867 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2869 (build_invokevirtual): New arg: special. Pass it to
2870 get_symbol_table_index.
2871 (expand_invoke): New variable: special.
2872 Pass it to maybe_rewrite_invocation().
2873 Pass it to build_known_method_ref().
2874 * class.c (build_symbol_entry): Add new arg: special. Use it to
2875 build the symbol table conbstructor.
2876 (emit_symbol_table): Extract SPECIAL from the method list and pass
2877 it to build_symbol_entry().
2878 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2879 special accordingly.
2881 2006-06-06 David Daney <ddaney@avtrex.com>
2883 * gcj.texi (libgcj Runtime Properties): Document
2884 gnu.gcj.runtime.NameFinder.show_raw and
2885 gnu.gcj.runtime.NameFinder.remove_unknown.
2887 2006-06-06 Tom Tromey <tromey@redhat.com>
2889 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2890 synthetic, enum, annotation.
2891 * jcf.h (ACC_BRIDGE): New macro.
2892 (ACC_VARARGS): Likewise.
2893 (ACC_SYNTHETIC): Likewise.
2894 (ACC_ENUM): Likewise.
2895 (ACC_ANNOTATION): Likewise.
2897 2006-06-06 Mike Stump <mrs@apple.com>
2899 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
2900 installing during build.
2902 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
2904 * gcj.texi (Extensions): Document the new gcj-dbtool-based
2905 classname-to-library resolution mechanism.
2906 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
2907 mechanism deprecated.
2908 (libgcj Runtime Properties): Document
2909 gnu.gcj.runtime.VMClassLoader.library_control's new default.
2911 2006-05-29 Jakub Jelinek <jakub@redhat.com>
2913 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
2915 (jword): Define to uint64 on 64-bit arches.
2916 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
2918 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
2920 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
2923 2006-05-26 Tom Tromey <tromey@redhat.com>
2925 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
2926 * verify-glue.c (vfy_class_type): New function.
2927 * verify-impl.c (check_constant): Allow 'ldc class'.
2928 * verify.h (vfy_class_type): Declare.
2930 2006-05-25 Andrew Haley <aph@redhat.com>
2933 * decl.c (maybe_pushlevels): When variable ranges are non-nested
2934 update all lifetimes, not just the first one.
2936 2006-05-24 Tom Tromey <tromey@redhat.com>
2938 * java-tree.h: Fixed flag documentation.
2940 2006-05-24 Tom Tromey <tromey@redhat.com>
2943 * jcf.h (ACC_INVISIBLE): Changed value.
2945 2006-05-24 Andrew Haley <aph@redhat.com>
2948 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
2951 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2953 * lang.opt (femit-class-file): Remove VarExists.
2955 2006-05-16 Tom Tromey <tromey@redhat.com>
2957 * verify-impl.c (verify_instructions_0) <op_return>: Special case
2960 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2963 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
2966 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
2968 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
2969 (java/expr.o): Replace target.h with $(TARGET_H).
2970 (java/parse.o): Likewise.
2972 2006-05-10 Andrew Haley <aph@redhat.com>
2974 * class.c (emit_indirect_register_classes): Fix comment.
2976 2006-05-04 Tom Tromey <tromey@redhat.com>
2978 * java-tree.h (uses_jv_markobj_p): Declare.
2979 * class.c (uses_jv_markobj_p): Removed.
2980 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
2981 (get_boehm_type_descriptor): Use it.
2982 (uses_jv_markobj_p): Moved from class.c. Return bool.
2984 2006-05-04 Tom Tromey <tromey@redhat.com>
2986 * java-tree.def (THIS_EXPR): Now a tcc_expression.
2988 2006-05-04 Andrew Haley <aph@redhat.com>
2990 * class.c (make_field_value): Always build_address_of fdecl if
2991 there is an initializer.
2993 2006-05-03 Andrew Haley <aph@redhat.com>
2996 * expr.c (maybe_rewrite_invocation): New function.
2997 (rewrite_arglist_getclass): Likewise.
2999 (expand_invoke): Call maybe_rewrite_invocation.
3000 * parse.y (patch_invoke): Likewise.
3001 * java-tree.h: (maybe_rewrite_invocation): New function.
3003 2006-04-21 Andrew Haley <aph@redhat.com>
3005 * lang.c (java_init): Handle flag_indirect_classes.
3006 * jvgenmain.c: Use "class$$" instead of "class$".
3007 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
3009 (mangle_class_field): Special case "class$$" as well as "class$".
3010 * constants.c (build_ref_from_constant_pool): If
3011 flag_indirect_classes, generate a ref into the heap.
3012 * decl.c (constants_field_decl_node,
3013 constants_data_field_decl_node): New.
3014 * class.c (build_static_class_ref): New.
3015 (build_classdollar_field): Factor out from build_class_ref().
3016 (make_field_value): Handle static fields in heap.
3017 (make_class_data): Make sure we get a static ref to class.
3018 Make class initializer const if flag_indirect_classes.
3019 (register_class): Build a class_ref for initialization if
3020 flag_indirect_classes.
3021 (emit_indirect_register_classes): New.
3023 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
3025 * expr.c, gjavah.c: Fix comment typos.
3027 2006-04-03 Andrew Haley <aph@redhat.com>
3030 * expr.c (build_field_ref): Don't check the field offset if
3033 2006-03-30 Andrew Haley <aph@redhat.com>
3036 * lang.c (java_attribute_table): New.
3037 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
3038 * expr.c (build_field_ref): Add a null pointer check for all
3039 fields of offset > 4k. Don't do so for accesses via the this
3040 pointer, which we know can never be null.
3041 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
3044 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
3046 * Make-lang.in: Rename docdir to gcc_docdir.
3048 2006-03-30 Tom Tromey <tromey@redhat.com>
3051 * parse.y (java_reorder_fields): Reset superclass field's size as
3054 2006-03-28 Tom Tromey <tromey@redhat.com>
3057 * parse.y (find_most_specific_methods_list): Added 'class'
3059 (lookup_method_invoke): Updated.
3061 2006-03-15 Tom Tromey <tromey@redhat.com>
3063 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
3064 non-static method calls.
3066 2006-03-15 David Daney <ddaney@avtrex.com>
3068 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
3071 2006-03-15 David Daney <ddaney@avtrex.com>
3073 * lang.opt (-freduced-reflection): New option.
3074 * lang.c (java_post_options): Generate an error if
3075 -freduced-reflection used with -fjni or -findirect-dispatch.
3076 * java-tree.h (flag_reduced_reflection): Declare new variable.
3077 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
3078 if bitmap overflows and flag_reduced_reflection set.
3079 * class.c (uses_jv_markobj_p): New function.
3080 (make_class_data): Moved generation of vtable to before
3081 reflection data, generate less reflection data if
3082 flag_reduced_reflection set.
3083 * gcj.texi: Document -freduced-reflection.
3085 2006-03-15 Tom Tromey <tromey@redhat.com>
3088 * class.c (get_interface_method_index): Don't put <clinit> into
3091 2006-03-15 Tom Tromey <tromey@redhat.com>
3093 * parse.y (analyze_clinit_body): Ignore empty statements.
3095 2006-03-08 David Daney <ddaney@avtrex.com>
3097 * gcj.texi: Document -static-libgcj option.
3099 2006-02-20 Andrew Haley <aph@redhat.com>
3101 * jcf-parse.c (parse_class_file): Set input_location from
3104 2006-02-15 Andrew Haley <aph@redhat.com>
3106 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
3107 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
3108 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
3110 2006-02-09 Andrew Haley <aph@redhat.com>
3113 * expr.c (expand_invoke): Allow methods in arrays to be resolved
3114 in their superclass.
3116 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
3119 2006-02-08 Tom Tromey <tromey@redhat.com>
3122 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
3123 * builtins.c (convert_real): New function.
3124 (java_builtins): Handle Float.intBitsToFloat,
3125 Float.floatToRawIntBits, Double.longBitsToDouble,
3126 Double.doubleToRawLongBits.
3128 2006-02-07 Andrew Haley <aph@redhat.com>
3130 * expr.c (expand_invoke): (BC mode.) If we find a method in a
3131 class other than the one in which we expected to find it, ignore
3135 * constants.c (build_constants_constructor): move initializer into
3136 first halfword on a 64-bit big-endian machine.
3138 2006-02-04 Tom Tromey <tromey@redhat.com>
3141 * builtins.c (max_builtin): Skip floating point 'max'.
3142 (min_builtin): Skip floating point 'min'.
3143 (check_for_builtin): Never return NULL_TREE.
3145 2006-02-04 Tom Tromey <tromey@redhat.com>
3148 * expr.c (push_type): Avoid side effect in gcc_assert.
3150 2006-02-04 Roger Sayle <roger@eyesopen.com>
3152 * decl.c (java_init_decl_processing): Create char_type_node as a
3153 regular INTEGER_TYPE node.
3154 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
3155 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
3156 test for char_type_node and promoted_char_type_node as special
3157 instances of INTEGER_TYPE tree codes.
3158 (promote_type,build_java_signature): Likewise.
3159 * jcf-write.c (adjust_typed_op): Likewise.
3160 * mangle.c (mangle_type): Likewise.
3161 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
3162 * parse.h (JINTEGRAL_TYPE_P): Likewise.
3164 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
3166 * expr.c (java_stack_swap): Revert gcc_assert patch.
3168 2006-02-03 Ben Elliston <bje@au.ibm.com>
3170 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
3171 * typeck.c: Likewise.
3172 * verify-impl.c: Likewise.
3173 * class.c: Likewise.
3175 * jcf-parse.c: Likewise.
3176 * constants.c: Likewise.
3177 * check-init.c: Likewise.
3178 * jcf-write.c: Likewise.
3179 * verify-glue.c: Likewise.
3180 * mangle.c: Likewise.
3183 * boehm.c: Likewise.
3185 2006-02-01 Jan Hubicka <jh@suse.cz>
3187 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
3188 * lang.c (java_init_options): Set no_unit_at_a_time_default.
3190 2006-01-30 Andrew Haley <aph@redhat.com>
3193 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
3195 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
3197 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
3198 Update copyright notice dates.
3200 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3202 * jvspec.c (lang_specific_spec_functions): Remove.
3204 2006-01-06 Tom Tromey <tromey@redhat.com>
3206 * gcj.texi (Arrays): Added more documentation for
3208 (Primitive types): Correct information about primitive classes.
3209 (Reference types): New node.
3212 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
3214 * jcf-parse.c (set_source_filename): Set the decl source location
3215 even when returning early.
3217 2005-12-15 Tom Tromey <tromey@redhat.com>
3218 Andrew Haley <aph@redhat.com>
3221 * parse.y (resolve_expression_name): Don't generate accessor
3222 methods for constant fields.
3224 2005-12-13 Andrew Haley <aph@redhat.com>
3228 * class.c (maybe_layout_super_class): Update current_class before
3229 calling do_resolve_class.
3231 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
3234 * jcf-write.c (write_classfile): Use PID in temporary class
3235 file. Save/restore errno when reporting error.
3237 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
3240 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
3241 to bare_function_type and including the return type
3242 * builtins.c (initialize_builtins) : Change builtin mangled name
3243 constants to conform to new mangling scheme
3245 2005-12-08 Andrew Haley <aph@redhat.com>
3248 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
3249 (soft_abstractmethod_node): New.
3250 * expr.c (build_field_ref): Add in-line check for missing field.
3251 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
3253 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3255 * Make-lang.in (java.all.build, java.install-normal): Remove.
3257 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3259 * Make-lang.in: Remove all dependencies on s-gtype, except for
3262 2005-12-07 Richard Sandiford <richard@codesourcery.com>
3264 * class.c (build_utf8_ref, emit_register_classes): Use
3265 switch_to_section and get_section.
3267 2005-12-06 Tom Tromey <tromey@redhat.com>
3270 * parse.y (patch_new_array_init): Revert previous patch.
3271 (lookup_method_invoke): Use size-less array type when creating an
3272 anonymous constructor.
3274 2005-12-05 Tom Tromey <tromey@redhat.com>
3276 * parse.y (patch_new_array_init): Don't set length on array.
3278 2005-12-02 Richard Guenther <rguenther@suse.de>
3280 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3281 buildN instead of build.
3282 * class.c (finish_class): Likewise.
3283 * expr.c (java_create_object): Likewise.
3285 2005-11-28 Tom Tromey <tromey@redhat.com>
3288 * expr.c (build_jni_stub): Unwrap the return value.
3289 * java-tree.h (soft_unwrapjni_node): New define.
3290 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3291 * decl.c (java_init_decl_processing): Initialize
3292 soft_unwrapjni_node.
3294 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
3296 * gcj.texi (gij options): Add -Xss documentation.
3298 2005-11-08 Wil Mahan <wmahan@gmail.com>
3301 * zextract.c (read_zip_archive): Fix out of memory error when
3302 reading jar files with zip-style comments.
3304 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
3306 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3308 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3310 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
3311 Wil Mahan <wmahan@gmail.com>
3314 * class.c (make_class): Create empty binfo here.
3315 (set_super_info): Only create binfo if we have superclasses.
3317 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
3320 * parse.y (method_header): Make the result of the rule a NULL_TREE
3321 when a parsing error occurs.
3323 2005-09-29 Tom Tromey <tromey@redhat.com>
3326 * jcf-io.c (memoized_dirlist_hash): New function.
3327 (caching_stat): Use it.
3329 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
3332 * class.c (inherits_from_p): Try to lay out super class
3333 if it is not already laid out.
3334 (maybe_layout_super_class): Handle the case where SUPER_CLASS
3337 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
3339 * builtins.c (max_builtin, min_builtin, abs_builtin,
3340 java_build_function_call_expr): Use fold_buildN.
3341 * class.c (layout_class_method): Likewise.
3342 * expr.c (java_truthvalue_conversion, build_java_jsr,
3343 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3344 build_java_binop, build_field_ref, expand_compare,
3345 build_known_method_ref, build_invokevirtual,
3346 process_jvm_instruction): Likewise.
3347 * parse.y (patch_binop, patch_exit_expr): Likewise.
3348 * typeck.c (convert_ieee_real_to_integer): Likewise.
3349 (convert): Don't call fold after convert_ieee_real_to_integer.
3351 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
3354 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3355 the newly created type. Set import lists here, not in create_class.
3356 (jdep_resolve_class): Set current_class.
3357 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
3358 the current package context, not ctxp->package.
3359 (cicp_cache): Removed.
3360 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3361 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3362 * java-tree.h (TYPE_PACKAGE): New macro.
3363 (struct lang_type): New member 'package'.
3365 2005-09-09 Andrew Haley <aph@redhat.com>
3368 * expr.c (pop_type_0): If the expected type is object or ptr
3369 (i.e. void*), return the type of the object we just popped from
3372 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
3374 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3375 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3377 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
3379 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3380 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3381 typos. Follow spelling conventions.
3383 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
3386 * typeck.c (lookup_do): Look up interfaces for the original class,
3388 * parse.y (java_check_regular_methods): Fix diagnostic message for
3389 more restrictive overriding of a method from an interface.
3391 2005-08-16 Tom Tromey <tromey@redhat.com>
3393 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3394 class' initial state.
3396 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3399 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3400 `literal_token' for large numeric input tokens.
3402 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3405 * parse.y (nested_field_access_p): Rename to nested_member_access_p
3406 and expand to handle method accesses across nested classes.
3407 (build_outer_method_access_method): Rename to
3408 build_nested_method_access_method. Minor adjustments to comments.
3409 (resolve_expression_name): Use the newly-renamed
3410 nested_member_access_p method.
3411 (resolve_qualified_expression_name): Likewise.
3412 (patch_method_invocation): Also consider static methods for access
3413 method generation. Minor adjustments to comments.
3414 (maybe_use_access_method): Use the more general
3415 nested_memeber_access_p to determine access across nested class
3416 boundaries. Allow THIS_ARG to be NULL (for static methods).
3418 2005-08-15 Tom Tromey <tromey@redhat.com>
3421 * expr.c (build_field_ref): Don't generate otable reference when
3422 DECL_FIELD_OFFSET is 0.
3423 * class.c (maybe_layout_super_class): Pass outer class to
3426 2005-08-15 Tom Tromey <tromey@redhat.com>
3428 * java-tree.h (LABEL_IN_SUBR): Removed.
3429 (LABEL_IN_SUBR): Likewise.
3430 (LABEL_IS_SUBR_START): Likewise.
3431 (LABEL_SUBR_START): Likewise.
3432 (LABEL_SUBR_CONTEXT): Likewise.
3433 (LABEL_CHANGED): Likewise.
3434 (LABEL_RETURN_LABEL): Likewise.
3435 (LABEL_RETURN_TYPE_STATE): Likewise.
3436 (LABEL_RETURN_LABELS): Likewise.
3437 (RETURN_MAP_ADJUSTED): Likewise.
3438 (LABEL_PENDING_CHAIN): Likewise.
3440 2005-08-15 Tom Tromey <tromey@redhat.com>
3442 * Make-lang.in (JAVA_OBJS): Removed verify.o
3443 (java/verify.o): Removed.
3444 * verify.c: Removed.
3445 * lang.c (flag_new_verifier): Removed.
3446 (java_post_options): Updated.
3447 * java-tree.h (flag_new_verifier): Removed.
3448 (verify_jvm_instructions): Removed.
3449 * expr.c (pop_type_0): Assume flag_new_verifier is true.
3450 (build_java_check_indexed_type): Likewise.
3451 (expand_java_arraystore): Likewise.
3452 (expand_java_arrayload): Likewise.
3453 (pop_arguments): Likewise.
3454 (expand_byte_code): Likewise.
3455 (process_jvm_instruction): Likewise.
3457 2005-08-10 Andrew Haley <aph@redhat.com>
3459 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3460 type mismatches to make legal GIMPLE.
3462 2005-08-10 Robin Green <greenrd@greenrd.org>
3465 * parse.y (maybe_use_access_method): Generalize check from
3466 java.lang.Object to any superclass of current_class
3468 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
3470 * class.c (build_class_ref): Wrap the primary class type in a
3472 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3473 primary class type from the NOP_EXPR in which it was placed.
3475 2005-07-28 Diego Novillo <dnovillo@redhat.com>
3477 * expr.c (expand_load_internal): Fix missing parens in
3480 2005-07-28 Andrew Haley <aph@redhat.com>
3482 * expr.c (expand_load_internal): Convert to destination type.
3484 2005-07-22 Manfred Hollstein <mh@suse.com>
3486 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3487 (check_constant): Likewise.
3488 (check_wide_constant): Likewise.
3490 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
3492 Make CONSTRUCTOR use VEC to store initializers.
3493 * check-init.c (check_init): Update to cope with VEC in
3495 * class.c (make_field_value, make_method_value, get_dispatch_table,
3496 make_class_data, emit_symbol_table, emit_catch_table,
3497 emit_assertion_table): Use build_constructor_from_list instead of
3499 * constants.c (build_constants_constructor): Likewise.
3500 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3501 VEC in CONSTRUCTOR_ELTS.
3502 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3503 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3505 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3507 * parse.y (build_new_array_init): Use build_constructor_from_list
3508 instead of build_constructor.
3509 (patch_new_array_init): Update to cope with VEC in
3511 (array_constructor_check_entry): Likewise.
3513 2005-07-12 Tom Tromey <tromey@redhat.com>
3515 * jvspec.c (lang_specific_driver): Put filelist_filename first on
3518 2005-07-12 Tom Tromey <tromey@redhat.com>
3521 * parse-scan.y (interface_member_declaration): Added
3524 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
3526 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3527 (LABEL_PENDING_CHAIN): Ditto.
3529 (DECL_BIT_INDEX): Ditto.
3531 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3534 * parse.y (inner_class_accessible): New function. Logic moved from
3535 check_inner_class_access.
3536 (check_inner_class_access): Use inner_class_accessible.
3537 (resolve_inner_class): Simplify arguments. Create circularity hash
3538 here. Keep looking for classes if we found one that was inaccessible.
3539 Return the inaccessible class only if there is no other match.
3540 (do_resolve_class): Update for new resolve_inner_class arguments.
3541 Don't create circularity_hash here.
3543 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3546 * parse.y (add_exception_to_throws): New function.
3547 (purge_unchecked_exceptions): Removed.
3548 (get_constructor_super): Renamed from verify_constructor_super. Now
3549 returns the super constructor after verification.
3550 (java_complete_expand_method): Don't use purge_unchecked_exceptions
3551 or save/restore the exception list.
3552 (check_thrown_exceptions): Add uncaught exceptions in anonymous
3553 class initializers and constructors to the throws clause of the method.
3555 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
3558 * parse.y (interface_member_declaration): Allow empty statements in
3559 interface declarations.
3561 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
3563 * Makefile.in (parse.o): Adjust dependencies.
3564 * parse.y: Include tree-dump.h.
3566 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
3568 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
3571 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
3573 * parse.y (issue_warning_error_from_context): Call
3574 pp_output_formatted_text to be able to get the buffer.
3576 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
3578 * parse.y (issue_warning_error_from_context): Update for the
3579 renaming of pp_format_text to pp_format.
3581 2005-06-28 Paul Brook <paul@codesourcery.com>
3583 * decl.c (java_init_decl_processing): Call
3584 default_init_unwind_resume_libfunc.
3586 2005-06-27 Tom Tromey <tromey@redhat.com>
3588 PR java/21540, PR java/13788:
3589 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3590 fold_constant_for_init.
3591 (patch_binop): Added 'folding' argument. Updated all callers.
3592 (patch_unaryop) <NOP_EXPR>: New case.
3593 (fold_constant_for_init) <NOP_EXPR>: Likewise.
3594 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3596 2005-06-25 Jan Hubicka <jh@suse.cz>
3598 * builtins.c (define_builtin): Accept new flags parameter.
3599 (initialize_builtins): Mark the builtins const and nothrow accordingly.
3601 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
3603 * all files: Update FSF address in copyright headers.
3605 2005-06-24 Tom Tromey <tromey@redhat.com>
3607 * verify-impl.c (verify_instructions_0): Correctly handle
3608 situation where PC falls off end.
3610 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
3613 * parse.y (find_most_specific_methods_list): Remove special case for
3616 2005-06-15 Tom Tromey <tromey@redhat.com>
3619 * class.c (make_method_value): Use soft_abstractmethod_node for
3621 * java-tree.h (soft_abstractmethod_node): New define.
3622 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3623 * decl.c (java_init_decl_processing): Initialize
3624 soft_abstractmethod_node.
3626 2005-06-13 Geoffrey Keating <geoffk@apple.com>
3628 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3630 2005-06-13 Per Bothner <per@bothner.com>
3632 * expr.c (int highest_label_pc_this_method,
3633 start_label_pc_this_method): New globals.
3634 (lookup_label): Add start_label_pc_this_method to pc for label, and
3635 update highest_label_pc_this_method. This prevents conflicts between
3636 labels from different methods.
3637 * java-tree.h: Declare new globals.
3638 * jcf-parse.c (parse_class_file): If needed bump
3639 start_label_pc_this_method and reset highest_label_pc_this_method.
3641 2005-06-13 Tom Tromey <tromey@redhat.com>
3644 * parse.y (nested_field_access_p): Handle case where outer field
3645 is inherited by enclosing class.
3647 2005-06-12 Per Bothner <per@bothner.com>
3649 * class.c (inherits_from_p): Do load_class if needed.
3651 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3653 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3654 * java-tree.h (parse_error_context): Move...
3655 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3656 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3657 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3659 2005-06-08 Roger Sayle <roger@eyesopen.com>
3661 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3663 2005-06-06 Jakub Jelinek <jakub@redhat.com>
3665 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3666 msgid for argument name.
3667 * gjavah.c (error): Likewise.
3668 * java-tree.h (parse_error_context): Likewise.
3669 * parse.y (parse_error_context, parse_warning_context,
3670 issue_warning_error_from_context): Likewise.
3672 2005-06-01 Tom Tromey <tromey@redhat.com>
3675 * class.c (build_static_field_ref): Don't fold constant fields if
3676 current class is from a .class file and we're using indirect
3679 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3681 * java/verify-glue.c: Don't include errors.h and include toplev.h.
3682 * java/Make-lang.in: Updates dependencies.
3684 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
3687 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3688 NESTED_FIELD_ACCESS_IDENTIFIER_P.
3689 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3690 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3691 * jcf-write.c (generate_classfile): Use
3692 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3693 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3694 * parse.y (build_outer_field_access): Rename to
3695 build_nested_field_access. Support static fields and outer-to-inner
3697 (outer_field_access_p): Rename to nested_field_access_p. Support
3698 static fields and generalise to outer-to-inner class and sibling
3699 inner class accesses.
3700 (outer_field_expanded_access_p): Rename to
3701 nested_field_expanded_access_p and support static fields.
3702 (outer_field_access_fix): Rename to nested_field_access_fix and
3703 support static fields.
3704 (build_outer_field_access_expr): Rename to
3705 build_nested_field_access_expr and support static fields.
3706 (build_outer_field_access_methods): Rename to
3707 build_nested_field_access_methods and support static fields. For
3708 static fields, generate accessors without class instance parameters.
3709 (build_outer_field_access_method): Rename to
3710 build_nested_field_access_method and support static fields.
3711 (build_outer_method_access_method): Use
3712 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3713 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3714 (resolve_expression_name): Consider static field accesses across
3716 (resolve_qualified_expression_name): Likewise.
3717 (java_complete_lhs): Use nested_field_access_fix instead of
3718 outer_field_access_fix.
3719 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3720 Use nested_field_expanded_access_p instead of
3721 outer_field_expanded_access_p. Use nested_field_access_fix instead
3722 of outer_field_access_fix.
3723 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3724 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3726 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
3728 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
3729 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3730 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3731 MINOR_BINARYCOMPAT_ABI_VERSION): New.
3732 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3733 (parse_version): Calculate version ID using new method. Use bit-flags
3734 for flag_indirect_dispatch and flag_bootstrap_classes.
3736 2005-05-25 Richard Henderson <rth@redhat.com>
3739 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3740 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3741 DECL_CONTEXT; avoid pushdecl_top_level.
3742 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3743 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3744 (layout_class_method): Likewise.
3745 * decl.c (java_mark_cni_decl_local): New.
3746 (java_mark_class_local): Use it.
3747 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3748 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3749 (struct lang_decl_func): Add local_cni;
3750 (struct lang_decl_var): Add class_field, vtable.
3751 (java_mangle_decl): Declare.
3752 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3753 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3754 (mangle_obstack_1): New.
3755 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
3756 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
3757 lhd_set_decl_assembler_name for things that don't need mangling.
3758 (mangle_class_field): Rename from java_mangle_class_field, make
3759 static, don't call init_mangling or finish_mangling.
3760 (mangle_vtable): Similarly.
3761 (mangle_local_cni_method_decl): New.
3762 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
3763 gcc_assert, and MANGLE_RAW_STRING.
3764 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3766 2005-05-25 DJ Delorie <dj@redhat.com>
3768 * class.c (set_constant_value): Move warning control from if() to
3771 2005-05-24 Richard Henderson <rth@redhat.com>
3773 * builtins.c (define_builtin): Don't call make_decl_rtl.
3774 * constants.c (build_constant_data_ref): Likewise.
3775 * class.c (build_utf8_ref): Likewise.
3776 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3777 (get_dispatch_table, layout_class_method): Likewise.
3778 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3780 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3781 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3782 to determine if we need a non-zero address.
3783 * decl.c (builtin_function): Don't call make_decl_rtl.
3784 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3785 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3786 * resource.c (compile_resource_data): Likewise.
3787 * parse.y (resolve_field_access): Re-word comment to avoid
3790 2005-05-24 Richard Henderson <rth@redhat.com>
3792 * class.c (registered_class): Take it out of class_roots; turn into
3794 (register_class): Make static. Don't duplicate decl node. Use
3796 (emit_register_classes): Use VEC_iterate. Use output_constant
3797 instead of assemble_integer. Don't call mark_decl_referenced
3799 * java-tree.h (register_class): Remove decl.
3801 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
3805 * parse.y (register_package, package_list): Remove.
3806 (package_declaration): Do not call register_package.
3807 (do_resolve_class): Do not use package_list.
3809 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
3811 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3814 2005-05-15 Tom Tromey <tromey@redhat.com>
3817 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3820 2005-05-12 Aaron Luchko <aluchko@redhat.com>
3822 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
3824 2005-05-11 Tom Tromey <tromey@redhat.com>
3826 * gcj.texi (Code Generation): Document -fbootstrap-classes.
3827 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3828 (parse_version): Use it.
3829 * lang.opt (-fbootstrap-classes): New option.
3831 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
3834 * class.c (maybe_layout_super_class): Look for imports in this_class.
3835 * parse.h (ctxp_for_generation_last): New.
3836 (do_resolve_class): Add a parameter.
3837 * parse.y (ctxp_for_generation_last): New.
3838 (java_pop_parser_context): Add at end of list.
3839 (find_in_imports, find_in_imports_on_demand): Look in ctxp
3840 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
3841 the given type are NULL.
3842 (do_resolve_class): Look into the imports of the new second parameter.
3843 Adjust recursive calls.
3844 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3845 calls to do_resolve_class.
3846 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3847 (java_complete_class): Do not do that here.
3849 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
3852 * Make-lang.in (java): Add gjnih.
3853 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3854 (GJNIH_OBJS): New variable.
3855 (gjnih$(exeext)): New target.
3856 (JAVA_MANFILES): Add gjnih.1.
3857 (java.uninstall): Add gjnih.1.
3858 (java.mostlyclean): Add gjnih.
3859 (java.maintainer-clean): Add gjnih.1.
3860 (java/gjavah-jni.o): New target.
3861 (.INTERMEDIATE): Add gjnih.pod.
3862 (gjnih.pod): New target.
3863 * config-lang.in (stagestuff): Add gjnih.
3864 * gcj.texi (Top): Add gjnih node.
3865 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3866 -bootclasspath options.
3867 (Invoking gjnih): New node.
3868 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3869 (TOOLNAME): New macro.
3870 (error): Replace hard-coded gcjh with TOOLNAME.
3871 (process_file): Likewise.
3873 (version): Likewise.
3874 (help): Likewise. Add help output for -force, -old, -trace and -J
3876 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3877 (options): Add force, old, trace and J fields.
3878 (main): Handle -force, -old, -trace and -J options.
3880 2005-05-03 Tom Tromey <tromey@redhat.com>
3883 * gjavah.c (main): Unlink output file on error.
3885 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
3887 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3890 2005-04-29 Tom Tromey <tromey@redhat.com>
3892 * expr.c (build_jni_stub): Updated for change to build_block.
3894 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
3896 * expr.c (force_evaluation_order): Declare 'saved' earlier.
3898 2005-04-28 Andrew Haley <aph@redhat.com>
3901 * java-tree.h (soft_resolvepoolentry_node): New.
3902 (alloc_constant_fieldref): Declare.
3903 * expr.c (expand_java_field_op): Don't call class_init for
3904 accesses to static fields with indirect dispatch.
3905 * builtins.c (initialize_builtins): Add "__builtin_expect".
3906 * decl.c (soft_resolvepoolentry_node): New variable.
3907 (java_init_decl_processing): Create a decl for
3908 "_Jv_ResolvePoolEntry".
3909 * class.c (build_fieldref_cache_entry): New function.
3910 (build_static_field_ref): Rewrite for indirect dispatch.
3911 * constants.c (find_name_and_type_constant_tree): New function.
3912 (alloc_constant_fieldref): Likewise.
3913 (build_constants_constructor): Handle CONSTANT_Fieldref and
3914 CONSTANT_NameAndType.
3917 * expr.c (force_evaluation_order): Convert outgoing args smaller
3920 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
3922 * gcj.texi (libgcj Runtime Properties): Remove obsolete
3923 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
3924 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
3926 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3928 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
3929 to `unlock_stream' with `unlock_std_streams'.
3931 2005-04-25 Jakub Jelinek <jakub@redhat.com>
3933 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
3934 instead of just expr.h.
3936 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3938 * gjavah.c (main): Unlock the stdio streams.
3939 * jcf-dump.c (main): Likewise.
3940 * jv-scan.c (main): Likewise.
3941 * jvgenmain.c (main): Likewise.
3943 2005-04-23 DJ Delorie <dj@redhat.com>
3945 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
3946 parse.y: Adjust warning() callers.
3948 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
3950 * gcj.texi (Object fields): Change "Integer" to "Int" in example
3953 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
3955 * gcj.texi: Fix typos and bogus example.
3957 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
3959 * except.c: Fix a comment typo.
3961 2005-04-19 Julian Brown <julian@codesourcery.com>
3963 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
3964 indirect dispatch with PIC.
3966 2005-04-18 Andrew Haley <aph@redhat.com>
3968 * java-except.h (struct eh_range.handler): Remove unused field.
3969 (handle_nested_ranges): Remove function declaration.
3970 (sanity_check_exception_range): Add function declaration.
3971 * verify.c (verify_jvm_instructions): Remove call to
3972 handle_nested_ranges.
3973 * verify-glue.c (verify_jvm_instructions_new): Call
3974 sanity_check_exception_range.
3975 * except.c (link_handler, eh_range_freelist, link_handler,
3976 handle_nested_ranges): Remove.
3977 (add_handler): Rewrite.
3978 (sanity_check_exception_range): New function.
3979 (print_ranges): New function.
3981 2005-04-13 Julian Brown <julian@codesourcery.com>
3983 * decl.c (finish_method): Give methods once-only linkage.
3985 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
3987 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
3989 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3991 * java-tree.h: Don't use PARAMS().
3993 2005-04-07 Per Bothner <per@bothner.com>
3995 * class.c (push_class): By default, suppress debug output.
3996 (finish_class): Enable debug output for classes we're emitting.
3998 2005-04-07 Andrew Haley <aph@redhat.com>
4000 * gcj.texi: Correct gcj-dbtool instructions.
4002 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
4004 * gcj.texi: Fix a typo.
4005 * lang.c: Fix a comment typo.
4007 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
4009 * gcj.texi (Invoking gij): Add descriptions of new -X options.
4010 Mention recognized-and-ignored compatibility options.
4011 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
4013 (About CNI): Add Memory allocation section.
4015 2005-04-01 Tom Tromey <tromey@redhat.com>
4017 * decl.c (java_init_decl_processing): Fix types of
4018 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
4019 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
4020 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
4022 2005-03-31 Jan Hubicka <jh@suse.cz>
4024 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
4025 * class.c: Include cgraph.h
4026 (make_local_functoin_alias): Mark aslias as needed.
4027 * resource.c: Include cgraph.h
4028 (compile_resource_data): Go via cgraph interface.
4030 2005-03-30 Ian Lance Taylor <ian@airs.com>
4032 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
4034 2005-03-30 Tom Tromey <tromey@redhat.com>
4036 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
4037 inner_class_info_index==0 or outer_class_info_index==0.
4039 2005-03-29 Tom Tromey <tromey@redhat.com>
4041 * gcj.texi (libgcj Runtime Properties): Document
4042 gnu.gcj.runtime.endorsed.dirs.
4044 2005-03-24 Anthony Green <green@redhat.com>
4046 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
4049 2005-03-23 Tom Tromey <tromey@redhat.com>
4051 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
4052 (parse_version): Use it.
4054 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
4056 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
4058 2005-03-18 Andrew Haley <aph@redhat.com>
4061 * decl.c (update_aliases): Don't update variables that are about
4063 (maybe_poplevels): Add comment.
4065 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
4068 * jcf-parse.c (duplicate_class_warning): New function.
4069 (java_parse_file): Call duplicate_class_warning if
4070 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
4071 (parse_zip_file_entries): Likewise. Also set
4072 CLASS_FROM_CURRENTLY_COMPILED_P.
4074 2005-03-16 Andrew Haley <aph@redhat.com>
4076 * expr.c (expand_java_arrayload): Don't generate a
4077 NullPointerException based on the type of the node.
4078 (build_java_array_length_access): Likewise.
4080 2005-03-15 Zack Weinberg <zack@codesourcery.com>
4082 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
4084 2005-03-11 Tom Tromey <tromey@redhat.com>
4086 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
4087 (libgcj Runtime Properties): Document the default .db.
4089 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
4092 * parse.y (checks_throws_clauses): Check exceptions list even when
4093 the base class does not come from a source file being compiled.
4094 (java_complete_lhs): Remove unused variable 'wfl'.
4096 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
4099 * decl.c (finish_method): Emit _Jv_InitClass for private static
4100 methods inside inner classes as well.
4102 2005-03-08 Julian Brown <julian@codesourcery.com>
4103 * Revert patch from 2005-03-08 for causing bootstrap failure on
4106 2005-03-08 Julian Brown <julian@codesourcery.com>
4108 * decl.c (finish_method): Give methods once-only linkage.
4110 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4112 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
4114 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
4116 * verify-glue.c (vfy_is_assignable_from): Perform static check using
4117 can_widen_reference_to if the C++ ABI is in use.
4118 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
4119 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
4120 type_isresolved, init_state, set_pc, state_get_pc,
4121 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
4122 (verify_fail): Report the current PC from the verifier context.
4123 (free_state): Remove #if 0 block to enable this function.
4124 (free_verifier_context): Call free_state on state_list iterator
4125 values before freeing them.
4126 * expr.c (pop_type_0): Pop correct type for error message when stack
4127 contains a multi-word type.
4129 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4131 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
4132 for known NULL array length access.
4134 2005-03-07 Tom Tromey <tromey@redhat.com>
4136 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
4138 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
4140 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
4141 typeck.c: Update copyright.
4143 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
4146 * xref.c, xref.h: Remove file.
4147 * Make-lang.in (java/xref.o): Remove.
4148 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
4149 * lang.c (flag_emit_xref): Remove definition.
4150 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
4151 * typeck.c (convert): Remove use of do_not_fold.
4152 * parse.y (do_not_fold): Remove definition.
4153 (parser grammar): Remove xref code.
4154 (maybe_create_class_interface_decl, create_class): Likewise.
4155 (register_fields, method_header, finish_method_declaration): Likewise.
4156 (declare_local_variables, source_end_java_method): Likewise.
4157 (java_complete_expand_classes): Do not set do_not_fold.
4158 (java_complete_expand_method): Remove xref code.
4159 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
4160 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
4161 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
4162 (patch_synchronized_statement, patch_throw_statement): Likewise.
4163 (maybe_build_class_init_for_field): Likewise.
4165 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
4167 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
4168 instead of IS_NON_TYPE_CODE_CLASS.
4170 2005-03-04 Andrew Haley <aph@redhat.com>
4173 * class.c (set_method_index): Don't set method_index if it is
4175 (layout_class_method): Don't complain about "non-static method foo
4176 overrides static method" in the case of indirect dispatch.
4178 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4180 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
4182 * Make-lang.in: Don't elide warnings in jcf-io.c.
4184 2005-03-01 Per Bothner <per@bothner.com>
4187 * check-init.c (wfl): Remove static.
4188 (final_assign_error, check_init): Replace calls to parse_error_context
4190 (check_init): Save, set, and restore input_location for each exp.
4192 2005-03-01 Per Bothner <per@bothner.com>
4194 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
4195 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
4196 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
4198 2005-03-01 Per Bothner <per@bothner.com>
4200 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
4202 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
4205 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
4208 2005-02-22 Tom Tromey <tromey@redhat.com>
4211 * verify-impl.c (EITHER): New define.
4212 (types_compatible): Handle it.
4213 (check_field_constant): Use it.
4215 2005-02-18 Tom Tromey <tromey@redhat.com>
4218 * verify-impl.c (types_equal): Fixed test.
4221 * verify-glue.c (vfy_class_has_field): New function.
4222 * verify.h (vfy_class_has_field): Declare.
4223 * verify-impl.c (check_field_constant): Added 'putfield'
4225 (verify_instructions_0): Updated.
4226 (types_equal): New function.
4228 2005-02-14 Tom Tromey <tromey@redhat.com>
4231 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
4232 stack effect of multianewarray.
4234 2005-02-14 Andrew Haley <aph@redhat.com>
4237 * expr.c (expand_byte_code): Call promote_arguments().
4238 (promote_arguments): New function.
4239 * decl.c (check_local_unnamed_variable): Remove special case for
4241 (find_local_variable): Promote all boolean types to int
4242 when searching for local variable decls.
4244 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
4246 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
4247 parse-scan.y: Update copyright.
4249 2005-02-11 Per Bothner <per@bothner.com>
4252 * parse-scan.y (input_location): Remove variable.
4253 (main_input_filename): New - replaces input_filename, which isn't
4254 settable if USE_MAPPED_LOCATION.
4255 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
4256 so we don't reference input_location or wfl_operator in that case.
4257 * jv-scan.c (expand_location): Remove - no longer used.
4258 (main): Set main_input_filename rather than input_filename.
4260 2005-02-09 Richard Henderson <rth@redhat.com>
4262 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
4263 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
4265 2005-02-08 Marcin Dalecki <martin@dalecki.de>
4267 * expr.c (add_type_assertion): Use the proper enumeration type,
4268 since this is what htab_find_slot() is expecting.
4270 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
4272 * gcj.texi: Update copyright dates.
4274 2005-02-02 Tom Tromey <tromey@redhat.com>
4276 * gcj.texi (libgcj Runtime Properties): Default library_control
4279 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
4282 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4283 (modifiers) when square brackets are present in a declaration for
4285 * jv-scan.c (main): Set input_filename and input_line.
4287 2005-02-01 Tom Tromey <tromey@redhat.com>
4290 * gjavah.c (get_field_name): Don't override name for JNI header.
4292 2005-02-01 Roger Sayle <roger@eyesopen.com>
4294 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4295 of unsigned types using iushr and lushr JVM bytecodes.
4297 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4300 * gjavah.c (jni_print_float): Do not emit floating-point
4301 initialiser for a static final field.
4302 (jni_print_double): Likewise.
4304 2005-02-01 Mark Mitchell <mark@codesourcery.com>
4307 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4308 * gjavah.c (print_field_info): Mark static data members of
4309 floating-point type with "__extension__".
4311 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4313 * gjavah.c (print_field_info): Mark static data members of
4314 floating-point type with "__extension__".
4316 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4319 * parse.y (build_string_concatenation): Remove redundant if.
4320 (patch_conditional_expr): Attempt to patch_string() the condition
4321 of a ?: as well, in addition to its other operands.
4323 2005-01-25 Tom Tromey <tromey@redhat.com>
4325 * Make-lang.in (java/java-tree-inline.o): Removed.
4327 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
4330 * parse.y (patch_binop): Allow comparisons against NULL only
4331 if the other operand is of a reference type.
4333 2005-01-24 Tom Tromey <tromey@redhat.com>
4335 * java-tree.h (gcj_abi_version): Declare.
4336 * class.c (make_class_data): Push gcj_abi_version into "next"
4337 field. Renamed field.
4338 * decl.c (gcj_abi_version): New global.
4339 (parse_version): New function.
4340 (java_init_decl_processing): Call it. Renamed 'next' field.
4342 (GCJ_BINARYCOMPAT_ADDITION): New define.
4344 2005-01-24 Roger Sayle <roger@eyesopen.com>
4347 * jcf-write.c (generate_bytecode_insns): Conversions between
4348 integer types of the same precision shouldn't generate widening
4349 or narrowing conversion bytecodes.
4351 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
4353 * java-except.h, java-tree.h: Remove unused prototypes.
4355 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
4358 * jcf-write.c (perform_relocations): Don't call memcpy if source
4359 and destination are the same.
4361 2005-01-17 Tom Tromey <tromey@redhat.com>
4363 * verify-impl.c (get_short): Sign extend.
4364 (get_int): Likewise.
4366 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
4368 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4371 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4373 * verify.c: Revert to the version before the BC-ABI merge.
4375 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4378 * check-init.c (check_init): Take care of references that do not
4379 have an explicit final variable declaration (e.g. array length
4380 access) for pre/post in/de-crement operators.
4382 2005-01-08 Mark Wielaard <mark@klomp.org>
4384 * parse.y (process_imports): Allocate (and free) original_name only
4385 when not already defined.
4386 * jcf-parse.c (read_class): Free results of find_class() and
4388 (java_parse_file): Keep pointer to head of file_list and free when
4389 done. Free result of lrealpath().
4391 2005-01-05 Tom Tromey <tromey@redhat.com>
4393 * gcj.texi (Standard Properties): java.ext.dirs is now used.
4395 2004-12-20 Andrew Haley <aph@redhat.com>
4397 * typeck.c: Use fold_convert for ints and booleans.
4399 2004-12-17 Andrew Haley <aph@redhat.com>
4402 * typeck.c (convert): Use a CONVERT_EXPR when converting to
4403 BOOLEAN_TYPE or CHAR_TYPE.
4404 (convert_to_boolean, convert_to_char) : Remove.
4405 * convert.h (convert_to_boolean, convert_to_char) : Remove.
4406 * expr.c (expand_load_internal): Do type conversion if type is not
4409 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
4412 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4415 2004-12-07 Andrew Haley <aph@redhat.com>
4418 * jcf-parse.c (load_class): Remove sanity test for missing inner
4421 2004-12-06 Tom Tromey <tromey@redhat.com>
4423 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4424 (java.uninstall): Likewise.
4425 (java.maintainer-clean): Likewise.
4426 (.INTERMEDIATE): Likewise.
4427 (java.install-man): Likewise.
4428 (gcj-dbtool.pod): New target.
4429 * gcj.texi (Code Generation): Document -findirect-dispatch.
4430 (libgcj Runtime Properties): Document
4431 gnu.gcj.precompiled.db.path.
4432 (Top): Link to "Invoking gcj-dbtool".
4434 2004-12-06 Tom Tromey <tromey@redhat.com>
4437 * java-tree.h (extract_field_decl): Declare.
4438 * parse.y (extract_field_decl): Renamed from
4439 strip_out_static_field_access_decl. No longer static.
4440 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4442 2004-12-03 Tom Tromey <tromey@redhat.com>
4444 * lang.c (flag_new_verifier): Define.
4445 (java_post_options): Set flag_new_verifier if indirect dispatch
4447 * lang.opt (fnew-verifier): Removed.
4449 2004-12-03 Tom Tromey <tromey@redhat.com>
4452 * Make-lang.in (java.install-common): Only install transformed
4453 gcjh if gcj-cross exists.
4455 2004-12-03 Andrew Haley <aph@redhat.com>
4458 * except.c (link_handler): Patch 'outer' field of siblings of the
4459 range we're demoting.
4461 2004-12-03 Andrew Haley <aph@redhat.com>
4464 * class.c (layout_class_method): Don't fail to override a method
4465 simply because it has DECL_ARTIFICIAL set.
4467 2004-12-02 Tom Tromey <tromey@redhat.com>
4470 * parse.y (craft_constructor): Special case null_pointer_node.
4472 2004-12-02 Tom Tromey <tromey@redhat.com>
4475 * java-gimplify.c (java_gimplify_expr): Don't call
4476 SET_EXPR_LOCATION unless wrapped tree is an expression.
4478 2004-11-27 Per Bothner <per@bothner.com>
4480 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
4481 Fix fencepost error in 'i', which got executed one too many times.
4482 Also, fold memcpy into explicit loop, as originally intended.
4483 Also, free temporary 'buf' which otherwise leaks.
4485 2004-11-27 Per Bothner <per@bothner.com>
4487 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4488 local static variables if not USE_MAPPED_LOCATION.
4490 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
4492 * class.c, decl.c, expr.c: Fix comment typos.
4494 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
4497 * decl.c (end_java_method): Call
4498 attach_init_test_initialization_flags on all the init_decls.
4499 * parse.y (attach_init_test_initialization_flags): Move to ...
4500 * expr.c (attach_init_test_initialization_flags): here and
4501 support BIND_EXPR also.
4502 * java-tree.h (attach_init_test_initialization_flags): Prototype.
4503 * jcf-parse.c (parse_class_file): Don't disable class init
4506 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
4508 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4511 2004-11-24 Richard Henderson <rth@redhat.com>
4513 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4514 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4516 2004-11-24 Tom Tromey <tromey@redhat.com>
4518 * verify.c (defer_merging): Don't use C++-style comment.
4519 * verify.h (java_opcode): Added java_opcode_end.
4520 * class.c (build_class_ref): Remove C++ comment and old FIXME.
4522 * verify-impl.c (vfy_push_type): Removed bogus "return".
4523 (initialize_stack): Use vfy_alloc and vfy_free.
4524 (verify_instructions_0): Likewise.
4526 * Merged gcj-abi-2-dev-branch to trunk.
4528 2004-11-24 Andrew Haley <aph@redhat.com>
4530 * jcf-parse.c (parse_class_file): Set file_start_location.
4532 2004-11-10 Tom Tromey <tromey@redhat.com>
4534 * class.c (make_field_value): Don't call build_static_field_ref.
4535 (build_static_field_ref): Don't emit direct references when using
4538 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
4539 -verbose:class into man page synopsis.
4541 2004-11-09 Tom Tromey <tromey@redhat.com>
4543 * expr.c (build_java_arraystore_check): Still generate check if
4544 element type is itself an array.
4546 2004-11-08 Tom Tromey <tromey@redhat.com>
4548 * java-tree.h (soft_check_assignment_node): Removed.
4549 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4550 * decl.c (java_init_decl_processing): Don't initialize
4551 soft_check_assignment_node.
4553 2004-11-05 Tom Tromey <tromey@redhat.com>
4555 * class.c (layout_class_methods): Don't add Miranda methods when
4556 using indirect dispatch.
4558 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
4560 * class.c (make_class_data): Call emit_assertion_table to set the
4561 'assertion_table' field.
4562 (build_signature_for_libgcj): Move here from expr.c.
4563 (add_assertion_table_entry): New function. Callback for assertion
4564 hashtable traversal.
4565 (emit_assertion_table): New. Take class argument, and generate
4566 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4567 * decl.c (init_decl_processing): Define assertion_entry_type record.
4568 Push 'assertion_table' class field instead of 'verify'.
4569 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4570 (type_assertion_hash): Include 'assertion_code' in hash.
4571 (add_type_assertion): Rewritten. Take class and assertion_code
4572 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4573 (can_widen_reference_to): Use new add_type_assertion() arguments.
4574 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4575 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4576 (verify_identifier_node): Removed.
4577 (assertion_entry_type, assertion_table_type): New.
4578 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4579 assertion code definitions.
4580 (struct type_assertion): Add assertion_code. Rename 'source_type' and
4581 'target_type' to 'op1' and 'op2'.
4582 (add_type_assertion): Declare.
4583 (lang_printable_name_wls): Remove unused definition.
4584 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4585 to emit runtime assertion.
4586 (vfy_note_stack_type): Clean up non-C90 declarations.
4587 (vfy_note_local_type): Likewise.
4588 * verify.h (vfy_is_assignable_from): Declare.
4589 * verify-impl.c (is_assignable_from_slow): Remove unused function.
4590 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4591 instead of is_assignable_from_slow().
4592 (types_compatible): Reinstate ref_compatible() call.
4594 2004-11-04 Tom Tromey <tromey@redhat.com>
4596 * class.c (build_static_field_ref): Reverted previous patch.
4598 * class.c (build_static_field_ref): Don't emit direct references
4599 when using indirect dispatch.
4601 2004-11-03 Tom Tromey <tromey@redhat.com>
4603 * expr.c (expand_java_arrayload): Set lhs_type_node.
4604 (expand_java_arraystore): Set rhs_type_node.
4606 2004-11-02 Tom Tromey <tromey@redhat.com>
4608 * jcf-parse.c (compute_class_name): Use filename length from zip
4609 directory, not strlen.
4611 * expr.c (expand_invoke): Mark new interface methods as abstract.
4613 2004-11-01 Tom Tromey <tromey@redhat.com>
4615 * verify-impl.c (push_jump): Removed check for uninitialized
4617 (push_exception_jump): Likewise.
4618 (handle_ret_insn): Likewise.
4619 (handle_jsr_insn): Likewise.
4620 (state_check_no_uninitialized_objects): Removed.
4622 * decl.c (check_local_unnamed_variable): Recognize
4623 promoted-to-int parameters when using the new verifier.
4624 * expr.c (expand_java_arraystore): Explicitly request array type
4625 when using new verifier.
4626 (expand_java_arrayload): Likewise.
4627 (invoke_build_dtable): Don't pass object_type_node as
4628 expression argument to build_java_indirect_ref.
4629 (build_java_check_indexed_type): Do nothing.
4630 (build_java_arraystore_check): Handle case where array doesn't
4632 (build_java_array_length_access): Likewise.
4633 (expand_invoke): Handle case where interface overrides a method
4635 (pop_type_0): Always succeed for reference types.
4636 (process_jvm_instruction): Don't pop a value in a dead
4638 (pop_arguments): Convert arguments to correct types.
4640 2004-10-29 Andrew Haley <aph@redhat.com>
4642 * jcf-parse.c (give_name_to_class): Remove line that was
4645 2004-10-29 Andrew Haley <aph@redhat.com>
4647 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4649 2004-10-20 Andrew Haley <aph@redhat.com>
4651 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4653 2004-10-26 Tom Tromey <tromey@redhat.com>
4655 * verify.h (vfy_notify_verified): Removed.
4656 * verify-glue.c (vfy_notify_verified): Removed.
4658 2004-10-26 Tom Tromey <tromey@redhat.com>
4660 * verify-impl.c (debug_print_state): Declare `i' before code.
4661 (merge_types): Modify `t' when it is null_type.
4663 2004-10-26 Tom Tromey <tromey@redhat.com>
4665 * verify-impl.c (type_print): Renamed from print. Now static and
4667 (debug_print_state): Use type_print.
4669 2004-10-25 Tom Tromey <tromey@redhat.com>
4671 * expr.c (build_invokeinterface): Compute correct offset for
4672 index into interface methods.
4674 2004-10-20 Tom Tromey <tromey@redhat.com>
4676 * java-tree.h (verify_jvm_instructions_new): Declare.
4678 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4681 * verify-impl.c (verify_instructions): Correctly handle wide
4683 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4684 (vfy_get_component_type): Strip pointer types.
4685 (vfy_find_class): Use get_type_from_signature. Strip pointer
4687 Include java-except.h.
4689 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
4691 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4692 vfy_push_type_t, set_variable, add_new_state, merge_into,
4693 handle_jsr_insn, branch_prepass, check_class_constant,
4694 check_wide_constant, get_one_type, compute_static_types,
4695 verify_instructions_0): Clean up C99 declarations after statements.
4697 2004-10-20 Tom Tromey <tromey@redhat.com>
4699 * verify-impl.c (merge_refs): Compare reference against iterator,
4702 * verify-glue.c (vfy_tag): Mask off resolved flag.
4704 2004-10-19 Tom Tromey <tromey@redhat.com>
4706 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4707 (init_state_with_stack): Initialize `this_type' in state.
4708 (verify_method): Use debug_print.
4709 * verify-glue.c (vfy_is_primitive): Removed debugging print.
4710 (vfy_note_stack_depth): Reverted last patch.
4711 (vfy_note_stack_type): Note pointer to Object, not Object.
4712 (vfy_note_local_type): Likewise.
4714 * verify.h (vfy_note_instruction_seen): Declare.
4715 * verify-glue.c (verify_jvm_instructions_new): Set
4716 BCODE_EXCEPTION_TARGET on target instruction.
4717 (vfy_note_instruction_seen): New function.
4718 * verify-impl.c (FLAG_INSN_SEEN): New define.
4719 (verify_instructions_0): Set flag on instruction. Save state for
4721 (verify_instructions): Call vfy_note_instruction_seen.
4723 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4724 (verify_jvm_instructions_new): Call method_init_exceptions,
4725 add_handler, and handle_nested_ranges.
4726 * verify-impl.c (verify_method): Return 1 on success.
4727 (verify_instructions_0): Save the state at PC=0.
4729 * verify-impl.c (init_type_from_class): Set is_resolved and
4730 ref_next on new ref_intersection.
4731 (init_type_from_string): Likewise.
4733 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
4735 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4736 if flag_new_verifier is set.
4737 * java-tree.h (flag_new_verifier): Declare.
4738 * lang.opt (fnew-verifier): New option.
4739 * verify-impl.c: Work around namespace pollution by undef'ing
4741 (struct verifier_context): Make 'bytecode' const.
4742 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4743 (types_compatible): For the BC-ABI, always consider reference types
4745 (check_class_constant): Use vfr->current_class.
4746 (check_constant): Likewise.
4747 (check_wide_constant): Likewise.
4748 (check_field_constant): Check for 'L' at start of type name.
4749 (get_one_type): Return pointer instead of type. Set type result in
4750 caller via passed type pointer.
4751 (compute_argument_types): Update to use new get_one_type arguments.
4752 (compute_return_type): Likewise.
4753 (make_verifier_context): New. Allocate and initialize 'vfr'.
4754 (free_verifier_context): New. Free 'vfr' and its contents.
4755 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4756 and free_verifier_context.
4758 2004-10-15 Tom Tromey <tromey@redhat.com>
4760 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4761 * verify.h (vfy_fail): Fixed formatting.
4763 * verify-impl.c (vfr): Fixed comment formatting.
4764 (collapse_type): New function.
4765 (verify_instructions): Notify compiler about type map.
4766 * verify.h (vfy_note_stack_depth): Updated.
4767 (vfy_note_stack_type): Likewise.
4768 (vfy_note_local_type): Likewise.
4769 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4771 * verify-glue.c (vfy_note_stack_depth): Correctly size type
4772 state. Added `method' argument.
4773 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
4775 (vfy_note_local_type): New function.
4776 (vfy_unsuitable_type): Likewise.
4777 (vfy_return_address_type): Likewise.
4778 (vfy_null_type): Likewise.
4780 * verify.h (VFY_IN_GCC): Removed.
4781 (VFY_WANT_TYPEMAP): Removed.
4782 * verify-impl.c (verify_instructions_0): Removed useless "\".
4783 (struct state) <next>: Uncomment.
4785 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
4787 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
4790 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4792 * Make-lang.in (verify.o): Re-enabled this target.
4793 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4794 (vfy_get_interface): Likewise.
4795 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4796 * verify.h (verify_jvm_instructions_new): Declare.
4797 * verify-impl.c (free_state): Temporarily comment out unused
4800 2004-10-06 Tom Tromey <tromey@redhat.com>
4802 * java-tree.h (JV_STATE_READ): New enum value.
4804 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4806 * verify.h: New file.
4808 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
4810 * verify-impl.c, verify-glue.c, verify.h: New files.
4811 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4813 2004-09-24 Andrew Haley <aph@redhat.com>
4815 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4816 for a slot if it's of pointer type.
4818 2004-09-14 Tom Tromey <tromey@redhat.com>
4820 * class.c (make_class_data): Correctly initialize "state" field.
4821 Initialize "engine" field.
4822 * decl.c (java_init_decl_processing): Add "engine" field.
4824 2004-09-10 Andrew Haley <aph@redhat.com>
4827 * expr.c (build_invokeinterface): Use fast method for interface
4829 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4830 JTI_ITABLE_PTR_TYPE.
4831 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
4832 (emit_symbol_table): Add new arg, element_size.
4833 * decl.c (java_init_decl_processing): Initialize Class.itable.
4834 * class.c (GEN_TABLE): New macro.
4835 (gen_indirect_dispatch_tables): Use it. Add itable.
4836 (make_class_data): Add new arg for emit_symbol_table().
4838 (add_miranda_methods): Make sure search_class has been parsed.
4839 (emit_symbol_table): Add new arg, element_size.
4841 2004-09-06 Andrew Haley <aph@redhat.com>
4843 * verify.c (merge_types): Return Object for all merges of
4845 * expr.c (add_type_assertion): Don't generate assertions when
4846 source type is array of Object.
4848 2004-09-03 Andrew Haley <aph@redhat.com>
4850 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4852 * lang.c (java_post_options): Force flag_verify_invocations if
4853 we're not using indirect dispatch.
4855 * expr.c (pop_type_0): Move test for interfaces before call to
4856 can_widen_reference_to().
4857 (build_signature_for_libgcj): Remove generation of canonical array
4859 (add_type_assertion): Canonicalize both arrays.
4860 Don't assert that type X can be assigned to Object.
4861 Don't assert that type X an be assigned to type X.
4862 Don't assert that Object can be assigned to type X.
4863 (can_widen_reference_to): Warn whenever we generate an assertion.
4864 (process_jvm_instruction): Use throwable_type_node for the type of
4867 2004-09-01 Andrew Haley <aph@redhat.com>
4869 * decl.c (java_init_decl_processing): Change
4870 verify_identifier_node to "__verify".
4871 * expr.c (add_type_assertion): Use verify_identifier_node for name.
4872 * java-tree.h (verify_identifier_node): Change to "__verify".
4874 * expr.c (build_signature_for_libgcj): New function.
4875 (add_type_assertion): Use it to construct signatures for
4876 source_type and target_type.
4878 2004-08-27 Andrew Haley <aph@redhat.com>
4880 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4881 (verify_identifier_node): New.
4882 (TYPE_VERIFY_METHOD): New.
4883 (struct type_assertion): New type.
4884 * expr.c (type_assertion_eq): New function.
4885 (type_assertion_hash): New function.
4886 (add_type_assertion): New function.
4887 (can_widen_reference_to): Call add_type_assertion().
4888 * decl.c (java_init_decl_processing): Add verify_identifier_node.
4889 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4890 (finish_class): Output TYPE_VERIFY_METHOD (type).
4892 * decl.c (end_java_method): Nullify unused fields.
4894 2004-08-17 Andrew Haley <aph@redhat.com>
4896 * verify.c (defer_merging): Quieten.
4897 * jcf-parse.c (load_class): Only try to open a class file if it's
4898 java.lang.Object or if it's part of the current compilation.
4899 Check that the class we just tried to load is the class we just
4901 (java_parse_file): Set flag_verify_invocations off if we're
4902 compiling from .class.
4903 (parse_zip_file_entries): Abort if we try to read a dummy class.
4904 * expr.c (can_widen_reference_to): Quieten.
4905 (build_invokevirtual): Abort if we try to invokevirtual an
4907 (expand_invoke): Don't build a non-interface call to an interface.
4908 (build_instanceof): Don't do premature optimization if
4909 flag_verify_invocations is not set.
4910 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
4912 (build_static_field_ref): Add correct type conversion for
4914 (add_miranda_methods): Disable generation of Miranda methods for
4916 (layout_class_method): Don't complain about non-static method
4917 overrides static method with dummy classes.
4919 2004-08-13 Tom Tromey <tromey@redhat.com>
4921 * class.c (build_static_field_ref): Re-enable atable lookups for
4924 * parse.y (strip_out_static_field_access_decl): Indentation fix.
4926 2004-08-11 Tom Tromey <tromey@redhat.com>
4928 * gcj.texi (libgcj Runtime Properties): Document new properties.
4930 2004-08-06 Andrew Haley <aph@redhat.com>
4932 * jcf-parse.c (load_class): Check that we really have loaded the
4933 class we're looking for.
4935 2004-07-19 Andrew Haley <aph@redhat.com>
4937 * verify.c (verify_jvm_instructions): Comment change only.
4939 * typeck.c (build_java_array_type): Add size field to array name.
4941 * java-tree.h (LOCAL_SLOT_P): New.
4942 (update_aliases): Add PC argument.
4943 (pushdecl_function_level): New function.
4945 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4946 MODIFY_EXPR, and SAVE_EXPR.
4947 (java_gimplify_modify_expr): New function.
4949 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4950 (expand_iinc): Pass PC to update_aliases().
4951 (STORE_INTERNAL): Likewise.
4952 (process_jvm_instruction): Likewise.
4954 * decl.c (base_decl_map): New variable.
4955 (uniq): New variable.
4956 (update_aliases): Rewrite with more thorough checking.
4957 (debug_variable_p): New function.
4958 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
4959 (check_local_named_variable): Delete whole function.
4960 (initialize_local_variable): New function.
4961 (check_local_unnamed_variable): Add checks and comments.
4962 (find_local_variable): Rewrite.
4963 (java_replace_reference): New function.
4964 (function_binding_level): New variable.
4965 (pushdecl_function_level): New function.
4966 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4967 (maybe_pushlevels): Call pushdecl() on each of the new decls.
4968 (start_java_method): Reset uniq. Create base_decl_map. Set
4969 function_binding_level.
4970 (end_java_method): Null unused fields to save memory.
4972 2004-06-29 Andrew Haley <aph@redhat.com>
4974 * except.c (expand_start_java_handler): Push a new binding level.
4975 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
4976 register_exception_range() to register where we'll do it.
4977 (expand_end_java_handler): Remove old bogus code. Replace with
4978 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4979 the top of the expression we're curently building.
4980 (maybe_end_try): Delete.
4981 * decl.c (binding_level.exception_range): New field.
4982 (clear_binding_level): Add field exception_range. Reformat.
4983 (poplevel): Call expand_end_java_handler().
4984 (poplevel): Call java_add_stmt only if functionbody is false.
4985 (maybe_poplevels): Don't call maybe_end_try() from here.
4986 (end_java_method): Clear no longer used trees in function decl.
4987 (register_exception_range): New function.
4988 * java-tree.h (register_exception_range, struct eh_range): Declare.
4990 2004-06-22 Andrew Haley <aph@redhat.com>
4992 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
4994 * check-init.c (get_variable_decl): Teach check-init about
4995 FIELD_DECLs addressed via the otable.
4996 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
4999 2004-05-28 Andrew Haley <aph@redhat.com>
5001 * jcf-parse.c (load_class): Don't try to read a class that we've
5004 * expr.c (build_invokeinterface): Use the old-fashioned way of
5005 doing indirect dispatch: look up interfaces by name.
5006 * java-tree.h (enum java_tree_index): Add
5007 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
5008 * decl.c (java_init_decl_processing): Add
5009 soft_lookupinterfacemethodbyname_node.
5011 * gjavah.c (print_method_info): Final methods have vtable entries,
5012 so gjavah needs to output them.
5013 * class.c (layout_class_method): Generate vtable entries for final
5015 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
5016 dispatch, even if a method is final.
5018 2004-05-25 Andrew Haley <aph@redhat.com>
5020 * class.c (build_symbol_entry): Convert the names of constructors
5021 to init_identifier_node when generating an entry for the indirect
5024 * expr.c (build_known_method_ref): Generate indirect calls for
5025 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
5027 2004-05-24 Andrew Haley <aph@redhat.com>
5029 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
5030 atable element is of the right type.
5032 * class.c (build_static_field_ref): Cast pointer to correct type
5035 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
5037 * Merged with HEAD as of 20040514. Diff against
5038 gcj-abi-2-merge-20040514.
5040 2004-04-16 Andrew Haley <aph@redhat.com>
5042 * verify.c (check_pending_block): Disable subroutine checks.
5043 (defer_merging): New function.
5044 (merge_types): If types are dummy, use defer_merging to combine them.
5045 (verify_jvm_instructions): If invocation is invokeinterface and
5046 target is dummy, assume target really is an interface.
5048 * parse.y (patch_invoke): Break out call to java_create_object.
5050 * lang.c (flag_verify_invocations): New.
5052 * jcf-parse.c (load_class): If we've already failed to load a
5053 class, don't try again.
5054 (load_class): If we can't find a .class file, don't fail, but emit
5056 (parse_class_file): Don't act on dummy methods.
5058 * java-tree.h (flag_verify_invocations): New.
5060 (lang_type.dummy_class): New field.
5061 (java_create_object): New function.
5062 (METHOD_DUMMY): New.
5064 * expr.c (build_field_ref): Widen field offset.
5065 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
5066 that each of its elements is compatible with the one we're
5068 (pop_type_0): Issue a warning to say that we need to generate a
5070 (java_create_object): New function.
5071 (build_field_ref): Only generate hard refs if we're not using
5073 (expand_java_field_op): If we're using !verify_invocations and we
5074 see a missing field, generate a decl for it.
5076 (expand_invoke): If a class doesn't have the method we seek and
5077 we're using !flag_verify_invocations, generate a decl for the
5080 (build_known_method_ref): Always use indirect dispatch via the
5081 atable for static methods.
5083 (expand_java_NEW): Break out object creation into new function,
5086 (can_widen_reference_to): Issue a warning to say that we need to
5087 generate a runtime check.
5089 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
5090 (make_method_value): Also use index for interfaces.
5091 (make_class_data): Skip dummy field for inherited data.
5092 Don't build method array for dummy methods.
5093 Set size_in_byte to -1 when using inirect dispatch
5094 Don't build a hard class ref if we don't have a hard ref to our
5095 superclass, or if we're using inirect dispatch.
5096 Null out dispatch tables.
5098 (layout_class_method): Don't complain about non-static method
5099 overrides static method is method is artificial.
5101 (build_static_field_ref): Disable atable references to static
5102 fields for the time being.
5104 (layout_class_methods): Check for CLASS_INTERFACE as
5105 well as CLASS_ABSTRACT.
5107 2004-11-24 Steven Bosscher <stevenb@suse.de>
5109 * class.c (make_class_data): Don't check flag_inline_functions.
5110 * lang.c (flag_really_inline): Remove unused flag.
5111 (java_handle_option): Don't set it here. Remove special handling
5112 of flag_inline_functions for Java.
5113 (java_init): Don't set flag_inline_trees here. Already done...
5114 (java_post_options): ...here. Don't clear flag_inline_functions.
5116 2004-11-24 Steven Bosscher <stevenb@suse.de>
5118 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
5119 (java_gimplify_exit_block_expr): New function.
5120 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
5122 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
5123 (EXIT_BLOCK_EXPR): Likewise.
5124 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
5125 (LABELED_BLOCK_BODY): Likewise.
5126 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
5127 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
5128 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
5130 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
5131 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
5132 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
5133 second operand of EXIT_BLOCK_EXPR.
5134 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
5136 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
5138 2004-11-23 Ben Elliston <bje@au.ibm.com>
5140 * xref.h (xref_flag_value): Remove.
5141 (xref_set_data, xref_get_data): Likewise.
5142 (xref_set_current_fp): Likewise.
5143 (XREF_NONE): Likewise.
5144 (XREF_GET_DATA): Likewise.
5145 * xref.c (xref_flag_value): Remove.
5146 (xref_set_data, xref_get_data): Likewise.
5147 (xref_set_current_fp): Likewise.
5149 2004-11-23 Ben Elliston <bje@au.ibm.com>
5151 * gjavah.c (output_directory): Make static.
5152 (temp_directory): Likewise.
5154 2004-11-15 Tom Tromey <tromey@redhat.com>
5156 * decl.c (instn_ptr_type_node): Removed.
5157 (lineNumbers_ptr_type_node): Removed.
5158 (jint_type): Removed.
5159 (jint_ptr_type): Removed.
5161 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
5164 * check-init.c (check_init): Ignore DECL_EXPR.
5165 * expr.c (always_initialize_class_p): Reenable.
5166 (build_class_init): Use a variable to store the decl. Also use
5167 boolean_false_node instead of integer_zero_node.
5168 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
5171 2004-11-08 Tom Tromey <tromey@redhat.com>
5174 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
5175 generating a JNI header.
5176 (print_field_info): Handle JNI headers.
5177 (jni_print_float): Likewise.
5178 (jni_print_double): Likewise.
5180 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
5182 * decl.c (end_java_method): Remove duplicated code.
5184 2004-11-06 Zack Weinberg <zack@codesourcery.com>
5185 Gerald Pfeifer <gerald@pfeifer.com>
5187 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
5190 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
5193 * class.c: Reinstate 2004-08-18 patch.
5194 (make_local_function_alias): Don't create an alias for extern (native)
5197 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
5200 * class.c (make_local_function_alias): Revert 2004-08-18 change.
5201 (make_method_value): Likewise.
5203 2004-10-21 Andrew Haley <aph@redhat.com>
5206 * jcf-parse.c (set_source_filename): Add code to build new sfname.
5208 2004-10-20 Andrew Haley <aph@redhat.com>
5210 * decl.c (end_java_method): Don't expand if flag_syntax_only.
5211 Remove duplicated code block.
5213 2004-10-18 Steven Bosscher <stevenb@suse.de>
5215 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
5216 New rules to work around old Bison warnings.
5218 2004-10-17 Steven Bosscher <stevenb@suse.de>
5220 * class.c (ident_subst): Always alloca buffer.
5221 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
5222 opcode after including javaop.def.
5223 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
5224 conditional expression that exits, to avoid warnings.
5225 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
5226 a user of an extension.
5227 * win32-host.c: Move check down to have non-empty file when
5228 WIN32 is not defined.
5230 * Make-lang.in (java-warn): Add STRICT_WARN.
5231 (java/jcf-io.o-warn): Don't have Werror for this file.
5232 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
5234 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
5236 * expr.c (expr_add_location): Move declaration to before all
5238 * parse.y (java_expand_classes): Ditto.
5239 * lex.c (java_peek_unicode): Ditto.
5241 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5243 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
5244 if possible, else convert `foo' to 'foo'.
5245 * class.c: Likewise.
5248 * jcf-io.c: Likewise.
5249 * jcf-parse.c: Likewise.
5252 * parse.h: Likewise.
5254 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5256 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
5257 rename parameter 'msg' to 'msgid' in function declaration.
5258 (issue_warning_error_from_context): Likewise.
5259 (yyerror): Rename parameter 'msg' to 'msgid'.
5260 (all over): Use new quoting style for diagnostics.
5262 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
5264 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
5265 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
5268 2004-10-14 Matt Austern <austern@apple.com>
5270 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5273 2004-10-13 Tom Tromey <tromey@redhat.com>
5276 * lang.opt (--extdirs): Document.
5277 * jvspec.c (lang_specific_driver): Recognize -encoding and
5280 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
5282 * parse.y (issue_warning_error_from_context): Use va_list *
5283 instead of va_list parameter.
5284 (parse_error_context): Update call.
5285 (parse_warning_context): Likewise.
5287 2004-10-05 Zack Weinberg <zack@codesourcery.com>
5289 * parse.y, parse-scan.y: Add list of diagnostic messages to
5290 insulate translation template from version of yacc/bison used
5291 to compile the grammar.
5293 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
5295 Prepare for %q, %< and %> in diagnostic message strings.
5296 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5297 Name second parameter 'msgid'.
5298 * parse.y: Additionally include pretty-print.h and diagnostic.h.
5299 (issue_warning_error_from_context): Use pretty-printer functions
5300 instead of vsprintf for constructing formatted messages. Rename
5301 parameter 'msg' to 'msgid'.
5302 (parse_error_context): Rename parameter 'msg' to 'msgid'.
5303 (parse_warning_context): Likewise.
5305 2004-10-05 Andrew Haley <aph@redhat.com>
5308 * jcf-parse.c (parse_zip_file_entries): If a class has a
5309 superclass and a TYPE_SIZE of zero, lay it out.
5311 2004-09-30 Andrew Haley <aph@redhat.com>
5314 * jcf-parse.c (compute_class_name): Rewrite.
5316 2004-10-01 Jan Hubicka <jh@suse.cz>
5318 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5320 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5322 * lex.c: Fix a comment typo.
5324 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5326 * java-tree.h: Fix a comment typo.
5328 2004-09-30 Per Bothner <per@bothner.com>
5330 Simplify lexer. Implement --enable-mapped-location support.
5331 * jcf-parse.c (parse_class_file): Use linemap_line_start.
5332 (parse_source_file_1): Pass filename as extra parameter, so we can call
5333 linemap_add and set input_location here, rather than in both callers.
5334 (read_class): Pass copied filename to parse_source_file_1.
5335 Don't initialize wfl_operator - only needed for source compilation.
5336 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
5337 * lex.h: Remove a bunch of debugging macros.
5338 * lex.h (struct_java_line, struct java_error): Remove types.
5339 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
5340 (struct java_lc_s): Remove prev_col field.
5341 (struct java_lexer): New fields next_unicode, next_columns, and
5342 avail_unicode. New position field, and maybe token_start field.
5343 Don't need hit_eof field - use next_unicode == -1 instead.
5344 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
5345 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
5346 * parse.h: Various changes for USE_MAPPED_LOCATION.
5347 (EXPR_WFL_EMIT_LINE_NOTE): XXX
5348 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5349 (struct parser_ctxt): New file_start_location field.
5350 Remove p_line, c_line fields since we no longer save lines.
5351 Remove elc, lineno, and current_jcf fields - no longer used.
5352 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
5353 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5354 source_location and is probably not needed anymore anyway.
5355 Use new expr_add_Location function.
5356 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
5357 (java_pop_parser_context): Minor cleanup.
5358 (java_parser_context_save_global, java_parser_context_restore_global,
5359 java_pop_parser_context): Save/restore input_location as a unit.
5360 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
5361 a source_location instead of a wfl context node.
5362 (check_class_interface_creation): input_filename is not addressable.
5363 (create_artificial_method): Calling java_parser_context_save_global
5364 and java_parser_context_restore_global is overkill. Instead,
5365 temporarily set input_location from class decl.
5366 (java_layout_seen_class_methods): Set input_location from method decl.
5367 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5368 (finish_loop_body): Likewise.
5369 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
5370 (java_sprint_unicode): Take a character, not index in line.
5371 (java_sneak_uncode): Replaced by java_peek_unicode.
5372 (java_unget_unicode): No longer used.
5373 (java_allocate_new_line. java_store_unicode): Removed, since we
5374 no longer remember "lines".
5375 (java_new_lexer): Update for new data structures.
5376 (java_read_char): Move unget_value checking to java_read_unicode.
5377 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5378 efficient functions that are used directly when lexing.
5379 (java_read_unicode_collapsing_terminators): No longer needed.
5380 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5381 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5382 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
5383 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
5384 combine switch branches, and test for common token kinds earlier.
5385 (java_lex_error): Rewrite.
5386 * jv-scan.c (expand_location): New function, copied from tree.c.
5387 (main): Set ctxp->filename instead of setting input_filename directly.
5389 2004-09-30 Per Bothner <per@bothner.com>
5391 More cleanup for --enable-mapped-location.
5392 * class.c (push_class): If USE_MAPPED_LOCATION don't set
5393 input_location here. Instead do it in give_name_to_class.
5394 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5395 * expr.c (expand_byte_code): Call linemap_line_start.
5396 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
5397 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
5398 (expr_add_location): New function, if USE_MAPPED_LOCATION.
5399 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
5400 to USE_MAPPED_LOCATION case.
5402 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
5403 * jcf-parse.c (java_parse_file): Don't set input_filename.
5404 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5405 Create a list of TRANSLATION_UNIT_DECL.
5406 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
5407 reason is so we can set a DECL_SOURCE_LOCATION for each file.
5408 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5409 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5410 (file_start_location): New static.
5411 (set_source_filename): Avoid extra access to input_filename macro.
5412 Concatenate new name with class's package prefix.
5413 (set_source_filename, give_name_to_class): Update.
5414 (give_name_to_class): Set class's "line 0" input_location here.
5415 (parse_class_file): Set input_location as a unit.
5417 * jcf-parse.c (load_class): Sanity test if missing inner class file.
5419 2004-09-29 Per Bothner <per@bothner.com>
5421 * java-tree.h: Redefine some macros and add some declaration
5422 to handle the USE_MAPPED_LOCATION case.
5423 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
5424 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
5425 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5426 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5428 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5429 * decl.c (finish_method, java_add_stmt): Likewise.
5430 * java-gimplify.c (java-gimplify.c): Likewise.
5431 * jcf-write.c (generate_bytecode_insns): Likewise.
5432 * lang.c (java_post_options): Likewise - call linemap_add.
5434 2004-09-29 Andrew Haley <aph@redhat.com>
5437 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5438 result of TRUNC_MOD_EXPR.
5439 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5440 * decl.c (java_init_decl_processing): Mark
5441 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5443 2004-09-28 Tom Tromey <tromey@redhat.com>
5446 * class.c (add_miranda_methods): Load superinterface if not
5449 2004-09-28 Andrew Haley <aph@redhat.com>
5452 * jcf-parse.c (load_class): Don't try to read a class that we've
5455 2004-09-28 Andrew Haley <aph@redhat.com>
5457 * jcf-parse.c (load_class): Back out previous broken patch.
5459 2004-09-28 Andrew Haley <aph@redhat.com>
5462 * jcf-parse.c (load_class): Don't try to read a class that we've
5464 Check that we really did read the right class.
5466 2004-09-25 Tom Tromey <tromey@redhat.com>
5469 * parse.y (create_artificial_method): Use add_method_1.
5471 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
5473 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5475 * gcj.texi: Fix typos.
5477 2004-09-24 Tom Tromey <tromey@redhat.com>
5480 * parse.y (class_instance_creation_expression): Set `$$' to NULL
5481 in error parts of rule.
5482 (unary_expression): Don't call error_if_numeric_overflow when $1
5485 2004-09-24 Tom Tromey <tromey@redhat.com>
5488 * parse.y (resolve_qualified_expression_name): Set
5489 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5490 * expr.c (force_evaluation_order): Check for empty argument list
5491 after stripping COMPOUND_EXPR.
5493 2004-09-23 Andrew Haley <aph@redhat.com>
5496 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5499 2004-09-23 Tom Tromey <tromey@redhat.com>
5502 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5503 where operand is null.
5505 2004-09-23 Tom Tromey <tromey@redhat.com>
5508 * parse.y (not_accessible_p): Allow access to protected members
5509 even when class is not static.
5511 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
5513 * Make-lang.in: Revert the gcc-none.o change.
5515 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
5517 * parse.y (patch_anonymous_class): VEC_space returns true if there
5520 2004-09-21 Matt Austern <austern@apple.com>
5523 * gjavah.c (free_method_name_list): Fix function definition so
5524 it's a proper C prototype.
5526 2004-09-21 Tom Tromey <tromey@redhat.com>
5529 * gjavah.c (free_method_name_list): New method.
5532 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
5533 Zack Weinberg <zack@codesourcery.com>
5535 * java-tree.def: Use tree_code_class enumeration constants
5536 instead of code letters.
5537 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5538 new tree-class enumeration constants.
5540 2004-09-13 Tom Tromey <tromey@redhat.com>
5543 * class.c (layout_class_method): Put synthetic methods into the
5546 2004-09-11 Andrew Pinski <apinski@apple.com>
5548 * Make-lang.in (java/ggc-none.c): Change dependency
5549 for ggc.h into $(GGC_H).
5551 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5553 * Make-lang.in (java/win32-host.o): Add dependency on
5555 * win32-host.c: Add includes for coretypes.h, jcf.h
5557 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5559 * Make-lang.in (GCJH_OBJS): Change dependency from
5560 ggc-none.o to java/ggc-none.o
5561 (JCFDUMP_OBJS): Likewise.
5562 (java/ggc-none.o): New target.
5564 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
5566 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
5567 * class.c (build_utf8_ref, build_static_field_ref,
5568 make_field_value, make_method_value, get_dispatch_table,
5569 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5570 * constants.c (get_tag_node, build_ref_from_constant_pool,
5571 build_constants_constructor): Likewise.
5572 * decl.c (java_init_decl_processing): Likewise.
5573 * expr.c (build_java_array_length_access, build_newarray,
5574 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5575 build_java_binop, build_field_ref, expand_java_add_case,
5576 expand_java_call, build_known_method_ref, build_invokevirtual,
5577 build_invokeinterface, build_jni_stub): Likewise.
5578 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5579 * jcf-parse.c (get_constant): Likewise.
5580 * lex.c (do_java_lex): Likewise.
5581 * parse.y (patch_binop, patch_unaryop, patch_cast,
5582 build_newarray_node, patch_newarray): Likewise.
5583 * resource.c (compile_resource_data): Likewise.
5584 * typeck.c (build_prim_array_type): Likewise.
5586 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
5588 * decl.c (java_init_decl_processing): Adjust
5589 initialize_sizetypes call.
5591 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
5593 * jv-scan.c (fancy_abort): Add.
5595 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
5597 * expr.c (build_java_arrayaccess): Use convert to change
5600 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
5602 * class.c (make_local_function_alias): Allocate extra space for 'L'
5603 in name buffer. Reported by Thomas Neumann.
5605 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
5607 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5608 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
5609 * lex.c (do_java_lex): Adjust.
5610 (error_if_numeric_overflow): Likewise.
5612 2004-08-18 Andrew Pinski <apinski@apple.com>
5614 * class.c (make_local_function_alias): Only make a new decl if we
5615 support alias attribute on all decls.
5617 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
5619 * class.c (make_local_function_alias): New function. Create local
5620 alias for public method DECL.
5621 (make_method_value): Use make_local_function_alias.
5622 * parse.y (craft_constructor): Don't special-case anonymous classes.
5623 Always set ctor_name to init_identifier_node.
5624 (lookup_method_invoke): Call layout_class_method when creating
5625 anonymous class constructor.
5627 2004-08-18 Richard Henderson <rth@redhat.com>
5629 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5630 default case. Treat '<' similarly. Update for
5631 is_gimple_formal_tmp_var name change.
5633 2004-08-17 Andrew Haley <aph@redhat.com>
5635 * lang.c (lang_printable_name): Obey verbose flag.
5636 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5637 lang_printable_name().
5638 (verify_constructor_circularity, get_printable_method_name,
5639 check_abstract_method_definitions, java_check_regular_methods,
5640 java_check_abstract_methods, check_inner_class_access,
5641 fix_constructors, patch_method_invocation, patch_return):
5643 * expr.c (pop_type_0): Likewise.
5645 * java-tree.h (lang_printable_name_wls): Delete.
5647 2004-08-16 Tom Tromey <tromey@redhat.com>
5650 * parse.y (primary): Changed for initialized and uninitialized
5652 (array_access): Handle array_creation_initialized.
5653 (array_creation_expression): Split into
5654 array_creation_initialized and array_creation_uninitialized.
5656 2004-08-16 Andrew Haley <aph@redhat.com>
5658 * jcf-write.c (find_constant_index): Canonicalize NaNs when
5659 generating bytecode.
5661 2004-08-16 Elliot Lee <sopwith@redhat.com>
5664 * jcf-parse.c (java_parse_file): Handle filenames with embedded
5665 spaces, and quoted filelists.
5667 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
5669 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5670 * class.c (build_utf8_ref, build_static_field_ref,
5671 make_field_value, make_method_value, get_dispatch_table,
5672 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5673 * constants.c (get_tag_node, build_ref_from_constant_pool,
5674 build_constants_constructor): Likewise.
5675 * decl.c (java_init_decl_processing): Likewise.
5676 * expr.c (build_java_array_length_access, build_newarray,
5677 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5678 build_java_binop, build_field_ref, expand_java_add_case,
5679 expand_java_call, build_known_method_ref, build_invokevirtual,
5680 build_invokeinterface, build_jni_stub): Likewise.
5681 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5682 * jcf-parse.c (get_constant): Likewise.
5683 * lex.c (do_java_lex): Likewise.
5684 * parse.y (patch_binop, patch_unaryop, patch_cast,
5685 build_null_of_type, patch_newarray): Likewise.
5686 * resource.c (compile_resource_data): Likewise.
5687 * typeck.c (build_prim_array_type): Likewise.
5689 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
5691 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5692 Don't create BLOCK here or call java_gimplify_block.
5694 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
5696 * java-tree.h (flag_deprecated): Removed.
5697 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5698 * parse.y (check_deprecation): Check warn_deprecated instead of
5701 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
5703 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5704 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5705 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5706 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5707 flag_force_classes_archive_check, flag_optimize_sci,
5708 flag_indirect_dispatch): Remove explicit declarations.
5709 * lang.opt: Add implicit declare/define/assign. Remove obsolete
5712 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
5715 * Make-lang.in (java.install-man): Install from either build
5716 tree or source tree, whichever has the file first.
5718 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
5720 * jcf-parse.c (get_constant): Adjust force_fit_type call.
5721 * lex.h (SET_LVAL_NODE_TYPE): Remove.
5722 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5723 (do_java_lex): Likewise. Adjust force_fit_type call.
5725 2004-08-04 Roger Sayle <roger@eyesopen.com>
5726 Andrew Haley <aph@redhat.com>
5728 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5729 checking trees as they're being built.
5730 (convert): Call convert_ieee_real_to_integer if we're
5731 converting a constant, even if we're writing a class file.
5733 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
5736 * parse.y (fold_constant_for_init): Call resolve_field_access with
5737 correct current_class context.
5739 2004-08-01 Roger Sayle <roger@eyesopen.com>
5741 * decl.c (update_aliases, initialize_local_variable): Replace calls
5742 to build with calls to buildN.
5743 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5744 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5745 * parse.h (BUILD_THROW): Likewise.
5746 * parse.y (switch_expression, synchronized_statement,
5747 catch_clause_parameter, array_creation_expression,
5748 conditional_expression, make_qualified_name,
5749 resolve_qualified_expression_name, patch_method_invocation,
5750 patch_invoke, build_method_invocation, build_new_invocation,
5751 build_assignment, patch_assignment, build_binop, patch_binop,
5752 build_string_concatenation, build_incdec, patch_unaryop,
5753 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5754 patch_return, build_if_else_statement, build_labeled_block,
5755 build_new_loop, build_loop_body, build_bc_statement,
5756 build_assertion, encapsulate_with_try_catch, build_try_statement,
5757 build_try_finally_statement, patch_synchronized_statement,
5758 emit_test_initialization): Likewise, replace build with buildN.
5760 2004-07-28 Eric Christopher <echristo@redhat.com>
5762 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5763 (java_unsafe_for_reeval): Ditto.
5765 2004-07-26 <hp@bitrange.com>
5767 * parse.y (build_super_invocation): Adjust declaration order to
5768 avoid declaration after statement.
5770 2004-07-25 Bernardo Innocenti <bernie@develer.com>
5772 * decl.c: Rename all identifiers named `class' to `cl'.
5774 2004-07-25 Richard Henderson <rth@redhat.com>
5776 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5778 2004-07-23 Mike Stump <mrs@apple.com>
5780 * boehm.c (set_bit): Improve type safety wrt unsignedness.
5781 * gjavah.c (throwable_p, decode_signature_piece,
5782 print_full_cxx_name, print_include, add_namelet, add_class_decl,
5783 process_file): Likewise.
5784 * jcf-dump.c (main): Likewise.
5785 * jcf-io.c (read_zip_member): Likewise.
5786 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5787 give_name_to_class, get_class_constant): Likewise.
5788 * jcf-write.c (find_constant_wide, push_long_const,
5789 generate_classfile): Likewise.
5790 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5791 * parse.y (read_import_dir): Likewise.
5792 * typeck.c (parse_signature_type): Likewise.
5793 * verify.c (verify_jvm_instructions): Likewise.
5794 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5796 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
5798 * Make-lang.in: Replace rmic and rmiregistry references with
5799 grmic and grmiregistry.
5800 * gcj.texi: Likewise.
5802 2004-07-20 Andrew Haley <aph@redhat.com>
5805 * verify.c (verify_jvm_instructions): Comment change only.
5807 * typeck.c (build_java_array_type): Add size field to array name.
5809 * java-tree.h (LOCAL_SLOT_P): New.
5810 (update_aliases): Add PC argument.
5811 (pushdecl_function_level): New function.
5813 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5814 MODIFY_EXPR, and SAVE_EXPR.
5815 (java_gimplify_modify_expr): New function.
5817 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5818 (expand_iinc): Pass PC to update_aliases().
5819 (STORE_INTERNAL): Likewise.
5820 (process_jvm_instruction): Likewise.
5822 * decl.c (base_decl_map): New variable.
5823 (uniq): New variable.
5824 (update_aliases): Rewrite with more thorough checking.
5825 (debug_variable_p): New function.
5826 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5827 (check_local_named_variable): Delete whole function.
5828 (initialize_local_variable): New function.
5829 (check_local_unnamed_variable): Add checks and comments.
5830 (find_local_variable): Rewrite.
5831 (java_replace_reference): New function.
5832 (function_binding_level): New variable.
5833 (pushdecl_function_level): New function.
5834 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5835 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5836 (start_java_method): Reset uniq. Create base_decl_map. Set
5837 function_binding_level.
5838 (end_java_method): Null unused fields to save memory.
5840 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
5842 * class.c (add_interface_do): Remove.
5843 (set_super_info, interface_of_p, maybe_add_interface,
5844 add_interface, make_class_data, layout_class,
5845 add_miranda_methods): Adjust BINFO accessors and addition.
5846 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5848 * jcf-write.c (generate_classfile): Likewise.
5849 * parse.y (patch_anonymous_class, check_inner_circular_reference,
5850 check_circular_reference, java_complete_class,
5851 check_abstract_method_definitions,
5852 java_check_abstract_method_definitions,
5853 check_interface_throws_clauses, java_check_abstract_methods,
5854 lookup_java_interface_method2,
5855 find_applicable_accessible_methods_list): Adjust BINFO accessors
5857 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5859 2004-07-18 Roger Sayle <roger@eyesopen.com>
5861 * builtins.c (max_builtin, min_builtin,
5862 java_build_function_call_expr): Replace calls to build with buildN.
5863 * class.c (build_class_ref, build_static_field_ref,
5864 get_dispatch_table, make_class_data, layout_class_method): Likewise.
5865 * constants.c (build_ref_from_constant_pool): Likewise.
5866 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5867 add_stmt_to_compound): Likewise.
5868 * except.c (build_exception_object_ref, expand_end_java_handler):
5870 * java-gimplify.c (java_gimplify_case_expr,
5871 java_gimplify_default_expr, java_gimplify_block,
5872 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5873 * jcf-write.c (generate_bytecode_insns): Likewise.
5874 * typeck.c (convert_ieee_real_to_integer): Likewise.
5876 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
5878 * java-tree.h (builtin_function): Declare.
5880 2004-07-16 Steven Bosscher <stevenb@suse.de>
5882 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5883 abuse restore_line_number_status.
5885 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
5888 * jcf-parse.c (java_emit_static_constructor): Specify default
5891 2004-07-13 Per Bothner <per@bothner.com>
5893 * java-tree.h (all_class_filename): Remove useless macro.
5894 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
5895 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
5896 * parse.y (java_parser_context_restore_global): Replace
5897 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
5898 * jcf-parse.c (read_class, java_parse_file): Likewise.
5900 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
5903 gjavah.c (print_field_info): Emit constant only if field is static.
5905 2004-07-11 Roger Sayle <roger@eyesopen.com>
5907 * expr.c (java_truthvalue_conversion, flush_quick_stack,
5908 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
5909 build_java_ret, build_java_throw_out_of_bounds_exception,
5910 build_java_array_length_access, java_check_reference,
5911 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
5912 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
5913 expand_java_arrayload, build_java_monitor, expand_java_return,
5914 expand_load_internal, expand_java_NEW, build_get_class,
5915 build_instanceof, expand_java_CHECKCAST, expand_iinc,
5916 build_java_soft_divmod, build_java_binop, build_field_ref,
5917 expand_compare, expand_java_goto, expand_java_switch,
5918 expand_java_add_case, build_class_init, build_known_method_ref,
5919 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
5920 expand_invoke, build_jni_stub, expand_java_field_op,
5921 java_expand_expr, expand_byte_code, STORE_INTERNAL,
5922 force_evaluation_order, emit_init_test_initialization): Convert
5923 calls to "build" into calls to the prefered "buildN" functions.
5925 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
5927 * java-tree.h (set_block): Remove.
5928 * lang.c (java_clear_binding_stack): New.
5929 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5930 * decl.c (struct binding_level): Remove this_block.
5931 (clear_binding_level): Likewise.
5932 (poplevel): Don't handle this_block.
5933 (set_block): Remove.
5935 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
5937 * class.c (common_enclosing_context_p): Remove statement with no
5940 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
5943 * parse.y (create_anonymous_class): Remove 'location' argument. Use
5944 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
5945 (craft_constructor): Inherit access flags for implicit constructor
5946 from the enclosing class.
5947 (create_class): Fix comment typo.
5948 (resolve_qualified_expression_name): Pass type of qualifier to
5949 not_accessible_p, not the type in which target field was found.
5950 (not_accessible_p): Handle inner classes. Expand protected
5951 qualifier-subtype check to enclosing instances, but don't apply this
5952 check to static members. Allow protected access to inner classes
5953 of a subtype. Allow private access within common enclosing context.
5954 (build_super_invocation): Get WFL line number info from current
5956 (build_incomplete_class_ref): Update for new create_anonymous_class
5958 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
5959 common_enclosing_instance_p.
5960 * class.c (common_enclosing_context_p): New. Determine if types
5961 share a common enclosing context, even across static contexts.
5962 (common_enclosing_instance_p): Renamed from
5963 common_enclosing_context_p. Determines if types share a common
5964 non-static enclosing instance.
5965 * java-tree.h (common_enclosing_instance_p): Declare.
5966 * jcf-write.c (get_method_access_flags): New. Surpress private flag
5967 for inner class constructors.
5968 (generate_classfile): Use get_method_access_flags.
5970 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
5972 * class.c (interface_of_p): Check for null TYPE_BINFO.
5974 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
5976 * class.c (make_class): Do not create binfo here.
5977 (set_super_info): Create it here.
5978 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
5980 2004-07-08 Richard Henderson <rth@redhat.com>
5982 * expr.c (case_identity, get_primitive_array_vtable,
5983 java_expand_expr, emit_init_test_initialization): Remove.
5984 * java-tree.h (java_expand_expr): Remove.
5985 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
5987 2004-07-07 Per Bothner <per@bothner.com>
5989 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
5990 get internal error due to mismatched types.
5992 * gcj.texi (Invoking gij): Document new -verbose:class flag.
5994 * gcj.texi (Linking): New node. Document -lgij usage.
5996 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
5998 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
5999 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
6000 * java/class.c (set_super_info, class_depth, interface_of_p,
6001 maybe_add_interface, add_interface, make_class_data,
6002 layout_class, add_miranda_methods): Adjust BINFO macros.
6003 * expr.c (can_widen_reference_to, lookup_field): Likewise.
6004 * jcf-write.c (generate_classfile): Likewise.
6005 * parse.y (patch_anonymous_class,
6006 check_inner_circular_reference, check_circular_reference,
6007 java_complete_class, check_abstract_method_definitions,
6008 java_check_abstract_method_definitions,
6009 check_interface_throws_clauses, java_check_abstract_methods,
6010 lookup_java_interface_method2,
6011 find_applicable_accessible_methods_list): Likewise.
6012 * typeck.c (find_method_in_interface): Likewise.
6013 * verify.c (merge_types): Likewise.
6015 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
6017 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
6018 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
6020 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
6022 * class.c (make_class): Use make_tree_binfo.
6023 (set_super_info, add_interface_do): Likewise.
6024 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
6026 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6028 * verify.c: Correct array element access formatting thinko.
6030 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6032 * verify.c: Insert a short blurb at the start referring to the JVMS.
6033 (merge_type_state): Remove redundant nested if statement.
6034 (verify_jvm_instructions): Ensure current_subr is initialised to
6036 Minor formatting fixes all over the place.
6038 2004-07-02 Richard Henderson <rth@redhat.com>
6040 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
6042 2004-07-01 Richard Henderson <rth@redhat.com>
6044 * class.c (registerClass_libfunc): Remove.
6045 (init_class_processing): Don't set it.
6046 (emit_register_classes): Take list_p parameter. Fill it in
6047 with _Jv_RegisterClass calls.
6048 * decl.c (java_init_decl_processing): Don't call
6049 init_resource_processing.
6050 * jcf-parse.c (java_emit_static_constructor): New.
6051 (java_parse_file): Call it.
6052 * resource.c (registerResource_libfunc): Remove.
6053 (init_resource_processing): Remove.
6054 (write_resource_constructor): Take list_p parameter. Fill it in
6055 with _Jv_RegisterResource calls.
6056 * java-tree.h: Update prototypes.
6058 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
6061 * class.c (layout_class_method): Do not override package-private
6062 method if its in a different package.
6063 (split_qualified_name): Move here from parse.y. Rename from
6064 breakdown_qualified. Add comment.
6065 (in_same_package): Move here from parse.y. Add comment.
6066 * java-tree.h (break_down_qualified, in_same_package): Declare.
6067 (in_same_package): Likewise.
6068 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
6071 2004-06-29 Andrew Haley <aph@redhat.com>
6073 * except.c (expand_start_java_handler): Push a new binding level.
6074 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
6075 register_exception_range() to register where we'll do it.
6076 (expand_end_java_handler): Remove old bogus code. Replace with
6077 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
6078 the top of the expression we're curently building.
6079 (maybe_end_try): Delete.
6080 * decl.c (binding_level.exception_range): New field.
6081 (clear_binding_level): Add field exception_range. Reformat.
6082 (poplevel): Call expand_end_java_handler().
6083 (poplevel): Call java_add_stmt only if functionbody is false.
6084 (maybe_poplevels): Don't call maybe_end_try() from here.
6085 (end_java_method): Clear no longer used trees in function decl.
6086 (register_exception_range): New function.
6087 * java-tree.h (register_exception_range, struct eh_range): Declare.
6089 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
6091 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
6093 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
6096 * expr.c (class_has_finalize_method): Fix method name indentation.
6097 (expand_java_call): Remove K&R style parameter declaration.
6098 (expand_invoke): Fix statement indentation.
6099 (expand_java_field_op): Likewise.
6100 * parse-scan.y: Fix typo.
6101 (reset_report): Fix method name indentation.
6102 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
6104 * verify.c (verify_jvm_instructions): Document parameters, insert
6106 * lang.c (lang_init_source): Fix method name indentation.
6107 * class.c (common_enclosing_context_p): Likewise.
6108 (emit_symbol_table): Fix parameter list indentation.
6109 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
6110 parameter declaration.
6111 * constants.c: Fix copyright notice indentation.
6112 * typeck.c (find_method_in_superclasses): Fix parameter list
6114 (find_method_in_interfaces): Likewise.
6115 * zextract.c (makelong): Fix method name indentation.
6117 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6120 * parse.y (create_interface): Set correct access modifiers for
6122 * jcf-write.c (get_classfile_modifiers): New function.
6123 (generate_classfile): Use get_classfile_modifiers, not
6126 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6128 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
6129 dependency to current parser context, not NULL_TREE, for top-level
6131 (jdep_resolve_class): Enable member access check for all inner
6134 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6136 * parse.y (qualify_and_find): Pass type decl, not identifier, to
6139 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6142 * expr.c (expand_java_field_op): Ensure that target class for static
6143 field access has been loaded.
6145 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6146 Ranjit Mathew <rmathew@hotmail.com>
6148 PR java/1207, java/16178
6149 * jcf-parse.c (load_class): Return immediately if passed a type decl
6150 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
6151 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
6152 before calling load_class.
6153 (qualify_and_find): Likewise.
6154 (find_in_imports_on_demand): Likewise.
6155 (find_applicable_accessible_methods_list): Likewise.
6157 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
6159 * parse.y (java_layout_seen_class_methods): Don't call load_class
6160 on class defined by source parser.
6162 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
6164 * parse.y (set_nested_class_simple_name_value): Removed.
6165 (java_complete_expand_class): Remove calls to
6166 set_nested_class_simple_name_value.
6168 2004-06-22 Andrew Haley <aph@redhat.com>
6169 Ranjit Mathew <rmathew@hotmail.com>
6171 Fixes PR java/16113.
6172 * decl.c (force_poplevels): Remove call to expand_end_bindings.
6174 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
6176 * parse.y (create_class): Correct diagnostic message about
6177 java.lang.Object extending anything else.
6179 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6181 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
6182 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
6183 * constants.c (build_ref_from_constant_pool): Likewise.
6184 * expr.c (build_java_array_length_access): Likewise.
6185 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
6186 (invoke_build_dtable, build_invokevirtual): Likewise.
6187 (build_invokeinterface, java_expand_expr): Likewise.
6188 (emit_init_test_initialization): Likewise.
6189 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6190 * parse.y (make_qualifed_name, build_array_ref): Likewise.
6192 2004-06-21 Andrew Haley <aph@redhat.com>
6194 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
6197 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
6199 * jcf.h (struct JCF): Change java_source, right_zip and finished
6201 * lex.h (struct java_lexer): Change hit_eof, read_anything,
6202 byte_swap and use_fallback to unsigned int.
6203 * parse.h (struct _jdep): Change flag0 to unsigned int.
6205 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
6208 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
6209 before trying to lay out its methods.
6210 * jcf-parse.c (read_class): Track parsed files using canonical paths
6211 obtained via lrealpath from libiberty.
6212 (java_parse_file): Likewise.
6213 (parse_source_file_1): Rename formal parameter to reflect its
6214 modified purpose. Minor formatting fix.
6216 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
6218 * class.c (emit_register_classes): Make the function uninlinable,
6219 do not set current_function_cannot_inline.
6220 * resource.c (write_resource_constructor): Do not reset
6221 flag_inline_functions around rest_of_compilation.
6223 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
6226 * expr.c (java_truthvalue_conversion): Handle
6227 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
6228 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
6229 i.e. return the expression.
6231 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
6233 * gjavah.c: Include version.h
6235 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
6237 * jcf-write.c (generate_bytecode_conditional): Correct handling
6238 of unordered conditionals. Add comment.
6240 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
6241 Per Bothner <per@bothner.com>
6243 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
6244 local variable was initialised upon declaration.
6245 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
6246 variable was final and initialised upon declaration.
6247 * check-init.c (check_final_reassigned): Give error only if a blank
6248 final is not definitely unassigned or if an initialised final is
6250 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
6251 assignment expressions. Remove case MODIFY_EXPR, label do_default.
6252 (check_init): Perform initialised-variable-removing-optimisation
6253 only on non-final local variables.
6255 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6257 * jcf-write.c (generate_bytecode_conditional): Handle binops
6258 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
6260 (generate_bytecode_insns): Likewise.
6262 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6264 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
6265 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
6267 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6269 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6270 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6272 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6274 * decl.c (struct binding_level): Add GTY marker. Compile
6275 binding_depth unconditionally.
6276 (current_binding_level, free_binding_level, global_binding_level):
6278 (clear_binding_level): Unconditionally set binding_depth.
6279 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6281 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6283 * lex.c (java_new_lexer): Set 'encoding'.
6284 (java_read_char): Improve error message for unrecognized characters.
6285 * lex.h (struct java_lexer): New field 'encoding'.
6287 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6289 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6291 2004-05-21 Mark Wielaard <mark@klomp.org>
6293 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6296 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
6298 * typeck.c: Remove non-printable character 160.
6300 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
6302 * check-init.c: Correct minor typos.
6304 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6306 * Make-lang.in, expr.c, java-gimplify.c: Rename
6307 tree-simple.[ch] to tree-gimple.[ch].
6309 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
6311 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6313 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6315 Merge from tree-ssa-20020619-branch. See
6316 ChangeLog.tree-ssa for details.
6318 * Make-lang.in, builtins.c, check-init.c, class.c,
6319 constants.c, decl.c, except.c, expr.c, java-except.h,
6320 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6321 lang.c, lang.opt, parse.y, resource.c: Merged.
6322 * java-gimplify.c: New file.
6324 2004-05-10 Andrew Haley <aph@redhat.com>
6326 * parse.y (create_class): Set TYPE_VFIELD.
6327 * decl.c (java_init_decl_processing): Likewise.
6329 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6330 * class.c (make_method_value): Replace DECL_VINDEX with call to
6332 (get_dispatch_vector): Likewise.
6333 (layout_class_method): Likewise.
6334 Replace set of DECL_VINDEX with call to set_method_index().
6335 (set_method_index): New function.
6336 (get_method_index): New function.
6337 * java-tree.h (set_method_index): New function decl.
6338 (get_method_index): New function decl.
6340 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
6342 * parse.y (check_pkg_class_access): Add new argument
6343 and use it when cl is NULL to call lookup_cl on it.
6344 (parser_check_super_interface): Do not call lookup_cl.
6345 Pass this_decl to check_pkg_class_access and NULL
6346 instead of lookup_cl.
6347 (parser_check_super): Update for change in
6348 check_pkg_class_access.
6349 (do_resolve_class): Likewise.
6350 (process_imports): Likewise.
6351 (find_in_imports_on_demand): Likewise.
6352 (resolve_qualified_expression_name): Likewise.
6354 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
6356 Fixes PR java/9685, PR java/15073
6357 * parse.y (accessibility_string): New method.
6358 (not_accessible_field_error): Use accessibility_string()
6359 instead of java_accstring_lookup().
6360 (resolve_qualified_expression_name): Check with
6361 check_pkg_class_access() before allowing access using
6364 Use check_pkg_class_access() instead of not_accessible_p()
6365 for unqualified types.
6366 (not_accessible_p): Use DECL_CONTEXT (member) instead of
6367 REFERENCE for package-private access checking.
6368 (patch_method_invocation): Use accessibility_string() instead
6369 of java_accstring_lookup().
6371 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
6374 * gjavah.c (struct method_name): Add member is_native.
6375 (overloaded_jni_method_exists_p): Match candidate method only if
6377 (print_method_info): Initialise is_native flag from the method's
6380 2004-04-30 Roger Sayle <roger@eyesopen.com>
6382 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6383 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6385 2004-04-22 Roger Sayle <roger@eyesopen.com>
6387 * resource.c (write_resource_constructor): Guard call to possibly
6388 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6390 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
6392 * class.c (make_class_data): Add new field aux_info.
6393 * decl.c (java_init_decl_processing): Push type and decl for
6396 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6398 * expr.c (expand_java_NEW): Don't use size argument for
6399 _Jv_AllocObject calls.
6400 * parse.y (patch_invoke): Likewise.
6402 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6404 * expr.c (build_invokeinterface): Remove unused variables to
6407 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6409 * class.c (get_interface_method_index): New function. Return dispatch
6410 index for interface method.
6411 (make_method_value): For interface methods, set index field to
6412 iface dispatch index, not DECL_VINDEX.
6413 * expr.c (build_invokeinterface): Use get_interface_method_index.
6415 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6417 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6419 2004-03-31 Andrew Haley <aph@redhat.com>
6422 * jcf-io.c (opendir_in_zip): Tidy up error handling.
6424 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6426 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6427 form of GTY markers.
6429 2004-03-25 Marcus Meissner <meissner@suse.de>
6432 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6434 2004-03-23 Tom Tromey <tromey@redhat.com>
6437 * jcf-write.c (make_class_file_name): Don't report if mkdir
6440 2004-03-23 Tom Tromey <tromey@redhat.com>
6442 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6444 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
6446 * class.c, gjavah.c, lang.c: Fix comment typos.
6447 * gcj.texi: Fix typos.
6449 2004-03-19 Per Bothner <per@bothner.com>
6451 * gcj.texi (Code Generation): Document new flags and assert defaults.
6453 * class.c (assume_compiled_node_struct): Rename type to
6454 class_flag_node_struct, as it is now also used for enable_assertions.
6455 Rename assume_compiled_node typedef. Rename excludep field to value.
6456 (find_assume_compiled_node): Rename function to find_class_flag_node.
6457 Minor optimization - avoid needless strlen.
6458 (add_assume_compiled): Some tweaking and optimization.
6459 Rename and generalize to add_class_flag takem an extra parameter.
6460 (add_assume_compled): New just calls add_class_flag.
6461 (add_enable_assert, enable_assertions): New functions.
6462 (enable_assert_tree): New static.
6463 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6464 * lang.opt (fenable-assertions, fenable-assertions=,
6465 fdisable-assertions, fdisable-assertions=): New options.
6466 * lang.c (java_handle_option): Handle new options.
6467 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
6468 class in an interface - create helper class nested in outer interface.
6469 (build_assertion): Short-circuit if enable_assertions is false.
6471 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6473 * java-tree.h: Changes throughout to add checking to macros
6474 and numerous whitespace changes.
6475 (VAR_OR_FIELD_CHECK): New macro.
6476 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6477 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6479 2004-03-16 Per Bothner <per@bothner.com>
6481 * jcf-jump.c (options): New --print-constants option.
6482 * gcj.texi (Invoking jcf-dump): Document --print-constants.
6484 * jcf-dump.c (flag_print_constant_pool): Default to off.
6485 (print_constant_terse_with_index): New helper function.
6486 (various places): Check flag_print_constant_pool where missing.
6487 (main): If verbose set flag_print_constant_pool.
6488 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
6490 2004-03-15 Andrew Haley <aph@redhat.com>
6493 * parse.y (java_complete_lhs): Check that final variable has an
6496 2004-03-12 Andrew Haley <aph@redhat.com>
6499 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6502 2004-02-29 Roger Sayle <roger@eyesopen.com>
6504 * jcf-parse.c (java_parse_file): Handle the case that input_filename
6507 2004-02-27 Per Bothner <per@bothner.com>
6509 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
6510 suggestion: Use build_incomplete_class_ref.
6511 This fixes PR java/13508, java/11714.
6513 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
6515 * java/parse.h: Update copyright.
6517 2004-02-26 Andrew Haley <aph@redhat.com>
6520 * parse.y (check_interface_throws_clauses): Check for
6521 !METHOD_INVISIBLE (iface_method).
6522 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6523 well as CLASS_ABSTRACT.
6525 2004-02-25 Per Bothner <per@bothner.com>
6527 * parse.y (build_assertion): If we're in an inner class, create the
6528 class$ helper routine in the outer class.
6530 2004-02-19 Richard Henderson <rth@redhat.com>
6532 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6534 2004-02-16 Geoffrey Keating <geoffk@apple.com>
6536 * Make-lang.in (java.install-man): Add extra dependencies.
6538 2004-02-13 Geoffrey Keating <geoffk@apple.com>
6540 * Make-lang.in: Install man pages under the same names
6541 (possibly transformed) as the program they document.
6543 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
6545 * gjavah.c: Include "intl.h".
6546 (error): New function.
6547 (main): Call gcc_init_libintl.
6548 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6549 print_stub_or_jni, process_file, main): Use error rather than
6551 (print_method_info, usage, help, version, main): Mark strings for
6552 translation with _. Avoid splitting up sentences. Send
6553 information messages to stdout.
6554 * jcf-dump.c: Include "intl.h".
6555 (main): Call gcc_init_libintl.
6556 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6557 Mark error, usage and version messages for translation with _.
6558 Avoid splitting up sentences.
6559 * jv-scan.c: Include "intl.h".
6560 (fatal_error, warning): Change parameter s to msgid. Translate
6562 (main): Call gcc_init_libintl.
6563 (usage, help, version): Mark error, usage and version messages for
6564 translation with _. Avoid splitting up sentences.
6565 * jvgenmain.c: Include "intl.h".
6566 (main): Call gcc_init_libintl.
6567 (usage, main): Mark error messages for translation with _.
6568 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6569 JVGENMAIN_OBJS): Add intl.o.
6570 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6571 java/jvgenmain.o): Update dependencies.
6573 2004-02-08 Per Bothner <per@bothner.com>
6575 * parse.y (resolve_qualified_expression_name): In case of inaccessible
6576 class don't use not_accessible_field_error, which can get confused.
6578 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6580 Make-lang.in (po-generated): Delete.
6582 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6584 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6586 * decl.c: Include target.h.
6587 (start_java_method): Replace PROMOTE_PROTOTYPES with
6588 targetm.calls.promote_prototypes.
6589 * expr.c: Include target.h.
6590 (pop_arguments): Replace PROMOTE_PROTOTYPES with
6591 targetm.calls.promote_prototypes.
6592 * parse.y: Include target.h.
6593 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6594 with targetm.calls.promote_prototypes.
6596 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6598 * typeck.c: Update copyright.
6600 2004-02-02 Tom Tromey <tromey@redhat.com>
6602 * decl.c (java_init_decl_processing): Remove duplicate
6605 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
6607 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6609 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
6611 * expr.c (build_field_ref): Move variable
6614 2004-01-28 Andrew Haley <aph@redhat.com>
6616 * expr.c (build_field_ref): Widen field offset.
6618 2004-01-27 Andrew Haley <aph@redhat.com>
6621 * parse.y (check_interface_throws_clauses): Make sure class_decl
6624 2004-01-22 Jeff Sturm <jsturm@one-point.com>
6627 * parse.y (patch_assignment): Don't modify lhs_type for
6628 reference assignments.
6630 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6632 * Make-lang.in: Replace $(docdir) with doc.
6633 (java.info, java.srcinfo, java.man, java.srcman): New rules.
6634 (java.install-man): Revamp rule.
6636 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6638 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6639 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6640 instead of deferred backquote.
6642 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
6644 * typeck.c (find_method_in_interfaces): Move variable
6647 2004-01-16 Andrew Haley <aph@redhat.com>
6650 * typeck.c (shallow_find_method): New.
6651 (find_method_in_superclasses): New.
6652 (find_method_in_interfaces): New.
6653 (lookup_do): Rewrite.
6654 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6656 * jcf-parse.c (read_class): Save and restore output_class.
6657 * decl.c (java_expand_body): Set output_class from fndecl.
6659 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
6661 * class.c (gen_indirect_dispatch_tables): Fix string length
6664 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6666 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6667 (java.srcextra): Copy above back to source directory if requested.
6668 (po-generated): Delete reference to $(parsedir).
6669 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6672 2004-01-14 Jan Hubicka <jh@suse.cz>
6674 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6677 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6679 * java-tree.h (java_expand_expr): Change prototype.
6680 * expr.c (java_expand_expr): Add alt_rtl parameter.
6682 2004-01-09 Andrew Haley <aph@redhat.com>
6685 * parse.y (java_fix_constructors): Set output_class.
6686 (java_reorder_fields): Likewise.
6687 (java_layout_classes): Likewise.
6688 (java_expand_classes): Generate indirect dispatch tables.
6689 (java_expand_classes): Set output_class.
6690 (java_finish_classes): Likewise.
6691 * lang.c (java_init): Turn on always_initialize_class_p if we're
6692 using indirect dis[atch.
6693 (java_decl_ok_for_sibcall): Use output_class, not current_class.
6694 (java_get_callee_fndecl): Use class local atable.
6696 (always_initialize_class_p): Decl moved to java-tree.h.
6697 (HANDLE_CLASS_INFO): Set output_class.
6698 (read_class): Likewise.
6699 (parse_class_file): Call gen_indirect_dispatch_tables.
6700 (parse_zip_file_entries): Set output_class.
6701 (java_parse_file): Set output_class. Don't emit symbol tables.
6702 * java-tree.h (output_class): New.
6703 Remove global declarations for otable, atable, and ctable.
6704 (always_initialize_class_p): moved here from decl.c.
6706 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6707 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6708 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6709 (struct lang_type): Add otable_methods, otable_decl,
6710 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6711 ctable_decl, catch_classes, type_to_runtime_map.
6712 * expr.c (build_field_ref): Make otable, atable, and ctable class
6713 local rather than global.
6714 (build_known_method_ref): Likewise.
6715 (build_invokeinterface): Likewise.
6716 (java_expand_expr): Pass runtime type (rather than actual type) to
6718 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6719 this class. Look up each class in that map to delete duplicates.
6720 (expand_end_java_handler): Pass runtime type (rather than actual
6721 type) to expand_start_catch.
6722 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6724 (java_init_decl_processing): Rearrange things. Remove global
6725 declarations of otable, atable, and ctable.
6726 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6727 (java_expand_body): Set output_class.
6728 * constants.c (build_constant_data_ref): Use output_class, not
6730 (alloc_name_constant): Likewise.
6731 * class.c (gen_indirect_dispatch_tables): New.
6732 (build_class_ref): Generate hard reference to superclass, even if
6733 using indirect dispatch.
6734 (build_static_field_ref): Use class local atable.
6735 (make_class_data): Generate hard reference to superclass, even if
6736 using indirect dispatch.
6737 Generate symbolic references to interfaces when using indirect
6739 (make_class_data): Emit otable, atable, and ctable.
6740 Make otable, atable, and ctable class local rather than global.
6741 (emit_catch_table): Make otable, atable, and ctable class local
6744 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
6746 * parse.y (catch_clause_parameter): Fix typo.
6749 * parse.y: (catch_clause_parameter): Return early if $3, aka
6750 formal_parameter, is null.
6752 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
6754 * class.c: Remove uses of "register" specifier in
6755 declarations of arguments and local variables.
6758 * gjavah.c: Likewise.
6759 * jcf-dump.c: Likewise.
6760 * jcf-io.c: Likewise.
6761 * jcf-parse.c: Likewise.
6762 * jcf-write.c: Likewise.
6763 * keyword.h: Likewise.
6764 * parse.y: Likewise.
6765 * typeck.c: Likewise.
6766 * verify.c: Likewise.
6768 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
6770 * Make-lang.in (GCJ_CROSS_NAME): Delete.
6771 (java.install_common, java.install-man): Adjust for above.
6772 (java.uninstall): Likewise.
6774 2003-12-03 Michael Koch <konqueror@gmx.de>
6776 * class.c (make_class_data):
6777 Push field value to 'hack_signers' instead of 'signers'.
6778 * decl.c (java_init_decl_processing):
6779 Push field 'hack_signers' instead of 'signers'.
6781 2003-12-03 Zack Weinberg <zack@codesourcery.com>
6783 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6786 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
6789 * parse.y (qualify_ambiguous_name): Remove lots of broken
6790 field access processing - there's no need to do that here,
6791 because we have resolve_field_access. Remove
6792 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6793 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6796 2003-12-01 Jeff Sturm <jsturm@one-point.com>
6799 * parse.y (java_complete_lhs): Save location prior to patching
6802 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
6805 * resource.c (write_resource_constructor): Append
6806 "_resource" to constructor identifier name.
6808 2003-11-25 Jeff Sturm <jsturm@one-point.com>
6811 * constants.c (cpool_for_class): New function.
6812 (outgoing_cpool): Remove global variable.
6813 (alloc_name_constant): Use cpool_for_class.
6814 (build_constants_constructor): Likewise.
6815 * decl.c (java_expand_body): Set current_class.
6816 * java-tree.h (outgoing_cpool) Remove declaration.
6817 (init_outgoing_cpool): Likewise.
6818 * jcf-parse.c (init_outgoing_cpool): Remove function.
6819 (parse_class_file): Don't call init_outgoing_cpool.
6820 * parse.y (java_complete_expand_methods): Don't call
6821 init_outgoing_cpool. Don't save outgoing_cpool.
6822 (java_expand_classes): Don't restore outgoing_cpool.
6823 (java_finish_classes): Likewise.
6825 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
6827 * Make-lang.in: (java.install-common) Add
6828 symlink for $(target_noncanonical)-gcjh for
6831 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6833 * Make-lang.in (java.extraclean): Delete.
6835 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6837 * Make-lang.in (check-java): Add.
6839 2003-11-19 Jeff Sturm <jsturm@one-point.com>
6842 * except.c (prepare_eh_table_type): Allocate variable-sized
6843 buffer `buf' with alloca.
6845 2003-11-17 Jeff Sturm <jsturm@one-point.com>
6849 decl.c (java_init_decl_processing): Don't initialize
6850 class_not_found_type_node, no_class_def_found_type_node.
6852 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6853 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6854 (class_not_found_type_node, no_class_def_found_type_node):
6857 parse.y (build_dot_class_method_invocation): Add this_class
6858 argument. Qualify method invocations to a different class.
6859 (create_new_parser_context): Initialize saved_data_ctx to 0.
6860 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6861 (build_dot_class_method): Don't load classes. Register
6863 (build_incomplete_class_ref): Special cases for interfaces
6864 and inner classes. Move build_dot_class_method call to here...
6865 (patch_incomplete_class_ref): ...from here. Pass current_class
6866 to build_dot_class_method_invocation.
6867 (build_assertion): Pass class_type to
6868 build_dot_class_method_invocation.
6869 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6871 2003-11-17 Jeff Sturm <jsturm@one-point.com>
6874 * java-tree.h (BLOCK_EMPTY_P): Define.
6875 * parse.y (java_complete_lhs): Check for empty blocks
6876 in TRY_FINALLY_EXPR case.
6878 2003-11-17 Andrew Haley <aph@redhat.com>
6880 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
6881 (struct lang_decl_var:freed): New variable.
6882 * decl.c (poplevel): Mark local vars that have gone out of scope.
6883 (push_jvm_slot): Don't use the RTL of a var that has gone out of
6886 2003-11-16 Jason Merrill <jason@redhat.com>
6888 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6889 and TAGS files that include them for each front end.
6891 2003-11-15 Tom Tromey <tromey@redhat.com>
6893 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
6895 2003-11-12 Jason Merrill <jason@redhat.com>
6897 PR optimization/12547
6898 * lang.c (java_tree_inlining_walk_subtrees): Just walk
6899 BLOCK_EXPR_BODY directly.
6901 2003-11-12 Andrew Haley <aph@redhat.com>
6904 * parse.y (fold_constant_for_init): Check that we really do have a
6908 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
6909 init_test_decls being inlined.
6912 * parse.y (do_resolve_class): Check return value from
6913 breakdown_qualified().
6915 2003-11-11 Tom Tromey <tromey@redhat.com>
6918 * parse.y (merge_string_cste): Handle case where we have a
6919 pointer that happens to be zero, not null_pointer_node.
6921 2003-11-10 Tom Tromey <tromey@redhat.com>
6923 * jcf-parse.c (classify_zip_file): Correctly compare
6924 filename_length against length of manifest file's name.
6926 2003-11-08 Tom Tromey <tromey@redhat.com>
6929 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
6931 2003-11-06 Andrew Haley <aph@redhat.com>
6933 * expr.c (java_stack_swap): Make sure destination stack slots are
6934 of the correct type.
6936 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
6938 * Make-lang.in (dvi): Move targets to $(docobjdir).
6939 (gcj.dvi): Simplify rule and adjust target.
6940 (gcj.info): Simplify rule.
6941 (gcj.pod): New intermediate rule.
6942 (gcjh.pod): Likewise.
6943 (jv-scan.pod): Likewise.
6944 (jcf-dump.pod): Likewise.
6945 (gij.pod): Likewise.
6946 (jv-convert.pod): Likewise.
6947 (rmic.pod): Likewise.
6948 (rmiregistry.pod): Likewise.
6951 (jv-scan.1): Delete.
6952 (jcf-dump.1): Delete.
6954 (jv-convert.1): Delete.
6956 (rmiregistry.1): Delete.
6958 2003-11-02 Jeff Sturm <jsturm@one-point.com>
6960 Fixes PR java/12866.
6961 * parse.y (resolve_qualified_expression_name): Move test
6962 for outer field access methods from here...
6963 (check_thrown_exceptions) ...to here.
6965 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
6967 * .cvsignore: Delete.
6969 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
6971 * verify.c (verify_jvm_instructions): Don't warn about legal
6972 eh binding regions generated for example by jdk 1.4.1.
6974 2003-10-24 David S. Miller <davem@redhat.com>
6976 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
6978 2003-10-22 Andrew Haley <aph@redhat.com>
6980 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
6981 (java_get_callee_fndecl): New.
6983 * jcf-parse.c (java_parse_file): Call emit_catch_table().
6985 * java-tree.h (ctable_decl): New.
6986 (catch_classes): New.
6987 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
6989 * decl.c (java_init_decl_processing): Add catch_class_type.
6991 Add catch_classes field.
6993 * class.c (build_indirect_class_ref): Break out from
6995 (make_field_value): Check flag_indirect_dispatch.
6996 (make_class_data): Ditto.
6997 Tidy uses of PUSH_FIELD_VALUE.
6998 Add field catch_classes.
6999 (make_catch_class_record): New.
7001 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
7003 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7005 * jcf-write.c: Follow spelling conventions.
7006 * parse.y: Likewise.
7008 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7010 * ChangeLog: Fix typos.
7011 * expr.c: Fix comment typos.
7012 * jcf-write.c: Likewise.
7015 * mangle.c: Likewise.
7016 * parse-scan.y: Likewise.
7017 * parse.y: Likewise.
7019 2003-10-22 Tom Tromey <tromey@redhat.com>
7021 * expr.c (expand_byte_code): Only warn about dead bytecode when
7022 extra_warnings is set.
7024 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
7026 Fix for PR java/12586.
7027 * mangle.c (find_compression_record_match): Don't iterate through
7028 package namespace elements unless they all match compression_table
7031 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
7033 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
7034 (generate-manpages): Likewise.
7035 (java.maintainer-clean): Likewise.
7036 (gcj.info): Likewise.
7039 (jv-scan.1): Likewise.
7040 (jcf-dump.1): Likewise.
7042 (jv-convert.1): Likewise.
7044 (rmiregistry.1): Likewise.
7045 (java.install-man): Likewise.
7046 (parse-scan.o): Move and define complete compile line.
7047 (parse.o): Likewise.
7048 (jcf-tree-inline.o): Move.
7050 2003-10-20 Mark Mitchell <mark@codesourcery.com>
7052 * Make-lang.in (info): Update dependencies.
7053 (java.install-info): Remove.
7054 ($(srcdir)/java/gcj.info): Replace with ...
7055 ($(docobjdir)/gcj.info): ... this.
7057 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
7059 * Make-lang.in: Replace uses of $(target_alias) with
7060 $(target_noncanonical).
7062 2003-10-09 Tom Tromey <tromey@redhat.com>
7064 * decl.c (java_init_decl_processing): Declare signers field.
7065 * class.c (make_class_data): Set signers field.
7067 2003-10-09 Jason Merrill <jason@redhat.com>
7069 * parse.y (patch_assignment): Use make_node to create a BLOCK.
7070 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
7073 2003-10-06 Mark Mitchell <mark@codesourcery.com>
7075 * Make-lang.in (java.info): Replace with ...
7077 (java.dvi): Replace with ...
7079 (java.generated-manpages): Replace with ...
7081 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
7083 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
7085 2003-10-01 Andrew Haley <aph@redhat.com>
7087 * jcf-parse.c (java_parse_file): Write otable and atable.
7088 * java-tree.h (atable_methods): New.
7090 (atable_syms_decl): New.
7091 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
7092 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
7093 (symbol_*type): Rename method_symbol* to symbol*type.
7094 (emit_offset_symbol_table): Delete.
7095 (emit_symbol_table): New.
7096 (get_symbol_table_index): New.
7098 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
7099 (build_known_method_ref): Likewise.
7100 (get_symbol_table_index): Rename from get_offset_table_index.
7101 Parameterize to allow re-use by differing types of symbol table.
7102 (build_invokevirtual): Pass table to get_offset_table_index.
7103 * decl.c (java_init_decl_processing): Push types and decls for
7104 atable and atable_syyms.
7105 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
7106 (make_class_data): Add new fields atable and atable_syms.
7107 (emit_symbol_table): Rename from emit_offset_symbol_table.
7108 Parameterize to allow re-use by different types of symbol table.
7109 (build_symbol_entry): Renamed from build_method_symbols_entry.
7111 2003-09-30 Roger Sayle <roger@eyesopen.com>
7113 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
7114 semantics for SAVE_EXPR, by caching the result in a temporary.
7116 2003-09-28 Richard Henderson <rth@redhat.com>
7118 * check-init.c (check_init): Save and restore input_location
7119 instead of file and line separately.
7120 * decl.c (java_expand_body): Likewise.
7121 * jcf-write.c (generate_bytecode_insns): Likewise.
7122 * parse.y (safe_layout_class): Likewise.
7123 * jcf-parse.c (read_class, parse_class_file): Likewise.
7124 (java_parse_file): Use %H for warning locator.
7126 2003-09-28 Roger Sayle <roger@eyesopen.com>
7128 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
7129 with void-type branches instead of using a COMPOUND_EXPR.
7131 2003-09-28 Jeff Sturm <jsturm@one-point.com>
7133 * decl.c (java_optimize_inline, dump_function): Remove.
7134 * java-tree.h (java_optimize_inline): Remove declaration.
7135 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
7136 * parse.y (source_end_java_method, java_expand_classes):
7137 Likewise. Remove dead code.
7139 2003-09-27 Roger Sayle <roger@eyesopen.com>
7141 * lang.c (java_init_options): Set flag_evaluation_order.
7142 * expr.c (force_evaluation_order): Don't attempt to force
7143 evaluation order of binary operations using save_expr.
7144 * parse.y (java_complete_lhs): No longer need to call
7145 force_evaluation_order when constructing binary operators.
7147 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
7148 Bryce McKinlay <bryce@mckinlay.net.nz>
7151 * parse.y (not_accessible_field_error): New function.
7152 (resolve_expression_name): Check field access permissions.
7153 (resolve_qualified_expression_name): Use
7154 not_accessible_field_error.
7155 (resolve_qualified_expression_name): Likewise.
7157 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7159 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
7161 2003-09-23 Roger Sayle <roger@eyesopen.com>
7163 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
7164 with equal operands without side-effects.
7166 2003-09-22 Jeff Sturm <jsturm@one-point.com>
7168 * decl.c (java_init_decl_processing): Don't emit otable decls
7169 if flag_indirect_dispatch is not set.
7171 2003-09-21 Richard Henderson <rth@redhat.com>
7173 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7176 2003-09-21 Richard Henderson <rth@redhat.com>
7178 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7179 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
7181 2003-09-20 Richard Henderson <rth@redhat.com>
7183 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
7185 2003-09-18 Roger Sayle <roger@eyesopen.com>
7187 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
7188 * check-init.c (check_init): Likewise.
7190 2003-09-18 Roger Sayle <roger@eyesopen.com>
7192 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
7194 2003-09-16 Andrew Haley <aph@redhat.com>
7196 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
7198 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
7201 * mangle.c (find_compression_record_match): Skip
7202 over a "6JArray" (the array template mangled string)
7204 (mangle_array_type): Correct minor typo.
7205 (atms): Move definition to the beginning.
7207 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
7209 * class.c (add_miranda_methods): Ensure super-interfaces are laid
7210 out. Fix for PR java/12254.
7212 2003-09-11 Richard Henderson <rth@redhat.com>
7214 * parse.y (source_end_java_method): Update for new
7215 cgraph_finalize_function argument.
7217 2003-09-09 Richard Henderson <rth@redhat.com>
7219 * parse.y (source_end_java_method): Update call to
7220 cgraph_finalize_function.
7222 2003-09-03 Jeff Sturm <jsturm@one-point.com>
7224 * decl.c (java_expand_body): New function.
7225 * expr.c (build_class_init): Set DECL_IGNORED_P.
7226 * java-tree.h (start_complete_expand_method,
7227 java_expand_body): Declare.
7228 * jcf-parse.c (cgraph.h): Include.
7229 (java_parse_file): Handle flag_unit_at_a_time.
7230 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
7231 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
7232 (java_estimate_num_insns): Use walk_tree_without_duplicates.
7233 (java_start_inlining): New function.
7234 * parse.h (java_finish_classes): Declare.
7235 * parse.y: Include cgraph.h.
7236 (block): Don't special-case empty block production.
7237 (craft_constructor): Set DECL_INLINE.
7238 (source_end_java_method): Handle flag_unit_at_a_time.
7239 Replace inline code with call to java_expand_body.
7240 (start_complete_expand_method): Remove static modifier.
7241 (java_expand_method_bodies): Patch function tree for
7242 class initialization and/or synchronization as needed.
7243 Don't begin RTL expansion yet.
7244 (java_expand_classes): Check flag_unit_at_a_time before
7245 calling finish_class.
7246 (java_finish_classes): New function.
7247 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
7248 (patch_assignment): Set DECL_CONTEXT on temporary variable.
7249 (emit_test_initialization): Set DECL_IGNORED_P.
7251 2003-09-03 Roger Sayle <roger@eyesopen.com>
7253 * builtins.c (enum builtin_type): Delete unused enumeration.
7254 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
7256 2003-08-28 Tom Tromey <tromey@redhat.com>
7258 * gcj.texi (Extensions): Document gcjlib URLs.
7260 2003-08-20 Tom Tromey <tromey@redhat.com>
7262 * gcj.texi (Extensions): Added xref.
7263 (libgcj Runtime Properties): Document
7264 gnu.gcj.runtime.VMClassLoader.library_control.
7266 2003-08-20 Andrew Haley <aph@redhat.com>
7268 * except.c (prepare_eh_table_type): Use new encoding for exception
7269 handlers when using -fno-assume-compiled.
7271 2003-08-13 Tom Tromey <tromey@redhat.com>
7273 * gcj.texi (Invoking gij): Document -X and -?.
7275 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
7277 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7278 GCJH_OBJS, JCFDUMP_OBJS
7279 * win32-host.c: Removed the unnecessary and broken dependency
7282 2003-08-11 Tom Tromey <tromey@redhat.com>
7284 * parse.y (java_check_regular_methods): Typo fixes. Call
7285 check_interface_throws_clauses. Use
7286 check_concrete_throws_clauses.
7287 (check_interface_throws_clauses): New function.
7288 (check_concrete_throws_clauses): New function.
7289 (hack_is_accessible_p): New function.
7290 (find_most_specific_methods_list): Added FIXME.
7291 * typeck.c (lookup_do): Use `flags' argument to decide what to
7293 (lookup_argument_method_generic): New function.
7294 (lookup_argument_method2): Removed.
7295 * jcf.h (ACC_INVISIBLE): New define.
7296 * jcf-write.c (generate_classfile): Skip invisible methods.
7297 * class.c (add_miranda_methods): New function.
7298 (layout_class_methods): Use it.
7299 (get_access_flags_from_decl): Use ACC_INVISIBLE.
7300 * java-tree.h (METHOD_INVISIBLE): New define.
7301 (lang_decl_func) [invisible]: New field.
7302 (lookup_argument_method_generic): Declare.
7303 (SEARCH_INTERFACE): New define.
7304 (SEARCH_SUPER): Likewise.
7305 (SEARCH_ONLY_INTERFACE): Likewise.
7306 (SEARCH_VISIBLE): Likewise.
7307 (lookup_argument_method2): Removed declaration.
7309 2003-08-05 Tom Tromey <tromey@redhat.com>
7311 Fix for PR java/11600:
7312 * parse.y (java_complete_lhs): See whether we're calling a method
7314 (check_thrown_exceptions): Added `is_array_call' argument;
7315 fixed `clone' checking; updated all callers.
7317 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
7319 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7321 2003-08-03 Tom Tromey <tromey@redhat.com>
7323 * java-tree.h (METHOD_TRANSIENT): Removed.
7324 * decl.c (pushdecl): Removed some dead code.
7325 * class.c (get_access_flags_from_decl): Can't have transient
7327 (add_method_1): Can't have a transient method.
7329 2003-07-28 Andreas Jaeger <aj@suse.de>
7331 * jvspec.c: Convert to ISO C90 prototypes.
7333 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
7335 * decl.c (force_poplevels): Fix warning call.
7337 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7339 * expr.c (expand_java_field_op): Don't use xxx_with_decl
7340 (expand_java_field_op): Likewise.
7341 * class.c (layout_class_method): Likewise
7342 (emit_register_classes): Likewise.
7343 * decl.c (pushdecl): Likewise.
7344 (poplevel): Likewise.
7345 (force_poplevels): Likewise.
7346 (give_name_to_locals): Likewise.
7347 * check-init.c (check_for_initialization): Likewise.
7349 2003-07-24 Jason Merrill <jason@redhat.com>
7351 * java-tree.h: Move boolean_type_node et al to the back end.
7353 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7355 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7358 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
7360 * lang.opt: Don't show -MD_ and -MDD_.
7362 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
7364 * lang-options.h: Remove.
7365 * lang.opt: Add help text.
7367 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
7369 * expr.c: Remove the last argument to expand_assignment().
7371 2003-07-09 Jan Hubicka <jh@suse.cz>
7373 * java-tree.h (DECL_NUM_STMTS): Rename to...
7374 (DECL_ESTIMATED_INSNS): ... this.
7375 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7376 New static functions.
7377 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7378 * parser.y (add_stmt_to_compound): Do not account statements.
7380 2003-07-08 Mark Wielaard <mark@klomp.org>
7382 * gcj.texi: CNI now expands to Compiled Native Interface.
7384 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7386 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7388 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
7390 * expr.c (expand_byte_code): Adjist emit_line_note call.
7392 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
7394 * lang.c (java_handle_option): Don't handle filenames.
7396 2003-07-02 Zack Weinberg <zack@codesourcery.com>
7398 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7401 * jcf-write.c: Don't default-define DIR_SEPARATOR.
7402 * jcf.h: Delete COMPARE_FILENAMES definition.
7404 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
7406 * lang.c (java_init_options): Update prototype.
7408 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
7410 * decl.c (poplevel): Adjust define_label call.
7412 2003-06-27 Zack Weinberg <zack@codesourcery.com>
7414 * gjavah.c (flag_jni): Make non-static.
7415 * parse-scan.y (ctxp): Make non-static.
7417 * class.c (build_method_symbols_entry)
7418 * expr.c (get_offset_table_index)
7419 * jcf-parse.c (jcf_parse):
7420 Mark the definition static, matching the forward declaration.
7422 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
7424 * lang.c (java_handle_option): Don't check for missing arguments.
7426 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
7428 * class.c (push_class): Use a location_t to save place.
7429 (emit_register_classes): Set input_location. Adjust
7430 expand_function_end call.
7431 * resource.c (write_resource_constructor): Likewise.
7432 * decl.c (end_java_method): Adjust expand_function_end call.
7433 * parse.y (source_end_java_method): Likewise.
7435 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
7437 * lang.c (java_handle_option): Likewise.
7439 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
7441 * lang.c (java_handle_option): Special-casing of optional
7442 joined arguments no longer needed.
7443 * lang.opt: Update switches that take optional argument.
7445 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7447 * lang.opt: Declare Java.
7448 * lang.c (java_init_options): Update.
7450 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7452 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7454 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7456 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7457 * lang.c (java_handle_option): -MD and -MMD have an underscore.
7458 * lang.opt: -MD and -MMD have an underscore.
7460 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
7462 * class.c (emit_register_classes): Adjust init_function_start
7464 * decl.c (complete_start_java_method): Likewise.
7465 * resource.c (write_resource_constructor): Likewise.
7467 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7469 * Make-lang.in: Update to use options.c and options.h.
7470 * lang.c: Include options.h not j-options.h.
7471 (java_handle_option): Abort on unrecognized option.
7472 (java_init_options): Request Java switches.
7474 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
7476 * Make-lang.in: Handle mostlyclean.
7478 2003-06-11 Tom Tromey <tromey@redhat.com>
7480 * lang.c (java_handle_option): Update dependency_tracking for
7483 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7486 2003-06-10 Andrew Haley <aph@redhat.com>
7488 * resource.c (write_resource_constructor): Use expand_expr to
7489 generate the address of the label attached to a resource.
7490 * Make-lang.in (java/resource.o): Add expr.h
7492 2003-06-10 Andrew Haley <aph@redhat.com>
7494 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7495 (java_decl_ok_for_sibcall): New.
7497 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
7499 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7500 (java/j-options.c, java/j-options.h): New.
7501 * java-tree.h (resource_name, compile_resource_file,
7502 compile_resource_data): Constify.
7503 * jcf-write.c (jcf_write_base_directory): Similarly.
7504 * jcf.h (jcf_write_base_directory): Similarly.
7505 * lang.c: Include j-options.h.
7506 (cl_options_count, cl_options, string_option, java_decode_option,
7507 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7508 process_option_with_no): Remove.
7509 (resource_name): Constify.
7510 (LANG_HOOKS_HANDLE_OPTION): Override.
7511 (java_handle_option): New.
7512 (java_init): Don't call jcf_path_init.
7513 (java_init_options): Call jcf_path_init.
7515 * resource.c (compile_resource_data, compile_resource_file): Constify.
7517 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
7519 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7520 (struct lang_decl_func): Add last_line field.
7521 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7522 DECL_SOURCE_LINE_LAST): Remove.
7523 * parse.y (missing_return_error, finish_method_declaration,
7524 lookup_cl, start_artificial_method_body, source_end_java_method,
7525 start_complete_expand_method): Adjust.
7527 2003-06-08 Tom Tromey <tromey@redhat.com>
7529 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7530 fno-assume-compiled.
7532 2003-06-08 Roger Sayle <roger@eyesopen.com>
7534 * builtins.c (define_builtin_type, builtin_types): Delete.
7535 (define_builtin): Rewritten to take just the built-in code,
7536 the function's name, type and fallback library function name.
7537 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7538 (initialize_builtins): Overhaul to define the GCC builtins
7539 used by gcj manually, providing the Java run-time's
7540 implementations as the fallback library function.
7542 2003-06-08 Anthony Green <green@redhat.com>
7544 * parse.y (patch_cast): Fix conversions from floating-point to
7547 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
7549 * Make-lang.in: Update.
7550 * lang.c: Include opts.h. Define cl_options_count and cl_options.
7552 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
7554 * lang.c (java_init_options): Update.
7556 2003-06-05 Jan Hubicka <jh@suse.cz>
7558 * Make-lang.in: Add support for stageprofile and stagefeedback
7560 2003-05-31 Roger Sayle <roger@eyesopen.com>
7562 * lang.c (java_init_options): Prescribe wrap-around two's
7563 complement arithmetic overflow by setting flag_wrapv.
7565 2003-05-29 Roger Sayle <roger@eyesopen.com>
7567 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7568 (builtin_record): Add an additional builtin_code field to
7569 record which GCC built-in corresponds to the Java function.
7570 (java_builtins): Add new entries for atan, atan2, exp, log,
7572 (max_builtin, min_builtin, abs_builtin): Perform constant
7573 folding on the resulting tree.
7574 (java_build_function_call_expr): Likewise, perform constant
7575 folding on the resulting tree.
7576 (initialize_builtins): The NULL creators are now allowed in
7577 the java_builtins table, which is now terminated by an entry
7578 with builtin_code == END_BUILTINS.
7579 (check_for_builtin): Likewise. If the matching creator is
7580 NULL, construct the call using java_build_function_call_expr
7581 directly with the decl for the corresponding builtin_code.
7583 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
7585 * win32-host.c: Normalize copyright boilerplate.
7587 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7589 * parse.y (print_int_node): Use string concatentation on
7590 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7591 function calls into one.
7593 2003-05-13 Zack Weinberg <zack@codesourcery.com>
7595 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7596 fatal_io_error with calls to fatal_error; add ": %m" to the end of
7597 all the affected error messages.
7599 2003-05-13 Richard Henderson <rth@redhat.com>
7601 * class.c (layout_class_method): Set DECL_EXTERNAL.
7602 * decl.c (java_mark_decl_local, java_mark_class_local): New.
7603 * java-tree.h (java_mark_class_local): Declare.
7604 * jcf-parse.c (parse_class_file): Use it.
7605 * parse.y (java_expand_classes): Likewise.
7607 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
7609 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7610 * lex.h: #include input.h.
7611 * jv-scan.c (input_filename): Remove.
7613 2003-05-02 Tom Tromey <tromey@redhat.com>
7616 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7617 (handle_inner_classes): New function.
7619 2003-05-01 Tom Tromey <tromey@redhat.com>
7622 * parse.y (finish_for_loop): Do nothing if update expression is a
7623 EXPR_WFL_NODE wrapping nothing.
7624 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7626 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
7628 * lex.h (input_lineno): Remove declaration.
7629 * parse-scan.y: #include input.h.
7630 (input_filename): Remove declaration.
7631 (input_location): Add definition.
7632 (input_line): Remove definition.
7634 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
7636 * lex.h (lineno): Rename to ...
7637 (input_line): ... here
7638 * parse-scan.y (lineno): Rename to ...
7639 (input_line): ... here.
7640 (reset_report): Rename lineno to input_line.
7641 * check-init.c (check_init): Likewise.
7642 * class.c (push_class): Likewise.
7643 * decl.c (complete_start_java_method, end_java_method): Likewise.
7644 * expr.c (expand_byte_code): Likewise.
7645 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7646 * jcf-write.c (generate_bytecode_insns): Likewise.
7647 * lex.c (java_init_lex, java_allocate_new_line,
7648 do_java_lex): Likewise.
7649 * parse.h (YYNOT_TWICE): Likewise.
7650 * parse.y (empty_statement, expression_statement,
7651 java_pop_parser_context, java_parser_context_save_global,
7652 yyerror, register_fields, method_header, safe_layout_class,
7653 find_in_imports_on_demand, create_artificial_method,
7654 source_end_java_method, start_complete_expand_method,
7655 build_thisn_assign, java_complete_lhs,
7656 maybe_absorb_scoping_block): Likewise.
7658 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
7660 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7661 '/' when computing java source filename
7663 2003-04-13 Tom Tromey <tromey@redhat.com>
7665 * gjavah.c (print_c_decl): Indentation fix.
7667 2003-04-12 Zack Weinberg <zack@codesourcery.com>
7669 * class.c (make_field_value, make_method_value, get_dispatch_table)
7670 (make_class_data, emit_offset_symbol_table)
7671 * constants.c (build_constants_constructor)
7672 * java-tree.h (START_RECORD_CONSTRUCTOR)
7673 * parse.y (maybe_build_array_element_wfl):
7674 Use build_constructor.
7676 2003-04-10 Eric Blake <ebb9@email.byu.edu>
7679 * parse.y (string_convert_int_cst): Always use at least one digit
7680 in string conversion. Remove ASCII dependence.
7681 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7683 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
7685 * Make-lang.in: added win32-host.c
7686 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7687 resolves to open() on non-Win32 platforms and
7688 Win32-specific jcf_open_exact_case() on Win32
7689 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7690 when trying .java and .class files
7691 * win32-host.c: added to repository. Defines
7692 Win32-specific jcf_open_exact_case()
7694 2003-04-10 Andrew Haley <aph@redhat.com>
7696 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7697 (maybe_free_localvar): Renamed from localvar_free.
7698 Add new arg, really.
7699 (generate_bytecode_insns): Set new variable, jsrs.
7700 Only free local vars if no jsr insns have been emittted.
7701 Call maybe_free_localvar, not localvar_free.
7703 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
7705 * gcj.texi: Remove @ at start of file.
7707 2003-03-25 Tom Tromey <tromey@redhat.com>
7709 * parse.y (create_interface): Call CHECK_DEPRECATED.
7711 2003-03-23 Zack Weinberg <zack@codesourcery.com>
7713 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7715 2003-03-21 Zack Weinberg <zack@codesourcery.com>
7717 * javaop.h (jfloat, jdouble): Make them structures mirroring
7718 the bit fields of IEEE float and double respectively.
7719 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7720 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7721 (union Word, union DWord): Delete.
7722 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7724 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7725 D_NAN_MASK): Delete.
7726 (jni_print_float, jni_print_double): New. Generate
7727 hexadecimal floating constants.
7728 (print_field_info): Use jni_print_float/double.
7730 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
7731 finite floating point numbers for output; special case
7734 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
7736 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7737 Replace 0 and 1 with true and false in return statements.
7739 2003-03-19 Tom Tromey <tromey@redhat.com>
7741 * lex.c (do_java_lex): Renamed from java_lex.
7742 (java_lex): New function.
7745 2003-03-13 Tom Tromey <tromey@redhat.com>
7747 * parse.y (resolve_inner_class): Error if qualifier is a primitive
7750 2003-03-04 Andrew Haley <aph@redhat.com>
7752 * gjavah.c (is_first_data_member): New global variable.
7753 (print_c_decl): If it's the first data member, align it as the
7755 (process_file): Set is_first_data_member.
7757 2003-03-11 Tom Tromey <tromey@redhat.com>
7759 * parse.y (resolve_field_access): Initialize class if field is
7760 found in another static field.
7761 * expr.c (build_class_init): Don't optimize out initialization of
7762 implemented interface.
7764 2003-03-11 Andrew Haley <aph@redhat.com>
7766 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7769 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
7771 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7772 and DIR_SEPARATOR_2 for a target.
7773 Correct minor typos.
7775 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7776 and DIR_SEPARATOR_2 for a target into account.
7778 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
7780 * lang.c (java_init): Update prototype, move code to java_post_options.
7781 (java_post_options): Similarly.
7783 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
7785 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7786 compare file name components depending on the case-sensitivity
7787 or otherwise of the host file system.
7789 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7790 "strcmp" to compare file name components.
7791 Use IS_DIR_SEPARATOR instead of comparing directly against
7793 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
7794 comparing directly against DIR_SEPARATOR.
7796 2003-03-04 Tom Tromey <tromey@redhat.com>
7798 * Make-lang.in (java.tags): New target.
7800 2003-03-01 Roger Sayle <roger@eyesopen.com>
7802 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7803 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7805 2003-03-01 Tom Tromey <tromey@redhat.com>
7807 * parse.y (jdep_resolve_class): Only check deprecation if we found
7810 2003-02-28 Tom Tromey <tromey@redhat.com>
7813 * class.c (maybe_layout_super_class): Always pass a WFL to
7815 * parse.y (do_resolve_class): Updated comment to explain
7818 2003-02-26 Tom Tromey <tromey@redhat.com>
7820 * jcf-write.c (generate_classfile): Check whether class is
7821 deprecated before writing attribute count.
7823 2003-02-25 Roger Sayle <roger@eyesopen.com>
7825 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7826 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
7828 2003-02-23 Tom Tromey <tromey@redhat.com>
7830 * lang-options.h: Added -Wdeprecated.
7831 * gcj.texi (Warnings): Document -Wdeprecated.
7832 * java-tree.h (flag_deprecated): Declare.
7833 * lang.c (lang_W_options): Added deprecated.
7834 (flag_deprecated): New global.
7835 * chartables.h: Rebuilt.
7836 * gen-table.pl (process_one): Look at whitespace.
7837 (print_tables): Define LETTER_SPACE, LETTER_MASK.
7838 * parse.h (CLEAR_DEPRECATED): New macro.
7839 (CHECK_DEPRECATED_NO_RESET): New macro.
7840 * jcf-parse.c (handle_deprecated): New function.
7841 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
7842 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7843 * parse.y (resolve_type_during_patch): Check deprecation.
7844 (jdep_resolve_class): Likewise.
7845 (process_imports): Likewise.
7846 (resolve_expression_name): Likewise.
7847 (check_deprecation): Strip arrays from decl. Check
7849 (patch_method_invocation): Also check the particular constructor
7851 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7852 * jcf-write.c (append_deprecated_attribute): New function.
7853 (generate_classfile): Generate deprecated attribute when
7855 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
7856 (java_lex) [case '*']: Simplify logic.
7857 (java_start_char_p): Use LETTER_MASK.
7858 (java_part_char_p): Likewise.
7859 (java_space_char_p): New function.
7861 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
7863 Change base class access representation.
7864 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7865 (add_interface_do): Likewise.
7867 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
7869 * decl.c (java_init_decl_processing): Change
7870 soft_lookupjnimethod_node to reflect the change in
7871 signature of _Jv_LookupJNIMethod in libjava/jni.cc
7872 * expr.c (build_jni_stub): Calculate and pass the size
7873 on the stack of the arguments to a JNI function. Use
7874 new target macro MODIFY_JNI_METHOD_CALL to allow a
7875 target to modify the call to a JNI method.
7877 2003-02-08 Roger Sayle <roger@eyesopen.com>
7879 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7880 instead of basename to avoid compiler warnings on Tru64.
7882 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
7884 * gcj.texi: Update to GFDL 1.2.
7886 2003-01-31 Andrew Haley <aph@redhat.com>
7888 * parse.y (java_expand_classes): Scan the whole class list looking
7889 for access methods that haven't yet been expanded.
7891 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
7895 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
7896 to fix bootstrap on sparc-unknown-netbsdelf1.5.
7897 * jcf-parse.c: Likewise.
7899 2003-01-31 Mark Wielaard <mark@klomp.org>
7901 * gjavah.c (throwable_p): Allocate 1 more byte for string.
7903 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
7905 * class.c (make_class): Use BINFO_ELTS.
7906 (set_super_info): Likewse.
7907 (add_interface_do): Likewise.
7909 2003-01-30 Tom Tromey <tromey@redhat.com>
7911 * jcf-parse.c (read_class): Update identifier's class value if it
7912 changed during parsing.
7914 2003-01-30 Loren James Rittle <ljrittle@acm.org>
7916 * Make-lang.in (po-generated): Find the targets in $(parsedir).
7917 Propagate change to all other rules as required.
7918 (java/parse-scan.o): Add explicit dependency on
7919 $(parsedir)/java/parse-scan.c .
7921 2003-01-29 Tom Tromey <tromey@redhat.com>
7923 * parse.y (patch_assignment): Only transform the rhs of an
7924 assignment when compiling to native.
7926 2003-01-28 Tom Tromey <tromey@redhat.com>
7928 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
7930 2003-01-28 Tom Tromey <tromey@redhat.com>
7932 * lex.c (java_lex): Don't include UEOF as part of token.
7933 (java_read_unicode): Error if \u sequence prematurely terminated.
7935 2003-01-27 Tom Tromey <tromey@redhat.com>
7937 * parse.y (java_check_regular_methods): Check for construct after
7938 checking types in throws clause.
7940 2003-01-24 Tom Tromey <tromey@redhat.com>
7942 * class.c (build_static_field_ref): Only a String or numeric field
7943 can fold to a constant.
7945 2003-01-23 Tom Tromey <tromey@redhat.com>
7947 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
7948 file name in resource buffer.
7950 2003-01-23 Tom Tromey <tromey@redhat.com>
7952 * expr.c (build_known_method_ref): Use method's context to find
7955 2003-01-23 Tom Tromey <tromey@redhat.com>
7957 * constants.c (set_constant_entry): Allocated cleared memory.
7959 2003-01-22 Tom Tromey <tromey@redhat.com>
7961 * java-tree.h: Don't use PARAMS.
7962 * resource.c: Add prototypes for all functions.
7963 (write_resource_constructor): Use `const char *' to avoid
7966 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
7968 * jcf-parse.c (process_zip_dir): Remove unused variable.
7970 2003-01-22 Tom Tromey <tromey@redhat.com>
7972 * expr.c (build_invokeinterface): Abort if method's context is not
7975 2003-01-22 Tom Tromey <tromey@redhat.com>
7977 * gcj.texi (Input and output files): Mention non-class entries.
7978 * decl.c (java_init_decl_processing): Call
7979 init_resource_processing.
7980 * java-tree.h (compile_resource_data, write_resource_constructor,
7981 compile_resource_file, init_resource_processing): Declare.
7982 * config-lang.in (gtfiles): Added resource.c.
7983 * Make-lang.in (gt-java-resource.h): New target.
7984 (JAVA_OBJS): Added resource.o.
7985 (java/resource.o): New target.
7986 * resource.c: New file.
7987 * class.c (compile_resource_file): Moved to resource.c.
7988 (registerResource_libfunc): Likewise.
7989 (utf8_decl_list): Mark with GTY; now static.
7990 * jcf-parse.c (classify_zip_file): New function.
7991 (parse_zip_file_entries): Use it; compile .properties files.
7992 (process_zip_dir): Use classify_zip_file and compute_class_name.
7993 Don't write class name into zip directory.
7994 (java_parse_file): Call write_resource_constructor.
7995 (compute_class_name): New function.
7996 * jcf-io.c (read_zip_member): Reindented.
7998 2003-01-21 Tom Tromey <tromey@redhat.com>
8000 * class.c (supers_all_compiled): New function.
8001 (make_class_data): Use it.
8003 2003-01-21 Tom Tromey <tromey@redhat.com>
8005 * parse.y (method_header): Native method can't be strictfp.
8006 No method can be transient or volatile.
8008 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8010 Make-lang.in (jvspec.o-warn): Add -Wno-error.
8012 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
8014 * check-init.c: Fix comment typos.
8015 * class.c: Likewise.
8016 * constants.c: Likewise.
8018 * except.c: Likewise.
8020 * java-except.h: Likewise.
8021 * java-tree.h: Likewise.
8022 * javaop.h: Likewise.
8023 * jcf-dump.c: Likewise.
8024 * jcf-io.c: Likewise.
8025 * jcf-parse.c: Likewise.
8026 * jcf-write.c: Likewise.
8028 * mangle.c: Likewise.
8029 * typeck.c: Likewise.
8030 * verify.c: Likewise.
8032 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8034 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
8035 * jcf-write.c: Include "tm_p.h".
8037 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8039 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
8041 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8043 * builtins.c (java_build_function_call_expr): Renamed from
8044 build_function_call_expr. All callers changed.
8046 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
8047 * jcf-parse.c: Include tm_p.h.
8049 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
8052 2003-01-14 Tom Tromey <tromey@redhat.com>
8054 * class.c (make_class_data): Check that super is compiled before
8055 building class reference to it.
8057 2003-01-14 Andrew Haley <aph@redhat.com>
8059 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8060 varargs function -- correct.
8062 2003-01-14 Andrew Haley <aph@redhat.com>
8064 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
8066 2003-01-14 Andrew Haley <aph@redhat.com>
8068 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8069 varargs function -- correct.
8071 * parse.y (patch_assignment): Copy the rhs of an assignment into a
8072 temporary if the RHS is a reference.
8074 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8076 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
8077 * keyword.h: Regenerated.
8079 * All Files: Convert to ISO C style function definitions.
8081 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8083 * parse.y (check_pkg_class_access): ANSIfy definition.
8085 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8087 * decl.c, parse-scan.y, parse.y: Don't cast return value of
8090 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
8092 2003-01-09 Geoffrey Keating <geoffk@apple.com>
8094 Merge from pch-branch:
8096 2002-12-02 Geoffrey Keating <geoffk@apple.com>
8098 * Make-lang.in (java/gjavah.o): Update dependencies.
8099 * gjavah.c: Include ggc.h.
8101 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
8103 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
8104 (JCFDUMP_OBJS): Add ggc-none.o.
8105 (java/jcf-dump.o): Depend on GGC_H.
8106 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
8107 CPool substructures.
8108 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
8109 * jcf-dump.c: Include ggc.h.
8111 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8113 * jcf.h (union cpool_entry): New.
8114 (struct CPool): Use gengtype to mark. Change field 'data' to be
8116 (struct JCF): Use gengtype to mark.
8117 (CPOOL_UINT): Update for new cpool_entry type.
8118 (CPOOL_USHORT1): Likewise.
8119 (CPOOL_USHORT2): Likewise.
8120 (CPOOL_FINISH): Use GC to free cpool subfields.
8121 * parse.h (struct parser_ctxt): Mark field current_jcf.
8122 * lex.c (java_init_lex): Use GC to allocate struct JCF.
8123 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
8124 (main_jcf): Use gengtype to mark.
8125 (ggc_mark_jcf): Delete.
8126 (get_constant): Update for new cpool_entry type.
8127 (give_name_to_class): Likewise.
8128 (get_class_constant): Likewise.
8129 (init_outgoing_cpool): Use GGC to allocate struct CPool.
8130 (java_parse_file): Use GGC to allocate struct JCF.
8131 (init_jcf_parse): Don't call ggc_add_root.
8132 * jcf-reader.c (jcf_parse_constant_pool): Update for new
8134 * java-tree.h (current_jcf): Use gengtype to mark.
8135 (CPOOL_UTF): Update for new cpool_entry type.
8136 (outgoing_cpool): Use gengtype to mark.
8137 (struct lang_type): GC struct JCF and struct CPool.
8138 * config-lang.in (gtfiles): Add jcf.h.
8139 * constants.c (find_tree_constant): New.
8140 (set_constant_entry): Allocate cpool subfields using GGC. Update
8141 for new cpool_entry type.
8142 (find_constant1): Update for new cpool_entry type.
8143 (find_constant2): Likewise.
8144 (find_utf8_constant): Use find_tree_constant.
8145 (find_class_or_string_constant): Remove unnecessary cast to jword.
8146 Update for new cpool_entry type.
8147 (count_constant_pool_bytes): Update for new cpool_entry type.
8148 (write_constant_pool): Likewise.
8149 (alloc_name_constant): Use find_tree_constant.
8150 (build_constants_constructor): Update for new cpool_entry type.
8152 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8154 * parse.y (mark_parser_ctxt): Delete.
8155 (goal): Don't use ggc_add_root.
8156 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
8157 (java_pop_parser_context): Let GC free parser_ctxt.
8158 (java_parser_context_resume): Likewise.
8159 * parse.h (struct parser_ctxt): Use gengtype to mark.
8161 (ctxp_for_generation): Likewise.
8162 * lex.h (struct java_lc_s): Mark for gengtype.
8163 (java_lexer): Rearrange for gengtype.
8164 * config-lang.in (gtfiles): Add lex.h, parse.h.
8166 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8168 * All Files: Remove PARAMS macro.
8170 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
8171 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
8174 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
8177 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
8179 * Make-lang.in (java.install-common, java.uninstall,
8180 java.install-info, java.install-man): Prepend $(DESTDIR)
8181 to destination paths in all (un)installation commands.
8182 (java.install-common): Rewrite $(LN) command to support
8183 DESTDIR with "ln" as well as with "ln -s".
8185 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
8187 * java-tree.h: Protect against multiple inclusion.
8189 2003-01-07 Tom Tromey <tromey@redhat.com>
8191 * class.c (add_assume_compiled): Don't adjust parent if we're
8192 already at the root of tree.
8194 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8196 * lang.c (dump_compound_expr): Prototype.
8198 2003-01-03 Tom Tromey <tromey@redhat.com>
8200 Fix for PR java/8712:
8201 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
8202 when simply checking against `null'.
8204 2003-01-03 Tom Tromey <tromey@redhat.com>
8206 * gcj.texi (Standard Properties): Document http.proxyHost and
8209 * gcj.texi (GNU Classpath Properties): Document new properties.
8211 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8213 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
8214 java/lang-options.h, java/mangle.c, java/mangle_name.c,
8215 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
8217 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
8219 * Make-lang.in, boehm.c, buffer.c,
8220 buffer.h, builtins.c, class.c,
8221 config-lang.in, constants.c,
8222 convert.h, decl.c, except.c,
8223 expr.c, java-except.h,
8224 java-tree.h, javaop.def,
8225 jcf-parse.c, jcf-write.c,
8226 jv-scan.c, jvgenmain.c,
8227 jvspec.c, keyword.gperf,
8228 keyword.h, lang-options.h,
8229 lang-specs.h, lang.c, lex.c,
8230 lex.h, mangle.c, mangle_name.c,
8231 parse-scan.y, parse.h, parse.y,
8232 typeck.c, verify.c, xref.c,
8233 xref.h: Replace "GNU CC" with
8234 "GCC" in the copyright header.
8236 * check-init.c, gjavah.c, javaop.h,
8237 jcf-depend.c, jcf-dump.c, jcf-io.c,
8238 jcf-path.c, jcf-reader.c, jcf.h,
8239 zextract.c, zipfile.h: These files are
8240 "part of GCC". Also say "GCC" not "GNU CC".
8242 2002-12-30 DJ Delorie <dj@redhat.com>
8244 * Make-lang.in: Protect against texi2pod/pod2man failing.
8246 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
8248 * gcj.texi: Use @copying.
8250 2002-12-27 Mark Mitchell <mark@codesourcery.com>
8252 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
8253 print_cxx_classname.
8254 (print_cxx_classname): Add add_scope parameter.
8255 (print_class_decls): Do not emit a semicolon after the extern
8257 (process_file): Adjust calls to print_cxx_classname.
8259 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8261 * gcj.texi: Include Cover Texts in man page.
8263 2002-12-23 Jeff Sturm <jsturm@one-point.com>
8265 * class.c (build_static_field_ref): Check FIELD_FINAL.
8267 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8268 instead of current_constant_pool_data_ref.
8269 * java-tree.h (current_constant_pool_data_ref): Undefine.
8270 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8271 * jcf-parse.c (init_outgoing_cpool): Don't initialize
8272 current_constant_pool_data_ref.
8274 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8275 not build_internal_class_name.
8277 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8278 Use it when class ref isn't certain to be compiled.
8280 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8282 * gcj.texi: Include gcc-common.texi.
8283 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8284 $(srcdir)/doc/include/gcc-common.texi.
8286 2002-12-22 Anthony Green <green@redhat.com>
8288 * gcj.texi (Limitations): Add note about org.xml.sax and
8291 2002-12-20 Tom Tromey <tromey@redhat.com>
8293 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8294 where minimum case value is Integer.MIN_VALUE.
8297 2002-12-18 Andrew Haley <aph@redhat.com>
8299 * parse.y (patch_invoke): Force evaluation order when `check' is
8300 set. For PR libgcj/8945.
8302 2002-12-16 Mark Mitchell <mark@codesourcery.com>
8304 * gcj.texi: Change version number to 3.4.
8306 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
8307 Andrew Haley <aph@redhat.com>
8309 * parse.y (source_end_java_method): Remove custom encoding of line
8310 numbers for a function decl before passing it to the back end.
8312 2002-12-03 Andrew Haley <aph@redhat.com>
8314 * class.c (make_class_data): New field, "chain".
8315 * decl.c (java_init_decl_processing): Likewise.
8317 2002-12-02 Tom Tromey <tromey@redhat.com>
8320 * parse.y (do_resolve_class): Handle qualified name via
8323 2002-11-30 Zack Weinberg <zack@codesourcery.com>
8325 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8326 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8327 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8328 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8329 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8330 Include coretypes.h and tm.h.
8331 * Make-lang.in: Update dependencies.
8333 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8335 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8337 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8339 * jcf-reader.c: Don't expand JCF_readu4 inside the
8340 expansion of JCF_SKIP.
8342 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8344 * jcf-reader.c: Don't expand JCF_readu4 inside the
8345 expansion of JCF_SKIP.
8347 2002-11-22 Tom Tromey <tromey@redhat.com>
8349 * parse.y (patch_binop): Cast right hand side of shift expression
8350 to `int'. Fixes PR java/8676.
8352 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
8353 Andrew Haley <aph@redhat.com>
8355 * gcc/java/jcf-write.c (write_classfile): Remove target
8356 class file, if it exists, before renaming the temporary
8359 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
8361 * jvspec.c (lang_specific_spec_functions): New.
8363 2002-11-18 Tom Tromey <tromey@redhat.com>
8365 Fix for PR java/7912:
8366 * expr.c (can_widen_reference_to): Allow cast of array to
8367 Cloneable or Serializable.
8368 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8369 (java_io_serializable_identifier_node): Likewise.
8370 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8371 (valid_ref_assignconv_cast_p): Use new identifier nodes.
8372 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8373 java_io_serializable.
8374 * decl.c (java_init_decl_processing): Initialize
8375 java_lang_cloneable_identifier_node and
8376 java_io_serializable_identifier_node.
8377 (java_lang_cloneable_identifier_node): New global.
8378 (java_io_serializable_identifier_node): Likewise.
8380 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
8382 * buffer.c: Remove unnecessary casts.
8383 * check-init.c: Likewise.
8384 * class.c: Likewise.
8385 * constants.c: Likewise.
8387 * except.c: Likewise.
8388 * gjavah.c: Likewise.
8389 * jcf-io.c: Likewise.
8390 * jcf-parse.c: Likewise.
8391 * jcf-path.c: Likewise.
8392 * jvspec.c: Likewise.
8395 * verify.c: Likewise.
8397 2002-11-06 Tom Tromey <tromey@redhat.com>
8399 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8402 2002-11-05 Tom Tromey <tromey@redhat.com>
8404 Fix for PR java/6388.
8405 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8406 * java-tree.h (enum java_tree_index): New values
8407 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8408 (decimal_int_max, decimal_long_max): New defines.
8409 * lex.c (yylex): Rewrote range checking. Sign extend literals.
8410 (error_if_numeric_overflow): Rewrote range checking.
8411 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8414 2002-11-02 Tom Tromey <tromey@redhat.com>
8416 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8418 * class.c (make_method_value): Put class name, not signature, into
8419 `throws' field. For PR java/8415.
8421 2002-10-24 Tom Tromey <tromey@redhat.com>
8423 * gcj.texi (Invoking gij): Document --showversion.
8424 (Standard Properties): java.library.path now set.
8426 2002-10-23 Tom Tromey <tromey@redhat.com>
8428 * gjavah.c (decode_signature_piece): In JNI mode, print
8429 `jobjectArray' when array depth is nonzero.
8432 2002-10-15 Andrew Haley <aph@redhat.com>
8434 * parse.y (patch_invoke): Call force_evaluation_order on a static
8436 (resolve_qualified_expression_name): Call force_evaluation_order
8437 on a arg list that is part of a Qualified Expression Name.
8439 * lang.c (dump_compound_expr): New.
8440 (java_dump_tree): New.
8442 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
8444 * gcj.texi: Added item describing the GCJ runtime property
8447 2002-10-15 Richard Henderson <rth@redhat.com>
8449 * jcf-parse.c (get_constant): Fix type warning.
8451 2002-10-15 Andrew Haley <aph@redhat.com>
8453 * java-tree.h (java_inlining_merge_static_initializers): Declare.
8454 (java_inlining_map_static_initializers): Declare.
8456 2002-10-14 Andrew Haley <aph@redhat.com>
8458 * tree-inline.c (remap_block): All local class initialization
8459 flags go in the outermost scope.
8460 (expand_call_inline): Call java_inlining_map_static_initializers.
8461 (expand_call_inline): Call java_inlining_merge_static_initializers.
8462 * java/lang.c (merge_init_test_initialization): New.
8463 (java_inlining_merge_static_initializers): New.
8464 (inline_init_test_initialization): New.
8465 (java_inlining_map_static_initializers): New.
8467 2002-10-11 Mark Wielaard <mark@klomp.org>
8469 * gcj.texi (Compatibility): Add Limitations and Extensions section.
8471 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8473 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8475 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8477 * parse.y (merge_string_cste): Add parentheses around & within |.
8479 2002-10-08 Tom Tromey <tromey@redhat.com>
8481 * parse.y (variable_declarator_id): Simplify error path for
8482 array declarator error. For PR java/8003.
8484 2002-10-08 Zack Weinberg <zack@codesourcery.com>
8486 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8489 2002-10-08 Andrew Haley <aph@redhat.com>
8491 * parse.y (attach_init_test_initialization_flags): Check for
8494 2002-10-07 Anthony Green <green@redhat.com>
8496 * parse.y (merge_string_cste): Fix bug in string concatenation.
8498 2002-10-03 Michael Koch <konqueror@gmx.de>
8500 * gcj.texi (Standard properties):
8501 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8503 2002-10-02 Roger Sayle <roger@eyesopen.com>
8505 PR optimization/6627
8506 * lang.c (java_init): If storing the vbit in function
8507 pointers, ensure that force_align_functions_log is atleast
8508 one to aid compatability with g++ vtables.
8510 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
8512 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8513 foul of type-based aliasing.
8515 2002-09-30 Anthony Green <green@redhat.com>
8517 * gcj.texi (Invoking jv-scan): Fix texinfo.
8519 2002-09-28 Anthony Green <green@redhat.com>
8521 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8522 (Code Generation): Add -fno-assert documentation.
8523 * jv-scan.c (flag_assert): New global.
8524 (options): Add assert option.
8525 (help): Add --no-assert documentation.
8526 * parse-scan.y (flag_assert): New global.
8527 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8528 (flag_assert): New global.
8529 * java-tree.h (flag_assert): New global.
8530 * lex.c (java_lex): Obey flag_assert.
8531 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8534 2002-09-26 Andrew Haley <aph@redhat.com>
8536 * expr.c (build_java_array_length_access): Check for null pointer.
8537 * expr.c (expand_java_arrayload): Likewise.
8539 2002-09-21 Richard Henderson <rth@redhat.com>
8541 * jcf-parse.c (get_constant): Decode from IEEE no matter
8542 what the target format.
8544 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
8546 * ChangeLog: Follow spelling conventions.
8547 * class.c: Likewise.
8550 * gjavah.c: Likewise.
8551 * java-tree.h: Likewise.
8552 * jcf-dump.c: Likewise.
8553 * jcf-parse.c: Likewise.
8554 * jvspec.c: Likewise.
8556 * mangle.c: Likewise.
8557 * parse.y: Likewise.
8559 2002-09-17 Tom Tromey <tromey@redhat.com>
8561 * lex.c (java_read_unicode_collapsing_terminators): Handle case
8562 where \r appears at EOF. Fixes PR java/7950.
8564 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
8566 * jvspec.c (lang_specific_driver): Remove unused variable.
8568 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8570 * java-tree.h (union lang_tree_node): Add chain_next option.
8572 2002-09-16 Richard Henderson <rth@redhat.com>
8574 * jcf-parse.c (get_constant): Runtime check for IEEE format;
8575 use new real.h interface.
8576 * jcf-write.c (find_constant_index): Use new real.h interface.
8577 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8579 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8581 * lang.c: Follow spelling conventions.
8583 2002-09-11 Per Bothner <per@bothner.com>
8585 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
8586 constant to the type of the field.
8587 (java_complete_tree): Remove now-redundant code.
8589 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
8591 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
8594 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8595 return label if a ret instruction for the jsr has been reached.
8597 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
8599 * parse.y (DIR_SEPARATOR): Don't define.
8600 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8602 2002-08-28 Andrew Haley <aph@redhat.com>
8604 * verify.c (verify_jvm_instructions): Allow exception handler
8605 inside code that is being protected, but generate a warning.
8606 * except.c (link_handler): Initialize `expanded' in new eh_range.
8607 (binding_depth, is_class_level, current_pc): Declare extern.
8609 2002-09-01 Mark Wielaard <mark@klomp.org>
8611 * gcj.texi: Add chapter about system properties.
8614 2002-08-26 Tom Tromey <tromey@redhat.com>
8616 * parse.y (try_builtin_assignconv): Allow narrowing primitive
8617 conversion if RHS_TYPE is byte, short, or char.
8619 2002-08-22 Tom Tromey <tromey@redhat.com>
8621 * gcj.texi (Invoking gij): Document -cp and -classpath.
8623 2002-08-21 Tom Tromey <tromey@redhat.com>
8625 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8626 $(prefix)/share. For PR libgcj/7633.
8628 For PR java/6005 and PR java/7611:
8629 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8630 (java_can_use_bit_fields_p): New function.
8632 2002-08-16 Tom Tromey <tromey@redhat.com>
8634 * gcj.texi (Class Initialization): Mention class initialization of
8637 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
8639 * Make-lang.in (java-tree-inline.o): New.
8640 (JAVA_OBJS): Add java-tree-inline.o.
8641 * parse.y (source_end_java_method): Call java_optimize_inline.
8642 (java_expand_method_bodies): Save method's tree in
8644 (add_stmt_to_compound): Keep track of the number of statments.
8645 * lang.c (java_init): Enable flag_inline_trees.
8646 (java_post_options): If flag_inline_functions is on, enable
8647 flag_inline_trees instread.
8648 (decl_constant_value): New.
8649 (java_tree_inlining_walk_subtrees): New.
8650 * java-tree.h (DECL_NUM_STMTS): New macro.
8651 (java_optimize_inline): Declare.
8652 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8653 Handle a LABEL_EXPR.
8654 * decl.c (build_result_decl): If we already have a DECL_RESULT
8656 (dump_function): New.
8657 (java_optimize_inline): New.
8658 (dump_function): New.
8660 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
8663 * parse.y (build_assertion): Invert return from
8664 desiredAssertionStatus.
8666 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8668 * jcf-write.c (get_access_flags): Return correct access flags for
8669 private and protected inner classes.
8671 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8673 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8675 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8677 * mangle_name.c: Don't include obstack.h twice.
8678 * xref.c: Don't include obstack.h.
8680 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8682 * class.c: (permanent_obstack): Delete declaration.
8683 * constants.c: (permanent_obstack): Delete declaration.
8684 * except.c: (permanent_obstack): Delete declaration.
8685 * expr.c: (permanent_obstack): Delete declaration.
8686 * jcf-parse.c: (permanent_obstack): Delete declaration.
8687 (saveable_obstack): Delete declaration.
8688 * parse.h: (permanent_obstack): Delete declaration.
8689 * typeck.c: (permanent_obstack): Delete declaration.
8691 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
8693 * gcj.texi (version-gcc): Increase to 3.3.
8695 2002-07-22 Tom Tromey <tromey@redhat.com>
8697 * lex.c (java_lex): Check for `e' or `E' after 0.
8699 2002-07-21 Richard Henderson <rth@redhat.com>
8701 * lang.c (java_unsafe_for_reeval): New.
8702 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8704 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
8706 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8707 (jcf_path_init): Use GET_ENVIRONMENT.
8709 2002-07-10 Roger Sayle <roger@eyesopen.com>
8710 Zack Weinberg <zack@codesourcery.com>
8712 * builtins.c (initialize_builtins): Remove defines that
8713 handled C/C++ specific junk hereby removed from builtins.def.
8715 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
8717 * lang.c (java_post_options): Update prototype.
8719 2002-07-05 Roger Sayle <roger@eyesopen.com>
8721 * builtins.c (initialize_builtins): Ignore the additional
8722 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
8723 the builtins.def file.
8725 2002-07-01 Tom Tromey <tromey@redhat.com>
8728 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8731 2002-07-01 Roger Sayle <roger@eyesopen.com>
8733 * java/decl.c (builtin_function): Accept additional parameter.
8734 (java_init_decl_processing): Pass an additional NULL_TREE
8735 argument to builtin_function.
8737 2002-06-29 T.J. Mather <tjmather@maxmind.com>
8739 * gcj.texi: Fixed gcj invocation example so that it compiles.
8741 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8743 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8744 * parse.y (mark_parser_ctxt): Likewise.
8745 (check_modifiers, declare_local_variables): Avoid incorrect
8746 hardcoded constant 10.
8748 * lex.c (java_read_char): Avoid "comparison is always true"
8751 2002-06-25 Andreas Schwab <schwab@suse.de>
8753 * expr.c (JSR): Avoid undefined operation on PC.
8755 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8757 * decl.c (clear_binding_level): Const-ify.
8759 2002-06-13 Akim Demaille <akim@epita.fr>
8761 * parse.y (class_declaration, interface_declaration): Make sure
8762 all their rules have an action, in order to avoid meaningless `$$
8763 = $1' and their type clashes.
8765 2002-06-11 Tom Tromey <tromey@redhat.com>
8767 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8768 * parse-scan.y (statement_without_trailing_substatement): Added
8770 (assert_statement): New rule.
8771 * java-tree.h (struct lang_type) [assertions]: New field.
8772 (TYPE_USES_ASSERTIONS): New macro.
8773 (CLASS_USES_ASSERTIONS): Likewise.
8774 (FIELD_SYNTHETIC): New define.
8775 * lex.c (java_lval;): Added ASSERT_TK.
8776 * parse.y (ASSERT_TK): Added.
8777 (statement_without_trailing_substatement): Added assert_statement.
8778 (assert_statement): New rule.
8779 (build_assertion): New function.
8780 (maybe_generate_pre_expand_clinit): Create and initialize
8781 $assertionsDisabled.
8782 (lookup_package_type): Removed decl.
8783 * keyword.h: Rebuilt.
8784 * keyword.gperf (assert): New token.
8786 2002-06-10 Akim Demaille <akim@epita.fr>
8788 * parse.y (interface_type_list, class_member_declaration)
8789 (unary_expression_not_plus_minus): Remove duplicate %type.
8792 2002-06-09 Tom Tromey <tromey@redhat.com>
8794 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8796 * parse.y (method_header): Give error message in all cases.
8799 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8801 Don't use RTL inlining. Fix for PR java/6820.
8802 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8803 (flag_really_inline): New.
8804 (java_decode_option): Set flag_really_inline if -finline-functions
8806 (java_post_options): New function. Turn off inlining unless
8807 flag_really_inline is set.
8809 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8811 * gjavah.c (throwable_p): Accept argument as either a classname or
8812 signature fragment. Create null-terminated classname string for super
8813 when calling itself recursively.
8814 (decode_signature_piece): Skip first character from class name
8815 signature when calling throwable_p.
8817 2002-06-08 H.J. Lu (hjl@gnu.org)
8819 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8821 2002-06-04 Tom Tromey <tromey@redhat.com>
8823 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8825 2002-06-04 Michael Koch <konqueror@gmx.de>
8827 * gcj.texi (Input Options): Fixed typo.
8829 2002-06-04 Zack Weinberg <zack@codesourcery.com>
8831 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8832 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8833 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8834 and all now-pointless local variables. Rename other local
8835 variables to reflect their not being handles.
8837 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
8838 #if JCF_USE_STDIO blocks.
8840 * parse.y: Add missing semicolon at end of rule.
8842 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
8844 * check-init.c (attach_initialized_static_class): Delete, unused.
8845 * parse.y: Use htab_t instead of struct hashtable, update
8847 * java-tree.h: Include hashtab.h instead of hash.h.
8848 (struct lang_decl_func): Use htab_t, set up for gengtype.
8849 (struct init_test_hash_entry): Delete.
8850 (struct treetreehash_entry): New.
8851 (java_treetreehash_find): New
8852 (java_treetreehash_new): New prototype.
8853 (java_treetreehash_create): New prototype.
8854 (java_mark_tree): Delete prototype.
8855 (java_hash_hash_tree_node): Delete prototype.
8856 (java_hash_compare_tree_node): Delete prototype.
8857 (attach_initialized_static_class): Delete prototype.
8858 * expr.c (build_class_init): Update to use java_treetreehash
8860 (java_expand_expr): Update to use htab_t.
8861 (emit_init_test_initialization): Likewise.
8862 * decl.c (java_mark_tree): Delete.
8863 * class.c (init_test_hash_newfunc): Delete.
8864 (java_hash_hash_tree_node): Delete.
8865 (java_hash_compare_tree_node): Delete.
8866 (add_method_1): Update to use java_treetreehash functions.
8867 (JAVA_TREEHASHHASH_H): New macro.
8868 (java_treetreehash_hash): New function.
8869 (java_treetreehash_compare): New function.
8870 (java_treetreehash_find): New function.
8871 (java_treetreehash_new): New function.
8872 (java_treetreehash_create): New function.
8873 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8875 * Make-lang.in (java/parse.o): Depend on debug.h.
8876 * java-tree.h (struct lang_identifier): Use gengtype.
8877 (union lang_tree_node): New.
8878 (struct lang_decl_func): Use gengtype.
8879 (struct lang_decl_var): Likewise.
8880 (struct lang_decl): Likewise.
8881 * parse.y: Include debug.h.
8882 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8884 * lang.c (struct language_function): New dummy structure.
8886 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8887 descriminator for DECL_LANG_SPECIFIC.
8888 (struct lang_decl_func): Rename from struct lang_decl.
8889 (enum lang_decl_desc): New.
8890 (struct lang_decl): Make it a union. Update all the accessor macros.
8891 (struct lang_type): Use gengtype.
8892 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
8893 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
8894 are now the same size.
8895 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
8896 use discriminator to mark DECL_LANG_SPECIFIC.
8898 * Make-lang.in (gt-java-builtins.h): New rule.
8899 (java/builtins.o): Add dependency on gt-<filename>.h.
8900 * builtins.c: Use gengtype for roots.
8901 (union string_or_tree): Use gengtype.
8902 (struct builtin_record): Use gengtype.
8903 * config-lang.in (gtfiles): Add builtins.c.
8905 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
8906 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
8907 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
8908 gt-java-parse.h, gtype-java.h): Add rules to generate.
8909 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
8910 (class.o): Add dependency on gt-*.h.
8911 (constants.o): Likewise.
8914 (jcf-parse.o): Likewise.
8915 (jcf-write.o): Likewise.
8917 * config-lang.in (gtfiles): New.
8918 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8919 * constants.c: Replace uses of ggc_add_* with GTY markers.
8921 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8922 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8923 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
8924 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
8926 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
8928 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8929 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
8931 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8932 Include gtype-java.h.
8934 2002-06-02 Tom Tromey <tromey@redhat.com>
8936 Fix for PR java/5913:
8937 * parse.y (patch_binop): Call patch_string on op1.
8939 2002-06-02 Tom Tromey <tromey@redhat.com>
8941 Fix for PR java/1343, PR java/6336:
8942 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
8943 formatting. Changed return type.
8944 (anonymous_class_counter): Moved to top of file.
8945 (maybe_make_nested_class_name): Append number to class name for
8946 function-local classes.
8948 2002-05-28 Zack Weinberg <zack@codesourcery.com>
8950 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
8951 * Make-lang.in: Update dependency lists.
8953 2002-05-18 Mark Mitchell <mark@codesourcery.com>
8955 * gjavah.c (throwable_p): Do not free the name of the class after
8956 passing it to find_class.
8957 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
8958 * jcf-io.c (dirent.h): Include it.
8959 (fnmatch.h): Likewise.
8960 (compare_path): New function.
8961 (java_or_class_file): Likewise.
8962 (memoized_dirlist_entry): New type.
8963 (memoized_dirlist_lookup_eq): New function.
8964 (memoized_dirlists): New variable.
8965 (caching_stat): New function.
8966 (memoized_class_lookup_eq): New function.
8967 (memoized_class_lookups): Likewise.
8968 (find_class): Use memoized_class_lookups and caching_stat.
8969 * jcf.h (JCF_USE_SCANDIR): Define.
8970 * parse.y (java_expand_classes): Write the class files in reverse
8973 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8975 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
8977 2002-05-13 Mark Mitchell <mark@codesourcery.com>
8979 * jcf-write.c (write_classfile): Unlink the temporary file if it
8980 cannot be renamed. Use concat to build up the name of the
8983 2002-05-08 Mark Mitchell <mark@codesourcery.com>
8985 * jcf-write.c (write_classfile): Write the file to a
8986 temporary file and then rename it.
8988 2002-05-07 Tom Tromey <tromey@redhat.com>
8990 * gjavah.c (throwable_p): Use xstrdup, not strdup.
8992 Fix for PR java/1200:
8993 * gjavah.c (throwable_p): New function.
8994 (decode_signature_piece): Use it. A `WeakReference' isn't the
8997 (gcjh_streq): New function.
8999 2002-05-07 Andreas Jaeger <aj@suse.de>
9001 * parse.y (finish_for_loop): Fix if statement.
9003 2002-05-06 Tom Tromey <tromey@redhat.com>
9005 Fix for PR java/5941:
9006 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
9007 loop update expression.
9008 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
9009 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
9011 2002-05-04 Mark Wielaard <mark@klomp.org>
9014 * parse.y (build_string_concatenation): Return just op1 only when op2
9015 is null and op1 is a STRING_CST, otherwise always construct a
9018 2002-04-27 Tom Tromey <tromey@redhat.com>
9021 * parse.y (string_convert_int_cst): New function.
9022 (merge_string_cste): Use it.
9024 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9026 * java-tree.h (java_parse_file): Update.
9027 (java_set_yydebug): Remove.
9028 * jcf-parse.c (yydebug): Remove.
9029 (java_set_yydebug): Die.
9030 (java_parse_file): Update.
9031 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9033 2002-04-24 Tom Tromey <tromey@redhat.com>
9036 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
9037 EXPR_WFL_QUALIFICATION of qual_wfl.
9039 2002-04-23 Per Bothner <per@bothner.com>
9041 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
9042 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
9043 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
9045 2002-04-23 Tom Tromey <tromey@redhat.com>
9048 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
9049 recognize `-fcompile-resource='.
9050 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
9053 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9055 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
9056 paths. Fixes PR java/2791.
9058 2002-04-19 Andrew Haley <aph@redhat.com>
9060 * jcf-write.c (push_long_const): lo, hi: New variables.
9061 Use rshift_double to extract the high part of a 64-bit long.
9062 Use WORD_TO_INT to extract the low part.
9064 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
9065 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
9066 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
9068 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9070 * typeck.c (incomplete_type_error): Remove.
9072 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9074 * class.c (make_class_data): Set DECL_ALIGN on static class data,
9075 for hash synchronization.
9076 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
9077 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
9080 2002-04-16 Mark Wielaard <mark@klomp.org>
9082 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
9085 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9087 Fix for PR java/6294:
9088 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
9091 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9093 Fix for PR java/6085:
9094 * parse.y (patch_method_invocation): Always use build_access_to_thisn
9095 to get enclosing "this" argument for inner-class constructor
9096 invocation. Pass correct arguments to build_access_to_thisn.
9098 2002-04-10 Andreas Jaeger <aj@suse.de>
9100 * gcj.texi (Input Options): Fix extdirs patch.
9102 2002-04-10 Anthony Green <green@redhat.com>
9104 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
9106 2002-04-09 Anthony Green <green@redhat.com>
9108 * gcj.texi (Input Options): Add --extdirs documentation.
9109 * jcf-dump.c (OPT_extdirs): New macro.
9110 (options): Add extdirs option.
9111 (help): Describe --extdirs.
9112 (main): Handle OPT_extdirs.
9113 * gjavah.c (OPT_extdirs): New macro.
9114 (options): Add extdirs option.
9115 (help): Describe --extdirs.
9116 (main): Handle OPT_extdirs.
9117 * jcf-path.c (jcf_path_init): Add extdirs support.
9118 (jcf_path_extdirs_arg): New function.
9119 (extensions): New variable to hold extensions path entries.
9120 * jvspec.c: Remove -fextdirs= when compiling main().
9121 * lang.c (java_decode_option): Handle -fextdirs=.
9122 * jcf.h (jcf_path_extdirs_arg): Declare new function.
9123 * Make-lang.in: Compile jcf-path with version info for use in
9124 identifying the appropriate libgcj.jar.
9126 2002-04-08 Tom Tromey <tromey@redhat.com>
9129 * .cvsignore: Added rmic.1 and rmiregistry.1.
9130 * gcj.texi (Top): Link to new nodes.
9131 (Invoking rmic): New node.
9132 (Invoking rmiregistry): Likewise.
9133 * Make-lang.in (java.generated-manpages): Added rmic.1 and
9135 (java.maintainer-clean): Likewise.
9136 ($(srcdir)/java/rmic.1): New target.
9137 ($(srcdir)/java/rmiregistry.1): Likewise.
9138 (java.install-man): Handle rmic.1 and rmiregistry.1.
9140 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9142 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
9143 Add note about handling uncaught exceptions. Add an exception handler
9146 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9148 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
9149 after using it to patch CALL_EXPR.
9151 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9153 * gcj.texi (Invocation): Document CNI invocation API.
9155 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9157 * expr.c (truthvalue_conversion): Rename. Update.
9158 (expand_compare): Update.
9159 * java-tree.h (java_truthvalue_conversion): New.
9160 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9162 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9164 * java-tree.h (java_mark_addressable): New.
9165 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9166 * typeck.c (mark_addressable): Rename, update.
9168 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9170 * expr.c (build_java_binop): Update.
9171 * java-tree.h (java_signed_type, java_unsigned_type,
9172 java_signed_or_unsigned_type): Update.
9173 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9174 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9175 * parse.y (patch_binop): Update.
9176 * typeck.c (signed_or_unsigned_type, unsigned_type,
9177 signed_type): Update.
9179 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9181 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9182 (java_dummy_print): Remove.
9183 (lang_print_error): Rename. Exit early if inhibiting output.
9184 (inhibit_error_printing_function): New.
9185 (java_init): Don't set hook.
9186 (lang_init_source): Use new boolean.
9188 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9190 * parse.y (do_resolve_class): Fix infinite recursion.
9192 2002-03-29 Tom Tromey <tromey@redhat.com>
9194 * parse.y (check_inner_circular_reference): Ignore incomplete
9197 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9199 * Make-lang.in (builtins.o): Update.
9200 * boehm.c (get_boehm_type_descriptor): Update.
9201 * builtins.c: Include langhooks.h.
9202 * decl.c (java_init_decl_processing): Update.
9203 * java-tree.h (java_type_for_mode, java_type_for_size): New.
9204 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
9206 * typeck.c (type_for_mode, type_for_size): Update.
9208 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9210 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
9212 2002-03-28 Tom Tromey <tromey@redhat.com>
9214 * except.c (expand_end_java_handler): If the handler type is NULL,
9215 use java.lang.Throwable. Fixes PR java/5986.
9217 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9219 Fix for PR java/4715:
9220 * jcf-parse.c (parse_source_file_3): New function.
9221 (read_class): Call it.
9222 (java_parse_file): Likewise.
9224 2002-03-28 Jan Hubicka <jh@suse.cz>
9226 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
9228 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9230 * parse.y (resolve_package): Initialize "decl".
9231 (lookup_package_type): Remove unused function.
9233 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9235 Fix for PR java/5993:
9236 * parse.y (resolve_package): Return the decl if resolution was
9237 successful. Don't special case "java.lang" and "java.lang.reflect"
9238 packages. Set type_name to the merged identifier.
9239 (resolved_qualified_expression_name): Print error using "name" if
9240 resolve_package returns NULL_TREE.
9242 2002-03-27 Tom Tromey <tromey@redhat.com>
9244 * expr.c (expand_invoke): Don't generate null pointer check if
9245 we're calling <init>.
9247 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9249 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
9251 * java-tree.h (java_lang_expand_expr): Similarly.
9252 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9253 (java_init): Don't set hook.
9255 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9257 Fix for PR java/5850:
9258 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
9259 context if field was not found in the current scope.
9260 * expr.c (lookup_field): Don't look in enclosing contexts.
9262 2002-03-26 Tom Tromey <tromey@redhat.com>
9264 Fix for PR java/5942:
9265 * parse.y (init_src_parse): Added sanity check.
9266 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
9269 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9271 * decl.c (lang_mark_tree): Rename java_mark_tree.
9272 * java-tree.h (java_mark_tree): New.
9273 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9275 2002-03-25 Zack Weinberg <zack@codesourcery.com>
9277 * lex.c: Change java_perform_atof to take normal parameters
9278 instead of a pointer to a parameter block. Call it directly
9281 2002-03-22 Mark Wielaard <mark@klomp.org>
9283 Fix for PR java/5368:
9284 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9285 when printing error message.
9287 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9289 * decl.c (maybe_build_cleanup): Remove.
9291 2002-03-22 Tom Tromey <tromey@redhat.com>
9293 Andrew Haley <aph@cambridge.redhat.com>
9295 * expr.c (build_field_ref): Don't build a check if the field is a
9298 2002-03-21 Eric Blake <ebb9@email.byu.edu>
9300 Fix for PR java/6026:
9301 * lex.c (java_lex): Fix parsing of consecutive floats.
9303 2002-03-21 Tom Tromey <tromey@redhat.com>
9305 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9308 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9310 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9311 insert_block, getdecls, kept_level_p, global_bindings_p): New.
9313 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9315 * gcj.texi: @code{gcj} becomes @command{gcj}.
9316 @code{gcc} becomes @command{gcc}.
9317 GcjRaw changed to gnu.gcc.RawData.
9319 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9321 * decl.c (start_java_method): Use new hook.
9322 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9323 (java_init): Remove old hook.
9325 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
9327 * builtins.c (define_builtin): Do nothing if `type' is null.
9330 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9332 * parse.y (parser_check_super_interface): Fix error message
9335 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9337 * jcf-parse.c (get_constant): Delete unused variables.
9339 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9341 * java-tree.h (java_parse_file): New.
9342 * jcf-parse.c (yyparse): Rename java_parse_file.
9343 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9345 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9347 * parse.y (craft_constructor): Return the constructor decl.
9348 (java_expand_classes): Update comments.
9349 (lookup_method_invoke): Call fix_constructors immediately for
9350 anonymous class. Fixes PR java/5935.
9352 2002-03-15 Anthony Green <green@redhat.com>
9354 * jcf-parse.c (yyparse): Don't emit class registration
9355 constructor when compiling resource files.
9357 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9359 * lang.c (java_tree_code_type, java_tree_code_length,
9360 tree_code_name): Delete.
9361 (tree_code_type, tree_code_length, tree_code_name): Define.
9362 (java_init): Don't try to copy into the various tree_code
9365 2002-03-12 Tom Tromey <tromey@redhat.com>
9367 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9368 UTF-8, not UCS-2. Fixes PR java/5923.
9370 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9371 a call_expr wrapped in a convert. Fixes PR java/5848.
9373 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9375 * jcf-write.c (write_classfile): Improve error strings.
9377 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9379 * lex.c: Adjust comments to GNU standards.
9381 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9383 Fix for PR java/5902:
9384 * lex.c (java_lex): Fix parsing of literals.
9386 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9388 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9389 to prevent it getting evaluated twice in the store checking case.
9390 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9393 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9395 * decl.c (java_init_decl_processing): Make sure class_type_node
9396 alignment is not less than 64 bits if hash synchronization is enabled.
9398 2002-03-08 Per Bothner <per@bothner.com>
9400 * parse.y (java_complete_lhs): Check if patch_assignment
9401 returned an error-mark.
9403 * parse.y (try_builtin_assignconv): Don't special-case zero.
9405 2002-03-08 Per Bothner <per@bothner.com>
9407 Fix for PR java/5812.
9408 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
9409 here instead of in JSR macro. Likewise with load_type_state call.
9410 Do the latter on if the return_pc has been verified (the jsr returns).
9411 (JSR): Now just call build_java_jsr.
9413 2002-03-07 Jeff Sturm <jsturm@one-point.com>
9415 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9416 (java.install-common): Link native driver to
9417 JAVA_TARGET_INSTALL_NAME.
9419 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
9421 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9422 * builtins.c(sin_builtin): Likewise
9423 * builtins.c(sqrt_builtin): Likewise
9425 2002-03-03 Zack Weinberg <zack@codesourcery.com>
9427 * java/expr.c, java/jcf-parse.c, java/lex.c:
9428 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9429 REAL_ARITHMETIC blocks unconditional. Delete some further
9430 #ifdef blocks predicated on REAL_ARITHMETIC.
9432 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9434 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9435 explicit sizeof/sizeof.
9436 * decl.c (java_init_decl_processing): Likewise.
9437 * jcf-parse.c (init_jcf_parse): Likewise.
9438 * parse.y (init_src_parse): Likewise.
9440 2002-03-02 Per Bothner <per@bothner.com>
9442 Make --CLASSPATH by a synonym for --classpath and -classpath.
9443 Implement --bootclasspath.
9444 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
9445 (classpath_l): Remove.
9446 (jcf_path_CLASSPATH_arg): Remove.
9447 (jcf_path_bootclasspath_arg): New function.
9448 (jcf_path_seal): Simplify accordingly.
9450 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
9451 (jcf_path_CLASSPATH): Remove declaration.
9452 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
9453 (lang_specific_driver): Translate -bootclasspath.
9454 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
9455 * lang.c (decode_lang_options): Do jcf_path_init first.
9456 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
9457 * gjavah.c: Also handle --bootclasspath.
9458 Handle --CLASSPATH as a synonum for --classpath.
9459 * jcf-dump.c: Likewise.
9461 "." is not part of system path, but is the default for --classpath.
9462 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
9463 (jcf_path_seal): Add "." if no CLASSPATH specified.
9465 * gcj.texi: Document changes.
9467 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9469 * expr.c (build_java_arraystore_check): Fix formatting.
9471 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9473 Fix for PR java/5758, java/5632:
9474 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9475 inner-class separator too.
9476 * parse.y (do_resolve_class): New local `decl_result.'
9477 Progressively build a name for what can have been loaded.
9479 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9481 * expr.c (java_array_data_offset): Removed function.
9482 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9483 (build_java_array_length_access): Obtain "length" value using a
9484 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9485 (build_java_arrayaccess): Correct comment. Access "data" using a
9486 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9487 (build_java_arraystore_check): New function.
9488 (expand_java_arraystore): Use build_java_arraystore_check.
9489 * parse.y (patch_assignment): Simplify code to insert a store check
9490 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9491 * check-init.c (check_init): Update to reflect that an array length
9492 access is now a COMPONENT_REF.
9493 * gcj.texi (Code Generation): Improve documentation of
9494 -fno-bounds-check. Add documentation for -fno-store-check.
9495 * java-tree.h (flag_store_check): Declare.
9496 (build_java_arraystore_check): Declare.
9497 * lang.c (flag_store_check): Initialize to 1.
9498 (lang_f_options): Add store-check option.
9499 * jvspec.c: Don't pass store-check option to jvgenmain.
9500 * lang-options.h: Add help string for -fno-store-check.
9502 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9504 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9505 * java-tree.h (java_dup_lang_specific_decl): New.
9506 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9508 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9510 * builtins.c, decl.c: Delete traditional-mode-related code
9511 copied from the C front end but not used, or used only to
9512 permit the compiler to link.
9514 2002-02-22 Tom Tromey <tromey@redhat.com>
9516 Fix for PR java/2369:
9517 * jvspec.c (verify_class_name): New function.
9518 (lang_specific_driver): Call it.
9519 (JAVA_START_CHAR_P): New macro.
9520 (JAVA_PART_CHAR_P): Likewise.
9522 2002-02-22 Per Bothner <per@bothner.com>
9524 * class.c: Change vtable to be more compatible with g++ v3 abi.
9525 (get_dispatch_table): Prepend offset-to-top (always 0) and
9526 type_info pointer (currently unimplemented hence NULL) to vtable.
9527 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9528 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
9529 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9530 (build_dtable_decl): Add declarations for new fields.
9532 2002-02-20 Per Bothner <per@bothner.com>
9534 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9535 to finit$ (otherwise generate_bytecode_insns drops it). However, we
9536 don't need to set it on the COMPOUND_EXPR - the caller does that.
9538 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9540 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9541 `--CLASSPATH' becomes `--classpath.'
9542 * gjavah.c: Likewise.
9543 * jcf-dump.c: Likewise.
9544 * lang-options.h: Likewise.
9546 * jcf-path.c: Updated comment.
9547 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9548 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9549 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9550 (jcf_path_CLASSPATH_arg): Ditto.
9551 (classpath_u): Updated leading comment.
9553 2002-02-20 Per Bothner <per@bothner.com>
9555 * builtins.c (check_for_builtin): New function.
9556 (build_call_or_builtin): Remove.
9557 * java-tree.h: Update accordingly.
9558 * expr.c (expand_invoke): Use build + check_for_builtin instead
9559 of build_call_or_builtin.
9560 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
9561 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9562 flag (which had caused jcf-write to incorrectly emit invokevirtual).
9564 2002-02-17 Tom Tromey <tromey@redhat.com>
9566 * java-tree.h (TYPE_STRICTFP): New macro.
9567 (struct lang_type) [strictfp]: New field.
9568 (CLASS_STRICTFP): New macro.
9569 (METHOD_STRICTFP): New macro.
9570 (struct lang_decl) [strictfp]: New field.
9571 * parse.y (method_header): Disallow strictfp constructor or
9573 (STRICT_TK): Move before MODIFIER_TK.
9574 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9575 (METHOD_MODIFIERS): Likewise.
9576 (INTERFACE_MODIFIERS): Likewise.
9577 * jcf-write.c (get_access_flags): Likewise.
9578 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9579 (add_method_1): Likewise.
9580 (get_access_flags_from_decl): Likewise.
9581 * jcf-dump.c (print_access_flags): Print in standard order. Also,
9582 recognize strictfp flag.
9583 * jcf.h (ACC_STRICT): New define.
9585 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
9587 * class.c(build_utf8_ref): Move declaration of decl_size
9589 2002-02-07 Tom Tromey <tromey@redhat.com>
9591 * gcj.texi (Input Options): --CLASSPATH does not suppress system
9594 2002-02-04 Anthony Green <green@redhat.com>
9596 * class.c (build_utf8_ref): Put UTF-8 constants into merged
9597 sections if available.
9599 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9601 * parse.y (java_expand_classes): Fix typo in static field loop.
9603 2002-02-02 Richard Henderson <rth@redhat.com>
9605 * class.c (add_field): Mark static fields external.
9606 (build_class_ref): Remove redundant set.
9607 * parse.y (java_expand_classes): Mark static fields of classes
9608 to be compiled as local.
9609 * jcf-parse.c (parse_class_file): Likewise.
9611 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9613 * gcj.texi (About CNI): New node.
9615 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
9618 * jcf-parse.c : Check for HAVE_LOCALE_H before using
9619 setlocale() with LC_CTYPE as a parameter.
9622 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
9624 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9625 Follow GNU Coding Standards for --version.
9627 2002-01-28 Tom Tromey <tromey@redhat.com>
9629 * expr.c (build_jni_stub): Ensure storage for `meth' is
9631 * parse.y (java_complete_expand_methods): Set
9632 current_function_decl before building JNI stub.
9634 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9636 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9639 2002-01-22 Tom Tromey <tromey@redhat.com>
9641 * decl.c (java_init_decl_processing): Use add_predefined_file.
9642 Predefine RawData.java.
9643 (predef_filenames): Removed.
9644 (java_init_decl_processing): Don't register predef_filenames.
9645 * jcf-parse.c (add_predefined_file): New function.
9646 (predefined_filename_p): Rewrote.
9647 (predefined_filename_p): No longer static.
9648 * decl.c (java_init_decl_processing): Call initialize_builtins.
9649 * Make-lang.in (JAVA_OBJS): Added builtins.o.
9650 (java/builtins.o): New target.
9651 * builtins.c: New file.
9652 * parse.y (patch_invoke): Use build_call_or_builtin.
9653 * java-tree.h (build_call_or_builtin): Declare.
9654 (initialize_builtins): Declare.
9655 (java_set_exception_lang_code): Removed unused declaration.
9656 (PREDEF_FILENAMES_SIZE): Removed.
9657 (java_tree_index): Added JTI_PREDEF_FILENAMES.
9658 (predef_filenames): New define.
9659 (add_predefined_file): Declare.
9660 (predefined_filename_p): Declare.
9661 * expr.c (expand_invoke): Use build_call_or_builtin.
9663 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9665 * parse.y (patch_switch_statement): Fix format specifier.
9667 2002-01-16 Tom Tromey <tromey@redhat.com>
9669 More for PR java/5365:
9670 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9672 (process_file): Generate include for
9673 java.lang.UnsupportedOperationExceptions.
9675 2002-01-15 Andreas Jaeger <aj@suse.de>
9677 * .cvsignore: Add man pages.
9679 2002-01-15 Tom Tromey <tromey@redhat.com>
9681 Fix for PR java/5365:
9682 * gjavah.c (process_file): Turn class name into a file name.
9684 2002-01-14 Matthias Klose <doko@debian.org>
9686 * gcj.texi: Fix whitespace and formatting errors in the
9687 synopsis of the man pages. Update copyright.
9689 2002-01-14 Tom Tromey <tromey@redhat.com>
9692 * Make-lang.in (java.install-man): Handle jv-convert man page.
9693 (java.generated-manpages): Added jv-convert.1.
9694 (java.uninstall): Remove jv-convert.1.
9695 (java.maintainer-clean): Likewise.
9696 ($(srcdir)/java/jv-convert.1): New target.
9697 * gcj.texi (Top): Link to jv-convert node.
9698 (Individual utilities): Likewise.
9699 (Invoking jv-convert): New node.
9701 2001-01-10 Jeff Sturm <jsturm@one-point.com>
9702 Martin Kahlert <martin.kahlert@infineon.com>
9704 * jcf-parse.c (get_constant): Don't swap lo/hi for big
9705 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9707 2002-01-03 Graham Stott <grahams@redhat.com>
9709 * class.c (compile_resource_file): Update copyright date.
9710 Constify filename parameter.
9711 (java-tree.h): Update copyright date.
9712 (compile_resource_file): Constify filename parameter.
9714 2002-01-03 Graham Stott <grahams@redhat.com>
9716 * gcc/jcf-parse.c: Update copyright date.
9717 (yyparse): Constify resource_filename.
9719 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9721 * parse.y (src_parse_roots): Don't needlessly zero init.
9723 2001-12-31 Tom Tromey <tromey@redhat.com>
9725 * parse.y (dump_java_tree): New function.
9726 (source_end_java_method): Call it.
9727 (end_class_declaration): Likewise.
9728 * lang.c (java_decode_option): Call dump_switch_p.
9730 2001-12-28 Tom Tromey <tromey@redhat.com>
9732 * gen-table.pl: Don't process characters after \uffff. Added
9733 comment pointing to input file.
9735 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9737 * gen-table.pl: Const-ify output. Document the location of a
9738 suitable unicode input file.
9740 * chartables.h: Regenerate.
9742 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9744 * chartables.h: Const-ify.
9745 * gjavah.c (options): Likewise.
9746 * jcf-dump.c (options): Likewise.
9747 * jv-scan.c (options): Likewise.
9748 * lex.c (java_start_char_p, java_part_char_p): Likewise.
9749 * parse.y (binop_lookup): Likewise.
9751 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9753 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9754 the static arrays that are output.
9755 * jvspec.c (jvgenmain_spec): Make static.
9756 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9757 * keyword.h: Regenerate.
9758 * lang.c (string_option, process_option_with_no, lang_f_options,
9759 lang_W_options): Const-ify.
9760 * lex.c (java_lex): Likewise.
9762 2001-12-21 Richard Henderson <rth@redhat.com>
9764 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9765 (get_boehm_type_descriptor): ... here. Arrange for the
9766 TREE_TYPE to get set properly.
9768 2001-12-21 Richard Henderson <rth@redhat.com>
9770 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9771 only if the target requires collect2.
9773 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9775 2001-12-20 Tom Tromey <tromey@redhat.com>
9778 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9779 CAN_COMPLETE_NORMALLY for the node.
9780 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9781 generate code for second branch if first branch can't complete
9783 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9784 the loop head if the loop body can't complete normally.
9786 2001-12-20 Tom Tromey <tromey@redhat.com>
9789 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9790 case where `finally' clause can't complete normally.
9792 2001-12-20 Tom Tromey <tromey@redhat.com>
9795 * parse.y (analyze_clinit_body): Added this_class parameter.
9796 Check for more cases where we must keep <clinit>.
9797 (maybe_yank_clinit): Cleaned up flow control.
9799 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9801 * decl.c (java_init_decl_processing): Don't initialize
9802 finit_leg_identifier_node.
9803 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9804 (finit_leg_identifier_node): Remove.
9805 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9807 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9809 * mangle.c (mangle_member_name): Don't special-case for
9811 * mangle_name.c (unicode_mangling_length): Likewise.
9812 (append_unicode_mangled_name): Likewise.
9813 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9816 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9818 * expr.c (build_java_array_length_access): Don't force null pointer
9819 check unless flag_check_references is set.
9821 2001-12-20 Tom Tromey <tromey@redhat.com>
9823 Fix for PR java/3417:
9824 * parse.y (patch_assignment): Added special processing for
9826 (patch_return): Don't convert booleans to integers, and don't
9827 special-case `null'.
9829 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
9831 * config-lang.in (diff_excludes): Remove.
9833 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
9835 * gcj.texi: Update link to GCC manual.
9837 2001-12-17 Tom Tromey <tromey@redhat.com>
9839 * parse.y (link_nested_class_to_enclosing): Removed useless
9842 2001-12-16 Tom Tromey <tromey@redhat.com>
9844 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9847 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
9849 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9850 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9853 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9855 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9857 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9859 * decl.c (java_init_decl_processing): Build otable_type correctly.
9860 otable_decl is an otable_type.
9862 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9864 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
9865 otable_type, otable_ptr_type, method_symbol_type,
9866 method_symbols_array_type, method_symbols_array_ptr_type): New
9867 field/global tree definitions.
9868 (flag_indirect_dispatch): New flag.
9869 * decl.c (java_init_decl_processing): Initialize new otable and
9870 otable_syms type nodes and decls. Add new field "index" to
9872 * class.c (build_method_symbols_entry): New function.
9873 (make_method_value): Set "index" to to method's vtable index for
9874 virtual methods when indirect-dispatch is not used.
9875 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
9876 and set vtable_method_count to -1. Set otable and otable_syms field
9877 if indirect-dispatch is used and there was something to put in them.
9878 (build_method_symbols_entry): New function.
9879 (emit_offset_symbol_table): New function.
9880 * expr.c (get_offset_table_index): New function.
9881 (build_invokevirtual): Build array reference to otable at the index
9882 returned by get_offset_table_index, and use the result as the vtable
9884 (build_invokeinterface): Similar.
9885 * jcf-parse.c (yyparse): If indirect-dispatch, call
9886 emit_offset_symbol_table at the end of compilation, after all classes
9887 have been generated.
9888 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9889 * lang.c (flag_indirect_dispatch): Define.
9890 (lang_f_options): Add indirect-dispatch flag.
9892 2001-12-14 Matthias Klose <doko@debian.org>
9894 * gcj.texi: Markup for man page generation. Document missing
9895 options printed by <tool> --help.
9896 Terminate description of gij's -ms option with a dot.
9897 * Make-lang.in ($(srcdir)/java/*.1): New targets.
9898 (java.generated-manpages java.install-man, java.uninstall,
9899 java-maintainer-clean) Updated.
9901 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
9903 * class.c (get_dispatch_table): Fix java vtable layout
9904 for TARGET_VTABLE_USES_DESCRIPTORS.
9905 * decl.c (java_init_decl_processing): Initialize
9906 alloc_no_finalizer_node, finalize_identifier_node.
9907 * expr.c (class_has_finalize_method): New function.
9908 (expand_java_NEW): Generate calls for finalizer-free allocation.
9909 (build_invokevirtual): Fix java vtable layout for
9910 TARGET_VTABLE_USES_DESCRIPTORS.
9911 * java-tree.h (enum java_tree_index): New entries:
9912 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
9913 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
9914 (class_has_finalize_method): declare.
9915 (HAS_FINALIZER_P): New macro.
9916 * parse.y (patch_invoke): Generate calls for finalizer-free
9919 2001-12-12 Matthias Klose <doko@debian.org>
9921 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
9922 whitespace at end of line.
9924 2001-12-11 Tom Tromey <tromey@redhat.com>
9926 * lex.c (java_init_lex): Define wfl_to_string as
9927 gnu.gcj.runtime.StringBuffer unless generating bytecode.
9929 2001-12-11 Jeff Sturm <jsturm@one-point.com>
9931 * class.c (make_method_value): Use null_pointer_node to
9932 represent empty exception table.
9934 2001-12-10 Tom Tromey <tromey@redhat.com>
9936 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
9938 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
9940 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
9942 2001-12-09 Per Bothner <per@bothner.com>
9944 * check-init.c (current_switch_has_default): New static field.
9945 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
9946 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
9947 DEFAULT_EXPR seen, simulate a default alternative that copies state.
9949 2001-12-09 Tom Tromey <tromey@redhat.com>
9951 * check-init.c (check_init): Don't allow pre- or post- increment
9952 or decrement of final variable.
9953 (final_assign_error): Minor error message rewording.
9955 2001-12-08 Tom Tromey <tromey@redhat.com>
9957 * java-tree.h: Fixed typo.
9959 * gjavah.c (decompile_method): Don't decompile to `return this'
9962 * gjavah.c (cxx_keywords): Re-sorted.
9963 * lex.c (cxx_keywords): Re-sorted.
9965 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
9968 * gjavah.c (print_namelet): Clear subnamelets.
9969 (HANDLE_METHOD): Set `method_printed' earlier.
9971 2001-12-07 Tom Tromey <tromey@redhat.com>
9973 * lang.c (lang_f_options): Added
9974 optimize-static-class-initialization.
9975 (java_decode_option): Removed special case.
9977 2001-12-07 Per Bothner <per@bothner.com>
9979 * check-init.c (check_init): Fix typo freeing memory twice.
9981 2001-12-05 Per Bothner <per@bothner.com>
9983 Restore support for static class initialization optimization.
9984 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
9985 * check-init.c (check_int): At end of BLOCK handle initialization
9986 blocks, which used to be done in java_complete_expand_method but did
9987 not handle the case where check_for_initialization might allocate
9988 more than a word of bits.
9989 * decl.c (lang_make_tree): The smic field is now a tree.
9990 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
9991 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
9993 * parse.y (emit_test_initialization): Combine hash_lookup calls.
9995 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
9996 Change from a hash table to a list.
9997 (struct_lang_decl): Change field 'smic' to match.
9998 * class.c (add_method_1): Initialize
9999 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
10000 * parse.y (adjust_init_test_initialization): Removed - inlined into -
10001 (java_expand_method_bodies): -here, since 'smic' is now a list.
10002 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
10004 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
10006 * class.c (java_hash_compare_tree_node): Fix casts.
10008 2001-12-04 Per Bothner <per@bothner.com>
10010 * check-init.c: Handle definite unassignment to finals in addition
10011 to definite assignment.
10012 (loop_current_locals): New field.
10013 (num_current_locals, int start_current_locals, num_current_words):
10015 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
10016 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
10017 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
10018 (get_variable_decl, check_final_reassigned): New functions.
10019 (check_init, check_bool_init): Modify as needed for checking finals.
10020 (check_for_initialization): Take extra parameter and return void.
10021 Do extra start-up logic to check final fields for assignment.
10022 * parse.y (check_static_final_variable_assignment_flag,
10023 reset_static_final_variable_assignment_flag, check_final_assignment,
10024 check_final_variable_local_assignment_flag,
10025 reset_final_variable_indirect_assignment_flag,
10026 reset_final_variable_global_assignment_flag): Remove functions.
10027 (java_complete_expand_methods, outer_field_access_fix,
10028 patch_assignment): Remove no-longer used logic.
10029 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
10030 * parse.y (register_fields, java_complete_tree): Update accordingly.
10032 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
10033 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
10034 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
10036 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
10038 * java-tree.h (DECL FINAL): New bit-field.
10039 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
10040 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
10041 (DECL_INIT_CALLS_THIS): New macro.
10042 (struct lang_decl): New bit-field init_calls_this.
10043 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
10044 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
10045 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
10046 use it for both local variables and final fields.
10047 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
10049 (struct lang_type): Remove hfv bit-field.
10050 (check_for_initialization): Change to return void.
10052 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
10053 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
10054 * check-init.c (final_assign_error): New helper function.
10055 (check_final_reassigned, check_init): Use it.
10056 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
10058 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
10059 bit-fields to unsigned.
10061 2001-12-03 Per Bothner <per@bothner.com>
10063 * parse.y (patch_binop): Minor constant folding.
10065 * parse.y (build_current_thisn): Shorter 'buffer'.
10067 2001-12-03 Per Bothner <per@bothner.com>
10069 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
10070 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
10071 * jcf-write.c (generate_bytecode_insns): Remove support for
10072 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
10073 * check-init.c (check_init): Likewise.
10075 2001-12-03 Per Bothner <per@bothner.com>
10077 * verify.c (subroutine_nesting): New function.
10078 (verify_jvm_instructions): Use it to fix logic for checking that
10079 we're done with the current subroutine.
10081 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
10082 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
10084 2001-12-03 Per Bothner <per@bothner.com>
10086 * jcf.h: Fix obvious typo in comment.
10087 * typeck.c (build_null_signature): Add comment.
10089 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
10091 * expr.c: Remove leading capital from diagnostic messages, as
10092 per GNU coding standards.
10093 * jcf-io.c: Similarly.
10094 * jcf-parse.c: Similarly.
10095 * jv-scan.c: Similarly.
10096 * jvspec.c: Similarly.
10097 * mangle.c: Similarly.
10099 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
10100 Alexandre Petit-Bianco <apbianco@redhat.com>
10102 * expr.c (build_java_arrayaccess): Call save_expr on array for
10103 correct evaluation order, modified comment, fixed indentation.
10104 * parse.y: (patch_assignment): Correctly extract the array base
10105 from the tree generate by build_java_arrayaccess, added comments.
10106 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
10107 Fixes PR java/3096, PR java/3803, PR java/3965.
10109 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
10111 * expr.c (expand_byte_code): Remove trailing periods from messages.
10112 * jcf-parse.c (load_class, jcf_parse): Similarly.
10113 * jcf-write.c (generate_classfile): Similarly.
10114 * lex.c (java_lex): Similarly.
10116 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10118 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
10120 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
10122 * Make-lang.in (java.generated-manpages): New dummy target.
10124 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10126 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10128 (lang_specific_pre_link): Use set_input to set input_filename.
10129 Append `main' here.
10130 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10131 (main): Fix definition.
10132 Strip `main' from classname.
10135 2001-11-18 Roger Sayle <roger@eyesopen.com>
10137 * parse.h (java_expand_switch): Remove old prototype.
10139 2001-11-18 Tom Tromey <tromey@redhat.com>
10141 Fix for PR java/1401:
10142 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
10144 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
10147 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
10149 * lang.c (finish_parse): Rename to java_finish.
10150 (LANG_HOOKS_FINISH, java_finish): New.
10152 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
10154 * decl.c (init_decl_processing): Rename java_init_decl_processing.
10155 * java-tree.h: New prototype.
10156 * lang.c (java_init): Update prototype. Combine with old init_parse.
10158 2001-11-13 Tom Tromey <tromey@redhat.com>
10160 * gjavah.c (method_signature): New global.
10161 (HANDLE_METHOD): Set it.
10162 (decompile_return_statement): New function.
10163 (decompile_method): Use it.
10164 (print_method_info): Removed `synth' argument.
10166 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10168 * java-tree.h (java_set_yydebug): New.
10169 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
10170 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
10171 (print_lang_decl, print_lang_type, print_lang_identifier,
10172 print_lang_statistics, lang_print_xnode): Remove.
10174 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10176 * jcf-parse.c (init_lex): Remove.
10177 * lang.c (language_string, lang_identify): Remove.
10178 (struct lang_hooks): Constify.
10179 (LANG_HOOKS_NAME): Override.
10180 (init_parse): Update.
10182 2001-11-08 Andreas Franck <afranck@gmx.de>
10184 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
10185 program_transform_name the way suggested by autoconf.
10186 (java.install-common): Also transform auxiliary program names with
10187 program_transform_name.
10189 2001-11-08 Tom Tromey <tromey@cygnus.com>
10191 * parse.y (trap_overflow_corner_case): New rule.
10192 (unary_expression): Use it.
10193 * lex.c (java_init_lex): Don't set minus_seen.
10194 (yylex): Don't use minus_seen. Communicate overflow to parser for
10196 (error_if_numeric_overflow): New function.
10197 * parse.h (minus_seen): Removed field.
10198 (JAVA_RADIX10_FLAG): New define.
10200 2001-11-07 Tom Tromey <tromey@redhat.com>
10202 Patch for PR java/1414:
10203 * parse.y (case_label_list): New global.
10204 (goal): Register case_label_list with GC.
10205 (java_complete_lhs): Save new case on case_label_list.
10206 (patch_switch_statement): Check for duplicate case labels.
10208 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10210 * parse.y (patch_assignment): Removed unused third argument.
10211 (java_complete_lhs): Removed unused third argument to patch_assignment.
10213 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10215 * lang.c: Include langhooks-def.h.
10216 * Make-lang.in: Update.
10218 2001-10-31 Zack Weinberg <zack@codesourcery.com>
10220 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10222 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10224 * mangle.c (find_compression_record_match): Don't match compression
10225 records for package name elements unless they occur at the start of
10226 the name. Fix for PR java/4717.
10228 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10230 * expr.c (expand_java_field_op): Don't special-case references to
10231 java.lang.PRIMTYPE.TYPE.
10232 (build_primtype_type_ref): Removed.
10233 * java-tree.h (build_primtype_type_ref): Remove prototype.
10234 * parse.y (maybe_build_primttype_type_ref): Removed.
10235 (complete_function_arguments): Don't special-case references to
10236 java.lang.PRIMTYPE.TYPE.
10237 (patch_assignment): Likewise.
10238 (array_constructor_check_entry): Likewise.
10240 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10242 * mangle.c (static tree compression_table): Fixed leading comment.
10243 * parse.h (struct parser_ctxt): Fixed field comment.
10244 * parse.y (check_pkg_class_access): New prototype, fixed leading
10245 comment, new parameter used to emit error only if passed as true.
10246 (parse_check_super): Pass extra argument to check_pkg_class_access.
10247 (do_resolve_class): Likewise.
10248 (process_imports): Likewise.
10249 (read_import_dir): Fixed indentation.
10250 (find_in_imports_on_demand): New local class_type_name. Local
10251 node_to_use deleted. while loop changed into for loop. Report
10252 multiple definition only for accessible classes. Improved error
10254 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
10255 assigned to parameter list, fixed indentation. while loop changed
10256 into for loop, restore TREE_CHAIN on local `tem' before the next
10259 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10261 * lang.c (lang_get_alias_set): Deleted.
10263 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10265 * gjavah.c (jni_print_char): Fix thinko in last change.
10267 * gjavah.c (jni_print_char, decode_signature_piece): Use
10268 safe-ctype macros and/or fold extra calls into fewer ones.
10269 * lex.c (java_read_unicode, java_lex): Likewise.
10270 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10271 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10272 * mangle_name.c (append_unicode_mangled_name,
10273 unicode_mangling_length): Likewise.
10275 2001-10-17 Richard Henderson <rth@redhat.com>
10277 * Make-lang.in (java/lang.o): Depend on langhooks.h.
10279 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
10281 * lang.c (langhooks.h): Included.
10282 (LANG_HOOKS_INIT): Redefined.
10283 (LANG_HOOKS_INIT_OPTIONS): Likewise.
10284 (LANG_HOOKS_DECODE_OPTION): Likewise.
10285 (struct lang_hooks lang_hooks): New initialization.
10287 2001-10-11 Per Bothner <per@bothner.com>
10289 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
10290 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10291 The former is simpler, and jcf-write.c handles it better.
10292 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
10293 or WITH_CLEANUP_EXPR.
10294 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
10295 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10297 * parse.y (patch_if_else_statement): If the condition is constant,
10298 optimize away the test.
10300 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10302 * parse.y (patch_cast): Call patch_string on the first operand of
10303 the incoming node, update it if necessary. Fixes PR java/4510.
10305 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10307 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10308 when name qualifier matches a package name.
10310 2001-10-08 Tom Tromey <tromey@redhat.com>
10312 Fix for PR java/4489:
10313 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10314 force a new label when computing `body_block'.
10316 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10318 * jcf-io.c (format_uint): Const-ify.
10319 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10320 * lex.c (java_get_line_col): Likewise.
10321 * parse.y (build_incdec): Likewise.
10323 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10325 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
10326 a NULL enclosing context if appropriate. Fixes PR java/4466.
10328 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
10330 * parse.y (patch_assignment): Use lvalue's original TYPE when
10331 building the final COMPOUND_EXPR.
10332 (try_reference_assignconv): Fixed leading comment.
10334 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
10336 * parse.y (check_final_variable_indirect_assignment): For
10337 COMPOUND_EXPR, return only if finals were found initialized
10338 properly, if not, keep on checking.
10339 (check_final_variable_global_assignment_flag): New local
10340 error_found, set when appropriate and used to decide whether to
10341 report uninitialized finals. Fixed typo in comment.
10343 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10345 * decl.c (init_decl_processing): Fixed typo in predef_filenames
10346 last three initializations. Fixes PR java/4360.
10348 2001-09-21 Richard Henderson <rth@redhat.com>
10350 * class.c (get_dispatch_table): Handle function descriptors.
10351 (build_dtable_decl): Likewise.
10352 * expr.c (build_invokevirtual): Likewise.
10354 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10356 * parse.y (patch_method_invocation): Build class initialization
10357 when static finals are used to qualify method invocation.
10358 Fixes PR java/4366.
10360 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
10362 * parse.h: (WFL_STRIP_BRACKET): Re-written using
10363 build_type_name_from_array_name.
10364 (STRING_STRIP_BRACKETS): New macro.
10365 * parse.y (build_type_name_from_array_name): New function.
10366 (array_creation_expression:): Accumulate []s instead of [s.
10367 (cast_expression:): Accumulate []s instead of [s after cast type
10369 (build_array_from_name): Local string deleted, use
10370 build_type_name_from_array_name.
10371 (build_unresolved_array_type): Accumulate []s instead of [s after
10373 (register_fields): Fixed comment.
10374 (resolve_class): Local name, base deleted, new locals tname and
10375 array_dims. Use build_type_name_from_array_name. Use array_dims to
10377 (purify_type_name): Use STRING_STRIP_BRACKETS.
10379 2001-09-18 Andreas Jaeger <aj@suse.de>
10381 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10382 * jv-scan.c: Likewise.
10384 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10386 * parse.y (patch_method_invocation): Inner class creation context
10387 check not enforced within constructors. Fixes PR java/1873.
10389 2001-09-16 Tom Tromey <tromey@redhat.com>
10391 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10392 NOTE_PUSH for single-case push. Fixes PR java/4189.
10394 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10396 * java-tree.h (TYPE_IMPORT_LIST): New macro.
10397 (TYPE_IMPORT_DEMAND_LIST): Likewise.
10398 (struct lang_type): New fields import_list and import_demand_list.
10399 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10400 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10401 (do_resolve_class): New local saved_enclosing_type, initialized,
10402 passed as parameter to find_in_imports and find_in_imports_on_demand.
10403 (find_in_imports): Added paramater enclosing_type, use its
10404 TYPE_IMPORT_LIST when applicable.
10405 (find_in_imports_on_demand): Added parameter enclosing_type, use
10406 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10407 declaration and initialization.
10408 (fold_constant_for_init): Switch/restore current_class to the
10409 appropriate context.
10411 2001-09-13 Mark Mitchell <mark@codesourcery.com>
10413 * verify.c (verify_jvm_instructions): Fix typo.
10415 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10417 * expr.c (expand_invoke): Const-ification.
10418 * parse.y (patch_method_invocation): Likewise.
10420 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10422 * gjavah.c (cxx_keywords): Const-ification.
10423 * keyword.gperf (java_keyword): Likewise.
10424 * lang.c (java_tree_code_name): Likewise.
10425 * lex.c (cxx_keywords): Likewise.
10426 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10428 2001-09-11 Richard Henderson <rth@redhat.com>
10430 * parse.h (ctxp_for_generation): Mark extern.
10432 2001-09-10 Richard Henderson <rth@redhat.com>
10434 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10436 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10438 * typeck.c (java_array_type_length, build_prim_array_type):
10439 Represent empty arrays by NULL index.
10441 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
10443 * java-tree.h (compile_resource_file): Grouped with other prototypes.
10444 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10446 2001-09-06 Anthony Green <green@redhat.com>
10448 * class.c (O_BINARY): Define if necessary.
10449 (registerResource_libfunc): Declare.
10450 (init_class_processing): Initilize registerResource_libfunc.
10451 (compile_resource_file): New function.
10452 * java-tree.h (resource_name): Declare.
10453 (compile_resource_file): Declare.
10454 * jcf-parse.c (yyparse): Handle compiling java resource files.
10455 * lang.c (java_decode_option): Handle -fcompile-resource option.
10456 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10458 * gcj.texi (Code Generation): Add documentation for -R flag.
10460 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10462 * jcf-write.c (generate_classfile): Issue an error in case of
10463 field/initial value mismatch.
10464 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10465 being initialized and we're generating bytecode.
10466 (java_complete_lhs): In MODIFY_EXPR section: added comments,
10467 set DECL_INITIAL properly when appropriate.
10471 2001-09-01 Per Bothner <per@bothner.com>
10473 * parse.y (maybe_yank_clinit): A field without an initializer is not
10474 relevant. All initializers except static final and constant require
10475 <clinit>, regardless of flag_emit_class_files.
10477 2001-08-31 Per Bothner <per@bothner.com>
10479 * class.c (set_constant_value): When not emitting class files, then a
10480 String ConstantValue is a utf8const_ptr_type.
10482 2001-08-30 Per Bothner <per@bothner.com>
10484 * jcf-write.c (generate_classfile): Check that field is primitive
10485 or string before emitting ConstantValue attribute.
10487 2001-08-30 Per Bothner <per@bothner.com>
10489 * parse.y (resolve_qualified_expression_name): If creating a
10490 COMPOUND_EXPR, set it's type correctly.
10492 2001-08-30 Per Bothner <per@bothner.com>
10494 * jcf-io.c (open_class): Set filename field.
10496 * jcf-parse,c (parse_class_file): Set current_function_decl
10497 for better error message when Code attribute is missing.
10499 * lang.c (put_decl_node, lang_print_error): Re-arrange for
10500 better diagnostics, especially for constructors.
10502 2001-08-30 Per Bothner <per@bothner.com>
10504 * jcf-write.c (generate_classfile): Don't write ConstantValue
10505 attribute if field is not final, for compatibility with jdk.
10507 * jcf-write.c (generate_classfile): Convert ConstantValue values
10508 to correct type. Work-around for front-end bug.
10509 * class.c (set_constant_value): Error if constant has wrong type.
10511 2001-08-30 Per Bothner <per@bothner.com>
10513 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
10514 "Double" are printed at verbosity 1.
10516 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
10518 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
10520 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10522 * parse.y (patch_assignment): Don't verify final re-assignment here.
10523 (java_complete_lhs): Verify assignments to finals calling
10524 patch_assignment. Verify re-assignments to finals before calling
10527 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
10529 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10532 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
10534 * lex.c (java_lex): new local found_hex_digits. Set and then used
10535 in test to reject invalid hexadecimal numbers.
10536 * parse.y (java_complete_tree): Prevent unwanted cast with
10537 initialized floating point finals.
10538 (patch_binop): Emit a warning when detecting a division by zero,
10539 mark result not constant, don't simplify non integer division.
10541 2001-08-28 Per Bothner <per@bothner.com>
10543 * jcf-write.c (generate_bytecode_insns): For increments and
10544 decrements just recurse to push constant. Improvement on Mark's patch.
10546 2001-08-28 Mark Mitchell <mark@codesourcery.com>
10548 * jcf-write.c (generate_bytecode_insns): Generate an integer to
10549 real conversion for increments and decrements of reals.
10551 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10553 * parse.y (resolve_qualified_expression_name): Handle unresolved
10554 qualified expressions, prevent numerical qualifiers, fixed typo.
10557 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10559 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10560 don't report anything but deprecated class when marked so. Handle
10562 (patch_method_invocation): Check deprecation on methods and types.
10563 (patch_binop): code becomes an enum tree_code, added default: to
10564 switch to handle that. Detect division by zero, try to fold and
10565 return before using a subroutine.
10567 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10569 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10570 file smaller than 4 bytes.
10571 * parse.y (check_inner_circular_reference): New function.
10572 (check_circular_reference): Likewise.
10573 (array_initializer:): Accept {,}.
10574 (java_check_circular_reference): Rewritten using
10575 check_circular_reference and check_inner_circular_reference.
10576 (java_complete_expand_method): Unconditionally save and restore
10577 the unpurged exception list.
10578 (build_dot_class_method_invocation): Unmangle signature parameter.
10580 2001-08-21 Tom Tromey <tromey@redhat.com>
10582 * decl.c (init_decl_processing): Add `throws' field to method
10584 * class.c (make_method_value): Compute `throws' field for method.
10586 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10588 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10589 circularity is detected.
10590 (ctors_unchecked_throws_clause_p): Fixed leading comment.
10592 2001-08-17 Richard Henderson <rth@redhat.com>
10594 * class.c (emit_register_classes): Add align parameter to
10595 call to assemble_integer.
10597 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
10599 * jcf-parse.c (load_class): New locals saved and class_loaded. If
10600 loading a class_or_name fails, try considering an innerclass name
10601 and load the enclosing context.
10602 * parse.y (resolve_inner_class): New function.
10603 (find_as_inner_class): Added leading comment.
10604 (register_incomplete_type): Keep the current context as enclosing
10605 context for JDEP_FIELD dependencies.
10606 (do_resolve_class): Locals new_class_decl and super initialized to
10607 NULL. Call resolve_inner_class, explore the enclosing context
10608 superclass if necessary.
10611 2001-08-16 Tom Tromey <tromey@redhat.com>
10613 * jcf-dump.c (main): Updated for change to jcf_path_seal.
10614 * gjavah.c (main): Updated for change to jcf_path_seal.
10615 * lang.c (version_flag): New global.
10616 (java_decode_option): Recognize `-version'.
10617 (java_init): Update for change to jcf_path_seal.
10618 * jcf.h (jcf_path_seal): Added `print' argument.
10619 * jcf-path.c (jcf_path_seal): Added `print' argument.
10621 2001-08-13 Zack Weinberg <zackw@panix.com>
10623 * Make-lang.in (java/decl.o): Update dependencies.
10624 * decl.c: Include libfuncs.h, don't include toplev.h.
10626 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10628 * decl.c (init_decl_processing): exception_type_node,
10629 class_not_found_type_node, and no_class_def_found_type_node
10630 initialized. predef_filenames augmented accordingly.
10631 instinit_identifier_node initialized.
10632 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10633 * java-tree.h (enum java_tree_index): New entries
10634 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10635 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10636 (exception_type_node): New macro.
10637 (class_not_found_type_node): Likewise.
10638 (no_class_def_found_type_node): Likewise.
10639 (instinit_identifier_node): Likewise.
10640 (PREDEF_FILENAMES_SIZE): Adjusted.
10641 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10642 (struct lang_type): Fixed typo in bitfield name.
10643 (DECL_INSTINIT_P): New macro.
10644 (ID_INSTINIT_P): Likewise.
10645 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10647 * parse.y (encapsulate_with_try_catch): New function.
10648 (generate_instinit): Likewise.
10649 (build_instinit_invocation): Likewise.
10650 (ctors_unchecked_throws_clause_p): Likewise.
10651 (add_instance_initializer): Deleted.
10652 (build_instance_initializer): Likewise.
10653 (in_instance_initializer): Likewise.
10654 (check_method_redefinition): instinit$ not to be verified.
10655 (java_complete_expand_methods): Generate instinit$, simplified code.
10656 (build_dot_class_method): Eliminated unnecessary locals. Use
10657 encapsulate_with_try_catch, removed unnecessary code.
10658 (fix_constructors): New local iii. Use build_instinit_invocation.
10659 (patch_method_invocation): Added comment.
10660 (maybe_use_access_method): Don't consider instinit$.
10661 (find_applicable_accessible_methods_list): Shorten the search for
10663 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10664 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10665 (patch_throw_statement): Likewise. Fixed typo.
10667 2001-08-12 David Edelsohn <edelsohn@gnu.org>
10670 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10671 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10673 (lang_specific_pre_link): Use set_input to set input_filename.
10674 Append `main' here.
10675 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10676 (main): Fix definition.
10677 Strip `main' from classname.
10680 2001-08-11 Zack Weinberg <zackw@panix.com>
10682 * lex.h: Don't include setjmp.h. Don't define
10683 SET_FLOAT_HANDLER or prototype set_float_handler.
10685 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10687 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10688 `poplevel' in the right order.
10690 2001-08-09 Richard Henderson <rth@redhat.com>
10692 * Make-lang.in (class.o): Depend on TARGET_H.
10693 * class.c (emit_register_classes): Use target hooks instead of
10694 assemble_constructor and assemble_destructor.
10696 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
10698 * check-init.c (flags.h): Include
10699 (check_init): Don't report uninitialized static class
10700 initialization flags, don't free bit index when doing static class
10701 initialization optimization.
10702 (check_for_initialization): Return type changed to `unsigned int.'
10703 (attach_initialized_static_class): New function.
10704 * class.c (add_method_1): Create the initialized static class
10705 table if necessary.
10706 (finish_class): Always emit deferred inline methods.
10707 * decl.c (emit_init_test_initialization): Moved to expr.c
10708 (complete_start_java_method): Don't traverse
10709 DECL_FUNCTION_INIT_TEST_TABLE.
10710 (lang_mark_tree): Mark hash tables in function decls.
10711 * expr.c (emit_init_test_initialization): Moved from decl.c.
10712 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10713 initialization flag, set DECL_CONTEXT and
10714 LOCAL_CLASS_INITIALIZATION_FLAG.
10715 (java_lang_expand_expr): Emit initialization code for static class
10716 initialized flags when entering block, if necessary.
10717 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10718 * java-tree.h (flag_optimize_sci): New global variable declaration.
10719 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10720 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10721 (LOCAL_FINAL_P): Fixed typo in comment.
10722 (FINAL_VARIABLE_P): Likewise.
10723 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10724 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10725 (struct lang_decl): New fields `ict', `smic' and `cif.'
10726 (check_for_initialization): New returned value for global.
10727 (attach_initialized_static_class): New global function.
10728 (STATIC_CLASS_INIT_OPT_P): New macro.
10729 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10730 * lang.c (java_decode_option): Handle
10731 `-fno-optimize-static-class-initialization'
10732 * parse.y (start_complete_expand_method): New function.
10733 (java_expand_method_bodies): Likewise.
10734 (attach_init_test_initialization_flags): Likewise.
10735 (adjust_init_test_initialization): Likewise.
10736 (emit_test_initialization): Likewise.
10737 (java_complete_expand_methods): Nullify abstract and native method
10739 (java_complete_expand_method): New locals `fbody', `block_body'
10740 and `exception_copy.' Reorganized: directly return on empty method
10741 bodies, call `start_complete_expand_method', remember definitely
10742 initialized static class in function, don't expand method bodies.
10743 (java_expand_classes): Call `java_expand_method_bodies' before
10744 `finish_class' when compiling to native.
10745 (resolve_expression_name): Use `orig' after building outer class
10747 (patch_invoke): Remember static method invocations.
10749 2001-08-06 Richard Henderson <rth@redhat.com>
10751 * class.c (emit_register_classes): Pass a symbol_ref and priority
10752 to assemble_constructor.
10754 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
10756 * java-tree.h (all_class_filename): New macro.
10757 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10758 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10759 newly created IDENTIFIER_NODE to `all_class_filename.'
10761 2001-08-01 Jeff Sturm <jsturm@one-point.com>
10763 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10764 Use ggc_add_tree_root to register roots.
10766 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10768 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10769 second operand calling check_init.
10770 * decl.c (complete_start_java_method): Swaped second and third
10771 arguments while creating WITH_CLEANUP_EXPR node.
10772 * jcf-write.c (generate_bytecode_insns): Use second operand
10773 instead of third when handling WITH_CLEANUP_EXPR.
10774 * parse.y (java_complete_lhs): Expand second operand of
10775 WITH_CLEANUP_EXPR nodes.
10776 (patch_synchronized_statement): Swaped second and third arguments
10777 while creating WITH_CLEANUP_EXPR node.
10779 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
10781 * parse.y (create_interface): Avoid cyclic inheritance report when
10782 syntax error encountered during class definition.
10785 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10787 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10789 (lang_specific_pre_link): Use set_input to set input_filename.
10790 Append `main' here.
10791 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10792 (main): Fix definition.
10793 Strip `main' from classname.
10796 2001-07-18 Tom Tromey <tromey@redhat.com>
10799 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10800 * lex.c (java_new_lexer): Use ICONV_CONST.
10801 (java_read_char): Likewise.
10802 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10803 (jv-scan$(exeext)): Likewise.
10805 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10807 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10808 * parse.y (check_class_interface_creation): Allow `private' if the
10809 enclosing is not an interface.
10810 (create_interface): Interface tagged public if the enclosing
10811 context is an interface.
10812 (create_class): Class tagged public if the enclosing context
10816 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10818 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10821 2001-07-14 Tim Josling <tej@melbpc.org.au>
10823 * check-init.c (check_init): Remove references to EXPON_EXPR.
10825 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10827 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10828 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
10831 2001-07-13 Tom Tromey <tromey@redhat.com>
10833 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10836 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10838 * parse.y (patch_method_invocation): Don't override primary if one
10839 is already provided, but let this$<n> be built. Fixed comment.
10841 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10843 * parse.y (empty_statement:): Report empty statement error only
10844 when found at class declaration level.
10847 2001-07-12 Tom Tromey <tromey@redhat.com>
10849 * expr.c (expand_load_internal): New function.
10850 (LOAD_INTERNAL): Use it.
10852 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
10854 * parse.y (verify_constructor_super): Compare anonymous class ctor
10855 args with `valid_method_invocation_conversion_p.'
10858 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10860 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10861 `-fsyntax-only.' Fixes PR java/3248
10863 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10865 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10867 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10869 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10870 current function is static. Fixes PR java/1970
10872 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10874 * parse.y (patch_method_invocation): Add enclosing context to ctor
10875 calls if necessary. Fixes PR java/2953
10877 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10879 * parse.y (resolve_package): Abort if qualified expression member
10881 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10884 2001-07-07 Zack Weinberg <zackw@stanford.edu>
10886 * verify.c: Don't use // comments.
10888 2001-07-05 Tom Tromey <tromey@redhat.com>
10890 * lang.c (flag_assume_compiled): Removed.
10891 * java-tree.h (flag_assume_compiled): Removed.
10892 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
10893 -fhash-synchronization, -fuse-divide-subroutine,
10894 -fcheck-references, -femit-class-file, -femit-class-files,
10895 -fassume-compiled. Updated --encoding information. Changed
10896 -foutput-class-dir to `-d'.
10898 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
10900 * jcf-parse.c (parse_class_file): Add lineno parameter to
10901 debug_start_source_file call.
10903 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
10905 * gcj.texi: Use gpl.texi.
10906 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
10907 dependencies and use doc/include in search path.
10909 2001-07-03 Jeff Sturm <jsturm@one-point.com>
10911 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
10912 `this'. If so, don't build instance initializers.
10914 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
10916 * parse.y (resolve_expression_name): Improved error message for
10917 inner class cases. Fixes PR java/1958
10919 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
10921 * lang.c: #include diagnostic.h
10922 (lang_print_error): Add a `diagnostic_context *' parameter.
10923 (java_dummy_print): Likewise.
10924 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
10926 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10928 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
10929 * jcf.h (typedef struct JCF): New bitfield `finished.'
10930 (JCF_FINISH): Set `finished.'
10931 (JCF_ZERO): Reset `finished.'
10934 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10936 * parse.y (class_body_declaration:): Don't install empty instance
10940 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10942 * class.c (set_super_info): Call `set_class_decl_access_flags.'
10943 (set_class_decl_access_flags): New function.
10944 * java-tree.h (set_class_decl_access_flags): New prototype.
10945 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
10946 (parse_class_file): New local `decl_max_locals.' Take wide types
10947 into account to compute DECL_MAX_LOCALS.
10948 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
10951 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
10953 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
10955 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10957 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
10958 * parse.y (do_resolve_class): Moved comments out to leading comment
10959 section. Removed local `start', New local `_ht' and
10960 `circularity_hash.' Record `enclosing' in hash table and search
10961 it to detect circularity. Use `enclosing' as an argument to
10962 `lookup_cl.' Free the hash table when done.
10964 2001-06-19 Tom Tromey <tromey@redhat.com>
10966 * lex.c (java_read_char): Disallow invalid and overlong
10967 sequences. Fixes PR java/2319.
10969 2001-06-05 Jeff Sturm <jsturm@one-point.com>
10971 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
10973 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10975 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
10976 arguments accordingly.
10978 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
10980 * gcj.texi: Move contents to just after title page.
10982 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
10984 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
10986 (patch_incomplete_class_ref): Build the class ref, build the class
10987 init if necessary, complete the tree.
10990 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10992 * parse.y (lookup_field_wrapper): Test `name' code.
10993 (resolve_qualified_expression_name): Test `qual_wfl' code.
10994 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
10995 handle `qual_wfl' by code.
10996 (maybe_build_primttype_type_ref): Test `wfl' code.
10998 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11000 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
11002 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
11003 the dvi file in the java directory.
11005 2001-05-25 Sam TH <sam@uchicago.edu>
11007 * gen-table.pl javaop.h jcf.h lex.h,
11008 parse.h: Fix header include guards.
11010 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
11012 * jv-scan.c (version): Update copyright year.
11014 2001-05-21 Per Bothner <per@bothner.com>
11016 * jcf-parse.c (read_class): If class is from .class or .zip file
11017 and it's already been read, don't push/pop parser context.
11019 2001-05-18 Per Bothner <per@bothner.com>
11021 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
11022 command line so the jvgenmain-generated main program comes first.
11024 2001-05-15 Tom Tromey <tromey@redhat.com>
11026 * class.c (build_utf8_ref): Don't generate identifier based on
11027 utf8const contents.
11029 2001-05-12 Richard Henderson <rth@redhat.com>
11031 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
11032 * expr.c (java_lang_expand_expr): Expand it.
11033 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
11034 calling build_exception_object_ref.
11035 * parse.y (catch_clause_parameter): Likewise.
11036 (build_dot_class_method): Likewise.
11037 (try_reference_assignconv): Likewise.
11038 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
11039 * jcf-write.c (generate_bytecode_insns): Likewise.
11041 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11043 * parse.y (build_unresolved_array_type): Set
11044 EXPR_WFL_QUALIFICATION on the newly created wfl.
11045 Fixes PR java/2538. Fixes PR java/2535.
11047 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11049 * parse.y (fix_constructors): Removed unnecessary assignment to
11050 local. Moved assignment to `this$<n>', fixed comments and
11052 (build_wfl_wrap): Fixed indentation.
11053 Fixes PR java/2598, java/2579 and java/2658.
11055 2001-05-03 Mo DeJong <mdejong@redhat.com>
11057 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
11058 check for byte swap.
11060 2000-05-02 Jeff Sturm <jsturm@one-point.com>
11062 * expr.c (build_class_init): Move MODIFY_EXPR
11063 outside of COND_EXPR. Remove variable `call'.
11065 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11067 * decl.c: NULL_PTR -> NULL.
11068 * jcf-write.c: Likewise.
11070 2001-05-01 Tom Tromey <tromey@redhat.com>
11072 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
11073 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
11074 * gcj.texi: Updated copyright text. Include fdl.texi.
11075 (Top): Link to new node.
11077 2001-05-01 Per Bothner <per@bothner.com>
11079 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
11081 2001-05-01 Per Bothner <per@bothner.com>
11083 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
11084 import_list contains the name, not the TREE_PURPOSE.
11086 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11088 * jcf-io.c (read_zip_member): Cast to long in comparison with
11091 * jvspec.c (lang_specific_driver): Initialize variables.
11093 * mangle.c (find_compression_record_match): Likewise.
11095 * typeck.c (build_null_signature): Provide static prototype. Mark
11096 parameter with ATTRIBUTE_UNUSED.
11098 * verify.c (verify_jvm_instructions): Initialize variable.
11100 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11102 * parse.y (do_resolve_class): Check for cyclic inheritance during
11103 inner class resolution.
11105 2001-04-27 Per Bothner <per@bothner.com>
11107 * parse.y (java_expand_classes): Don't change ctxp_for_generation
11108 while iterating, since that could cause gc to lose stuff.
11110 2001-04-26 Per Bothner <per@bothner.com>
11112 Fix method search wrt scope of inner classes to match JLS2.
11113 * typeck.c (build_null_signature): New static function.
11114 (has_method): New function. Uses build_null_signature and lookup_do.
11115 * java-tree.h (has_method): New declaration.
11116 * parse.y (find_applicable_accessible_methods_list): Do not search
11117 context of inner classes here.
11118 (patch_method_invocation): Search scope, ie. current and outer clases,
11119 for method matching simple name, to find class.
11121 2001-04-26 Per Bothner <per@bothner.com>
11123 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
11124 Fix thinko: If a single case, use if_icmpeq, not ifeq.
11126 * constants.c (find_methodref_with_class_index): New function.
11127 (find_methodref_index): Use find_methodref_with_class_index.
11128 * java-tree.h (find_methodref_with_class_index): New declaration.
11129 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
11130 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
11131 If context changed from interface to class, don't use invokeinterface.
11133 2001-04-25 Per Bothner <per@bothner.com>
11135 * verify.c (verify_jvm_instructions): For field instructions,
11136 check that field index is valid. For invoke instructions, check that
11137 method index is valid.
11139 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
11141 * config-lang.in (target_libs): Copy from $libgcj_saved.
11143 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11145 * decl.c (init_decl_processing): Add new class "protectionDomain"
11147 * class.c (make_class_data): Set initial value for "protectionDomain".
11149 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11151 * jvspec.c (lang_specific_driver): Fix memory allocation
11152 deficit, by using concat in lieu of xmalloc/sprintf.
11154 2001-04-20 Per Bothner <per@bothner.com>
11156 Fixes to compile multiple .class files at once.
11157 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
11158 * java-tree.h (CLASS_PARSED_P): New macro.
11159 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
11160 * jcf-parse.c (jcf_parse_source): Inline into read_class.
11161 (read_class): Avoid some code duplication.
11162 Don't call JCF_FINISH for a .class file - might be needed later.
11163 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
11164 rather than CLASS_LOADED_P, since latter implies class laid out.
11165 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
11166 * parse.y: Don't need to set CLASS_LOADED_P for array types.
11168 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11170 * Make-lang.in (java/boehm.o): Depend on toplev.h.
11172 * boehm.c: Include toplev.h.
11174 2001-04-06 Tom Tromey <tromey@redhat.com>
11175 Alexandre Petit-Bianco <apbianco@redhat.com>
11177 Fix for PR gcj/1404 and PR gcj/2332:
11178 * parse.y (build_array_from_name): If we use the type_wfl then
11179 accumulate dimensions from the original type as well.
11180 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
11182 2001-04-06 Tom Tromey <tromey@redhat.com>
11184 * parse.y (analyze_clinit_body): Return true if the second operand
11185 of a METHOD_EXPR is nonzero.
11187 2001-04-06 Tom Tromey <tromey@redhat.com>
11189 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
11191 ($(srcdir)/java/parse.c): Likewise.
11193 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
11195 * gcj.texi: Use `which-gcj' instead of `which-g77.'
11196 (version-gcc): Initialized.
11197 (which-gcj): Likewise.
11199 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11201 * java-tree.h (struct lang_decl): New macro
11202 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
11203 * parse.y (build_instance_initializer): New function.
11204 (add_instance_initializer): Use it.
11205 (java_fix_constructors): Set `current_class' before fix pass.
11206 (fix_constructors): Just return if already fixed. Move `super()'
11207 invocation ahead. Use `build_instance_initializer.'
11208 Fixes PR java/1315.
11210 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11212 * parse.y (resolve_qualified_expression_name): Pass field's
11213 DECL_CONTEXT to `not_accessible_p.'
11214 (not_accessible_p): Changed parameters order in `inherits_from_p'
11217 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
11219 * lang-options.h: Add flag_check_references.
11221 2001-04-04 Per Bothner <per@bothner.com>
11223 * java-tree.h (CONSTANT_VALUE_P): New macro.
11224 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
11225 * parse.y (maybe_build_class_init_for_field): New static function.
11226 (resolve_expression_name, resolve_field_access): Use
11227 maybe_build_class_init_for_field instead of build_class_init
11228 This does not do the init if the field is compile-time-constant.
11229 (resolve_field_access): Simplify.
11231 * parse.y (fold_constant_for_init): Merge test into switch.
11233 2001-04-03 Zack Weinberg <zackw@stanford.edu>
11235 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
11237 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
11239 2001-04-02 Zack Weinberg <zackw@stanford.edu>
11241 * expr.c (pop_type_0): Save the result of the first
11242 lang_printable_name call in a scratch buffer, so it
11243 won't be clobbered by the second call.
11245 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
11247 * parse-scan.y (array_type:): Rewritten.
11248 (type_declaration:): `empty_statement' replaces `SC_TK.'
11249 (class_member_declaration:): `empty statement' added.
11250 (method_body:): Simplified.
11251 (static_initializer:): Likewise.
11252 (primary_no_new_array:): Use `type_literals.'
11253 (type_literals:): New rule.
11254 (dims:): Set and update `bracket_count.'
11255 Fixes PR java/1074. Fixes PR java/2412.
11257 2001-03-28 Hans Boehm <boehm@acm.org>
11259 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
11260 (get_boehm_type_descriptor): Set type on returned value to be a
11261 pointer length integer.
11263 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11265 * expr.c (pop_type_0): Call `concat' rather than building the
11267 (pop_type): Add format specifier in call to `error'.
11269 * parse.y (patch_method_invocation): Avoid casting away
11272 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
11274 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11276 2001-03-28 Richard Henderson <rth@redhat.com>
11278 IA-64 ABI Exception Handling:
11279 * Make-lang.in (except.o): Don't depend on eh-common.h.
11280 * check-init.c (check_init): Handle EXC_PTR_EXPR.
11281 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11282 [soft_exceptioninfo_call_node]: Remove.
11283 [eh_personality_libfunc, lang_eh_runtime_type]: New.
11284 (end_java_method): No emit_handlers.
11285 * except.c (java_set_exception_lang_code): Remove.
11286 (method_init_exceptions): Don't call it.
11287 (prepare_eh_table_type): No CATCH_ALL_TYPE.
11288 (build_exception_object_ref): New.
11289 (expand_end_java_handler): Update for except.h name changes.
11290 (emit_handlers, expand_resume_after_catch): Remove.
11291 * expr.c (java_lang_expand_expr): Update for except.h name changes.
11292 (process_jvm_instruction): Use build_exception_object_ref.
11293 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11294 (soft_exceptioninfo_call_node): Remove.
11295 (build_exception_object_ref): Declare.
11296 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11297 soft_exceptioninfo_call_node. Move processing ...
11298 [EXC_PTR_EXPR]: ... here.
11299 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11300 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11301 (source_end_java_method): No java_set_exception_lang_code or
11303 (build_dot_class_method): Use build_exception_object_ref.
11304 (try_reference_assignconv): Check EXC_PTR_EXPR not
11305 soft_exceptioninfo_call_node.
11307 2001-03-28 Richard Henderson <rth@redhat.com>
11309 * java-tree.h (throw_node): Define as a single member of
11310 java_global_trees instead of a separate array.
11311 (JTI_THROW_NODE): New.
11312 * decl.c (throw_node): Don't declare.
11313 (init_decl_processing): Init a scalar throw_node.
11314 Don't register it for gc.
11315 * check-init.c (check_init): Reference scalar throw_node.
11316 * expr.c (build_java_athrow): Likewise.
11317 * jcf-write.c (generate_bytecode_insns): Likewise.
11318 * parse.h (BUILD_THROW): Likewise.
11320 2001-03-28 Richard Henderson <rth@redhat.com>
11322 * decl.c (end_java_method): Do not save and restore
11323 flag_non_call_exceptions.
11324 * parse.y (source_end_java_method): Likewise.
11325 * lang.c (flag_exceptions): Don't declare.
11326 (java_init_options): Set flag_non_call_exceptions. Set
11327 flag_exceptions here ...
11328 (java_init): ... not here.
11330 2001-03-27 Richard Henderson <rth@redhat.com>
11332 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11333 exceptions_via_longjmp.
11335 * lang.c (flag_new_exceptions): Don't declare it.
11336 (java_init_options): Or set it.
11338 2001-03-27 Richard Henderson <rth@redhat.com>
11340 * decl.c (end_java_method): Rename asynchronous_exceptions to
11341 flag_non_call_exceptions.
11342 * parse.y (source_end_java_method): Likewise.
11344 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11346 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11348 2001-03-26 Mark Mitchell <mark@codesourcery.com>
11350 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11352 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
11354 * parse.y (find_as_inner_class): Follow current package
11355 indications not to mistakingly load an unrelated class.
11357 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11359 * constants.c (PUTN): Use memcpy, not bcopy.
11361 * lex.c (java_read_char): Use memmove, not bcopy.
11363 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11365 2001-03-23 Per Bothner <per@bothner.com>
11367 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
11368 macro for better error pin-pointing.
11369 * java-tree.h: Fix typo in comment.
11371 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
11372 Don't include jsr/goto in exception range.
11373 Check if start and end of exception range are the same (also TRY_EXPR).
11374 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11375 However, do emit the following goto even if try_block is empty.
11376 Defer freeing exception_decl until after the finalizer, to make
11377 sure the local isn't reused in the finalizer. Fixes PR java/1208.
11379 * parse.y (java_complete_lhs): If the try-clause is empty, just
11380 return the finally-clause and vice versa.
11382 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
11384 * gcj.texi (Input Options): documented the check for attribute
11385 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11386 * java-tree.h (flag_force_classes_archive_check): Declared extern.
11387 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11388 (jcf_parse): Check for the right classes archive if necessary.
11389 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11390 (jcf_parse_fields): Fixed indentation.
11391 * jcf-write.c (append_gcj_attribute): New function.
11392 (generate_classfile): Compute the attribute count, invoke
11393 `append_gcj_attribute'.
11394 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11395 turned into bit-fields. New bit-field `right_zip.'
11396 (JCF_ZERO): Set `right_zip' to zero.
11397 * lang-options.h (-fforce-classes-archive-check): Added flag.
11398 * lang.c (flag_force_classes_archive_check): New flag.
11399 (lang_f_options): New entry `force-classes-archive-check.'
11400 Fixes PR java/1213.
11402 2001-02-07 Andrew Haley <aph@redhat.com>
11404 * gcj.texi (Configure-time Options): Add -fcheck-references.
11405 * expr.c (build_java_indirect_ref): New function.
11406 (java_check_reference): New function.
11407 (build_java_array_length_access): Use build_java_indirect_ref to
11408 check for null references.
11409 (build_java_arrayaccess): Likewise.
11410 (build_get_class): Likewise.
11411 (build_field_ref): Likewise.
11412 (invoke_build_dtable): Likewise.
11413 (build_invokeinterface): Likewise.
11414 * lang.c (lang_f_options): Add flag_check_references.
11415 * jvspec.c (jvgenmain_spec): Add flag_check_references.
11416 * java-tree.h (flag_check_references): New variable.
11417 * lang.c (flag_check_references): Likewise.
11418 * parse.y (patch_invoke): Use java_check_reference.
11419 (patch_assignment): Allow for extra nesting in
11420 _Jv_CheckArrayStore.
11422 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
11424 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11425 * lex.c (cxx_keywords): Likewise.
11427 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11429 * parse.y (qualify_ambiguous_name): Broaden `length'
11430 recognition. Help MODIFY_EXPR be resolved as expression names.
11431 Fixes PR java/2066. Fixes PR java/2400.
11433 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
11435 * gjavah.c (process_file): Mark interface definitions with
11436 "__attribute__ ((java_interface))".
11438 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11440 * class.c (layout_class): Fixed push_super_field's second
11441 argument. Fixes PR java/2333.
11442 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11443 too early to lay innerclasses out.
11445 2001-03-20 Tom Tromey <tromey@redhat.com>
11446 Alexandre Petit-Bianco <apbianco@redhat.com>
11448 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11449 inside an array reference. Insertion of the array store check
11450 rewritten. Fixes PR java/2299.
11452 2001-03-20 Tom Tromey <tromey@redhat.com>
11454 * lex.c (java_read_unicode): Only accept leading `u's.
11456 2001-03-20 Tom Tromey <tromey@redhat.com>
11458 * jcf-parse.c (read_class): Initialize `class'.
11460 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11462 * jcf_parse.c (jcf_parse): Eliminate unused variable.
11464 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11466 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11467 (layout_class): Likewise.
11468 (layout_class_method): Likewise.
11469 (emit_register_classes): Likewise.
11470 * decl.c (builtin_function): Likewise.
11471 (give_name_to_locals): Likewise.
11473 2001-03-19 Per Bothner <per@bothner.com>
11475 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
11476 before trying to load an inner class.
11478 Fixes to process to command-line .class files in two passes.
11479 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
11480 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
11481 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
11482 * class.c (is_compiled_class): Fix for renamed flag.
11483 * parse.y (maybe_create_class_interface_decl): Likewise.
11484 * jcf-parse.c (yyparse): Also set if compiling .class files.
11485 * jcf-parse.c (read_class); Read current_class.
11486 (jcf_parse): Make static.
11487 (load_inner_classes): New function, with code moved from jcf_parse,
11488 because we need to inner classes after the command-line files are read.
11489 (yyparse): Set finput to NULL when it doesn't need to be closed.
11490 Reduce use of main_jcf (basically only for archive) and
11491 use finput instead of main_jcf->read_state.
11492 Inline jcf_figure_file_type into yyparse.
11493 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11494 Defer load_inner_classes and parse_class_file to a second pass,
11495 after we've correctly mapped command-line .clas fiels to classes.
11496 (jcf_figure_file_type): Removed.
11497 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
11498 (JCF_ZERO): Also clear zipd field.
11499 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
11501 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11503 * jcf-parse.c (yyparse): Change ch from char * to char.
11505 2001-03-19 Per Bothner <per@bothner.com>
11507 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
11508 Add constructed filelist-file at end, following -xjava. Thus any .o
11509 and library files are not affected by the -xjava. Also wrap
11510 explicit @FILE with -xjava and -xnone.
11512 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
11514 * class.c (build_static_field_ref): Call make_decl_rtl() after
11515 setting the DECL_EXTERNAL flag.
11517 2001-03-17 Per Bothner <per@bothner.com>
11519 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
11521 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
11522 when result is is needed (target is STACK_TARGET).
11524 * parse.h (JDEP_SOLV): Removed.
11525 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
11527 * parse.y (incomplete_class_list): Removed.
11528 (obtain_incomplete_type): Don't use or set incomplete_class_list.
11529 It doesn't work if resolve_class changes the name of an array type
11530 that is on the list and then someone else looks for the modified name.
11531 Also, seems liable to break when compiling multiple source files at
11532 once. So the simplest is to just remove incomplete_class_list -
11533 it is only a minor space win and it is not even clear it saves time.
11535 * parse.y (resolve_class): Remove unneeded promote_type.
11537 2001-03-15 Per Bothner <per@bothner.com>
11539 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
11540 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
11541 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11542 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11544 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
11545 * parse.y (java_expand_classes): Likewise.
11547 * parse.y (expand_start_java_method): Was only called once and had a
11548 misleading name, so inline in caller java_complete_expand_method.
11549 (enter_a_block): Likewise inline in enter_block and remove.
11551 Remove junk from when gcc/java was created (by copying from C/C++).
11552 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
11553 (struct binding_level): Remove fields keep, keep_if_subblocks,
11554 more_cleanups_ok, have_cleanups (which have never been used).
11555 (pushlevel, poplevel): Remove related useless code.
11557 * class.c (make_class_data): The class_dtable_decl (i.e. the
11558 vtable for Class) should be external, except when compiling Class.
11560 * jvspec.c (lang_specific_driver): Fix -C handling.
11561 Check -save-temps to see if temp @FILE should be deleted.
11562 Follow-up to/fix for February 16 patch.
11564 * verify.c (verify_jvm_instructions): Better error msgs for dup.
11565 (type_stack_dup): Remove no-longer neded error check.
11567 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
11569 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11570 to 'for_pointer'. If this type is for a pointer (argument) mangling,
11571 don't surround the element with 'N..E' if the type name is
11574 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11576 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11577 DECL_RTL_SET_P, etc.
11578 (make_method_value): Likewise.
11579 (get_dispatch_table): Likewise.
11581 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11583 2001-03-07 Tom Tromey <tromey@redhat.com>
11585 * config-lang.in (lang_requires): Define.
11587 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
11589 * typeck.c (convert): Check flag_unsafe_math_optimizations,
11590 not flag_fast_math.
11592 2001-03-05 Per Bothner <per@bothner.com>
11594 Fix a problem where rest_of_decl_compilation applied to
11595 class_dtable_decl causes problems because it was done too early,
11596 before output file was opened.
11597 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
11598 * class.c (class_dtable_decl): Add macro - element of class_roots.
11599 (make_class_data): Define class_dtable_decl.
11600 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
11602 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11604 * java/class.c, java/decl.c, java/java-tree.h: Replace all
11605 uses of 'boolean' with 'bool'.
11607 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11609 * lang-specs.h: Add zero initializer for cpp_spec field to all
11612 2001-02-16 Per Bothner <per@bothner.com>
11614 Handle compiling multiple input files at once, and @FILE syntax.
11615 * gcj.texi: Updated documentation to match.
11616 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
11617 * jcf-parse.c (parse_source_file): Split into ...
11618 (parse_source_file_1): New function - and:
11619 (parse_source_file_2): New function.
11620 (yyparse): On -ffilelist-file, open and scan named file.
11621 On first pass over files, only do parse_source_file_1.
11622 A new second pass calls parse_source_file_2 for each file to compile.
11623 (init_jcf_parse): Call init_src_parse.
11624 * jvspec.c (INDIRECT_FILE_ARG): New flag.
11625 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
11626 as multiple input file combined in one compilation.
11627 * lang-options.h: Add -ffilelist-file
11628 * lang.c (flag_filelist_file): New flag variable.
11629 (lang_f_options): Handle -ffilelist-file.
11630 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11631 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
11632 gclass_list - use global fields of src_parse_roots instead.
11633 * parse.y (src_parse_roots): New array.
11634 (incomplete_class_list, gclass_list): New macros.
11635 (push_parser_context, java_pop_parser_context,
11636 java_parser_context_resume): Don't fiddle with deleted fields.
11637 (various): Use incomplete_class gclass_list and global macros
11638 instead of parse_ctxt fields - the lists are global.
11639 (init_src_parse): New function.
11641 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11643 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11645 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11647 * parse.y (check_inner_class_access): Moved declaration of local
11648 `enclosing_decl_type' to the right location.
11650 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
11652 * parse.y (parser_check_super_interface): Don't call
11653 check_pkg_class_access for an inner interface.
11654 (parser_check_super): Don't call check_pkg_class_access for inner
11656 (do_resolve_class): Simplify enclosing type loop. Don't call
11657 check_pkg_class_access if CL and DECL are not set.
11658 (find_in_imports_on_demand): Set DECL if class_type needed to be
11659 loaded. Don't call check_pkg_class_access for an inner class.
11660 (check_inner_class_access): Rewritten to implement member access
11661 rules as per spec 6.6.1.
11662 (check_pkg_class_access): Handle the empty package correctly.
11663 (in_same_package): New function. Determine if two classes are in the
11666 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
11668 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11669 method into array types.
11670 * parse.y (patch_method_invocation): Bypass access check on clone call
11673 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
11675 * expr.c (build_instanceof): Check for arrays when trying fold to
11678 2001-02-15 Jim Meyering <meyering@lucent.com>
11680 * Make-lang.in (java.install-common): Depend on `installdirs'.
11681 (java.install-info): Likewise.
11683 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
11685 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11687 2001-02-14 Tom Tromey <tromey@redhat.com>
11688 Alexandre Petit-Bianco <apbianco@cygnus.com>
11690 Fix for PR java/1261.
11691 * typeck.c (build_java_array_type): Add public `clone' method to
11693 * parse.y (resolve_qualified_expression_name): Use current_class
11694 when checking for inaccessibility.
11695 (patch_method_invocation): Fixed error message when accessibility
11696 denied. Added `from_super' argument.
11698 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11700 * parse.y (resolve_class): Don't build a fake decl. Use the one
11702 * typeck.c (build_java_array_type): Build and assign decl to array
11705 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11707 * parse.y (not_accessible_p): Changed leading comment. Added extra
11708 `where' argument. Use it to enforce protected access rules.
11709 (resolve_qualified_expression_name): Added extra argument to
11711 (patch_method_invocation): Use argument `primary' to provide
11712 not_accessible_p with an extra argument.
11713 (lookup_method_invoke): Added extra argument to not_accessible_p.
11714 (search_applicable_method_list): Likewise.
11716 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
11718 * parse.y (resolve_qualified_expression_name): Try to resolve as
11719 an inner class access only if `decl' is a TYPE_DECL.
11721 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11723 * decl.c (classdollar_identifier_node): Initialize.
11724 * java-tree.h (enum java_tree_index): New entry
11725 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11726 (classdollar_identifier_node): New macro.
11727 (ID_CLASSDOLLAR_P): Likewise.
11728 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11729 (build_dot_class_method_invocation): Likewise.
11730 (find_applicable_accessible_methods_list): `class$' can't be
11733 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
11735 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11737 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11739 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11740 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11743 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11745 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11746 outside of the `__U' sequence too.
11747 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11750 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11752 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11754 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11756 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11757 (JVGENMAIN_OBJS): Likewise.
11758 * java-tree.h (append_gpp_mangled_name): New prototype.
11759 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11760 Removed cast calling `gcc_add_root.'
11761 * jvgenmain.c (mangle_obstack): New global, initialized.
11763 (do_mangle_class): Constify local `ptr.'
11764 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11765 append_gpp_mangle_name and update `count' if necessary.
11766 Use `mangle_obstack.'
11767 * mangle.c (append_unicode_mangled_name): Removed.
11768 (append_gpp_mangled_name): Likewise.
11769 (unicode_mangling_length): Likewise.
11770 (mangle_member_name): Return type set to `void.'
11771 (mangle_field_decl): Don't append `U' in escaped names.
11772 (mangle_method_decl): Likewise.
11773 (mangle_member_name): Just use `append_gpp_mangled_name.'
11774 * mangle_name.c: New file.
11776 2001-02-07 Per Bothner <per@bothner.com>
11778 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
11780 * check-init.c (check_init): Don't call done_alternative after
11781 processing loop code, as a LOOP_EXPR never terminates normally.
11783 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
11785 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11787 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11789 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11792 2001-02-06 Tom Tromey <tromey@redhat.com>
11794 * lex.c (java_new_lexer): Longer error message.
11796 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
11797 Alexandre Petit-Bianco <apbianco@cygnus.com>
11799 * typeck.c (build_prim_array_type): Added leading comment.
11800 (build_java_array_type): Moved locals out of
11801 block. Always create the `data' field, fixed alignment to match
11804 2001-02-04 Tom Tromey <tromey@redhat.com>
11806 * expr.c (java_lang_expand_expr): Don't bother recomputing
11807 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
11808 Fixes PR java/1866.
11810 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11812 * parse.y (process_imports): Save the original name of the import
11813 for better error report.
11815 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
11817 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11818 of macros used when compiling jvspec.c.
11819 * jvspec.c (lang_specific_driver): Link with the shared
11822 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11824 * check-init.c (check_init): Call internal_error instead of fatal.
11825 * expr.c (java_lang_expand_expr): Likewise.
11826 * jcf-parse.c (get_constant): Likewise.
11827 * mangle.c (java_mangle_decl): Likewise.
11828 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11829 (operator_string): Likewise.
11830 * check-init.c (check_init): Call abort instead of fatal.
11831 * class.c (build_class_ref): Likewise.
11832 * constants.c (write_constant_pool): Likewise.
11833 * decl.c (start_java_method): Likewise.
11834 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11835 (java_stack_dup, encode_newarray_type): Likewise.
11836 (build_java_array_length_access): Likewise.
11837 (build_java_check_indexed_type, expand_java_pushc): Likewise.
11838 (build_java_soft_divmod, build_invokeinterface): Likewise.
11839 * java-tree.h (INNER_CLASS_P): Likewise.
11840 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
11841 (give_name_to_class, get_class_constant): Likewise.
11842 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11843 (find_constant_index, generate_bytecode_conditional): Likewise.
11844 (generate_bytecode_insns, perform_relocations): Likewise.
11845 * lex.c (java_unget_unicode, java_lex): Likewise.
11846 * mangle.c (mangle_type, mangle_record_type): Likewise.
11847 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11848 (finish_mangling): Likewise.
11849 * parse.h (MARK_FINAL_PARMS): Likewise.
11850 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11851 (obtain_incomplete_type, java_complete_class): Likewise.
11852 (java_check_regular_methods, java_complete_expand_method): Likewise.
11853 (cut_identifier_in_qualified, check_deprecation): Likewise.
11854 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11855 (java_complete_lhs, lookup_name_in_blocks): Likewise.
11856 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11857 * typeck.c (set_local_type, parse_signature_type): Likewise.
11858 (parse_signature_string, build_java_signature): Likewise;
11859 (set_java_signature): Likewise.
11860 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11861 * class.c (add_method): Call fatal_error instead of fatal.
11862 (build_static_field_ref): Likewise.
11863 * expr.c (build_known_method_ref, expand_invoke): Likewise.
11864 * jcf-parse.c (get_constant, jcf_parse): Likewise.
11865 * lex.c (java_new_new_lexer): Likewise.
11866 * jv-scan.c (main): Likewise.
11867 (fatal_error): Renamed from fatal.
11868 * jcf-parse.c (yyparse): Call fatal_io_error instead of
11870 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11871 (yyparse): Likewise.
11872 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11873 * lex.c (java_get_line_col): Likewise.
11874 * jcf-parse.c (load_class): Make errors non-fatal.
11875 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
11877 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
11879 * jvgenmain.c (class_mangling_suffix): Remove unused string.
11880 (error): Remove unused function.
11881 (main): Don't use "__attribute__ alias" on generated class symbol.
11883 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11885 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11887 * parse.y (finish_method_declaration): Code accounting for WFLed
11888 method DECL_NAMEs deleted.
11889 (check_abstract_method_definitions): Likewise.
11890 (resolve_type_during_patch): Layout resolved type.
11891 * typeck.c (lookup_do): Removed unused local.
11893 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
11895 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
11896 * decl.c (init_decl_processing): Use integer_minus_one_node, not
11897 integer_negative_one_node.
11898 * expr.c (build_java_binop): Likewise.
11900 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
11902 * zextract.c (read_zip_archive): Read file_offset before writing
11903 zipd and consequently clobbering the header contents.
11905 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11907 * Make-lang.in: Remove all dependencies on defaults.h.
11908 * decl.c: Don't include defaults.h.
11909 * expr.c: Likewise.
11910 * parse.y: Likewise.
11912 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11914 * ChangeLog (2001-01-21): Fixed typo.
11915 * class.c (layout_class_method): Code accounting for WFLed
11916 method DECL_NAMEs deleted.
11917 * constant.c (find_methodref_index): Likewise.
11918 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
11919 * java-tree.h (DECL_FUNCTION_WFL): New macro.
11920 (struct lang_decl): New field `wfl'.
11921 (java_get_real_method_name): Prototype deleted.
11922 * mangle.c (mangle_method_decl): Code accounting for WFLed
11923 method DECL_NAMEs deleted.
11924 * parse.h (GET_METHOD_NAME): Macro deleted.
11925 * parse.y (reset_method_name): Deleted.
11926 (method_header): Set DECL_FUNCTION_WFL.
11927 (check_abstract_method_header): Code accounting for WFLed method
11928 DECL_NAMEs deleted.
11929 (java_get_real_method_name): Deleted.
11930 (check_method_redefinition): Code accounting for WFLed method
11931 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
11932 (java_check_regular_methods): Likewise.
11933 (java_check_abstract_methods): Likewise.
11934 (java_expand_classes): Don't call `reset_method_name.'
11935 (search_applicable_method_list): Use DECL_NAMEs instead of
11937 * typeck.c (lookup_do): Code accounting for WFLed method
11938 DECL_NAMEs deleted.
11940 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
11942 * lex.c (java_read_char): Check for EOF from getc first.
11944 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11946 * class.c (layout_class): Don't lay the superclass out if it's
11947 already being laid out.
11948 * jcf-parse.c (handle_innerclass_attribute): New function.
11949 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
11950 handle_innerclasses_attribute.
11951 (jcf_parse): Don't load an innerclasses if it's already being
11953 * jcf-write.c (append_innerclass_attribute_entry): Static
11954 `anonymous_name' and its initialization deleted. `ocii' and `ini'
11955 to be zero for anonymous classes.
11957 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11959 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
11961 * jcf-parse.c (set_source_filename): Use
11962 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
11964 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11966 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
11967 gets a unique asm name.
11969 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11971 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
11972 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11974 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
11975 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
11976 * parse.y (lookup_package_type_and_set_next): Deleted.
11977 (resolve_package): Removed unnecessary code.
11978 (find_applicable_accessible_methods_list): `finit$' can't be
11980 * verify.c (pop_argument_types): Added missing prototype.
11982 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
11984 * config-lang.in: Disable java by default.
11986 2001-01-23 Tom Tromey <tromey@redhat.com>
11988 * gcj.texi (Copying): New node.
11989 Added copyright information.
11991 2001-01-21 Per Bothner <per@bothner.com>
11993 Various fixes to allow compiling a compressed .jar/.zip archive.
11994 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
11995 (struct ZipFile): Add fields name and next (from ZipFileCache).
11996 (struct ZipDirectory): New field zipf points to owning ZipFile.
11997 * jcf.h (struct ZipDirectory): Add forward declaration.
11998 (struct JCF): Declare zipd field to have type struct ZipDirectory.
11999 Remove seen_in_zip and zip_offset fields.
12000 (JCF_SEEN_IN_ZIP): New macro.
12001 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
12002 * jcf-io.c: Change all ZipFileCache to ZipFile.
12003 (read_zip_member): New function.
12004 (open_in_zip): Call read_zip_member.
12005 * jcf-parse.c (find_in_current_zip): Remove function.
12006 (read_class): Merge in find_in_current_zip functionality.
12007 Call read_zip_member if needed.
12008 (parse_zip_file_entries): Use read_zip_member.
12009 (process_zip_dir): Update for removed and added JCF fields.
12010 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
12012 2001-01-21 Per Bothner <per@bothner.com>
12014 Minor optimization of static ggc roots.
12015 * jcf-parse.c (parse_roots): New static field.
12016 (current_field, current_method, current_file_list): Replace by macros
12017 naming fields of parse_roots.
12018 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
12019 * class.c (class_roots): New static field.
12020 (registered_class, fields_ident, info_ident, class_list):
12021 New macros naming fields of parse_roots.
12022 (build_static_field_ref): Don't register roots here.
12023 (layout_class): Static field list replaced by macro class_list.
12024 (init_class_processing): Call ggc_add_tree_root for 4 roots.
12025 Initialize fields_ident and info_ident here.
12027 2001-01-21 Per Bothner <per@bothner.com>
12029 * jcf-parse.c (ggc_mark_jcf): New function.
12030 (init_jcf_parse): Register current_jcf as ggc root.
12032 2001-01-21 Per Bothner <per@bothner.com>
12034 * lang.c (put_decl_node): Print method's name.
12036 2001-01-21 Per Bothner <per@bothner.com>
12038 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
12039 (verify_jvm_instructions): Use it, for better error messages on loads.
12041 2001-01-21 Per Bothner <per@bothner.com>
12043 * verify.c (merge_type_state): Still may have to merge even if
12044 LABEL_VERIFIED (label).
12046 2001-01-21 Per Bothner <per@bothner.com>
12048 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
12049 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
12051 2001-01-19 Per Bothner <per@bothner.com>
12053 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
12054 if expeting an interface type. Refines Tom's change of 2000-09-12.
12056 2001-01-18 Per Bothner <per@bothner.com>
12058 * gcj.texi (Input Options): Mention .java files.
12060 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12062 * lang-options.h (-Wunsupported-jdk11): Removed.
12063 * lang.c (flag_not_overriding): Deleted.
12064 (flag_static_local_jdk1_1): Likewise.
12065 (lang_W_options): Removed "unsupported-jdk11" entry.
12066 * parse.y (java_check_methods): Removed dead code.
12068 2001-01-17 Tom Tromey <tromey@redhat.com>
12070 Changes suggested by Per Bothner:
12071 * gcj.texi (Input Options): Don't mention input files.
12072 (Code Generation): Updated --main information.
12073 (Invoking jcf-dump): Mention that --javap is incomplete.
12074 From Alexandre Petit-Bianco:
12075 (Warnings): Don't mention -Wunsupported-jdk11.
12077 (Compatibility): Mention JDK 1.2-ness of libraries.
12078 (Resources): Mention resources used when writing gcj.
12080 2001-01-17 Tom Tromey <tromey@redhat.com>
12082 * gcj.texi: New file.
12083 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
12084 (java.info): Depend on gcj.info.
12085 (java/gcj.dvi): New target.
12086 (java.dvi): Depend on gcj.dvi.
12087 (java.install-info): Wrote.
12089 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
12091 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
12092 having called make_decl_rtl.
12094 2001-01-14 Per Bothner <per@bothner.com>
12096 Various patches to emit better messages on verification errors.
12097 * expr.c (push_type_0): Return error indication on stack overflow,
12098 instead of callinfg fatal.
12099 (push_type): Now just call push_type_0 (nd fatal on overflow).
12100 (pop_type_0): Return detailed error message (in a char** argument).
12101 (pop_type): If pop_type_0 fails, print error message.
12102 (pop_argument_types): Moved to verify.c.
12103 * verify.c (pop_argument_types): Moved from expr.c.
12104 Return a (possible) error message, rather than void.
12105 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
12106 (verify_jvm_instruction): Use new macros, improving error messages.
12107 For case OPCODE_astore use object_ptr_type_node.
12108 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
12109 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
12111 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
12112 constant, return body without wrapper. (Improves constant folding.)
12113 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
12115 2001-01-13 Per Bothner <per@bothner.com>
12117 * expr.c (expand_java_field_op): Assigning to a final field outside
12118 an initializer does not violate JVM spec, so should be warning, not
12119 error. (Sun's verifier does not complain - though MicroSoft's does.)
12121 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
12123 * gjavah.c (version), jcf-dump.c (version): Update copyright year
12126 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
12128 * parse.y (resolve_expression_name): Permit instance variables from
12129 enclosing context in super constructor call.
12130 (resolve_qualified_expression_name): Permit enclosing class's qualified
12131 "this" in super constructor call.
12133 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12135 * class.c (build_utf8_ref): Remove last argument in call to
12136 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12137 (build_class_ref): Likewise.
12138 (build_static_field_ref): Likewise.
12139 (get_dispatch_table): Likewise.
12140 (layout_class_method): Likewise.
12141 (emit_register_classes): Likewise.
12142 * constants.c (build_constant_data_ref): Likewise.
12143 * decl.c (builtin_function): Likewise.
12144 (create_primitive_vtable): Likewise.
12145 * expr.c (build_known_method_def): Likewise.
12146 (build_jni_stub): Likewise.
12147 (java_lang_expand_expr): Likewise.
12149 2001-01-10 Tom Tromey <tromey@redhat.com>
12151 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
12153 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12155 * java-tree.h (lang_printable_name_wls): New prototype.
12156 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
12157 rather than `current_class' to print type name. Don't prepend type
12158 names when printing constructor names.
12159 (lang_printable_name_wls): New function.
12160 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
12161 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
12162 * parse.y (patch_method_invocation): Message tuned for constructors.
12163 (not_accessible_p): Grant `private' access from within
12164 enclosing contexts.
12166 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12168 All files with updated copyright when applicable.
12169 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
12170 * class.c (mangle_class_field): Function removed.
12171 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
12172 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
12173 (build_class_ref): Call `java_mangle_class_field' instead of
12174 `mangle_class_field.'
12175 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
12176 (layout_class): Call `java_mangle_decl' instead of
12177 `mangle_static_field.'
12178 (cxx_keywords): Initialized static array moved to `lex.c.'
12179 (layout_class_method): Changed leading comment. Simplified to
12180 call `java_mangle_decl.' Local `ptr' moved in for loop body.
12181 * decl.c (lang_mark_tree): Mark field `package_list.'
12182 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
12183 (struct lang_type): New field `package_list.'
12184 (unicode_mangling_length): Prototype removed.
12185 (append_gpp_mangled_name, append_gpp_mangled_classtype,
12186 emit_unicode_mangled_name): Likewise.
12187 (cxx_keyword_p): New prototype.
12188 (java_mangle_decl, java_mangle_class_field,
12189 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
12190 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
12192 * jvgenmain.c (main_method_prefix): Global variable removed.
12193 (main_method_suffix): Likewise.
12194 (do_mangle_classname): New function.
12195 (main): Call it. Format changed to accommodate new mangling scheme.
12196 * lex.c: (utf8_cmp): Conditionally prototyped.
12197 (cxx_keywords): Moved from class.c, conditionally defined.
12198 (utf8_cmp, cxx_keyword_p): Likewise.
12199 * mangle.c (obstack.h, ggc.h): Included.
12200 (mangle_field_decl): New function.
12201 (mangle_method_decl, mangle_type, mangle_pointer_type,
12202 mangle_array_type, mangle_record_type,
12203 find_compression_pointer_match, find_compression_array_match,
12204 find_compression_record_match,
12205 find_compression_array_template_match, set_type_package_list,
12206 entry_match_pointer_p, emit_compression_string, init_mangling,
12207 finish_mangling, compression_table_add, mangle_member_name): Likewise.
12208 (mangle_obstack): New global.
12209 (MANGLE_RAW_STRING): New macro.
12210 (unicode_mangling_length): Turned static.
12211 (append_unicode_mangled_name): Renamed from
12212 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
12213 replaces `obstack', removed from the parameter list.
12214 (append_gpp_mangled_name): Turned static. `mangle_obstack'
12215 replaces parameter `obstack', removed from the parameter list. Call
12216 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
12217 (append_gpp_mangled_classtype): Removed.
12218 (compression_table, compression_next): New static variables.
12219 * parse.y (temporary_obstack): Extern declaration removed.
12221 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12223 * parse.y (patch_binop): Compute missing type in error situations.
12225 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12227 * class.c (make_class_data): Push initial value for "arrayclass".
12228 * decl.c (init_decl_processing): Add new class field "arrayclass".
12230 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12232 From patha@softlab.ericsson.se:
12233 * parse.y (switch_label): Use build, not build1, to construct
12236 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
12238 * lang.c (lang_decode_option): Change -MA to -MP.
12239 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
12240 Update to new prototype; do quote targets.
12241 (jcf_dependency_write): Update.
12243 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
12245 Shorten primitive array allocation path:
12246 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
12247 to create new primitive arrays.
12248 * expr.c (build_newarray): If generating native code, call
12249 soft_newarray_node with a reference to the primitive TYPE identifier
12250 instead of type_value.
12252 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
12254 Fix for PRs gcj/312 and gcj/253:
12255 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
12256 dest if they arn't already.
12257 * class.c (layout_class): Call maybe_layout_super_class on
12258 superinterfaces also, but only if compiling from bytecode.
12260 Fix for PR gcj/373:
12261 * parse.y (create_class): Set ACC_STATIC if class is declared in an
12264 2000-12-15 Tom Tromey <tromey@redhat.com>
12266 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
12269 2000-12-14 Andrew Haley <aph@redhat.com>
12271 * boehm.c (mark_reference_fields): Change test to correctly detect
12274 2000-12-15 Andreas Jaeger <aj@suse.de>
12276 * config-lang.in (lang_dirs): Added.
12278 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12280 * parse.y (end_artificial_method_body): Fixed undefined behavior.
12281 Credits go to rth for finding it.
12283 2000-12-13 Mike Stump <mrs@wrs.com>
12285 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12287 2000-11-07 Tom Tromey <tromey@cygnus.com>
12289 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12290 * lex.c (java_ignorable_control_p): Removed.
12291 (java_letter_or_digit_p): Removed.
12292 (java_start_char_p): New function.
12293 (java_read_char): Return `int', not `unicode_t'. Changed
12295 (java_read_unicode): Likewise.
12296 (java_read_unicode_collapsing_terminators): Likewise.
12297 (java_get_unicode): Likewise.
12298 (java_new_lexer): Initialize hit_eof.
12299 (java_parse_end_comment): Take `int' argument.
12300 (java_parse_doc_section): Likewise.
12301 (java_parse_escape_sequence): Don't allow backlash-newline.
12303 * lex.h (JAVA_DIGIT_P): Removed.
12304 (_JAVA_LETTER_OR_DIGIT_P): Removed.
12305 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12306 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12307 (JAVA_PART_CHAR_P): New macro.
12309 (JAVA_CHAR_ERROR): Now -2.
12310 (java_lexer): New field `hit_eof'.
12311 * chartables.h: New file.
12312 * gen-table.pl: new file.
12314 2000-11-20 Tom Tromey <tromey@cygnus.com>
12315 Alexandre Petit-Bianco <apbianco@cygnus.com>
12317 * parse.y (java_complete_lhs): Only allow compound assignment of
12318 reference type if type is String.
12320 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12322 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12323 jcf-path.c: Likewise.
12325 2000-12-09 Anthony Green <green@redhat.com>
12327 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12328 filestart and filename_length as int values.
12330 2000-12-07 Mo DeJong <mdejong@redhat.com>
12332 * jcf-io.c (find_class): Correct the logic that tests to see if a
12333 .java file is newer than its .class file. The compiler was
12334 incorrectly printing a warning when file mod times were equal.
12336 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
12338 * jvgenmain.c: Use ISPRINT not isascii.
12340 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12342 * parse.y (end_artificial_method_body): Fixed typo.
12344 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
12346 * parse.y (patch_method_invocation): Pick the correct enclosing
12347 context when creating inner class instances.
12350 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
12352 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12353 Update copyright year to 2000.
12355 2000-11-23 Anthony Green <green@redhat.com>
12357 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12358 Move current_file_list out of yyparse and make it static.
12360 * expr.c: Declare quick_stack and tree_list_free_list as static
12361 (init_expr_processing): Register quick_stack and
12362 tree_list_free_list roots.
12364 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12366 * parse.y (build_outer_field_access): New local `decl_ctx', use
12367 it. Check for field's context and current class immediate outer
12368 context inheritance.
12369 (outer_field_access_p): Consider fields inherited from the last
12371 (build_access_to_thisn): Stop at the last enclosing context if
12375 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
12377 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12379 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
12381 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12384 2000-11-20 Tom Tromey <tromey@cygnus.com>
12386 * jv-scan.c (help): Document --complexity.
12387 (options): Added --complexity.
12388 (flag_complexity): New global.
12389 (main): Call `report'.
12390 * parse-scan.y (complexity): New global.
12391 (if_then_statement, if_then_else_statement,
12392 if_then_else_statement_nsi, switch_block_statement_group,
12393 while_expression, do_statement, for_begin, continue_statement,
12394 throw_statement, catch_clause, finally, method_invocation,
12395 conditional_and_expression, conditional_or_expression,
12396 conditional_expression): Update complexity.
12397 (reset_report): Reset complexity.
12398 (report): New function.
12400 2000-11-20 Tom Tromey <tromey@cygnus.com>
12402 * lex.c (yylex): Added STRICT_TK case.
12403 * parse.y (STRICT_TK): Added.
12404 * parse-scan.y (STRICT_TK): Added.
12405 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12406 `;'. Use 4, not 3, with -k option. Correctly rename resulting
12408 * keyword.h: Rebuilt.
12409 * keyword.gperf (strictfp): Added.
12411 2000-11-20 Tom Tromey <tromey@cygnus.com>
12413 * lex.c (yylex): Recognize floating point constants with leading
12416 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12418 * java-tree.h (cyclic_inheritance_report): Constify.
12419 * parse.y (cyclic_inheritance_report): Likewise.
12421 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
12423 * parse.y (goal): Remove call to ggc_add_string_root.
12425 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
12427 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12428 Create string in scratch buffer, then pass to build_string.
12430 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
12432 * parse.y (issue_warning_error_from_context): Add
12435 2000-11-11 Anthony Green <green@redhat.com>
12437 * jcf-parse.c (process_zip_dir): Add finput parameter.
12438 (jcf_figure_file_type): Call process_zip_dir with appropriate
12441 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12443 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12444 * jcf-parse.c (jcf_figure_file_type): Likewise.
12446 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
12448 * parse.y (create_new_parser_context): Use memset () instead of
12451 2000-11-08 Tom Tromey <tromey@cygnus.com>
12453 * gjavah.c (process_file): Only include gcj/cni.h when generating
12456 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
12458 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12459 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12460 instead of bzero ().
12462 2000-11-05 Tom Tromey <tromey@cygnus.com>
12464 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12465 * lex.c (IS_ZERO): New define.
12466 (java_perform_atof): Error on floating point underflow.
12468 2000-11-04 Tom Tromey <tromey@cygnus.com>
12470 * lex.c (java_parse_escape_sequence): Only read two octal
12471 characters if the first one is greater than 3. Don't allow
12472 "octal" numbers to include the digits 8 or 9.
12474 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
12476 * Make-lang.in (java.distdir): Remove.
12478 2000-11-03 Tom Tromey <tromey@cygnus.com>
12480 * Make-lang.in (java.dvi): New target.
12481 Partial fix for PR other/567.
12483 * lang-options.h: Mention -Wout-of-date.
12484 * jcf-dump.c (flag_newer): New global.
12485 * gjavah.c (flag_newer): New global.
12486 * jcf-io.c (find_class): Only warn when flag_newer set.
12487 * lang.c (flag_newer): New global.
12488 (struct string_option): New declaration.
12489 (lang_W_options): New global.
12490 (process_option_with_no): New function.
12491 (lang_decode_option): Use it.
12493 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12494 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12497 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12498 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12499 * lex.c (java_read_unicode): Removed `term_context' argument.
12500 Recognize any number of `u' in `\u'.
12501 (java_read_unicode_collapsing_terminators): New function.
12502 (java_get_unicode): Use it.
12503 (java_lineterminator): Removed.
12504 (yylex): Produce error if character literal is newline or single
12505 quote. Return if eof found in middle of `//' comment. EOF in
12506 `//' comment is only an error if pedantic.
12507 (java_ignorable_control_p): New function.
12508 (java_parse_end_comment): Return if eof found in middle of
12511 * jv-scan.c (pedantic): New global.
12513 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12515 * parse.y (outer_field_access_p): Inherited fields aren't
12516 consider outer fields.
12517 (maybe_build_thisn_access_method): Use
12518 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12519 (resolve_expression_name): Trigger an error if a static field
12520 is being accessed as an outer field.
12522 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12524 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12527 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12529 * Make-lang.in: Move all build rules here from Makefile.in,
12530 adapt to new context. Wrap all rules that change the current
12531 directory in parentheses. Expunge all references to $(P).
12532 When one command depends on another and they're run all at
12533 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12534 all object-file generation rules. Delete obsolete variables.
12536 * Makefile.in: Delete.
12537 * config-lang.in: Delete outputs= line.
12539 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12541 * parse.y (patch_method_invocation): NULLify this_arg when already
12543 (maybe_use_access_method): Handle call to methods unrelated to the
12544 current class. Fixed comment.
12547 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12549 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12552 2000-10-24 Tom Tromey <tromey@cygnus.com>
12554 * lex.c (java_new_lexer): Initialize new fields. Work around
12555 broken iconv() implementations.
12556 (java_read_char): Swap bytes if required. Use fallback decoder if
12558 (byteswap_init, need_byteswap): New globals.
12559 (java_destroy_lexer): Only close iconv handle if it is in use.
12560 * lex.h (java_lexer): New fields read_anything, byte_swap,
12562 Made out_buffer unsigned.
12564 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12566 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12567 where an enclosing context can be set on the jdep.
12568 (do_resolve_class): Fixed identation.
12570 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12572 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12574 * jcf-reader.c (peek_attribute, skip_attribute): Only define
12577 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12579 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12581 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12583 * jcf-write.c (OP1): Update `last_bc'.
12584 (struct jcf_block): Fixed indentation and typo in comments. New
12586 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12587 follows `monitorenter'.
12588 * parse.y (patch_synchronized_statement): New local `tmp'. Call
12592 2000-10-16 Tom Tromey <tromey@cygnus.com>
12594 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12595 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12596 * lang-options.h: Added -MA, -MT, -MF..
12597 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12598 (DEPEND_TARGET_SET): New macro.
12599 (DEPEND_FILE_ALREADY_SET): Likewise.
12600 (init_parse): Handle new flags.
12601 * jcf.h (jcf_dependency_print_dummies): Declare.
12602 * Make-lang.in (s-java): Added mkdeps.o.
12603 * Makefile.in (BACKEND): Added mkdeps.o.
12604 (../gcjh$(exeext)): Added mkdeps.o.
12605 (../jcf-dump$(exeext)): Added mkdeps.o.
12606 * jcf-depend.c: Include mkdeps.h.
12607 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12608 add_entry): Removed.
12609 (jcf_dependency_reset): Rewrote.
12610 (dependencies): New global.
12611 (jcf_dependency_set_target): Rewrote.
12612 (jcf_dependency_add_target): Likewise.
12613 (jcf_dependency_add_file): Likewise.
12615 (print_ents): Removed.
12616 (jcf_dependency_write): Rewrote.
12617 (print_dummies): New global.
12618 (jcf_dependency_print_dummies): New function
12619 (jcf_dependency_write): Call deps_dummy_targets if required.
12621 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12623 * gjavah.c (add_class_decl): Removed unused variables `tname',
12624 `tlen' and `name_index'.
12625 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12626 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12627 in `wfl_operator' with value.
12628 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12629 (jcf_figure_file_type): Fixed identation.
12630 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12631 * parse.y (analyze_clinit_body): New function.
12632 (static_initializer:): Reset `current_static_block'.
12633 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12634 `wfl_operator' with new value.
12635 (lookup_cl): Use EXPR_WFL_FILENAME.
12636 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12637 analyze_clinit_body.
12638 (build_outer_field_access): Access to this$<n> built from
12639 current_class, not its outer context.
12640 (build_access_to_thisn): Fixed leading comment. Tidied things up.
12641 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12642 (patch_method_invocation): Use `is_static_flag' when already
12644 (patch_newarray): Removed assignment in ternary operator.
12646 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12648 * except.c (free_eh_ranges): Don't free `whole_range'.
12650 2000-10-15 Anthony Green <green@redhat.com>
12652 * decl.c (init_decl_processing): Call init_class_processing before
12655 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12657 * check-init.c (check_init): Fixed leading comment. Use
12659 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12660 (give_name_to_locals): Likewise.
12661 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12662 fields in lang_decl_var.
12663 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12664 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12665 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12666 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12667 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12668 (LOCAL_FINAL): Rewritten.
12669 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12670 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12671 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12672 `init_final' fields.
12673 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12674 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12675 (TYPE_HAS_FINAL_VARIABLE): New macro.
12676 (struct lang_type): Added `afv' field.
12677 * parse.y (check_static_final_variable_assignment_flag): New function.
12678 (reset_static_final_variable_assignment_flag): Likewise.
12679 (check_final_variable_local_assignment_flag): Likewise.
12680 (reset_final_variable_local_assignment_flag): Likewise.
12681 (check_final_variable_indirect_assignment): Likewise.
12682 (check_final_variable_global_assignment_flag): Likewise.
12683 (add_inner_class_fields): Use LOCAL_FINAL_P.
12684 (register_fields): Handle local finals and final variables.
12685 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12686 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12687 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12689 (java_complete_expand_methods): Loop to set
12690 TYPE_HAS_FINAL_VARIABLE. Call
12691 `reset_final_variable_local_assignment_flag' and
12692 `check_final_variable_local_assignment_flag' accordingly before
12693 and after constructor expansion. Call
12694 `reset_static_final_variable_assignment_flag'
12695 before expanding <clinit> and after call
12696 `check_static_final_variable_assignment_flag' if the
12697 current_class isn't an interface. After all methods have been
12698 expanded, call `check_final_variable_global_assignment_flag' and
12699 `check_static_final_variable_assignment_flag' if the current class
12701 (maybe_yank_clinit): Fixed typo in comment.
12702 (build_outer_field_access_methods): Removed old sanity check. Use
12703 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12704 Don't create access methods for finals.
12705 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12706 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12707 existing DECL_INIT has been processed.
12708 (java_complete_lhs): Likewise.
12709 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12710 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12712 (patch_assignment): Use LOCAL_FINAL_P.
12713 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12714 DECL_INITIAL is nullified.
12717 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12719 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12721 * Makefile.in (parse.c, parse-scan.c): Likewise.
12723 2000-10-12 Mark Mitchell <mark@codesourcery.com>
12725 * class.c (temporary_obstack): Remove.
12726 (make_class): Don't mess with obstascks.
12727 (push_class): Likewise.
12728 (set_super_info): Likewise.
12729 (add_method_1): Likewise.
12730 (add_method): Likewise.
12731 (add_field): Likewise.
12732 (build_utf8_ref): Likewise.
12733 (build_class_ref): Likewise.
12734 (build_static_field_ref): Likewise.
12735 (finish_class): Likewise.
12736 (push_super_field): Likewise.
12737 (layout_class): Likewise.
12738 (layout_class_methods): Likewise.
12739 (init_class_processing): Likewise.
12740 * constants.c (get_tag_node): Likewise.
12741 (build_constant_data_ref): Likewise.
12742 * decl.c (ggc_p): Remove.
12743 (copy_lang_decl): Use ggc_alloc.
12744 (complete_start_java_method): Don't mess with obstacks.
12745 (start_java_method): Likewise.
12746 (end_java_method): Likewise.
12747 * except.c (link_handler): Use xmalloc.
12748 (free_eh_ranges): New function.
12749 (method_init_exceptions): Use it.
12750 (add_handler): Use xmalloc.
12751 (expand_start_java_handler): Don't mess with obstacks.
12752 (prepare_eh_table_type): Likewise.
12753 (expand_end_java_handler): Likewise.
12754 * expr.c (push_value): Likewise.
12755 (create_label_decl): Likewise.
12756 (build_jni_stub): Likewise.
12757 (java_lang_expand_expr): Likewise.
12758 (note_instructions): Use xrealloc.
12759 (java_push_constant_from_pool): Don't mess with obstacks.
12760 (process_jvm_instruction): Likewise.
12761 * java-tree.h (cyclic_inheritance_report): Remove duplicate
12763 * jcf-parse.c (get_constant): Don't mess with obstacks.
12764 (read_class): Likewise.
12765 (jcf_parse): Likewise.
12766 * lex.c (expression_obstack): Remove.
12767 (java_lex): Don't use obstack_free.
12768 * parse.h (exit_java_complete_class): Don't mess with obstacks.
12769 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12770 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12771 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12772 * parse.y (gaol): Add more GC roots.
12773 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12774 (lookup_field_wrapper): Likewise.
12775 (obtain_incomplete_type): Don't mess with obstacks.
12776 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
12778 (craft_constructor): Don't mess with obstacks.
12779 (safe_layout_class): Likewise.
12780 (java_complete_class): Likewise.
12781 (source_end_java_method): Likewise.
12782 (build_outer_field_access_methods): Likewise.
12783 (build_outer_method_access_method): Likewise.
12784 (maybe_build_thisn_access_method): Likewise.
12785 (build_dot_class_method_invocation): Likewise.
12786 (java_complete_tree): Likewise.
12787 (java_complete_lhs): Likewise.
12788 (do_merge_string_cste): Likewise.
12789 (patch_string_cst): Likewise.
12790 (array_constructor_check_entry): Likewise.
12791 * typeck.c (build_java_array_type): Likewise.
12792 (parse_signature_string): Likewise.
12793 (build_java_signature): Likewise.
12795 2000-10-12 Tom Tromey <tromey@cygnus.com>
12797 Fix for PR gcj/356:
12798 * gjavah.c (add_class_decl): Don't special-case inner classes.
12799 (add_namelet): Likewise.
12801 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
12803 * java-tree.h: Constify current_encoding.
12804 * lang.c: Constify current_encoding.
12806 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
12808 * jvgenmain.c (class_mangling_suffix): Omit `.'.
12809 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12811 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12813 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12814 patch. Fixes gcj/340.
12816 2000-10-10 Tom Tromey <tromey@cygnus.com>
12818 * lex.c (java_new_lexer): Initialize out_first and out_last
12820 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12822 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12824 * parse.y (pop_current_osb): New function.
12825 (array_type:): Use `dims:', changed actions
12826 accordingly. Suggested by Anthony Green.
12827 (array_creation_expression:): Used pop_current_osb.
12828 (cast_expression:): Likewise.
12829 (search_applicable_method_list): Fixed indentation.
12831 2000-10-08 Anthony Green <green@redhat.com>
12833 * parse.y (array_type_literal): Remove production.
12834 (type_literals): Refer to array_type, not array_type_literal.
12836 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12838 Patch contributed by Corey Minyard.
12839 * decl.c (check_local_named_variable): New function.
12840 (tree check_local_unnamed_variable): Likewise.
12841 (find_local_variable): Splitted. Call check_local_{un}named_variable.
12843 2000-10-07 Anthony Green <green@redhat.com>
12845 * class.c (layout_class): Handle case where superclass can't be
12848 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
12850 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12853 2000-10-05 Tom Tromey <tromey@cygnus.com>
12855 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12856 * jvgenmain.c (class_mangling_prefix): Removed.
12857 (class_mangling_suffix): New global.
12859 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12861 (print_method_info): Handle overrides for static and final
12863 (process_file): Generate declaration for class object field.
12864 * class.c (cxx_keywords): New array.
12865 (utf8_cmp): New function.
12866 (cxx_keyword_p): New function.
12867 (layout_class_method): Mangle C++ keywords by appending `$'.
12868 (mangle_field): New function.
12869 (mangle_class_field): Use mangle_field. Mangle class name as
12871 (mangle_static_field): Use mangle_field.
12873 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12875 * decl.c (find_local_variable): Removed uncessary type check and
12876 fixed range check typo. From Corey Minyard.
12878 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12880 * decl.c (give_name_to_locals): New local `code_offset'. Call
12881 `maybe_adjust_start_pc'.
12882 * expr.c (note_instructions): New function.
12883 (expand_byte_code): Don't collect insn starts here.
12884 (peek_opcode_at_pc): New function.
12885 (maybe_adjust_start_pc): Likewise.
12886 * java-tree.h (maybe_adjust_start_pc): Declare.
12887 (note_instructions): Likewise.
12888 * jcf-parse.c (parse_class_file): Call `note_instructions'.
12890 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12892 * parse.y (field_access:): Fixed indentation.
12893 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
12895 2000-09-07 Tom Tromey <tromey@cygnus.com>
12897 Fix for PR gcj/307:
12898 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
12899 JPRIMITIVE_TYPE_P, for arithmetic operators.
12900 (patch_method_invocation): Indentation fix.
12901 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
12902 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
12903 (do_unary_numeric_promotion): Cleaned up code.
12904 (valid_cast_to_p): Handle boolean correctly.
12906 2000-09-27 Tom Tromey <tromey@cygnus.com>
12908 * lex.c (java_read_unicode): Reset bs_count when finished with
12911 2000-10-01 Mark Mitchell <mark@codesourcery.com>
12914 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
12915 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
12916 (typeck.o): Depend on ggc.h.
12917 * class.c (add_method_1): Use GC functions for allocation.
12918 (init_class_processing): Register roots.
12919 * decl.c (ggc_p): Set to 1.
12920 (pending_local_decls): Make it static.
12921 (push_jvm_slot): Use GC functions for allocation.
12922 (init_decl_processing): Register roots.
12923 (give_name_to_locals): Use GC functions for allocation.
12924 (lang_mark_tree): New function.
12925 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
12926 functions for allocation.
12927 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
12928 * lex.c (java_lex): Use build_string, rather than replicating it
12930 * parse.y (goal): Add more roots.
12931 (mark_parser_ctxt): New function.
12932 * typeck.c: Include ggc.h.
12934 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12936 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
12937 contains something else than MODIFY_EXPR.
12939 2000-09-23 Mark Mitchell <mark@codesourcery.com>
12941 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
12942 * Makefile.in (parse.o): Depend on ggc.h.
12943 (class.o): Likewise.
12944 (constants.o): Likewise.
12945 (decl.o): Likewise.
12946 (expr.o): Likewise.
12947 (jcf-parse.o): Likewise.
12948 (jcf-write.o): Likewise.
12949 (mangle.o): Likewise.
12950 * class.c: Include ggc.h.
12951 (build_static_field_ref): Register GC roots.
12952 (layout_class): Likewise.
12953 (init_class_processing): Likewise.
12954 * constants.c: Include ggc.h.
12955 (current_constant_pool_data_ref): Remove.
12956 (tag_nodes): Move it to ...
12957 (get_tag_node): ... here. Register GC roots.
12958 * decl.c: Include ggc.h. Remove many global tree definitions.
12959 (throw_node): Define.
12960 (java_global_trees): Likewise.
12961 (predef_filenames): Make the size a constant.
12962 (init_decl_processing): Adjust accordingly.
12963 (init_decl_processing): Call init_jcf_parse. Register GC roots.
12964 * expr.c: Include ggc.h.
12965 (init_expr_processing): Register GC roots.
12966 (build_invokeinterface): Likewise.
12967 * java-tree.h: Replace extern tree declarations with macros.
12968 (java_global_trees): New variable.
12969 (java_tree_index): New enumeration.
12970 (init_jcf_parse): Declare.
12971 * jcf-parse.c: Include ggc.h.
12972 (current_class): Remove declaration.
12973 (main_class): Likewise.
12974 (all_class_list): Likewise.
12975 (predefined_filename_p): Adjust for constant size of
12977 (init_jcf_parse): New function.
12978 * jcf-write.c: Include ggc.h.
12979 (generate_classfile): Register GC roots.
12980 (append_synthetic_attribute): Likewise.
12981 (append_innerclass_attribute_entry): Likewise.
12982 * lang.c: Include ggc.h.
12983 (lang_print_error): Register GC roots.
12984 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
12986 * parse.y: Include ggc.h.
12987 (wfl_operator): Remove.
12988 (goal): Register GC roots.
12989 (java_pop_parser_context): Adjust for new field names.
12990 (java_parser_context_save_global): Likewse.
12991 (java_parser_context_restore_global): Likewise.
12992 (java_parser_context_suspend): Likewise.
12993 (java_parser_context_resume): Likewise.
12994 (verify_constructor_circularity): Register GC roots.
12995 (lookup_cl): Likewise.
12996 (java_reorder_fields): Likewise.
12997 (build_current_this): Likewise.
12998 (class_in_current_package): Likewise.
12999 (argument_types_convertible): Likewise.
13000 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
13002 2000-09-14 Tom Tromey <tromey@cygnus.com>
13004 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
13006 2000-09-13 Tom Tromey <tromey@cygnus.com>
13008 * jcf-parse.c: Include <locale.h>.
13009 * jv-scan.c: Include <locale.h>.
13011 2000-09-12 Tom Tromey <tromey@cygnus.com>
13013 * expr.c (pop_type_0): Return `Object' if trying to merge two
13015 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
13016 interface types; `Object' is always a valid supertype.
13018 2000-09-12 Tom Tromey <tromey@cygnus.com>
13021 * jv-scan.c (help): Document --encoding.
13022 (options): Added `encoding' entry.
13023 (OPT_ENCODING): New define.
13024 (main): Handle --encoding.
13025 Include <langinfo.h> if nl_langinfo exists.
13026 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
13028 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
13029 (parse_source_file): Correctly call java_init_lex. Added `finput'
13030 argument. Use nl_langinfo to determine default encoding.
13031 * java-tree.h (current_encoding): Declare.
13032 * parse.y (java_parser_context_restore_global): Don't restore
13034 (java_parser_context_save_global): Don't set `finput' field.
13035 (java_pop_parser_context): Don't restore `finput'. Free old lexer
13037 * lang.c (current_encoding): New global.
13038 (lang_decode_option): Recognize `-fencoding='.
13039 (finish_parse): Don't close finput.
13040 * parse.h (struct parser_ctxt): Removed `finput' and
13041 `unget_utf8_value' fields. Added `lexer' field.
13042 (java_init_lex): Fixed declaration.
13043 * lex.c (java_new_lexer): New function.
13044 (java_destroy_lexer): Likewise.
13045 (java_read_char): Added `lex' argument. Handle iconv case.
13046 (java_read_unicode): Added `lex' argument. Count backslashes in
13048 (java_init_lex): Added `finput' and `encoding' arguments. Set
13049 `lexer' field in ctxp.
13050 (BAD_UTF8_VALUE): Removed.
13051 (java_lex): Handle seeing UEOF in the middle of a string literal.
13052 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
13053 (java_lexer): New structure.
13056 (DEFAULT_ENCODING): New define.
13057 (java_destroy_lexer): Declare.
13059 2000-09-12 Tom Tromey <tromey@cygnus.com>
13061 Fix for PR gcj/343:
13062 * lex.c (java_init_lex): Initialize java_io_serializable.
13063 * parse.y (java_io_serializable): New global.
13064 (valid_ref_assignconv_cast_p): An array can be cast to
13067 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
13069 * decl.c, expr.c: Include defaults.h if not already included.
13070 Don't define the *_TYPE_SIZE macros.
13072 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
13074 * typeck.c (build_java_array_type): Correct first parameter
13075 in ADJUST_FIELD_ALIGN invocation.
13077 2000-09-06 Tom Tromey <tromey@cygnus.com>
13079 * lang-specs.h: Also recognize `-femit-class-files'.
13081 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13083 * verify.c (merge_types): Load the types to merge if necessary.
13085 2000-09-02 Anthony Green <green@redhat.com>
13087 * jcf-io.c: Include zlib.h.
13088 (open_in_zip): Read compressed class file archives.
13089 * zipfile.h (ZipDirectory): Add uncompressed_size and
13090 compression_method fields.
13091 * zextract.c (read_zip_archive): Collect file compression info.
13093 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
13095 * parse.y (do_resolve_class): Also explore superclasses of
13096 intermediate enclosing contexts when searching for inner classes.
13098 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13100 * parse.y (variable_declarator_id:): Better error message.
13101 (expression_statement:): Use YYNOT_TWICE.
13102 (cast_expression:): Likewise.
13103 (assignment:): Likewise.
13105 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13107 * parse.y (do_merge_string_cste): New locals. Create new
13108 STRING_CSTs each time, use memcpy. Fixes gcj/311.
13110 2000-08-07 Hans Boehm <boehm@acm.org>
13112 * boehm.c (mark_reference_fields): Set marking bits for all words in
13113 a multiple-word record.
13114 (get_boehm_type_descriptor): Use the procedure marking descriptor for
13117 2000-08-31 Mike Stump <mrs@wrs.com>
13119 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
13120 jcf-dump$(exeext)): Make parallel safe.
13122 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
13124 * jcf-parse.c (set_source_filename): Constify a char *.
13125 * jcf-write.c (append_innerclasses_attribute,
13126 make_class_file_name): Constify a char *. Don't recycle a
13127 variable for an unrelated purpose.
13128 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
13129 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
13131 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13133 * expr.c (can_widen_reference_to): Fixed indentation.
13134 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
13135 * parse.y: `finit$' replaces `$finit$' in comments.
13136 (try_builtin_assignconv): Fixed leading comment.
13138 2000-08-25 Greg McGary <greg@mcgary.org>
13140 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
13142 2000-08-24 Greg McGary <greg@mcgary.org>
13144 * lang.c (lang_decode_option): Use ARRAY_SIZE.
13145 * parse.y (BINOP_LOOKUP): Likewise.
13147 2000-08-22 Andrew Haley <aph@cygnus.com>
13149 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
13150 sign extending. Fixes gcj/321.
13151 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
13152 combining to make a jlong. Fixes gcj/321.
13154 2000-08-21 Nix <nix@esperi.demon.co.uk>
13156 * lang-specs.h: Do not process -o or run the assembler if
13159 2000-08-16 Andrew Haley <aph@cygnus.com>
13161 * typeck.c (build_java_array_type): Rewrite code to do array
13162 alignment. Take into account back-end macros when aligning array
13163 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
13164 user to set alignment. Fixes gcj/252 and 160.
13166 2000-08-09 Tom Tromey <tromey@cygnus.com>
13168 * parse.y (check_abstract_method_definitions): Now return `int'.
13169 Check implemented interfaces. Fixes PR gcj/305.
13171 * parse.y (patch_switch_statement): Disallow `long' in switch
13172 expressions. Fixes PR gcj/310.
13174 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13176 * decl.c (finit_leg_identifier_node): New global.
13177 (init_decl_processing): Use `finit$' to initialize
13178 finit_identifier_node. Use `$finit$' to initialize
13179 finit_leg_identifier_node.
13180 * expr.c (expand_java_field_op): Use ID_FINIT_P.
13181 * java-tree.h (finit_identifier_node): Changed attached comment.
13182 (finit_leg_identifier_node): New declaration.
13183 (ID_FINIT_P): Take finit_identifier_node and
13184 finit_leg_identifier_node into account. This is a backward
13185 compatibility hack.
13187 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13189 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
13191 (generate_bytecode_insns): Check `nargs' before emitting it.
13192 * verify.c (merge_type_state): Fixed typo.
13193 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
13194 generate_bytecode_{conditional,insns}.
13196 2000-08-13 Anthony Green <green@redhat.com>
13198 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
13201 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13203 * class.c (maybe_layout_super_class): Fixed indentation.
13204 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
13205 (java_check_methods): New function declaration.
13206 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
13207 instead of `str_ptr'.
13208 * jcf-write.c (generate_bytecode_insns): Emit number the of args
13209 of a `invokeinterface' at the right time.
13210 * parse.h (WFL_STRIP_BRACKET): New macro.
13211 (SET_TYPE_FOR_RESOLUTION): Use it.
13212 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
13213 (check_class_interface_creation): Don't check for cross package
13214 innerclass name clashes.
13215 (method_header): Behave properly if MDECL is `error_mark_node'.
13216 (method_declarator): Return `error_mark_node' if bogus current
13218 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
13219 (resolve_and_layout): New local `decl_type', set and used. Call
13220 java_check_methods.
13221 (java_check_methods): New method.
13222 (java_layout_classes): Use it.
13223 (resolve_qualified_expression_name): No EH check necessary in
13225 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
13227 (patch_assignment): Set DECL_INITIAL on integral final local.
13229 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
13231 * java-tree.h (flag_extraneous_semicolon): New extern.
13232 * lang-options.h: (-Wextraneous-semicolon): New option.
13233 * lang.c (flag_redundant): Fixed typo in leading comment.
13234 (flag_extraneous_semicolon): New global.
13235 (lang_decode_option): Set `flag_extraneous_semicolon' when
13236 -Wall. Decode `-Wextraneous-semicolon'.
13237 * parse.y (type_declaration:): Removed `SC_TK' hack, added
13238 `empty_statement' rule.
13239 (class_body_declaration): Likewise.
13240 (method_body:): Accept `;' as a method body.
13241 (static_initializer:): Removed `SC_TK' hack.
13242 (constructor_block_end:): Likewise.
13243 (empty_statement:): Report deprecated empty declaration. Fixes
13246 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13248 * parse.y (build_dot_class_method_invocation): Changed parameter
13249 name to `type'. Build signature from `type' and convert it to a
13250 STRING_CST if it's an array.
13251 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
13252 to use `ref_type' directly.
13254 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
13256 * lang-options.h: Added a comma after the last element to avoid
13257 syntax errors when other languages define additional options.
13259 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
13261 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
13262 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
13263 (jc1): Link with $(BACKEND).
13264 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
13266 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
13268 * jvspec.c: Adjust type of second argument to
13269 lang_specific_driver, and update code as necessary.
13271 * class.c (build_dtable_decl): Initialize dummy.
13273 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13275 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13276 method bodies not to rule out discarding `<clinit>'; don't use
13277 <clinit> to initialize static fields with constant initializers.
13279 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13281 * gjavah.c (print_method_info): Added `synth' parameter. Skip
13283 (method_synthetic): New global.
13284 (HANDLE_METHOD): Recognize synthetic method and tell
13285 `print_method_info' about it.
13286 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13287 processing a synthetic method.
13288 * jcf-reader.c (skip_attribute): New function.
13289 ( skip_attribute): Likewise.
13291 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13293 * parse.y (build_outer_field_access): Fixed comments.
13294 (fix_constructors): Emit the initialization of this$<n> before
13296 (resolve_qualified_expression_name): Build an access to `decl' if
13299 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13301 * parse-scan.y (curent_class): Non longer const.
13302 (inner_qualifier, inner_qualifier_length): Deleted.
13303 (current_class_length): New global.
13304 (bracket_count): Fixed typo in leading comment.
13305 (anonymous_count): New global.
13306 (class_instance_creation_expression:): Handle anonymous classes.
13307 (anonymous_class_creation:): New rule.
13308 (push_class_context): Rewritten.
13309 (pop_class_context): Likewise.
13310 (INNER_QUALIFIER): Macro deleted.
13311 (report_class_declaration): call `push_class_context' when
13312 entering the function. `fprintf' format modified not to use
13314 (report_class_declaration): Assign `package_name' and
13315 `current_class' to NULL separately.
13317 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13319 * expr.c (build_invokeinterface): Call layout_class_methods on
13322 2000-07-27 Tom Tromey <tromey@cygnus.com>
13323 Anthony Green <green@cygnus.com>
13324 Alexandre Petit-Bianco <apbianco@cygnus.com>
13326 * class.c (make_class_data): Create vtable for abstract classes.
13327 (get_dispatch_table): Changed to cope with abstract classes.
13329 2000-07-27 Tom Tromey <tromey@cygnus.com>
13331 * parse.y (patch_method_invocation): Don't reverse the argument
13332 list when dealing with anonymous class constructors. Fixed typo in
13335 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13337 * parse.y (build_alias_initializer_parameter_list): Reverse
13338 crafted list when building aliases for anonymous class
13341 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13343 * parse.y (jdep_resolve_class): Don't bother checking potential
13344 innerclass access if `decl' is NULL.
13345 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13348 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13350 * parse.c: Remove (again.)
13352 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13354 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13355 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13356 outside the `if' statement, alias to innerclass removed, `decl'
13357 used to mark the class complete.
13359 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13361 * parse.y (simple_name:): Fixed typo in error message.
13363 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13365 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13366 or its first operand can be error marks.
13368 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13370 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13371 * parse.y (method_header): Likewise.
13373 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13375 * parse.y (process_imports): Consider that one might be trying to
13376 import an innerclass. Fixes gcj/254
13378 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13380 * parse.y (find_as_inner_class): Handle the case where the
13381 enclosing context of an innerclass has been loaded as bytecode.
13383 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13385 * parse.y (simple_name:): Reject `$' in type names.
13386 (resolve_type_during_patch): Use `type' as a second
13387 argument to resolve_no_layout. Fixes gcj/257.
13389 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
13391 * parse.y (find_most_specific_methods_list): Select the only
13392 non-abstract method even if max has been set.
13393 Fixes gcj/285, gcj/298.
13395 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
13397 * lang-specs.h: Added %(jc1) to java compiler options.
13399 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
13401 * .cvsignore: New file.
13403 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13405 * parse.y (not_accessible_p): Access granted to innerclasses
13406 (indirectly) extending the reference type. Fixes gcj/249.
13408 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13410 * parse.y (patch_method_invocation): Fixed comment.
13411 (maybe_use_access_method): Build this$<n>s to the context of the
13412 target method, or a type that extends it. Fixes gcj/242.
13414 2000-07-13 Mark Mitchell <mark@codesourcery.com>
13418 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13420 * parse.y (fold_constant_for_init): Avoid bullish conversion.
13422 2000-07-13 Tom Tromey <tromey@cygnus.com>
13424 * lang-specs.h: Added %{I*}.
13426 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13428 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13430 2000-07-12 Mark Mitchell <mark@codesourcery.com>
13432 * parse-scan.c: Remove.
13434 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13436 * class.c (set_super_info): Handled protected inner classes.
13437 (common_enclosing_context_p): Bail early if arguments aren't both
13439 (get_access_flags_from_decl): Handle private and protected inner
13441 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13442 (CLASS_PROTECTED): Likewise.
13443 (struct lang_type): New bitfield `poic'.
13444 * parse.y (jdep_resolve_class): Call check_inner_class_access on
13445 inner classes only.
13446 (check_inner_class_access): Renamed arguments, added
13447 comments. Handles protected inner classes (fixes gcj/225)
13448 (not_accessible_p): Fixed comments. Avoid handling inner classes.
13450 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13452 * parse.y (resolve_qualified_expression_name): Verify qualified
13453 access to `this'. Fixes gcj/239.
13455 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13457 * jcf-write.c (generate_classfile): Don't install ConstantValue
13460 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13462 * parse.y (resolve_qualified_expression_name): Handle inner class
13463 access. Fixes gcj/256.
13465 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13467 * jcf-write.c (generate_classfile): Properly install the
13468 ConstantValue attribute and the initial value constant pool index
13469 on string constants.
13470 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13473 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13475 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13477 * parse.y (find_as_inner_class): Fixed typo.
13478 (do_resolve_class): Explore enclosing contexts when searching for
13479 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13480 (check_inner_class_access): Check `decl' which can be null in case
13481 of previous errors.
13483 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13485 * java-tree.h (java_debug_context): Declared `extern'.
13486 (safe_layout_class): Likewise.
13487 * parse.y (resolve_field_access): Field must be `static' in order
13488 to be replaced by its initial value. Added comments.
13489 (find_applicable_accessible_methods_list): Fixed typo.
13490 (find_most_specific_methods_list): Methods found in innerclasses
13491 take over methods founds in the enclosing contexts.
13492 (java_complete_tree): Loosen restrictions on the type of DECLs
13493 that can be replaced by their initialization values.
13494 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13496 2000-07-05 Tom Tromey <tromey@cygnus.com>
13498 * Make-lang.in (PARSE_DIR): New macro.
13499 (PARSE_RELDIR): Likewise.
13500 (PARSE_C): Likewise.
13501 (PARSE_SCAN_C): Likewise.
13502 ($(PARSE_C)): New target.
13503 ($(PARSE_SCAN_C)): Likewise.
13504 (SET_BISON): New macro.
13505 (BISONFLAGS): Likewise.
13506 (JAVABISONFLAGS): Likewise.
13508 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
13510 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13511 argument on the first pass for CNI as well as JNI.
13512 (print_method_info): Set up method name on the first pass only.
13514 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13516 * parse.y (parser_qualified_classname): Removed parameter
13518 (create_interface): Removed first passed parameter to
13519 parser_qualified_classname.
13520 (create_class): Likewise. Don't install alias on static
13521 innerclasses. Fixes gcj/275.
13523 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13525 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13526 debugable statement with empty_stmt_node. Fixes gcj/272
13528 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13530 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13533 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13535 * jcf-write.c (push_long_const): Appropriately cast short negative
13538 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13540 * parse.y (verify_constructor_super): Use loop variable
13541 `m_arg_type' initialized with `mdecl_arg_type'.
13543 2000-06-29 Tom Tromey <tromey@cygnus.com>
13545 * parse.y (resolve_field_access): Handle case where `type_found'
13548 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13550 * expr.c (lookup_field): The same field can be found through two
13551 different interface. Don't declare it ambiguous in that case.
13553 2000-06-27 Tom Tromey <tromey@cygnus.com>
13555 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
13556 follows \r, then unget it at a lower level.
13558 2000-06-26 Tom Tromey <tromey@cygnus.com>
13560 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13561 java_complete_tree.
13563 2000-06-25 Tom Tromey <tromey@cygnus.com>
13565 * parse.y (for_statement): Wrap expression in a WFL if it is a
13566 constant. For PR gcj/268.
13568 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13570 * parse.y (do_resolve_class): Minor optimiztion in the package
13571 list search. Removed unnecessary test and return statement.
13572 (valid_ref_assignconv_cast_p): Order of arguments to
13573 enclosing_context_p fixed.
13575 2000-06-24 Tom Tromey <tromey@cygnus.com>
13577 * expr.c (lookup_field): Print error and return error_mark_node if
13578 field reference is ambiguous.
13580 * parse.y (check_abstract_method_definitions): Also check if
13581 `other_method' is abstract.
13583 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13585 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13587 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13588 (struct lang_type): New field `pic'.
13589 (CLASS_PRIVATE): New macro.
13590 * parse.y (check_inner_class_access): New function.
13591 (jdep_resolve_class): Call it.
13593 2000-06-23 Tom Tromey <tromey@cygnus.com>
13595 * parse.y (patch_incomplete_class_ref): Initialize the returned
13596 class. For PR gcj/260.
13598 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13600 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13602 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13604 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13605 Java specific checks.
13606 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13607 screened by DECL_P.
13608 * java-tree.def (CASE_EXPR): Marked 'e'.
13609 (DEFAULT_EXPR): Likewise.
13610 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13611 screened by DECL_P.
13612 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13613 Java specific checks.
13614 (generate_bytecode_insns): Test try_block for BLOCK before using
13616 * parse.y (build_wfl_wrap): Added `location' argument. Set
13617 EXPR_WFL_LINECOL accordingly.
13618 (dim_expr:): Wrap constants with WFLs.
13619 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13620 (resolve_package): Check for `stmt' not being a BLOCK before
13621 building a debuggable statement with it.
13622 (make_qualified_primary): Added extra parameter to build_wfl_wrap
13624 (resolve_field_access): Make sure `decl' is a DECL before treating
13626 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13627 IDENTIFIER_NODE before treating it as such.
13628 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13629 treating it as such.
13630 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13631 to be applied only on non array types.
13633 2000-06-16 Per Bothner <per@bothner.com>
13635 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
13636 define in terms of DECL_RESULT, as that fails when --enable-checking.
13638 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13640 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
13641 types the same in comparison.
13642 (CHECK_OP): Add static prototype.
13644 2000-06-13 Jakub Jelinek <jakub@redhat.com>
13646 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13647 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13648 * parse.c: Rebuilt.
13650 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13652 * decl.c (create_primitive_vtable): Prototype.
13654 * jcf-write.c (generate_bytecode_insns): Initialize variable
13657 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13659 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13661 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13662 to track searched classes, and do not search the same class more than
13663 once. Call find_applicable_accessible_methods_list on immediate
13664 superclass, instead of search_applicable_method_list on all ancestors.
13665 Fix for PR gcj/238.
13667 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13669 * parse.y (register_fields): Permit static fields in inner classes
13670 if they are final. Fix for PR gcj/255.
13672 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13674 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13675 * parse.y (find_in_imports): Returned type changed to void,
13676 leading comment fixed.
13677 (register_package): New function.
13678 (qualify_and_find): Likewise.
13679 (package_declaration:): Use `register_package'.
13680 (single_type_import_declaration:): Removed local variable
13681 `node'. Added missing `;' for consistency.
13682 (type_import_on_demand_declaration:): Use `chainon' to link new
13684 (lookup_field_wrapper): Lookup local variables defined in outer
13686 (java_complete_class): Don't reverse the list of imported on demand.
13687 (do_resolve_class): Reorganized. Removed local variable
13688 `original_name'. Call `qualify_and_find' with the current package
13689 name, invoke `find_in_imports_on_demand' right after. Call
13690 `qualify_and_find' with the packages we've seen so far. Fixed
13691 operations numbering in comments.
13692 (java_expand_class): Don't reverse `package_list'.
13693 (find_most_specific_methods_list): New local variables `abstract'
13694 and `candidates'. Use them to pick the right method.
13696 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
13698 * parse.y (check_modifiers_consistency): Don't subtract out
13699 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13701 2000-06-04 Philipp Thomas <pthomas@suse.de>
13703 * Makefile.in (INTLLIBS): New.
13707 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13709 * class.c (get_dispatch_table): Build the vtable dummy entry list
13710 element with a null purpose. Fixed leading comment.
13711 (build_dtable_decl): Build an accurate dtable type when appropriate
13714 2000-06-02 Richard Henderson <rth@cygnus.com>
13716 * lang.c (lang_get_alias_set): New.
13718 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13720 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13721 before using it as the accessed field.
13723 2000-05-31 Tom Tromey <tromey@cygnus.com>
13725 * java-tree.h (boolean_array_vtable, byte_array_vtable,
13726 char_array_vtable, short_array_vtable, int_array_vtable,
13727 long_array_vtable, float_array_vtable, double_array_vtable):
13729 * expr.c (get_primitive_array_vtable): New function.
13730 (create_primitive_vtable): New function.
13731 (java_lang_expand_expr): Enable code to statically generate
13733 * decl.c (init_decl_processing): Create primitive vtables.
13734 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13735 short_array_vtable, int_array_vtable, long_array_vtable,
13736 float_array_vtable, double_array_vtable): Define.
13738 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
13740 * java/parse.y (find_applicable_accessible_methods_list):
13741 Don't add an uninitialized value to the list.
13743 2000-05-25 Tom Tromey <tromey@cygnus.com>
13745 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13746 when trying to see if field's class should be initialized. Always
13747 initialize field's declaring class, not qualified class.
13750 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13751 `wfl_operator', to maybe_build_primttype_type_ref.
13754 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
13756 * parse.y (patch_method_invocation): Don't try to lookup methods
13757 in primitive types.
13759 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13761 * parse.y (resolve_field_access): Call the appropriate <clinit>
13762 before accessing the length of a static array. Craft a decl for
13763 the field while its time. Fixes PR gcj/129.
13765 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13767 * parse.y (resolve_package): Correctly set `*next' (was off by
13769 (resolve_qualified_expression_name): Fixed comment.
13771 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13773 * jcf-parse.c (jcf_parse_source): Reset current_class and
13774 current_function_decl to NULL before parsing a new file.
13776 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13778 * parse.y (block_end:): If the collected block doesn't feature a
13779 statement, insert an empty statement.
13781 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13783 * parse.y (maybe_yank_clinit): New function.
13784 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13785 end of the list of methods belonging to a class.
13786 (java_complete_expand_method): Check whether <clinit> is really
13787 necessary and expand it accordingly.
13789 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13791 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13792 processed by the method's switch statement.
13794 2000-05-19 Tom Tromey <tromey@cygnus.com>
13796 * java-tree.h: Added init state enum.
13797 * decl.c (emit_init_test_initialization): Initialize class
13798 initialization check variable by looking at class' state.
13800 2000-05-19 Tom Tromey <tromey@cygnus.com>
13802 * java-tree.h (build_instanceof): Declare.
13803 (build_get_class): Declare.
13804 * parse.y (patch_binop): Use build_instanceof.
13805 * expr.c (build_instanceof): New function. If class is final,
13806 don't make a function call.
13807 (expand_java_INSTANCEOF): Use it.
13808 (build_get_class): New function.
13810 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
13812 * jcf-write.c (generate_classfile): Scan the source_file for
13813 slashes with the right pointer variable.
13815 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
13817 * lang.c (lang_decode_option): Update -Wunused flags by calling
13819 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13821 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
13823 * check_init.c (check_init): Constify local char *.
13824 * class.c (push_class): Constify local char *.
13825 * java_tree.h: Update prototypes.
13826 * jcf-io.c (open_class): Constify filename parameter and
13828 (find_class): Remove redundant string copy. Cast return from
13830 * jcf-parse.c (read_class, parse_class_file, yyparse):
13831 Constify local char *.
13832 * jcf-write.c (generate_bytecode_insns, generate_classfile):
13833 Constify local char *.
13834 * jcf.h (JCF): Constify filename and classname.
13835 (JCF_FINISH): Cast args to FREE to char * when appropriate.
13836 * lang.c (init_parse): Constify parameter and return value.
13837 * lex.c (java_get_line_col): Constify filename parameter.
13838 * parse.h: Constify parser_ctxt.filename. Update prototypes.
13839 * parse.y (java_parser_context_suspend,
13840 issue_warning_error_from_context, safe_layout_class): Constify
13842 * parse.c: Regenerate.
13844 2000-05-08 Tom Tromey <tromey@cygnus.com>
13846 * expr.c (build_jni_stub): Cache the result of
13847 _Jv_LookupJNIMethod.
13849 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13851 * decl.c (predef_filenames_size): Now 7.
13852 (predef_filenames): New seventh entry.
13854 2000-05-04 Tom Tromey <tromey@cygnus.com>
13856 * boehm.c (mark_reference_fields): Don't mark RawData fields.
13857 Keep track of when we've seen a reference field after a
13858 non-reference field.
13859 (get_boehm_type_descriptor): Handle case where we see
13860 non-reference fields but no trailing reference field.
13861 * decl.c (rawdata_ptr_type_node): Define.
13862 (init_decl_processing): Initialize rawdata_ptr_type_node.
13863 * java-tree.h (rawdata_ptr_type_node): Declare.
13865 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13867 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13868 specifiers in calls to fprintf.
13870 2000-05-03 Andrew Haley <aph@cygnus.com>
13872 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13874 * javaop.h (WORD_TO_INT): New function.
13875 (IMMEDIATE_s4): Use WORD_TO_INT.
13876 * jcf.h (JPOOL_INT): Ditto.
13878 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13881 2000-04-19 Tom Tromey <tromey@cygnus.com>
13883 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13884 on native function.
13885 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13887 * expr.c (build_jni_stub): New function.
13888 * lang-specs.h: -fjni and -femit-class-file are incompatible.
13889 * parse.c: Rebuilt.
13890 * parse.y (java_complete_expand_methods): Expand a native method
13891 and call build_jni_stub if -fjni given.
13892 * lang-options.h: Document -fjni.
13893 * lang.c (flag_jni): New global.
13894 (lang_f_options): Added `jni' entry.
13895 * java-tree.h (soft_lookupjnimethod_node,
13896 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
13898 (flag_jni): Declare.
13899 (build_jni_stub): Declare.
13900 (struct lang_decl): Added `native' flag.
13901 (METHOD_NATIVE): Redefined to use `native' field of lang specific
13903 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
13904 soft_jnipopsystemframe_node): New globals.
13905 (init_decl_processing): Set them. _Jv_InitClass only takes one
13908 * java-tree.def: Put into `C' mode.
13910 2000-04-27 Tom Tromey <tromey@cygnus.com>
13913 * expr.c (expand_invoke): Generate check to see if object pointer
13914 is null in nonvirtual invocation case.
13915 * java-tree.h (soft_nullpointer_node): Declare.
13916 * decl.c (soft_nullpointer_node): New global.
13917 (init_decl_processing): Initialize soft_nullpointer_node.
13918 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13919 or `private' methods.
13920 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13922 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
13924 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13927 2000-04-26 Tom Tromey <tromey@cygnus.com>
13929 * zextract.c (find_zip_file_start): New function.
13930 (read_zip_archive): Use it.
13932 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13934 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
13936 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13938 * class.c (common_enclosing_context_p): New function.
13939 * java-tree.h (common_enclosing_context_p): Added prototype.
13940 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
13941 classes sharing an outer context with the current instance.
13942 * parse.y (build_access_to_thisn): Fixed leading comment.
13943 (verify_constructor_super): New local `supper_inner'. Skip
13944 enclosing context argument in the case of inner class constructors.
13945 (patch_method_invocation): Insert proper context as second
13946 parameter to pure inner class constructor super invocations.
13948 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13950 * parse.y (end_class_declaration): Reset the interface number
13953 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13955 * parse.y (source_start_java_method): Deleted unnecessary code.
13956 (patch_method_invocation): Fixed comment.
13958 2000-04-24 Robert Lipe <robertlipe@usa.net>
13960 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
13962 2000-04-23 Tom Tromey <tromey@cygnus.com>
13964 * boehm.c (mark_reference_fields): Use int_byte_position.
13966 2000-04-22 Tom Tromey <tromey@cygnus.com>
13968 * boehm.c (mark_reference_fields): Only call byte_position on
13971 2000-04-22 Tom Tromey <tromey@cygnus.com>
13973 * boehm.c (mark_reference_fields): Added `last_view_index'
13974 argument. Use DECL_FIELD_OFFSET to determine field's offset.
13976 2000-04-20 Mo DeJong <mdejong@cygnus.com>
13978 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
13979 * parse.y (check_class_interface_creation): Fixed comments. Select
13980 permitted modifiers for (inner) interfaces. Changed error message
13981 to report rejected modifiers used with local classes.
13983 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13985 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
13986 of directly inherited type considered in scope.
13987 * parse.y (do_resolve_class): Search inherited classes for inner
13990 2000-04-20 Tom Tromey <tromey@cygnus.com>
13992 * parse.y (not_accessible_p): Use member's class, not current
13993 class, when doing inheritance check for protected reference.
13996 2000-04-20 Jason Schroeder <shrode@subnature.com>
13998 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
14000 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14002 * parse.y (lookup_field_wrapper): Search for final local aliases.
14003 (resolve_expression_name): Let lookup_field_wrapper search for
14004 final local aliases. Force the value of `name' if one is found.
14005 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
14006 an expression name. Fixed comments.
14008 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14010 * parse.y (yyerror): `msg' can be null, don't use it in that case.
14012 2000-04-19 Tom Tromey <tromey@cygnus.com>
14014 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
14016 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14018 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
14020 2000-04-18 Tom Tromey <tromey@cygnus.com>
14023 * gjavah.c (utf8_cmp): Changed return value.
14024 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
14026 (cxx_keywords): New global.
14027 (get_field_name): Handle new result of cxx_keyword_subst.
14028 (print_method_info): Likewise.
14030 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
14032 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
14033 with a newline, for CNI.
14034 (print_stub_or_jni): Print a space or newline before method name for
14035 CNI as well as JNI.
14036 (print_cxx_classname): Don't write leading "::" in CNI stub method.
14037 (process_file): Include gcj/cni.h if generating CNI stubs.
14039 2000-04-16 Tom Tromey <tromey@cygnus.com>
14041 * gjavah.c (decompile_method): Use print_field_name.
14044 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14046 * parse.y (java_expand_classes): Reverse the package list once.
14047 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
14049 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
14050 the `==' and `!=' operators.
14052 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14054 * jcf-write.c (generate_bytecode_insns): At invocation time,
14055 always relate an interface method to the type of its selector.
14057 2000-04-05 Tom Tromey <tromey@cygnus.com>
14060 * expr.c (expand_invoke): Generate check to see if object pointer
14061 is null in nonvirtual invocation case.
14062 * java-tree.h (soft_nullpointer_node): Declare.
14063 * decl.c (soft_nullpointer_node): New global.
14064 (init_decl_processing): Initialize soft_nullpointer_node.
14065 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14066 or `private' methods.
14067 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14069 2000-04-05 Tom Tromey <tromey@cygnus.com>
14071 Fix for PR gcj/140:
14072 * parse.y (check_final_assignment): Recognize assignments to the
14073 `length' field of an array when generating class files.
14075 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14077 * class.c (decl_hash): Prototype removed.
14078 (decl_compare): Likewise.
14080 2000-04-05 Tom Tromey <tromey@cygnus.com>
14082 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
14083 * parse.y (check_modifiers_consistency): Check for final/volatile
14084 clash. Fixes PR gcj/164.
14086 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14088 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
14090 (java_hash_compare_tree_node): Renamed from `decl_compare, made
14092 (add_method_1): Use `java_hash_hash_tree_node' and
14093 `java_hash_compare_tree_node'.
14094 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
14095 (java_hash_compare_tree_node): Likewise.
14096 * parse.y (find_applicable_accessible_methods_list): Create,
14097 delete and use a hash table to remember already searched interfaces.
14099 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
14101 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
14104 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14106 * boehm.c (mark_reference_fields, set_bit): Prototype.
14107 (set_bit): Un-ANSI-fy definition.
14109 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
14112 * decl.c (emit_init_test_initialization): Likewise.
14114 * gjavah.c (jni_print_char): Likewise.
14116 * parse.y (create_new_parser_context): Likewise.
14118 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
14120 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
14121 patch missing hunk. Fixed indentation.
14123 2000-03-30 Tom Tromey <tromey@cygnus.com>
14125 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
14126 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
14128 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14130 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14131 when negative *before* using it as an array index.
14132 * ChangeLog: Fixed typo.
14134 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14136 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14137 to 0 when it reaches -1.
14139 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14141 * jcf-parse.c (get_constant): Properly cast `num' during the
14142 invocation of `add_double'.
14143 * jcf-write.c (push_long_const): Properly cast `lo' before
14144 comparing it to short bounds.
14145 * parse-scan.y (interface_declaration:): Rule re-arrange so that
14146 `interface_body:' is reduced after the current interface is
14149 2000-03-26 Tom Tromey <tromey@cygnus.com>
14151 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
14152 Java-specific `-f' option.
14154 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14156 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
14157 Adjust order of making types.
14158 Make bitsize_*_node values.
14160 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14162 * class.c (make_field_value): Use byte_position.
14163 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
14164 (java_array_data_offset): Likewise.
14165 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
14168 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14170 * parse.y (check_abstract_method_definitions): New local
14171 `end_type_reached'. Make sure we also consider `end_type'.
14172 (java_check_abstract_method_definitions): Make sure we eventually
14173 consider `java.lang.Object'.
14174 (maybe_use_access_method): Don't use access method if not in the
14175 context of a pure inner class or if the method's context is right.
14176 (find_applicable_accessible_methods_list): New static flag
14177 `object_done'. Don't search abstract classes as interfaces. Fixed
14178 indentation. Fixed the `java.lang.Object' only search. Search
14179 class interface(s) first, then fully search enclosing contexts.
14180 (find_most_specific_methods_list): Pick the closest candidate when
14181 they're all abstract.
14183 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14185 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14186 properly initialize `finished_label'. Don't emit gotos for empty
14189 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14191 * except.c (emit_handlers): Clear catch_clauses_last.
14193 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14195 * parse.y (check_method_types_complete): New function.
14196 (create_class): Reset anonymous class counter only when seeing an
14198 (java_complete_class): JDEP_METHOD: Don't recompute signature
14201 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14203 * class.c (build_static_ref): Fixed indentation in comment.
14204 * java-tree.def (TRY_EXPR): Fixed typo in name.
14205 (CLASS_LITERAL): Likewise.
14206 * java-tree.h: (TYPE_DOT_CLASS): New macro.
14207 (struct lang_type): New field `dot_class'.
14208 * jcf-write.c (generate_bytecode_insns): Fixed error message.
14209 (generate_classfile): Method `class$' is synthetic.
14210 * parse.y (build_do_class_method): New function.
14211 (build_dot_class_method_invocation): Likewise.
14212 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
14213 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
14214 (qualify_ambiguous_name): Likewise.
14215 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
14216 (build_try_statement): Fixed leading comment.
14218 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14220 * class.c (make_field_value): Properly handle sizes.
14221 (get_dispatch_vector): Use tree_low_cst and host_integerp.
14222 (layout_class_method): Count using trees.
14223 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
14224 * expr.c (java_array_data_offset): Use int_bit_position.
14225 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
14226 (build_invokevirtual): Use tree_low_cst and do computations with trees.
14228 2000-03-16 Tom Tromey <tromey@cygnus.com>
14230 * lang.c (flag_hash_synchronization): New global.
14231 (lang_f_options): Added `hash-synchronization'.
14232 * lang-options.h: Mention -fhash-synchronization.
14233 * java-tree.h (flag_hash_synchronization): Declare.
14234 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
14235 hash table synchronization is disabled.
14236 * decl.c (init_decl_processing): Only push `sync_info' value when
14237 hash table synchronization is disabled.
14238 * class.c (make_class_data): Only push `sync_info' field when hash
14239 table synchronization is disabled. Removed dead code.
14241 2000-03-16 Tom Tromey <tromey@cygnus.com>
14243 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
14245 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14247 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
14249 * parse.y (patch_method_invocation): Handle anonymous classes
14250 creation in static context.
14252 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14254 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
14255 * parse.y (resolve_qualified_expression_name): Use it.
14256 (patch_method_invocation): Likewise.
14258 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14260 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
14261 depending on the type of dependency which dictates what the
14263 (unresolved_type_p): Resolved types limited to the current class.
14265 2000-03-15 Tom Tromey <tromey@cygnus.com>
14267 * decl.c (init_decl_processing): Set type of `sync_info' to be
14270 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14271 Correctly compute bit number for current slot. Zero `high' and
14272 `low' in DS_LENGTH case. Don't skip inherited fields. Use
14273 mark_reference_fields.
14274 (mark_reference_fields): New function.
14276 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14278 * parse.y (register_incomplete_type): Fixed initialization of
14281 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14283 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14285 (push_class_context, pop_class_context): New function.
14286 (class_body:): Call pop_class_context.
14287 (interface_body:): Likewise.
14288 (INNER_QUALIFIER): New macro.
14289 (report_class_declaration): Changed output format and use
14290 INNER_QUALIFIER. Call push_class_context.
14292 2000-02-14 Andrew Haley <aph@cygnus.com>
14294 * check-init.c (check_init): Add new cases for unary and binary
14297 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14299 * parse.y (resolve_package): Set `next' once a type name has been
14300 progressively discovered.
14301 (resolve_qualified_expression_name): Propagate resolution only if
14302 there are remaining qualifiers. Take into account `q' might have
14303 been cleared after re-qualification.
14304 * parse.y (patch_method_invocation): New local `resolved'.
14305 Section dealing with qualified expression rewritten to use
14306 resolve_field_access.
14308 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14310 * parse.h (PUSH_CPC): Fixed indentation.
14311 (DEBUG_CPC): New macro.
14312 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
14313 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
14314 * parse.y (class_body_declaration:): Use
14315 SET_CPC_INSTANCE_INITIALIZER_STMT.
14316 (method_declaration:): Check for null current_function_decl.
14317 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14318 (java_parser_context_pop_initialized_field): Better handling of
14320 (maybe_make_nested_class_name): Mark nested class name as
14321 qualified when necessary.
14322 (end_class_declaration): Don't call java_parse_context_resume when
14323 one or more error occurred.
14324 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14325 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
14326 SET_CPC_INITIALIZER_STMT.
14327 (method_header): Check for inner classes declaring static methods.
14328 (resolve_qualified_expression_name): Handle situation where `this'
14331 2000-03-13 Hans Boehm <boehm@acm.org>
14333 * typeck.c (build_prim_array_type): Correctly set the high word too.
14335 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14337 * parse.y (java_complete_expand_methods): Leave <clinit> out of
14339 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14340 list of methods for interfaces.
14342 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14344 * parse.y (qualify_ambiguous_name): Properly handle expressions
14347 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14349 * parse.y (check_final_assignment): Extended to process
14351 (patch_assignment): Have check_final_assignment called only once.
14353 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14355 * java-tree.h (IS_INIT_CHECKED): New flag.
14356 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14357 * parse.y (patch_string): Call force_evaluation_order on the
14358 completed string concatenation tree.
14359 * expr.c (force_evaluation_order): Call force_evaluation_order on
14360 function's arguments too.
14362 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14364 * decl.c (emit_init_test_initialization): Mark KEY as unused.
14365 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14366 (build_anewarray): Likewise.
14367 * parse.y (patch_newarray): Likewise.
14368 * parse.c: Regenerated.
14370 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14372 * decl.c (init_decl_processing): Added new class fields `depth',
14373 `ancestors', and `idt' to class_type_node. Use
14374 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14375 * class.c (make_class_data): Push initial values for new fields.
14376 * java-tree.h: Updated prototype for `build_invokeinterface'.
14377 * expr.c (build_invokeinterface): Changed parameters to accept
14378 `method' tree. Calculate index of `method' in its declaring
14379 interface. Build call to _Jv_LookupInterfaceMethodIdx.
14380 (expand_invoke): Call `build_invokeinterface' with new parameters.
14381 * parse.y (patch_invoke): Call `build_invokeinterface' with new
14384 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14386 * typeck.c (lookup_do): Search superinterfaces first
14387 when looking up an interface method. From Godmar Back
14388 <gback@cs.utah.edu>
14390 2000-03-06 Tom Tromey <tromey@cygnus.com>
14392 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14394 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14396 * java-tree.h (lookup_argument_method2): Declared.
14397 (safe_layout_class): Prototype moved from parse.h.
14398 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14399 * parse.y (java_check_regular_methods): Local `super_class' gone.
14400 Call lookup_argument_method2 instead of lookup_argument_method.
14401 Perform modifier match for methods found declared in implemented
14402 interfaces. Fixed indentation problem. Overriding/hiding error
14403 report to take place only for methods found in classes.
14404 * typeck.c (lookup_argument_method): Changed leading
14405 comment. Re-written by calling lookup_do.
14406 (lookup_argument_method2): New function.
14407 (lookup_java_method): Re-written by calling lookup_do.
14408 (lookup_do): New function.
14410 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14412 * check-init.c (check_init): Removed dead code. Handle (blank)
14414 * parse.y (declare_local_variables): New local `final_p', set it
14415 and use it to initialize LOCAL_FINAL.
14416 (check_final_assignment): Only check FIELD_DECLs.
14418 2000-02-17 Tom Tromey <tromey@cygnus.com>
14420 * Makefile.in (JAVA_OBJS): Added boehm.o.
14421 (boehm.o): New target.
14422 * Make-lang.in (JAVA_SRCS): Added boehm.c.
14423 * java-tree.h (flag_use_boehm_gc): Declare.
14424 (get_boehm_type_descriptor): Declare.
14425 * lang.c (lang_f_options): Added `use-boehm-gc'.
14426 (flag_use_boehm_gc): New global.
14427 * lang-options.h: Added -fuse-boehm-gc.
14428 * boehm.c: New file.
14429 * class.c (get_dispatch_table): If class uses a Boehm type
14430 descriptor, put it in the vtable.
14431 (make_class_data): Removed dead code.
14433 2000-03-03 Per Bothner <per@bothner.com>
14435 * decl.c (init_decl_processing): Initialize sizetype properly.
14437 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14439 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14440 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14441 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14442 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14443 (jcf_parse): New local `current'. Load innerclasses seen in outer
14444 context being processed.
14445 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14446 * jcf-write.c (append_innerclasses_attribute): New function.
14447 (append_innerclasses_attribute_entry): Likewise.
14448 (get_access_flags): Handle static classes. Set anonymous and local
14449 classes to be private.
14450 (generate_classfile): Attribute count adjusted. Call
14451 append_innerclasses_attribute.
14452 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14453 PURE_INNER_CLASS_TYPE_P.
14454 * parse.y (parser_qualified_classname): New parameter `is_static',
14455 produce non qualified name accordingly.
14456 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14457 (create_interface): Added argument to parser_qualified_classname.
14458 (create_class): Added argument to parser_qualified_classname. Setup
14459 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14460 (add_inner_class_fields): Fixed indentation.
14461 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14462 (method_declarator): Fixed typo in comment.
14463 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14464 (build_current_thisn): Likewise.
14465 (patch_method_invocation): Likewise.
14467 2000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
14469 * decl.c (current_function_decl): Move to toplev.c.
14471 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14473 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14474 (DECL_BIT_INDEX): Use underlying representation.
14475 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14477 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14479 * expr.c (build_java_ret): Pass proper type to size_binop.
14481 2000-02-25 Anthony Green <green@cygnus.com>
14483 * expr.c (build_class_init): Mark the decl to be ignored by
14485 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14486 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14487 * class.c (init_test_hash_newfunc): New function.
14488 (decl_hash): New function.
14489 (decl_compare): New function.
14490 * decl.c (emit_init_test_initialization): New function.
14491 (complete_start_java_method): Traverse the init test hashtable,
14492 calling emit_init_test_initialization.
14493 (always_initialize_class_p): Define.
14494 * expr.c (build_class_init): Use initialization tests when
14495 emitting class initialization code.
14496 (always_initialize_class_p): Declare.
14497 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14499 * java-tree.h: Include hash.h.
14500 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14501 (struct lang_decl): Add init_test_table field.
14502 (init_test_hash_entry): Define.
14504 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14506 * gjavah.c (main): Avoid using `argi' to report unimplemented
14509 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14511 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14512 initialize locals to avoid warnings. Local `exception_type' moved
14515 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14517 * parse.y (resolve_expression_name): Use `orig' as a second
14518 argument to resolve_field_access.
14519 (resolve_field_access): Removed unnecessary code when dealing with
14522 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14524 * class.c (push_super_field): Don't push the field twice.
14525 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14526 * parse.h (java_reorder_fields): Prototyped.
14527 * parse.y (java_reorder_fields): New function.
14528 (java_layout_class): Simplified not to worry about re-ordering.
14530 2000-02-23 Tom Tromey <tromey@cygnus.com>
14532 * gjavah.c (print_name): In JNI case, correctly quote string.
14533 (print_method_info): Don't handle overrides in JNI mode.
14535 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14537 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14538 value type set to `boolean_type_node'.
14540 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14542 * jcf-dump.c (main): Test for correct condition after
14543 output file creation.
14545 2000-02-19 Anthony Green <green@cygnus.com>
14547 * jcf-depend.c (add_entry): Fix test for first list entry.
14549 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14551 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14552 * constants.c (build_constants_constructor): Likewise.
14554 2000-02-19 Anthony Green <green@cygnus.com>
14556 * jcf-depend.c (add_entry): Add entries to the end of the list.
14558 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
14560 * decl.c (INT_TYPE_SIZE): Define if necessary.
14561 (expand_java_return): Handle the case of a native integer smaller
14562 than a JVM integer.
14564 2000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
14566 * gjavah.c (help): Use GCCBUGURL.
14567 * jv-scan.c (help): Likewise.
14568 * jcf-dump.c (help): Likewise.
14570 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14572 * jcf-write.c (generate_bytecode_insns): Don't generate empty
14575 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14577 * jcf-parse.c (load_class): Call `fatal' if no file containing
14578 the target class are found.
14580 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
14582 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14583 lex.c, lex.h, and PARSE_H to...
14584 (parse.o, parse-scan.o): ...here, respectively.
14586 * lex.c: Split out code that may trigger SIGFPE from yylex()
14587 to its own function.
14588 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14590 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14592 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14594 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14596 * parse.y (outer_field_access_p): Stop in time when outer contexts
14598 (resolve_qualified_expression_name): Properly qualify *everything*
14599 after a package.type to be resoled as expression names.
14600 (find_applicable_accessible_methods_list): Save/restore `class' to
14601 isolate it from a possible outer context search.
14603 2000-02-15 Tom Tromey <tromey@cygnus.com>
14605 * gjavah.c (jni_print_char): New function.
14606 (print_full_cxx_name): Use it.
14607 (decode_signature_piece): Likewise.
14608 (print_cxx_classname): Likewise.
14610 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14612 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14614 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14616 * gjavah.c: Include version.h.
14618 * jcf-dump.c: Likewise.
14620 * jv-scan.c: Likewise.
14622 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14624 * parse.y (outer_field_access_fix): First parameter now a tree
14625 node. Check for assignment to final. First argument to
14626 build_outer_field_access_fix modified to accommodate prototype.
14627 (build_outer_field_access): Don't check for assignment to final
14629 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14630 possibly returned by outer_field_access_fix. Changed
14631 outer_field_access_fix's first argument.
14632 (check_final_assignment): $finit$'s context is OK.
14633 (patch_unaryop): Use node instead of its line/column value when
14634 calling outer_field_access_fix.
14636 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14638 * parse.y (interface_declaration:): No longer tagged
14639 <node>. Re-installed default action.
14640 (class_member_declaration:): Handle inner interfaces.
14641 (interface_member_declaration): Handle inner interfaces and
14643 (create_interface): Push error if one seen. Suspend parsing
14644 context when processing an inner interface.
14645 (register_fields): Inner class static field limitations not to
14646 apply to inner interfaces.
14648 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14650 * jcf-parse.c (load_class): Update `java_error_count' when a
14651 class' file can't be found.
14652 (parse.y): Avoid (byte)code generation when errors seen.
14654 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14656 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14657 decodes a valid node.
14658 (patch_binop): Handle TRUNC_DIV_EXPR.
14660 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14662 * parse.y (resolve_package): New local `acc'. Try to progressively
14663 build and guess a package and type name.
14665 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14667 * parse.y (find_applicable_accessible_methods_list): Load and
14668 layout the search class if necessary.
14669 (java_complete_tree): Keep to original type of the folded initial
14672 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14674 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14675 Generate error message if circularity is detected. New static
14677 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
14678 * jcf-write.c (generate_bytecode_insns): Very simply handle
14680 * parse.y (java_check_circular_reference): Use
14681 `cyclic_inheritance_report' during report, if necessary.
14682 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14683 walking NEW_ARRAY_INIT twice.
14685 2000-02-09 Tom Tromey <tromey@cygnus.com>
14687 * parse.y (check_class_interface_creation): Allow inner classes to
14688 be `private' or `protected', check modifiers' consistency. Prevent
14689 block local classes from bearing any modifiers.
14691 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14693 * except.c (check_start_handlers): Re-add prototype lost in last
14695 (maybe_start_try): Remove excess argument to `check_start_handlers'.
14697 2000-02-09 Andrew Haley <aph@cygnus.com>
14699 * decl.c (clear_binding_level): Remove excess initializer.
14700 (maybe_poplevels): Remove unused variable.
14701 (force_poplevels): Ditto.
14702 (struct binding_level): Add comment.
14704 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14706 * jcf-write.c (generate_classfile): Don't consider
14707 pre-initialization with reference value (use <clinit> instead.)
14708 * parse.y (java_fix_constructors): No generated constructor for
14710 (build_outer_field_access): Removed debug message.
14711 (outer_field_expanded_access_p): Adapted to bytecode generation.
14712 (build_outer_field_access_method): Use fix_method_argument_names.
14713 (build_outer_method_access_method): Fixed indentation. Added
14714 comment. Handle access method generation for static and also void
14716 (build_access_to_thisn): Inserted debug message.
14717 (maybe_build_thisn_access_method): Use fix_method_argument_names.
14718 (resolve_qualified_expression_name): Fixed comment.
14719 (not_accessible_p): Adapted to bytecode generation. Added comment.
14720 (patch_method_invocation): Added comment.
14721 (maybe_use_access_method): Fixed leading comment. Handle static
14723 (java_complete_lhs): Don't shortcut handling of initialized upon
14724 declaration String type static fields when generating bytecode.
14725 (patch_unaryop): Handle outer field access when generating
14728 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14730 * java-tree.h (FIELD_THISN): New macro.
14731 * jcf-write.c (append_synthetic_attribute): New function.
14732 (generate_classfile): Set "Synthetic" attribute on this$<n>,
14733 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14734 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14736 (build_outer_field_access): Turned on access functions usage and
14737 generation when compiling to bytecode.
14738 (maybe_use_access_method): Likewise.
14740 2000-01-25 Andrew Haley <aph@cygnus.com>
14742 * java-except.h (struct eh_range): Add `expanded' field.
14743 (maybe_start_try): Add end_pc arg.
14744 (maybe_end_try): Ditto.
14745 * java-tree.h (force_poplevels): new function.
14746 * expr.c (expand_byte_code): Don't call maybe_start_try or
14748 * except.c (add_handler): Reset expanded.
14749 (expand_start_java_handler): Set expanded.
14750 (check_start_handlers): Don't expand a start handler that's
14751 already been expanded.
14752 (maybe_start_try): Add end_pc arg. Only expand a handler which
14754 (expand_end_java_handler): call force_poplevels.
14755 (force_poplevels): new function.
14756 * decl.c (binding_level): Add start_pc of binding level.
14757 (maybe_pushlevels): Call maybe_start_try when pushing binding
14759 (maybe_poplevels): Call maybe_end_try when popping binding levels.
14760 (LARGEST_PC): Define.
14761 (clear_binding_level): Use LARGEST_PC.
14763 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14764 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14765 (binding_depth, is_class_level, current_pc): new variables.
14766 (struct binding_level): ditto.
14767 (indent): new function.
14768 (push_jvm_slot): add debugging info.
14769 (maybe_pushlevels): ditto.
14770 (maybe_poplevels): ditto.
14771 (pushlevel): ditto.
14773 (start_java_method): ditto.
14774 (give_name_to_locals): comment only.
14775 * except.c (binding_depth, is_class_level, current_pc):
14777 (expand_start_java_handler): add debugging info.
14778 (expand_end_java_handler): ditto.
14780 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14782 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14783 (print_name_for_stub_or_jni, process_file): Constify a char*.
14785 2000-02-03 Tom Tromey <tromey@cygnus.com>
14787 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14789 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14791 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14792 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14795 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14797 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14798 * java-tree.h (TYPE_II_STMT_LIST): New macro.
14799 (struct lang_type): New field `ii_block'.
14800 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14801 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14802 * parse.h (struct parser_ctxt): New field `instance_initializers'.
14803 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14804 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14805 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14807 * parse.y (add_instance_initializer): New function.
14808 (in_instance_initializer): New static global.
14809 (class_body_declaration:): Link instance initializer block.
14810 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14811 (array_creation_expression:): Remove unused local.
14812 (java_parser_context_push_initialized_field): Fixed leading
14813 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14814 CPC_INSTANCE_INITIALIZER_LIST.
14815 (java_parser_context_pop_initialized_field): Likewise.
14816 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14817 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14818 CPC_INITIALIZER_STMT.
14819 (fix_constructors): New local `class_type'. Use it. Call
14820 add_instance_initializer.
14821 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14822 (patch_return): Forbid return in instance initializers.
14823 (patch_throw_statement): Enforce exception handling in the context
14824 of instance initializers.
14826 2000-02-03 Tom Tromey <tromey@cygnus.com>
14828 * Make-lang.in (java.mostlyclean): Remove executables in
14831 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14833 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14834 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14835 (java_float_finite): Convert to use union Word from javaop.h.
14836 (java_double_finite): Convert to use union DWord from javaop.h.
14838 2000-02-02 Tom Tromey <tromey@cygnus.com>
14840 * gjavah.c (options): Added `jni' entry.
14841 (help): Document -jni.
14842 (flag_jni): New global.
14843 (process_file): Handle JNI output. Don't print text from
14844 -prepend, -add, etc, when generating stubs. Only remove `.class'
14845 suffix if it actually exists.
14846 (main): Create a `.c' file when run with `--jni --stubs'. Create
14847 correct output file name with `--jni'.
14848 (print_include): Mangle header name differently in JNI case.
14849 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14851 (print_method_info): Handle JNI case. Put signature info into
14852 method name. Handle case when STREAM is NULL.
14853 (print_name_for_stub_or_jni): New function.
14854 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
14855 (print_cxx_classname): Handle JNI.
14856 (print_full_cxx_name): Likewise.
14857 (decode_signature_piece): Likewise.
14858 (overloaded_jni_method_exists_p): New function.
14859 (struct method_name): Added `signature' and `sig_length' fields.
14860 (HANDLE_END_FIELD): Do nothing in JNI mode.
14862 2000-02-02 Tom Tromey <tromey@cygnus.com>
14864 * jv-scan.c: Include version.c, <getopt.h>.
14865 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14866 (options): New array.
14867 (usage): New function.
14868 (version): New function.
14869 (main): Use getopt_long to parse command line.
14870 * jcf-dump.c: Include version.c, <getopt.h>.
14871 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14872 OPT_JAVAP): New macros.
14873 (options): New array.
14874 (usage): Return `void'. Changed message.
14875 (help): New function.
14876 (version): New function.
14877 (main): Use getopt_long_only to parse command line.
14878 * gjavah.c: Include <getopt.h>.
14879 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14880 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14881 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14882 (options): New array.
14883 (java_no_argument): Removed.
14884 (help): Updated with missing options.
14885 (main): Use getopt_long_only to parse command line.
14886 (usage): Changed message.
14888 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14890 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14891 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
14892 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
14893 * parse.y (array_creation_expression:): Handle anonymous arrays.
14894 (build_array_from_name): Don't set `ret_name' if null.
14895 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
14896 (qualify_ambiguous_name): Likewise.
14897 (java_complete_expand_class): Likewise.
14899 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14901 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
14902 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
14903 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
14904 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
14905 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
14906 AIPL_FUNCTION_COMPLETED_INVOCATION.
14907 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
14908 AIPL_FUNCTION_INVOCATION_READY.
14909 (AIPL_FUNCTION_DECLARATION): New enum entry.
14910 * parse.y (reorder_static_initialized): New function.
14911 (java_parser_context_pop_initialized_field): Use it.
14912 (add_inner_class_fields): Use
14913 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
14914 augmented. Install marker after last alias initializer, if any.
14915 (generate_finit): Fixed typo. Don't try to retain only the used
14917 (method_header): Compute and set DECL_FUNCTION_NAP.
14918 (method_declarator): Fixed comment. Insert alias initializer in
14920 (build_alias_initializer_parameter_list): Fixed leading
14921 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
14922 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
14923 (java_complete_expand_class): Code to retain only used aliases
14925 (java_complete_expand_methods): New local `first_decl'. Generate
14926 $finit$ first, then expand the constructors, regular methods and
14928 (java_complete_expand_method): Don't report error on missing
14929 return statement if previously detected bogus.
14930 (fix_constructors): Don't patch constructor parameters list.
14931 (patch_method_invocation): Use new AIPL enum values. Reverse
14932 alias initializer list for anonymous classes.
14934 2000-01-30 Anthony Green <green@redhat.com>
14936 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
14937 determine how many stack slots to pop.
14939 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
14941 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
14942 error handling/recovery.
14943 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
14945 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14947 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
14948 FIELD_LOCAL_ALIAS_USED): New macros.
14949 (DECL_FUNCTION_NAP): New macro.
14950 (struct lang_decl): New field `nap'.
14951 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
14952 (struct lang_type): New fields `finit_stmt_list' and
14953 `clinit_stmt_list'.
14954 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
14955 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
14956 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
14957 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
14958 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
14959 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
14960 (BUILD_THROW): Macro line separator re-indented.
14961 * parse.y (end_class_declaration): New function.
14962 (maybe_generate_pre_expand_clinit): New name for
14963 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
14964 pre-expand static fields.
14965 (maybe_generate_clinit): Function deleted.
14966 (check_for_static_method_reference): Prototype's parameter list
14968 (generate_finit): New name for maybe_generate_finit. Changed
14969 leading comment. Function rewritten to use
14970 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
14971 (build_alias_initializer_parameter_list): New function.
14972 (java_parser_context_pop_initialized_field): Likewise.
14973 (add_inner_class_fields): Likewise.
14974 (type_declaration:): Call end_class_declaration.
14975 (class_member_declaration:): Likewise.
14976 (formal_parameter_list:): Fixed typos.
14977 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
14978 element. Improved error handling.
14979 (block_statement:): Call end_class_declaration.
14980 (anonymous_class_creation:): Likewise.
14981 (create_anonymous_class): Fixed comments.
14982 (create_class): Call add_inner_class_fields.
14983 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
14984 (method_header): Use MARK_FINAL_PARMS.
14985 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
14986 (method_declarator): Propagate final argument flag.
14987 (craft_constructor): New local `artificial'. Call
14988 build_alias_initializer_parameter_list. Use
14989 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
14990 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
14992 (complete_expand_class): Get rid of unused outer context local
14994 (java_complete_expand_methods): Fixed leading
14995 comment. Generate/pre-expand <clinit> first. Changed method
14996 expansion order to regular, $finit$, constructors, <clinit>.
14997 (java_complete_expand_method): Set current_function_decl.
14998 (fix_constructors): Fix constructor parameter list to account for
14999 outer context local alias initializers.
15000 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15001 (resolve_expression_name): Lookup outer context local aliases. New
15002 local `access', use it.
15003 (patch_method_invocation): Patch inner class ctor invocation with
15004 outer context local aliases initialization values. $finit$
15005 invocation patching now includes things generated with
15006 build_alias_initializer_parameter_list.
15007 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15008 (build_super_invocation): Likewise.
15009 (patch_assignment): Changed comment.
15011 2000-01-27 Andrew Haley <aph@cygnus.com>
15013 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
15017 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15019 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
15021 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
15023 * parse.y (register_fields): Don't pass a format specifier to
15024 OBSOLETE_MODIFIER_WARNING.
15025 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
15026 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
15028 (check_modifiers): Change function into a macro.
15029 (check_class_interface_creation): Pass a literal format string.
15031 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15033 * buffer.h: PROTO -> PARAMS.
15034 * check-init.c: Likewise.
15035 * class.c: Likewise.
15036 * constants.c: Likewise.
15037 * convert.h: Likewise.
15038 * decl.c: Likewise.
15039 * except.c: Likewise.
15040 * expr.c: Likewise.
15041 * gjavah.c: Likewise.
15042 * java-except.h: Likewise.
15043 * java-tree.h: Likewise.
15044 * jcf-depend.c: Likewise.
15045 * jcf-dump.c: Likewise.
15046 * jcf-parse.c: Likewise.
15047 * jcf-path.c: Likewise.
15048 * jcf-reader.c: Likewise.
15049 * jcf-write.c: Likewise.
15051 * jv-scan.c: Likewise.
15052 * jvgenmain.c: Likewise.
15053 * jvspec.c: Likewise.
15054 * lang.c: Likewise.
15057 * parse-scan.y: Likewise.
15058 * parse.h: Likewise.
15059 * parse.y: Likewise.
15060 * typeck.c: Likewise.
15061 * verify.c: Likewise.
15062 * xref.c: Likewise.
15063 * xref.h: Likewise.
15064 * zextract.c: Likewise.
15065 * zipfile.h: Likewise.
15067 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15069 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15070 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
15071 * constants.c (build_constant_data_ref): Check for cached
15072 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
15073 in TYPE_CPOOL_DATE_REF.
15074 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
15075 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
15076 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
15077 (LOCAL_FINAL): New macro.
15078 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
15079 constant pool -- don't try to reuse.
15080 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
15081 TYPE_LANG_SPECIFIC.
15082 (find_in_current_zip): Use TYPE_JCF.
15083 * parse.h (java_check_final): Prototype removed.
15084 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
15085 (maybe_create_class_interface_decl,
15086 check_class_interface_creation): Likewise.
15087 (java_expand_finals): Function removed.
15088 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
15089 (block_statement:): Fixed comment.
15090 (anonymous_class_creation:): Likewise.
15091 (check_class_interface_creation): Reversed Jan 12, 2000 extra
15093 (check_class_interface_creation): Loosened error report on (inner)
15094 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
15095 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
15096 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
15098 (create_interface): Likewise.
15099 (anonymous_class_counter): New static global.
15100 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
15101 patch. Fixed comments.
15102 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
15103 anonymous_class_counter when declaring a toplevel class.
15104 (craft_constructor): Fixed constructor name when handling
15105 anonymous classes. Anonymous class constructors to feature hidden
15106 this$<n> parameter.
15107 (java_fix_constructors): Added comment.
15108 (java_check_final): Function removed.
15109 (java_complete_expand_methods): Fixed comment. Don't generate
15110 class data, save its outgoing constant pool instead.
15111 (verify_constructor_super): Skip anonymous class constructor
15112 hidden this$<n> parameter.
15113 (java_expand_classes): New local `saved_ctxp'. Removed call to
15114 java_expand_finals and java_check_final. Expand anonymous class
15115 constructors. Generate class data.
15116 (build_super_invocation): Skip anonymous class hidden this$<n>
15118 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
15119 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15120 (set_java_signature): Likewise.
15122 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
15124 * gjavah.c: Delete ACC_VISIBILITY define.
15125 * jcf.h: Add ACC_VISIBILITY define.
15126 * parse.y: final: rule tagged <value>.
15127 (java_check_regular_methods): Use ACC_VISIBILITY define for
15128 default package access check.
15129 (local_variable_declaration_statement): Use final: rule.
15131 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
15133 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
15134 (final:): New rule.
15136 2000-01-17 Tom Tromey <tromey@cygnus.com>
15138 * gjavah.c (print_field_info): Allow non-static final fields.
15140 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15142 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
15143 * parse.y (patch_anonymous_class): New function.
15144 (create_anonymous_class): Register incomplete type when the
15145 class/interface to extends/implement isn't known yet.
15146 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
15147 (verify_constructor_super): Tuned error message.
15149 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15151 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
15152 (ANONYMOUS_CLASS_P): New macro.
15153 (TYPE_SIGNATURE, TYPE_JCF): New macros.
15154 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
15155 * parse.y (create_class): Added leading argument.
15156 (maybe_create_class_interface_decl,
15157 check_class_interface_creation): Likewise.
15158 (craft_constructor): New function.
15159 (verify_constructor_super): Added argument in prototype.
15160 (class_declaration:): Inserted leading argument.
15161 (for_begin:): Use FOR_LOOP_P.
15162 (anonymous_class_creation): Create WFL of the anonymous class to
15163 instantiate. Call build_new_invocation. Added comments.
15164 (check_class_interface_creation): Handle parameter `anonymous' in
15165 verbose mode class creation announce.
15166 (link_nested_class_to_enclosing): Exclude anonymous classes.
15167 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
15168 anonymous class, even though they appear to have an enclosing
15170 (create_interface): Pass extra argument to
15171 check_class_interface_creation.
15172 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
15173 (create_class): Call check_class_interface_creation and
15174 maybe_create_class_interface_decl with extra new argument. Don't
15175 add private this$<n> to anonymous classes.
15176 (method_declarator): Insert hidden this$<n> to anonymous class
15178 (java_fix_constructors): Deleted code creating default
15179 constructor. Call craft_constructor instead.
15180 (java_check_regular_methods): Set `saw_constructor' to 1 for
15182 (fix_constructors): Pass extra argument to verify_constructor_super.
15183 (verify_constructor_super): New local `sdecl', use it. Search for
15184 matching constructor (possibly featuring arguments) in super
15186 (lookup_method_invoke): Craft constructor according to arguments
15187 list when dealing with anonymous class constructors.
15188 (build_super_invocation): Pass arguments to anonymous class super
15190 (search_loop): Use FOR_LOOP_P.
15191 (labeled_block_contains_loop_p): Likewise.
15193 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15195 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
15196 (enclosing_context_p): New function.
15197 (get_access_flags_from_decl): Handle CLASS_STATIC.
15198 (maybe_layout_super_class): Extra first argument passed to
15200 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
15202 * decl.c (access0_identifier_node): New global.
15203 (init_decl_processing): access0_identifier_node initialized.
15204 (pushdecl): Set DECL_CONTEXT only on non type decls.
15205 * expr.c (lookup_field): Lookup inner class fields in enclosing
15207 (expand_invoke): Use ID_INIT_P.
15208 (expand_java_field_op): Use DECL_CLINIT_P.
15209 * java-tree.def (CLASS_LITERAL): New tree code.
15210 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
15211 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
15212 (struct lang_decl): New field `inner_access'.
15213 (enclosing_context_p): Prototyped.
15214 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
15215 ID_CLINIT_P): New macros.
15216 (CLASS_STATIC): New macro.
15217 (CLASS_ACCESS0_GENERATED_P): New macro.
15218 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
15219 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
15220 INNER_CLASS_P): New macros.
15221 (DECL_INNER_CLASS_LIST): New macro.
15222 * jcf-parse.c (yyparse): Avoid the use of ANSI string
15224 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15225 the shift value to int. Fixed typo in comment.
15226 * lex.c (inst_id, wpv_id): Initialize.
15227 * mangle.c (unicode_mangling_length): Take `$' into account.
15228 * parse.h (DRECOVER, RECOVER): Terminate properly.
15229 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
15230 (typedef struct _jdep): New field `enclosing'.
15231 (JDEP_ENCLOSING): New macro.
15232 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
15233 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
15234 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
15235 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
15236 GET_ENCLOSING_CPC_CONTEXT): New macros.
15237 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
15238 (do_resolve_class): Added extra argument in prototype.
15239 * parse.y (resolve_class): Added extra argument in prototype.
15240 (maybe_create_class_interface_decl): Likewise.
15241 (maybe_use_access_method, build_wfl_wrap): New functions.
15242 (java_complete_expand_classes, java_complete_expand_class):
15244 (java_parser_context_push_initialized_field,
15245 java_parser_context_suspend, java_parser_context_resume):
15247 (maybe_make_nested_class_name, make_nested_class_name,
15248 set_nested_class_simple_name_value,
15249 link_nested_class_to_enclosing, find_as_inner_class,
15250 find_as_inner_class_do, check_inner_class_redefinition,
15251 build_thisn_assign, build_current_thisn, build_access_to_thisn,
15252 maybe_build_thisn_access_method, build_outer_field_access,
15253 build_outer_field_access_methods, build_outer_field_access_expr,
15254 build_outer_method_access_method, build_new_access_id,
15255 build_outer_field_access_method, outer_field_access_p,
15256 outer_field_expanded_access_p, outer_field_access_fix,
15257 build_incomplete_class_ref, patch_incomplete_class_ref,
15258 create_anonymous_class): Likewise.
15259 (inst_id, wpv_id): New static global variables.
15260 (synchronized:): New rule, tagged <node>.
15261 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
15263 (anonymous_class_creation:): New rule, tagged <node>.
15264 (NEW_TK): Tagged <node>.
15265 (type_literals, array_type_literal): New rules, tagged <node>.
15266 (class_declaration:): Removed action when reducing by class_body:
15267 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
15268 using GET_CPC in sub-rules.
15269 (class_member_declaration): Handle inner classes.
15270 (method_declaration): When reducing method_header:, reset
15271 current_function_decl when appropriate.
15272 (method_declarator:): Set the number of formal parameter to 0 for
15273 method declared without arguments.
15274 (constructor_declarator:): Likewise.
15275 (static_initializer:): List of elements kept in a list.
15276 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
15277 use of the keyword `static' for type declarations.
15278 (block_statement:): Handle inner class declarations.
15279 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
15280 type qualified `this'.
15281 (class_instance_creation_expression): Use anonymous_class_creation:
15282 to handle inner class instances creation. Handle qualified `new'.
15283 (something_dot_new): Added appropriate actions.
15284 (create_new_parser_context): New function.
15285 (java_push_parser_context, java_parser_context_save_global,
15286 java_parser_context_suspend): Use create_new_parser_context.
15287 (check_modifiers): Changed leading comment.
15288 (check_class_interface_creation): Handle interclasses.
15289 (add_superinterfaces): Fixed comment.
15290 (create_interface): Build qualified name from the raw_name instead
15291 of its matching WFL. Push the initialized fields list. raw_name added
15292 as an extra argument to maybe_create_class_interface_decl.
15293 (create_class): Build qualified name from the raw_name instead of
15294 its matching WFL. Removed assignment to current_parsed_class_un.
15295 Call PUSH_ERROR before returning an error. Suspend the current
15296 parser context when processing an inner class. Push the
15297 initialized fields list. raw_name added as an extra argument to
15298 maybe_create_class_interface_decl. Add the private this$<n>
15300 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15301 (register_fields): Get the class type from GET_CPC and handle
15302 previous errors. Added code to handle the creation of static
15303 fields in inner classes. Initialized fields initialization
15304 statements kept in a list of lists.
15305 (maybe_generate_finit): Initialized fields initialization
15306 statements kept in a list of lists. Use GET_CPC.
15307 (maybe_generate_clinit): Likewise.
15308 (method_header): Use GET_CPC and GET_CPC_UN.
15309 (parser_qualified_classname): Handle inner classes.
15310 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15311 (java_fix_constructors): Hide pointer to enclosing context
15312 instance in constructor list when dealing with inner classes.
15313 (jdep_resolve_class): Call resolve_class with extra first argument
15315 (resolve_class): Add enclosing context as a first extra argument
15316 to do_resolve_class.
15317 (do_resolve_class): Call find_as_inner_class. Handle WFLs
15319 (resolve_no_layout): Extra argument added to resolve_class
15321 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15322 (java_get_real_method_name): Use GET_CPC_UN.
15323 (check_abstract_method_definitions): Use DECL_CLINIT_P.
15324 (java_check_abstract_methods): Handle static method declared in
15325 inner classes by an error.
15326 (java_check_regular_methods): Use DECL_CLINIT_P.
15327 (source_start_java_method): Also set DECL_MAX_LOCALS.
15328 (create_artificial_method): Call java_parser_context_save_global
15329 and java_parser_context_restore_global instead of saving/restoring
15330 the context by hand.
15331 (expand_start_java_method): Improved verbose mode message.
15332 (java_complete_expand_methods): Fixed leading comment. Use
15334 (fix_constructors): Added assignment to this$<n> if necessary.
15335 (java_expand_classes): Call java_complete_expand_classes instead
15336 of java_complete_expand_methods.
15337 (make_qualified_primary): Simplified.
15338 (merge_qualified_name): Optimized for missing left or right parts.
15339 (resolve_expression_name): Handle access to outer class fields from
15341 (resolve_qualified_expression_name): New macro
15342 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15343 classes. Report error on non appropriate qualification of
15344 `new'. Handle qualified `this'.
15345 (not_accessible_p): Allow access to outer class private fields from
15347 (patch_method_invocation): Handle method invocations through
15348 access methods and inner class constructor invocations.
15349 (find_applicable_accessible_methods_list): Search enclosing
15350 contexts of an inner class.
15351 (search_applicable_methods_list): Fixed typo.
15352 (argument_types_convertible): Handle inner class constructors'
15353 hidden outer context reference argument.
15354 (qualify_ambiguous_name): Handle qualified `this'.
15355 (java_complete_lhs): Handle use of field accessed through
15356 artificial access methods in various cases of assignments. Handle
15357 CLASS_LITERAL node.
15358 (check_final_assignment): Use DECL_CLINIT_P.
15359 (valid_ref_assignconv_cast_p): Handle the destination being an
15360 enclosing context of the source.
15361 (patch_unaryop): Handle use of field accessed through artificial
15363 (patch_return): Use DECL_CLINIT_P.
15364 (patch_throw_statement): Use DECL_CLINIT_P.
15365 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15366 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15369 2000-01-16 Anthony Green <green@cygnus.com>
15371 * parse.y (build_string_concatenation): Only use
15372 StringBuffer(String) shortcut if String arg is constant.
15374 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15376 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15377 the shift value to int. Fixed typo in comment.
15379 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
15381 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15382 * jcf-write.c: Likewise.
15383 * parse.y: Likewise.
15384 * parse.c: Regenerate.
15386 2000-01-09 Anthony Green <green@cygnus.com>
15388 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15389 bytecodes in the correct order.
15391 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15393 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15395 2000-01-06 Anthony Green <green@cygnus.com>
15397 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15398 before building constant array decl.
15400 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
15402 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15403 method invocation and typo in conditional expression.
15404 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15405 the appropriate NOTE_POP.
15406 * parse.y (patch_binop): Shift value mask to feature the right
15409 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15411 * class.c (assume_compiled, assume_compiled_node): Add static
15413 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15415 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15417 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15419 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15420 to `__modifier' to avoid stringifying it.
15422 * parse.y (verify_constructor_circularity): Don't call a variadic
15423 function with a non-literal format string.
15424 (java_check_abstract_methods): Move unreachable code inside
15425 `continue' statement.
15426 (lookup_method_invoke): Call xstrdup, not strdup.
15428 * expr.c (expand_java_field_op): Avoid the use of ANSI string
15431 * jcf-parse.c (yyparse): Likewise.
15433 * jv-scan.c (main): Likewise.
15435 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15437 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15438 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15439 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15442 * parse.y (synchronized, variable_redefinition_error,
15443 check_class_interface_creation, create_interface, create_class,
15444 method_header, finish_method_declaration,
15445 check_modifiers_consistency, method_declarator,
15446 complete_class_report_errors, check_abstract_method_definitions,
15447 java_check_regular_methods, check_throws_clauses,
15448 java_check_abstract_methods, read_import_dir,
15449 check_pkg_class_access, declare_local_variables, fix_constructors,
15450 cut_identifier_in_qualified, resolve_expression_name,
15451 resolve_qualified_expression_name, patch_method_invocation,
15452 java_complete_lhs, patch_assignment, try_builtin_assignconv,
15453 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15454 patch_exit_expr, patch_exit_expr, patch_switch_statement,
15455 patch_try_statement, patch_synchronized_statement,
15456 patch_throw_statement, check_thrown_exceptions,
15457 patch_conditional_expr): Likewise.
15459 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15461 * Makefile.in (LIBDEPS): Added gcc's errors.o
15462 (../jcf-dump$(exeext):): Link with gcc's errors.o
15463 (../gcjh$(exeext):): Likewise.
15464 * expr.c (expand_java_NEW): Layout the entire target type instead of
15465 laying out its methods only.
15466 (lookup_field): Layout the class after having loaded it.
15467 * java-tree.h (java_debug_context): Declared.
15468 * jcf-io.c (toplev.h): Included.
15469 (find_class): Removed assignment to jcf's outofsynch
15470 field. Force source file to be read if newer than its matching
15471 class file. Tweaked debug messages.
15472 * jcf-parse.c (jcf_out_of_synch): Deleted.
15473 (read_class): Call to jcf_out_of_synch removed.
15474 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15475 (jcf_out_of_synch): Prototype deleted.
15476 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15477 `deprecated' and `class_err': integer turned into bit-fields.
15478 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15479 * parse.y (package_list): New global.
15480 (package_declaration:): Record newly parsed package name.
15481 (extra_ctxp_pushed_p): Static global deleted.
15482 (java_parser_context_save_global): Create buffer context for the
15483 purpose of saving globals, if necessary.
15484 (java_parser_context_restore_global): Pop context pushed for the
15485 purpose of saving globals, if necessary.
15486 (java_debug_context_do): New prototype and function.
15487 (java_debug_context): Likewise.
15488 (do_resolve_class): Use already parsed package names to qualify
15489 and lookup class candidate.
15490 (java_pre_expand_clinit): Removed unnecessary local variable.
15492 1999-12-17 Tom Tromey <tromey@cygnus.com>
15494 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
15496 (process_file): Use `\n\' at end of each line in string.
15498 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15500 * expr.c (expand_invoke): Layout the loaded class before
15501 attempting to use it.
15502 (expand_java_field_op): Allow final field assignments to take
15504 * typeck.c (convert): Return error_mark_node if expr is null.
15506 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15508 * class.c (class_depth): Return -1 if the class doesn't load
15510 * expr.c (can_widen_reference_to): Check for errors during depth
15511 computation and return 0 accordingly.
15512 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15513 create default constructors and add an other error check.
15514 * parse.h (java_fix_constructors): Prototyped.
15515 * parse.y (java_pre_expand_clinit): Likewise.
15516 (build_super_invocation): Re-prototyped to feature one argument.
15517 (java_check_circular_reference): Directly use `current'.
15518 (java_fix_constructors): New function.
15519 (java_check_regular_methods): Don't create default constructors
15520 here, but abort if none were found.
15521 (java_complete_expand_methods): Pre-process <clinit> calling
15522 java_pre_expand_clinit.
15523 (java_pre_expand_clinit): New function.
15524 (fix_constructors): build_super_invocation invoked with the
15525 current method declaration as an argument.
15526 (build_super_invocation): Use the context of the processed method
15527 decl argument instead of current_class.
15528 * typeck.c (lookup_java_method): Take WFLs in method names into
15531 1999-12-14 Per Bothner <per@bothner.com>
15533 * class.c (make_class_data): flag_keep_inline_functions to keep
15534 private methods in the method array.
15536 1999-12-15 Anthony Green <green@cygnus.com>
15538 * check-init.c (check_init): Take into account both types of
15539 `throw's when checking for uninitialized variables.
15541 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15543 * parse.y (java_complete_lhs): Force conversion of array
15544 dimensions to int_type_node, that's what runtime's ABI expects.
15546 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15548 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15549 operand of a WFL, until the Java front-end gets fixed with regard
15550 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15552 1999-12-10 Andrew Haley <aph@cygnus.com>
15554 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15555 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15556 expr.c (build_java_athrow): Add support for sjlj-exceptions.
15557 java-tree.h: Ditto.
15558 jcf-write.c: Ditto.
15560 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
15562 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15563 before calling expand_eh_region_start and expand_start_all_catch.
15564 * except.c (expand_start_java_handler): Switch to permanent
15565 obstack before calling expand_eh_region_start.
15566 (expand_end_java_handler): Switch to permanent obstack before
15567 calling expand_start_all_catch.
15569 1999-12-5 Anthony Green <green@cygnus.com>
15571 * decl.c (init_decl_processing): Mark throw_node as a noreturn
15572 function with side effects.
15573 (init_decl_processing): Mark all memory allocating DECLs with
15576 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15578 * except.c (expand_end_java_handler): Call
15579 expand_resume_after_catch and end_catch_handler.
15581 1999-11-30 Anthony Green <green@cygnus.com>
15583 * verify.c (verify_jvm_instructions): Create new return label
15584 chain if non existent (don't rely on the verified state of the jsr
15587 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15589 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15590 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15592 * parse.y (patch_assignment): Removed bogus final class test on
15593 lhs when checking on whether to emit an ArrayStoreException runtime
15595 * expr.c (expand_java_arraystore): Likewise.
15597 1999-11-28 Anthony Green <green@cygnus.com>
15599 * decl.c (find_local_variable): Reuse single slot decls when
15602 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15604 * jcf-parse.c (saw_java_source): Global variable removed.
15605 (read_class): Don't use `saw_java_source'. Added extra braces.
15606 (yyparse): Code setting `saw_java_source' removed.
15608 1999-11-24 Mark Mitchell <mark@codesourcery.com>
15610 * except.c (emit_handlers): Zero catch_clauses after emitting them.
15612 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15614 * verify.c (merge_type_state): Non verified subroutines being
15615 considered more than once to trigger passive type merge.
15617 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15619 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15620 in case of error. Error message tuned.
15622 1999-11-21 Anthony Green <green@cygnus.com>
15624 * constants.c (find_methodref_index): Unwrap method names before
15625 inserting them in the constant pool.
15627 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15629 * class.c (assume_compiled_node): New typedef.
15630 (assume_compiled_tree): New static data.
15631 (find_assume_compiled_node): New function.
15632 (add_assume_compiled): New function.
15633 (assume_compiled): New function.
15634 * class.c (make_class_data): Use assume_compiled.
15635 (is_compiled_class): Use assume_compiled.
15637 * java-tree.h (add_assume_compiled): Declare.
15639 * lang.c (lang_decode_option): Parse new options.
15641 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15643 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15644 int_type_node: that's what `_Jv_AllocObject' expects.
15646 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15648 * parse.y (lookup_method_invoke): Use lang_printable_name to
15649 reliably build the type name during error report. Fixes PR gcj/97.
15651 1999-11-09 Tom Tromey <tromey@cygnus.com>
15653 * jcf-path.c: Include <sys/stat.h>.
15654 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
15655 (DIR_UP): New macro.
15657 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15659 * parse.y (source_end_java_method): Resume permanent allocation,
15660 reversing Apr 27 1998 patch.
15661 (patch_string_cst): Pop obstacks after having pushed the permanent
15664 1999-11-05 Tom Tromey <tromey@cygnus.com>
15666 * class.c (finish_class): Emit inlined methods if any native
15667 methods exist in the class. Fixes PR gcj/85.
15669 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
15671 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15672 (qualify_ambiguous_name): Likewise.
15674 1999-11-03 Godmar Back <gback@cs.utah.edu>
15676 * typeck.c: (lookup_java_method): search all inherited
15677 interfaces when looking up interface method.
15679 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15681 * parse.y (method_header:): Issue error message for rule `type
15683 (synchronized:): Error report when not using synchronized.
15685 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15687 * parse.y (resolve_qualified_expression_name): Prevent `this' from
15688 being used before the superclass constructor has been called.
15689 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15690 instead of `CALL_THIS_CONSTRUCTOR_P'.
15692 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
15694 * check-init.c: Fix typo in comment.
15696 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15698 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15701 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15703 * parse.y (expression_statement:): Call function to report
15704 improper invocation of a constructor.
15705 (parse_ctor_invocation_error): New function.
15707 1999-10-26 Mark Mitchell <mark@codesourcery.com>
15709 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15712 1999-10-21 Tom Tromey <tromey@cygnus.com>
15714 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15715 in generated `main'.
15717 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15719 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15720 (qualify_ambiguous_name): Likewise.
15722 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15724 * parse.y (java_complete_tree): fold_constant_for_init to work on
15726 (java_complete_lhs): Likewise.
15727 (array_constructor_check_entry): Complete an initializer element
15728 on permanent_obstack.
15730 1999-10-19 Tom Tromey <tromey@cygnus.com>
15732 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15733 From Mike Moreton <mike@pillim.demon.co.uk>.
15735 1999-10-15 Greg McGary <gkm@gnu.org>
15737 * java-tree.h (flag_bounds_check): Remove extern decl.
15738 * lang.c (flag_bounds_check): Remove global variable.
15739 (lang_f_options): Remove "bounds-check" entry.
15740 (lang_init_options): Default flag_bounds_check to "on".
15742 1999-10-14 Tom Tromey <tromey@cygnus.com>
15744 * jvgenmain.c (usage): New function.
15745 (main): Use it. Also, handle `-D' options.
15746 * jvspec.c (lang_specific_driver): Recognize -D.
15747 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15749 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15751 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15753 * jcf-dump.c (print_constant, disassemble_method): Don't call a
15754 variadic function with a non-literal format string.
15756 * parse-scan.y (report_main_declaration): Likewise.
15758 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15760 * parse.y (read_import_dir, patch_assignment, patch_binop,
15761 patch_array_ref): Likewise.
15763 * typeck.c (build_java_array_type): Likewise.
15765 * verify.c (verify_jvm_instructions): Likewise.
15767 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15769 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
15771 1999-10-07 Anthony Green <green@cygnus.com>
15773 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15774 where CHECK_PUT may fail for valid reasons.
15776 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
15777 UNSAFE_PUTN): New macros.
15779 1999-10-04 Tom Tromey <tromey@cygnus.com>
15781 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15782 well. Fixes Java PR gcj/59.
15783 * parse-scan.y (yyerror): Report errors.
15785 1999-09-24 Glenn Chambers <GChambers@provsol.com>
15787 * decl.c (insert_block): Remove unconditional `abort'.
15789 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
15791 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
15792 FUNCTION_CODE now of type int. All callers changed.
15793 Set the builtin's DECL_BUILT_IN_CLASS.
15795 1999-09-23 Tom Tromey <tromey@cygnus.com>
15797 * jvspec.c (lang_specific_driver): Don't read spec file if
15798 -fsyntax-only given.
15800 1999-09-22 Tom Tromey <tromey@cygnus.com>
15802 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15804 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15805 (WORDS_TO_LONG): Likewise.
15806 (WORDS_TO_DOUBLE): Likewise.
15808 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15810 * jcf-write.c (RELOCATION_VALUE_0): New macro.
15811 (RELOCATION_VALUE_1): Likewise.
15812 (emit_iinc, emit_reloc, push_constant1, push_constant2,
15813 push_in_const, push_long_const): Prototyped.
15814 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15815 (push_constant2): Likewise.
15816 (push_int_const): Cast find_constant1's integer arguments to `jword'.
15817 (find_constant_wide): Cast find_constant2's integer arguments to
15819 (find_constant_index): Cast find_constant2's and find_constant2's
15820 integer arguments to `jword'.
15821 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15822 (emit_switch_reloc): Use RELOCATION_VALUE_0.
15823 (emit_if): Use RELOCATION_VALUE_1.
15824 (emit_goto): Likewise.
15825 (emit_jsr): Likewise.
15826 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
15827 argument to push_long_const to HOST_WIDE_INT.
15829 1999-09-15 Andreas Schwab <schwab@suse.de>
15831 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15833 1999-09-20 Nick Clifton <nickc@cygnus.com>
15835 * lang.c (lang_decode_option): Extend comment.
15837 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15839 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
15842 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15844 * gjavah.c (get_field_name, print_method_info, print_include,
15845 add_namelet): Use xmalloc, not malloc.
15847 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
15848 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15851 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15853 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
15855 * jcf-path.c (add_entry): Likewise.
15857 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15859 * jv-scan.c (xmalloc): Remove definition.
15861 * jvgenmain.c (xmalloc): Likewise.
15863 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15865 * lex.c (java_store_unicode): Use xrealloc, not realloc.
15867 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
15868 concat, not xmalloc/sprintf.
15869 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15870 (xstrdup): Remove definition.
15872 * parse.y (duplicate_declaration_error_p,
15873 constructor_circularity_msg, verify_constructor_circularity,
15874 check_abstract_method_definitions, java_check_regular_methods,
15875 java_check_abstract_methods, patch_method_invocation,
15876 check_for_static_method_reference, patch_assignment, patch_binop,
15877 patch_cast, array_constructor_check_entry, patch_return,
15878 patch_conditional_expr): Use xstrdup, not strdup.
15880 * zextract.c (ALLOC): Use xmalloc, not malloc.
15882 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15884 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15886 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
15887 (do_spec, lang_specific_pre_link, lang_specific_driver,
15888 input_filename, input_filename_length): Don't declare.
15889 (main_class_name, jvgenmain_spec, lang_specific_driver):
15891 (lang_specific_driver): All calls to the function pointer
15892 parameter now explicitly call `fatal'.
15894 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15896 * parse.y (find_applicable_accessible_methods_list): Search
15897 abstract classes as interfaces.
15899 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15901 * class.c (finish_class): We're now outside a valid method
15902 declaration. Tell the rest of gcc so.
15904 1999-09-08 Bruce Korb autogen@linuxbox.com
15906 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
15908 1999-09-07 Tom Tromey <tromey@cygnus.com>
15910 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
15912 (decode_signature_piece): Don't emit "::" in JArray<>.
15913 (print_namelet): Only print trailing `;' when printing a class.
15915 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
15917 * java-tree.h: Delete declarations for all tree nodes now moved to
15919 * decl.c: Delete their definitions.
15921 1999-09-04 Mark Mitchell <mark@codesourcery.com>
15923 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
15924 * Makefile.in (OBJS): Add ggc-callbacks.o.
15925 (OBJDEPS): Likewise.
15927 1999-09-03 Tom Tromey <tromey@cygnus.com>
15929 * parse.y (strip_out_static_field_access_decl): Return operand if
15930 it satisfies JDECL_P.
15932 1999-09-02 Tom Tromey <tromey@cygnus.com>
15934 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
15935 Handle nested arrays, like `[[I'.
15937 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15939 * class.c (finish_class): Remove unused parameter, all callers
15942 * expr.c (build_java_athrow): Change return type to void.
15943 (java_lang_expand_expr): Make sure each case in switch returns a
15946 * java-tree.h (finish_class): Fix prototype to take void args.
15948 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
15949 (main): Issue return from main, not exit.
15951 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
15953 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
15955 * jv-scan.c (main): Issue return from main, not exit.
15957 * parse.y (check_abstract_method_definitions,
15958 java_check_abstract_method_definitions): Add static prototypes.
15959 (java_complete_expand_methods): Fix call to `finish_class'.
15961 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
15964 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15966 * lang.c (language_string): Constify.
15968 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15970 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
15971 Remove hacks for stuff which comes from libiberty.
15973 * Make-lang.in: Likewise.
15975 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
15977 * Makefile.in (xref.o): Depend on xref.c explicitly.
15979 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15981 * java-tree.h (lang_printable_name): Constify a char*.
15983 * lang.c (lang_printable_name): Likewise.
15985 1999-08-27 Jeffrey A Law (law@cygnus.com)
15987 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
15988 comments in C code.
15990 1999-08-26 Tom Tromey <tromey@cygnus.com>
15992 * gjavah.c (print_cxx_classname): Print "::" before qualified
15995 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
15997 * parse.y (lookup_cl): Changed leading comment. Now does its best
15998 to set the column number.
15999 (qualify_ambiguous_name): Take WFL wrappers into account.
16001 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
16003 * verify.c (verify_jvm_instructions): Don't check instruction
16004 validity beyond end of method.
16006 1999-08-25 Tom Tromey <tromey@cygnus.com>
16008 * jvspec.c (lang_specific_driver): Correctly handle --help again.
16010 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16012 * gjavah.c (print_name, print_base_classname, utf8_cmp,
16013 cxx_keyword_subst, generate_access, name_is_method_p,
16014 get_field_name, print_field_name, super_class_name, print_include,
16015 decode_signature_piece, print_class_decls, usage, help,
16016 java_no_argument, version, add_namelet, print_namelet): Add static
16018 (print_base_classname, utf8_cmp, cxx_keyword_subst,
16019 name_is_method_p): Constify a char*.
16020 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
16021 Provide a final else clause in an if-else-if.
16022 (print_field_info): Add missing final arg in function call to
16023 `print_field_name'.
16024 (print_method_info, decompile_method, decode_signature_piece,
16025 print_c_decl, print_full_cxx_name, print_stub,
16026 print_mangled_classname, super_class_name, print_include,
16027 add_namelet, add_class_decl, print_class_decls, process_file,
16028 help): Constify a char*.
16030 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
16031 push_int_const, find_constant_wide, find_constant_index,
16032 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
16033 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
16034 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
16035 emit_if, emit_goto, emit_jsr, call_cleanups,
16036 make_class_file_name): Add static prototypes.
16037 (generate_bytecode_return, generate_bytecode_insns): Pass a
16038 NULL_PTR, not a NULL_TREE.
16040 * jv-scan.c: Include "jcf.h".
16041 (main): Declare using DEFUN macro.
16043 * jvspec.c (find_spec_file, lang_specific_pre_link,
16044 lang_specific_driver): Add prototypes.
16045 (find_spec_file): Constify a char*.
16047 * keyword.gperf (hash, java_keyword): Add prototypes.
16049 * lang.c (lang_print_error): Add static prototype.
16050 (lang_init): Prefer memcpy over bcopy to avoid casts.
16052 * lex.c (yylex): Add static prototype.
16054 * parse-scan.y: Include "lex.c" earlier.
16056 * parse.h: Remove redundant declaration for `yylex'.
16058 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
16059 labeled_block_contains_loop_p): Add static prototypes.
16060 (not_accessible_p): Make static to match prototype.
16062 * verify.c (start_pc_cmp): Don't needlessly cast away const.
16064 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16066 * parse.y (check_method_redefinition): Changed leading comment.
16067 (check_abstract_method_definitions): New function.
16068 (java_check_abstract_method_definitions): New function.
16069 (java_check_regular_methods): Call it.
16070 (verify_constructor_super): Fixed indentation.
16071 (lookup_method_invoke): Likewise.
16073 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16075 * parse.y (method_header): Return a null pointer if the current
16076 class node is null.
16077 (finish_method_declaration): Return if the current function decl
16079 (source_start_java_method): Likewise.
16080 (java_method_add_stmt): Likewise.
16082 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16084 * class.c (emit_register_class): Removed unnecessary call to
16086 * parse.y (labeled_block_contains_loop_p): Removed unused local
16089 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16091 * parse.y (java_refold): Added prototype.
16093 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16095 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
16096 (java_stabilize_reference): Removed unnecessary `else'.
16097 (java_complete_lhs): Set flag to remember boolean. Call
16098 java_refold. Added comments.
16099 (java_decl_equiv): New function.
16100 (binop_compound_p): Likewise.
16101 (java_refold): Likewise.
16102 (patch_unaryop): Striped static field access assigned to decl and
16103 op. Changed promotion scheme for ++/-- operators.
16104 (search_loop): New function.
16105 (labeled_block_contains_loop_p): Likewise.
16106 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
16108 (patch_bc_statement): Call search_loop. Fixed comment.
16110 1999-08-14 Anthony Green <green@cygnus.com>
16112 * expr.c (java_lang_expand_expr): Mark static array data as
16115 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
16117 * jvgenmain.c (main): NUL-terminate name_obstack.
16119 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16121 * check-init.c (check_bool2_init, done_alternative): Add static
16124 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
16125 (add_method, build_utf8_ref, build_class_ref,
16126 append_gpp_mangled_type, layout_class_method): Constify a char*.
16128 * decl.c (push_promoted_type, make_binding_level): Add static
16130 (push_promoted_type, pushdecl): Constify a char*.
16132 * except.c (find_handler_in_range, link_handler,
16133 check_start_handlers): Add static prototypes.
16135 * expr.c (process_jvm_instruction): Constify a char*.
16137 * gjavah.c (main): Constify a char*.
16139 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
16142 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
16144 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
16145 munge, print_ents): Constify a char*.
16147 * jcf-dump.c (disassemble_method): Constify a char*.
16148 (print_constant_pool, print_exception_table): Add static prototypes.
16149 (print_constant, print_exception_table, main, disassemble_method):
16152 * jcf-io.c (find_classfile, find_class): Likewise.
16154 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
16155 (set_source_filename, predefined_filename_p): Add static prototypes.
16156 (set_source_filename, get_constant, get_class_constant,
16157 find_in_current_zip): Constify a char*.
16159 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
16161 (add_entry, add_path, jcf_path_classpath_arg,
16162 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16164 * jcf-reader.c (get_attribute, jcf_parse_preamble,
16165 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
16166 jcf_parse_one_method, jcf_parse_methods,
16167 jcf_parse_final_attributes): Add static prototypes.
16168 (get_attribute): Constify a char*.
16170 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
16171 jcf_dependency_add_target, jcf_path_classpath_arg,
16172 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16174 * jv-scan.c (main): Constify a char*.
16175 (gcc_obstack_init): Add prototype arguments.
16177 * jvgenmain.c (gcc_obstack_init): Likewise.
16178 (main): Constify a char*.
16180 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
16182 (put_decl_string, lang_print_error): Constify a char*.
16183 (lang_init): Remove redundant extern prototype.
16185 * mangle.c (emit_unicode_mangled_name): Constify a char*.
16187 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
16188 Add static prototypes.
16189 (get_type_from_signature): Constify a char*.
16191 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
16192 Add static prototypes.
16193 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
16194 (verify_jvm_instructions): Constify a char*.
16196 * xref.c (xref_flag_value): Likewise.
16198 * xref.h (xref_flag_value): Likewise.
16200 * zextract.c (makeword, makelong): Add static prototypes.
16201 (makeword, makelong): Constify a uch*.
16203 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16205 * lang.c (java_dummy_print): Constify a char*.
16206 (lang_print_error): Likewise.
16207 (lang_init): Remove redundant prototype for `print_error_function'.
16208 (lang_init_source): Likewise.
16209 (lang_identify): Constify a char*.
16211 1999-08-09 Tom Tromey <tromey@cygnus.com>
16213 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
16214 (WORDS_TO_LONG): Likewise.
16215 (WORDS_TO_DOUBLE): Likewise.
16217 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16219 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
16221 * expr.c (java_stack_pop, java_array_data_offset,
16222 build_java_throw_out_of_bounds_exception, case_identity,
16223 build_java_check_indexed_type): Add static prototypes.
16224 (linenumber_table, expand_invoke, expand_java_field_op,
16225 build_primtype_type_ref, expand_byte_code): Constify a char*.
16227 * java-tree.h (build_primtype_type_ref, linenumber_table):
16229 (java_lang_expand_expr): Add prototype.
16231 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
16232 `java_lang_expand_expr'.
16234 * lex.c (java_lex_error): Constify a char*.
16235 (java_get_unicode, java_read_char, java_allocate_new_line,
16236 java_unget_unicode, java_sneak_unicode): Prototype.
16238 * parse-scan.y (current_class, package_name, method_declarator,
16239 report_class_declaration, yyerror): Constify a char*.
16241 * parse.h (java_report_errors): Prototype.
16242 (yyerror): Constify a char*.
16244 * parse.y (classitf_redefinition_error, check_modifiers,
16245 parse_jdk1_1_error, lookup_package_type,
16246 lookup_package_type_and_set_next, get_printable_method_name,
16247 purify_type_name): Constify a char*.
16248 (build_super_invocation, maybe_generate_finit,
16249 verify_constructor_super, parser_add_interface,
16250 add_superinterfaces, jdep_resolve_class, note_possible_classname,
16251 java_complete_expand_methods, java_expand_finals,
16252 cut_identifier_in_qualified, java_stabilize_reference,
16253 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
16254 merge_string_cste): Prototype.
16255 (single_type_import_declaration, yyerror,
16256 variable_redefinition_error, build_array_from_name,
16257 build_unresolved_array_type, check_class_interface_creation,
16258 resolve_class, complete_class_report_errors,
16259 note_possible_classname, read_import_dir,
16260 find_in_imports_on_demand, resolve_package, fix_constructors,
16261 check_deprecation, lookup_method_invoke,
16262 maybe_build_primttype_type_ref, array_constructor_check_entry):
16264 (java_complete_expand_methods, java_expand_finals): Make static.
16265 (convert_narrow): Remove static prototype.
16267 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
16269 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16271 1999-08-02 Richard Henderson <rth@cygnus.com>
16273 * decl.c: Include defaults.h instead of expr.h.
16274 * parse.y: Likewise.
16276 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
16278 * java/decl.c (start_java_method): Change all uses of
16279 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16280 Ensure expr.h is included.
16281 * java/expr.c (pop_arguments): Ditto.
16282 * java/parse.y (expand_start_java_method): Ditto.
16284 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16286 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16288 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
16290 * decl.c: Include "function.h".
16291 * except.c: Likewise.
16292 * parse.y: Likewise.
16293 * Makefile.in: Update dependencies.
16295 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16297 * expr.c (build_java_soft_divmod): Provide a default case in switch.
16298 (java_lang_expand_expr): Mark parameters `target', `tmode' and
16299 `modifier' with ATTRIBUTE_UNUSED.
16301 * gjavah.c (process_file): Add braces around ambiguous `else'.
16303 * jcf-dump.c (print_access_flags, localvar_free): Change return
16306 * parse.y (java_complete_expand_method): Initialize variable
16308 (resolve_qualified_expression_name): Likewise for `field_decl'.
16309 (patch_method_invocation): Likewise for `class_to_search'.
16310 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16311 (patch_assignment): Likewise for `lhs_type'.
16313 * verify.c (verify_jvm_instructions): Remove unused variable
16316 1999-07-25 Richard Henderson <rth@cygnus.com>
16318 * decl.c (va_list_type_node): New.
16320 1999-07-25 Anthony Green <green@cygnus.com>
16322 * gjavah.c (print_stub): New function.
16323 (METHOD_IS_NATIVE): New macro.
16324 (print_mangled_classname): Make static.
16325 (HANDLE_END_FIELD): Don't emit fields during stub generation.
16326 (process_file): Perform stub generation.
16327 (HANDLE_METHOD): Don't emit class decls during stub
16329 (HANDLE_END_METHOD): Take into account stub generation.
16330 (print_method_info): Handle stub generation.
16331 (print_stub): New function.
16332 (print_cxx_classname): Make signature consistant with others.
16333 (help): Describe -stubs option.
16334 (main): Create stub file.
16335 (version): Use version.c.
16336 (print_full_cxx_name): New function.
16337 (print_c_decl): Use print_full_cxx_name.
16339 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16341 * check-init.c (check_init): Handle MAX_EXPR.
16343 1999-07-15 Andrew Haley <aph@cygnus.com>
16345 * lang.c (flag_use_divide_subroutine): New variable.
16346 * typeck.c: (convert_ieee_real_to_integer): Bounds check
16347 fp-to-integer conversion.
16348 (convert): Call convert_ieee_real_to_integer when flag_fast_math
16351 * expr.c (build_java_soft_divmod): New function.
16352 (build_java_binop): Call build_java_soft_divmod if
16353 flag_use_divide_subroutine is set.
16354 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16355 soft_lrem_node: new builtin functions.
16356 (init_decl_processing) Initialize the new builtins.
16357 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16358 soft_lrem_node: new builtin functions.
16359 (build_java_soft_divmod): New function.
16360 * parse.y: Call build_java_soft_divmod if
16361 flag_use_divide_subroutine is set.
16362 * parse.c: Rebuilt.
16364 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16365 a --specs= arg) even if not linking.
16366 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16367 -fuse-divide-subroutine
16369 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16371 * parse.y (resolve_and_layout): Check methods only once.
16372 (resolve_qualified_expression_name): Verify thrown exceptions
16374 (check_thrown_exceptions): Reject exceptions thrown in
16375 initializer. Error message tuned.
16377 1999-07-14 Andrew Haley <aph@cygnus.com>
16379 * expr.c (expand_expr): Do not return the last statement in a
16380 block as the block's value.
16382 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16384 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16385 CALL_EXPR, to avoid order of evaluation changes.
16387 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16389 * parse.y (qualify_ambiguous_name): Do not use
16390 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16392 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16394 * check-init.c (check_init): Handle MAX_EXPR.
16395 * expr.c (force_evaluation_order): Force method call arguments to
16396 be evaluated in left-to-right order.
16397 * parse.y (qualify_ambiguous_name): Loop again to qualify
16398 NEW_ARRAY_EXPR properly.
16400 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16402 * parse.y (patch_invoke): Resolve unresolved invoked method
16404 (qualify_ambiguous_name): STRING_CST to qualify expression for
16405 type name resolution.
16407 1999-06-24 Andrew Haley <aph@cygnus.com>
16409 * class.c (finish_class): Whenever a deferred method is
16410 output, rescan the list of methods to see if a new candidate for
16411 output can be found.
16413 1999-06-28 Tom Tromey <tromey@cygnus.com>
16415 * jvspec.c (lang_specific_driver): Recognize --help.
16417 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16419 * parse.y (resolve_package): Fixed bogus return statement.
16420 (patch_method_invocation): Resolve method invocation beginning with
16421 a package name qualifier.
16423 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16425 * Make-lang.in (java.stage1): Depend on stage1-start.
16426 (java.stage2): Likewise for stage2-start.
16427 (java.stage3): Likewise for stage3-start.
16428 (java.stage4): Likewise for stage4-start.
16430 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16432 * parse.y (java_complete_lhs): When doing cross referencing, don't
16433 try to keep file location on a WFL expanded as a CALL_EXPR.
16435 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16437 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16438 compiling to class file a void method with an empty method body.
16439 As a side effect, the bytecode backend will generate the
16440 appropriate `return' instruction.
16442 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16444 * parse.y (lookup_package_type_and_set_next): New function prototype.
16445 (resolve_package): Search current and imported packages.
16446 (lookup_package_type_and_set_next): New function.
16448 1999-06-22 Andrew Haley <aph@cygnus.com>
16450 * verify.c (verify_jvm_instructions): Check for pending blocks
16451 before invalid PC test and opcode switch, not after.
16453 1999-06-21 Andrew Haley <aph@cygnus.com>
16455 * except.c (find_handler_in_range): The upper limit for exception
16456 ranges is exclusive, not inclusive: (start <= pc < end).
16457 (link_handler): find child pointer which points to outer by
16458 searching sibling list: previous code incorrectly assumed that
16459 outer->outer->first_child must point to outer.
16460 * verify.c (verify_jvm_instructions): FIXME added to code for
16462 (verify_jvm_instructions): Do not assume that the last block
16463 processed in a subroutine is a block which ends with a `ret'
16464 instruction. With some control flows it is possible that the last
16465 block ends with an `athrow'.
16467 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16469 * parse.y (qualify_ambiguous_name): Reorganized the post
16470 evaluation of non WFL leading expression nodes.
16472 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16474 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16477 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16479 * parse.y (qualify_ambiguous_name): Handle qualified expression
16480 beginning with a STRING_CST.
16482 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16484 * parse.y (register_fields): Set DECL_INITIAL on both
16485 pre-initialized static and public fields.
16486 (resolve_field_access): Static field access expressions to always
16488 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16489 qualification. CONVERT_EXPR to be resolved as an expression name.
16490 (java_complete_lhs): Identify and access qualified final
16491 initialized field in switch statement case expression.
16492 (fold_constant_for_init): Pre-initialized field decl constant to
16495 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16497 * parse.y (note_possible_classname): Mark returned node with
16498 QUALIFIED_P only if the original class name contained a '/'.
16500 1999-06-05 Anthony Green <green@cygnus.com>
16502 * Make-lang.in (gcjh): More parallel build fixes.
16504 1999-06-03 Mike Stump <mrs@wrs.com>
16506 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16508 1999-06-02 Anthony Green <green@cygnus.com>
16510 * except.c (link_handler): Chain exception handlers in order.
16512 1999-06-02 Anthony Green <green@cygnus.com>
16514 * expr.c (expand_byte_code): Fill unreachable bytecode regions
16515 with nops and process as usual in order to always set correct EH
16516 ranges. Emit detailed warnings about unreachable bytecodes.
16518 1999-06-02 Anthony Green <green@cygnus.com>
16520 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16523 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16525 * parse.y (lookup_field_wrapper): Unified returned value to NULL
16526 or the searched field decl.
16528 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16530 * parse.y (fold_constant_for_init): Convert numerical constant
16531 values to the type of the assigned field.
16533 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16535 * expr.c (lookup_field): Relaxed the test on class loading error
16537 * parse.y (fold_constant_for_init): Enabeled old code.
16539 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16541 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16542 decide the validity of the cast of a java.lang.Cloneable reference
16544 (patch_conditional_expr): Fixed first argument passed to
16545 binary_numeric_promotion.
16547 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16549 * parse.y (qualify_ambiguous_name): Take into account that a
16550 CONVERT_EXPR might specify a type as a WFL.
16552 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16554 * parse.y (patch_assignment): Save the rhs before using it as an
16555 argument to _Jv_CheckArrayStore.
16557 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16559 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16561 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16563 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16564 floating point literal only when the exponent indicator has been
16567 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16569 * parse.y (formal_parameter:): Construct argument tree list
16570 element even if a yet unsupported final parameter was encountered.
16572 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16574 * parse.y (finish_method_declaration): Issue errors for native or
16575 abstract methods declared with a method body, as well as for non
16576 native or non abstract methods with no method body.
16578 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16580 * class.c (build_utf8_ref): Initialize variable `field'.
16582 * decl.c (init_decl_processing): Initialize variable `field'.
16584 * expr.c (build_known_method_ref): Mark parameters `method_type',
16585 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16586 (process_jvm_instruction): Likewise for parameter `length'.
16588 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16589 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16592 * parse.y (maybe_generate_clinit): Remove unused variable
16593 `has_non_primitive_fields'.
16594 (find_in_imports_on_demand): Initialize variables `node_to_use'
16596 (patch_binop): Likewise for variable `prom_type'.
16597 (patch_unaryop): Likewise for variable `prom_type'.
16599 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16601 * xref.c (xref_table): Add missing initializer.
16603 1999-05-14 Tom Tromey <tromey@cygnus.com>
16605 * java-except.h (struct eh_range): Removed unused `next' member.
16606 * verify.c (verify_jvm_instructions): Call check_nested_ranges
16607 after adding all exception handlers. Sort exception ranges in
16609 (struct pc_index): New structure.
16610 (start_pc_cmp): New function.
16611 * except.c (add_handler): Return `void'. Don't call link_handler;
16612 instead construct an ordinary linked list and do range
16614 (check_nested_ranges): New function.
16615 (link_handler): Changed interface to allow merging of eh_ranges.
16616 Split overlapping ranges. Return `void'.
16618 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16620 * parse.y (constructor_block_end:): New rule, tagged <node>.
16621 (constructor_body:): Use `constructor_block_end' instead of
16624 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16626 * parse.y (statement_nsi:): Pop `for' statement block.
16627 (java_complete_lhs): Labeled blocks containing no statement are
16628 marked as completing normally.
16630 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16632 * xref.c (xref_set_current_fp): New function, defined.
16633 * xref.h (xref_set_current_fp): New function, prototyped.
16635 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16637 * check-init.c (check_init): Take into account that
16638 LABELED_BLOCK_STMT can be empty.
16640 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16642 * parse.y (java_check_regular_methods): Warning check on not
16643 overriding methods with default access in other packages does not
16644 apply to `<clinit>'.
16645 (java_complete_lhs): If block body is an empty_stmt_node, replace
16646 it by NULL_TREE. This prevents gcc from generating an irrelevant
16649 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16651 * check-init.c (check_init): Removed code accepting to see things
16652 falling through default:, when doing xrefs.
16653 * java-tree.h (do_not_fold): New global variable, declared.
16654 * parse.y (do_not_fold): New global variable, defined.
16655 (java_complete_expand_method): Set `do_not_fold' to the value of
16656 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16657 and reinstall them after them have been purged; do not check for
16658 initializations; do not issue missing return errors.
16659 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16661 (patch_binop): Skip the fold part when doing xrefs.
16662 (build_string_concatenation): Skip the concatenation part when
16664 (patch_synchronized_statement): Do not generate a try-finally when
16666 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16667 and keep the location where the throw was seen.
16668 * typeck.c (convert): When `do_not_fold' is set, do not attempt
16669 any treatment on the converted node an simply return a NOP_EXPR of
16671 * xref.c (xref_get_data): New function, defined.
16672 * xref.h (xref_get_data): New function, declared.
16673 (XREF_GET_DATA): Use xref_get_data.
16675 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16677 * gjavah.c (print_include): Cast the result of `strlen' to int
16678 when comparing against a signed value.
16679 (add_namelet): Likewise.
16681 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16683 * expr.c (expand_invoke): Mark parameter `nargs' with
16685 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16687 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16690 * jcf-reader.c (get_attribute): Cast a value to long
16691 when comparing against a signed expression. Likewise.
16693 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16694 HOST_BITS_PER_CHAR.
16696 1999-05-11 Andrew Haley <aph@cygnus.com>
16698 * parse.y (source_end_java_method): If the current method contains
16699 any exception handlers, force asynchronous_exceptions: this is
16700 necessary because signal handlers in libjava may throw exceptions.
16701 * decl.c (end_java_method): Ditto.
16703 1999-05-11 Tom Tromey <tromey@cygnus.com>
16705 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16707 * jvspec.c (THREAD_NAME): Removed.
16708 (GC_NAME): Likewise.
16709 (MATHLIB): Likewise.
16710 (WITHLIBC): Likewise.
16712 (THREADLIB): Likewise.
16713 (MATH_LIBRARY): Likewise.
16714 (lang_specific_driver): Don't add `-l' options to command line.
16715 Instead, add a single --specs option. Recognize `-L' options and
16716 use them to search for spec file.
16717 (find_spec_file): New function.
16718 (SPEC_FILE): New define.
16720 1999-05-11 Dave Brolley <brolley@cygnus.com>
16722 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16723 cpplib-enabled build.
16725 1999-05-05 Per Bothner <bothner@cygnus.com>
16727 * class.c (make_field_value): DECL_INITIAL may be a string literal;
16728 temporarily zero it while calling rest_of_decl_compilation.
16730 * java-tree.h (string_ptr_type_node): Add declaration.
16731 * decl.c: Define and initialize string_ptr_type_node.
16732 * parse.y (patch_string_cst): Use string_ptr_type_node.
16734 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
16735 * parse.y (for_statement): Now unconditionally exit_block.
16736 (finish_labeled_statement): No longer exit_block if for-loop.
16737 (patch_loop_statement): Check harder if the loop is already labeled.
16739 * parse.y (patch_initialized_static_field): Removed function.
16740 (maybe_generate_clinit): Removed special handling for interfaces.
16741 (java_complete_expand_methods): Do a preliminary java_complete_tree
16742 on <clinit> to determine if it can be removed.
16743 (java_complete_expand_method): Remove special handling for <clinit>.
16744 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
16745 optimize if we get back empty_stmt_node.
16746 For MODIFY_EXPR, re-do checking of static initializers.
16747 (fold_constant_for_init): Don't return immediate if VAR_DECL.
16748 For VAR_DECL, pass correct context.
16750 * verify.c (verify_jvm_instructions): Better error messages.
16752 1999-05-03 Tom Tromey <tromey@cygnus.com>
16754 * parse-scan.y (interface_declaration): Call
16755 report_class_declaration for interfaces.
16757 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
16759 * Makefile.in: Remove -v from bison command lines.
16761 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16763 * check-init.c (check_init): Exclude a case of error when doing
16765 * class.c (layout_class_method): Don't generate the error message
16766 twice when compiling from source.
16767 * lang-options.h: Added `-Wredundant-modifers' and
16768 `-Wunusupported-jdk11' flags and help text.
16769 * lang.c (lang_decode_option): Added support for
16770 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
16771 flag_static_local_jdk11 and flag_redundant set accordingly.
16772 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16773 * parse.h (EXPR_WFL_ADD_COL): New macro.
16774 (DECL_END_SOURCE_LINE): Likewise.
16775 (DECL_INHERITED_SOURCE_LINE): Likewise.
16776 * parse.y (static_ref_err): New function, prototyped.
16777 (CCB_TK): Now tagged <operator>.
16778 (class_body:): Remember the location of the closing '}' of a class
16779 definition when doing xrefs.
16780 (block:): Likewise.
16781 (block_end:): Likewise.
16782 (create_class): Remember the location of the inherited class
16783 identifier when doing xrefs.
16784 (register_fields): Added test on first operand of `init' before
16785 testing it TREE_CODE.
16786 (method_header): Store the location of the class identifier in the
16787 class decl when doing xrefs.
16788 (finish_method_declaration): Don't combine first/last method line
16790 (java_check_regular_methods): Warning check on not overriding
16791 methods with default access on other packages move before check on
16792 static methods. Initialization of `aflags' also moved up.
16793 (resolve_expression_name): Call static_ref_err to report the error.
16794 (static_ref_err): New function, implemented.
16795 (resolve_field_access): Returned simplified static field access
16797 (resolve_qualified_expression_name): Check for illegal use of
16798 static fields in a non static context. Call static_ref_err to
16799 report error in various places.
16800 (java_complete_tree): Do not fold initialized static fields when
16802 (java_complete_lhs): Likewise.
16804 1999-04-29 Anthony Green <green@cygnus.com>
16806 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16807 create internal labels.
16808 (lookup_label): Ditto.
16810 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16812 * class.c (layout_class_method): Generate <clinit>'s rtl for
16814 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
16815 for interfaces' <clinit>.
16816 * expr.c (lookup_field): Search for fields in interfaces.
16817 (expand_invoke): Fixed indentation.
16818 (expand_java_field_op): Likewise. Use IS_CLINIT.
16819 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16820 (IS_CLINIT): New macro.
16821 * parse.y (type_declaration:): Call maybe_generate_clinit after an
16822 interface was parsed.
16823 (maybe_generate_clinit): Don't generate if the current class is an
16824 interface with only fields of primitive types.
16825 (reset_method_name): Use IS_CLINIT.
16826 (java_complete_expand_method): Expand <clinit> when it exists for
16827 interfaces. Use IS_CLINIT.
16828 (resolve_expression_name): Use DECL_CONTEXT instead of
16829 current_class to build static field references.
16830 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
16831 ARRAY_REF when doing xreferencing.
16832 (check_final_assignment): Fixed typo in leading comment. Use
16834 (patch_array_ref): Don't fully expand array references when
16836 (patch_return): Use IS_CLINIT.
16837 (patch_throw_statement): Likewise.
16839 1999-04-22 Tom Tromey <tromey@cygnus.com>
16841 * Make-lang.in (JAVA_SRCS): Added check-init.c.
16843 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
16845 * decl.c (predef_filenames, predef_filenames_size): New globals
16846 (init_decl_processing): predef_filenames and predef_filenames_size
16848 * java-tree.h (predef_filenames, predef_filenames_size): Declared
16850 * jcf-parse.c (predefined_filename_p): New function.
16851 (yyparse): Check that files on the command line are specified only
16852 once and issue a warning otherwise.
16853 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16854 * parse.y (source_end_java_method): Nullify NOP method bodies, to
16855 avoid a gcc warning with -W -Wall turned on.
16856 (java_expand_classes): Abort if errors were encountered.
16857 (java_complete_lhs): If the cross reference flag is set, wrap
16858 field DECL node around a WFL when resolving expression name.
16860 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16862 * lang.c (lang_decode_option): Fixed returned value when parsing
16863 `-fxref=...' and `-Wall'.
16864 * parse.y (source_end_java_method): Do not generate code when
16865 flag_emit_xref is set.
16866 (resolve_expression_name): Do not build static field access when
16867 flag_emit_xref is set.
16868 (resolve_field_access): No special treatment on `length' when
16869 flag_emit_xref is set. Do not build qualified static field access
16870 when flag_emit_xref is set.
16871 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
16872 when flag_emit_xref is set.
16873 (patch_assignment): Do not generate array store runtime check when
16874 flag_emit_xref is set.
16875 * xref.c (xref_flag_value): Fixed function declaration
16877 (xset_set_data): New function.
16878 * xref.h (xref_set_data): Added prototype for new function.
16879 (typedef struct xref_flag_table): New field data.
16880 (XREF_GET_DATA): New macro.
16882 1999-04-19 Tom Tromey <tromey@cygnus.com>
16884 * xref.h (enum): Removed trailing comma.
16886 * parse.y (resolve_qualified_expression_name): Added missing
16889 1999-04-15 Anthony Green <green@cygnus.com>
16891 * gjavah.c: New prototypes for java_float_finite and
16892 java_double_finite.
16894 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16896 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
16899 1999-04-06 Jeffrey A Law (law@cygnus.com)
16901 * Makefile.in (TREE_H): Add tree-check.h.
16902 (RTL_H): Add genrtl.h.
16904 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
16906 * parse.y (patch_assignment): Added ArrayStoreException runtime
16909 1999-04-06 Per Bothner <bothner@cygnus.com>
16911 * expr.c (pop_type_0): New function.
16912 (pop_type): Use pop_type_0.
16913 * java-tree.h (pop_type_0): New declaration.
16914 * verify.c (verify_jvm_instructions): Check return instructions.
16916 * parse.y (patch_binop): Don't fold if non-constant and emiting
16919 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16921 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
16923 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
16924 (main_jcf): Don't define.
16925 (process_file): Don't set `main_jcf'.
16927 * java-tree.h (main_jcf): Don't declare.
16929 * jcf-parse.c (main_jcf): Add static definition.
16931 * lang.c (main_jcf): Don't define.
16933 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16935 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
16937 * decl.c (copy_lang_decl): Likewise for `bcopy'.
16939 * jcf-depend.c: Include "config.h", not <config.h>.
16941 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
16944 * jcf-path.c: Include "config.h", not <config.h>.
16946 * lex.c: Don't include various system header files.
16947 (java_init_lex): Cast the argument of `bzero' to PTR
16949 * parse-scan.y (java_push_parser_context): Likewise.
16951 * parse.y (java_push_parser_context): Likewise.
16952 (patch_bc_statement): Match format specifier to variable argument.
16954 * xref.c: Don't include <stdio.h>.
16956 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
16958 * parse.y (struct parser_ctxt *ctxp): Now global.
16959 (declare_local_variables): Use WFL compound value for the
16960 declaration source line value, when doing cross-referencing.
16962 1999-03-31 Tom Tromey <tromey@cygnus.com>
16964 * gjavah.c (print_field_info): Allow constants of other types.
16965 (print_include): Generate include when new name is proper prefix
16966 of already printed name.
16967 (add_namelet): Likewise.
16968 (cxx_keyword_subst): New function.
16969 (print_method_info): Use it.
16970 (print_field_name): New function.
16971 (get_field_name): New function.
16972 (print_field_info): Use get_field_name and print_field_name.
16974 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16976 * Makefile.in (keyword.h): Generate using gperf language 'C', not
16977 'KR-C', so gperf uses the `const' keyword on strings.
16979 * keyword.gperf (java_keyword): Const-ify a char*.
16981 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16983 * parse.y (patch_bc_statement): Fixed identation and a bogus
16986 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16988 * parse.y (patch_assignment): Allow static variables in other
16989 classes to be assigned.
16991 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16993 * class.c (maybe_add_interface): Remove unused variable
16995 (make_class_data): Use = for assignment, not ==. Likewise.
16996 (emit_register_classes): Remove unused variable `decl'.
16998 * lex.c: Fix comment so as not to contain an embedded `/*'.
17000 * verify.c (verify_jvm_instructions): Remove unused variable
17003 1999-03-27 Per Bothner <bothner@cygnus.com>
17005 * parse.y (complete_loop_body): Rename to finish_loop_body.
17006 (complete_labeled_statement): Rename to finish_labeled_statement.
17007 (complete_for_loop): Rename to finish_for_loop.
17008 (complete_method_declaration): Rename to finish_method_declaration.
17010 * java-tree.h (continue_identifier_node): New global node.
17011 * decl.c: Define and initialize continue_identifier_node.
17012 * parse.y (generate_labeled_block): Remove - no longer needed.
17013 (build_loop_body): Use continue_identifier_node for continue block.
17014 (finish_labeled_statement): Also do pop_labeled_block actions.
17015 (java_complete_lhs): POP_LOOP even if error.
17016 (build_labeled_block): Special handling for continue_identifier_node.
17017 (patch_loop_statement): Re-organize.
17018 (patch_bc_statement): Re-write.
17020 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17022 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
17023 using a WFL compound value.
17024 * parse.y (xref.h): Include.
17025 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
17026 WFL compound value.
17027 (register_fields): Set WFL compound value to lineno if doing
17029 (java_complete_expand_method): Call expand_xref if flag_emit_xref
17031 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
17032 * xref.h (expand_xref): Prototype renamed from xref_generate.
17034 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17036 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
17037 (GET_CURRENT_BLOCK): New macro.
17038 * parse.y (current_static_block): New global variable.
17039 (method_body:): Define action.
17040 (complete_method_declaration): Set current_function_decl to NULL
17041 when work on the current method is done.
17042 (declare_local_variables): Use GET_CURRENT_BLOCK.
17043 (java_method_add_stmt): Likewise.
17044 (java_complete_expand_method): Disable the use of `this' when
17045 expanding <clinit>.
17046 (enter_a_block): If no current method exist, use
17047 current_static_block to link static initializer blocks.
17048 (exit_block): Rewritten to use current_static_block when no current
17049 method decl exists.
17050 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
17051 (patch_return): Forbid the use of `return' in static initializers.
17052 (patch_throw_statement): Fixed indentation. Issue specific error
17053 for uncaught thrown checked exception in static initializer
17054 blocks. Removed FIXME.
17056 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
17058 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
17059 Link gcj from gcc.o.
17061 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
17063 * parse.y (find_applicable_accessible_methods_list): When dealing
17064 with interface: ensure that a given interface or java.lang.Object
17065 are searched only once.
17067 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17069 * gjavah.c (print_c_decl): Remove unused argument `flags'.
17071 * jcf-dump.c (print_access_flags): Add braces around if-else.
17073 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
17076 * lex.c (build_wfl_node): Add static prototype.
17078 * lex.h (build_wfl_node): Remove static prototype.
17080 * parse.y: Include lex.c early enough to declare everything needed.
17081 Ensure calls to `build_wfl_node' pass the proper arguments.
17082 (create_class): Remove unused variable `super_decl'.
17083 (get_printable_method_name): Initialize variable `name'.
17085 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17087 * Changelog: Fixed 1999-03-22 typos.
17088 * lang.c (lang_decode_option): Fixed typo in error string in the
17091 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17093 * Makefile.in (JAVA_OBJS): Added entry xref.o.
17094 (xref.o): New rule.
17095 * java-tree.h (flag_emit_xref): Declared extern.
17096 * lang.c (xref.h): Included.
17097 (flag_emit_xref): New global variable.
17098 (lang_decode_option): Added support for -fxref.
17100 * xref.h: Likewise.
17102 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
17104 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
17107 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17109 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
17110 $(srcdir)/../system.h and $(JAVA_TREE_H).
17111 (jcf-io.o): Depend on $(JAVA_TREE_H).
17112 (mangle.o): Likewise.
17114 * check-init.c (check_cond_init): Add static prototype.
17116 * class.c (build_java_method_type, hashUtf8String,
17117 make_field_value, get_dispatch_vector, get_dispatch_table,
17118 append_gpp_mangled_type, mangle_static_field): Likewise.
17119 (strLengthUtf8): Hide unused definition.
17120 (hashUtf8String): Const-ify.
17121 (make_field_value): Un-ANSI-fy.
17123 * constants.c: Move inclusion of jcf.h above java-tree.h.
17124 (set_constant_entry, find_class_or_string_constant,
17125 find_name_and_type_constant, get_tag_node,
17126 build_constant_data_ref): Add static prototype.
17128 * decl.c (push_jvm_slot, builtin_function,
17129 lookup_name_current_level): Likewise.
17130 (builtin_function): Const-ify.
17132 * except.c (expand_start_java_handler, expand_end_java_handler):
17133 Add static prototype.
17135 * expr.c (flush_quick_stack, push_value, pop_value,
17136 java_stack_swap, java_stack_dup, build_java_athrow,
17137 build_java_jsr, build_java_ret, expand_java_multianewarray,
17138 expand_java_arraystore, expand_java_arrayload,
17139 expand_java_array_length, build_java_monitor, expand_java_pushc,
17140 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
17141 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
17142 expand_compare, expand_test, expand_cond, expand_java_goto,
17143 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
17144 expand_java_field_op, java_push_constant_from_pool): Likewise.
17146 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
17147 (build_java_arraynull_check): Mark parameters `node' and `type'
17148 with ATTRIBUTE_UNUSED.
17149 (note_label): Likewise for parameter `current_pc'.
17150 (expand_java_call, expand_java_ret): Hide unused definition.
17152 * java-tree.h (make_class, build_constants_constructor,
17153 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
17154 init_outgoing_cpool, register_class, emit_register_classes,
17155 java_layout_seen_class_methods): Prototype.
17156 (unicode_mangling_length): Const-ify.
17157 (append_gpp_mangled_name, append_gpp_mangled_classtype,
17158 emit_unicode_mangled_name, format_int, format_uint,
17159 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
17160 jcf_print_utf8_replace, open_class): Prototype.
17162 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
17163 <stdio.h>. Include tree.h/java-tree.h.
17164 (utf8_equal_string usage, process_class): Add static prototype.
17165 (open_class): Don't prototype this here.
17166 (utf8_equal_string): Match arguments to format specifiers.
17167 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
17168 TABLE_SWITCH, disassemble_method): Likewise.
17170 * jcf-io.c: Include tree.h/java-tree.h.
17171 (open_class, find_classfile, jcf_print_utf8,
17172 jcf_print_utf8_replace): Const-ify.
17174 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
17175 parse_class_file): Add static prototype.
17176 (find_in_current_zip): Match definition to existing static
17179 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
17180 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
17181 finish_jcf_block, define_jcf_label, get_jcf_label_here,
17182 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
17183 write_chunks, adjust_typed_op, generate_bytecode_conditional,
17184 generate_bytecode_return, perform_relocations, init_jcf_state,
17185 init_jcf_method, release_jcf_state, generate_classfile):
17186 Add static prototype.
17187 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
17188 (make_class_file_name): Const-ify.
17190 * jcf.h (find_classfile): Const-ify.
17192 * jv-scan.c (reset_report): Remove prototype.
17194 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
17195 (error): Rewrite to allow varargs.
17197 * lang.c (lang_f_options): Const-ify.
17199 * lex.c (java_parse_escape_sequence): Add static prototype.
17200 (java_allocate_new_line): Match definition to existing static
17203 * mangle.c Include tree.h/java-tree.h.
17204 (unicode_mangling_length, emit_unicode_mangled_name,
17205 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
17207 * parse.h (jdep_code): Remove trailing comma in enumeration.
17208 (java_get_line_col): Move prototype outside of !JC1_LITE test.
17209 (reset_report): Add prototype.
17211 * verify.c (push_pending_label, merge_types): Add static
17214 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
17216 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17218 * parse.y (find_applicable_accessible_methods_list): Extend the
17219 search to superinterfaces when relevant.
17220 (search_applicable_methods_list): New function.
17222 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
17224 * class.c (unmangle_classname): Implemented stricter testing
17225 before setting the QUALIFIED_P flag on an identifier.
17227 1999-03-16 Per Bothner <bothner@cygnus.com>
17229 * parse.y (java_complete_lhs): Call force_evaluation_order
17230 after patch_newarray.
17231 (patch_binop): Don't call fold if there are side effects.
17233 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
17235 * parse.y (java_stabilize_reference): Use save_expr instead of
17236 building a SAVE_EXPR node.
17237 (java_complete_lhs): Patch the resulting string of the `+='
17238 operator (if necessary) and complete the RHS after having built
17241 1999-03-15 Per Bothner <bothner@cygnus.com>
17243 * class.c (make_class): Don't set CLASS_P here (because
17244 this function is also called by build_java_array_type).
17245 (push_class): Set CLASS_P here instead.
17246 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
17248 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
17249 context. If the context is class, perfer "super" over "synchronized".
17250 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
17252 * parse.y (create_class): Don't call parser_check_super here;
17253 it is not robust. Always wait until later.
17255 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
17256 match what JDK 1.2 does), but don't set ACC_PUBLIC.
17258 1999-03-13 Per Bothner <bothner@cygnus.com>
17260 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
17261 * lex.h (UNGETC): Change misleading macro.
17263 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17265 * parse.y (java_stabilize_reference): Return NODE when patching a
17267 (java_complete_lhs): Put parenthesis around truth values.
17269 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17271 * class.c (layout_class_method): Don't make rtl for interface
17273 * parse.h (GET_TYPE_NAME): New macro.
17274 * parse.y (if_then_statement:): Fixed indentation.
17275 (if_then_else_statement:): Likewise.
17276 (for_statement:): Fixed spacing.
17277 (try_statement:): Fixed indentation.
17278 (create_interface): Don't force interfaces to be abstract.
17279 (method_header): Abstract methods are OK in interfaces.
17280 (declare_local_variables): Fixed typo in comment.
17281 (java_complete_expand_method): Fixed indentation.
17282 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17283 non accessible fields.
17284 (java_stabilize_reference): New function.
17285 (java_complete_lhs): Fixed indentation. Use
17286 java_stabilize_reference in compound assignment. Insert the
17287 cast. If not processing `+' fix string constants before processing
17290 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17292 * constants.c (find_class_or_string_constant): Cast variable `j'
17293 to a `jword' when comparing against one.
17295 * expr.c (java_lang_expand_expr): Remove unused variables
17296 `has_finally_p' and `op0'.
17298 * gjavah.c (print_field_info): Cast a value to jint when comparing
17299 against one. Likewise for a jlong.
17300 (add_namelet): Likewise cast a `sizeof' to an int when comparing
17301 against a signed quantity.
17303 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17304 (print_signature): Don't needlessly dereference variable `str'
17306 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17307 `max_locals' with ATTRIBUTE_UNUSED.
17308 (jcf_parse_class): Likewise for variable `index'.
17310 * parse.h (reverse_jdep_list): Remove static prototype.
17312 * parse.y (build_jump_to_finally): Remove prototype and definition.
17313 (reverse_jdep_list): Add static prototype.
17315 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17316 `assignment' and `expr_decl'.
17318 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17320 1999-03-12 Andrew Haley <aph@cygnus.com>
17322 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
17323 we'll need a directory separator and a null character.
17325 1999-03-10 Per Bothner <bothner@cygnus.com>
17327 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
17329 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
17331 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17334 1999-03-05 Per Bothner <bothner@cygnus.com>
17336 * lex.c (java_parse_end_comment): Take extra parameter (next char).
17338 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
17340 * class.c (layout_class_method): A static method in a base class
17341 is never overridden, so treat it like it doesn't exist.
17342 However, do complain about private non-static method overriding
17343 public static method.
17345 * parse.y: Don't set unused INITIALIZED_P flag.
17346 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
17348 * parse.y (find_expr_with_wfl): Optimize tail-calls.
17349 (build_array_from_name): Re-order &index[string] to &string[index].
17351 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
17352 error_mark (it might catch more errors, but it is more likely to lose).
17354 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17356 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17357 (parse-scan.o): Depend on toplev.h.
17359 * class.c (make_method_value): Add prototype. Make it static.
17360 Remove unused second argument, caller changed.
17362 * expr.c (java_lang_expand_expr): Remove unused variable
17365 * java-tree.h: Don't prototype find_in_current_zip.
17366 Add prototypes for verify_constant_pool, start_java_method,
17367 end_java_method, give_name_to_locals, expand_byte_code,
17368 open_in_zip, set_constant_value, find_constant1, find_constant2,
17369 find_utf8_constant, find_string_constant, find_class_constant,
17370 find_fieldref_index, find_methodref_index, write_constant_pool,
17371 count_constant_pool_bytes and encode_newarray_type.
17373 * jcf-dump.c: Remove unused variable `LONG_temp'.
17375 * jcf-parse.c: Include parse.h.
17376 (jcf_parse_source): Remove unused parameter, all callers changed.
17377 (jcf_figure_file_type): Add static prototype.
17378 (find_in_current_zip): Likewise. Also remove unused parameter,
17379 all callers changed.
17380 (read_class): Initialize variable `saved_pos'.
17382 * jcf-reader.c (jcf_parse_preamble): Mark variables
17383 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17385 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17386 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17387 (java_parse_doc_section): Initialize variable `seen_star'.
17388 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17389 (java_lex_error): Mark parameters `msg' and `forward' with
17391 (java_get_line_col): Mark parameters `filename' and `line' with
17394 * parse-scan.y: Include toplev.h.
17395 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17397 * parse.h: use `struct JCF', not plain `JCF'.
17398 (java_parser_context_save_global, java_expand_classes
17399 java_parser_context_restore_global, java_parse): Add prototypes.
17401 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17404 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
17406 * check-init.c (check_init): COPYN takes word count, not bit count.
17408 1999-02-26 Per Bothner <bothner@cygnus.com>
17410 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
17411 explicit build_decl. (Avoids crash in reload when optimizing.)
17413 1999-02-25 Per Bothner <bothner@cygnus.com>
17415 * decl.c (complete_start_java_method): Handle synchronized method
17416 even when compiling from bytecode.
17418 1999-02-26 Tom Tromey <tromey@cygnus.com>
17420 * gjavah.c (add_class_decl): Only generate `#include' if outer
17421 class is not the name of the class we are processing. Correctly
17422 append `.h' in #include.
17423 (process_file): Clean up newlines around generated `#include's.
17424 (decode_signature_piece): Correctly handle inner classes.
17425 (struct include): New structure.
17426 (all_includes): New global.
17427 (print_include): New function.
17428 (add_class_decl): Use it.
17429 (process_file): Likewise.
17430 (add_class_decl): Generate include for java-array.h if array
17432 (process_file): Don't generate java-array.h include.
17434 * gjavah.c (add_namelet): Check for standard package names here.
17435 (add_class_decl): Don't check for standard package names here.
17437 1999-02-25 Tom Tromey <tromey@cygnus.com>
17439 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17440 When reading a zip file, only use strncmp if both strings are
17441 bigger than the buffer length. Initialize `k' when looping
17444 1999-02-24 Tom Tromey <tromey@cygnus.com>
17446 * gjavah.c (struct namelet): New structure.
17447 (add_namelet): New function.
17448 (print_namelet): New function.
17449 (print_class_decls): Use add_namelet and print_namelet to generate
17450 namespaces and not classes.
17451 (method_printed): New global.
17452 (HANDLE_END_METHOD): Examine method_printed.
17453 (print_method_info): Set method_printed when required. Print
17454 error if function to be ignored is marked virtual. Handle $finit$
17456 (METHOD_IS_FINAL): New macro.
17457 (print_field_info): Use it.
17458 (HANDLE_METHOD): Clear method_printed.
17459 (method_pass): New global.
17460 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17461 (process_file): Do two passes over both fields and methods.
17462 (HANDLE_METHOD): Examine method_pass.
17463 (root): New global.
17464 (add_class_decl): New function.
17465 (print_class_decls): Don't scan over entire constant pool.
17467 1999-02-23 Tom Tromey <tromey@cygnus.com>
17469 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17470 disable linking in that case.
17472 1999-02-20 Tom Tromey <tromey@cygnus.com>
17474 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17477 1999-02-21 Per Bothner <bothner@cygnus.com>
17479 * decl.c (build_result_decl), java-tree.h: New method.
17480 (complete_start_java_method): Handle synchronized methods.
17481 Don't build DECL_RESULT here. (Ordering dependency problem.)
17482 (start_java_method): Call build_result_decl here instead ...
17483 * parse.y (java_complete_expand_method): ... and here.
17484 (expand_start_java_method): Don't call complete_start_java_method here.
17485 (java_complete_expand_method): Call it here instead.
17486 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
17487 * java-tree.h: ... here.
17489 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
17490 * parse.y (java_complete_lhs): Don't call force_evaluation_order
17491 for ARRAY_REF - it doesn't work when array bounds are checked.
17492 (patch_array_ref): Handle it here instead.
17494 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
17496 1999-02-19 Per Bothner <bothner@cygnus.com>
17498 Force left-to-right evaluation of binary operations etc.
17499 * expr.c (force_evaluation_order), java-tree.h: New function.
17500 * parse.y (java_complete_lhs): Pass binary operations, procedure
17501 calls, and ARRAY_REFs to force_evaluation_order.
17502 (various): Set TREE_SIDE_EFFECTS more carefully.
17504 Tolerate random (non-UTF8) encoding in comments without complaining.
17505 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
17506 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
17508 * parse.y (resolve_qualified_expression_name): Handle error_mark.
17509 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
17511 * parse.y (java_complete_lhs): Ignore an empty statement in a
17512 COMPOUND_EXPR. Don't complain about empty statement after return.
17514 1999-02-19 Per Bothner <bothner@cygnus.com>
17516 * parse.y (obtain_incomplete_type): Don't wrap unknown types
17517 in TREE_LIST - just chain the POINTER_TYPEs together.
17518 (resolve_class): If type already resolved, return decl.
17519 After resolving, update TREE_TYPE(class_type), and name (if array).
17520 * parse.h (do_resolve_class), parse.y: Make non-static.
17521 * class.c (maybe_layout_super_class): Take this_class argument.
17522 Do do_resolve_class if necessary.
17523 (layout_class, layout_class_methods): Adjust calls appropriately.
17524 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17525 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
17526 * typeck.c (build_java_array_type): Don't call layout_class.
17528 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17530 * parse.y (check_pkg_class_access): Allow private class access
17531 within the same package.
17532 (strip_out_static_field_access_decl): New function.
17533 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17534 operator argument before testing its nature.
17536 1999-02-03 Per Bothner <bothner@cygnus.com>
17538 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
17539 (TRY_EXPR): Simplify - it no longer has a finally clause.
17540 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
17541 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17542 * expr.c (java_lang_expand_expr): Likewise.
17543 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
17544 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
17545 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
17546 (build_try_statement): Remove finally parameter and handling.
17547 (build_try_finally_statement): New function.
17548 (patch_try_statement): No longer need to support finally clause.
17549 (try_statement): Update grammar action rules.
17550 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
17551 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17553 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
17555 * jcf-parse.c (get_constant): Add braces around computation of 'd'
17556 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
17558 1999-02-17 Andrew Haley <aph@cygnus.com>
17560 * class.c (build_utf8_ref): Back out broken patch which was
17561 intended to to output signatures using '.' as a separator.
17563 * class.c (make_class_data): Output signatures using '.' as a
17564 separator, rather than '/'.
17565 (mangled_classname): Likewise.
17566 (make_field_value): Likewise.
17567 (make_method_value): Likewise.
17568 * constants.c (alloc_class_constant): Likewise.
17569 * expr.c (build_invokeinterface): Likewise.
17571 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17573 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17574 of an ancient workaround.
17576 1999-02-10 Jeffrey A Law (law@cygnus.com)
17578 * jvspec.c (xmalloc): Kill the prototype. It does not belong
17581 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17583 * lex.c (yylex): Encode \0 as UTF8.
17585 1999-02-10 Tom Tromey <tromey@cygnus.com>
17587 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17588 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17589 (libgcj_zip): Renamed.
17590 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17592 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17594 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17595 (GC_NAME): Renamed -lgc to -lgcjgc.
17597 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17599 * lex.c (java_lang_cloneable): Initialize.
17600 * parse.y (java_lang_cloneable): New static variable.
17601 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17602 doing one more qualification round.
17603 (valid_ref_assignconv_cast_p): Reject null source or
17604 destination. Allow an array to be cast into java.lang.Cloneable.
17605 (patch_cast): Swapped two first arguments to first call to
17606 valid_ref_assignconv_cast_p.
17608 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
17610 * parse.h: DECL_P renamed JDECL_P.
17611 * parse.y: DECL_P replaced by JDECL_P.
17612 (build_array_from_name): Always use pointer's type.
17613 (patch_bc_statement): Extra code to search continue target in a
17614 for loop. Fixed comments. Continue target is current loop when
17617 1999-02-05 Andrew Haley <aph@cygnus.com>
17619 * class.c (make_class_data): The superclass of an interface should
17620 be null, not class Object.
17622 * lex.c (java_lex): Sign extend hex literals.
17624 1999-02-04 Andrew Haley <aph@cygnus.com>
17626 * class.c (build_utf8_ref): Output signatures using '.' as a
17627 separator, rather than '/'.
17628 (make_class_data): Likewise.
17630 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
17632 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17633 mkstemp.o. Get them from libiberty now.
17635 1999-02-02 Jeffrey A Law (law@cygnus.com)
17637 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17639 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17641 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17644 1999-02-02 Per Bothner <bothner@cygnus.com>
17646 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17647 * jcf-write.c (generate_bytecode_return): New function.
17648 (generate_bytecode_insns): Use it, for RETURN_EXPR.
17650 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
17651 generate special [fd]const_[01] instructions.
17653 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
17655 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
17656 handling OPCODE_lookupswitch or OPCODE_tableswitch.
17658 1999-02-01 Per Bothner <bothner@cygnus.com>
17660 * parse.y (patch_method_invocation): Handle calling static methods,
17661 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17663 * parse.y (java_complete_lhs): Don't complain about unreachable
17664 exit condition in a do-while statement.
17666 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
17668 * lex.c (java_read_char): Fixed utf8 decoding.
17669 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17671 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17672 comments. Local variable `all_primitive' is gone. Broadened
17673 acceptance of `0' to floating point targets. `long' can now be
17674 widened to `double' or `float'.
17675 (valid_method_invocation_conversion_p): Added leading
17676 comment. Fixed tabulation.
17677 (build_string_concatenation): Optimize out left or right empty
17680 1999-01-28 Per Bothner <bothner@cygnus.com>
17682 * jcf-write.c (localvar_alloc): Only emit entry for
17683 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17684 (generate_bytecode_insns): Only call put_linenumber if
17685 debug_info_level > DINFO_LEVEL_NONE.
17686 * jvspec.c (lang_specific_driver): If no -O* or -g* option
17687 is specified, add -g1 (for compatibility wih javac).
17689 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
17691 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17692 gjavah.o, check-init.o, jv-scan.o
17694 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17696 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17698 * gjavah.c: Include config.h and system.h.
17700 * javaop.h (inline): Don't define, its handled by system.h.
17701 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17702 from `inline' to `static inline'.
17704 * jcf.h (inline): Don't define, its handled by system.h.
17706 * lex.c (inline): Likewise.
17708 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
17710 * lang-specs.h: Map -Qn to -fno-ident.
17712 1999-01-29 Richard Henderson <rth@cygnus.com>
17714 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17716 1999-01-29 Tom Tromey <tromey@cygnus.com>
17718 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17719 then cast it to Object before calling `append' method.
17721 1999-01-28 Per Bothner <bothner@cygnus.com>
17723 * check-init.c (check_bool2_init, check_bool_init, check_init):
17724 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17725 * jcf-write.c (generate_bytecode_insns): Likewise.
17727 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
17729 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17730 * parse.y (patch_cast): Allow a boolean to be cast into a
17733 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17735 * parse.y: (class_declaration:): Fixed indentation.
17736 (class_member_declaration:): Extra `;' after field declaration now
17738 (interface_declaration:): Removed debug messages in error reports.
17739 (patch_binop): Nodes created and returned inherit the orignal
17740 node's COMPOUND_ASSIGN_P flag value.
17741 (patch_cast): Fix cast from char to floating point.
17743 1999-01-25 Andrew Haley <aph@cygnus.com>
17745 * except.c, java-except.h (expand_resume_after_catch): new
17747 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17748 to branch back to main flow of control after a catch block.
17750 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17752 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17753 $(srcdir)/../system.h.
17754 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17755 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17756 (jcf-write.o): Likewise.
17757 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17758 (mangle.o): Depend on $(srcdir)/../toplev.h.
17759 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17760 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17762 * class.c: Include output.h and parse.h.
17763 (mangled_classname): Add the `const' keyword to a char*.
17764 (find_named_method): Hide unused function definition.
17765 (build_utf8_ref): Change type of variable `c' to unsigned char.
17766 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17767 (build_class_ref): Add the `const' keyword to a char*.
17768 (layout_class_method): Remove unused variable `buf'.
17770 * decl.c (find_local_variable): Remove unused variable `rtl'.
17771 (pushdecl): Likewise for variables `different_binding_level' and
17773 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17774 (maybe_build_cleanup): Likewise for parameter `decl'.
17776 * except.c (expand_start_java_handler): Mark parameter `range'
17777 with ATTRIBUTE_UNUSED.
17779 * expr.c: Include except.h.
17780 (pop_type): Remove unused variable `i'.
17781 (pop_value): Likewise for variables `n_words' and `i'.
17782 (expand_java_arrayload): Likewise for variable `convert'.
17783 (java_lang_expand_expr): Likewise for variables `op0', `type',
17784 `mode', `unsignedp', `node' and `elements'.
17785 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17787 (process_jvm_instruction): Add a `const' qualifier to a char*.
17789 * gjavah.c (output_directory): Add the `const' keyword to a char*.
17790 (temp_directory): Likewise.
17791 (print_c_decl): Likewise.
17792 (print_method_info): Likewise.
17793 (decode_signature_piece): Likewise.
17794 (print_mangled_classname): Likewise.
17796 * java-except.h: Provide prototypes for maybe_start_try,
17797 maybe_end_try and add_handler.
17799 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17800 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
17801 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17802 init_expr_processing, push_super_field, init_class_processing,
17803 can_widen_reference_to, class_depth, verify_jvm_instructions,
17804 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17805 set_local_type, merge_type_state, push_type, load_type_state,
17806 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17807 emit_unicode_mangled_name): Add prototypes.
17809 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17810 (print_signature_type): Use ISDIGIT, not isdigit.
17811 (print_signature): Remove unused variable `j'.
17813 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17814 int when comparing against one.
17816 * jcf-parse.c: Include toplev.h.
17818 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
17819 (localvar_free): Remove unused variable `i'.
17820 (generate_bytecode_conditional): Likewise for variable `kind'.
17822 * jv-scan.c: Include config.h and system.h. Remove redundant
17823 OS header and gansidecl.h includes.
17824 (warning): Add the `const' keyword to a char*. Also add
17825 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
17826 __STDC__, when determining whether to use ANSI-isms.
17827 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
17828 (xmalloc): Don't redundantly prototype here.
17829 (main): Remove unused parameter `envp'. Also fix the arguments
17830 passed to function `fatal' to match the format specifier.
17832 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17834 * mangle.c: Include toplev.h.
17835 (emit_unicode_mangled_name): Declare parameter `len'.
17837 * parse.y (parse_warning_context): Add the `const' keyword to a
17838 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
17839 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
17840 (issue_warning_error_from_context): Add the `const' keyword to
17842 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
17843 not `__STDC__' for whether to use ANSI-isms.
17845 * typeck.c (incomplete_type_error): Mark parameters `value' and
17846 `type' with ATTRIBUTE_UNUSED.
17847 (parse_signature_type): Use ISDIGIT, not isdigit.
17849 * verify.c (check_pending_block): Add the `const' keyword to a char*.
17850 (verify_jvm_instructions): Likewise. Remove unused variables
17851 `field_name' and `default_val'.
17853 * zextract.c: Include config.h and system.h. Remove redundant
17854 OS header includes.
17856 * zipfile.h: Prototype `read_zip_archive'.
17858 1999-01-21 Andrew Haley <aph@cygnus.com>
17860 * typeck.c (convert): Allow conversions to void type: some
17861 optimizations in gcc do this.
17863 1999-01-21 Andrew Haley <aph@cygnus.com>
17865 * typeck.c (convert_ieee_real_to_integer): New function.
17866 (convert): When not using fast-math and using hardware fp, convert
17867 an IEEE NaN to zero.
17869 1999-01-18 Andrew Haley <aph@cygnus.com>
17871 * parse.y (patch_binop): Do a type conversion from signed to
17872 unsigned and then back to signed when a ">>>" is found.
17874 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17876 * java-tree.h: (check_for_initialization): Added prototype.
17877 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17878 * parse.y (do_resolve_class): Removed unused locals.
17879 (read_import_dir): Likewise.
17880 (resolve_qualified_expression_name): Array creation
17881 expressions are valid primary expressions.
17882 (qualify_ambiguous_name): Likewise.
17883 (patch_synchronized_statement): Removed unused local.
17885 1999-01-17 Jeffrey A Law (law@cygnus.com)
17887 * Makefile.in (zextract.o): Add dependencies.
17889 * Makefile.in: Do not put ^Ls at the start of a line.
17891 1999-01-15 Per Bothner <bothner@cygnus.com>
17893 * expr.c (process_jvm_instruction): Coerce to correct Throwable
17894 sub-type the result of the call that gets the exception value.
17896 * parse.y (java_complete_expand_methods): If flags_syntax_only,
17897 don't call finish_class.
17899 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
17900 clear found before continuing.
17902 * verify.c (verify_jvm_instructions): On an array load, allow
17903 and handle top of stack to be TYPE_NULL.
17905 * gjavah.c (generate_access): Translate Java package private or
17906 protected access to C++ public, but with a comment.
17908 1999-01-13 Andrew Haley <aph@cygnus.com>
17910 * expr.c (generate_name): Name prefix changed to avoid clashes
17911 with assembler temp labels.
17913 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
17914 MODIFY_EXPR. Without this, code for the assignment may not be
17915 generated at all and the synchronized statement will read an
17916 uninitialized variable.
17918 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
17920 * class.c (maybe_layout_super_class): Fixed returned value.
17921 * lex.c: Added 1999 to the copyright.
17922 (java_init_lex): Initialize java_lang_imported.
17923 * lex.h: Added 1999 to the copyright.
17924 * parse.h: Added 1999 to the copyright.
17925 (REGISTER_IMPORT): Fixed typo in trailing macro.
17926 (CURRENT_OSB): New macro.
17927 (struct parser_ctxt): New fields osb_depth, osb_limit.
17928 * parse.y (java_lang_id): New global variable.
17929 (type_import_on_demand_declaration): Don't import java.lang.* twice.
17930 (array_creation_expression:): Use CURRENT_OSB.
17931 (dims:): Uses a stack to keep track of array dimensions.
17932 (cast_expression:): Use CURRENT_OSB.
17933 (find_expr_with_wfl): Return NULL if node found doesn't meet the
17935 (register_fields): Fixed typos in comment.
17936 (check_method_redefinition): Fixed comment indentation.
17937 (java_check_regular_methods): Set saved found wfl to NULL after
17938 having reinstalled it in the previously found DECL_NAME.
17940 1999-01-10 Richard Henderson <rth@cygnus.com>
17942 * gjavah.c (java_float_finite): Use a union to do type punning.
17943 (java_double_finite): Likewise.
17945 1999-01-09 Per Bothner <bothner@cygnus.com>
17947 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
17948 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
17949 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
17950 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
17951 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
17952 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
17954 1999-01-08 Per Bothner <bothner@cygnus.com>
17956 * check-init.c (check_init): If compiling to native, we don't
17957 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
17959 1999-01-08 Tom Tromey <tromey@cygnus.com>
17961 * parse-scan.y (variable_declarator_id): Set or increment
17963 (bracket_count): New global.
17964 (formal_parameter): Handle case where bracket pairs trail variable
17967 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
17969 * jcf-parse.c (yyparse): variable len changed from a char to an
17970 int to prevent overflow.
17972 1999-01-06 Per Bothner <bothner@cygnus.com>
17974 * java-tree.h: Declare read_class.
17975 * jcf-parse.c (read_class): New function.
17976 (load_class): Now just call read_class.
17978 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
17979 * jcf-parse.c (parse_source_file): Declare save_error_count,
17980 which is needed by java_parse_abort_on_error macro,
17981 * parse.y (java_layout_classes, java_expand_classes): Likewise.
17983 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
17984 constructor, if initializing a static field.
17985 (patch_new_array_init): Set TREE_CONSTANT if it is.
17986 * expr.c (java_lang_expand_expr): For a static array constructor
17987 of primitive elements, allocate the array itself statically.
17988 Disabled until we can set the vtable field statically.
17990 * check-init.c: New file. Checks for definite assignment.
17991 * Makefile.in (JAVA_OBJS): Add check-init.o.
17992 * parse.y (java_complete_expand_method): Call check_for_initialization.
17993 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
17995 1999-01-06 Graham <grahams@rcp.co.uk>
17997 * parse.y : include system.h instead of including
17998 standard headers directly with the exception of <dirent.h>.
18000 1999-01-06 Per Bothner <bothner@cygnus.com>
18002 * lex.h: Moved static function declarations to lex.c,
18003 to shut up some -Wall warnings.
18004 * lex.c: Static function declarations moved here.
18005 * jcf-dump.c: Small fixes to shut up -Wall warnings.
18007 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18009 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
18011 1998-12-22 Per Bothner <bothner@cygnus.com>
18013 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
18014 * verify.c (verify_jvm_instructions): Fix off-by-one error.
18016 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
18017 (localvar_alloc): Change return type to void,
18018 (emit_unop): Remove unused variable size.
18020 * jcf-write.c (struct jcf_block): Add new union.
18021 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
18022 (call_cleanups): New functions.
18023 (struct jcf_partial): New fields num_finalizers and return_value_decl.
18024 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
18025 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
18026 * lang.c (lang_init): Call using_eh_for_cleanups.
18027 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
18028 completing operands to patch_synchronized_statement.
18029 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
18030 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
18031 WITH_CLEANUP_EXPR instead of TRY_EXPR.
18033 1998-12-20 John F. Carr <jfc@mit.edu>
18035 * Make-lang.in: Comment out control-Ls; they upset some makes.
18037 1998-12-18 Tom Tromey <tromey@cygnus.com>
18039 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
18042 1998-12-17 Tom Tromey <tromey@cygnus.com>
18044 * parse.y (DIR_SEPARATOR): New define.
18045 (check_class_interface_creation): Use it.
18047 * parse-scan.y (report_main_declaration): Recognize
18048 `java.lang.String' in argument to main.
18050 1998-12-16 Per Bothner <bothner@cygnus.com>
18052 * parse.y (create_interface): Remove bogus test.
18054 1998-12-16 Per Bothner <bothner@cygnus.com>
18056 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
18057 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
18059 1998-12-16 Tom Tromey <tromey@cygnus.com>
18061 * parse-scan.y (qualified_name): Use correct sprintf format.
18063 1998-12-15 Tom Tromey <tromey@cygnus.com>
18065 * gjavah.c (print_field_info): Changed how most negative number is
18068 1998-12-14 Per Bothner <bothner@cygnus.com>
18070 * parse.y (fold_constant_for_init): New function.
18071 (resolve_expression_name): Don't replace static final
18072 constant-initialized fields by its value.
18073 (java_complete_lhs): New. Same as java_complete_tree, except does
18074 not replace static final constant-initialized fields by their values.
18075 (register_fields): If there is an initializer, set DECL_INITIAL and
18076 MODIFY_EXPR_FROM_INITIALIZATION_P.
18077 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
18078 Only call patch_initialized_static_field if
18079 MODIFY_EXPR_FROM_INITIALIZATION_P.
18080 (patch_initialized_static_field): If not valid constant, clear
18083 * parse.y (lookup_field_wrapper): Fix thinko.
18085 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
18086 set and restore global lineno.
18088 1998-12-14 Tom Tromey <tromey@cygnus.com>
18090 * gjavah.c (print_field_info): If value to print is the smallest
18091 value of its size, then print as hex to avoid later warnings from
18094 1998-12-14 Tom Tromey <tromey@cygnus.com>
18096 * gjavah.c (decompile_method): Decompile `return null'.
18097 (process_file): Generate `#pragma interface'.
18098 (method_declared): New global.
18099 (print_method_info): Set it.
18100 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
18101 (print_method_info): Handle abstract methods.
18103 1998-12-13 Per Bothner <bothner@cygnus.com>
18105 * parse.y (patch_method_invocation): If class_decl is null
18106 (e.g. an array type), use original type.
18108 * parse.y (check_thrown_exceptions): Temporary hack to suppress
18109 errors about uncaught exception from clone (of array, specifically).
18111 1998-12-13 Tom Tromey <tromey@cygnus.com>
18113 * gjavah.c (decompile_method): Handle all types of `return'
18114 opcode. Decompile `return this' and `return'.
18115 (method_access): New global.
18116 (print_method_info): Set it.
18117 (decompile_method): Don't decompile a synchronized method.
18119 1998-12-13 Tom Tromey <tromey@cygnus.com>
18121 * jcf-reader.c (jcf_parse_one_method): Recognize
18123 * gjavah.c (HANDLE_END_METHOD): New macro.
18124 (HANDLE_CODE_ATTRIBUTE): New macro.
18125 (decompile_method): New function.
18126 (print_method_info): Don't print `;\n' at end of function decl.
18127 Include java-opcodes.h.
18128 (decompiled): New global.
18130 1998-12-12 Per Bothner <bothner@cygnus.com>
18132 * class.c (build_class_ref): Handle PRIMTYPE.class if
18133 flag_emit_class_files.
18134 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
18135 if flag_emit_class_files.
18136 * parse.y (java_complete_tree): Pre-liminary support for
18137 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
18139 * parse.y (patch_synchronized_statement): Don't call monitorexit
18140 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
18142 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
18144 * zipfile.h (opendir_in_zip): New declaration.
18145 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
18146 (opendir_in_zip): New function, using code from open_in_zip.
18147 (open_in_zip): Call opendir_in_zip.
18148 (find_class): Remove no-longer-used do_class_file parameter,
18149 but add source_ok parameter. Change logic so if we find a .java file,
18150 we don't look for .class in later classpath emtries.
18151 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
18152 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
18153 * gjavah.c: Update call to find_class.
18154 * jcf-dump.c: Likewise.
18156 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
18157 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
18158 nothing if body is empty_stmt_node.
18159 Various little fixes so SP gets correctly adjusted.
18160 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
18161 For CALL_EXPR, test if static first.
18162 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
18163 such as the ones we create for Object and Class.
18164 Set and restore current_function_decl.
18165 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
18166 (note_possible_classname): New function.
18167 (read_import_entry): Removed. Merged with read_import_dir.
18168 (read_import_dir): Don't call find_class - that only gives us
18169 the first classpath entry having the needed package.
18170 Use the struct buffer data structure from buffer.h.
18171 (read_import_dir, find_in_imports_on_demand): The remembered
18172 class names now use '.' (not '/') as package separator.
18174 * parse.y (java_complete_expand_methods): Call write_classfile
18175 here, and not in java_expand_classes (which only gets first class).
18177 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
18179 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
18180 (register_fields): If a static fields has an initializer, just
18181 chain it on ctxp->static_initialized, and handle later.
18182 (java_complete_expand_methods): Force <clinit> first.
18183 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
18184 - it's already been completed.
18185 (patch_initialized_static_field): New function.
18186 (java_complete_field): Call it.
18188 1998-12-12 Per Bothner <bothner@cygnus.com>
18190 * expr.c (encode_newarray_type, build_new_array): New functions.
18191 * java-tree.h: Declare build_new_array.
18192 * jcf-write.c (patch_newarray): Use build_new_array.
18194 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
18195 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
18197 * parse.y (patch_new_array_init): Re-organize.
18198 Now is passed the actual array (pointer) type of the value.
18199 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
18200 (patch_array_constructor): Removed - merged into patch_new_array_init.
18201 (java_complete_tree): Update patch_new_array_init.
18203 * jcf-write.c (find_constant_index): New function.
18204 (generate_bytecode_insns): Use find_constant_index.
18205 (generate_classfile): Use find_constant_index for ConstantValue.
18207 1998-12-11 Tom Tromey <tromey@cygnus.com>
18209 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
18210 * decl.c (init_decl_processing): Renamed dtable -> vtable.
18211 * class.c (make_class_data): Renamed dtable -> vtable, and
18212 dtable_method_count -> vtable_method_count.
18214 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18216 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
18217 global variables, initialized.
18218 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
18219 Declared new global variables.
18220 * lex.c (java_lex): Return long_zero_node, float_zero_node,
18221 double_zero_node, integer_zero_node upon direct matching.
18222 * parse.y (purify_type_name): Added function prototype.
18223 (duplicate_declaration_error_p): Consider new_type as potentially
18224 being a incomplete type. Use purify_type_name on type string.
18225 (method_header): saved_type: unused variable removed. Don't figure
18226 return type if method name is invalid.
18227 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
18228 processed by patch_unaryop.
18229 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
18230 increment/decrement node into its original type after binary
18231 numeric promotion on its operands.
18233 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18235 * parse.y (array_initializer:): Array init operand is NULL_TREE
18236 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
18237 now an error. Fixed indentation problems.
18238 (patch_string): Handle error_mark_node as an argument.
18239 (patch_new_array_init): Fixed indentation problems.
18240 (array_constructor_check_entry): Removed check on null wfl_value.
18241 Return an error if wfl_value's walk returns an error.
18243 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
18245 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
18246 * lex.c (java_lex): Remember column position before advancing one
18247 token. Retain location information on OCB_TK.
18248 * lex.h (typedef struct java_lc): Added new field.
18249 * parse.h (GET_SKIP_TYPE): New macro.
18250 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
18251 * parse.y (build_new_array_init, patch_new_array_init,
18252 patch_array_constructor, maybe_build_array_element_wfl,
18253 array_constructor_check_entry): New function prototypes.
18254 (switch_block:): Tagged <node>.
18255 (OCB_TK): Tagged <operator>.
18256 (array_initializer:): Installed actions.
18257 (variable_initializer): Build location information on element if
18259 (switch_statement:): Fixed indentation typo.
18260 (switch_block:): Redefined default action.
18261 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
18262 (patch_assignment): Removed duplicate code.
18263 (maybe_build_array_element_wfl, build_new_array_init,
18264 patch_new_array_init, patch_array_constructor,
18265 array_constructor_check_entry): New functions.
18267 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
18269 * parse.y (array_initializer): Tagged <node>.
18270 (variable_initializer:): Use default rule.
18271 (array_initializer:): Defined actions.
18272 (variable_initializers:): Likewise.
18273 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
18274 non-static field accesses.
18275 (patch_invoke): Fixed indentation typo.
18276 (java_complete_tree): Likewise.
18277 (build_labeled_block): Changed leading comment. Generate an error
18278 in case of duplicate loop labels.
18279 (patch_conditional_expr): Patch results of string concatenation
18282 1998-12-06 Per Bothner <bothner@cygnus.com>
18284 * constants.c (find_methodref_index): When the class is an interface,
18285 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18287 * decl.c (finit_identifier_node): Use "$finit$", rather than
18288 "<finit>" (which Sun's verifier rejects).
18289 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
18290 (generate_field_initialization_code): Removed.
18291 (fix_constructors) Don't add call to $finit$ here (wrong order).
18292 (patch_method_invocation): Add $finit$ call here.
18294 * java-tree.h (CALL_USING_SUPER): New macro.
18295 * parse.y (patch_invoke): Remove im local variable.
18296 (patch_method_invocation, patch_invoke): Don't pass super parameter.
18297 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
18298 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
18300 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
18302 * parse.y (java_complete_tree): Don't complain about unreachable
18303 statement if it is empty_stmt_node.
18305 * jcf-write.c (find_constant_wide): New function.
18306 (push_long_const): Use find_constant_wide.
18308 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
18309 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
18310 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18311 Emit invokeinterface when calling an interface method.
18312 Emit invokespecial also when calling super or private methods.
18314 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
18316 1998-12-06 Per Bothner <bothner@cygnus.com>
18318 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
18320 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
18322 * java-tree.h (java_layout_seen_class_methods): New function
18324 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18325 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18326 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18327 * parse.y (method_declarator:): Defined action.
18328 (issue_warning_error_from_context): input_filename saved, set to
18329 the appropriate value and restored after java_error is called.
18330 (build_unresolved_array_type): Fixed comment.
18331 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18332 (method_header): Deal with return type the same way type are
18333 handled for fields and method's parameters and local variables
18335 (check_method_redefinition): Removed extra CR.
18336 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18337 (java_layout_seen_class_methods): New function.
18338 (java_layout_classes): Call java_layout_seen_class_methods.
18340 1998-12-03 Per Bothner <bothner@cygnus.com>
18342 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
18344 1998-12-03 Per Bothner <bothner@cygnus.com>
18346 * jcf-dump.c (main): Fix error message.
18347 * jcf-path.c (add_entry): Style fix.
18349 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18351 * class.c (layout_class_method): Call build_java_argument_signature
18352 on constructors too.
18353 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18354 (patch_method_invocation): Define a primary when resolving an
18355 expression name. Augmented comment on code checking illegal `this'
18356 usage. Loosened it test by accepting NEW_CLASS_EXPR.
18358 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
18360 * class.c (layout_class_method): Don't report error on non-static
18361 overriding static if the method is private.
18362 * java-tree.h (finish_class): Prototype added.
18363 * lex.c (java_get_line_col): Handle col argument -2 value.
18364 * parse.h: All static method declarations moved to parse.y.
18365 * parse.y: Now contains all static method declarations previously
18367 (find_expr_with_wfl, missing_return_error,
18368 unreachable_stmt_error): New functions.
18369 (java_get_real_method_name): Identify constructors bearing class
18370 names in source code compiled classes only.
18371 (java_complete_expand_methods): Call missing_return_error.
18372 (invocation_mode): Private methods invoked as static methods.
18373 (java_complete_tree): Call unreachable_stmt_error.
18375 1998-12-01 Tom Tromey <tromey@cygnus.com>
18377 * Makefile.in (+target): Removed.
18378 (+xmake_file): Likewise.
18379 (+tmake_file): Likewise.
18380 (.NOEXPORT): Removed duplicate.
18382 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18384 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18386 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
18388 * jvgenmain.c: Remove the xmalloc prototype, we get it from
18389 libiberty.h. Provide an xmalloc definition.
18391 * jvspec.c: Remove the xmalloc prototype.
18393 * parse-scan.y: Include config.h and system.h. Don't include
18394 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
18395 Provide an xstrdup definition.
18397 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
18399 * jcf-path.c (add_entry): Recognize ".jar" too.
18400 * lang-specs.h: Likewise.
18402 1998-11-26 Per Bothner <bothner@cygnus.com>
18404 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
18405 soft_monitorenter_node, soft_monitorexit_node, throw_node.
18407 * jcf-write.c (generate_bytecode_insns):
18408 Handle pre/post-increment/decrement of long.
18410 * jcf-write.c (generate_bytecode_insns):
18411 Handle missing exception handler (finally for synchronized).
18413 1998-11-25 Per Bothner <bothner@cygnus.com>
18415 * java-tree.h (end_params_node): Declare global.
18416 * decl.c (end_params_node): New global.
18417 (init_decl_processing, start_java_method): Use end_params_node for
18418 end of list of parameter types. Follows correct gcc conventions.
18419 * expr.c (pop_argument_types, pop_arguments): Likewise.
18420 * lang.c (put_decl_node): Likewise.
18421 * typeck.c (various places): Likewise.
18422 * class.y (various places): Likewise.
18423 * parse.y (various places): Likewise.
18425 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
18426 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
18428 * class.c: Add #include flags.h, remove no-longer needed declaration.
18430 * class.c (layout_class_method): Remove commented-out code, re-format.
18431 Don't add vtable entry (or index) for private methods.
18432 * expr.c (expand_invoke): A private method is implicitly final.
18433 * class.c (make_class_data): If inlining or optimizing,
18434 skip private methods.
18436 * class.c (finish_class): New function. Calls existing methods,
18437 but alls emits deferred inline functions.
18438 * jcf-parse.c (parse_class_file): Call finish_class.
18439 * parse.y (java_complete_expand_methods): Likewise.
18441 * expr.c (build_java_binop): Explicit default, to silence -Wall.
18443 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
18445 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
18447 * jcf-write.c (generate_bytecode_conditional): Fix typo.
18449 1998-11-24 Per Bothner <bothner@cygnus.com>
18451 * (generate_classfile): Always write class access flag with
18454 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
18456 * class.c (maybe_layout_super_class): New function.
18457 (layout_class): Reorganized. Loop on class methods dispatched into
18458 a new function. Call maybe_layout_super_class.
18459 (layout_class_methods, layout_class_method): New functions.
18460 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18462 (expand_invoke): Likewise.
18463 * java-tree.h (all_class_list): New global variable declared.
18464 (layout_class_methods, layout_class_method): New function
18466 (LAYOUT_SEEN_CLASS_METHODS): New macro.
18467 * jcf-parse.c (all_class_list): New global variable.
18468 (load_class): Extended what class_or_name can be. Use parser
18469 context mechanism to save globals before calling jcf_parse.
18470 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18471 is set on the file name.
18472 (jcf_parse): Layout class methods when Object is loaded, otherwise
18473 record class in all_class_list for delayed method layout.
18474 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18475 * lang.c (put_decl_node): Decode <init> into the decl context
18477 * lex.c (java_allocate_new_line): Use xmalloc.
18478 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18479 pointers, not TREE_LIST elements.
18480 (struct parser_ctxt): Fixed comment indentations, added comments
18481 and reordered some fields.
18482 (java_check_methods): Function prototype removed.
18483 * parse.y (java_push_parser_context): Use xmalloc.
18484 (java_parser_context_restore_global): Pop extra pushed ctxp only
18485 when there's nothing next.
18486 (maybe_create_class_interface_decl): Fixed comment, add new
18487 created class decl to all_class_list.
18488 (method_header): Use GET_REAL_TYPE on argument's types.
18489 (method_declarator): Use GET_REAL_TYPE, change type to the real
18490 type in TREE_LIST dependency node. Build argument list with the
18492 (create_jdep_list): Use xmalloc. Removed allocation error message.
18493 (obtain_incomplete_type): Fixed leading comment. Broadened
18494 incoming argument meaning.
18495 (register_incomplete_type): Use xmalloc. Removed allocation error
18497 (safe_layout_class): Fixed leading comment.
18498 (jdep_resolve_class): Reversed if statement condition and switch
18499 if and else bodies.
18500 (resolve_and_layout): Fixed leading comment. Broadened incoming
18502 (complete_class_report_errors): New local variable name, for
18503 clarity. purify_type_name used for all error cases.
18504 (java_get_real_method_name): Stricter check on constructors.
18505 (java_check_regular_methods): Reverse methods list only if not
18506 already laid out. Layout artificial constructor.
18507 (java_check_methods): Deleted.
18508 (source_start_java_method): Obtain incomplete type for patchable
18510 (java_layout_classes): Fixed leading comment. Use
18511 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18512 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18513 before returning. Fixed comments.
18514 (java_expand_classes): Check for errors up front.
18515 (patch_method_invocation): Class to search is resolved and laid
18518 1998-11-24 Per Bothner <bothner@cygnus.com>
18520 * expr.c (java_lang_expand_expr): Add missing emit_queue.
18522 * javaop.h (int8): Removed - not used.
18523 (jbyte): Redefine portably with correct signedness.
18525 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
18527 * jcf-write.c (generate_bytecode_insns): Fix typo
18528 OPCODE_getstatic to OPCODE_getfield.
18530 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
18531 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
18532 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18534 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
18536 * jcf-parse.c (jcf_parse_source): Function returned type is
18537 void. Added prototype.
18538 (jcf_parse): Function returned type is void.
18539 (yyparse): Remove call to fclose on the last parsed file.
18541 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18543 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
18545 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18546 (layout_class): Cope with methods featuring WFL in decl names.
18547 * decl.c (unqualified_object_id_node): New global variable,
18549 (build_decl_no_layout): Removed.
18550 * expr.c (build_primtype_type_ref): Handle Double.
18551 (java_lang_expand_expr): Fixed indentations.
18552 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18553 (flag_wall, flag_redundant, flag_not_overriding,
18554 flag_static_local_jdk1_1, unqualified_object_id_node): Global
18555 variable declarations.
18556 (build_decl_no_layout): Removed prototype.
18557 (java_get_real_method_name): Added prototype.
18558 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18559 (java_parse_abort_on_error): Macro now just returns.
18560 * jcf-parse.c (jcf_parse_source): Check fclose returned
18561 value. Call emit_register_classes if java_report_errors returns
18563 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18564 flag_static_local_jdk1_1): New integer flags.
18565 (lang_decode_option): New flags set here.
18566 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18567 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18568 the flag_redundant variable.
18569 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18570 when parsing java.lang.Object class.
18571 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18572 NULL_TREE to build.
18573 (resolve_qualified_expression_name): Fixed indentation.
18574 (patch_array_ref): Changed prototype.
18575 (not_initialized_as_it_should_p): Prototype removed.
18576 (java_report_errors): Added function prototype.
18577 * parse.y (formal_parameter:): Changed error message for not yet
18578 supported final parameters.
18579 (class_type_list:): Set both PURPOSE and VALUE of created
18580 TREE_LIST to be class_type.
18581 (primary_no_new_array:): Handle class literals on primitive types.
18582 (parse_warning_context): Reinstalled correct force_error and
18583 do_warning flags setups.
18584 (java_report_errors): Changed prototype. Return java_error_count
18586 (variable_redefinition_error): Consider treating variable type as
18588 (create_interface): Warn about redundant abstract modifier if
18589 flag_redundant is set. Changed error message.
18590 (lookup_field_wrapper): Save/restore globals before/after looking
18592 (duplicate_declaration_error_p): Consider treating declaration
18593 type as a fake pointer.
18594 (register_fields): Extract real type from dependency node. Check
18595 for duplicate field declaration after type adjustment. Use
18596 DECL_INITIAL to store static final initialized values.
18597 (method_header): Extract real function type from dependency node.
18598 (check_abstract_method_header): Use GET_METHOD_NAME.
18599 (obtain_incomplete_type): Layout fake pointer type.
18600 (safe_layout_class): Don't try to check for methods before layout.
18601 (java_complete_class): Don't check for correct throws clause
18602 elements inheritance here.
18603 (resolve_and_layout): Broadened name parameter meaning.
18604 (reset_method_name): Use GET_METHOD_NAME.
18605 (java_get_real_method_name): New function.
18606 (java_check_regular_methods): Don't check methods in
18607 java.lang.Object. Verify lineage of throws clause elements. Use
18608 flag_no_overriding in warning report.
18609 (check_throws_clauses): Don't check if class was from
18610 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18611 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18612 (declare_local_variables): Use flag_static_local_jdk1_1 to report
18613 warning on unsupported final local variables. Use build_decl
18614 instead of build_decl_no_layout. Get real local variable type from
18616 (source_start_java_method): Get real parameter type from
18617 dependency node. Call build_decl instead of build_decl_no_layout.
18618 (java_layout_classes): Reverse tree and layout type and class as
18619 required. Mark class as loaded when done.
18620 (resolve_field_access): Fixed indentation. Restricted condition
18621 leading to static field access code generation. Set field_type
18622 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18623 (resolve_qualified_expression_name): Initialize type_found to
18624 null. Handle static field resolved during qualification. Fixed
18625 layout on non primitive field decl types.
18626 (not_accessible_p): Fixed typo in comment.
18627 (patch_method_invocation): Resolve and layout class to search from
18629 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18630 layout non primitive type, if necessary. Make method node only to
18632 (find_applicable_accessible_methods_list): Consider WFL'ed method
18633 decl names. Fixed indentation.
18634 (argument_types_convertible): Resolve and layout target type if
18636 (java_complete_tree): Fixed indentation problems. Rewrote
18637 CALL_EXPR thrown exceptions check. Re-installed further processing
18638 of the assignment in certain cases.
18639 (patch_assignment): Call maybe_build_primttype_type_ref to perform
18640 inlining on class literals.
18641 (valid_builtin_assignconv_identity_widening_p): Cope with constant
18643 (valid_method_invocation_conversion_p): Likewise.
18644 (patch_string): Temporary disable forbidden use of `this' in
18645 explicit constructor invocations when doing string concatenation
18646 within their scope.
18647 (patch_unaryop): Added comment. Reinstalled code to disable
18648 further check on assignment operation with cast expression RHS.
18649 (patch_switch_statement): Fixed indentation.
18650 (build_try_statement): Call build_decl instead of
18651 build_decl_no_layout.
18652 (patch_synchronized_statement): Likewise.
18653 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18654 IS_UNCHECKED_EXPRESSION_P.
18655 (check_thrown_exceptions_do): Changed leading comment. Resolve and
18656 layout argument exception type.
18657 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18658 of IS_UNCHECKED_EXPRESSION_P.
18660 1998-11-18 Anthony Green <green@cygnus.com>
18662 * jcf-parse.c (yyparse): Open class file in binary mode.
18664 1998-11-15 Per Bothner <bothner@cygnus.com>
18666 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
18668 * jcf-write.c (perform_relocations): Move check out one loop.
18670 1998-11-15 Anthony Green <green@hoser.cygnus.com>
18672 * Make-lang.in: Fix reference to srcdir.
18673 * jv-scan.c: Add missing xmalloc prototype.
18674 * jvgenmain.c: Ditto.
18676 1998-11-15 Per Bothner <bothner@cygnus.com>
18678 * decl.c (error_mark_node), java-tree.h: New global.
18679 * parse.y: Use empty_stmt_node instead of size_zero_node.
18680 (build_if_else_statement): If missing else, use empty_stmt_node.
18682 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
18683 (java_complete_expand_method): Complain if return is missing.
18684 (java_check_regular_methods): Comment out incorrect error check.
18685 (not_accessible_p): Fix incorrect handling of protected methods.
18686 (patch_method_invocation): Pass correct context to not_accessible_p.
18687 (find_applicable_accessible_methods_list): Likewise.
18688 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
18689 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
18690 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
18691 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
18693 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
18694 (push_int_const): Remove reundant NOTE_PUSH.
18695 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
18696 (- case SWITCH_EXPR): Fix code generation bug.
18697 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
18698 (generate_classfile): More robust for abstract methods.
18700 1998-11-15 Anthony Green <green@cygnus.com>
18702 * Makefile.in: jv-scan and jvgenmain all require libiberty.
18703 * Make-lang.in: Ditto.
18705 * jv-scan.c: Remove xmalloc and xstrdup definitions.
18706 * jvgenmain: Ditto.
18708 1998-11-15 Per Bothner <bothner@cygnus.com>
18710 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
18712 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
18714 1998-11-14 Per Bothner <bothner@cygnus.com>
18716 Allow uses of interface types to verify. This is not really
18717 type-safe, but it matches what Sun does, and is OK as long as
18718 there are appropriate run-time checks.
18719 * verify.c (merge_types): If merging two interface types,
18720 just set the result to java.lang.Object.
18721 * expr.c (pop_type): Any interface is matches by java.lang.Object.
18723 1998-11-13 Tom Tromey <tromey@cygnus.com>
18725 * gjavah.c (main): Handle --output-class-directory argument.
18726 * jvspec.c (lang_specific_driver): Translate `-d' into
18727 -foutput-class-dir.
18728 * jcf.h (jcf_write_base_directory): Declare.
18729 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18730 * lang-options.h: Mention -foutput-class-dir.
18731 * jcf-write.c (jcf_write_base_directory): New global.
18732 (make_class_file_name): Put generated .class file into `-d'
18733 directory, or into source directory if -d not given. Function now
18735 (write_classfile): Free class file name. Handle case where class
18737 (DIR_SEPARATOR): New macro.
18738 Include <sys/stat.h>
18740 * Makefile.in (prefix): New macro.
18742 1998-11-12 Per Bothner <bothner@cygnus.com>
18744 * parse.y (patch_invoke): Do less if flag_emit_class_files.
18745 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
18746 here (done in patch_invoke instead).
18747 (case_identity): Moved here from parse.y.
18749 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
18750 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
18751 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
18752 so they can be efficiently scanned without recursion.
18753 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18754 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
18755 in BLOCK iteratively, rather than recursively.
18757 * parse.y (do_unary_numeric_promotion): New function.
18758 (patch_unaryop, patch_binop, patch_array_ref): Use it.
18760 * parse.y (patch_newarray): Various fixes.
18762 Re-do handling of switch statements (for proper block scoping).
18763 * parse.y: Add just a single block for the enture switch block,
18764 but don't create any "case blocks".
18765 (group_of_labels): Rmeoved unneeded non-terminal.
18766 CASE_EXPR and DEFAULT_EXPR are added to current block.
18767 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
18768 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18769 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
18770 * parse.y (wfl_operator, print_int_node): Make non-static.
18771 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
18772 as part of recursive scan of block.
18773 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
18774 (patch_switch_statement): Most tests move dinto java_complete_tree.
18776 * parse.y: Make various production be non-typed (void).
18777 * parse.y (parse_error): Merged into issue_warning_error_from_context.
18778 * parse.y (add_stmt_to_compound): Don't create/change extra node.
18779 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
18781 * jcf-write.c (struct jcf_handler): New type.
18782 (struct jcf_switch_state): New type.
18783 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
18784 (alloc_handler, emit_unop, emit_reloc): New functions.
18785 (adjust_typed_op): Add extra parameter ("max type" offset).
18786 (emit_switch_reloc, emit_case-reloc): New function.
18787 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
18788 (generate_bytecode_insns): Support REAL_CST, switch statements,
18789 exception handling, method calls, object/array creation, and more.
18791 * class.c: Remove some unused variables.
18792 * constants.c (find_string_constant): New function.
18793 (count_constant_pool_bytes): Fix to correctly handle wide constants.
18794 * decl.c (complete_start_java_method): Don't _Jv_InitClass
18795 if flag_emit_class_files.
18797 1998-11-12 Tom Tromey <tromey@cygnus.com>
18799 * jcf-io.c (find_class): Added explanatory comment.
18801 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
18802 trailing slash to `.zip' entries.
18804 * jvspec.c (lang_specific_driver): Correctly handle case where
18805 GC_NAME not defined.
18807 1998-11-11 Tom Tromey <tromey@cygnus.com>
18809 * jvspec.c (GC_NAME): New define.
18810 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
18812 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18814 1998-11-11 Per Bothner <bothner@cygnus.com>
18816 * jcf-dump.c (TABLE_SWITCH): Fix typos.
18818 1998-11-11 Tom Tromey <tromey@cygnus.com>
18820 * jcf-dump.c (main): Correctly recognize `--'-style long options.
18822 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18824 * class.c (is_compiled_class): Call safe_layout_class for class
18825 compiled from source.
18826 * conver.h (convert_to_integer, convert_to_real,
18827 convert_to_pointer): Added prototypes.
18828 * decl.c (init_decl_processing): Non longer push the decls of
18829 `methodtable', `constants', `Class', `Field', `dispatchTable'
18830 `jexception' and `Method'.
18831 * expr.c (build_invokeinterface): New function.
18832 (expand_invoke): static variable CLASS_IDENT now in
18833 build_invokeinterface. Use build_invokeinterface.
18834 (expand_java_field_op): Moved code to inline
18835 java.lang.PRIMTYPE.TYPE into a function.
18836 (build_primtype_type_ref): New function.
18837 * java-tree.def (INSTANCEOF_EXPR): New tree code.
18838 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
18839 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
18840 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
18841 (DECL_LOCAL_STATIC_VALUE): New macro.
18842 (build_invokeinterface, build_primtype_type_ref): New function
18844 (java_parse_abort_on_error): Macro rewritten.
18845 * jcf-parse.c (current_method): Add comment to declaration.
18846 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
18847 Function prototypes fixed.
18848 (jcf_parse_source): push/pop parser context. save/restore global.
18849 (parse_source_file): Fixed leading comment. Now take a
18850 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18851 classes and pop the parser context anymore.
18852 (yyparse): Push parser context, save globals, parse the source
18853 file, restore globals and pop the parser context when processing a
18855 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18856 * lex.c (java_parse_doc_section): New function.
18857 (java_lex): Call java_parse_doc_section when appropriate. Build an
18858 operator around INSTANCEOF_TK.
18859 * lex.h (java_lineterminator, java_sprint_unicode,
18860 java_unicode_2_utf8, java_lex_error, java_store_unicode):
18861 Prototypes rewritten.
18862 (java_parse_escape_sequence, java_letter_or_digit_p,
18863 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18864 java_read_unicode, java_store_unicode, java_read_char,
18865 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18866 Added function prototypes.
18867 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
18869 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
18871 (struct parser_ctxt): New fields: deprecated,
18872 current_parsed_class_un, gclass_list.
18873 (fix_method_argument_names, issue_warning_error_from_context,
18874 resolve_package, lookup_package_type): New function prototypes.
18875 (resolve_expression_name): Fixed function prototype.
18876 (find_applicable_accessible_methods_list): Fixed indentation, added
18877 extra argument in prototype.
18878 (check_final_assignment, build_null_of_type, check_deprecation,
18879 check_method_redefinition, reset_method_name,
18880 java_check_regular_methods, java_check_abstract_methods,
18881 maybe_build_primttype_type_ref): New function prototype.
18882 * parse.y (conver.h): Include.
18883 (INSTANCEOF_TK): Tagged <operator>.
18884 (single_type_import_declaration): Use REGISTER_IMPORT macro.
18885 (relational_expression:): Build binop for instanceof.
18886 (java_push_parser_context): Remember ctxp->gclass_list across
18888 (java_pop_parser_context): Simply return if no context
18889 exists. Remember gclass_list across contexts.
18890 (issue_warning_error_from_context): New function.
18891 (parse_error_context): Don't setup ctxp->elc here. Call
18892 issue_warning_error_from_context instead.
18893 (parse_warning_context): Likewise.
18894 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
18895 setup. Link new class/interface to ctxp->gclass_list.
18896 (add_superinterfaces): Register interface as incomplete if not
18898 (create_class): Remember class unqualified name in
18899 ctxp->current_parsed_class_un. Check class deprecation.
18900 (register_fields): Check field deprecation. Remember static final
18901 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
18903 (method_header): New local variable ORIG_ARG. Use unqualified
18904 current class name for check on constructor errors. Promote return
18905 type if of record type. Argument list fix moved in
18906 fix_method_argument_names, called here. Check method deprecation.
18907 (fix_method_argument_names): New function.
18908 (method_declarator): Promote record typed arguments.
18909 (safe_layout_class): Check class methods before layout.
18910 (java_complete_class): Compute field layout when patched.
18911 (do_resolve_class): Try to load class after having it renamed
18912 after the package name.
18913 (get_printable_method_name): Use DECL_CONTEXT.
18914 (reset_method_name): New function.
18915 (check_method_redefinition): Use reset_method_name.
18916 (java_check_regular_methods): New local variable
18917 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
18918 names for error report. Check for compile-time error when method
18919 found has default (package) access.
18920 (java_check_abstract_methods): Now takes an interface DECL node as
18921 an argument. Also reinstall real name on unchecked
18922 overriding/hiding methods for error report.
18923 (java_check_methods): Fixed leading comment. Get classes to verify
18924 from ctxp->gclass_list. Use CHECK_METHODS macro and set
18925 CLASS_METHOD_CHECKED_P on class verification.
18926 (lookup_java_method2): Get real method name if necessary.
18927 (find_in_imports): Don't check package class access here.
18928 (resolve_package, lookup_package_type): New functions.
18929 (java_layout_classes): Fixed leading comment. Take classes to be
18930 laid out from ctxp->gclass_list.
18931 (java_complete_expand_methods): Don't expand native and abstract
18933 (java_expand_classes): New function.
18934 (resolve_expression_name): Use additional argument ORIG. Retrieve
18935 values of static final field of primitive types.
18936 (resolve_field_access): Handles static final field of promotive
18938 (resolve_qualified_expression_name): Handle STRING_CST as
18939 primaries and package name resolution. Check deprecation on found
18940 decls. Set where_found and type_found on non static field resolved
18941 during qualification. Layout non primitive field decl types.
18942 (check_deprecation): New function.
18943 (maybe_access_field): Simplified.
18944 (patch_method_invocation_stmt): Local variable CLASS_TYPE
18945 removed. Reverse method's argument when primary is a type. Don't
18946 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
18947 instead. Include abstract class in the list of class searchable
18948 for constructors. Use DECL_CONTEXT of found method for access
18949 checks. Check method deprecation.
18950 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
18951 converting arguments. Handle INVOKE_INTERFACE.
18952 (lookup_method_invoke): Search constructor using existing
18953 infrastructure (don't rely on lookup_java_constructor anymore).
18954 (find_applicable_accessible_methods_list): Extra argument flag
18955 LC. Now include constructor in the search.
18956 (qualify_ambiguous_name): Conditional expression are primaries.
18957 (not_initialized_as_it_should_p): static final are always
18959 (java_complete_tree): Pass extra NULL argument to
18960 resolve_expression_name. Stricter test to carry on patching
18961 assignments. New case for INSTANCEOF_EXPR.
18962 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
18963 (check_final_assignment, maybe_build_primttype_type_ref): New
18965 (patch_assignment): Detect resolved static finals and carry normal
18966 assignment error check on them. Inline PRIMTYPE.TYPE read access.
18967 (try_builtin_assignconv): Access constant 0 on all primitive
18969 (valid_builtin_assignconv_identity_widening_p): Accept identical
18970 types. Accept all promoted type on int type.
18971 (valid_ref_assignconv_cast_p): Accept a null pointer to be
18972 assigned to a reference.
18973 (valid_method_invocation_conversion_p): Accept to check null
18975 (build_binop): Merge declaration and initialization of local
18977 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
18978 numeric types. Improved validity test for qualify operators on
18980 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
18981 and PREINCREMENT_EXPR. Also detect resolved static finals of a
18982 primitive type and issue the appropriate error message.
18983 (resolve_type_during_patch): Mark class loaded when resolved.
18984 (patch_cast): Allow null to be cased to reference types.
18985 (build_null_of_type): New function.
18986 (patch_array_ref): Handle array on references correctly.
18987 (patch_return): Removed unused local variable MODIFY. Force
18988 boolean to be returned as integers. Allows null to be returned by
18989 a function returning a reference.
18990 * typeck.c (convert_to_integer, convert_to_real,
18991 convert_to_pointer): Prototypes moved to convert.h
18992 (lookup_argument_method): Use method real name, if necessary.
18994 1998-10-30 Tom Tromey <tromey@cygnus.com>
18996 * class.c (build_class_ref): Changed name of primitive classes to
18999 * class.c (make_class_data): Renamed fields: nmethods to
19000 method_count, method_count to dtable_method_count. Always set
19001 `state' field to 0.
19002 * decl.c (init_decl_processing): Likewise.
19004 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
19006 * class.c (layout_class): Don't mangle <finit>, produce
19007 __finit<class> instead. Don't verify artificial methods.
19008 * decl.c (finit_identifier_node): New declared global.
19009 (init_decl_processing): finit_identifier_node initialized.
19010 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
19011 * java-tree.h (finit_identifier_node): Declared as extern.
19012 (struct lang_decl): New field called_constructor.
19013 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
19014 (CLASS_HAS_FINIT_P): New macro.
19015 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
19016 explicit constructor invocation.
19017 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
19018 CALL_SUPER_CONSTRUCTOR_P): New macros.
19019 (write_classfile): Added prototype.
19020 * jcf-parse.c (jcf_parse_source): Parse and remember for
19021 generation if the file was seen on the command line.
19022 (parse_source_file): Don't write the class file here.
19023 (yyparse): Loop on files rewritten. Set current_jcf.
19024 (parse_zip_file_entries): Parse class file only if it was found.
19025 * lang.c (init_parse): Don't open command line provided filename
19027 (lang_parse): Don't set main_jcf anymore.
19028 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
19029 (JCONSTRUCTOR_CHECK): New macro.
19030 (JBSC_TYPE_P): New macro.
19031 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
19032 (COMPLETE_CHECK_OP_2): New macro.
19033 (struct parse_ctxt): New field explicit_constructor_p.
19034 (check_class_interface_creation): Fixed prototype indentation.
19035 (patch_method_invocation_stmt): Prototype reflects added argument.
19036 (patch_invoke): Likewise.
19037 (complete_method_declaration, build_super_invocation,
19038 verify_constructor_circularity,
19039 build_this_super_qualified_invocation, get_printable_method_name,
19040 patch_conditional_expr, maybe_generate_finit, fix_constructors,
19041 verify_constructor_super, create_artificial_method,
19042 start_artificial_method_body, end_artificial_method_body,
19043 generate_field_initialization_code): New function prototypes.
19044 * parse.y: Fixed leading comment
19045 (constructor_header:, constructor_body:, block_end:): Rules tagged
19047 (type_declaration:): Call maybe_generate_finit.
19048 (method_declaration:): Action for method_body: placed in new
19049 function complete_method_declaration, called here.
19050 (constructor_declaration:): Defined actions. Removed leading
19052 (constructor_header:): New rule with action.
19053 (constructor_body:): Rule rewritten using block_begin: and
19054 block_end:. Defined actions.
19055 (constructor_declarator:, explicit_constructor_invocation:):
19057 (block:): Use new rules block_begin: block_end:.
19058 (block_begin:, block_end:): New rules and actions.
19059 (block_statements:): Fixed error message for explicit
19061 (method_invocation:): Call build_this_super_qualified_invocation
19062 if primary is `this' or `super' was seen.
19063 (conditional_expression:): Action defined.
19064 (extra_ctxp_pushed_p): New static global flag.
19065 (java_parser_context_save_global): Create parser context if
19066 necessary. Use extra_ctxp_pushed_p to remember it.
19067 (java_parser_context_restore_global): Pop extra parser context if
19069 (build_array_from_name): Array on primitive types are marked
19071 (register_fields): Restore new name in field initializer
19072 expression if type was altered. Non static fields initialized upon
19073 declaration marked initialized.
19074 (maybe_generate_finit): New function.
19075 (maybe_generate_clinit): Use create_artificial_method,
19076 start_artificial_method_body, end_artificial_method_body. Generate
19077 debug info for enclosed initialization statements.
19078 (method_header): Fixed leading comment. Check constructor
19079 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
19081 (complete_method_declaration, constructor_circularity_msg,
19082 verify_constructor_circularity): New functions.
19083 (get_printable_method_name): New function.
19084 (check_method_redefinition): Don't rename <finit> methods. Fix
19085 declared constructor names. Error message for
19086 constructors modified.
19087 (java_check_regular_methods): Local variable seen_constructor
19088 renamed saw_constructor. Skip verification on constructors. Create
19089 default constructor with create_artificial_method.
19090 (java_check_methods): Removed unnecessary empty line.
19091 (create_artificial_method, start_artificial_method_body,
19092 end_artificial_method_body): New functions.
19093 (java_layout_classes): Changed leading comment. Reverse fields
19094 list if necessary. Always layout java.lang.Object if being
19096 (java_complete_expand_methods): Verify constructor circularity.
19097 (java_complete_expand_method): Call fix_constructor on
19098 constructors. Local variable no_ac_found removed. Restore
19099 bindings if method body expansion failed.
19100 (fix_constructors, verify_constructor_super,
19101 generate_field_initialization_code): New function.
19102 (java_expand_classes): Fixed leading comment. Write class file
19104 (resolve_expression_name): Check for illegal instance variable
19105 usage within the argument scope of an explicit constructor
19107 (resolve_qualified_expression_name): Pass extra from_super flag
19108 when invoking patch_method_invocation_stmt. New case for
19109 conditional expression when used as a primary. Check for error
19110 when acquiring super.
19111 (patch_method_invocation_stmt): Added extra argument super. New
19112 local variable is_static_flag. Set class_to_search according to
19113 the nature of the constructor invocation. Don't add `this'
19114 argument when expanding NEW_CLASS_EXPR. Check for illegal method
19115 invocation within the argument scope of explicit constructor
19116 invocation. Set is_static according to is_static_flag. Provide
19117 extra `super' argument to patch_invoke invocation.
19118 (patch_invoke): New argument from_super. Loop on arguments
19119 indentation fixed. Pass from_super to invocation_mode. New switch
19120 case INVOKE_SUPER. Fixed error message in switch default case.
19121 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
19123 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
19124 (lookup_method_invoke): Fixed prototypes in candidates list. Error
19125 message takes constructors into account.
19126 (find_applicable_accessible_methods_list): Fixed indentation.
19127 (qualify_ambiguous_name): Take explicit constructor invocation
19128 into account. Deal with a conditional expression as a primary to
19130 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
19131 case. Added extra argument to patch_method_invocation_stmt.
19132 Register calls made to explicit constructor `this'. Don't call
19133 save_expr in ARRAY_REF case when emitting class files. Check for
19134 illegal use of this when expanding explicit constructor invocation
19136 (complete_function_arguments): Set and reset parser context
19137 explicit_constructor_p field value when appropriate.
19138 (build_super_invocation, build_this_super_qualified_invocation):
19140 (patch_assignment): Fixed typo.
19141 (patch_unaryop): Check on final fields occurs only when a decl
19143 (patch_return): Take constructors into account.
19144 (patch_conditional_expr): New function.
19145 * typeck.c (build_java_signature): Removed unnecessary empty line.
19147 1998-10-28 Jeffrey A Law (law@cygnus.com)
19149 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
19151 1998-10-28 Tom Tromey <tromey@cygnus.com>
19153 * decl.c (init_decl_processing): Renamed fields.
19154 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
19155 interface_len, msize fields.
19157 * class.c (make_class_data): Removed subclass_head and
19158 subclass_next fields.
19159 * decl.c (init_decl_processing): Removed subclass_head and
19160 subclass_next fields.
19162 1998-10-28 Jeffrey A Law (law@cygnus.com)
19164 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
19165 * mangle.c (emit_unicode_mangled_name): Similarly.
19167 1998-10-26 Nick Clifton <nickc@cygnus.com>
19169 * jcf-parse.c (get_constant): Place braces around code to compute
19170 'd' when REAL_ARITHMETIC is not defined.
19172 1998-10-25 H.J. Lu (hjl@gnu.org)
19174 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
19177 1998-10-23 Tom Tromey <tromey@cygnus.com>
19179 * lang-specs.h: `.zip' files are input to jc1.
19181 1998-10-22 Per Bothner <bothner@cygnus.com>
19183 * jvspecs.c: Add (but don't enable) support for combining multiple
19184 .class and .java input filenames to a single jc1 invocation.
19185 Add support for -C flag (copile to .class files).
19186 Translate -classpath and -CLASSPATH arguments.
19187 * lang-specs.h: Don't set %2 spec.
19189 1998-10-22 Tom Tromey <tromey@cygnus.com>
19191 * jcf-path.c (add_entry): Don't add trailing separator if entry is
19193 (add_path): Don't add trailing separator to non-empty path
19196 * lang.c (lang_decode_option): Check for -fclasspath and
19197 -fCLASSPATH before examining other `-f' options.
19199 * java-tree.h (finalize_identifier_node): Don't declare.
19200 * class.c (make_class_data): Don't push "final" field.
19201 * decl.c (init_decl_processing): Don't push "final" field.
19202 (finalize_identifier_node): Removed.
19203 (init_decl_processing): Don't set finalize_identifier_node.
19205 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
19207 1998-10-11 Anthony Green <green@cygnus.com>
19209 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
19210 (JV_SCAN_SOURCES): New macro.
19211 (JCF_DUMP_SOURCES): Likewise.
19212 (jcf-dump$(exeext)): New target.
19213 (jv-scan$(exeext)): New target.
19215 1998-10-22 Tom Tromey <tromey@cygnus.com>
19217 * Makefile.in (LEX): Removed.
19218 (LEXFLAGS): Likewise.
19219 (SET_BISON): New macro.
19221 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
19222 spurious diffs in parse.c.
19223 ($(PARSE_SCAN_C)): Likewise.
19224 (PARSE_DIR): New macro.
19226 (PARSE_SCAN_C): Likewise.
19227 (PARSE_RELDIR): New macro.
19229 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
19231 * jcf-io.c (find_class): Use saw_java_source to determine when to
19232 look for `.java' file.
19233 * jcf-parse.c (saw_java_source): New global.
19234 (yyparse): Set it if `.java' file seen.
19236 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
19237 (GCJH_SOURCES): Likewise.
19238 * Makefile.in (datadir): New macro.
19239 (libjava_zip): Likewise.
19240 (JAVA_OBJS): Added jcf-path.o.
19241 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19242 (../gcjh$(exeext)): Likewise.
19243 (jcf-path.o): New target.
19244 * java-tree.h (fix_classpath): Removed decl.
19245 * jcf-parse.c (fix_classpath): Removed.
19246 (load_class): Don't call fix_classpath.
19247 * parse.y (read_import_dir): Don't call fix_classpath.
19248 * lex.h: Don't mention classpath.
19249 * lex.c (java_init_lex): Don't initialize classpath.
19250 * jcf-io.c (classpath): Removed global.
19251 (find_class): Use jcf_path iteration functions. Correctly search
19252 class path for .java file.
19253 (open_in_zip): New argument `is_system'.
19254 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
19255 classpath-related options.
19256 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
19258 (lang_init): Call jcf_path_init.
19259 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
19260 * lang-specs.h: Handle -I. Minor cleanup to -M options.
19261 Correctly put braces around second string in each entry.
19262 * gjavah.c (main): Call jcf_path_init. Recognize all the new
19263 classpath-related options.
19264 (help): Updated for new options.
19265 * jcf.h: Declare functions from jcf-path.c. Don't mention
19266 `classpath' global.
19267 * jcf-path.c: New file.
19269 * jcf-depend.c: Include jcf.h.
19271 * jcf-write.c (localvar_alloc): Returns `void'.
19272 (localvar_free): Removed unused variable.
19274 * lang.c (OBJECT_SUFFIX): Define if not already defined.
19275 (init_parse): Use OBJECT_SUFFIX, not ".o".
19277 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
19279 * class.c (emit_register_classes): Renamed from
19280 emit_register_class.
19281 * java-tree.h (emit_register_classes): Prototype renamed from
19282 emit_register_class.
19283 * jcf-parse.c (yyparse): Call emit_register_classes once before
19285 * parse.y (java_expand_classes): No longer register classes.
19287 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
19289 * class.c (is_compiled_class): New local variable
19290 seen_in_zip. Identify classes found in currently compiled source
19292 * decl.c (complete_start_java_method): Fixed typo.
19293 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
19294 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
19295 (CLASS_P): Moved around.
19296 (java_parse_abort_on_error): Macro moved from jcf-parse.c
19297 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
19299 (jcf_parse_source): Changed leading comment. Removed unnecessary
19300 fclose and CLASS_FROM_SOURCE_P marking.
19301 (parse_source_file): New local variables remember_for_generation
19302 and filename. Mark parsed file name identifier node. Removed block
19303 executed when parse_only was null. Set remember_for_generation.
19304 Use it as an argument to java_pop_parser_context.
19305 (yyparse): New local variables several_files, list, next node and
19306 current_file_list. Split ampersand separated file names into
19307 current_file_list. Iterate through the list and parse accordingly.
19308 * parse.h (java_pop_parser_context): New function prototype.
19309 * parse.y (ctxp_for_generation): New static global variable.
19310 (java_pop_parser_context): New argument generate. Link popped ctxp
19311 to ctxp_for_generation list accordingly.
19312 (java_complete_expand_methods): Fixed indentation.
19313 (java_expand_classes): New function.
19315 1998-10-17 Per Bothner <bothner@cygnus.com>
19317 * Makefile.in: Link with libiberty.a instead of memmove.o.
19319 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
19321 * lex.c (setjmp.h): No longer included.
19322 * lex.h (setjmp.h): Included.
19323 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19324 (duplicate_declaration_error_p): Renamed from
19325 duplicate_declaration_error.
19326 (build_array_from_name): New function prototype.
19327 * parse.y (setjmp.h): No longer included.
19328 (variable_declarator_id): Define action.
19329 (build_array_from_name): New function.
19330 (duplicate_declaration_error_p): Renamed from
19331 duplicate_declaration_error. Fixed leading comment.
19332 (register_fields): Main `for' loop reorganized. Uses
19333 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19334 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19335 build_array_from_name.
19336 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19338 (read_import_dir): Don't try to skip `.' and `..'.
19339 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19340 build_array_from_name. Main `for' loop reorganized.
19341 (resolve_qualified_expression_name): When building access to a
19342 field, use the type where the field was found, not its own type.
19343 (maybe_access_field): Use field DECL_CONTEXT if the type where the
19344 field was found is null.
19345 (qualify_ambiguous_name): Sweep through all successive array
19348 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
19350 * java-tree.h (pop_labeled_block, lang_printable_name,
19351 maybe_add_interface, set_super_info, get_access_flags_from_decl,
19352 interface_of_p, inherits_from_p, fix_classpath,
19353 complete_start_java_method, emit_handlers, init_outgoing_cpool,
19354 make_class_data, register_class, alloc_name_constant): New
19355 function prototypes.
19356 * lang.c (lang_decode_option): Set argc argument unused. Fixed
19357 indentation. Added cast to remove warning.
19358 (lang_printable_name): Set v argument unused.
19359 (lang_print_error): Added argument to lang_printable_name call.
19360 (java_dummy_print, print_lang_decl, print_lang_type,
19361 print_lang_identifier, lang_print_xnode): All argument marked
19363 * lex.c (java_unget_unicode): Removed unnecessary argument.
19364 (java_allocate_new_line): Unused local variable is gone.
19365 (java_read_char): Added parenthesis in expressions to remove
19366 warnings. Added final return statement.
19367 (java_read_unicode): Added parenthesis in expression to remove
19369 (java_parse_end_comment): Fixed java_unget_unicode invocation.
19370 (java_parse_escape_sequence): Likewise.
19371 (java_lex): Unused local variables are gone. Fixed
19372 java_unget_unicode invocation.
19373 * lex.h (set_float_handler): Prototype added when JC1_LITE not
19375 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19376 lang_printable_name invocation in macro.
19377 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19379 (duplicate_declaration_error): Suppressed unused argument in
19381 (identical_subpath_p): Function declaration is gone.
19382 (patch_invoke): Suppressed unused argument in prototype.
19383 (patch_cast, build_labeled_block, check_thrown_exceptions):
19385 * parse.y (setjmp.h): Included
19386 (toplev.h): Likewise.
19387 (field_declaration:): Suppressed unused local
19388 (label_decl:): Fixed build_labeled_block invocation.
19389 (java_pop_parser_context): Put extra parenthesis around assignment
19391 (yyerror): Suppressed unused local variables.
19392 (variable_redefinition_error): Fixed lang_printable_name
19394 (create_interface): Suppressed unused local variables.
19395 (create_class): Likewise.
19396 (duplicate_declaration_error): Suppressed unused argument. Fixed
19397 lang_printable_name invocation.
19398 (register_fields): Suppressed unused local variable. Fixed
19399 duplicate_declaration_error invocation.
19400 (method_header): Suppressed unused local variable.
19401 (method_declarator, parser_check_super): Likewise.
19402 (java_complete_class): Suppressed unused local variable. Fixed
19403 fatal error message.
19404 (complete_class_report_errors): Added default: in switch.
19405 (java_check_regular_methods): Fixed lang_printable_name
19407 (check_throws_clauses): Likewise.
19408 (java_check_abstract_methods): Suppressed unused local
19409 variable. Fixed lang_printable_name invocation.
19410 (read_import_entry): Added supplemental return statement.
19411 (read_import_dir): Suppressed unused local variables.
19412 (check_pkg_class_access, declare_local_variables): Likewise.
19413 (source_start_java_method): Suppressed unused extern variable
19415 (expand_start_java_method): Suppressed unused extern and local
19416 variable declarations.
19417 (java_complete_expand_methods): Likewise.
19418 (java_complete_expand_method): Suppressed unused local variables.
19419 (make_qualified_name): Likewise.
19420 (resolve_qualified_expression_name): Added default: in
19421 switch. Fixed lang_printable_name invocation.
19422 (class_instance_creation_expression): Added parenthesis around
19424 (patch_method_invocation_stmt): Fixed lang_printable_name and
19425 patch_invoke invocations.
19426 (check_for_static_method_reference): Fixed lang_printable_name
19428 (patch_invoke): Suppressed unused arguments and local variables.
19429 (lookup_method_invoke): Suppressed unused local variables.
19430 (qualify_ambiguous_name): Added default: in switch.
19431 (identical_subpath_p): Function removed.
19432 (patch_assignment): Suppressed unused local variables. Suppressed
19433 unnecessary if statement. Fixed lang_printable_name invocations.
19434 (try_builtin_assignconv): Fixed lang_printable_name invocations.
19435 (valid_ref_assignconv_cast_p): Parenthesis around
19436 expression. Suppressed unused local variables.
19437 (build_binop): Suppressed unused local variables. fixed
19438 lang_printable_name invocations.
19439 (string_constant_concatenation): Suppressed unused local
19441 (patch_unaryop): Fixed lang_printable_name invocation.
19442 (patch_cast): Suppressed unnecessary argument. Fixed
19443 lang_printable_name invocation.
19444 (patch_array_ref): Fixed lang_printable_name invocation.
19445 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19446 (build_labeled_block): Suppressed unused argument.
19447 (generate_labeled_block): Fixed build_labeled_block invocation.
19448 (build_loop_body): Suppressed unused local variables.
19449 (patch_loop_statement): Likewise.
19450 (patch_exit): Fixed lang_printable_name invocation.
19451 (patch_switch_statement): Likewise.
19452 (case_identity): First argument marked unused.
19453 (patch_try_statement): Fixed lang_printable_name invocations.
19454 (patch_synchronized_statement, patch_throw_statement): Likewise.
19455 (check_thrown_exceptions): Fixed check_thrown_exceptions and
19456 lang_printable_name invocations.
19457 (check_thrown_exceptions_do): Suppressed unused argument.
19459 1998-10-14 Tom Tromey <tromey@cygnus.com>
19461 * jcf-write.c (write_classfile): Add output class file as target.
19462 * lang-options.h: Added -MD, -MMD, -M, and -MM.
19463 * jcf.h: Added declarations for dependency-tracking functions.
19464 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19465 * lang.c (lang_decode_option): Recognize -MD and -MMD.
19466 (finish_parse): Call jcf_dependency_write.
19467 (dependency_tracking): New global.
19468 (DEPEND_SET_FILE): New define.
19469 (DEPEND_ENABLE): New define.
19470 (init_parse): Enable dependency tracking if required.
19472 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19473 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19474 (../gcjh$(exeext)): Likewise.
19475 (jcf-depend.o): New target.
19476 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19477 (GCJH_SOURCES): Likewise.
19478 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
19480 (find_classfile): Added dep_name argument.
19481 (find_class): Compute name of dependency.
19482 (open_in_zip): Call jcf_dependency_add_file.
19483 * gjavah.c (output_file): No longer global.
19484 (usage): Don't mention "gjavah".
19486 (java_no_argument): Likewise.
19487 (version): Likewise.
19488 (main): Recognize and handle -M family of options.
19489 (print_mangled_classname): Return is void.
19490 (process_file): Handle case where output is suppressed.
19491 (HANDLE_END_FIELD): Likewise.
19492 (HANDLE_METHOD): Likewise.
19493 * jcf-depend.c: New file.
19495 1998-10-13 Jeffrey A Law (law@cygnus.com)
19497 * java-tree.def: Add missing newline at EOF.
19499 1998-10-13 Tom Tromey <tromey@cygnus.com>
19501 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19502 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
19504 Include <config.h> and "system.h".
19505 (disassemble_method): Undefine RET to avoid clash with
19506 config/i386/i386.h.
19508 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
19510 * decl.c (runtime_exception_type_node, error_exception_type_node):
19511 New global variables.
19512 (init_decl_processing): Initialized.
19513 * expr.c (java_lang_expand_expr): Set caught exception type to
19514 null if catch handler argument doesn't exit.
19515 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19517 * java-tree.h (runtime_exception_type_node,
19518 error_exception_type_node): Global variables declared.
19519 (DECL_FUNCTION_THROWS): New macro.
19520 (DECL_FUNCTION_BODY): Modified comment.
19521 (DECL_SPECIFIC_COUNT): Likewise.
19522 (struct lang_decl): New field throws_list.
19523 (IS_UNCHECKED_EXPRESSION_P): New macro.
19524 * lex.c (java_lex): Generate location information for THROW_TK.
19525 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19526 EXCEPTIONS_P): New macros.
19527 (enum jdep_code): New value JDEP_EXCEPTION.
19528 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19529 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19530 PATCH_METHOD_RETURN_ERROR): New macros.
19531 (patch_method_invocation_stmt): Added new argument to prototype.
19532 (patch_synchronized_statement, patch_throw_statement,
19533 check_thrown_exceptions, check_thrown_exceptions_do,
19534 purge_unchecked_exceptions, check_throws_clauses): New function
19536 * parse.y Fixed typo in keyword section.
19537 (throw:): Rule tagged <node>.
19538 (THROW_TK): Keyword tagged <operator>.
19539 (method_header:): Last argument to call to method_header passed
19541 (throws:, class_type_list:, throw_statement:,
19542 synchronized_statement:, synchronized:): Defined actions.
19543 (method_header): New local variable current. Register exceptions
19544 from throws clause.
19545 (java_complete_tree): Complete and verify exceptions from throws
19547 (complete_class_report_errors): Error message on exceptions not
19549 (java_check_regular_methods): Fixed typo. Shortcut on private
19550 overriding methods. Changed error message on method
19551 redefinition. Check for throws clause compatibility.
19552 (check_throws_clauses): New function.
19553 (java_check_abstract_methods): Use DECL_NAME for wfl or current
19554 method. Changed error message on method redefinition.
19555 (currently_caught_type_list): New static variable.
19556 (java_complete_expand_methods): Purge unchecked exceptions from
19557 throws clause list. Call PUSH_EXCEPTIONS before walk and
19558 POP_EXCEPTIONS after.
19559 (resolve_qualified_expression_name): Pass new argument as NULL to
19560 patch_method_invocation_stmt.
19561 (patch_method_invocation_stmt): New argument ref_decl. Invoke
19562 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19563 argument list when appropriate. Use new argument if non null to
19564 store selected method decl.
19565 (patch_invoke): Convert if necessary args of builtin types before
19566 forming CALL_EXPR. Argument list no longer reversed here.
19567 (invocation_mode): Treat final methods as static methods.
19568 (java_complete_tree): New cases for THROW_EXPR: and
19569 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19571 (complete_function_arguments): No more RECORD_TYPE
19572 conversion. Function parameter nodes no longer saved.
19573 (valid_ref_assignconv_cast_p): Avoid handling null type.
19574 (patch_binop): Fixed null constant reference handling.
19575 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19576 BUILD_THROW macros.
19577 (patch_try_statement): Fixed comments. Record caught types in
19578 list, push the list, expand try block and pop the list.
19579 (patch_synchronized_statement, patch_throw_statement,
19580 check_thrown_exceptions, check_thrown_exceptions_do,
19581 purge_unchecked_exceptions): New functions.
19582 * typeck.c (lookup_argument_method): Allow WFL in place of method
19583 DECL_NAME during method definition check
19585 1998-10-09 Tom Tromey <tromey@cygnus.com>
19587 * gjavah.c (decode_signature_piece): New function.
19588 (print_c_decl): Use it. Added `name_override' argument.
19589 (print_method_info): Use name_override argument to print_c_decl.
19590 (seen_fields): Removed.
19591 (print_field_info): Don't update seen_fields.
19592 (struct method_name): New structure.
19593 (method_name_list): New global.
19594 (print_method_info): Add new method to list of methods.
19595 (name_is_method_p): New function.
19596 (print_field_info): If field name has same name as method, then
19598 (process_file): Parse methods before fields.
19599 (field_pass): New global.
19600 (HANDLE_END_FIELD): Take field_pass into account.
19602 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19604 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19605 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19607 1998-10-03 Anthony Green <green@cygnus.com>
19609 * jvspec.c: Fix bug in jvgenmain_spec patch.
19611 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19613 * Makefile.in (lang.o:): Install dependency on java-tree.def.
19614 * decl.c (soft_exceptioninfo_call_node): New global variable.
19615 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19616 takes extra integer argument. soft_exceptioninfo_call_node
19618 * except.c (java_set_exception_lang_code): New function
19619 (method_init_exceptions): Called here.
19620 (prepare_eh_table_type): New function.
19621 (expand_end_java_handler): Called here.
19622 * expr.c (build_java_throw_out_of_bounds_exception): Now features
19623 one argument. Modified generation of call to
19624 soft_badarrayindex_node to use new argument.
19625 (build_java_arrayaccess): Pass faulty index value to
19626 build_java_throw_out_of_bounds_exception.
19627 (generate_name): New function.
19628 (java_lang_expand_expr): New local variables node, current,
19629 has_finally_p. Expand TRY_EXPR node.
19630 (process_jvm_instruction): Replace top of the stack with thrown
19631 object reference when entering exception handler.
19632 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19633 specific tree codes.
19634 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19636 (DECL_SPECIFIC_COUNT): New macro.
19637 (prepare_eh_table_type, java_set_exception_lang_code,
19638 generate_name): New function declarations.
19639 (match_java_method): Declaration deleted.
19640 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19642 * lex.c (TRY_TK, CATCH_TK): Generate location information.
19643 * parse.h (redefinition_error, refine_accessible_methods_list,
19644 can_cast_to_p): Function declaration removed.
19645 (classitf_redefinition_error, variable_redefinition_error,
19646 parse_jdk1_1_error, find_applicable_accessible_methods_list,
19647 find_most_specific_methods_list, argument_types_convertible,
19648 enter_a_block, valid_builtin_assignconv_identity_widening_p,
19649 valid_cast_to_p, valid_method_invocation_conversion_p,
19650 try_reference_assignconv, add_stmt_to_compound,
19651 build_jump_to_finally, build_tree_list, patch_try_statement,
19652 java_get_catch_block): New function declarations.
19653 * parse.y (string_buffer_type): Global variable deleted.
19654 (group_of_labels, catches, catch_clause, catch_clause_parameter,
19655 finally): Rules tagged <node>.
19656 (TRY_TK, CATCH_TK): Token tagged <operator>.
19657 (class_body_declaration:, class_member_declaration:,
19658 formal_parameter:, explicit_constructor_invocation:,
19659 interface_member_declaration:, constant_declaration:,
19660 primary_no_new_array:, class_instance_creation_expression:,
19661 array_creation_expression:): Issue error on unsuported JDK1.1
19663 (try_statement:, catches:, finally:): Define actions.
19664 (catch_clause_parameter): New rule.
19665 (catch_clause:): Use new rule catch_clause_parameter.
19666 (parse_jdk1_1_error): New function.
19667 (redefinition_error): Renamed classitf_redefinition_error.
19668 (variable_redefinition_error): New function.
19669 (check_class_interface_creation): Call
19670 classitf_redefinition_error.
19671 (java_complete_tree): Added error message on JDEP_TYPE: case.
19672 (complete_class_report_errors): Fixed indentation.
19673 (declare_local_variables): Call variable_redefinition_error.
19674 (source_end_java_method): Call java_set_exception_lang_code and
19675 emit_handlers where appropriate.
19676 (java_method_add_stmt): Call add_stmt_to_block.
19677 (add_stmt_to_block): New function.
19678 (lookup_method_invoke): Fixed outside comment. new local variable
19679 candicates. Call find_applicable_accessible_methods_list and
19680 find_most_specific_methods_list when searching for a
19681 method. Modified error report to list possible candidates when
19683 (find_applicable_accessible_methods_list,
19684 find_most_specific_methods_list, argument_types_convertible): New
19686 (refine_accessible_methods_list): Function deleted.
19687 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19688 expr (if applicable) before calling patch_array_ref.
19689 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19690 (enter_block): Fixed comment.
19691 (enter_a_block): New function.
19692 (patch_assignment): Reorganized. Call try_reference_assignconv for
19693 references. Call valid_cast_to_p instead of can_cast_to_p.
19694 (try_reference_assignconv,
19695 valid_builtin_assignconv_identity_widening_p): New functions.
19696 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19697 (valid_cast_to_p, valid_method_invocation_conversion_p): New
19699 (build_string_concatenation): Don't resolve StringBuffer.
19700 (patch_cast): Fixed inverted arguments.
19701 (patch_array_ref): Code to save array expr deleted. Call
19702 valid_cast_to_p instead of can_cast_to_p.
19703 (generate_labeled_block): Call generate_name.
19704 (build_jump_to_finally, build_try_statement, java_get_catch_block,
19705 patch_try_statement): New functions.
19706 * typeck.c (match_java_method): Function deleted.
19708 1998-10-02 Anthony Green <green@cygnus.com>
19710 * jvspec.c: jvgenmain_spec uses different temporary file names.
19712 1998-10-02 Anthony Green <green@cygnus.com>
19714 * jvspec.c (lang_specific_driver): Fail if user specifies
19715 --main= when not linking.
19717 1998-09-28 Tom Tromey <tromey@cygnus.com>
19719 * class.c (make_class_data): Push value for `thread' field.
19720 * decl.c (init_decl_processing): Added `thread' field to class.
19722 * class.c (add_field): Always make static fields externally
19725 1998-09-26 Anthony Green <green@cygnus.com>
19727 * expr.c (build_java_athrow,
19728 build_java_throw_out_of_bounds_exception, expand_invoke,
19729 build_newarray, expand_java_multianewarray, build_java_monitor):
19730 Update comments to reflect _Jv_* function names.
19732 1998-09-25 Per Bothner <bothner@cygnus.com>
19734 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
19735 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
19736 * parse.y (expand_start_java_method): Likewise.
19738 1998-09-24 Per Bothner <bothner@cygnus.com>
19740 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
19742 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19743 (add_field): No longer need to convert from RECORD_TYPE to pointer,
19744 * expr.c: Remove no-longer-needed calls to promote_type.
19745 * decl.c (give_name_to_locals): Liekwise.
19746 * jcf-parse.c (get_class_constant): Compensate for new signatures.
19747 * parse.y: Add/remove promote_type calls as appropriate.
19748 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
19749 (parse_signature_string): Likewise.
19750 (build_java_array_type): Fix for now signature convenions.
19752 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
19754 1998-09-23 Tom Tromey <tromey@cygnus.com>
19756 * class.c (init_class_processing): libjava function renamed to
19759 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
19761 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19762 * java-tree.def: Fixed DEFTREECODE third argument.
19763 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
19764 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
19765 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19766 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19767 JAVA_THIS_EXPR): Now replaced by tree code definitions.
19768 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19769 * lang.c (java_tree_code_type, java_tree_code_length,
19770 java_tree_code_name): New arrays.
19771 (lang_init): Append Java tree node definitions to Gcc ones.
19772 * lex.c (expression_obstack): Declared as extern when JC1_LITE
19774 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
19776 (java_lex): Allow declaration of empty string constants. Retain
19777 location information on CASE_TK and DEFAULT_TK.
19778 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
19779 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19780 Modified to be more robust.
19781 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19782 (build_new_invocation, try_builtin_assignconv,
19783 patch_switch_statement, string_constant_concatenation,
19784 build_string_concatenation, patch_string_cst, patch_string,
19785 java_expand_switch): New function declarations.
19786 * parse.y: Rules related to switch and EH tagged <node>.
19787 (label_id): Set to NULL_TREE
19788 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
19790 (this_or_super:): Fixed indentation.
19791 (statement:, statement_nsi:, statement_without_trailing_substatement:,
19792 statement_expression:): Removed call to RULE on all sub-rules.
19793 (switch_expression:, switch_labels:): New rules.
19794 (switch_statement:, switch_block:, switch_block_statement_groups:,
19795 switch_block_statement_group:, switch_labels:, switch_label:):
19797 (throw_statement:, synchronized_statement:, try_statement:):
19798 Defined temporary actions.
19799 (class_instance_creation_expression:): Call
19800 build_new_invocation. Fixed indentation.
19801 (field_access): Fixed indentation.
19802 (method_invocation): Likewise.
19803 (make_qualified_primary): Use THIS_EXPR.
19804 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
19805 resolving from SUPER, set *type_found.
19806 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19807 (java_complete_tree): Removed unused local variable `location'. Case
19808 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19809 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19810 on MODIFY_EXPR: and all binary operator tree code cases. Removed
19811 STRING_CST: case. default: checks for patchable strings.
19812 (complete_function_arguments): Transform string constant or
19813 crafted StringBuffer if necessary.
19814 (build_method_invocation): Fixed comments.
19815 (build_new_invocation): New function.
19816 (patch_assignment): Call try_builtin_assignconv to figure a valid
19817 assignment conversion between builtin types.
19818 (try_builtin_assignconv): New function.
19819 (build_binop): Use URSHIFT_EXPR directly to call build.
19820 (operator_string): Use UNARY_PLUS_EXPR.
19821 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
19823 (do_merge_string_cste, merge_string_cste,
19824 string_constant_concatenation, build_string_concatenation,
19825 patch_string, patch_string_cst): New function.
19826 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19827 (patch_unaryop): Likewise. New test of valid ++/-- operands.
19828 (build_newarray_node): Use NEW_ARRAY_EXPR.
19829 (build_this): Use THIS_EXPR.
19830 (build_return): Enable debug information on return statement.
19831 (build_if_else_statement): Likewise.
19832 (complete_labeled_statement): Fixed related comment.
19833 (build_loop_body): Fixed comment.
19834 (build_bc_statement): Enable debug information on break/continue
19836 (patch_bc_statement): Fixed typos. Handle SWITCH statement
19838 (patch_switch_statement, case_identity, java_expand_switch): New
19841 1998-09-21 Per Bothner <bothner@cygnus.com>
19843 * buffer.h (BUFFER_INIT): New macro.
19844 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
19845 Pass (struct jcf_partial *state) to most functions.
19846 (jcf_block, jcf_relocation): New types.
19847 Support labels, branches, conditionals, loops.
19849 1998-09-21 Tom Tromey <tromey@cygnus.com>
19851 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19853 1998-09-21 Per Bothner <bothner@cygnus.com>
19855 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
19856 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
19857 not integer_type_node (INT_TYPE_SIZ bits).
19859 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
19861 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
19862 * jcf-dump.c (print_exception_table): New function.
19863 (disassemble_method): Better handling of wide instructions.
19864 Make more robust for bad input.
19866 1998-09-30 Jeffrey A Law (law@cygnus.com)
19868 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19871 1998-09-17 Jeffrey A Law (law@cygnus.com)
19873 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19875 1998-09-17 Tom Tromey <tromey@cygnus.com>
19877 * Makefile.in ($(PARSE_H)): Removed target.
19879 1998-09-17 Jeffrey A Law (law@cygnus.com)
19881 * Makefile.in (JAVA_OBJS): Add memmove.o
19882 (memmove.o): New target & rules.
19884 1998-09-15 Tom Tromey <tromey@cygnus.com>
19886 * expr.c (expand_invoke): Don't generate a call to the class init
19889 1998-09-14 Jeffrey A Law (law@cygnus.com)
19891 * Makefile.in: Add many missing dependencies.
19892 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
19894 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
19895 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
19897 1998-09-11 Per Bothner <bothner@cygnus.com>
19899 * decl.c (complete_start_java_method): If method is static (and
19900 not private) call _Jv_InitClass.
19901 * expr.c (expand_invoke): Don't call build_class_init.
19903 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
19905 1998-09-10 Jeffrey A Law (law@cygnus.com)
19907 * Make-lang.in (GCJ): Define before using.
19909 1998-09-09 Jeffrey A Law (law@cygnus.com)
19911 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
19912 losing due to namespace pollution in GNU getopt.h
19914 1998-09-09 Tom Tromey <tromey@cygnus.com>
19916 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
19917 (java.all.cross): Likewise.
19918 (java.rest.encap): Likewise.
19920 1998-09-08 Jeffrey A Law (law@cygnus.com)
19922 * gjavah.c (print_class_decls): Fix thinko in arglist
19923 * jcv-io.c (find_classfile): Similarly.
19925 1998-09-07 Jeffrey A Law (law@cygnus.com)
19927 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
19929 1998-09-05 Tom Tromey <tromey@cygnus.com>
19931 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
19932 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
19933 * Makefile.in (PARSE_C): New macro.
19934 (PARSE_H): Likewise.
19935 (PARSE_SCAN_C): Likewise.
19936 ($(PARSE_C)): Target renamed from parse.c.
19937 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
19938 (clean): Remove parse-scan.c as well.
19939 (parse.o): Depend on $(PARSE_C).
19941 1998-09-05 Anthony Green <green@cygnus.com>
19943 * README, license.terms: Removed.
19945 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
19946 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
19947 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
19948 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
19949 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
19950 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
19951 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
19952 and Java trademark attribution.
19954 1998-09-04 Tom Tromey <tromey@cygnus.com>
19956 * Makefile.in: Use gcjh, not gjavah.
19957 * config-lang.in (stagestuff): Use gcjh, not gjavah.
19958 * Make-lang.in: Changed gjavah to gcjh everywhere.
19960 1998-09-03 Per Bothner <bothner@cygnus.com>
19962 * gjavah.c: Support new -prepend -add -append flags.
19963 (print_method_info): Method is not virtual if class is final.
19965 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
19967 * jv-scan.c: Fixed copyright assignment.
19968 * keyword.gperf: Likewise.
19969 * keyword.h: Likewise.
19970 * lex.c: Fixed copyright assignment.
19971 (java_lex): Push unicode back when parsing '<'.
19972 * lex.h: Fixed copyright assignment.
19973 * parse-scan.y: Likewise.
19974 * parse.h: Fixed copyright assignment.
19975 (build_debugable_stmt, complete_for_loop): New function prototypes.
19976 * parse.y: Fixed copyright assignment.
19977 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
19978 size_zero_node when completing a loop with no exit condition.
19979 (for_statement_nsi:): Define action.
19980 (for_init:, for_update:): Return size_zero_node when empty.
19981 (declare_local_variables): Call build_debugable_stmt.
19982 (build_debugable_stmt): New function.
19983 (build_loop_body): Build debugable statement around loop
19985 (complete_loop_body): Take into account the debugable statement
19986 around the EXIT_EXPR.
19987 (complete_loop_body): New function.
19988 (patch_exit_expr): Fixed condition inversion.
19990 1998-09-02 Tom Tromey <tromey@cygnus.com>
19992 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
19993 name of thread define.
19994 * jvspec.c (THREAD_NAME): New macro.
19996 (THREADLIB): Likewise.
19997 (lang_specific_driver): Recognize attempt to link with thread
19998 library or gc library. Recognize -ljava on command line so it
19999 isn't linked against more than once.
20001 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20003 * parse-scan.y (report_main_declaration): Name of the class
20004 containing `main' can be a qualified name.
20006 1998-08-31 Tom Tromey <tromey@cygnus.com>
20008 * config-lang.in: Changed gjavac to gjc everywhere.
20009 * Make-lang.in: Changed gjavac to gjc everywhere.
20011 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20013 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
20014 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
20015 and install the files.
20016 * Makefile.in (JAVA_OBJS_LITE): New variable.
20017 (compiler:): Now include jv-scan as a dependency.
20018 (../jv-scan$(exeext), parse-scan.c): New targets.
20019 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
20020 * config-lang.in (compilers): Removed gcj, gjavah from the list.
20021 * jcf-parse.c (parse_source_file): Call java_layout_classes and
20022 check for errors even if parse_only.
20023 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
20025 (yylex): New function. Uses java_lex body.
20026 (java_lex): Removed commented out statement. Remove local variable
20027 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
20028 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
20029 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
20030 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
20031 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
20032 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
20034 (java_lex_error): Empty if JC1_LITE is defined.
20035 (java_get_line_col): Return 0 if JC1_LITE is defined.
20036 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
20037 SET_MODIFIER_CTX): Moved into the section containing the macros
20038 conditionally defined by JC1_LITE.
20039 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
20040 argument if JC1_LITE is defined.
20041 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
20042 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
20044 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
20045 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
20046 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
20047 to different values according to JC1_LITE.
20048 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
20049 declared if JC1_LITE set.
20050 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
20051 defined if JC1_LITE not set.
20052 (struct parser_ctx): Reorganized and skip the jc1 front end part
20054 (java_layout_classes): New function definition.
20055 (java_push_parser_context, java_init_lex, yyparse, yylex,
20056 yyerror): Prototype always declared. All other static function
20057 prototypes declared only if JC1_LITE is not set.
20058 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
20059 declared in parse.h.
20060 (java_layout_classes): New function.
20061 (java_complete_expand_methods): No longer layout the class here.
20062 * parse-scan.y: New file.
20063 * jv-scan.c: New file.
20065 1998-08-25 Tom Tromey <tromey@cygnus.com>
20067 * gjavah.c (main): Handle -friend option.
20068 (friend_specs): New global.
20069 (generate_access): Handle friend_specs.
20070 (process_file): Likewise.
20071 (MAX_FRIENDS): New macro.
20072 (friend_count): New global.
20073 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
20074 Changed all callers.
20076 1998-08-24 Per Bothner <bothner@cygnus.com>
20078 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
20079 (main): Handle processing all the entries of a named .zip archive.
20080 * jcf-io.c (jcf_trim_old_input): New function.
20081 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
20083 1998-08-24 Per Bothner <bothner@cygnus.com>
20085 * lang.c (flag_assume_compiled): Make default be on.
20087 1998-08-21 Per Bothner <bothner@cygnus.com>
20089 * jcf-dump.c: Add bunches of flags to control output more.
20090 (process_class): New function; support printing more than one class.
20091 (main): Support new --print-main and --javap flags.
20092 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
20093 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
20095 1998-08-20 Per Bothner <bothner@cygnus.com>
20097 Change mangling of dispatch table to match C++ vtable (w/thunks).
20098 * class.c (build_dtable_decl), java-tree.h: New function.
20099 (make_class_data): Call it.
20100 * decl.c (init_decl_processing): Likewise.
20102 1998-08-19 Warren Levy <warrenl@cygnus.com>
20104 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
20105 soft_anewarray; adjust args passed.
20106 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
20107 match _Jv_NewObjectArray.
20109 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
20111 * decl.c (push_labeled_block, pop_labeled_block): New functions.
20112 * expr.c (loopup_label): Call create_label_decl.
20113 (create_label_decl): New function.
20114 (java_lang_expand_expr): Call expand_start_bindings with argument
20116 * java-tree.h Added space after PROTO in function declarations
20118 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
20119 (create_label_decl, push_labeled_block): New function
20121 * lex.c (label_id): Initialize.
20122 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
20124 * parse.h Added space after PROTO in function declarations when
20126 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
20127 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
20128 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
20129 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
20131 (struct parser_ctxt): New fields current_loop,
20132 current_labeled_block.
20133 (build_if_else_statement, patch_if_else_statement,
20134 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
20135 generate_labeled_block, complete_labeled_statement,
20136 build_bc_statement, patch_bc_statement, patch_loop_statement,
20137 build_new_loop, build_loop_body, complete_loop_body): New function
20139 * parse.y (java_warning_count): New global variable.
20140 (label_id): New static variable.
20141 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
20142 (block:): Return size_zero_node when block is empty.
20143 (empty_statement:): Return size_zero_node.
20144 (statement:): Implement supplemental action when for_statement: is
20146 (label_decl:): New rule.
20147 (labeled_statement:): Rewritten using label_decl. Actions
20149 (labeled_statement_nsi:): Likewise.
20150 (if_then_statement): Actions implemented.
20151 (while_expression): New rule.
20152 (while_statement:): Rewritten using while_expression. Actions
20154 (while_statement_nsi:): Likewise.
20155 (do_statement_begin:): New rule.
20156 (do_statement:): Rewritten using do_statement_begin. Actions
20158 (for_statement:): Rewritten using for_begin. Actions implemented.
20159 (for_statement_nsi:): Likewise.
20160 (for_header:, for_begin:): New rules.
20161 (for_init:): Actions implemented.
20162 (statement_expression_list:, break_statement:,
20163 continue_statement:): Likewise.
20164 (yyerror): Count number of issued warning(s).
20165 (java_report_errors): Report error(s) and/or warning(s).
20166 (java_complete_class): Use build_java_argument_signature to
20167 recompute completed method signature.
20168 (java_check_regular_methods): New locals method_wfl and aflags.
20169 Use method_wfl instead of lookup_cl during error reports. Fixed
20170 indentation and modified some error messages. Use
20171 lang_printable_name in method instead of the DECL_NAME. New code
20172 to issue warnings on methods not overriding corresponding methods
20173 private to a different package.
20174 (java_method_add_stmt): Call add_stmt_to_compound.
20175 (add_stmt_to_compound): New function.
20176 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
20177 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
20178 (build_if_else_statement, patch_if_else_statement,
20179 build_labeled_block, generate_labeled_block,
20180 complete_labeled_statement, build_new_loop, build_loop_body,
20181 complete_loop_body, patch_loop_statement, build_bc_statement,
20182 patch_bc_statement, patch_exit_expr): New functions.
20183 * typeck.c (build_java_signature): Build argument signature before
20184 enclosing it in between parenthesis.
20186 1998-08-17 Warren Levy <warrenl@cygnus.com>
20188 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
20189 (JAVA_OBJS): Added reminder comment
20191 1998-08-13 Nick Clifton <nickc@cygnus.com>
20193 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
20194 be interpreted as a long long.
20196 1998-08-13 Warren Levy <warrenl@cygnus.com>
20198 * decl.c (init_decl_processing): Use _Jv_InitClass, not
20199 soft_initialise_class. Use _Jv_NewMultiArray, not
20200 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
20201 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
20202 _Jv_CheckArrayStore, not soft_checkarraystore. Use
20203 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
20205 1998-08-12 Per Bothner <bothner@cygnus.com>
20207 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
20208 length_identifier_node): New global tree node constants.
20209 * parse.y (kw_super, kw_this, kw_length): Removed globals.
20210 Replace uses by super_identifier_node etc.
20211 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
20213 * parse.y (resolve_field_access): Don't special-case ".length" if
20214 flag_emit_class_files.
20215 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
20216 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
20219 1998-08-11 Per Bothner <bothner@cygnus.com>
20221 * decl.c (init_decl_processing): Remove unused method_type_node fields.
20222 * class.c (make_method_value): Remove init for removed fields.
20224 * class.c (layout_class): Use build_java_argument_signature.
20225 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
20227 * typeck.c (push_java_argument_signature): Removed. Merged into ...
20228 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
20229 (build_java_signature): Don't use push_java_argument_signature.
20231 * typeck.c (lookup_argument_method): New function.
20232 * parse.y (java_check_regular_methods): Use lookup_argument_method
20233 instead of lookup_java_method2 followed by lookup_java_method.
20235 * parse.y (check_method_redefinition): Minor optimization.
20237 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
20238 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
20240 1998-08-10 Tom Tromey <tromey@cygnus.com>
20242 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
20245 * gjavah.c (java_float_finite): Use K&R-style definition.
20246 (java_double_finite): Likewise.
20247 (generate_access): Now returns void. Changed all callers.
20248 (last_access_generated): Removed.
20249 (process_file): Only make a single pass over the .class file.
20251 1998-07-29 Per Bothner <bothner@cygnus.com>
20253 * class.c (get_dispatch_table): Add extra dummy vtable entry,
20254 for compatibility for G++ (with -fvtable-thunks).
20255 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
20257 * gjavah.c (process_file): Use public inheritance for super-class.
20259 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
20261 * lex.c (java_init_lex): Initialize ctxp->package.
20262 * parse.h (struct parser_ctxt): package and package_len replaced
20263 by tree package, an identifier node. Field method_decl_list is
20264 gone. Fixed comments.
20265 (lookup_field_wrapper, merge_qualified_name, not_accessible,
20266 class_in_current_package): New function prototypes.
20267 * parse.y (array_type:): Set class loaded flag on primitive type
20269 (package_declaration:): Assign ctxp->package to the
20271 (method_invocation:): Handle invocation of method qualified by
20273 (single_type_import_declaration:): Removed ambiguity check.
20274 (java_pop_parser_context): New local variable `next'. Reset and
20275 set IMPORT_CLASSFILE_NAME flags on current and previous import
20277 (java_accstring_lookup): Use new local macro COPY_RETURN.
20278 (lookup_field_wrapper): New function.
20279 (parser_qualified_classname): Use merge_qualified_name.
20280 (parser_check_super_interface): Broaden error message.
20281 (do_resolve_class): Check for qualified class name in the current
20282 compilation unit if appropriate.
20283 (process_imports): Check for already defined classes.
20284 (check_pkg_class_access): Got rid of call to
20285 get_access_flags_from_decl.
20286 (java_complete_expand_methods): Call safe_layout_class based on
20287 the current class size.
20288 (make_qualified_primary): Build a WFL qualification on primary if
20290 (merge_qualified_name): New function.
20291 (make_qualified_name): Use merge_qualified_name.
20292 (resolve_expression_name): Use safe_lookup_field.
20293 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20294 (resolve_qualified_expression_name): Likewise. Check on resolved
20295 element accessibility.
20296 (not_accessible_p, class_in_current_package): New functions.
20297 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20298 (patch_method_invocation_stmt): Merged common pieces. Check
20299 accessibility of invoked method.
20300 (check_for_static_method_reference): Add returned type in error
20302 (invocation_mode): Get rid of bogus check on PRIVATE methods.
20303 (refine_accessible_methods_list): Merged two conditions in test.
20304 (java_complete_class): Sanity check on stabilize_ref gone.
20305 * zextract.c (read_zip_archive): Cast lseek second argument to long.
20307 1998-07-28 Per Bothner <bothner@cygnus.com>
20309 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
20311 1998-07-24 Tom Tromey <tromey@cygnus.com>
20313 * gjavah.c (F_NAN): Removed.
20314 (F_NAN_MASK): New macro.
20315 (F_POSITIVE_INFINITY): Removed.
20316 (F_NEGATIVE_INFINITY): Likewise.
20317 (java_float_finite): Rewrote.
20318 (D_NAN_MASK): Renamed.
20319 (java_double_finite): Rewrote.
20320 (D_POSITIVE_INFINITY): Removed.
20321 (D_NEGATIVE_INFINITY): Likewise.
20323 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20324 If verbose, print underlying representation of value in hex.
20326 1998-07-24 Per Bothner <bothner@cygnus.com>
20328 * buffer.h, buffer.c: New files.
20329 * Makefile.in (JAVA_OBJS): Add buffer.o.
20331 Support locals variables and writing their debug entries to .class.
20332 * jcf-write.c: Simplify some by user new buffer type.
20333 (vode_buffer_grow): Removed.
20334 (struct localvar_info): New type.
20335 (localsvars, localvartable): New buffers.
20336 (localvar_alloc, localvar_free): New functions.
20337 (generate_bytecode_insns): Handle local variables.
20338 (generate_classfile): Write LocalVariableTable attribute.
20340 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
20342 * jcf-io.c (open_in_zip): Check the zipfile magic number.
20343 * zipfile.h (ZIPMAGIC): New macro.
20345 1998-07-24 Tom Tromey <tromey@cygnus.com>
20347 * Makefile.in (gjavah.o): Updated dependencies.
20348 (jcf-dump.o): Likewise.
20349 (all.indirect): Use ../gjavah.
20350 (../gjavah$(exeext)): Likewise.
20351 (clean): Don't remove gjavah.
20352 (clean): Remove parse.c, not java/parse.c.
20353 * Make-lang.in (java): Added gjavah.
20354 (gjavah$(exeext)): New target.
20355 (GJAVAH_SOURCES): New macro.
20356 (java.all.build): Added gjavah.
20357 (java.all.cross): Likewise.
20358 (java.rest.encap): Likewise.
20359 * config-lang.in (compilers, stagestuff): Added gjavah.
20361 1998-07-23 Tom Tromey <tromey@cygnus.com>
20363 * gjavah.c (java_float_finite): New function.
20364 (java_double_finite): Likewise.
20365 (F_POSITIVE_INFINITY): New macro.
20366 (F_NEGATIVE_INFINITY): Likewise.
20368 (D_POSITIVE_INFINITY): Likewise.
20369 (D_NEGATIVE_INFINITY): Likewise.
20371 (print_field_info): Use java_float_finite and java_double_finite.
20373 1998-07-23 Per Bothner <bothner@cygnus.com>
20375 * parse.y (method_header): Name "this" implicit argument.
20377 1998-07-22 Per Bothner <bothner@cygnus.com>
20379 * jcf-write.c: Write out LineNumberTable attribute in .class file.
20380 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
20381 (put_linenumber): New function.
20382 (generate_bytecode_insns, generate_classfile): Write line numbers.
20384 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
20386 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20387 (lookup_name, build_known_method_ref, build_class_init,
20388 build_invokevirtual, invoke_build_dtable, match_java_method,
20389 build_field_ref, pushdecl_force_head, build_java_binop,
20390 binary_numeric_promotion, build_decl_no_layout,
20391 build_java_arrayaccess, build_newarray, build_anewarray,
20392 build_java_array_length_access, build_java_arraynull_check): New
20393 extern function prototypes.
20394 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20395 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20397 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20399 * jcf.h (jcf_out_of_synch): New extern function prototype.
20400 * parse.h: Static/global function implemented in parse.y
20401 prototyped and declarations moved at the end of the file.
20402 (DECL_P): Check that the argument isn't null.
20403 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20404 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20405 (QUAL_DECL_TYPE): New macro.
20406 (PARAMS): Macro definition removed.
20407 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20408 (return_statement:): Call build_return.
20409 (field_access:): Call make_qualified_primary in sub rule.
20410 (method_invocation:): Build method invocation and call
20411 make_qualified_primary when processing primaries.
20412 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20413 get_type_from_signature.
20414 (java_check_regular_method): Extra integer 0 argument when calling
20415 lookup_java_method2.
20416 (lookup_java_interface_method2): Extra method DECL argument when
20417 calling lookup_java_interface_method2.
20418 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20419 COMPOUND_EXPR node.
20420 (java_complete_expand_method): Layout current class iff not
20421 already done. Don't process interface's methods.
20422 (java_complete_expand_method): Use super class only if it
20423 exists. Use current class otherwise.
20424 (make_qualified_primary): New function.
20425 (resolve_expression_name): Process qualified expression or
20426 expression from primary the same way.
20427 (resolve_expression_name): Two last arguments to
20428 resolve_field_access are now NULL_TREEs.
20429 (resolve_field_access): New variable is_static. Local field must
20430 be DECLs. is_static computed on field DECLs only. Append code in
20431 where_found to the field access if necessary. Use QUAL_DECL_TYPE
20432 to initialize field_type.
20433 (resolve_qualified_expression_name): New local variable,
20434 previous_call_static and is_static. Handle primaries with function
20435 calls, casts, array references and `this'. `super' now handled as
20436 `(super_class)this'. Use is_static to clarify boolean expressions.
20437 Added code to handle case where a proper handle is required to
20438 access a field. Use QUAL_DECL_TYPE where applicable.
20439 (maybe_access_field): New function.
20440 (patch_method_invocation_stmt): New arguments primary, where,
20441 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20442 deleted. Use `where' as a type to search from if specified. Check
20443 for static method reference where forbidden. Append primary or
20444 current_this to the argument list if not calling constructor nor
20446 (check_for_static_method_reference): New function.
20447 (patch_invoke): Layout the class on which new is done if
20449 (lookup_method_invoke): Changed format to report errors on
20451 (qualify_ambiguous_name): New local variable this_found. Now
20452 handle things from primaries. Method call are considered
20454 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20455 changed into NULLs.
20456 (not_initialized_as_it_should_p): Comply with the new DECL_P.
20457 (java_complete_tree): New case fo RETURN_EXPR. Process function
20458 call arguments in separate function.
20459 (complete_function_arguments): New function.
20460 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20462 (patch_assignment): Take the return function slot into account as
20463 a RHS. Distinguish assignment from a return.
20464 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20465 when checking methods in interfaces.
20466 (resolve_type_during_patch): NULL argument to unresolve_type_p
20467 instead of NULL_TREE.
20468 (patch_newarray): Fixed typo in comment.
20469 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20470 (build_return, patch_return): New functions.
20471 * typeck.c (lookup_java_constructor): Fixed typo in comment.
20473 1998-07-21 Per Bothner <bothner@cygnus.com>
20475 * constants.c (find_name_and_type_constant, find_fieldref_index,
20476 find_methodref_index): New methods.
20477 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
20478 just return given method. Also, rename to build_known_method_ref.
20479 (expand_invoke): Rename call to build_invoke_non_interface.
20480 * java-tree.h, parse.h: Update prototype.
20481 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
20482 (such as expand_expr_stmt) if flag_emit_class_files.
20483 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20484 STACK_TARGET, IGNORE_TARGET): New macros.
20485 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
20486 (generate_bytecode_insn): New function to generate method's bytecode.
20487 (generate_classfile): Node generate Code attribute for a method.
20488 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20489 push_long_const, field_op, adjust_typed_op, maybe_wide):
20490 New functions used by generate_bytecode_insn.
20492 * typeck.c (signature_include_return): Remove variable.
20493 (push_java_argument_signature, build_java_argument_signature): New.
20494 (build_java_signature): Use push_java_argument_signature.
20495 * parse.y: Use build_java_argument_signature instead of fiddling
20496 with signature_include_return.
20498 1998-07-17 Tom Tromey <tromey@cygnus.com>
20500 * gjavah.c (print_c_decl): Always generate JArray<>* for array
20503 * Makefile.in (all.indirect): Added gjavah$(exeext).
20504 (gjavah$(exeext)): Added $(exeext).
20507 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
20509 * class.c (layout_class): Call to java_layout_parsed_class replace
20510 by safe_layout_class.
20511 * expr.c (build_java_array_length_access): Removed static storage
20512 class in the function definition.
20513 (build_java_arraynull_check): Likewise.
20514 Also fixed typos in two comments.
20515 * lex.c (java_init_lex): Initialize static global kw_length.
20516 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20517 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20519 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20520 * parse.h (resolve_no_layout): New static function declaration.
20521 (get_identifier_in_static): Declaration removed.
20522 (java_layout_parsed_class): Function name declaration changed to
20524 (build_newarray_node, patch_newarray, resolve_type_during_patch,
20525 not_initialized_as_it_should_p, build_this): New static function
20527 (pushdecl_force_head, build_java_binop, int_fits_type_p,
20528 binary_numeric_promotion, stabilize_reference,
20529 build_decl_no_layout, build_java_arrayaccess): Extern function
20530 declarations moved into their own section.
20531 (build_newarray, build_anewarray, build_java_array_length_access,
20532 build_java_arraynull_check): New extern function declarations.
20533 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20534 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20536 (CALL_CONSTRUCTOR_P): New macro.
20537 * parse.y (kw_length): New static global tree node.
20538 (return_statement): Tagged <node>.
20539 (RETURN_TK): Tagged <operator>.
20540 (variable_declarator_id:): Build variable declaration with an
20541 empty initialization value if a syntax error was found in the
20542 initialization part of the variable declaration.
20543 (statement_without_trailing_substatement:): return_statement: now
20544 uses the default rule.
20545 (return_statement:): Temporarily fixed to return NULL_TREE.
20546 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20547 (class_instance_creation_expression:): Class creation rules now
20548 call build_method_invocation upon reduction.
20549 (array_creation_expression:): Rules call build_newarray_node upon
20551 (dim_exprs:): Build a list of dimension expressions.
20552 (dim_expr:): Store location of the OSB_TK in the dimension
20554 (method_invocation:): Added a new error rule.
20555 (build_unresolved_array_type): WFL argument may also be an array
20556 on a primitive type. Name of the argument changed to reflect this.
20557 (method_declarator): Insert argument type at the beginning of the
20558 argument type list and later reverse the list.
20559 (unresolved_type_p): Argument 'returned' may be optionally
20561 (java_layout_class_from_source): Function renamed
20563 (resolve_and_layout): Now call resolve_no_layout and
20565 (resolve_no_layout): New function.
20566 (purify_type_name): New function.
20567 (complete_class_report_errors): Call purify_type_name during error
20568 report on a type not found.
20569 (process_imports): error_found local variable doesn't need to be
20570 initialized to zero.
20571 (declare_local_variables): New local type_wfl. Fixed typo in error
20572 message. type_wfl assigned to unresolved type and used to register
20573 incomplete type. Build a WFL around the variable initialization
20574 statement so that debug info can be generated on it.
20575 (source_start_java_method): Reverse argument list after they've
20577 (current_this): New static global variable.
20578 (java_complete_expand_methods): Set current_this when appropriate.
20579 (resolve_expression_name): Build correct static and non static
20580 field access bearing a simple name.
20581 (resolve_field_access): Resolve the length field of arrays. Handle
20583 (patch_method_invocation_stmt): Set the type of the method
20584 invocation to error_mark_node. This value is later overridden by a
20585 valid type, if any. Don't handle qualified constructor invocation
20586 as qualified method invocation. Call lookup_method_invoke with its
20587 new flag. It's no longer necessary to access the selected method
20588 as the value of a tree list. Handle constructor invocation.
20589 (patch_invoke): Reverse argument list when invoking non interface
20590 methods. Insert call to new as the first argument of the
20592 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20593 defined within a final class. Return INVOKE_STATIC if the invoked
20594 method is a constructor.
20595 (lookup_method_invoke): New lc argument is a flag to indicate a
20596 constructor lookup. Now handle constructor lookup. Choose the most
20597 specific method in case several were matching the invocation
20598 requirements. Return a method decl instead of a tree list featuring
20599 one single method decl element.
20600 (refine_accessible_methods_list): New lc flag argument to
20601 indicate that a constructor is being looked up.
20602 (not_initialized_as_it_should_p): New function.
20603 (java_complete_tree): Now process fake tree codes
20604 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20605 save_expr on resolved function call arguments. Case on
20606 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20607 (patch_assignment): LHS can be a field access expression. When
20608 dealing with reference, lhs_type is the promoted type of the
20609 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20611 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20612 (patch_binop): Use not_initialized_as_it_should_p where
20614 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20615 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20617 (resolve_type_during_patch): New function.
20618 (patch_cast): Call resolve_type_during_patch to resolve type and
20619 report error accordingly.
20620 (patch_array_ref): Use not_initialized_as_it_should_p where
20621 applicable. Array base expression is saved before being
20622 used. Promote the type of an array elements if it contains non
20624 (build_newarray_node, patch_newarray, build_this): New functions.
20626 1998-07-16 Tom Tromey <tromey@cygnus.com>
20628 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20629 increment it in `for' statement.
20630 (print_field_info): If number is inf or nan, don't print it.
20631 (print_method_info): If method name is `delete', just ignore it.
20632 (print_c_decl): Special-case jstringArray.
20634 * gjavah.c (help): New function.
20635 (no_argument): New function.
20636 (usage): Changed text.
20637 (main): Rewrote argument handling. Now handles -v, --help,
20639 (version): New function.
20640 (found_error): New global.
20641 (main): Return found_error.
20642 (generate_access): Set found_error.
20643 (print_c_decl): Likewise.
20645 1998-07-15 Tom Tromey <tromey@cygnus.com>
20647 * gjavah.c (print_c_decl): Don't print "," when examining field.
20648 Skip type name when looking at "[L" types.
20649 (process_file): Now static.
20650 (generate_access): Now returns int.
20651 (last_access_generated): New global.
20652 (process_file): Clear last_access_generated; make multiple passes
20654 (print_field_info): Just return if generate_access returns true.
20655 (print_method_info): Likewise. Also, allow <init> functions to
20657 (print_c_decl): Added is_init argument. Print constructors
20659 (print_cxx_classname): Use UTF8_GET to extract characters from
20661 (print_base_classname): New function.
20662 (print_class_decls): New function.
20663 (process_file): Use it.
20664 (utf8_cmp): New function.
20666 1998-07-13 Nick Clifton <nickc@cygnus.com>
20668 * lang-options.h: Format changed to match changes in gcc/toplev.c
20669 to implement a --help option.
20671 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
20673 * decl.c (init_decl_processing): Revert change to dtable_type.
20675 1998-07-09 Per Bothner <bothner@cygnus.com>
20677 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20679 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
20681 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20683 * lang.c (lang_init): Default flag_exceptions to 1, without
20684 checking to see if it's 2 first.
20686 1998-07-08 Jeffrey A Law (law@cygnus.com)
20688 * constants.c: Include "system.h".
20689 * decl.c: Likewise.
20690 * lang.c (flag_new_exceptions): Get via extern now.
20691 (lang_init_options): New functions. Turn on flag_new_exceptions.
20693 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
20695 * lex.c (java_lex): Return 0 when we see an invalid character in
20698 * lex.c (java_read_char): Specify extra argument when calling
20700 (java_read_unicode, java_parse_end_comment,
20701 java_parse_escape_sequence): Likewise,
20702 (java_lex): Specify extra argument when calling
20703 java_lex_error. Test that IDs are beginning with a legal character
20704 for IDs. Handle invalid characters with an error message and a
20705 call to java_lex_error.
20706 (java_lex_error): Adjust column position by new argument
20707 `forward'. Issue an error even if in the middle of reporting an
20710 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
20712 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20713 we don't explicitly put a null pointer when we're copying it.
20715 1998-07-07 Tom Tromey <tromey@cygnus.com>
20717 * gjavah.c (print_cxx_classname): New function.
20718 (super_class_name): Likewise.
20719 (print_super_fields): Removed.
20720 (in_super): Removed.
20721 (print_field_info): Never generate #defines.
20722 (print_c_decl): Changed generated types to match JNI. No longer
20723 print class name before method name.
20724 (print_method_info): Print "static" before static methods.
20725 Print "virtual" before non-final methods.
20726 (usage): Use exit(1), not exit(-1).
20728 (print_field_info): Use %.17g to print a double.
20729 (last_access): New globals.
20730 (process_file): Initialize last_access.
20731 (usage): Now static.
20732 (ACC_VISIBILITY): New define.
20733 (generate_access): New function.
20734 (print_field_info): Call it.
20735 (print_method_info): Likewise. Also, generate information for all
20736 methods, not just native methods. Return void.
20737 (print_c_decl): Return void.
20738 (print_field_info): Return void.
20740 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20742 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20743 processing the jc1 grammar file. Prefix bison functions and
20744 variables with java_.
20745 (parse.c): Dependencies on parse.h and lex.h
20746 * expr.c (build_java_arrayaccess): Function now global.
20747 * java-tree.h: Comment reorganized to carry on previous
20748 classification effort.
20749 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20750 RESOLVE_TYPE_NAME_P): New flags on WFLs.
20751 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20752 java_parse (new prefix java_ generated by bison).
20753 (java_layout_parsed_class, java_register_parsed_class): Function
20755 (yyparse): Removed unnecessary call to init_outgoing_cpool.
20756 * lex.c (static tree wfl_op): Variable deleted.
20757 (java_init_lex): Initialize kw_super and kw_this. Initialize more
20758 ctxp fields to NULL_TREE.
20759 (java_lex): No longer create WFL for operators. Filename caching
20760 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20761 created as STRING_CST and later expanded. Removed extra argument
20762 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20764 (build_wfl_node): Removed code in comments.
20765 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
20766 store token and location data in the current bison token.
20767 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
20768 static/extern function declaration at the beginning of the file.
20769 (struct qualification): Data structure definition deleted.
20770 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20771 (qualify_ambiguous_name): Function declaration modified. Function
20772 now returns nothing.
20773 (build_array_ref, patch_array_ref, make_qualified_name,
20774 resolve_qualified_expression_name, maybe_generate_clinit,
20775 resolve_field_access): New static function declarations.
20776 (build_java_arrayaccess): New extern function declaration.
20777 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20778 (CALL_EXPR_PRIMARY): Macro deleted.
20779 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20780 (struct parser_ctxt): Field initialized_final
20781 removed. non_static_initialized, static_initialized: New fields.
20782 * parse.y (static tree kw_super, static tree kw_this): New global
20784 (%union): tree wfl field of operator member replaced by int
20785 location. WFLs are non longer created for operators.
20786 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20787 (qualified_name:): Now calls make_qualified_name to build the
20789 (type_declaration:): Consider generating <clinit> when class
20791 (variable_declarator:): Directly build an assignment node when the
20792 variable is initialized when declared.
20793 (this_or_super:): Build a WFL and set current location when THIS
20794 or SUPER are parsed.
20795 (expression_statement:): Wrap statement around a WFL.
20796 (primary_no_new_array:): Fixed typo. Changed value returned by
20797 THIS_TK because of its new type (temporary).
20798 (dim_exprs:): Temporary fix because of OSB_TK's new type.
20799 (field_access:): Build qualified name with SUPER.
20800 (method_invocation:): Fixed returned value because of SUPER's new
20802 (array_access:): Use OSB_TK location information.
20803 (post_increment_expression:, post_decrement_expression:,
20804 unary_expression:, pre_increment_expression:,
20805 pre_decrement_expression:, unary_expression_not_plus_minus:,
20806 cast_expression:, multiplicative_expression:,
20807 additive_expression:, shift_expression:, relational_expression:,
20808 equality_expression:, and_expression:, exclusive_or_expression:,
20809 inclusive_or_expression:, conditional_and_expression:,
20810 conditional_or_expression:, assignment:): Use new location/token
20811 information available on operators.
20812 (create_class): Set super_decl_type to NULL_TREE when processing
20814 (register_fields): Field initialization is now a MODIFY_EXPR
20815 node. Chain initialization code to the matching lists (according
20816 to the field declaration modifiers).
20817 (maybe_generate_clinit): New function.
20818 (method_header): Don't set method's DECL_NAME to a WFL when adding
20819 methods to java.lang.Object.
20820 (resolve_and_layout): Now can return NULL_TREE if the type
20821 resolution fails. Otherwise, return the class DECL instead of its
20823 (check_method_redefinition): Don't patch method DECL_NAME if it
20824 belongs to java.lang.Object.
20825 (process_imports): Simply assign error_found to the value returned
20826 by check_pkg_class_access.
20827 (declare_local_variables): Don't use their init statements (if
20828 any) when parsing error were previously found. Reuse MODIFY_EXPR
20829 build during parsing as an init statement.
20830 (java_method_add_stmt): Now return the current method body.
20831 (java_layout_parsed_class, java_register_parsed_class): Functions
20833 (java_complete_expand_methods): Initialize the constant pool on a
20834 per class basis. Layout the classes before expanding their method
20835 bodies. Don't try expand artificial constructor code if error were
20836 found. Make the classes data and register them if no error were
20838 (java_complete_expand_method): Retrieve an artificial constructor
20839 argument list before entering its body. Assign the top block to
20840 the artificial constructor function body and set types of declared
20841 blocks and compound statements to void. Walk method body if not an
20842 artificial constructor.
20843 (make_qualified_name, cut_identifier_in_qualified): New functions.
20844 (resolve_expression_name): Fixed comments. Save/restore the
20845 current class CLASS_LOADED_P flag value. Build non qualified
20846 static field access and handle qualified expression names.
20847 (resolve_field_access, resolve_qualified_expression_name): New
20849 (patch_method_invocation_stmt): Use the new expression resolution
20850 scheme, calling resolve_field_access when the function call is
20851 resolved as an expression.
20852 (qualify_ambiguous_name): Function rewritten to work on qualified
20853 expression produced by make_qualified_name.
20854 (java_complete_tree): Promote type when function's argument are
20855 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20856 the assignment to discover further errors if RHS is a expression
20857 name that fails to evaluate. Declare LHS initialized even though
20858 the assignment failed. Don't use the location variable and removed
20859 extra argument in patch function calls. Now handle the ARRAY_REF
20860 case and build internal string representation when STRING_CSTs are
20862 (build_method_invocation): Don't wrap function call around a WFL.
20863 (build_assignment): Likewise. Use the operator location
20865 (patch_assignment): Handle array access LHSs. Handle error
20866 provenance, resulting in a better error report.
20867 (build_binop): Use op_location from operator as binop location
20869 (build_unaryop, build_incdec, build_cast): Likewise.
20870 (patch_binop): Extract location information from the node. Fixed
20871 typo in error message.
20872 (patch_unary_op): Extract location information from the node.
20873 (build_array_ref, patch_array_ref): New functions.
20875 1998-07-01 Tom Tromey <tromey@cygnus.com>
20877 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20878 match _Jv_IsInstanceOf.
20879 * decl.c (init_decl_processing): Use _Jv_NewArray, not
20880 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
20882 1998-06-30 Tom Tromey <tromey@cygnus.com>
20884 * decl.c (init_decl_processing): Functions are now named
20885 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20887 1998-06-29 Per Bothner <bothner@cygnus.com>
20889 * java-tree.h (load_class): Add prototype.
20890 * class.c (is_compiled_class): Add missing arg to load_class.
20891 * expr.c (expand_java_NEW): Call load_class.
20892 * parse.y (process_import): Removed bogus use of void return value.
20894 1998-06-25 Per Bothner <bothner@cygnus.com>
20896 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
20897 Function name is "_Jv_Throw" instead of "soft_athrow".
20898 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
20899 Function name is "_Jv_AllocObject" instead of "soft_new".
20900 Takes an extra parameter (object size).
20901 * expr.c: Update calls.
20903 1998-06-24 Per Bothner <bothner@cygnus.com>
20905 * lex.c (java_get_line_col): Handle end-of-file.
20906 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
20908 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
20910 * lang.c (lang_init): Make -fexceptions the default.
20911 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
20912 exception handling is not turned on.
20914 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
20916 * lang.c (flag_new_exceptions): Make this this default.
20917 * decl.c (end_java_method): Call emit_handlers.
20918 * except.c (method_init_exceptions): Set language code and version.
20919 (expand_start_java_handler): Enable exception, and call
20920 expand_eh_region_start.
20921 (expand_end_java_handler): Enable exception, and set up catch blocks.
20922 (emit_handlers): New routine to generate the saved handlers.
20923 * java-except.h (emit_handlers): Add prototype.
20925 1998-06-12 Per Bothner <bothner@cygnus.com>
20927 We used to have three different representations of the constant pool:
20928 the CPool structure, the tree_constant_pool, and the constructures
20929 used to build the Class object (which may need class and string
20930 constants) in compiled code. None were appropriate for compiling
20931 to .class files, so I did a major overhaul.
20933 First, the tree_constant_pool array was removed. Things were
20934 modified to the CPool structure in the JCF could be used.
20935 Second, a "capacity" field was added to the CPool, and functions
20936 written to search for a matching constant, adding one if not found.
20937 The code that generated the Class object was changed to use a CPool.
20938 The actual TREE_LISTs used to build the CONSTRUCTORs used for
20939 the static Class object are now only in build_constants_constructor.
20940 Finally, I wrote code which can generate a .class file (including its
20941 constant pool) from the RECORD_TYPE of a class. This is a big step
20942 on the way to compiling Java source into .class files.
20944 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
20945 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
20947 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
20948 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
20949 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
20950 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
20951 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
20952 (lang_type): Removed constant_pool field.
20953 * jcf.h (CPool): Renamed size to count. Added field capacity.
20954 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
20955 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
20956 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
20958 * constants.c (current_constant_pool_tags, current_constant_pool_data,
20959 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
20960 * constants.c (build_constants_constructor): Use new outgoing_cpool.
20961 (set_constant_entry, find_constant1, find_constant2,
20962 find_class_constant, count_constant_pool_bytes, write_constant_pool,
20963 find_utf8_constant, find_class_or_string_constant): New functions.
20965 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
20966 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
20967 (give_name_to_class, get_class_constant): Likewise.
20968 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
20969 (get_name_and_type_constant, get_ref_constant): Removed.
20970 * parse.h (parser_ctxt): Remove field tree_constant_pool.
20971 * parse.y: Don't save/restore tree_constant_pool.
20972 * verify.c (verify_jvm_instructions): Update for new approach.
20973 * expr.c (expand_invoke, expand_java_field_op): Likewise.
20975 * lang-options.h: Added -femit-class-file, -femit-class-files.
20976 * lang.c (flag_emit_class_files), java-tree.h: New flag.
20977 (lang_f_options): Added "emit-class-file(s)".
20979 * expr.c (build_java_arrayaccess): Generate more efficient array
20980 bounds checking, by using unsigned compare.
20982 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
20984 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
20986 * parse.h: New comment on the handling of unresolved type
20987 identifiers. JDEPs are now part of the jdep_code enum.
20988 (typedef struct jdep): Now use enum jdep_code or int, depending on
20989 availability. Both are narrowed down to an 8 bits bitfield.
20990 (CALL_EXPR_PRIMARY): Fixed comment.
20992 1998-06-10 Tom Tromey <tromey@cygnus.com>
20994 * Make-lang.in (java): Added gjavac and jvgenmain.
20995 (java.start.encap): Depend on gjavac.
20996 (java.rest.encap): Depend on jvgenmain.
20998 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
20999 (JAVA_CROSS_NAME): Likewise.
21000 (java.all.build): Depend on jvgenmain and gjavac.
21001 (java.all.cross): Depend on jvgenmain and gjavac-cross.
21002 (jvgenmain$(exeext)): New target.
21003 (java.install-common): Wrote.
21004 * config-lang.in (compilers, stagestuff): Added gjavac and
21007 1998-06-10 Dave Brolley <brolley@cygnus.com>
21009 * lang.c (lang_decode_option): New argc/argv interface.
21011 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21013 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
21014 * decl.c (build_decl_no_layout): New function.
21015 * expr.c (java_lang_expand_expr): Layout declarations found in
21016 blocks before they're pushed.
21017 * jcf-parse.c (load_class): Save current line when parsing class
21019 (parse_source_file): Register class before expanding their
21021 * lang.c (put_decl_node): Produce `null' when `void *' is
21023 * lex.c (static tree wfl_op): New static global, for error report
21025 (java_init_lex): wfl_operator and wfl_op initialized
21026 here. Filename caching added for wfl_op. Return wfl_op when `(' is
21028 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
21029 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
21030 build_unresolved_array_type): New static function definitions.
21031 (build_decl_no_layout): New extern function declared.
21032 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
21033 faulty modifier exists.
21034 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
21035 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
21036 (UNARY_PLUS_EXPR): New fake operator.
21037 (struct parser_ctxt): New field osb_number.
21038 * parse.y (static tree wfl_operator): New static WFL for operator
21039 bound error messages.
21040 (DECR_TK, INCR_TK): Moved.
21041 (OP_TK): Tagged <operator>.
21042 (array_type:): Now call build_unresolved_array_type.
21043 (dim_expr:): Count the number of '[' seen.
21044 (post_increment_expression, post_decrement_expression,
21045 pre_increment_expression, pre_decrement_expression,
21046 unary_expression_not_plus_minus, unary_expression:): Actions are
21047 now building the corresponding unary expressions.
21048 (cast_expression:): Actions are now building cast expressions.
21049 (build_unresolved_array_type): New function.
21050 (create_interface): Reset the number of declared interfaces.
21051 (create_class): Likewise.
21052 (method_header): Methods declared within the scope of an interface
21053 are now implicitly set public and abstract.
21054 (java_complete_class): Variable's and parameter's type are patched
21055 with a promoted type.
21056 (declare_local_variables): Resolved non builtin types are promoted
21057 before being used to build a variable decl. Removed type patch
21058 posted on variable initialization statement.
21059 (source_start_java_method): Use build_decl_no_layout to build the
21060 decl of a parameter of incomplete type.
21061 (java_register_parsed_class): Process interfaces too. Call
21062 rest_of_decl_compilation on each processed class declarations.
21063 (java_complete_expand_methods): Don't attempt to expand things in
21065 (java_complete_tree): Process CONVERT_EXPR, even though it always
21066 has a type. Propagate error_mark_node to node's type too. Promote
21067 method's call argument type and return error_mark_node if
21068 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
21069 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
21070 handle unary operator nodes.
21071 (build_assignment): Added comment.
21072 (print_int_node): New function.
21073 (patch_assignment): New second argument. New error handling. Use
21074 print_int_node. Handle references. Use can_cast_to_p to issue
21075 different error message according to the context and check upon
21076 the initialization of the RHS.
21077 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
21078 (operator_string): Handle more operators.
21079 (patch_binop): No longer use a function static
21080 wfl_operator. Improved error message on shift distance.
21081 (build_unaryop, build_incdec, build_cast, patch_unaryop,
21082 patch_cast): New functions.
21084 1998-06-05 Per Bothner <bothner@cygnus.com>
21086 * jvspec.c: New file.
21087 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
21089 * java-tree.h (identifier_subst): Add declaration.
21091 1998-06-04 Tom Tromey <tromey@cygnus.com>
21093 * jvgenmain.c (main): Generate call to JvRunMain.
21095 * class.c (make_class_data): Push value for "sync_info" field.
21096 * decl.c (init_decl_processing): Push "sync_info" field.
21098 1998-06-03 Per Bothner <bothner@cygnus.com>
21100 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
21101 Java (source) name, not signature.
21102 Set TYPE_ALIGN to (at least) that of element_type.
21104 1998-06-02 Per Bothner <bothner@cygnus.com>
21106 * class.c: Moved classname-mangling-rekated code to ...
21107 * mangle.c: ... this new file.
21108 * jvgenmain.c: New program (needs mangle.c) to generate main program.
21109 * Makefile.in: Update for above changes.
21111 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21113 * expr.c (truthvalue_conversion): Convert integer and floating
21114 point value to their truth value.
21115 * lex.c (java_lex): Handle the `null' literal.
21116 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
21117 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
21118 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
21121 * parse.y: Reorganization/documentation on token declaration.
21122 (binop_lookup[]): New added new tree codes.
21123 (relational_expression): Build corresponding binary operators.
21124 (equality_expression, conditional_and_expression,
21125 conditional_or_expression): Likewise.
21126 (java_complete_class): Fix crash in debug message.
21127 (java_complete_tree): Check initialization of method call
21128 arguments. Further bogus node evaluation to detect more error
21129 during assignments. Handles more binary operators.
21130 (patch_assignment): Use DECL_P.
21131 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
21133 (operator_string): Handle more case. Compacted source.
21134 (patch_binop): Changed function comment. Checking for
21135 uninitialized first operand takes the compound assignment into
21136 account and uses DECL_P. Checking for uninitialized second operand
21137 delayed to routine's end. Use macros to issue type bound error
21138 messages and issue messages on both operands if their types are
21139 different. Force fixed type into node. Handle all binary
21142 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21144 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
21145 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
21146 build operator node and return tokens.
21147 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
21148 * parse.h (java_complete_tree): Changed returned type in prototype.
21149 (build_method_invocation, build_assignment, patch_assignment,
21150 patch_binop): New static function declarations.
21151 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
21152 BUILD_EXPR_WFL): New macros.
21153 * parse.y (enum tree_code binop_lookup[]): New static for token to
21155 (%union): Parser union has new sub-structure `operator'.
21156 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
21157 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
21158 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
21159 ASSIGN_ANY_TK): Tokens tagged `operator'.
21160 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
21161 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
21162 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
21163 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
21164 (assignment_operator:): Rule tagged `operator'.
21165 (expression_statement:): Re-installed default rule.
21166 (method_invocation:): Sub rules call build_method_invocation.
21167 (postfix_expression:): Don't attempt to resolve name here. Just
21169 (multiplicative_expression:): Sub-rules build corresponding binop
21171 (additive_expression:, shift_expression:, and_expression:,
21172 exclusive_or_expression:, inclusive_or_expression:): Likewise.
21173 (assignment:): Sub rule invoke build_assignment.
21174 (assignment_operator:): Default rules on sub rules.
21175 (force_error): Added documentation on this variable.
21176 (declare_local_variables): Build initialization calling
21178 (expand_start_java_method): Removed unused rtx declaration. Mark
21179 arguments as already initialized.
21180 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
21181 (java_complete_expand_methods): Don't process next method if
21182 completion of the previous one triggered errors.
21183 (java_complete_expand_method): Call source_end_java_method if no
21184 error were found during completion.
21185 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
21186 locals declaratilon. Handle names found within a class. Return
21187 error_mark_node when things aren't found.
21188 (patch_method_invocation_stmt): Return error_mark_node on failures.
21189 (patch_invoke): Removed unused local. Return the correct node.
21190 (java_complete_tree): Now returns a value. The BLOCK section binds
21191 local identifiers and the type of a BLOCK is now void. Assign the
21192 result of operand completion on COMPOUND_EXPR. Assign the
21193 encapsulated node of a WFL to the result of its completion, except
21194 when the node is an identifier. Now handle MODIFY_EXPR and several
21195 binary operators. Return error_mark_node on errors.
21196 (build_method_invocation, build_assignment, patch_assignment,
21197 build_binop, operator_string, patch_binop): New functions.
21198 * typeck.c (binary_numeric_promotion): New function.
21200 1998-05-21 Per Bothner <bothner@cygnus.com>
21202 * class.c (identifier_subst): New convenience wrapper for ident_subst.
21203 Replace most uses of ident_subst by identifier_subst.
21205 * class.c (push_class_static_dummy_field): Removed function.
21206 (build_class_ref): Find Class object decl by looking up "CNAME.class",
21207 instead of looking got "class" static field. Create that decl here.
21208 (class_identifier_node): Removed; no longer needed.
21209 (init_class_processing): Don't init class_identifier_node.
21210 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
21211 Do nreverse 0 times (instead of twice) for Object and Class.
21212 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
21214 1998-05-20 Per Bothner <bothner@cygnus.com>
21216 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
21217 while initializing linenumber_count and linenumber_table.
21218 Do it before init_function_start (which calls emit_line_note).
21219 * expr.c (expand_byte_code): Don't need to clear lineno here.
21221 1998-05-18 Tom Tromey <tromey@cygnus.com>
21223 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
21224 then mangle number as _N_.
21226 * class.c (mangle_class_field): New function.
21227 (build_class_ref): Set assembler name of class reference using
21228 mangle_class_field.
21229 (push_class_static_dummy_field): Likewise.
21231 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
21233 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
21234 of assigning to TREE_CODE. The latter method exploits a feature
21235 of GCC that is not ANSI compliant.
21237 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21239 * decl.c (pushdecl_force_head): New function.
21240 (pushlevel): Removed conditional printf.
21241 (complete_start_java_method): Don't enter local variable scope if
21242 function is compiled from source code.
21243 * expr.c: parse.h now included
21244 (java_lang_expand_expr): New function.
21245 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
21246 printf. Terminate buffer when doing directories.
21247 * jcf-parse.c (parse_source_file): Call lang_init_source before
21248 parsing and before code generation.
21249 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
21250 use printf if the macro is defined.
21251 * lang.c (lang_init): Install lang_expand_expr hook on
21252 java_lang_expand_expr.
21253 (java_dummy_print): New function.
21254 (lang_init_source): New function.
21255 * lex.c (java_lex): Remember location of an opening brace at the
21256 second nesting level.
21257 (java_is_eol): Unget character seen after a CR if it is EOF.
21258 * parse.h: Now includes lex.h
21259 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
21260 printf if the macro is defined.
21261 (expand_start_java_method, build_expr_block, enter_block,
21262 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
21263 New static function declarations.
21264 (pushdecl_force_head): New extern function declaration.
21265 (INCOMPLETE_TYPE_P): New macro.
21266 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
21267 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
21268 BLOCK_EXPR_ORIGIN): New macros.
21269 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
21270 DECL_SOURCE_LINE_LAST): New macros.
21271 (struct parser_ctxt): Removed field current_method_decl, redundant
21272 with the field current_function_decl. Added fields
21273 first_ccb_indent1 and pending_block.
21274 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
21275 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21277 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21278 (compilation_unit:): Cosmetic on sub rule.
21279 (type_declaration:): Cosmetic on sub rules. Added an error rule.
21280 (variable_initializer:): Installed default rule on expression:.
21281 (method_declaration:): method_header: starts a new
21282 method. method_body: installs the function body, absorbs blocks
21283 emitted for temporary variable scopings, pops function's body block
21284 and merges function's last statement lineno in DECL_SOURCE_LINE.
21285 (method_body:): Installed default rules.
21286 (block:): Call enter_block when an opening brace is seen. Absorb
21287 scoping blocks and call exit_block when a closing brace is seen.
21288 (block_statement:): Cosmetic changes.
21289 (method_invocation:): Create WFL around CALL_EXPR node.
21290 (patch_stage): Added comment around definition.
21291 (method_header): Try to use first_ccb_indent1 as the first line of
21292 the method, so BP debug info are emitted at the first opening
21293 brace of the function. If the function has no body, use the
21294 location of the function's name. Override currently defined method
21295 name with the matching WFL so we can point redefinition errors
21296 using the location where the function's name was declared.
21297 (check_abstract_method_header): Interprets DECL_NAME as an
21298 identifier or as a WFL, accordingly.
21299 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21300 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
21301 location and name information out of it and reinstall DECL_NAME to
21302 its original identifier node value.
21303 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
21304 function's source code).
21305 (read_import_dir): Test the value returned by find_class and issue
21306 a fatal accordingly.
21307 (declare_local_variables): Push a new block for the scope of the
21308 new variable(s) if code has been already generated at that nesting
21309 level. Pinpoint redefinition errors using the variable id
21310 WFLs. Generate initialization code if necessary. If the variable
21311 type is incomplete, register a patch on its decl.
21312 (source_start_java_method): Rewritten. Define a new block for the
21313 function's parameters. Build parameter decl out of function's
21314 arguments and register them for a patch if their types are
21316 (expand_start_java_method): Includes the part of
21317 source_start_java_method that was pushing the parameter decls and
21318 completing the method start code.
21319 (source_end_java_method): Removed call the expand_end_bindings and
21320 poplevel (already taken care of). Reinstall function's arguments
21321 and get function's last line of code before calling
21322 expand_function_end.
21323 (java_method_add_stmt): New comment before the function's
21324 code. Complement the second operand of the current COMPOUND_EXPR
21326 (java_complete_expand_methods): Don't generate debug info on line
21327 zero when expanding a generated constructor.
21328 (java_complete_expand_method): Set start and end line numbers for
21329 a artificially generated constructor to one and manually call
21330 enter_block and exit_block when defining it. For all methods:
21331 expand function's start calling the new expand_start_java_method
21332 and invoke java_complete_tree on the effective method's body, if
21334 (resolve_expression_name): Now use lookup_name_in_blocks to search
21335 local variable decls and print out an error when variables are
21337 (patch_method_invocation_stmt): Inserted comment before the
21339 (lookup_method_invoke): Chain method's arguments using chainon
21340 with the current arg list as a second argument. Inserted missing
21341 IDENTIFIER_POINTER when reporting an error on methods not found.
21342 (refine_accessible_methods_list): Don't retain constructors.
21343 (patch_arguments): Function removed.
21344 (java_complete_tree): Inserted comment before the function's
21345 code. New case for BLOCKs. Moved the WFL case a bit
21346 further. Complete function's arguments.
21347 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21348 maybe_absorb_scoping_blocks): New functions.
21350 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21352 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21354 * jcf-parse.c (parse_source_file, java_error_count): New forward
21355 and extern declarations.
21356 (java_parse_abort_on_error): Macro moved.
21357 (jcf_parse_source): fatal called if fopen fails. Now calls
21359 (parse_source_file): New parse_only parameter. Reflects the
21360 elimination of the second pass.
21361 (yyparse): parse_source_file called with argument set to 0.
21362 * jcf.h (JCF_ZERO): Sets java_source to zero.
21363 * lex.c (java_init_lex): pass argument is gone. Function modified
21364 to be called once during the analysis of a file.
21365 (java_unget_unicode): Fixed typo in fatal message.
21366 (java_get_line_col): Likewise.
21367 (java_lval): Likewise. String literals no longer built during
21369 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21371 * parse.h (MODIFIER_WFL): New macro.
21372 (parse_check_super, parser_check_super_interface): Now return int.
21373 (parser_chain_incomplete_item, not_builtin_p,
21374 complete_method_decl): Declarations removed.
21375 (build_method_invocation_stmt, build_invoke): Renamed using the
21376 `patch' instead of `build'
21377 (register-incomplete_type, obtain_incomplete_type,
21378 java_complete_tree, java_complete_expand_method,
21379 unresolved_type_p, create_jdep_list): New function declarations.
21380 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21381 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21382 (jdep): New typedef on new struct _jdep.
21383 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21384 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21385 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21386 JDEP_RESOLVED_P): New macros.
21387 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21388 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21389 JDEP_VARIABLE): New enum values and jdep kinds.
21390 (jdeplist): New typedef on struct _jdeplist.
21391 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21393 (CALL_EXPR_PRIMARY): New macro.
21394 (struct parser_ctxt): Fields java_pass, current_method_decl,
21395 method_decl_list deleted. New field jdeplist.
21396 (INCOMPLETE_P): Macro deleted.
21397 * parse.y (single_type_import_declaration:): Removed pass switch.
21398 (type_import_on_demand_declaration): Likewise.
21399 (field_declaration:): Removed pass switch on all sub rules.
21400 (class_declaration:): Call the complete_class_decl removed on
21402 (method_declaration:): Removed second pass switch. No longer chain
21403 methods decl when method_header reduced.
21404 (method_header:): Sub rules no longer depend on pass switch.
21405 (method_declarator:): Likewise.
21406 (method_body:): Likewise.
21407 (abstract_method_declaration:): Likewise.
21408 (block_statement:): Likewise.
21409 (local_variable_declaration:): Likewise.
21410 (argument_list:): Likewise.
21411 (method_invocation:): Likewise. Call to build_method_invocation_stmt
21412 removed. Partial CLASS_EXPR tree node built instead.
21413 (postfix_expression:): Removed pass switch on all sub rules.
21414 (java_pop_parser_context): Free classd_list content.
21415 (yyerror): Call obstrack_grow0 to finalize error message.
21416 (check_class_interface_creation): Comment modified to reflect new
21417 returned value meaning. Removed second pass switch. Return 1 if an
21418 error was found, 0 otherwise. Adjust pointer on filename if a
21419 leading path separator was found.
21420 (maybe_create_class_interface_decl): Removed first pass switch
21421 when linking the class decl to the class_list. Install a new
21422 jdep_list for the class.
21423 (add_superinterfaces): List of unresolved interfaces is
21424 gone. Unresolved interfaces are directly added to the current
21426 (create_interface): Second pass shortcut removed.
21427 ctpx->modifier_ctx access through MODIFIER_WFL.
21428 (create_class): Second pass shortcut removed. Call to
21429 register_incomplete_type replaces the call to
21430 parser_chain_incomplete_item.
21431 (complete_class_decl): Function removed.
21432 (duplicate_declaration_error): New way of retrieving redeclared
21434 (register_fields): Call to lookup_modifier_cl replaced by
21435 MODIFIER_WFL. New way of handling unresolved type, using
21436 unresolved_type_p and obtain_incomplete_type.
21437 register_incomplete_type replaces call to parser_chain_incomplete_item.
21438 (patch_stage): New static global variable.
21439 (method_header): New way of handling unresolved type, using
21440 unresolved_type_p and obtain_incomplete_type. patch_stage used to
21441 indicates that the method decl needs to be patched.
21442 (check_abstract_method_header): Call to lookup_modifier_cl
21443 replaced by MODIFIER_WFL.
21444 (method_declarator): Incomplete argument type are registered
21445 calling register_incomplete_type. Patch on the declared method is
21446 issued in that case.
21447 (unresolved_type_p): New function.
21448 (parser_check_super_interface): New comment to reflect function's
21449 modified returned type (int). Function and has a new argument
21450 this_wfl. Call to parse_error_context uses this_wfl instead of
21451 relying on lookup_cl.
21452 (parser_check_super): Comment reflects function's new returned
21453 type (int). Function returns nonzero value on error.
21454 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21455 register_incomplete_type, jdep_resolve_class): New functions to
21456 handle incomplete types in declarations.
21457 (java_complete_class): Rewritten to work with the new incomplete
21458 type handling scheme.
21459 (complete_class_report_errors): Likewise.
21460 (complete_method_decl): Removed: it jobs is now handled by
21461 java_complete_class.
21462 (do_resolve_class): Class loaded in not already loaded and not
21463 found in Java source code.
21464 (java_check_regular_methods, java_check_abstract_methods): Don't
21465 call complete_method_decl anymore.
21466 (lookup_modifier_cl, not_builtin_p): Functions deleted.
21467 (read_import_dir): Got rid of the pass number dependency.
21468 (declare_local_variables): New handling of unresolved types (patch
21470 (source_start_java_method): New parameter level. Function called
21471 with level set to 1 when argument types are potentially
21472 unresolved. Called to complete the job with level set to 2 once
21473 types are complete.
21474 (source_end_java_method): Call to permanent_allocation
21475 removed. Waiting to be replaced by a more suitable obstack
21477 (java_complete_expand_methods, java_complete_expand_method,
21478 java_expand_finals): New functions.
21479 (build_method_invocation_stmt): Renamed
21480 patch_method_invocation_stmt. Extracts function call expression
21481 (wfl) and arguments (args) from CALL_EXPR tree operands.
21482 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21483 call. Patch the function and argument operand of the CALL_EXPR
21485 (patch_argument, java_complete_tree): New functions.
21487 1998-04-20 Per Bothner <bothner@cygnus.com>
21489 Recover from missing fields and methods (i.e. error instead of fatal).
21490 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
21491 * expr.c (expand_invoke): Recover from missing method.
21492 (expand_java_field_op): Recover from missing field.
21493 Inline references to java.lang.{Integer,Char,...}.TYPE.
21494 * typeck.c (get_type_from_signature), java-tree.h: New function.
21495 * class.c (add_method): Use get_type_from_signature.
21496 (build_class_ref): Handle a class that was not found.
21497 * typeck.c (convert): Handle conversion to pointers (for convenience).
21498 * verify.c (verify_jvm_instructions): Use get_type_from_signature
21499 instead of lookup_field to handle missing fields.
21501 * jcf-parse.c (process_zip_dir): Set java_source.
21503 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
21505 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21507 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
21509 * jcf-parse.c (load_class): Don't change input_filename before
21510 calling jcf_parse_source (but still do it before calling
21512 (jcf_parse_source): Assign input_filename after having saved the
21514 * lex.c (java_init_lex): Chain a WFL node to the import on demand
21515 list. ctxp->modifier_ctx zeroed according to its new
21516 definition. ctxp->filename initialized. Removed
21517 JAVA_MODIFIER_CTX_UNMARK.
21518 (java_unget_unicode): Update the character based column position.
21519 (java_allocate_new_line): ref_count not used anymore. Always free
21520 ctxp->p_line. Initialize c_line->char_col to 0.
21521 (java_get_unicode): Update the character based column position.
21522 (java_lex): Use ctxp->elc to store current position in source
21523 file, at the beginning of the parsed token. Set modifier_ctx entry
21524 corresponding to the parse modifier to a WFL node. Return a WFL
21525 node when an identifier is parsed.
21526 (java_lex_error): Now uses ctxp->elc to store current position in
21528 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21529 * lex.h (build_wfl_node): New function definitions.
21530 (struct java_line): ref_count and next fields are gone. New field
21532 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21533 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21534 (JAVA_COLUMN_DELTA): New macro.
21535 (java_lc): New typedef on new struct _java_lc.
21536 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21537 (parse_error_context, parse_warning_context): Changed prototypes.
21538 (java_get_line_col): Added as an available global function.
21539 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21540 (IC_DECL): Replaced by macro IC_TYPE
21541 (DEPEND_WFL): New macro.
21542 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21544 (exit_java_complete_class): Removed a commented out statement.
21545 (struct parser_ctxt): Added comments on fields. modifier_ctx is
21546 now an array of tree nodes. Deleted fields line_list and
21547 e_line. New field elc, to replace e_line.
21548 * parse.y (array_type:): Build WFL node.
21549 (qualified_name:): Build a single WFL node out of two. Retain
21550 the location information of the first node in the resulting node.
21551 (package_declaration:): Use package name as a WFL node
21552 (single_type_import_declaration:): Use imported name as a WFL node.
21553 (type_import_on_demand_declaration:): Use root of the imported
21554 packages as a WFL node.
21555 (field_declaration:): Removed unused local variable cl.
21556 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21557 (yyerror): New static elc. Removed static error_line, error_pos.
21558 New local code_from_source. Save ctxp->elc into elc at the first
21559 pass. Call java_get_line_col to get a string of the line where
21560 the error occurred.
21561 (debug_line): Removed static function.
21562 (parse_error_context, parse_warning_context): Parameter cl is now
21563 a WFL node. Use its value to initialize ctxp->elc.
21564 (redefinition_error): Parameter cl is now a WFL node.
21565 (parse_add_interface): New parameter wfl. No longer call
21566 lookup_cl, use wfl instead.
21567 (check_class_interface_creation): Parameter cl is now a WFL node.
21568 (maybe_create_class_interface_decl): Likewise.
21569 (add_superinterfaces): New function.
21570 (create_interface): Removed local cl, node, super_decl,
21571 super_decl_type. Function now uses id as a WFL node. Better
21572 warning/error report on obsolete or forbidden mix of
21573 modifiers. Now calls add_superinterfaces to register interfaces.
21574 (create_class): Removed local cl, node. Local variable id is used
21575 as a WFL node. Better error report on forbidden modifier
21576 mix. Uses add_superinterfaces to register interfaces.
21577 (find_field): Argument cl is now a WFL node. Now store the WFL
21578 node of a fields that needs to be checked for their
21580 (method_header): Local variable node non longer used. Local
21581 variable id replaces cl.
21582 (check_modifiers_consistency): Local variable cl is now a WFL
21584 (method_declarator): Local variable cl replaced by parameter id.
21585 (parser_qualified_name): Now uses parameter name as a WFL node.
21586 (parser_check_super_interface): New parameter wfl, for achieve
21587 greater accuracy during error reports.
21588 (parser_chain_incomplete_item): New parameter named location. Used,
21589 along the decl, to construct the incomplete item node.
21590 (java_complete_class): resolve_class now uses WFL node extracted
21591 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21593 (complete_method_decl): Unresolved function's argument types are WFL.
21594 (resolve_class): Parameter cl is now a WFL node.
21595 (resolve_and_layout): Likewise.
21596 (do_resolve_class): Likewise. Try first to use cl and then do the
21597 lookup on the decl when calling check_pkg_class_access.
21598 (complete_class_report_errors): Use IC_TYPE in place of
21599 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21600 instead of doing a lookup over the decl.
21601 (java_check_final): Use WFL info from field tree list.
21602 (lookup_cl): Rewritten and returns a statically defined WFL node.
21603 (lookup_modifier_cl): Now uses information from WFL nodes.
21604 (process_imports): Likewise.
21605 (read_import_dir): name and cl arguments replaced by a single WFL
21606 node. Function modified accordingly.
21607 (find_in_imports_on_demand): Now uses WFL node.
21608 (check_pkg_class_access): cl argument is now a WFL node.
21609 (declare_local_variables): Fixed to use WFL nodes.
21610 (resolve_expression_name): Likewise.
21611 (build_method_invocation_stmt): name_combo argument renamed
21612 wfl. Function modified to use WFL nodes.
21613 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21614 (lookup_method_invoke): cl is now a WFL node. Added missing
21615 IDENTIFIER_POINTER to class type decl name.
21617 1998-04-14 Dave Brolley <brolley@cygnus.com>
21619 * lang.c (init_parse): Now returns char* containing the filename.
21621 1998-04-10 Per Bothner <bothner@cygnus.com>
21623 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
21625 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
21626 * class.c (make_class_data): If flag_assume_compiled, initial class
21627 state is CSTATE_PREPARED; make superclass and interfaces direct
21628 references, rather than constant pool indexes.
21630 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21632 * parser.y: Include flags.h. Removed debug variable pl.
21633 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21634 (block:): Likewise.
21635 (labeled_statement_nsi:): Generate debug info when reducing
21636 expression_statement:.
21637 (check_pkg_class_access): get_access_flags_from_decl invocation
21638 fixed for new CLASS_* flags location.
21639 (source_end_java_method): Save/restore parser context when
21640 entering/leaving this routine. Restore lineno to its right value
21641 before calling expand_end_bindings.
21642 (build_method_invocation_stmt): build_invoke called with the
21643 current line information.
21644 (build_invoke): New argument cl. Wrap the function call around a
21646 (refine_accessible_methods_list): Changed comment, removed
21648 * parse.h: Fixed typo in comments.
21649 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21650 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21651 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21653 * lex.c (java_lex): Record the last closing curly bracket of a
21655 * jcf-parse.c (jcf_parse_source): Now calls
21656 java_check_methods. Clarified comment, fixed typo.
21658 1998-04-09 Dave Brolley <brolley@cygnus.com>
21660 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21661 (finish_parse): Expose for non USE_CPPLIB builds.
21663 1998-04-08 Jeffrey A Law (law@cygnus.com)
21665 * lang.c (lang_print_xnode): New function.
21667 1998-04-03 Per Bothner <bothner@cygnus.com>
21669 * decl.c (class_dtable_decl), java-tree.h: New tree node.
21670 * class.c (get_dispatch_vector, get_dispatch_table): New functions
21671 used to build a class's dispatch table.
21672 (make_class_data): Generate dispatch table if flag_assume_compiled.
21673 Set dtable of class object to address of class_dtable_decl.
21675 * decl.c (int_decl_processing): Make soft_badarrayindex_node
21676 be volatile and have side effects - generates better code.
21678 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
21679 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21681 * expr.c (expand_invoke): If class is final, method is
21682 effectively final, so can call it directly.
21684 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
21686 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
21688 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
21690 * parse.y (build_method_invocation_stmt): Removed extra argument
21693 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
21695 * expr.c (dtable_indent): Now static global.
21696 (expand_invoke): Now call invoke_build_dtable and
21697 build_invokevirtual.
21698 (invoke_build_dtable, build_invokevirtual): New functions.
21699 * jcf-io.c (find_class): Defer issuing a warning by setting
21700 jcf->outofsynch to 1.
21701 * jcf-parse.c (jcf_out_of_synch): New function.
21702 (load_class): Test this_jcf.outofsynch flag and call
21703 jcf_out_of_synch accordingly.
21704 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21705 comment indentation.
21706 * lex.c (java_get_unicode): Fixed code indentation.
21707 (java_lex): Create string literal. Fixed typo. Removed several
21708 premature obstack_free.
21709 * parse.h: New enums for name resolution and invocation mode.
21710 (struct qualification): New data structure.
21711 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21712 (do_resolve_class, build_method_invocation_stmt,
21713 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21714 debug_line, identical_subpath_p, invocation_mode,
21715 refine_accessible_methods_list, build_invoke,
21716 lookup_method_invoke): New functions declared.
21717 (build_invokevirtual, invoke_build_dtable, match_java_method,
21718 build_field_ref, jcf_out_of_synch): New references to external
21720 (struct parse_ctxt): Removed artificial_constructor field.
21721 * parse.y: (array_type:): Type defined for this rule.
21722 (class_type:): Installed default rule for interface_type:.
21723 (array_type:): Now build Java array type.
21724 (qualified_name:): Now use obstack_grow0.
21725 (method_declaration:): Skip the artificial constructor added to
21727 (abstract_method_declaration:): Execute the code only during pass 1.
21728 (block:): Installed default rule in block_statements:.
21729 (block_statement:): Add the statement to the method during pass 2.
21730 (statement_expression): Installed default rule for
21731 method_invocation:.
21732 (argument_list:): Added code to build the argument list.
21733 (method_invocation:): Added call to create the method invocation
21735 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21736 (debug_line): New function for debug.
21737 (complete_class_decl): No longer do something during pass 1.
21738 (method_header): Use BUILD_PTR_FROM_NAME.
21739 (parser_qualified_classname): Use obstack_grow0. Removed bogus
21741 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21742 function's main comment.
21743 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21745 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21746 (resolve_class): Now works with arrays.
21747 (do_resolve_class, resolve_and_layout): New functions.
21748 (java_check_regular_methods): Reverse method list before and after
21749 having processed it. No longer set ctxp->artificial_constructor.
21750 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21751 accordingly. Fixed typo in issued error message. Now use
21753 (find_in_imports_on_demand): Now use obstack_grow0.
21754 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21755 (source_end_java_method): Call expand_expr_stmt instead of
21756 expand_expr. Calls it before calling expand_function_end.
21757 (java_method_add_stmt): Do nothing if errors were found during
21759 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21760 (build_method_invocation_stmt, build_invoke, invocation_mode,
21761 lookup_method_invoke, refine_accessible_methods_list,
21762 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21764 * typeck.c (build_java_signature): Properly end method signature
21765 if return type skipped.
21766 (match_java_method): New function.
21768 1998-03-16 Per Bothner <bothner@cygnus.com>
21770 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
21772 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
21774 * expr.c (build_invoke_non_interface): New function.
21775 (methods_ident, ncode_ident): Now static globals.
21776 (expand_invoke): Use build_invoke_non_interface.
21777 * java-tree.h (struct lang_decl): New field function_decl_body.
21778 (DECL_FUNCTION_BODY): New macro.
21779 * jcf-parse.c (jcf_parse_source): Deeper check before setting
21780 CLASS_FROM_SOURCE_P.
21781 (parse_source_file): Fixed typos. Call java_layout_parsed_class
21782 before starting pass 2. Call to java_generate_parsed_class replaced
21783 by java_register_parsed_class.
21784 * lex.c: Fixed typo in header. Some line width related formating.
21785 * lex.h: Some line width related formating.
21786 * parse.h (source_end_java_method, resolve_expression_name,
21787 complete_class_decl, maybe_create_class_interface_decl,
21788 check_class_interface_creation): New static function declarations.
21789 (java_layout_parsed_class, java_method_add_stmt): New function
21791 (struct parser_ctxt): Field mark_class_generate removed. New
21792 fields class_list and artificial_constructor.
21793 * parse.y: Fixed typo in header.
21794 (class_declaration:): Call complete_class_decl when class body
21796 (method_declaration:): Call source_end_java_method in pass 2 when
21797 the method body is defined.
21798 (postfix_expression:): Do expression name resolution on sub-rule
21799 name during pass 2.
21800 (create_class, create_interface): Merged common pieces.
21801 (check_class_interface_creation, maybe_create_class_interface_decl):
21803 (complete_class_decl): New function.
21804 (register_fields): Fixed line width related typo.
21805 (method_header): Correctly skip first argument when fixing
21806 argument line. Changed the loop.
21807 (java_check_circular_reference): Now use ctxp->class_list.
21808 (java_complete_class): Removed start/stop marking.
21809 (java_check_regular_methods): Now takes a class decl as an
21810 argument. Add default constructor if none were encountered.
21811 (java_check_methods): Now use ctxp->class_list. Changed call to
21812 java_check_regular_methods.
21813 (source_start_java_method): Set DECL_ARG_TYPE for each function
21815 (source_end_java_method, java_method_add_stmt): New functions.
21816 (java_generate_parsed_class): No longer exists.
21817 (java_layout_parsed_class, java_register_parsed_class): New functions.
21818 (resolve_expression_name): New function.
21820 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21822 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21823 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
21824 until pass initializations are done. Call read_import_dir with
21826 * parse.h: (lookup_modifier_cl): New function declared.
21827 (INTERFACE_FIELD_MODIFIERS): New macro.
21828 (OBSOLETE_MODIFIER_WARNING): New macro.
21829 * parse.y: (register_fields): Class type and current field name in
21830 local variables. Check modifier(s) if adding field(s) to an interface.
21831 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
21832 and report errors using the faulty modifier line context.
21833 (lookup_modifier_cl): New function.
21834 (read_import_dir): Detect and report default import processing
21837 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
21839 Add a pair of -fassume-compiled/-fno-assume-compiled options.
21840 * class.c (is_compiled_class): Return 1 after making sure it
21841 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
21842 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21843 * java-tree.h (flag_assume_compiled): Add decl.
21844 * lang.c (lang_f_options): Add the flag.
21845 (flag_assume_compiled): Add decl, default to 0.
21847 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
21849 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21850 (is_compiled_class): Likewise.
21851 (layout_class): Likewise.
21852 (layout_class): Detect and lay out classes defined in source code.
21853 (interface_of_p, add_interface_do, may_add_interface): New
21855 (add_interface): Now use add_interface_do.
21856 (add_method_1): New function.
21857 (add_method): Now use add_method_1.
21858 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21859 (complete_start_java_method): New function.
21860 (start_java_mehod): Now call complete_start_java_method.
21861 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21862 (expand_invoke): Likewise and fixed typo.
21863 *gjava.c: (print_super_field): Use new argument to find_class
21866 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
21867 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21868 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21870 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
21871 (add_method_1, push_class): New prototypes.
21872 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21873 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
21874 directory where the class was found.
21875 (find_class): New argument DO_CLASS_FILE. Function find_class
21876 modified accordingly.
21877 *jcf-parse.c: (fix_class_path): New function.
21878 (load_class): Use new VERBOSE argument. load_class now finds and
21879 loads/parses .class/.java files. Save read_state of current_jcf
21881 (java_parser_abort_on_error): New macro.
21882 (jcf_parse_source, parse_source_file): New function.
21883 (jcf_parse): Fixed typo.
21884 (yyparse): Call parse_source_file () only.
21885 (process_zip_dir): Fixed typo, fix zdir->filename_length when
21886 writing the real class name back in the zip directory entry.
21887 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21888 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21889 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21890 (find_class): Prototype fixed.
21891 *lex.c: Added 1998 time stamp.
21892 Removed all static global variables, moved into the parser
21893 context data structure.. Now include unistd.h if SEEK_SET not
21895 (java_init_lex): Rewritten.
21896 (java_sneak_unicode): Modified current unicode access in current line.
21897 (java_unget_unicode): Likewise.
21898 (java_allocate_new_line): New allocation management.
21899 (java_read_char): Modified access and storage of unget_utf8_value.
21900 New way of processing current unicode.
21901 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
21902 (java_get_unicode): Now use the parser context.
21903 (java_lineterminator): Likewise.
21904 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
21905 of the reentrant parser implementation. Function now use the
21906 parser context data structure and java_lval. Fixed production of
21907 the float and double constant "out of range" error message. Fixed
21908 obstack use. Return integer value when hitting a modifier. Now
21909 return type for TRUE, FALSE and other predefined types. Return
21910 identifier as a TREE_LIST list containing the current line context
21911 as the TREE_VALUE sub-node.
21912 (java_unicode_2_utf8): Fixed typo in declaration.
21913 (java_lex_error): Now use the parser context data structure.
21914 *lex.h: Added 1998 time stamp.
21915 (struct java_line): New fields ref_count and next.
21916 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21917 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
21918 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
21919 *parse.h: Added 1998 time stamp.
21920 (java_parse_source_file): Renamed from parse_source_file.
21921 (YYERROR_NOW, YYNOT_TWICE): Fixed.
21922 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
21923 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
21924 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
21925 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
21926 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
21927 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
21928 (struct parser_ctxt): New data structure to keep the parser context.
21929 *parse.y: Added 1998 time stamp, got rid of static global variables.
21930 (java_error_count, ctxp): New global variables.
21931 (%union): New value field.
21932 (numeric_type, integral_type): Rules removed.
21933 (primitive_type): Rule defined to handle integral, float, double and
21935 (qualified_name, package_declaration,
21936 single_type_import_declaration, type_import_on_demand_declaration,
21937 modifiers, class_declaration, super, interfaces,
21938 interface_type_list, class_body, field_declaration,
21939 field_declaration, variable_declarators, variable_declarator,
21940 variable_declarator_id, method_declaration, method_header,
21941 formal_parameter_list, formal_parameter, method_body, block,
21942 static, interface_declaration, extends_interfaces,
21943 abstract_method_declaration, local_variable_declarators): Rules now
21945 (force_error, do_warning): New global statics.
21946 (push_parser_context, parser_context_save_global,
21947 parser_context_restore_global, pop_parser_context): New functions.
21948 (yyerror): Now uses the global parser context. Fixed use of obstack.
21949 (parse_error, parse_error_context, parse_warning_context,
21950 java_accstring_lookup, redefinition_error, check_modifiers,
21951 parser_add_interface, create_interface, create_class, find_field,
21952 duplicate_declaration_error, register_fields, method_header,
21953 check_modifiers_consistency, check_abstract_method_header,
21954 method_declarator, parser_qualified_classname,
21955 parser_check_super_interface, parser_check_super,
21956 parser_chain_incomplete_item, java_check_circular_reference,
21957 layout_class_from_source, java_complete_class,
21958 complete_method_decl, resolve_class, complete_class_report_errors,
21959 java_check_final, check_method_redefinition,
21960 java_check_regular_methods, java_check_abstract_methods,
21961 java_check_methods, lookup_java_interface_method2,
21962 lookup_java_method2, lookup_cl, find_name_in_single_imports,
21963 process_imports, find_in_imports, read_import_entry,
21964 read_import_dir, find_in_imports_on_demand,
21965 check_pkg_class_access, not_builtin_p, declare_local_variables,
21966 source_start_java_method, java_generate_parsed_class): New
21968 *typeck.c: (signature_include_return): New global variable.
21969 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
21970 to add the function returned type in the signature.
21972 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
21974 * jcf-io.c (open_in_zip): Use strncmp and LEN.
21976 1998-01-29 Dave Brolley <brolley@cygnus.com>
21978 * Make-lang.in (java.info): Added.
21979 (java.install-info): Added
21981 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
21983 * Makefile.in (clean): Also remove java/parse.c.
21985 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
21987 Add a pair of -fbounds-check/-fno-bounds-check options.
21988 * lang.c (lang_decode_option): Add code to grok arguments.
21989 (flag_bounds_check): Add decl.
21990 (lang_f_options): New array w/ the option in it.
21991 * java-tree.h (flag_bounds_check): Add decl.
21992 * lang-options.h: New file.
21993 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
21994 of a static macro value.
21995 (JAVA_ARRAY_EXCEPTION): Delete macro.
21997 1998-01-23 Per Bothner <bothner@cygnus.com>
21999 * typeck.c (build_java_array_type): Fix two bugs in previous change.
22000 * expr.c (build_anewarray): Add missing promote_type.
22002 1998-01-22 Per Bothner <bothner@cygnus.com>
22004 Add array types with known length to optimize bounds checking.
22005 * typeck.c (build_java_array_type): Take length parameter.
22006 (java_array_type_length, build_prim_array_type): New functions.
22007 * java-tree.h: Update for new functions.
22008 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
22009 * class.c: Use build_prim_array_type.
22010 * expr.c (can_widen_reference_to): Handle known-length array types.
22011 (verify_jvm_instructions): Keep track of integer push instructions
22012 followed by newarray/anewarray, so we can build known-length arrays.
22013 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
22014 (java_array_data_offset): New function.
22015 (build_java_array_length_access): New function. Optimize if constant.
22016 (build_java_arrayaccess): Constant fold bounds check.
22017 (expand_java_newarray, expand_java_anewarray): Replaced by ...
22018 (build_newarray, build_anewarray): New functions.
22019 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
22020 * verify.c (merge_types): Handle known-lengh array types.
22022 1998-01-19 Per Bothner <bothner@cygnus.com>
22024 * expr.c (expand_byte_code): Fix performace bug, which caused
22025 searching linenumber_table to be linear rather than constant.
22027 1997-12-12 Per Bothner <bothner@cygnus.com>
22029 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
22031 * decl.c, java-tree.h (soft_fmod_node): New global.
22032 * decl.c (init_decl_processing): Define __builtin_fmod.
22033 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
22034 using __builtin_fmod.
22036 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
22038 * keyword.h: New file, output of keyword.gperf as processed by
22040 * lex.c (java_lex_init): Initialize java_error_flag.
22041 * parse.c (YYERROR_NOW): Uses java_error_flag.
22042 * parse.y: New static java_error_flag. Useless definition of
22044 * parse.y (java_error): Portable error recovery using
22045 java_error_flag (not yet completely tuned).
22047 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
22049 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
22051 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
22053 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
22054 (parse.c, lex.c, keyword.h): New rules for Java source code
22056 * parse.c: Renamed into jcf-parse.c.
22057 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
22058 * keyword.gperf: New file, Java keywords.
22059 * parse.y: New file, Java language grammar.
22060 * parse.h: New file, Java language grammar definitions.
22061 * lex.c: New file, Java language lexer.
22062 * lex.h: New file, Java language lexer definitions.
22064 1997-12-03 Per Bothner <bothner@cygnus.com>
22066 * decl.c (clinit_identifier_node), java-tree.h: New global.
22067 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
22068 * verify.c (verify_jvm_instructions): Inline use of removed macros.
22069 * expr.c (expand_java_field_op): Check for invalid assignment
22072 * jcf-reader.c (get_attribute): Test for wrong attribute length.
22074 1997-10-27 Per Bothner <bothner@cygnus.com>
22076 * verify.c (verify_jvm_instructions): When processing a handler,
22077 attempt to set the current_subr to the right value.
22078 (More complicated code combines Sep 17 and Oct 22 versions.)
22080 1997-10-24 Per Bothner <bothner@cygnus.com>
22082 * class.c (push_class): Figure out (guess) name of source file.
22083 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
22084 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
22085 (parse_class_file): Change return type from int to void.
22086 Call debug_start_source_file/debug_end_source_file.
22088 * expr.c (build_java_binop): Fix masking 2nd operand.
22089 * decl.c (init_decl_processing): Set sizetype first.
22091 1997-10-22 Per Bothner <bothner@cygnus.com>
22093 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
22094 (Revert Sep 17 change.)
22096 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
22098 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
22099 .class extension in their name and fix thing so we don't process
22100 them parse_zip_file_entries().
22101 (parse_zip_file_entries): Cleaned unused local variables.
22103 1997-10-20 Per Bothner <bothner@cygnus.com>
22105 * expr.c (can_widen_reference_to): Allows equal array element types.
22106 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
22107 * jcf-dump.c (RET): Get (and print) index.
22109 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
22110 Promote element type to POINTER_TYPE.
22112 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22114 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
22115 find_in_current_zip, jcf_figure_file_type): Moved from
22116 jcf-reader.c to parse.c.
22117 * zextract.c: (read_zip_archive): takes file_comment_length possible
22118 field into account.
22120 1997-10-20 Per Bothner <bothner@cygnus.com>
22122 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
22124 * verify.c (merge_types): Handle array types even better ...
22126 1997-10-17 Per Bothner <bothner@cygnus.com>
22128 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
22130 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
22131 * class.c (make_class_data): Don't build fields_decl if no fields.
22132 When building fields_decl, skip if DECL_ARTIFICIAL.
22134 * expr.c (java_stack_swap): Update stack_type_map.
22135 * verify.c (merge_types): Handle array types better.
22137 1997-10-15 Per Bothner <bothner@cygnus.com>
22139 * class.c (add_field): Don't promote short integral fields to
22140 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
22141 * expr.c (push_value): Promote and convert short integral values.
22143 * decl.c, java-tree.h (integer_two_node): New constant node.
22144 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
22146 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
22148 * class.c (append_gpp_mangled_type): Use function argument
22149 unpromoted type to generate mangled name.
22151 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
22153 * constants.c (build_constant_data_ref): Now uses current_class
22154 instead of main_class.
22155 (build_constants_constructor): Now uses current_class instead of
22157 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
22158 of the global variable SeepZipFiles done here.
22159 * zextract.c (read_zip_archive): extra_field optional field taken
22160 into account while computing the position of the class file in the
22162 * verify.c (verify_jvm_instructions): Use current_jcf to search
22164 * parse.c (load_class): First search for the class to load in the
22165 current zip file. Saves current_jcf (restored before returning
22166 from that function). Don't call JCF_FINISH in the class was found
22167 in the current ZIP file.
22168 (jcf_parse): If the class was found in the current ZIP file, save
22169 its tree_constant_pool (for later reuse).
22170 (parse_class_file): New function. Process each method defined in
22171 the current class and record the class as to be later registered.
22172 (yyparse): Rewritten. Figure the type of the current file and switch
22174 * lang.c: New global variable current_jcf.
22175 (lang_init): Removed compiling_from_source test (done later, in
22176 yyparse). Removed call the jcf_parse ().
22177 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
22178 (typedef struct JCF): New fields seen_in_zip (to mark a class found
22179 in the current ZIP file) and zip_offset (offset to the class data in
22180 the current zip file).
22181 * jcf-reader.c: zipfile.h included.
22182 localToFile: New ZipFileCache static global variable
22183 (parse_zip_file_entries): New function. Browse the current ZIP
22184 file directory and process each class found.
22185 (process_zip_dir): New function. Register each class found in the
22186 ZIP file directory. The class aren't parsed but a valid JCF is
22187 link to each of them.
22188 (find_in_current_zip): New function. Search for a class in the
22189 current ZIP file directory. If found, prepare the class so that it
22191 (jcf_figure_file_type): New function. Examine the file structure
22192 to figure a class file, a ZIP file. If none of these categories are
22193 matched, a source file is assumed.
22194 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
22195 SeenZipFile: New global variable.
22196 (open_in_zip): Use zipmember's length to accelerate the search for
22197 a member. If zipmember was NULL and zip file successfully read,
22199 * java-tree.h: New global variable current_jcf declared. Added
22200 declaration for current_constant_pool_tags, current_constant_pool_data,
22201 current_constant_pool_length, current_constant_pool_data_ref.
22202 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
22203 store the JCF of classes seen in a zip file) and tree *constant_pool
22204 (to save a loaded class constant pool). current_class declared here.
22205 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
22206 retrieve method_ref_constant.
22207 (PUSHC): java_push_constant_from_pool now uses current_jcf.
22208 (OBJECT): get_class_constant now uses current_jcf.
22209 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
22210 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
22211 (expand_invoke): Now uses current_class instead of main_class
22212 (build_class_init): Now uses current_class instead of main_class
22213 * class.c: New static global variable registered_class.
22214 (register_class): New function.
22215 (emit_register_class): Modified to use registered_class instead of
22217 (is_compiled_class): Now take into account class seen in the archive.
22219 1997-10-06 Per Bothner <bothner@cygnus.com>
22221 * except.h: Renamed to: java-except.h.
22222 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
22223 * except.c: Add semi-working (commented out) implementation.
22225 * expr.c (expand_iinc): Add needed flush_quick_stack.
22226 * parse.c (set_source_filename): New function.
22227 (give_name_to_class): Set input_filename from package.classname.java.
22229 * jcf-io.c (find_class): Don't look first in ".".
22231 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22233 * zextract.c (read_zip_archive): Now takes into account the
22235 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
22237 1997-09-20 Per Bothner <bothner@cygnus.com>
22239 * constants.c, java-tree.h (build_internal_class_name): New function.
22240 (alloc_class_constant): Re-implement using build_internal_class_name.
22241 * class.c (make_class_data): Likewise.
22242 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
22244 1997-09-17 Per Bothner <bothner@cygnus.com>
22246 * verify.c (verify_jvm_instructions): Temporarily set current_subr
22247 to NULL before pushing an exception handler target.
22249 * expr.c (flush_quick_stack): Save from low stack indexes to high.
22250 (java_stack_swap, java_stack_dup): Re-write to be safe from
22251 clobbering registers.
22252 (build_class_init): New function.
22254 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
22256 * typeck.c (build_java_array_type): Temporary use
22257 permanent_obstack to create the array 'length' field.
22258 * expr.c (lookup_label): Temporay use permanent_obstack to create
22259 label if not found.
22260 * class.c (push_super_field): Tempory use permanent_obstack.
22262 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
22264 * typeck.c (type_for_mode): Now handles double_type_node and
22266 * verify.c (verify_jvm_instructions): The instruction following
22267 the wide bytecode is checked. OPCODE_ret added to the list of
22270 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
22272 * class.c (make_class): Temporary use permanent_obstack. Set the
22273 class CLASS_P field to 1.
22274 (push_class): Temporary use permanent_obstack.
22275 (set_super_info): Temporary use permanent_obstack.
22276 (add_method): Temporary use permanent_obstack, set
22277 METHOD_TRANSIENT().
22278 (add_field): Temporary use permanent_obstack. Sets
22279 FIELD_VOLATILE() and FIELD_TRANSIENT().
22280 (build_class_ref): Temporary use permanent_obstack if the class
22282 (build_static_field_ref): Temporary use permanent_obstack when
22283 creating field's rtl.
22284 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
22285 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
22286 and fields. Function finalized, as far as flag handling.
22287 (push_class_static_dummy_field): Temporary use permanent_obstack.
22288 (emit_register_class): Force generation of class registration at
22290 * decl.c (end_java_method): Call permanent_allocation() before
22292 * expr.c (can_widen_reference_to): Added comment to interface
22293 handling, fixed typo.
22294 (lookup_field): Now uses CLASS_P() to correct FIXME
22295 (expand_invoke): Verification on public && !static &&
22296 !abstract moved into soft_lookupinterfacemethod (kaffe).
22297 Use Object class dtable if objectref is an array when expanding
22299 (java_push_constant_from_pool): Temporary use permanent_obstack
22300 for CONSTANT_string
22301 * parse.c (get_ref_constant): Temporary use permanent_obstack to
22302 create constant references.
22303 (get_constant): Temporary use permanent_obstack to create constant.
22304 (load_class): Temporary use permanent_obstack to load class.
22305 (jcf_parse): Temporary use permanent_obstack to perform class
22307 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22308 (build_java_signature): Temporary use permanent_obstack.
22309 * verify.c: (verify_jvm_instruction): removed unnecessary verification
22311 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22312 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22315 1997-09-11 Per Bothner <bothner@cygnus.com>
22317 * class.c (append_gpp_mangled_type): Fix typo.
22318 (emit_register_class): Use main_class to get class object, rather
22319 than looking for no-longer-existing static decl starting with _CL.
22320 * typeck.c (parse_signature_type): Promote array element type
22321 if it is a RECORD_TYPE.
22323 1997-09-10 Per Bothner <bothner@cygnus.com>
22325 * class.c (push_class_static_dummy_field): New function.
22326 (mangle_static_field): New. Do G++-style mangling of static fields.
22327 (layout_class): Mandle static fields here, not in add_field.
22328 (build_class_ref): The class object is now a dummy static field.
22329 * decl.c (find_local_variable): Look for best, instead of first match.
22330 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
22331 (build_java_athrow): Don't check here if exception is Throwable.
22332 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
22333 (TYPE_USED): Removed. No longer used ...
22334 * parse.c (jcf_parse): Call push_class_static_dummy_field.
22335 * verify.c (push_pending_label): New function.
22336 (push_pending_block): Renamed to check_pending_block.
22337 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
22338 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
22339 re-checking possible handlers) after a store (less wasted work).
22340 Check for null handler (finally) before calling add_handler.
22341 Various changes to (finally?) correctly handle try/finally.
22343 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
22345 * class.c: Include stdio.h.
22347 1997-09-04 Per Bothner <bothner@cygnus.com>
22349 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22350 to make sure class is initialized before static/special invoke.
22352 * verify.c (verify_jvm_instructions): On a store instruction,
22353 call find_local_variable to force pre-allocation of decl and rtx.
22354 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
22356 1997-09-03 Per Bothner <bothner@cygnus.com>
22358 * class.c (build_class_ref): Strip off "promoted_" if need be.
22359 (make_field_value): Call build_java_signature when needed.
22360 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
22361 * expr.c (build_java_athrow): Don't push_value of exception.
22362 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22363 match specification of [fd]cmp[lg] for NaNs.
22364 (expand_byte_code): Add support for exception handler ranges.
22365 * except.c: Add skeleton for EH code-generation.
22366 * verify.c (merge_types): Treat all promoted integral types as equal.
22367 * constants.c (build_constants_constructor): To force creation of
22368 current_constant_pool_data_ref, call build_constant_data_ref.
22370 * javaop.def (lload): Fix typo.
22371 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
22373 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
22375 * parse.c: Don't include function.h.
22377 1997-08-27 Per Bothner <bothner@cygnus.com>
22379 * except.[ch]: New files.
22380 * Makefile.in (JAVA_OBJS): Add except.o
22381 * expr.c: Temporary warning about unimplemented exceptions.
22382 * verify.c: Verify exception handlers.
22384 * jcf-dump.c (disassemble_method): Print exception table.
22386 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
22388 * expr.c (verify_jvm_instructions): Started a thorough
22389 verification of invoke* bytecodes.
22390 (expand_byte_code): flush quick stack if PC is the target of a
22391 branch. and undef RET (conflicting with config/i386/i386.h).
22392 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22394 (expand_invoke): Now handles invokeinterface and do more
22395 verification according to the bytecode.
22396 (lookup_field): Don't try to load the class if processing
22398 (can_widen_reference_to): Now handles interfaces.
22399 * decl.c (init_decl_processing): New global variable
22400 soft_lookupinterfacemethod_node, declared in java-tree.h.
22401 Call set_super_info on string_type_node.
22402 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22404 * class.c (set_super_info): Fills the CLASS_* flags according to
22406 (get_access_flags_from_decl): Handles all class flags.
22408 1997-08-26 Per Bothner <bothner@cygnus.com>
22410 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
22411 * parse.c (yyparse): Check for abstract method, and missing code.
22412 * expr.c (expand_byte_code): Change interface.
22413 * lang.c (put_decl_node): Print promoted types prettier.
22414 * verify.c (verify_jvm_instruction): Change interface.
22415 Partial support for scanning exception table.
22416 For load instructions, handle promoted integral types.
22418 1997-08-21 Per Bothner <bothner@cygnus.com>
22420 * verify.c: New file, with contents moved from expr.c.
22421 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
22422 * typeck.c (is_array_type_p): Moved here from expr.c.
22423 * java-tree.h: Add some now-needed function declarations.
22424 * Makefile.in (JAVA_OBJS): Added verify.o.
22426 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22428 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22429 METHOD_ABSTRACT flag.
22431 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22432 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22433 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22435 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22437 (start_java_method): Hook for SYNCHRONIZED methods.
22439 * expr.c (build_java_jsr, build_java_ret): New functions
22440 (JSR,PRE): New macros
22441 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22442 (verify_jvm_instructions): tableswitch, lookupswitch,
22443 monitorenter, monitorexit, goto_w: verified.
22444 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22445 (build_java_monitor): New function.
22446 (MONITOR_OPERATION): Modified to call build_java_monitor()
22447 (verify_jvm_instructions): Started a thorough verification of
22450 1997-08-19 Per Bothner <bothner@cygnus.com>
22452 Support verification of jsr/ret subroutines (used for try/finally).
22453 * decl.c (return_address_type_node): New type node.
22454 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22455 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22456 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
22457 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22458 TYPE_USED): New macros for special types in type_map.
22460 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
22461 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
22463 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
22465 * expr.c (can_widen_reference_to): New function.
22466 (pop_type): Use it.
22467 (merge_type_state): Support handling start of subroutine.
22468 (push_pending_block): Return char* error message, instead of calling
22469 fatal on an error. Also handle subroutines.
22470 (verify_jvm_instructions): Handle errors from push_poending_block.
22471 Support jsr and ret instructions.
22473 1997-08-19 Per Bothner <bothner@cygnus.com>
22475 * jcf-io.c (find_classfile): Fix thinko.
22476 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
22478 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
22480 * Makefile.in (BISON): Remove.
22482 1997-08-07 Per Bothner <bothner@cygnus.com>
22484 * Makefile.in: Convert to autoconf.
22485 * config-lang.in (outputs): Added java/Makefile.
22487 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22488 Rename cc1java to jc1.
22490 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
22491 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
22493 * class.c (class_depth): Do load_class if needed.
22495 Mostly better verification.
22496 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
22497 (init_decl_processing): Change return type of soft_checkcast.
22498 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
22499 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22500 lang_print_error): New functions.
22501 (lang_init): Set global hook print_error_function to lang_print_error.
22502 * expr.c: In the type_map ptr_type_node is only used for null now.
22503 (pop_type, merge_types): Hence ptr_type_node matches any reference.
22504 (merge_types): Dererence pointer to record types before comparing.
22505 (decode_newarray_type, merge_types): On error just return NULL.
22506 (build_java_binop): Add preliminary implementation (with warning)
22507 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22508 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
22509 (expand_compare, expand_java_goto, expand_java_call): Don't
22510 push_pending_block, since that only makes sense when verifying.
22511 (merge_type_state): Different return codes.
22512 (push_pending_block): A block may need to be verified more than once.
22513 (expand_byte_code): Warn about unused code at code generation time.
22514 (verify_jvm_instruction): Changed logic, since code may need to be
22515 re-verified if type-state has changed. Also, better error handling.
22516 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22517 Improve newarray, anewarray, ?aload, athrow,
22518 * java-tree.h (LABEL_CHANGED): New macro.
22520 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
22522 * decl.c (soft_athrow_node): New global variable initialized.
22523 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22524 * typeck.c (convert): Added support for REAL_TYPE.
22525 (convert_to_char): New function.
22526 (convert): Handle CHAR_TYPE.
22527 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22528 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22529 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22531 (verify_jvm_instructions): Added break a the end of bogus unop: label.
22532 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22533 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22534 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22535 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22536 to Use The Right Things.
22537 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22538 compatible with INT. BOOLEAN is made equivalent to BYTE.
22539 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22540 OPCODE_ifnonnull): Now supported.
22541 (build_java_athrow): New function.
22543 1997-08-04 Per Bothner <bothner@cygnus.com>
22545 Rename method name <init> to match G++ (and fix mangling).
22546 * class.c (layout_class): Replace method name of <init> by class name.
22547 (make_method_value): Do inverse renaming of constructor from <init>.
22548 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
22549 * typeck.c (lookup_java_constructor): New function.
22550 * expr.c (expand_invoke): If method_name is <init>, call
22551 lookup_java_constructor to find constructor.
22553 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
22555 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22557 * parse.c (get_class_constant): Modified to handle array "classes"
22558 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22560 (convert): Modified to handle real type.
22561 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22562 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22563 variables declared.
22564 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22565 soft_multianewarray, soft_newarray_node, soft_throw_node): New
22566 global variables initialized.
22567 (find_local_variable): Handles the case of a pointer
22568 (end_java_method): Restore the use of one more scope
22569 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22570 build_java_array_length_access, expand_java_arrayload,
22571 expand_java_arraystore, expand_java_array_length,
22572 expand_java_multianewarray, expand_java_anewarray,
22573 build_java_check_indexed_type, is_array_type_p,
22574 build_java_throw_out_of_bound_exception): New functions.
22575 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22576 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22577 OPCODE_<t>aload): Implemented code for verification.
22578 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22579 ARRAY_NEW_MULTI): Macro defined.
22580 (CONVERT): Modified to invoke convert().
22581 (case OPCODE_aload2): Fixed index typo from 2 to 1.
22583 1997-07-31 Per Bothner <bothner@cygnus.com>
22585 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
22586 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
22587 (make_class_data): Field name needs '/' as package prefix.
22588 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
22590 1997-07-25 Per Bothner <bothner@cygnus.com>
22592 Implement debug information for local variables.
22593 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22594 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22595 DECL_LOCAL_SLOT_CHAIN): New macros.
22596 (struct lang_decl_var): New type.
22597 * parse.c (give_name_to_locals): Move to decl.c.
22598 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
22599 (start_java_method): Re-write parameter handling.
22600 (pending_local_decls): New global variable.
22601 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
22602 (find_local_variable): Accept pc so we can skips decls not in range.
22603 (struct binding_level): Add end_pc field.
22604 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22605 (various): Change so current pc gets passed to find_local_variable.
22607 * decl.c (init_decl_processing): Re-arrange fields in
22608 class_type_node and and method_type_node to match kaffe 0.9.1.
22609 * class.c (make_method_value, make_class_data): Update
22610 initializations to match.
22612 1997-07-16 Per Bothner <bothner@cygnus.com>
22614 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22615 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
22616 (push_super_field): New function.
22617 (make_class_data): Handle inheritance of class static initializer.
22618 (layout_class): New name mangling.
22619 * constants.c (build_constant_data_ref): Init type of data array
22620 to a one-element array.
22621 (build_constants_constructor): Set DECL_SIZE from complete array type.
22622 * decl.c: Rename class_type, object_type etc to class_type_node,
22623 object_type_node etc. Make former inherit from latter.
22624 * expr.c (expand_invoke): Add cast of function address.
22625 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
22626 * parse.c (yyparse): Don't call layout_class here.
22627 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
22629 1997-06-14 Per Bothner <bothner@cygnus.com>
22631 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
22632 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
22633 (alloc_class_constant): New.
22634 * expr.c (expand_invoke): Make sure method's class is initialized.
22635 * class.c (interits_from_p, emit_register_class): New functions.
22636 * parse.c (yyparse): Call emit_register_class.
22638 1997-06-09 Per Bothner <bothner@cygnus.com>
22640 * constants.c: New file, to handle constant pool.
22641 * Makefile.in (JAVA_OBJS): Add constants.o.
22642 * decl.c (init_decl_processing): Update, fix, finish various structs.
22643 (pushdecl_top_level): New.
22644 * parse.c (layout_class): Moved to class.c.
22645 * expr.c (java_push_constant_from_pool): New function.
22646 * class.c (build_class_ref): Make work fully
22647 (make_class_data): Emit super-class, constant pool, interface vector.
22649 1997-06-03 Per Bothner <bothner@cygnus.com>
22651 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
22652 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
22653 * class.c (class_depth): New function.
22654 (lookup_named_class): Replaced by new function lookup_class.
22655 * decl.c (object_type_node, string_type_node): New.
22656 Remove various types that we no longer need.
22657 * expr.c (verify_jvm_instructions): New separate verifier pass.
22658 (push_type, pop_type): New functions for verifier.
22659 (type_stack_dup, pop_argument_types, merge_types): Likewise.
22660 (expand_byte_code): Simplify, since we assume already verified.
22661 (expand_invoke): Now mostly works.
22662 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22663 * lang.c (main_class): Move to parse.c. Don't make_class yet.
22664 * parse.c: Wait to allocate class object until we know its name.
22665 (layout_class): Calculate DECL_VINDEX for each virtual method.
22666 * typeck.c (get_array_type): Rename to ...
22667 (build_java_array_type): ... and provide working implementation.
22668 (build_java_signature): New function - build Java signature of type.
22669 (set_java_signature): New function - cache signature with type.
22670 (lookup_java_method): New function.
22672 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
22674 * class.c (ident_subst): Take extra SUFFIX parameter.
22675 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
22676 (set_constant_value, build_static_field_ref, is_compiled_class): New.
22677 (build_class_ref): Actually implement.
22678 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
22679 * decl.c (builtin_function): New.
22680 (init_decl_processing): Update for current Kaffe. Declare some
22681 builtin Kaffe functions.
22682 * expr.c (build_address_of): New.
22683 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22684 Renamed (from expand_java_new etc), and added working implementations.
22685 (build_field_ref): Now also handle static fields.
22686 (expand_invoke): Implement invokestatic, and start implement rest.
22687 * java-opcodes.h: Use javaop.def to avoid duplicated list.
22688 * javaop.def: Rename invokevirt -> invokevirtual.
22689 * lang.c (use_handles): Removed.
22690 * parse.c: Add support for ConstantValue attribute.
22691 Handle nested loading of a class. (JPOOL_UTF): New.
22693 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
22695 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
22697 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
22699 * Make-lang.in (java.install-man): New empty rule.
22700 * typeck.c (set_local_type): New function.
22701 * expr.c (STORE_INTERNAL): Call find_local_variable,
22702 not find_stack_slot. Call set_local_type.
22704 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
22706 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
22707 and building RECORD_TYPE CONSTRUCTORs.
22708 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22710 * lang.c (use_handles): Change the default to 0.
22711 * decl.c: Define and build class_type, field_type, utf8const_type.
22712 * class.c (make_class_data, make_field_value,
22713 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22714 hashUtf8String, strLengthUtf8, mangled_classname:
22715 Functions to build reflective data structures.
22716 * parse.c (yyparse): Call make_class_data.
22718 * jcf-io.c (open_class, find_classfile): New functions.
22719 * jcf-dump.c: Support reading classfile from explicitly-named
22720 class file (without CLASSPATH searching).
22722 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22724 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
22725 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22726 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22727 (get_constant): Now trivial for CONSTANT_Utf8.
22729 * jcf.h: Make NEW_CPOOL the default.
22730 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
22732 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22737 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
22738 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
22740 Copying and distribution of this file, with or without modification,
22741 are permitted in any medium without royalty provided the copyright
22742 notice and this notice are preserved.