1 2010-11-30 Joseph Myers <joseph@codesourcery.com>
3 * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
4 verify-glue.c: Don't include toplev.h.
5 * Make-lang.in: Dependencies for above files changed to remove
8 2010-11-29 Joseph Myers <joseph@codesourcery.com>
10 * boehm.c: Include "config.h" instead of <config.h>.
11 * builtins.c: Don't include <stdarg.h>.
12 * class.c: Don't include "stdio.h".
13 (O_BINARY): Don't define here.
14 * jcf-depend.c: Don't include <assert.h>.
15 (jcf_dependency_set_dep_file, jcf_dependency_init,
16 jcf_dependency_write): Use gcc_assert.
17 * jcf-io.c (O_BINARY): Don't define here.
18 * jcf-path.c: Don't include "tm.h".
19 (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
20 * resource.c: Don't include "stdio.h".
21 (O_BINARY): Don't define here.
22 * verify-impl.c: Don't include <stdio.h>.
24 2010-11-17 Joseph Myers <joseph@codesourcery.com>
26 * jcf-parse.c (java_parse_file): Take no arguments.
27 * java-tree.h (java_parse_file): Update prototype.
29 2010-11-09 Joern Rennecke <amylaar@spamcop.net>
30 Andrew Haley <aph@redhat.com>
33 * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
35 2010-11-12 Joseph Myers <joseph@codesourcery.com>
37 * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
38 * lang.c (java_handle_option): Take location_t parameter.
40 2010-11-10 Joseph Myers <joseph@codesourcery.com>
42 * expr.c (expand_java_field_op): Use %' in diagnostic.
43 * jcf-parse.c (java_parse_file): Use %' in diagnostics.
44 * jvspec.c (lang_specific_driver): Use %' in diagnostic.
45 * lang.c (java_post_options): Use %' in diagnostics.
47 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
50 * class.c: Include target.h.
51 (make_local_function_alias):
52 Use targetm.asm_out.generate_internal_label.
53 * expr.c (lookup_label, generate_name): Likewise.
55 2010-11-03 Joern Rennecke <joern.rennecke@embecosm.com>
58 * jfc-parse.c (target.h): Include.
59 (handle_constant): Use targetm.words_big_endian and
60 targetm.float_words_big_endian.
61 (get_constant): Use targetm.float_words_big_endian.
63 2010-10-13 Richard Henderson <rth@redhat.com>
65 * lang.c (java_eh_personality): Update call to
66 build_personality_function.
68 2010-10-12 Joseph Myers <joseph@codesourcery.com>
70 * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
73 2010-10-11 Nathan Froyd <froydnj@codesourcery.com>
75 * decl.c (java_init_decl_processing): Use build_function_type_list
76 instead of build_function_type.
77 * jcf-parse.c (java_emit_static_constructor): Likewise.
78 * builtins.c (initialize_builtins): Likewise.
80 2010-10-08 Joseph Myers <joseph@codesourcery.com>
82 * lang.c (java_init_options_struct): New. Split out from
84 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
86 2010-10-04 Andi Kleen <ak@linux.intel.com>
88 * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
91 2010-09-29 Joseph Myers <joseph@codesourcery.com>
93 * lang.opt: Don't use VarExists.
95 2010-09-29 Joseph Myers <joseph@codesourcery.com>
97 * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
98 flag_force_classes_archive_check, flag_redundant, flag_newer,
99 flag_use_divide_subroutine, flag_use_atomic_builtins,
100 flag_use_boehm_gc, flag_hash_synchronization,
101 flag_check_references, flag_optimize_sci, flag_indirect_classes,
102 flag_indirect_dispatch, flag_store_check,
103 flag_reduced_reflection): Remove.
104 * jcf-dump.c (flag_newer): Remove.
105 * jcf.h (quiet_flag): Remove.
106 * parse.h (quiet_flag): Remove.
108 2010-09-28 Richard Henderson <rth@redhat.com>
110 * lang.c: Include "target.h".
111 (java_eh_personality): Use targetm.except_unwind_info.
112 * Make-lang.in (lang.o): Update deps.
114 2010-09-27 Andrew Haley <aph@redhat.com>
117 * jvgenmain.c (main): Fix arg processing.
119 2010-09-22 Joseph Myers <joseph@codesourcery.com>
121 * jvspec.c (lang_specific_driver): Handle OPT__help instead of
123 * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
124 -dependencies, -encoding, -extdirs, -include-directory,
125 -include-directory=, -output-class-directory,
126 -output-class-directory=, -resource, -resource=,
127 -user-dependencies): New.
129 2010-09-16 Richard Guenther <rguenther@suse.de>
131 * jcf-parse.c (current_file_list): Remove.
132 (java_parse_file): Use build_translation_unit_decl. Adjust.
134 2010-09-03 Joseph Myers <joseph@codesourcery.com>
138 2010-09-03 H.J. Lu <hongjiu.lu@intel.com>
141 * jvgenmain.c (main): Check "-D XXX=YYY".
143 2010-09-02 Joseph Myers <joseph@codesourcery.com>
145 * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
147 2010-09-02 Joseph Myers <joseph@codesourcery.com>
149 * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
150 fCLASSPATH=): Mark as Java options and as aliases.
151 * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
152 (lang_specific_driver): Don't handle options marked as aliases.
153 * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
155 2010-08-22 Joseph Myers <joseph@codesourcery.com>
157 * Make-lang.in (jvspec.o): Update dependencies.
158 * jvspec.c: Include opts.h.
160 (find_spec_file): Do not add leading -specs=.
161 (lang_specific_driver): Use cl_decoded_option structures.
162 * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
163 extdirs, fmain=, s-bc-abi): New options.
165 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
167 * class.c: Use FOR_EACH_VEC_ELT.
169 * jcf-parse.c: Likewise.
170 * resource.c: Likewise.
172 2010-08-16 Joseph Myers <joseph@codesourcery.com>
174 * lang.opt (MD_, MMD_, version): Mark RejectDriver.
176 2010-08-05 David Daney <ddaney@caviumnetworks.com>
178 * class.c (build_utf8_ref): Fix code formatting from previous commit.
180 2010-08-05 David Daney <ddaney@caviumnetworks.com>
182 * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
184 2010-07-27 Joseph Myers <joseph@codesourcery.com>
186 * lang.c (java_handle_option): Update prototype and return value
189 2010-07-27 Joseph Myers <joseph@codesourcery.com>
191 * lang.c (java_option_lang_mask): New.
192 (java_init_options): Update prototype.
193 (LANG_HOOKS_OPTION_LANG_MASK): Define.
195 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
197 * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
202 * jcf-parse.c: Likewise.
203 * typeck.c: Likewise.
204 * verify-glue.c: Likewise.
206 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
208 * boehm.c: Include diagnostic-core.h in every file that includes
211 * constants.c: Likewise.
213 * except.c: Likewise.
215 * jcf-parse.c: Likewise.
216 * mangle.c: Likewise.
217 * mangle_name.c: Likewise.
218 * resource.c: Likewise.
219 * typeck.c: Likewise.
220 * verify-glue.c: Likewise.
222 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
225 * class.c (make_class_data): Cast result of VEC_length calls to int.
227 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
229 * constants.c (build_constants_constructor): Use build_constructor
230 instead of build_constructor_from_list.
231 * class.c (make_method_value): Likewise.
232 (get_dispatch_table): Likewise.
233 (make_class_data): Likewise.
234 (emit_indirect_register_classes): Likewise.
235 (emit_symbol_table): Likewise.
236 (add_assertion_table_entry): Likewise.
237 (emit_assertion_table): Likewise.
238 (make_field_value): Use build_constructor_single instead of
239 build_constructor_from_list.
241 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
243 * java-tree.h (struct lang_type) [catch_classes]: Change type to a
245 * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
246 instead of tree_cons.
247 * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
248 (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
250 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
252 * lang.c: Do not include except.h
253 * except.c: Likewise.
254 (doing_eh): New, moved from except.c (in gcc/) but removed the
256 (maybe_start_try): Update doing_eh call.
257 * Make-lang.in: Update dependencies.
259 2010-06-23 Anatoly Sokolov <aesok@post.ru>
261 * decl.c (java_init_decl_processing): Use double_int_to_tree instead
262 of build_int_cst_wide.
263 * boehm.c (set_bit): Remove.
264 (mark_reference_fields): Use double_int type for 'mask' argument.
265 Use double_int_setbit instead of set_bit.
266 (get_boehm_type_descriptor): Use double_int_setbit instead of
267 set_bit. Use double_int_to_tree instead of build_int_cst_wide.
269 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
271 * gcj.texi: Move to GFDL version 1.3. Fix copyright years.
273 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
275 * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
277 * jcf-parse.c (java_parse_file): Likewise.
278 (process_zip_dir): Likewise.
280 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
281 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
283 * expr.c (add_type_assertion): Likewise.
285 * decl.c (make_binding_level): Likewise.
286 (java_dup_lang_specific_decl): Likewise.
288 * constants.c (set_constant_entry): Likewise.
289 (cpool_for_class): Likewise.
291 * class.c (add_method_1): Likewise.
292 (java_treetreehash_new): Likewise.
294 * java-tree.h (struct lang_type): Add variable_size GTY option.
295 (struct lang_decl): Likewise.
297 * jch.h (struct cpool_entry): Likewise.
299 * java-tree.h (java_treetreehash_create): Remove parameter ggc.
301 * except.c (prepare_eh_table_type): Update
302 java_treetreehash_create call.
304 * class.c (add_method_1): Update java_treetreehash_create call.
305 (java_treetreehash_create): Remove parameter gc. Use
308 2010-06-04 Joseph Myers <joseph@codesourcery.com>
310 * jvspec.c (lang_specific_driver): Use GCC-specific formats in
313 2010-05-30 Steven Bosscher <steven@gcc.gnu.org>
315 * except.c: Include tm.h.
317 2010-05-28 Joseph Myers <joseph@codesourcery.com>
319 * jvspec.c (lang_specific_driver): Use fatal_error instead of
320 fatal. Use warning instead of error for warnings.
322 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
324 * expr.c (get_symbol_table_index): Add spaces in expression.
326 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
328 * java-tree.h (method_entry): Declare. Declare VECs containing it.
329 (struct lang_type): Change type of otable_methods, atable_methods, and
330 itable_methods to VECs. Fix comment for atable_methods.
331 (emit_symbol_table): Take a VEC instead of a tree.
332 (get_symbol_table_index): Take a VEC * instead of a tree *.
333 * class.c (add_table_and_syms): Take a VEC instead of a tree.
334 (emit_symbol_table): Update for changed parameter type.
335 * expr.c (get_symbol_table_index): Likewise.
337 2010-05-27 Steven Bosscher <steven@gcc.gnu.org>
339 * buildings.c: Pretend to be a backend file by undefining
340 IN_GCC_FRONTEND (still need rtl.h here).
342 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
344 * java-tree.h (struct lang_decl_func): Change type of throws_list
346 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
347 of DECL_FUNCTION_THROWS.
348 * class.c (make_method_value): Likewise.
350 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
352 * class.c (utf8_decl_list): Delete.
353 (build_utf8_ref): Remove references to it.
354 * java-tree.h (all_class_list): Delete.
355 (predef_filenames): Delete.
356 (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
358 * jcf-parse.c (parse_roots): Decrease size to 2.
359 (current_file_list): Convert to a VEC.
360 (all_class_list): Declare.
361 (jcf_parse): Adjust for new type of all_class_list.
362 (java_layout_seen_class_methods): Likewise.
363 (predefined_filenames): Declare.
364 (add_predefined_file): Use it.
365 (predefined_filename_p): Likewise.
366 (java_parse_file): Adjust for new type of current_file_list. *
368 2010-05-25 Jakub Jelinek <jakub@redhat.com>
370 * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
374 * java-tree.h (pending_static_fields): New extern declaration.
375 (java_write_globals): New prototype.
376 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
377 * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
378 of a static field push it into pending_static_fields vector.
379 * class.c (pending_static_fields): New variable.
380 (add_field): If static field is not DECL_EXTERNAL, push it into
381 pending_static_fields vector.
382 (java_write_globals): New function.
384 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
386 * expr.c (quick_stack): Change type to a VEC. Update comment.
387 (tree_list_free_list): Delete.
388 (flush_quick_stack): Update for quick_stack type change.
389 (push_value): Likewise.
390 (pop_value): Likewise.
392 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
394 * java-gimplify.c: Do not include tm.h, toplev.h.
395 * typeck.c: Do not include tm.h.
396 * mangle_name.c: Do not include tm.h.
397 * jcf-dump.c: Do not include tm.h, ggc.h.
398 * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
399 * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
401 * jcf-parse.c: Do not include tm.h and tm_p.h.
402 * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
403 target.h, and expr.h.
404 * except.c: Do not include tm.h, rtl.h, function.h.
405 * builtins.c: Do not include convert.h. Explain why RTL headers
406 have to be included here.
407 * verify-glue.c: Do not include tm.h.
408 * jcf-depend.c: Do not include tm.h.
409 * jcf-reader.c: Include ggc.h.
410 * jcf-io.c: Do not include tm.h, toplev.h.
411 * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
413 * lang.c: Do not include rtl.h, expr.h.
414 * Make-lang.in: Update dependencies.
416 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
418 * jcf-parse.c: Include bitmap.h.
419 * Make-lang.in: Update dependencies.
421 2010-05-20 Jakub Jelinek <jakub@redhat.com>
424 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
427 2010-05-19 Anatoly Sokolov <aesok@post.ru>
429 * jcf-parse.c (get_constant): Use double_int_to_tree instead of
430 build_int_cst_wide_type.
432 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
434 * expr.c (pop_arguments): Fix use of undeclared variable.
436 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
438 * expr.c (expand_java_multianewarray): Use build_call_vec instead of
440 (pop_arguments): Return a VEC instead of a tree. Take a method type
441 rather than a list of argument types.
442 (rewrite_rule): Change signature. of rewrite_arglist member.
443 (rewrite_arglist_getcaller): Update signature.
444 (rewrite_arglist_getclass): Likewise.
445 (maybe_rewrite_invocation): Update for rewrite_arglist change.
446 (build_known_method_ref): Take a VEC instead of a tree.
447 (invoke_build_dtable): Likewise.
448 (expand_invoke): Update calls to pop_arguments. Use build_call_vec
449 instead of build_call_list.
450 (build_jni_stub): Use build_call_vec instead of build_call_list.
451 * java-tree.h (maybe_rewrite_invocation): Update declaration.
452 (build_known_method_ref): Likewise.
453 (invoke_build_dtable): Likewise.
455 2010-05-14 Nathan Froyd <froydnj@codesourcery.com>
458 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
459 vector. Move call to build_constructor...
460 (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear
461 TREE_CONSTANT on the constructor.
462 (PUSH_SUPER_VALUE): Change first argument to a vector.
463 (PUSH_FIELD_VALUE): Likewise.
464 * resource.c (compile_resource_data): Update calls to above macros.
465 * constants.c (build_constants_constructor): Likewise.
466 * class.c (build_utf8_ref): Likewise.
467 (make_field_value): Likewise.
468 (make_method_value): Likewise.
469 (add_table_and_syms): New function.
470 (make_class_data): Call it. Update calls to above macros.
471 (build_symbol_table_entry): New function.
472 (build_symbol_entry): Call it. Update calls to above macros.
473 (emit_symbol_table): Likewise.
474 (make_catch_class_record): Update calls to above macros.
475 (build_assertion_table_entry): New function.
476 (add_assertion_table_entry): Call it.
477 (emit_assertion_table): Likewise.
479 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
482 * lang.c (java_handle_option): Add argument kind.
484 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
486 * decl.c (java_init_decl_processing): Remove argument in call to
489 2010-04-07 Jakub Jelinek <jakub@redhat.com>
491 * exception.cc (_Jv_Throw): Avoid set but not used warning.
492 * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
493 sizeof to avoid set but not used warnings.
495 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
497 * lang.c (java_post_options): Constify variable "dot".
499 * jcf-parse.c (set_source_filename): Constify variable "dot".
500 (load_class): Constify variable "separator".
501 Use get_identifier_with_length.
503 * jvspec.c (lang_specific_driver): Constify two variables named "p".
505 2010-01-09 Jakub Jelinek <jakub@redhat.com>
507 * jcf-dump.c (version): Update copyright notice dates.
509 2009-11-28 Jakub Jelinek <jakub@redhat.com>
511 * jvspec.c (lang_specific_driver): Remove unused
512 saw_verbose_flag variable.
513 * jcf-dump.c (main): Remove unused general_purpose_bits
515 * builtins.c (initialize_builtins): Remove unused float_ftype_float
517 * expr.c (java_stack_pop): Remove unused val variable.
518 (build_jni_stub): Remove unused res_type variable.
519 * verify-impl.c (check_field_constant): Remove unused len variable.
521 2009-10-20 Joel Dice <dicej@mailsnare.net>
524 * mangle_name.c (append_unicode_mangled_name): Fix mangling
525 of names with multiple underscores and "U".
526 (unicode_mangling_length): Likewise.
528 2009-10-03 Simon Baldwin <simonb@google.com>
530 * config-lang.in (lang_dirs): Remove zlib.
532 2009-09-28 Richard Henderson <rth@redhat.com>
534 * builtins.c (initialize_builtins): Update call to
535 build_common_builtin_nodes.
536 * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
538 2009-09-14 Richard Henderson <rth@redhat.com>
540 * builtins.c (initialize_builtins): Update call to
541 build_common_builtin_nodes.
542 * decl.c (java_init_decl_processing): Don't call
543 default_init_unwind_resume_libfunc.
544 * except.c: Include tree-iterator.h.
545 (build_exception_object_var): New.
546 (build_exception_object_ref): Use it.
547 (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
548 Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
549 * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
551 2009-09-13 Richard Guenther <rguenther@suse.de>
552 Rafael Avila de Espindola <espindola@google.com>
554 * decl.c (do_nothing): Remove.
555 (java_init_decl_processing): Do not set lang_eh_runtime_type.
556 * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
557 * lang.c (java_eh_personality): New.
558 (java_eh_personality_decl): Likewise.
559 (LANG_HOOKS_EH_PERSONALITY): Define.
561 2009-09-03 Diego Novillo <dnovillo@google.com>
563 * lang.c (lang_hooks): Remove const qualifier.
565 2009-09-01 Jakub Jelinek <jakub@redhat.com>
567 * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
570 2009-09-01 Richard Guenther <rguenther@suse.de>
572 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
573 * java-tree.h (java_mark_addressable): Likewise.
574 * typeck.c (java_mark_addressable): Likewise.
576 2009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
578 * Make-lang.in (java.install-pdf): Install gcj.pdf in
579 $(pdfdir)/gcc, alongside the other manuals.
581 2009-08-12 Andrew Haley <aph@redhat.com>
583 * builtins.c (compareAndSwapInt_builtin): Use
584 flag_use_atomic_builtins.
585 (compareAndSwapLong_builtin): Likewise.
586 (compareAndSwapObject_builtin): Likewise.
587 * jvspec.c: Add flag_use_atomic_builtins.
588 * gcj.texi: Likewise.
589 * java-tree.h: Likewise.
590 * lang.opt: Likewise.
592 2009-08-11 Dodji Seketeli <dodji@redhat.com>
595 * lang.c (put_decl_node): Outputs different level of information
596 depending on the verbosity level.
598 2009-07-31 Andrew Haley <aph@redhat.com>
601 * decl.c (java_replace_references): Set EXPR_LOCATION on all
602 generated expressions.
603 (binding_level.loc): new field.
604 (clear_binding_level): Initialize loc.
605 (set_input_location): New function.
606 (pushlevel): Set new binding_level.loc.
607 (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
608 (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
609 (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
611 2009-07-17 Richard Guenther <rguenther@suse.de>
614 * java-gimplify.c (java_genericize): Do not gimplify here.
615 But replace all local references.
616 (java_gimplify_expr): Do not replace local references here.
617 (java_gimplify_modify_expr): Likewise.
618 * jcf-parse.c (java_parse_file): Do not finalize the CU or
619 optimize the cgraph here.
620 * decl.c (java_replace_reference): Make static.
621 (java_replace_references): New function.
622 (end_java_method): Clear base_decl_map.
623 * java-tree.h (java_replace_references): Declare.
624 (java_replace_reference): Remove.
626 2009-07-14 Taras Glek <tglek@mozilla.com>
627 Rafael Espindola <espindola@google.com>
629 * Make-lang.in (java.install-plugin): New target for
630 installing plugin headers.
632 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
634 * class.c: Replace %J by an explicit location. Update all calls.
636 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
638 * jcf-parse.c: Replace %H by an explicit location. Update all calls.
640 2009-06-29 Andrew Haley <aph@redhat.com>
643 * java-tree.h (cxx_keyword_p): New declaration.
644 * mangle_name.c (utf8_cmp): Move here from mangle.c.
645 (cxx_keywords): Likewise.
646 (cxx_keyword_p): Likewise.
647 (MANGLE_CXX_KEYWORDS): New macro.
648 (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
649 (append_gpp_mangled_name): Likewise.
650 * mangle.c: Move code to mangle_name.c.
651 (mangle_member_name): Don't call cxx_keyword_p.
653 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
655 * java-gimplify.c (java_gimplify_block): New argument to
657 * expr.c (force_evaluation_order): Same.
658 * typeck.c: Add location to build_decl or PUSH_FIELD calls.
667 * java-tree.h (PUSH_FIELD): Add location field.
669 2009-06-09 Ian Lance Taylor <iant@google.com>
671 * verify.h: Remove extern "C".
673 2009-06-07 Ian Lance Taylor <iant@google.com>
675 * jcf-parse.c (handle_constant): Change local variable 'kind' to
678 2009-06-01 Ian Lance Taylor <iant@google.com>
680 * jcf-io.c (find_class): Use CONST_CAST.
682 2009-05-27 Ian Lance Taylor <iant@google.com>
684 * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
686 (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
688 2009-05-26 Ian Lance Taylor <iant@google.com>
690 * Make-lang.in (jvspec.o): Use $(COMPILER).
691 ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
692 (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
694 2009-05-12 Alexandre Oliva <aoliva@redhat.com>
696 * Make-lang.in (GCJ): Renamed to...
699 2009-04-27 Ian Lance Taylor <iant@google.com>
701 * builtins.c (java_builtins): Add casts to enum type.
702 * verify-impl.c (check_class_constant): Add cast to enum type.
703 (check_constant, check_wide_constant): Likewise.
705 2009-04-27 Richard Guenther <rguenther@suse.de>
708 * constants.c (build_constants_constructor): Retain the old
709 pointer type as valid TYPE_POINTER_TO after patching the
710 type of the constant pool decl.
712 2009-04-24 Ian Lance Taylor <iant@google.com>
714 * jcf-parse.c (handle_constant): Add cast to enum type.
716 2009-04-21 Taras Glek <tglek@mozilla.com>
718 * builtins.c: Update GTY annotations to new syntax
720 * java-tree.h: Likewise
724 2009-04-21 Joseph Myers <joseph@codesourcery.com>
726 * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
729 2009-04-18 Ian Lance Taylor <iant@google.com>
731 * verify-impl.c (verify_instructions_0): Add cast to enum type.
733 2009-04-09 Paolo Bonzini <bonzini@gnu.org>
735 * builtins.c (compareAndSwapLong_builtin,
736 compareAndSwapInt_builtin, compareAndSwapObject_builtin,
737 VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
739 2009-03-31 Richard Guenther <rguenther@suse.de>
741 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
742 the first operand of binary and comaprison expressions.
744 2009-03-30 Joseph Myers <joseph@codesourcery.com>
746 PR rtl-optimization/323
747 * lang.c (java_post_options): Set flag_excess_precision_cmdline.
748 Give an error for -fexcess-precision=standard for processors where
749 the option is significant.
751 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
753 * lang.opt: Unify help text for -Wdeprecated.
755 2009-02-03 Jakub Jelinek <jakub@redhat.com>
757 * jcf-dump.c (version): Update copyright notice dates.
759 2009-01-16 Richard Guenther <rguenther@suse.de>
761 PR tree-optimization/38835
763 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
765 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
768 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
770 2008-11-04 Andrew Haley <aph@redhat.com>
773 * jcf-parse.c (java_emit_static_constructor): Don't call
774 cgraph_build_static_cdtor. Rewrite.
776 2008-10-24 Jakub Jelinek <jakub@redhat.com>
778 * Make-lang.in (check-java-subtargets): New target.
780 2008-10-16 David Edelsohn <edelsohn@gnu.org>
783 * Make-lang.in (class.o): Depend on $(TM_P_H).
785 * class.c: Include tm_p.h.
786 * expr.c: Include tm_p.h.
788 2008-10-14 Andrew Haley <aph@redhat.com>
790 * constants.c (build_constant_data_ref): Make sure we only build
791 one copy of the decl for the constant pool.
793 2008-09-22 Andrew Haley <aph@redhat.com>
795 * expr.c (rules): Add new rule for
796 gnu.java.lang.VMCPStringBuilder.toString.
797 (rewrite_rule.new_classname): New field.
798 (maybe_rewrite_invocation): Use new_classname field instead of
799 DECL_CONTEXT (*method_p).
800 Allow rewrite_arglist to be NULL.
802 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
804 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
805 (java_get_callee_fndecl): Kill.
807 2008-09-17 Jan Hubicka <jh@suse.cz>
810 * class.c (add_method_1): Do not initialize DECL_INLINE.
811 (make_local_function_alias): Likewise.
812 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
813 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
815 2008-09-09 Richard Guenther <rguenther@suse.de>
817 * decl.c (build_result_decl): Remove no longer applicable
820 2008-09-05 David Daney <ddaney@avtrex.com>
822 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
824 2008-08-21 David Daney <ddaney@avtrex.com>
826 * class.c (make_class_data): Don't add field_index when
827 flag_reduced_reflection set.
829 2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
831 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
833 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
836 * lang.c (java_handle_option): Replace set_Wunused with
839 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
841 * gcj.texi: Update copyright years. Do not list GPL as
844 2008-07-29 Jakub Jelinek <jakub@redhat.com>
846 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
849 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
852 2008-07-29 Jan Hubicka <jh@suse.cz>
854 * lang.c (java_post_options): Remove handling of flag_no_inline.
856 2008-07-28 Richard Guenther <rguenther@suse.de>
858 Merge from gimple-tuples-branch.
860 2008-07-18 Richard Guenther <rguenther@suse.de>
862 * expr.c: Include tree-iterator.h.
863 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
865 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
867 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
870 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
872 * java-gimplify.c (java_gimplify_expr): Same.
873 (java_gimplify_modify_expr): Same.
874 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
876 2008-05-02 Diego Novillo <dnovillo@google.com>
878 * expr.c (build_java_throw_out_of_bounds_exception): Fix
879 mixed declarations and code.
881 2008-05-02 Doug Kwan <dougkwan@google.com>
883 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
884 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
886 2008-02-19 Diego Novillo <dnovillo@google.com>
888 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
890 * java-gimplify.c (java_gimplify_self_mod_expr): Change
891 gimple_seq arguments to gimple_seq *. Update all users.
893 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
895 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
897 (java_gimplify_self_mod_expr): Same.
898 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
901 2008-07-24 Jan Hubicka <jh@suse.cz>
903 * java/decl.c: Include cgraph.h
904 (end_java_method): Remove non-unit-at-a-time code.
905 (java_mark_decl_local): Likewise; sanity check that we don't touch
908 2008-07-15 Jan Hubicka <jh@suse.cz>
910 * lang.c (java_init_options): Enable unit-at-a-time by default.
912 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
914 * Make-lang.in (jvspec.o): Fix dependencies.
916 2008-07-06 Tom Tromey <tromey@redhat.com>
918 * Make-lang.in (java/parse.o-warn): Remove.
919 (java/jcf-io.o-warn): Remove.
921 2008-07-05 Tom Tromey <tromey@redhat.com>
923 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
924 (compare_path): Remove.
925 (java_or_class_file): Likewise.
926 (memoized_dirlist_entry): Likewise.
927 (memoized_dirlist_hash): Likewise.
928 (memoized_dirlist_lookup_eq): Likewise.
929 (memoized_dirlists): Likewise.
930 (caching_stat): Likewise.
931 (find_class): Use stat.
932 * jcf.h (JCF_USE_SCANDIR): Remove.
934 2008-06-30 Joshua Sumali <jsumali@redhat.com>
936 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
938 (java.uninstall): Likewise.
939 (java.maintainer-clean): Likewise.
940 (aot-compile.pod): New rule.
941 (rebuild-gcj-db.pod): New rule.
942 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
943 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
945 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
947 * Make-lang.in (java/jcf-io.o-warn): New.
949 2008-06-24 Tom Tromey <tromey@redhat.com>
951 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
952 * expr.c (add_type_assertion): Rename argument.
953 (build_java_arrayaccess): Don't name variable 'throw'.
954 (ARRAY_NEW_MULTI): Don't name variable 'class'.
955 * jcf-io.c (find_class): Don't name variable 'class'.
956 * mangle.c (compression_table_add): Don't name variable 'new'.
957 * constants.c (cpool_for_class): Rename argument.
958 (alloc_constant_fieldref): Likewise.
959 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
961 (read_class): Likewise.
962 (parse_zip_file_entries): Likewise.
963 (process_zip_dir): Likewise.
964 * decl.c (java_mark_class_local): Rename argument.
965 * class.c (GEN_TABLE): Use type_name, not typename.
966 (gen_indirect_dispatch_tables): Likewise.
967 (add_field): Rename argument.
968 (is_compiled_class): Likewise.
969 (safe_layout_class): Likewise.
970 (emit_assertion_table): Likewise.
971 * typeck.c (has_method): Rename argument.
973 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
975 * class.c (ident_subst, mangled_classname, unmangle_classname,
976 gen_indirect_dispatch_tables, add_method_1,
977 build_fieldref_cache_entry, make_local_function_alias,
978 layout_class, java_treetreehash_find, java_treetreehash_new,
979 split_qualified_name): Fix for -Wc++-compat.
980 * constants.c (set_constant_entry, cpool_for_class): Likewise.
981 * decl.c (make_binding_level, java_dup_lang_specific_decl,
982 start_java_method): Likewise.
983 * except.c (prepare_eh_table_type): Likewise.
984 * expr.c (type_assertion_hash, note_instructions): Likewise.
985 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
986 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
987 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
989 * jcf-parse.c (reverse, java_read_sourcefilenames,
990 annotation_grow, rewrite_reflection_indexes, java_parse_file,
991 process_zip_dir): Likewise.
992 * jcf-path.c (add_entry, add_path, jcf_path_init,
993 jcf_path_extdirs_arg): Likewise.
994 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
995 * jvgenmain.c (do_mangle_classname): Likewise.
996 * lang.c (put_decl_string): Likewise.
997 * verify-impl.c (make_state_copy, make_state, add_new_state):
1000 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1002 * gcj.texi: Expand TABs, remove whitespace from blank lines.
1004 2008-06-14 Tom Tromey <tromey@redhat.com>
1007 * class.c (build_class_ref): Initialize this_classdollar when
1010 2008-05-23 Andrew Haley <aph@redhat.com>
1012 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1013 pathname of source file.
1015 2008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1017 * jcf-dump.c (print_constant): Use
1018 HOST_LONG_LONG_FORMAT.
1020 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1022 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1025 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1027 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1028 (build_classdollar_field): Don't set TREE_INVARIANT.
1029 (get_dispatch_table): Don't set TREE_INVARIANT.
1030 (make_class_data): Don't set TREE_INVARIANT.
1031 (build_symbol_entry): Don't set TREE_INVARIANT.
1032 (emit_symbol_table): Don't set TREE_INVARIANT.
1033 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1034 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1035 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1036 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1038 2008-04-03 Tom Tromey <tromey@redhat.com>
1040 * Make-lang.in (java_OBJS): New variable.
1042 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1044 * java-tree.h (insert_block): Kill.
1045 * decl.c (insert_block): Kill.
1047 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1049 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1050 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1053 2008-03-27 Tom Tromey <tromey@redhat.com>
1055 * Make-lang.in: Revert automatic dependency patch.
1057 2008-03-25 Tom Tromey <tromey@redhat.com>
1059 * Make-lang.in: Removed most explicit .o targets.
1060 (java/jvspec.o): Reduce to variable setting. Moved to java/.
1061 ($(GCJ)$(exeext)): Update.
1062 (JAVA_OBJS): New variable.
1063 (JCFDUMP_OBJS): Reformat.
1064 (java_OBJS): New variable.
1065 (java/jvspec.o-warn): Update.
1066 (java/parse.o-warn): Remove.
1067 (JAVA_TREE_H): Remove.
1068 (java/jcf-io.o): Reduce to variable setting.
1069 (ALL_CPPFLAGS): Likewise.
1071 2008-03-12 Paolo Bonzini <bonzini@gnu.org>
1073 * mangle.c (java_mangle_decl): Remove dead check.
1075 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1077 * jcf-parse.c (java_parse_file): Assert binding levels are
1079 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1082 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1084 * jcf-dump.c (version): Update copyright notice dates.
1086 2008-02-29 Tom Tromey <tromey@redhat.com>
1088 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1090 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1092 2008-02-26 Tom Tromey <tromey@redhat.com>
1094 * lang.c (java_post_options): Remove conditional.
1095 * expr.c (expand_byte_code): Remove old location code.
1096 * jcf-parse.c (set_source_filename): Remove old location code.
1097 (give_name_to_class): Likewise.
1098 (jcf_parse): Likewise.
1099 (duplicate_class_warning): Likewise.
1100 (parse_class_file): Likewise.
1101 (java_parse_file): Likewise.
1102 * decl.c (finish_method): Remove old location code.
1103 * class.c (push_class): Remove old location code.
1105 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1108 * Make-lang.in (jc1): Add $(GMPLIBS).
1110 2008-01-23 David Daney <ddaney@avtrex.com>
1112 * class.c (hide) Rename to...
1113 (java_hide_decl) ... this throughout, and make public.
1114 * resource.c (Jr_count): Remove.
1115 (compile_resource_data): Call java_mangle_resource_name to generate
1116 decl name. Make resource decl public and hidden.
1117 * mangle.c (java_mangle_resource_name): New function.
1118 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1121 2008-01-04 Andrew Haley <aph@redhat.com>
1124 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1127 2008-01-03 Andrew Haley <aph@redhat.com>
1130 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1131 we're about to re-layout the type.
1133 2007-12-20 Alexandre Oliva <aoliva@redhat.com>
1135 * lang.c (java_classify_record): Don't return
1136 RECORD_IS_INTERFACE for now.
1138 2007-12-18 Andrew Haley <aph@redhat.com>
1141 * jcf-parse.c (java_parse_file): Remove call to
1142 java_mark_class_local.
1143 (parse_class_file): Reinstate call to java_mark_class_local here.
1144 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1145 already set, call java_mangle_decl() and make_decl_rtl() to
1146 rewrite its name as a hidden alias.
1148 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1151 * lang.c (java_classify_record): New.
1152 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1154 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1157 * decl.c (finish_method): Pass 'false' for the new
1158 allocate_struct_function parameter.
1160 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1162 * expr.c (build_jni_stub): Use the computed jni func type for
1165 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1167 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1169 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1171 * expr.c (type_assertion_hash): Hash type uids rather than
1174 2007-11-17 David Daney <ddaney@avtrex.com>
1175 Andrew Haley <aph@redhat.com>
1177 * constants.c (build_constants_constructor): Use POINTER_SIZE
1178 insead of BITS_PER_WORD in big-endian work around.
1180 2007-11-07 Tom Tromey <tromey@redhat.com>
1183 * gcj.texi (Input Options): Add missing noun.
1185 2007-11-02 Tom Tromey <tromey@redhat.com>
1188 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1189 * zipfile.h (ZIPEMPTYMAGIC): New define.
1191 2007-11-01 Tom Tromey <tromey@redhat.com>
1193 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1194 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1195 (java/jcf-io.o): Depend on zipfile.h.
1197 2007-10-17 Richard Guenther <rguenther@suse.de>
1199 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1202 2007-10-03 Andrew Haley <aph@redhat.com>
1205 * class.c (mangled_classname): Detect and replace illegal
1206 characters in assembly language symbols.
1207 (gen_indirect_dispatch_tables): Call mangled_classname() on
1210 2007-09-27 Jakub Jelinek <jakub@redhat.com>
1212 * lang.c (java_print_error_function): Add third argument.
1214 2007-09-15 Tom Tromey <tromey@redhat.com>
1216 * java-tree.h (struct lang_decl_func) <function_decl_body>:
1218 <init_final>: Likewise.
1219 * lang.c (java_dump_tree): Update.
1220 * java-tree.h (DECL_FUNCTION_BODY): Remove.
1222 2007-09-11 Jan Hubicka <jh@suse.cz>
1224 * decl.c (java_expand_body): Kill.
1225 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1227 2007-09-06 Tom Tromey <tromey@redhat.com>
1229 * jcf-parse.c (parse_class_file): Re-enter the current file.
1231 2007-09-07 Roman Zippel <zippel@linux-m68k.org>
1233 * boehm.c (mark_reference_fields): Move misaligned pointer check
1234 after JREFERENCE_TYPE_P test
1236 2007-09-06 Roman Zippel <zippel@linux-m68k.org>
1238 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1239 if pointer is misaligned.
1241 2007-09-06 Tom Tromey <tromey@redhat.com>
1243 * lang.c (java_post_options): Update.
1244 * jcf-parse.c (set_source_filename): Update.
1245 (give_name_to_class): Update.
1246 (jcf_parse): Update.
1247 (duplicate_class_warning): Update.
1248 (parse_class_file): Update.
1249 (java_parse_file): Update.
1250 * expr.c (expand_byte_code): Update.
1252 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1254 * decl.c (finish_method): Use set_cfun.
1256 2007-09-04 Andrew Haley <aph@redhat.com>
1258 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1259 when using the ARM EABI.
1261 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1263 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1265 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1267 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1269 * jcf.h (JCF_FINISH): Likewise.
1271 2007-08-28 Tom Tromey <tromey@redhat.com>
1273 * Make-lang.in (java.tags): Don't tag '*.y' files.
1275 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1277 * lang.c (java_decl_ok_for_sibcall): Likewise.
1279 2007-08-21 Paul Brook <paul@codesourcery.com>
1280 Nathan Sidwell <nathan@codesourcery.com>
1281 Mark Mitchell <mark@codesourcery.com>
1282 Joseph Myers <joseph@codesourcery.com>
1284 * jcf-dump.c (version): Use pkgversion_string. Update copyright
1287 2007-08-20 Richard Guenther <rguenther@suse.de>
1289 * lang.c (java_tree_inlining_walk_subtrees): Remove.
1290 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1292 2007-08-17 Tom Tromey <tromey@redhat.com>
1294 * typeck.c (find_method_in_interfaces): Update.
1295 * jcf-parse.c (load_class): Update.
1296 * java-gimplify.c (java_gimplify_component_ref): Removed.
1297 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
1299 (java_gimplify_expr): Update.
1300 * decl.c (java_init_decl_processing): Update.
1301 * class.c (set_constant_value): Update.
1302 (make_class_data): Update.
1303 (finish_class): Update.
1304 (build_static_field_ref): Update.
1305 (is_compiled_class): Update.
1306 (maybe_layout_super_class): Update.
1307 (layout_class): Update.
1308 (layout_class_method): Update.
1309 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1310 (lang_decl_var) <am, final_iud, cif>: Removed fields.
1311 (lang_decl_func) <init_calls_this>: Removed field.
1312 (lang_type) <dot_class, verify_method>: Removed fields.
1313 (FIELD_NESTED_ACCESS): Removed.
1314 (FIELD_NESTED_ACCESS_P): Removed.
1315 (DECL_FIELD_FINAL_IUD): Removed.
1316 (DECL_LOCAL_FINAL_IUD): Removed
1317 (LOCAL_FINAL_P): Removed.
1318 (FINAL_VARIABLE_P): Removed.
1319 (CLASS_FINAL_VARIABLE_P): Removed.
1320 (DECL_BIT_INDEX): Removed.
1321 (DECL_INIT_CALLS_THIS): Removed.
1322 (FIELD_LOCAL_ALIAS): Removed.
1323 (FIELD_LOCAL_ALIAS_USED): Removed.
1324 (FIELD_THISN): Removed.
1325 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1326 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1327 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1328 (TYPE_DOT_CLASS): Removed.
1329 (TYPE_VERIFY_METHOD): Removed.
1330 (ID_CLASSDOLLAR_P): Removed.
1331 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1333 (classdollar_identifier_node): Removed.
1334 (TYPE_UNKNOWN): Removed.
1335 (CLASS_FROM_SOURCE_P): Removed.
1336 * expr.c (build_jni_stub): Update.
1337 (force_evaluation_order): Update.
1338 (build_java_empty_stmt): Update.
1339 (build_class_init): Update.
1340 (java_stack_swap): Update.
1341 (build_jni_stub): Update.
1343 2007-08-17 Tom Tromey <tromey@redhat.com>
1345 * java-tree.h (LABEL_TYPE_STATE): Removed.
1346 (load_type_state): Removed.
1347 (LABEL_PC): Removed.
1348 (LABEL_VERIFIED): Removed.
1349 (type_states): Declare.
1350 * expr.c (type_states): New global.
1351 (load_type_state): Now static. Use type_states. Changed
1353 (lookup_label): Don't set LABEL_PC.
1354 (expand_byte_code): Don't use LABEL_VERIFIED.
1355 (note_instructions): Initialize type_states.
1356 * verify-glue.c (vfy_note_stack_depth): Rewrote.
1357 (vfy_note_stack_type): Use type_states.
1358 (vfy_note_local_type): Likewise.
1360 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1362 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1363 * jcf.h (JCF_FINISH): Likewise.
1365 2007-07-31 Nick Clifton <nickc@redhat.com>
1367 * java-gimplify.c: Change copyright header to refer to version 3
1368 of the GNU General Public License and to point readers at the
1369 COPYING3 file and the FSF's license web page.
1370 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1371 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1372 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1373 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1374 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1375 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1376 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1378 2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1380 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1382 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1384 * lang.c (java_get_callee_fndecl): Constify.
1386 2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1388 * mangle.c (set_type_package_list): Constify.
1389 * verify-glue.c (vfy_make_string): Delete.
1390 * verify.h (vfy_make_string): Likewise.
1392 2007-07-26 Tom Tromey <tromey@redhat.com>
1394 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1395 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1396 EXIT_BLOCK_LABELED_BLOCK): Likewise.
1397 * lang.c (java_tree_inlining_walk_subtrees): Update.
1398 (java_dump_tree): Likewise.
1399 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1401 * decl.c (push_labeled_block, pop_labeled_block): Remove.
1402 * java-gimplify.c (java_gimplify_labeled_block_expr,
1403 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1404 (java_gimplify_expr): Update.
1406 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1408 * class.c (java_treetreehash_hash, java_treetreehash_compare):
1410 * expr.c (type_assertion_eq): Likewise.
1411 * jcf-io.c (compare_path): Likewise.
1412 * jcf-parse.c (cmpstringp): Likewise.
1413 * verify-impl.c (get_one_type, compute_argument_types,
1414 compute_return_type): Likewise.
1416 2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1420 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1422 2007-07-12 Richard Guenther <rguenther@suse.de>
1424 * expr.c (expand_java_return): RETURN_EXPR has void type.
1425 (build_jni_stub): Likewise. Use a comparison against zero
1426 for null-pointer test in COND_EXPR.
1427 (build_field_ref): Build POINTER_PLUS_EXPR with correct
1428 type. Convert result instead.
1429 (build_invokevirtual): Likewise.
1431 2007-07-09 Geoffrey Keating <geoffk@apple.com>
1434 * lang.c (java_init): Remove setting of force_align_functions_log.
1435 * class.c (add_method_1): Set DECL_ALIGN of non-static method
1436 to cope with ptrmemfunc_vbit_in_pfn.
1438 2007-07-03 David Daney <ddaney@avtrex.com>
1440 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
1442 (doc/gcj.dvi): Same.
1443 (doc/gcj.pdf): Same.
1444 (java/index.html): Same.
1446 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1448 * class.c (make_class_data): Build the index in sizetype.
1449 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1450 adding to a pointer type.
1451 (build_symbol_entry): Likewise.
1452 * expr.c (build_java_arrayaccess): Likewise.
1453 (build_field_ref): Likewise.
1454 (build_known_method_ref): Likewise.
1455 (build_invokevirtual): Likewise.
1456 * except.c (build_exception_object_ref): Do a
1457 NEGATIVE and then a POINTER_PLUS_EXPR instead
1460 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
1462 * typeck.c (java_signed_type): Remove.
1463 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1464 * java-tree.h (java_signed_type): Remove.
1466 2007-05-18 Geoffrey Keating <geoffk@apple.com>
1468 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1469 (print_constant): Likewise.
1471 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
1473 * expr.c (build_java_binop): Use unsigned_type_for instead of
1475 * java-tree.h (java_unsigned_type): Remove.
1476 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1477 * typeck.c (java_unsigned_type): Remove.
1479 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1481 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1482 instead of checking GIMPLE_STMT_P in chain_next.
1484 2007-04-06 Colin Walters <walters@redhat.com>
1486 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1487 * jcf-io.c (open_class): Copy 'filename'.
1489 2007-04-03 Andrew Haley <aph@redhat.com>
1491 * jvgenmain.c (main): Change main to use class$, not class$$.
1492 (do_mangle_classname): Likewise.
1493 * class.c (hide): New function.
1494 (add_field): Hide everything that shouldn't be visible outside a
1496 (build_static_class_ref): Likewise.
1497 (build_classdollar_field): Likewise.
1498 (make_class_data): Likewise.
1499 (layout_class_method): Likewise.
1500 * expr.c (special_method_p): New function.
1502 * class.c (push_class): Don't bogusly guess the source filename.
1503 * jcf-parse.c (give_name_to_class): Don't set input_location from
1504 DECL_ARTIFICIAL decls.
1506 2007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
1508 * typeck.c (java_signed_or_unsigned_type): Removed.
1509 (java_signed_type): use get_signed_or_unsigned_type instead of
1510 java_signed_or_unsigned_type.
1511 (java_unsigned_type): Ditto.
1512 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1513 * java-tree.h (java_signed_or_unsigned_type): Removed.
1515 2007-03-26 Tom Tromey <tromey@redhat.com>
1517 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1518 (java.maintainer-clean): Likewise.
1519 (java.install-man): Likewise.
1520 (.INTERMEDIATE): Removed grmiregistry.pod.
1521 (grmiregistry.pod): Removed.
1522 * gcj.texi (Invoking gcjh): Removed.
1523 (Invoking gjnih): Likewise.
1524 (Invoking grmiregistry): Likewise.
1525 (direntry): Updated.
1527 (which-gcj): Removed.
1529 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1531 * Make-lang.in: Add install-pdf target as copied from
1532 automake v1.10 rules.
1534 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
1536 * gcj.texi: Standardize title page.
1538 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1540 * class.c: Fix a comment typo.
1542 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1543 Brooks Moses <brooks.moses@codesourcery.com>
1544 Lee Millward <lee.millward@codesourcery.com>
1546 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
1548 (BUILD_MONITOR_EXIT): Likewise.
1550 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
1551 (java_gimplify_modify_expr): Likewise.
1553 * class.c (cache_this_class_ref): Use build_call_expr.
1554 (build_static_field_ref): Likewise.
1555 (emit_indirect_register_classes): Likewise.
1556 (emit_register_classes): Likewise.
1558 * resource.c (write_resource_constructor): Use build_call_expr.
1560 * builtins.c (builtin_creator_function): Change interpretation of
1561 the second parameter to be the whole CALL_EXPR instead of the arglist.
1562 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
1563 (min_builtin): Likewise.
1564 (abs_builtin): Likewise.
1565 (java_build_function_call_expr): Likewise.
1566 (convert_real): Likewise.
1567 (UNMARSHAL3): Likewise.
1568 (UNMARSHAL4): Likewise.
1569 (UNMARSHAL5): Likewise.
1570 (build_arglist_for_builtin): Delete. Fix callers to use
1571 build_call_expr instead.
1572 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
1574 (compareAndSwapInt_builtin): Likewise.
1575 (compareAndSwapLong_builtin): Likewise.
1576 (compareAndSwapObject_builtin): Likewise.
1577 (putVolatile_builtin): Likewise.
1578 (getVolatile_builtin): Likewise.
1579 (VMSupportsCS8_builtin): Likewise.
1580 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
1583 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
1584 (build_java_throw_out_of_bounds_exception): Likewise.
1585 (java_check_reference): Likewise.
1586 (build_java_arraystore_check): Likewise.
1587 (build_newarray): Likewise.
1588 (build_anewarray): Likewise.
1589 (expand_java_multinewarray): Use build_call_list instead of build3.
1590 (build_java_monitor): Use build_call_nary instead of build3.
1591 (java_create_object): Likewise.
1592 (expand_java_NEW): Likewise.
1593 (build_instanceof): Likewise.
1594 (expand_java_CHECKCAST): Likewise.
1595 (build_java_soft_divmod): Likewise.
1596 (build_java_binop): Likewise.
1597 (build_field_ref): Likewise.
1598 (build_class_init): Likewise.
1599 (rewrite_arglist_getcaller): Use build_call_expr.
1600 (build_invokeinterface): Use build_call_nary instead of build3.
1601 (expand_invoke): Use build_call_list instead of build3.
1602 (build_jni_stub): Use build_call_nary, build_call_list, or
1603 build_call_expr instead of build3.
1604 (expand_java_field_op): Use build_call_expr instead of build3.
1605 (force_evaluation_order): Use new CALL_EXPR accessors.
1607 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
1609 2007-02-15 David Daney <ddaney@avtrex.com>
1611 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
1612 (java.maintainer-clean):Add gc-analyze.1.
1613 (.INTERMEDIATE): Add gc-analyze.pod.
1614 (gc-analyze.pod): New rule.
1615 (java.install-man): Install gc-analyze.1
1616 * gcj.texi: Add new section for the gc-analyze program.
1618 2007-02-07 Andrew Haley <aph@redhat.com>
1620 * class.c (uncache_this_class_ref): New.
1621 * expr.c (build_jni_stub): Initialize the class.
1622 (expand_byte_code): Call uncache_this_class_ref after generating
1625 2007-02-06 Tom Tromey <tromey@redhat.com>
1628 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
1630 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
1632 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
1634 2007-02-02 Andrew Haley <aph@redhat.com>
1636 * expr.c (expand_byte_code): Call cache_this_class_ref() and
1637 cache_cpool_data_ref().
1638 Set TYPE_CPOOL_DATA_REF.
1639 (cache_cpool_data_ref): New function.
1640 * constants.c (build_ref_from_constant_pool): Remove special-case
1641 code for flag_indirect_classes.
1642 (build_constant_data_ref): Move special-case code for
1643 flag_indirect_classes here from build_ref_from_constant_pool.
1644 * decl.c (finish_method): Move class initialization from here to
1645 cache_this_class_ref.
1646 * class.c (cache_this_class_ref): New function.
1647 (build_class_ref): Use this_classdollar for the ouput class.
1649 2007-02-02 David Daney <ddaney@avtrex.com>
1651 * class.c (is_compiled_class): Move check to avoid reloading
1653 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
1656 2007-02-01 Andrew Haley <aph@redhat.com>
1659 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
1661 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
1663 * class.c, jcf-parse.c: Fix comment typos.
1665 2007-01-30 Tom Tromey <tromey@redhat.com>
1667 * gcj.texi (Strings): Fix documentation for JvNewString.
1669 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1671 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
1674 2007-01-30 Ben Elliston <bje@au.ibm.com>
1676 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
1678 2007-01-29 Tom Tromey <tromey@redhat.com>
1681 * jvspec.c (lang_specific_driver): Handle separate -I argument.
1682 * lang.opt (-I): Add 'Separate'.
1684 2007-01-29 Andrew Haley <aph@redhat.com>
1686 * class.c (add_method_1): Mark fndecl as external unless we are
1687 compiling it into this object file.
1689 2007-01-24 Andrew Haley <aph@redhat.com>
1691 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
1692 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
1694 2007-01-22 Andrew Haley <aph@redhat.com>
1696 * builtins.c (VMSupportsCS8_builtin): New function.
1698 2007-01-23 Andrew Pinski <pinskia@gmail.com>
1701 * jcf-io.c (opendir_in_zip): Close the file
1702 and free zipf before returning after an error.
1704 2007-01-16 Tom Tromey <tromey@redhat.com>
1706 * java-tree.def: Added copyright header.
1708 2007-01-15 Tom Tromey <tromey@redhat.com>
1710 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
1712 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
1714 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
1715 (EXPR_WFL_NODE): Likewise.
1716 (EXPR_WFL_LINECOL): Likewise.
1717 (EXPR_WFL_FILENAME): Likewise.
1718 (EXPR_WFL_LINENO): Likewise.
1719 (build_expr_wfl, expr_add_location): Don't declare.
1720 (build_unknown_wfl): Removed.
1721 (EXPR_WFL_FILENAME_NODE): Removed.
1722 (EXPR_WFL_COLNO): Removed.
1723 (EXPR_WFL_SET_LINECOL): Removed.
1724 (DECL_FUNCTION_WFL): Removed.
1725 (DECL_FIELD_FINAL_WFL): Removed.
1726 (struct lang_decl_func) <wfl>: Removed field.
1727 <called_constructor>: Likewise.
1728 <inner_access>: Likewise.
1729 (struct lang_decl_var) <wfl>: Removed field.
1730 (DECL_CONSTRUCTOR_CALLS): Removed.
1731 (DECL_FUNCTION_ACCESS_DECL): Likewise.
1732 (DECL_FUNCTION_INNER_ACCESS): Likewise.
1733 (DECL_SPECIFIC_COUNT): Likewise.
1734 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
1735 * expr.c (build_expr_wfl): Removed.
1736 (expr_add_location): Likewise.
1738 2007-01-12 Tom Tromey <tromey@redhat.com>
1740 * jcf-dump.c (main): Updated call to find_class.
1741 * lang.c (java_init): Removed dead code.
1742 * jcf-parse.c (read_class): Don't use java_source field. Removed
1744 (parse_zip_file_entries): Don't use java_source field.
1745 (process_zip_dir): Likewise.
1746 (jcf_parse): Removed dead code.
1747 (java_parse_file): Likewise.
1748 (read_class): Updated call to find_class.
1749 * jcf-io.c (find_class): Don't use java_source field. Removed
1750 'source_ok' argument, .java logic.
1751 * jcf.h (JCF) <java_source>: Removed field.
1752 (JCF_ZERO): Updated. (find_class): Updated.
1753 * decl.c: Removed dead code.
1754 * class.c: Removed dead code.
1756 2007-01-11 Tom Tromey <tromey@redhat.com>
1758 * typeck.c (convert): Don't use flag_emit_class_files.
1759 * lang.c (java_post_options): Don't use flag_emit_class_files.
1760 (java_handle_option): Don't use flag_extraneous_semicolon or
1762 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
1763 flag_emit_class_files.
1764 (load_class): Likewise.
1765 * java-tree.h (flag_emit_class_files): Don't declare.
1766 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
1767 (flag_extraneous_semicolon): Don't declare.
1768 (flag_not_overriding): Likewise.
1769 (flag_static_local_jdk1_1): Likewise.
1770 (flag_redundant): Likewise.
1771 * expr.c (build_newarray): Don't use flag_emit_class_files.
1772 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
1773 flag_emit_class_files.
1774 (build_class_ref): Likewise.
1775 * builtins.c (check_for_builtin): Don't use
1776 flag_emit_class_files.
1778 2007-01-10 Tom Tromey <tromey@redhat.com>
1780 * lang.c (java_can_use_bit_fields_p): Removed.
1781 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
1783 2007-01-09 Andrew Haley <aph@redhat.com>
1785 * expr.c (build_java_arrayaccess): Rewrite to generate array
1786 access in canonical form.
1787 (expand_java_arraystore): Use build_fold_addr_expr() on address of
1790 2007-01-03 Andrew Haley <aph@redhat.com>
1793 * expr.c (expand_java_field_op): If we're initializing a field's
1794 declaring interface we should not also initialize the class
1795 context in which it was referenced.
1797 2007-01-02 Tom Tromey <tromey@redhat.com>
1799 * java-tree.h (compiling_from_source, current_encoding,
1800 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
1801 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
1802 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
1803 JTI_WFL_OPERATOR): Removed
1804 (finit_identifier_node, instinit_identifier_node,
1805 length_identifier_node, super_identifier_node,
1806 continue_identifier_node, access0_identifier_node, wfl_operator):
1808 (cyclic_inheritance_report,
1809 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
1810 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
1811 DECL_FIXED_CONSTRUCTOR_P): Removed.
1812 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
1814 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
1815 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
1816 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
1817 import_list, import_demand_list>: Removed.
1818 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
1819 cxx_keyword_p): Removed.
1820 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
1821 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
1822 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
1823 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
1824 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
1825 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
1826 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
1827 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
1828 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
1829 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
1830 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
1831 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
1832 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
1833 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
1834 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
1835 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
1836 java_parse_abort_on_error, extract_field_decl): Removed.
1838 * lang.c: (compiling_from_source, current_encoding): Removed.
1839 (java_handle_option): Ignore -fencoding.
1840 * parse.h: Don't include lex.h.
1841 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
1842 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
1843 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
1844 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
1845 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
1846 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
1847 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
1848 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
1849 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
1850 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
1851 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
1852 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
1853 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
1854 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
1855 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
1856 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
1857 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
1858 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
1859 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
1860 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
1861 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
1862 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
1863 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
1864 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
1865 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
1866 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
1867 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
1868 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
1869 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
1870 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
1871 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
1872 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
1873 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
1874 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
1875 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
1876 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
1877 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
1878 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
1879 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
1880 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
1881 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
1882 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
1883 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
1884 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
1885 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
1886 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
1887 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
1888 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
1889 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
1890 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
1891 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
1892 SET_CPC_STATIC_INITIALIZER_STMT,
1893 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
1894 java_complete_class, java_check_circular_reference,
1895 java_fix_constructors, java_layout_classes, java_reorder_fields,
1896 java_method_add_stmt, java_get_line_col, reset_report,
1897 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
1898 java_finish_classes, ctxp, ctxp_for_generation,
1899 ctxp_for_generation_last): Removed.
1900 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
1901 * mangle.c (utf8_cmp): New function.
1902 (cxx_keywords): New global.
1903 (cxx_keyword_p): New function.
1904 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
1905 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
1906 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
1907 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
1908 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
1909 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
1910 * Make-lang.in (java.srcextra): Do nothing.
1911 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
1912 (JAVA_OBJS): Don't mention deleted files.
1913 (java.mostlyclean): Likewise.
1914 (java.clean): Likewise.
1915 (JAVA_LEX_C): Removed.
1916 (buffer.o, check-init.o, parse.o): Remove unused targets.
1917 (typeck.o): Updated.
1918 * jcf-parse.c (read_class): Comment out unused code.
1919 (java_layout_seen_class_methods): New function.
1920 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
1922 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
1923 (init_jcf_parse): Removed.
1924 * config-lang.in (gtfiles): Remove deleted files.
1925 * decl.c (java_init_decl_processing): Don't initialize
1926 finit_identifier_node, instinit_identifier_node,
1927 length_identifier_node, super_identifier_node,
1928 continue_identifier_node, access0_identifier_node. Don't call
1930 * class.c (cyclic_inheritance_report): New global.
1931 (add_method_1): Don't use
1932 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
1933 (maybe_layout_super_class): Comment out code.
1934 (safe_layout_class): New function.
1935 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
1936 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
1937 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
1938 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
1939 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
1940 (java_gimplify_case_expr): Removed.
1941 (java_gimplify_default_expr): Likewise.
1942 (java_gimplify_new_array_init): Likewise.
1944 * keyword.gperf, keyword.h: Removed.
1945 * chartables.h: Removed.
1946 * check-init.c: Removed.
1947 * buffer.c, buffer.h: Removed.
1948 * convert.h: Removed.
1949 * gen-table.pl: Removed.
1950 * lex.c, lex.h: Removed.
1952 2007-01-02 Andrew Haley <aph@redhat.com>
1954 * expr.c (expand_java_arraystore): Make sure we perform a bounds
1955 check at runtime before we perform a type check.
1957 2006-12-19 Andrew Haley <aph@redhat.com>
1959 * decl.c: Bump minor BC ABI version.
1961 2006-12-13 Gary Benson <gbenson@redhat.com>
1963 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
1965 2006-12-12 Tom Tromey <tromey@redhat.com>
1967 * lang-specs.h: Pass -M options to jc1.
1968 * jcf-depend.c (jcf_dependency_add_file): Don't emit
1971 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
1973 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
1975 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
1977 * lang-specs.h: Pass '%U'-based options as separate arguments.
1979 2006-12-05 Tom Tromey <tromey@redhat.com>
1982 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
1984 * class.c (add_field): Handle ACC_SYNTHETIC.
1985 (add_method_1): Likewise. Handle bridge and varargs.
1986 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
1988 (set_class_decl_access_flags): Handle synthetic and annotation.
1989 * java-tree.h (METHOD_BRIDGE): New macro.
1990 (METHOD_VARARGS): Likewise.
1991 (TYPE_SYNTHETIC): Likewise.
1992 (TYPE_ANNOTATION): Likewise.
1993 (lang_type): New fields 'synthetic' and 'annotation'.
1994 (lang_decl_func): New fields 'varargs' and 'bridge'.
1996 2006-12-04 Andrew Haley <aph@redhat.com>
1998 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2001 2006-11-29 Gary Benson <gbenson@redhat.com>
2003 * expr.c (rewrite_arglist_getcaller): Reorder.
2005 2006-11-29 Andrew Haley <aph@redhat.com>
2007 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2008 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2010 2006-11-23 Andrew Haley <aph@redhat.com>
2012 * expr.c (rewrite_arglist_getcaller): New.
2013 (rewrite_arglist_getclass): Fix indentation.
2014 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
2015 gnu.classpath.VMStackWalker.getCallingClassLoader().
2016 * builtins.c (initialize_builtins): Remove duplicate def'n of
2018 Add __builtin_return_address.
2020 2006-11-22 Andrew Haley <aph@redhat.com>
2022 * jcf-reader.c (get_attribute): Mark attr_type unused.
2024 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2026 2007-01-08 Richard Guenther <rguenther@suse.de>
2028 * lex.c (do_java_lex): Use build_int_cst_wide_type.
2029 * jcf-parse.c (get_constant): Likewise.
2031 2006-11-12 Jan Hubicka <jh@suse.cz>
2033 * resource.c (compile_resource_data): Update for new varpool names.
2034 * java/class.c (build_utf8_ref): Likewise.
2036 2006-11-12 David Daney <ddaney@avtrex.com>
2039 * typeck.c (build_java_array_type): Increase buffer sizes.
2041 2006-11-11 Richard Guenther <rguenther@suse.de>
2043 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2044 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2046 2006-11-06 Andrew Haley <aph@redhat.com>
2048 * java-tree.h (CONSTANT_LazyFlag): New.
2049 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2050 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2052 (handle_constant): Return 0 for dummy cpool entries.
2053 Handle constants of kind Class.
2054 Handle constants of kind NameAndType.
2055 (handle_enclosingmethod_attribute): New.
2056 (handle_signature_attribute): New.
2057 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2058 (HANDLE_SIGNATURE_ATTRIBUTE): New.
2059 (handle_constant): Use unmangle_classname()rather than calling
2060 identifier_subst() directly.
2062 2006-11-02 Andrew Haley <aph@redhat.com>
2064 * java-tree.h (FIELD_ENUM): New.
2065 (lang_decl_var.field_enum): New.
2066 (lang_type.enum_class): New.
2068 * class.c (set_class_decl_access_flags): Handle enum types.
2069 (add_field): Handle enum fields.
2070 (get_access_flags_from_decl): Likewise.
2072 * class.c (make_class_data): Put reflection_data into rodata.
2074 2006-11-01 Andrew Haley <aph@redhat.com>
2076 * jcf-parse.c (field_offsets, bit_obstack): New variables.
2077 (jcf_parse): Write end marker to annotation_data.
2078 (java_parse_file): Create field_offsets bitmap. Destroy it.
2079 (annotation_grow, annotation_rewrite_byte)
2080 (annotation_rewrite_short, annotation_rewrite_int)
2081 (annotation_read_short, annotation_write_byte)
2082 (annotation_write_short, annotation_write_int)
2083 (handle_long_constant, handle_constant, handle_element_value)
2084 (handle_annotation, handle_annotations)
2085 (handle_annotation_attribute, rewrite_reflection_indexes)
2086 (handle_member_annotations, handle_parameter_annotations)
2087 (handle_default_annotation): New functions.
2088 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2089 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2090 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2091 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2092 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2093 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
2094 (TYPE_REFLECTION_DATA): New.
2095 (TYPE_REFLECTION_DATASIZE): New.
2096 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2098 * jcf-reader.c (get_attribute): Pass field/method index and
2099 attribute type to get_attribute().
2100 * constants.c (find_class_or_string_constant): Make nonstatic.
2101 (cpool_for_class): Likewise.
2102 (build_constants_constructor): Separate string and scalar types.
2103 * class.c (make_class_data): Generate field_indexes permutation.
2104 Pass it to rewrite_reflection_indexes().
2105 (make_class_data): Generate constructor for reflection_data field.
2107 2006-10-20 Tom Tromey <tromey@redhat.com>
2109 * gcj.texi (Top): Don't mention jv-scan.
2110 (Invoking gcj): Likewise.
2111 (Invoking gcjh): Likewise.
2112 (Invoking gjnih): Likewise.
2113 (Invoking gij): Likewise.
2114 (Invoking gcj-dbtool): Likewise.
2115 (Invoking jv-scan): Removed.
2116 * parse-scan.y: Removed.
2117 * jv-scan.c: Removed.
2118 * config-lang.in (stagestuff): Don't mention jv-scan.
2119 * Make-lang.in (java): Removed jv-scan.
2120 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2121 (JVSCAN_OBJS): Removed.
2122 (jv-scan$(exeext)): Likewise.
2123 (JAVA_MANFILES): Removed jv-scan.1.
2124 (java.uninstall): Don't mention jv-scan.
2125 (java.mostlyclean): Likewise.
2126 (java.maintainer-clean): Likewise.
2127 (.INTERMEDIATE): Likewise.
2128 (java/jv-scan.o): Removed.
2129 (jv-scan.pod): Likewise.
2130 (java.srcextra): Don't mention parse-scan.c.
2131 (java.mostlyclean): Likewise.
2132 (java/parse-scan.c): Removed.
2133 (java/parse-scan.o-warn): Removed.
2134 (java/parse-scan.o): Removed.
2136 2006-10-20 Tom Tromey <tromey@redhat.com>
2138 * lang.c (java_handle_option): Don't use
2139 jcf_write_base_directory.
2140 * jcf.h (jcf_write_base_directory): Removed.
2141 * parse.y (java_expand_classes): Don't call write_classfile.
2142 * config-lang.in (gtfiles): Removed jcf-write.c.
2143 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2144 (java/jcf-write.o): Removed.
2145 * jcf-parse.c (parse_class_file): Don't call write_classfile.
2146 * java-tree.h (write_classfile): Removed declaration.
2147 * jcf-write.c: Removed.
2149 2006-10-20 Tom Tromey <tromey@redhat.com>
2151 * Make-lang.in (java): Removed gjnih, gcjh.
2152 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2153 (GCJH_OBJS): Removed.
2154 (GJNIH_OBJS): Likewise.
2155 (gjnih$(exeext)): Likewise.
2156 (gcjh$(exeext)): Likewise.
2157 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2158 (java.install-common): Don't special case gcjh.
2159 (java.uninstall): Don't mention gcjh, gjnih.
2160 (java.mostlyclean): Likewise.
2161 (java.maintainer-clean): Likewise.
2162 (.INTERMEDIATE): Likewise.
2163 (gcjh.pod): Removed.
2164 (gjnih.pod): Likewise.
2165 (GCJH_TARGET_INSTALL_NAME): Removed.
2166 (java/gjavah-jni.o): Removed.
2167 (java/gjavah.o): Likewise.
2168 * config-lang.in (stagestuff): Removed gjnih, gcjh.
2169 * gjavah.c: Removed.
2171 2006-10-17 Tom Tromey <tromey@redhat.com>
2173 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2176 2006-10-17 Tom Tromey <tromey@redhat.com>
2178 * jvgenmain.c (main): Handle -findirect-dispatch.
2179 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2182 2006-10-06 Andrew Haley <aph@redhat.com>
2184 * builtins.c (compareAndSwapInt_builtin): Check that we really do
2185 have a compare_and_swap builtin.
2186 (compareAndSwapLong_builtin): Likewise.
2187 (compareAndSwapObject_builtin): Likewise.
2189 2006-10-04 Andrew Haley <aph@redhat.com>
2191 * builtins.c (java_builtins): Add compareAndSwapInt,
2192 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2193 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2194 putObjectVolatile, getObjectVolatile, getIntVolatile,
2195 getLongVolatile, getLong.
2196 (UNMARSHAL3): New macro.
2197 (UNMARSHAL4): Likewise.
2198 (UNMARSHAL5): Likewise.
2199 (build_arglist_for_builtin): New function.
2200 (build_addr_sum, build_check_this): New functions.
2201 (putObject_builtin. compareAndSwapInt_builtin,
2202 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2203 putVolatile_builtin, getVolatile_builtin): New builtins.
2205 2006-06-08 Andrew Haley <aph@redhat.com>
2207 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2208 get_symbol_table_index().
2209 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2211 (build_known_method_ref): New arg: special. Pass it to
2212 get_symbol_table_index.
2213 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2215 (build_invokevirtual): New arg: special. Pass it to
2216 get_symbol_table_index.
2217 (expand_invoke): New variable: special.
2218 Pass it to maybe_rewrite_invocation().
2219 Pass it to build_known_method_ref().
2220 * class.c (build_symbol_entry): Add new arg: special. Use it to
2221 build the symbol table conbstructor.
2222 (emit_symbol_table): Extract SPECIAL from the method list and pass
2223 it to build_symbol_entry().
2224 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2225 special accordingly.
2227 2006-09-08 Andrew Haley <aph@redhat.com>
2229 * class.c (layout_class_method): Use build_java_signature, not
2230 build_java_argument_signature. Use lookup_java_method, not
2231 lookup_argument_method.
2233 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2234 Bryce McKinlay <bryce@mckinlay.net.nz>
2236 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2238 2006-07-18 Tom Tromey <tromey@redhat.com>
2240 * lang.opt: Added missing -W options.
2242 2006-07-12 Tom Tromey <tromey@redhat.com>
2245 * lang-specs.h: Pass '%U'-based options as separate arguments.
2246 Use -faux-classpath.
2247 * lang.c (java_handle_option): Handle OPT_faux_classpath.
2248 * lang.opt (faux-classpath): New option.
2250 2006-07-07 Tom Tromey <tromey@redhat.com>
2252 * class.c (make_class_data): Set value for reflection_data field.
2253 * decl.c (java_init_decl_processing): Add reflection_data field.
2255 2006-07-07 Tom Tromey <tromey@redhat.com>
2257 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2259 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2261 2006-07-07 Andrew Haley <aph@redhat.com>
2263 * jcf-parse.c (set_source_filename): Don't check for
2264 CLASS_FROM_CURRENTLY_COMPILED_P.
2267 2006-07-07 Andrew Haley <aph@redhat.com>
2269 * java-tree.h (java_read_sourcefilenames): Declare.
2270 * lang.c (java_handle_option): Call java_read_sourcefilenames().
2271 * lang.opt (fsource-filename): New opt.
2272 * lang-specs.h: Add -fsource-filename.
2273 * jcf-parse.c (num_files, filenames): New variables.
2274 (reverse, cmpstringp, java_read_sourcefilenames,
2275 find_sourcefile): New.
2276 (set_source_filename): Call find_sourcefile to find the real name
2279 2006-06-27 Tom Tromey <tromey@redhat.com>
2281 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2282 Signature, LocalVariableTypeTable, annotation attributes.
2283 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2284 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2285 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2286 (HANDLE_METHOD): Likewise.
2287 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2288 (print_annotation): New function.
2289 (print_element_value): Likewise.
2291 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2292 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2293 (print_parameter_annotations): New function.
2294 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2295 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2297 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2298 (print_annotations): New function.
2300 2006-06-23 Tom Tromey <tromey@redhat.com>
2302 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
2303 emitting class files, always use 1.5.
2304 * gcj.texi (Input Options): Document -fsource.
2305 (Code Generation): Document -ftarget.
2307 2006-06-21 Tom Tromey <tromey@redhat.com>
2310 * expr.c (expand_java_field_op): Initialize field's declaring
2313 2006-06-20 Tom Tromey <tromey@redhat.com>
2315 * expr.c (push_value): Always flush quick stack.
2317 2006-06-19 Tom Tromey <tromey@redhat.com>
2319 * expr.c (push_value): Also flush quick stack if value is a
2322 2006-06-19 Tom Tromey <tromey@redhat.com>
2324 * expr.c (push_value): Flush quick stack if value has side
2327 2006-06-13 Tom Tromey <tromey@redhat.com>
2329 * class.c (is_compiled_class): Explicitly check for current
2332 2006-06-09 Tom Tromey <tromey@redhat.com>
2334 * gjavah.c (decompile_method): Don't decompile a static field
2337 2006-06-06 Tom Tromey <tromey@redhat.com>
2339 * lang-specs.h <jc1>: Add .jar file to command line if
2340 -fsaw-java-file. Also, remove -ffilelist-file in this case.
2342 2006-06-05 Tom Tromey <tromey@redhat.com>
2344 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2345 synthetic, enum, annotation.
2346 * jcf.h (ACC_BRIDGE): New macro.
2347 (ACC_VARARGS): Likewise.
2348 (ACC_SYNTHETIC): Likewise.
2349 (ACC_ENUM): Likewise.
2350 (ACC_ANNOTATION): Likewise.
2352 2006-06-04 Tom Tromey <tromey@redhat.com>
2354 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2355 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2357 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
2358 when needed. Handle classpath-setting.
2359 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2360 * lang-specs.h: Rewrote.
2362 2006-06-04 Tom Tromey <tromey@redhat.com>
2364 * jcf-io.c (find_class): Set source_ok to 0.
2365 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2366 (parse_class_file): Don't call java_mark_class_local.
2367 (java_parse_file): Skip .java files. Call java_mark_class_local
2368 before lowering any code.
2369 (parse_zip_file_entries): Don't call duplicate_class_warning
2371 (process_zip_dir): ... call it here.
2372 * class.c (add_field): Don't mark field external if it is being
2373 compiled into this object.
2374 (make_class_data): Handle situation where class_dtable_decl is
2375 created before Class is compiled.
2376 (is_compiled_class): Don't assume files in zip are compiled into
2378 (layout_class_method): Don't mark method external if it is being
2379 compiled into this object.
2381 2006-06-04 Tom Tromey <tromey@redhat.com>
2383 * jcf-path.c (jcf_path_compute): New function.
2384 * jcf.h (jcf_path_compute): Declare.
2386 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2388 * decl.c: Include langhooks.h.
2389 (builtin_function): Remove.
2390 (java_init_decl_processing): Replace calls to builtin_function
2391 with add_builtin_function.
2392 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2393 (java/decl.o): Depend on langhooks.h.
2394 * java-tree.h (builtin_function): Remove.
2396 2006-10-10 Brooks Moses <bmoses@stanford.edu>
2398 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2400 2006-09-12 Tom Tromey <tromey@redhat.com>
2402 * expr.c (push_value): Always flush quick stack.
2404 2006-09-12 Tom Tromey <tromey@redhat.com>
2407 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2408 the push of the called method's return result.
2410 2006-09-12 Tom Tromey <tromey@redhat.com>
2412 * jvspec.c (lang_specific_driver): Read spec file even if
2415 2006-09-12 Tom Tromey <tromey@redhat.com>
2418 * expr.c (expand_java_field_op): Initialize field's declaring
2419 interface if necessary.
2421 2006-09-12 Tom Tromey <tromey@redhat.com>
2424 * expr.c (expand_java_field_op): No error for assignments not in
2425 class initializer or constructor.
2427 2006-08-22 Andrew Haley <aph@redhat.com>
2429 * decl.c (java_add_stmt): Give the statement list a type.
2431 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2432 Bryce McKinlay <bryce@mckinlay.net.nz>
2434 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2436 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
2439 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2440 or '--' is used with a constant operand.
2441 (java_complete_lhs): When processing a '++' or '--' expression,
2442 don't call java_complete_tree but java_complete_lhs, so that a
2443 static final variable operand is never replaced by its value. This
2444 avoids an ICE later on.
2445 (patch_unaryop): Fixed typo in comment.
2447 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2449 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2451 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2453 * builtins.c (check_for_builtin): If a builtin could result in a
2454 direct call being generated, don't use it if flag_indirect_dispatch
2457 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2459 * gcj.texi (Invocation): Corrections for Invocation API example.
2461 2006-07-04 Andrew Haley <aph@redhat.com>
2463 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2466 2006-06-21 Andrew Haley <aph@redhat.com>
2468 * java-tree.h (update_aliases): Remove
2469 * expr.c (expand_iinc): Remove call to update_aliases().
2470 (STORE_INTERNAL): Likewise.
2471 * decl.c (update_aliases, initialize_local_variable)
2472 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2474 2006-06-19 Andrew Haley <aph@redhat.com>
2478 * expr.c (java_modify_addr_for_volatile): New function.
2479 (expand_java_field_op): Handle volatile fields.
2480 * java-gimplify.c (java_gimplify_component_ref): Call
2481 java_modify_addr_for_volatile to give the field_ref the correct
2483 (java_gimplify_modify_expr): Likewise.
2484 * java-tree.h (java_modify_addr_for_volatile): New decl.
2486 2006-06-17 Karl Berry <karl@gnu.org>
2488 * gcj.texi (@dircategory): Use "Software development" instead
2489 of "Programming", following the Free Software Directory.
2491 2006-06-16 Andrew Haley <aph@redhat.com>
2493 * class.c (make_class_data): When using flag_indirect_classes,
2494 don't initialize the vtable of Class instances.
2496 2006-06-09 Andrew Haley <aph@redhat.com>
2500 * builtins.c (initialize_builtins): Add __sync_synchronize().
2501 * class.c (add_field): Mark volatile fields.
2502 * java-gimplify.c (java_gimplify_expr): Call new functions to
2503 handle self-modifying exprs and COMPONENT_REFs.
2504 (java_gimplify_component_ref): New.
2505 (java_gimplify_modify_expr): Add handling for volatiles.
2507 2006-06-08 Tom Tromey <tromey@redhat.com>
2509 * gcj.texi (libgcj Runtime Properties): Document
2510 gnu.gcj.user.realname.
2512 2006-06-08 Andrew Haley <aph@redhat.com>
2514 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2515 get_symbol_table_index().
2516 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2518 (build_known_method_ref): New arg: special. Pass it to
2519 get_symbol_table_index.
2520 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2522 (build_invokevirtual): New arg: special. Pass it to
2523 get_symbol_table_index.
2524 (expand_invoke): New variable: special.
2525 Pass it to maybe_rewrite_invocation().
2526 Pass it to build_known_method_ref().
2527 * class.c (build_symbol_entry): Add new arg: special. Use it to
2528 build the symbol table conbstructor.
2529 (emit_symbol_table): Extract SPECIAL from the method list and pass
2530 it to build_symbol_entry().
2531 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2532 special accordingly.
2534 2006-06-06 David Daney <ddaney@avtrex.com>
2536 * gcj.texi (libgcj Runtime Properties): Document
2537 gnu.gcj.runtime.NameFinder.show_raw and
2538 gnu.gcj.runtime.NameFinder.remove_unknown.
2540 2006-06-06 Tom Tromey <tromey@redhat.com>
2542 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2543 synthetic, enum, annotation.
2544 * jcf.h (ACC_BRIDGE): New macro.
2545 (ACC_VARARGS): Likewise.
2546 (ACC_SYNTHETIC): Likewise.
2547 (ACC_ENUM): Likewise.
2548 (ACC_ANNOTATION): Likewise.
2550 2006-06-06 Mike Stump <mrs@apple.com>
2552 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
2553 installing during build.
2555 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
2557 * gcj.texi (Extensions): Document the new gcj-dbtool-based
2558 classname-to-library resolution mechanism.
2559 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
2560 mechanism deprecated.
2561 (libgcj Runtime Properties): Document
2562 gnu.gcj.runtime.VMClassLoader.library_control's new default.
2564 2006-05-29 Jakub Jelinek <jakub@redhat.com>
2566 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
2568 (jword): Define to uint64 on 64-bit arches.
2569 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
2571 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
2573 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
2576 2006-05-26 Tom Tromey <tromey@redhat.com>
2578 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
2579 * verify-glue.c (vfy_class_type): New function.
2580 * verify-impl.c (check_constant): Allow 'ldc class'.
2581 * verify.h (vfy_class_type): Declare.
2583 2006-05-25 Andrew Haley <aph@redhat.com>
2586 * decl.c (maybe_pushlevels): When variable ranges are non-nested
2587 update all lifetimes, not just the first one.
2589 2006-05-24 Tom Tromey <tromey@redhat.com>
2591 * java-tree.h: Fixed flag documentation.
2593 2006-05-24 Tom Tromey <tromey@redhat.com>
2596 * jcf.h (ACC_INVISIBLE): Changed value.
2598 2006-05-24 Andrew Haley <aph@redhat.com>
2601 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
2604 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2606 * lang.opt (femit-class-file): Remove VarExists.
2608 2006-05-16 Tom Tromey <tromey@redhat.com>
2610 * verify-impl.c (verify_instructions_0) <op_return>: Special case
2613 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2616 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
2619 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
2621 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
2622 (java/expr.o): Replace target.h with $(TARGET_H).
2623 (java/parse.o): Likewise.
2625 2006-05-10 Andrew Haley <aph@redhat.com>
2627 * class.c (emit_indirect_register_classes): Fix comment.
2629 2006-05-04 Tom Tromey <tromey@redhat.com>
2631 * java-tree.h (uses_jv_markobj_p): Declare.
2632 * class.c (uses_jv_markobj_p): Removed.
2633 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
2634 (get_boehm_type_descriptor): Use it.
2635 (uses_jv_markobj_p): Moved from class.c. Return bool.
2637 2006-05-04 Tom Tromey <tromey@redhat.com>
2639 * java-tree.def (THIS_EXPR): Now a tcc_expression.
2641 2006-05-04 Andrew Haley <aph@redhat.com>
2643 * class.c (make_field_value): Always build_address_of fdecl if
2644 there is an initializer.
2646 2006-05-03 Andrew Haley <aph@redhat.com>
2649 * expr.c (maybe_rewrite_invocation): New function.
2650 (rewrite_arglist_getclass): Likewise.
2652 (expand_invoke): Call maybe_rewrite_invocation.
2653 * parse.y (patch_invoke): Likewise.
2654 * java-tree.h: (maybe_rewrite_invocation): New function.
2656 2006-04-21 Andrew Haley <aph@redhat.com>
2658 * lang.c (java_init): Handle flag_indirect_classes.
2659 * jvgenmain.c: Use "class$$" instead of "class$".
2660 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
2662 (mangle_class_field): Special case "class$$" as well as "class$".
2663 * constants.c (build_ref_from_constant_pool): If
2664 flag_indirect_classes, generate a ref into the heap.
2665 * decl.c (constants_field_decl_node,
2666 constants_data_field_decl_node): New.
2667 * class.c (build_static_class_ref): New.
2668 (build_classdollar_field): Factor out from build_class_ref().
2669 (make_field_value): Handle static fields in heap.
2670 (make_class_data): Make sure we get a static ref to class.
2671 Make class initializer const if flag_indirect_classes.
2672 (register_class): Build a class_ref for initialization if
2673 flag_indirect_classes.
2674 (emit_indirect_register_classes): New.
2676 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
2678 * expr.c, gjavah.c: Fix comment typos.
2680 2006-04-03 Andrew Haley <aph@redhat.com>
2683 * expr.c (build_field_ref): Don't check the field offset if
2686 2006-03-30 Andrew Haley <aph@redhat.com>
2689 * lang.c (java_attribute_table): New.
2690 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
2691 * expr.c (build_field_ref): Add a null pointer check for all
2692 fields of offset > 4k. Don't do so for accesses via the this
2693 pointer, which we know can never be null.
2694 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
2697 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
2699 * Make-lang.in: Rename docdir to gcc_docdir.
2701 2006-03-30 Tom Tromey <tromey@redhat.com>
2704 * parse.y (java_reorder_fields): Reset superclass field's size as
2707 2006-03-28 Tom Tromey <tromey@redhat.com>
2710 * parse.y (find_most_specific_methods_list): Added 'class'
2712 (lookup_method_invoke): Updated.
2714 2006-03-15 Tom Tromey <tromey@redhat.com>
2716 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
2717 non-static method calls.
2719 2006-03-15 David Daney <ddaney@avtrex.com>
2721 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
2724 2006-03-15 David Daney <ddaney@avtrex.com>
2726 * lang.opt (-freduced-reflection): New option.
2727 * lang.c (java_post_options): Generate an error if
2728 -freduced-reflection used with -fjni or -findirect-dispatch.
2729 * java-tree.h (flag_reduced_reflection): Declare new variable.
2730 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
2731 if bitmap overflows and flag_reduced_reflection set.
2732 * class.c (uses_jv_markobj_p): New function.
2733 (make_class_data): Moved generation of vtable to before
2734 reflection data, generate less reflection data if
2735 flag_reduced_reflection set.
2736 * gcj.texi: Document -freduced-reflection.
2738 2006-03-15 Tom Tromey <tromey@redhat.com>
2741 * class.c (get_interface_method_index): Don't put <clinit> into
2744 2006-03-15 Tom Tromey <tromey@redhat.com>
2746 * parse.y (analyze_clinit_body): Ignore empty statements.
2748 2006-03-08 David Daney <ddaney@avtrex.com>
2750 * gcj.texi: Document -static-libgcj option.
2752 2006-02-20 Andrew Haley <aph@redhat.com>
2754 * jcf-parse.c (parse_class_file): Set input_location from
2757 2006-02-15 Andrew Haley <aph@redhat.com>
2759 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
2760 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
2761 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
2763 2006-02-09 Andrew Haley <aph@redhat.com>
2766 * expr.c (expand_invoke): Allow methods in arrays to be resolved
2767 in their superclass.
2769 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
2772 2006-02-08 Tom Tromey <tromey@redhat.com>
2775 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
2776 * builtins.c (convert_real): New function.
2777 (java_builtins): Handle Float.intBitsToFloat,
2778 Float.floatToRawIntBits, Double.longBitsToDouble,
2779 Double.doubleToRawLongBits.
2781 2006-02-07 Andrew Haley <aph@redhat.com>
2783 * expr.c (expand_invoke): (BC mode.) If we find a method in a
2784 class other than the one in which we expected to find it, ignore
2788 * constants.c (build_constants_constructor): move initializer into
2789 first halfword on a 64-bit big-endian machine.
2791 2006-02-04 Tom Tromey <tromey@redhat.com>
2794 * builtins.c (max_builtin): Skip floating point 'max'.
2795 (min_builtin): Skip floating point 'min'.
2796 (check_for_builtin): Never return NULL_TREE.
2798 2006-02-04 Tom Tromey <tromey@redhat.com>
2801 * expr.c (push_type): Avoid side effect in gcc_assert.
2803 2006-02-04 Roger Sayle <roger@eyesopen.com>
2805 * decl.c (java_init_decl_processing): Create char_type_node as a
2806 regular INTEGER_TYPE node.
2807 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
2808 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
2809 test for char_type_node and promoted_char_type_node as special
2810 instances of INTEGER_TYPE tree codes.
2811 (promote_type,build_java_signature): Likewise.
2812 * jcf-write.c (adjust_typed_op): Likewise.
2813 * mangle.c (mangle_type): Likewise.
2814 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
2815 * parse.h (JINTEGRAL_TYPE_P): Likewise.
2817 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
2819 * expr.c (java_stack_swap): Revert gcc_assert patch.
2821 2006-02-03 Ben Elliston <bje@au.ibm.com>
2823 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
2824 * typeck.c: Likewise.
2825 * verify-impl.c: Likewise.
2826 * class.c: Likewise.
2828 * jcf-parse.c: Likewise.
2829 * constants.c: Likewise.
2830 * check-init.c: Likewise.
2831 * jcf-write.c: Likewise.
2832 * verify-glue.c: Likewise.
2833 * mangle.c: Likewise.
2836 * boehm.c: Likewise.
2838 2006-02-01 Jan Hubicka <jh@suse.cz>
2840 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
2841 * lang.c (java_init_options): Set no_unit_at_a_time_default.
2843 2006-01-30 Andrew Haley <aph@redhat.com>
2846 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
2848 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
2850 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
2851 Update copyright notice dates.
2853 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2855 * jvspec.c (lang_specific_spec_functions): Remove.
2857 2006-01-06 Tom Tromey <tromey@redhat.com>
2859 * gcj.texi (Arrays): Added more documentation for
2861 (Primitive types): Correct information about primitive classes.
2862 (Reference types): New node.
2865 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
2867 * jcf-parse.c (set_source_filename): Set the decl source location
2868 even when returning early.
2870 2005-12-15 Tom Tromey <tromey@redhat.com>
2871 Andrew Haley <aph@redhat.com>
2874 * parse.y (resolve_expression_name): Don't generate accessor
2875 methods for constant fields.
2877 2005-12-13 Andrew Haley <aph@redhat.com>
2881 * class.c (maybe_layout_super_class): Update current_class before
2882 calling do_resolve_class.
2884 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
2887 * jcf-write.c (write_classfile): Use PID in temporary class
2888 file. Save/restore errno when reporting error.
2890 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
2893 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
2894 to bare_function_type and including the return type
2895 * builtins.c (initialize_builtins) : Change builtin mangled name
2896 constants to conform to new mangling scheme
2898 2005-12-08 Andrew Haley <aph@redhat.com>
2901 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
2902 (soft_abstractmethod_node): New.
2903 * expr.c (build_field_ref): Add in-line check for missing field.
2904 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
2906 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2908 * Make-lang.in (java.all.build, java.install-normal): Remove.
2910 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2912 * Make-lang.in: Remove all dependencies on s-gtype, except for
2915 2005-12-07 Richard Sandiford <richard@codesourcery.com>
2917 * class.c (build_utf8_ref, emit_register_classes): Use
2918 switch_to_section and get_section.
2920 2005-12-06 Tom Tromey <tromey@redhat.com>
2923 * parse.y (patch_new_array_init): Revert previous patch.
2924 (lookup_method_invoke): Use size-less array type when creating an
2925 anonymous constructor.
2927 2005-12-05 Tom Tromey <tromey@redhat.com>
2929 * parse.y (patch_new_array_init): Don't set length on array.
2931 2005-12-02 Richard Guenther <rguenther@suse.de>
2933 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
2934 buildN instead of build.
2935 * class.c (finish_class): Likewise.
2936 * expr.c (java_create_object): Likewise.
2938 2005-11-28 Tom Tromey <tromey@redhat.com>
2941 * expr.c (build_jni_stub): Unwrap the return value.
2942 * java-tree.h (soft_unwrapjni_node): New define.
2943 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
2944 * decl.c (java_init_decl_processing): Initialize
2945 soft_unwrapjni_node.
2947 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
2949 * gcj.texi (gij options): Add -Xss documentation.
2951 2005-11-08 Wil Mahan <wmahan@gmail.com>
2954 * zextract.c (read_zip_archive): Fix out of memory error when
2955 reading jar files with zip-style comments.
2957 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
2959 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
2961 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
2963 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
2964 Wil Mahan <wmahan@gmail.com>
2967 * class.c (make_class): Create empty binfo here.
2968 (set_super_info): Only create binfo if we have superclasses.
2970 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
2973 * parse.y (method_header): Make the result of the rule a NULL_TREE
2974 when a parsing error occurs.
2976 2005-09-29 Tom Tromey <tromey@redhat.com>
2979 * jcf-io.c (memoized_dirlist_hash): New function.
2980 (caching_stat): Use it.
2982 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
2985 * class.c (inherits_from_p): Try to lay out super class
2986 if it is not already laid out.
2987 (maybe_layout_super_class): Handle the case where SUPER_CLASS
2990 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
2992 * builtins.c (max_builtin, min_builtin, abs_builtin,
2993 java_build_function_call_expr): Use fold_buildN.
2994 * class.c (layout_class_method): Likewise.
2995 * expr.c (java_truthvalue_conversion, build_java_jsr,
2996 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
2997 build_java_binop, build_field_ref, expand_compare,
2998 build_known_method_ref, build_invokevirtual,
2999 process_jvm_instruction): Likewise.
3000 * parse.y (patch_binop, patch_exit_expr): Likewise.
3001 * typeck.c (convert_ieee_real_to_integer): Likewise.
3002 (convert): Don't call fold after convert_ieee_real_to_integer.
3004 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
3007 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3008 the newly created type. Set import lists here, not in create_class.
3009 (jdep_resolve_class): Set current_class.
3010 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
3011 the current package context, not ctxp->package.
3012 (cicp_cache): Removed.
3013 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3014 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3015 * java-tree.h (TYPE_PACKAGE): New macro.
3016 (struct lang_type): New member 'package'.
3018 2005-09-09 Andrew Haley <aph@redhat.com>
3021 * expr.c (pop_type_0): If the expected type is object or ptr
3022 (i.e. void*), return the type of the object we just popped from
3025 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
3027 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3028 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3030 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
3032 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3033 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3034 typos. Follow spelling conventions.
3036 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
3039 * typeck.c (lookup_do): Look up interfaces for the original class,
3041 * parse.y (java_check_regular_methods): Fix diagnostic message for
3042 more restrictive overriding of a method from an interface.
3044 2005-08-16 Tom Tromey <tromey@redhat.com>
3046 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3047 class' initial state.
3049 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3052 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3053 `literal_token' for large numeric input tokens.
3055 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3058 * parse.y (nested_field_access_p): Rename to nested_member_access_p
3059 and expand to handle method accesses across nested classes.
3060 (build_outer_method_access_method): Rename to
3061 build_nested_method_access_method. Minor adjustments to comments.
3062 (resolve_expression_name): Use the newly-renamed
3063 nested_member_access_p method.
3064 (resolve_qualified_expression_name): Likewise.
3065 (patch_method_invocation): Also consider static methods for access
3066 method generation. Minor adjustments to comments.
3067 (maybe_use_access_method): Use the more general
3068 nested_memeber_access_p to determine access across nested class
3069 boundaries. Allow THIS_ARG to be NULL (for static methods).
3071 2005-08-15 Tom Tromey <tromey@redhat.com>
3074 * expr.c (build_field_ref): Don't generate otable reference when
3075 DECL_FIELD_OFFSET is 0.
3076 * class.c (maybe_layout_super_class): Pass outer class to
3079 2005-08-15 Tom Tromey <tromey@redhat.com>
3081 * java-tree.h (LABEL_IN_SUBR): Removed.
3082 (LABEL_IN_SUBR): Likewise.
3083 (LABEL_IS_SUBR_START): Likewise.
3084 (LABEL_SUBR_START): Likewise.
3085 (LABEL_SUBR_CONTEXT): Likewise.
3086 (LABEL_CHANGED): Likewise.
3087 (LABEL_RETURN_LABEL): Likewise.
3088 (LABEL_RETURN_TYPE_STATE): Likewise.
3089 (LABEL_RETURN_LABELS): Likewise.
3090 (RETURN_MAP_ADJUSTED): Likewise.
3091 (LABEL_PENDING_CHAIN): Likewise.
3093 2005-08-15 Tom Tromey <tromey@redhat.com>
3095 * Make-lang.in (JAVA_OBJS): Removed verify.o
3096 (java/verify.o): Removed.
3097 * verify.c: Removed.
3098 * lang.c (flag_new_verifier): Removed.
3099 (java_post_options): Updated.
3100 * java-tree.h (flag_new_verifier): Removed.
3101 (verify_jvm_instructions): Removed.
3102 * expr.c (pop_type_0): Assume flag_new_verifier is true.
3103 (build_java_check_indexed_type): Likewise.
3104 (expand_java_arraystore): Likewise.
3105 (expand_java_arrayload): Likewise.
3106 (pop_arguments): Likewise.
3107 (expand_byte_code): Likewise.
3108 (process_jvm_instruction): Likewise.
3110 2005-08-10 Andrew Haley <aph@redhat.com>
3112 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3113 type mismatches to make legal GIMPLE.
3115 2005-08-10 Robin Green <greenrd@greenrd.org>
3118 * parse.y (maybe_use_access_method): Generalize check from
3119 java.lang.Object to any superclass of current_class
3121 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
3123 * class.c (build_class_ref): Wrap the primary class type in a
3125 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3126 primary class type from the NOP_EXPR in which it was placed.
3128 2005-07-28 Diego Novillo <dnovillo@redhat.com>
3130 * expr.c (expand_load_internal): Fix missing parens in
3133 2005-07-28 Andrew Haley <aph@redhat.com>
3135 * expr.c (expand_load_internal): Convert to destination type.
3137 2005-07-22 Manfred Hollstein <mh@suse.com>
3139 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3140 (check_constant): Likewise.
3141 (check_wide_constant): Likewise.
3143 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
3145 Make CONSTRUCTOR use VEC to store initializers.
3146 * check-init.c (check_init): Update to cope with VEC in
3148 * class.c (make_field_value, make_method_value, get_dispatch_table,
3149 make_class_data, emit_symbol_table, emit_catch_table,
3150 emit_assertion_table): Use build_constructor_from_list instead of
3152 * constants.c (build_constants_constructor): Likewise.
3153 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3154 VEC in CONSTRUCTOR_ELTS.
3155 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3156 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3158 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3160 * parse.y (build_new_array_init): Use build_constructor_from_list
3161 instead of build_constructor.
3162 (patch_new_array_init): Update to cope with VEC in
3164 (array_constructor_check_entry): Likewise.
3166 2005-07-12 Tom Tromey <tromey@redhat.com>
3168 * jvspec.c (lang_specific_driver): Put filelist_filename first on
3171 2005-07-12 Tom Tromey <tromey@redhat.com>
3174 * parse-scan.y (interface_member_declaration): Added
3177 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
3179 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3180 (LABEL_PENDING_CHAIN): Ditto.
3182 (DECL_BIT_INDEX): Ditto.
3184 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3187 * parse.y (inner_class_accessible): New function. Logic moved from
3188 check_inner_class_access.
3189 (check_inner_class_access): Use inner_class_accessible.
3190 (resolve_inner_class): Simplify arguments. Create circularity hash
3191 here. Keep looking for classes if we found one that was inaccessible.
3192 Return the inaccessible class only if there is no other match.
3193 (do_resolve_class): Update for new resolve_inner_class arguments.
3194 Don't create circularity_hash here.
3196 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3199 * parse.y (add_exception_to_throws): New function.
3200 (purge_unchecked_exceptions): Removed.
3201 (get_constructor_super): Renamed from verify_constructor_super. Now
3202 returns the super constructor after verification.
3203 (java_complete_expand_method): Don't use purge_unchecked_exceptions
3204 or save/restore the exception list.
3205 (check_thrown_exceptions): Add uncaught exceptions in anonymous
3206 class initializers and constructors to the throws clause of the method.
3208 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
3211 * parse.y (interface_member_declaration): Allow empty statements in
3212 interface declarations.
3214 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
3216 * Makefile.in (parse.o): Adjust dependencies.
3217 * parse.y: Include tree-dump.h.
3219 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
3221 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
3224 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
3226 * parse.y (issue_warning_error_from_context): Call
3227 pp_output_formatted_text to be able to get the buffer.
3229 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
3231 * parse.y (issue_warning_error_from_context): Update for the
3232 renaming of pp_format_text to pp_format.
3234 2005-06-28 Paul Brook <paul@codesourcery.com>
3236 * decl.c (java_init_decl_processing): Call
3237 default_init_unwind_resume_libfunc.
3239 2005-06-27 Tom Tromey <tromey@redhat.com>
3241 PR java/21540, PR java/13788:
3242 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3243 fold_constant_for_init.
3244 (patch_binop): Added 'folding' argument. Updated all callers.
3245 (patch_unaryop) <NOP_EXPR>: New case.
3246 (fold_constant_for_init) <NOP_EXPR>: Likewise.
3247 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3249 2005-06-25 Jan Hubicka <jh@suse.cz>
3251 * builtins.c (define_builtin): Accept new flags parameter.
3252 (initialize_builtins): Mark the builtins const and nothrow accordingly.
3254 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
3256 * all files: Update FSF address in copyright headers.
3258 2005-06-24 Tom Tromey <tromey@redhat.com>
3260 * verify-impl.c (verify_instructions_0): Correctly handle
3261 situation where PC falls off end.
3263 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
3266 * parse.y (find_most_specific_methods_list): Remove special case for
3269 2005-06-15 Tom Tromey <tromey@redhat.com>
3272 * class.c (make_method_value): Use soft_abstractmethod_node for
3274 * java-tree.h (soft_abstractmethod_node): New define.
3275 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3276 * decl.c (java_init_decl_processing): Initialize
3277 soft_abstractmethod_node.
3279 2005-06-13 Geoffrey Keating <geoffk@apple.com>
3281 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3283 2005-06-13 Per Bothner <per@bothner.com>
3285 * expr.c (int highest_label_pc_this_method,
3286 start_label_pc_this_method): New globals.
3287 (lookup_label): Add start_label_pc_this_method to pc for label, and
3288 update highest_label_pc_this_method. This prevents conflicts between
3289 labels from different methods.
3290 * java-tree.h: Declare new globals.
3291 * jcf-parse.c (parse_class_file): If needed bump
3292 start_label_pc_this_method and reset highest_label_pc_this_method.
3294 2005-06-13 Tom Tromey <tromey@redhat.com>
3297 * parse.y (nested_field_access_p): Handle case where outer field
3298 is inherited by enclosing class.
3300 2005-06-12 Per Bothner <per@bothner.com>
3302 * class.c (inherits_from_p): Do load_class if needed.
3304 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3306 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3307 * java-tree.h (parse_error_context): Move...
3308 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3309 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3310 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3312 2005-06-08 Roger Sayle <roger@eyesopen.com>
3314 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3316 2005-06-06 Jakub Jelinek <jakub@redhat.com>
3318 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3319 msgid for argument name.
3320 * gjavah.c (error): Likewise.
3321 * java-tree.h (parse_error_context): Likewise.
3322 * parse.y (parse_error_context, parse_warning_context,
3323 issue_warning_error_from_context): Likewise.
3325 2005-06-01 Tom Tromey <tromey@redhat.com>
3328 * class.c (build_static_field_ref): Don't fold constant fields if
3329 current class is from a .class file and we're using indirect
3332 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3334 * java/verify-glue.c: Don't include errors.h and include toplev.h.
3335 * java/Make-lang.in: Updates dependencies.
3337 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
3340 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3341 NESTED_FIELD_ACCESS_IDENTIFIER_P.
3342 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3343 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3344 * jcf-write.c (generate_classfile): Use
3345 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3346 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3347 * parse.y (build_outer_field_access): Rename to
3348 build_nested_field_access. Support static fields and outer-to-inner
3350 (outer_field_access_p): Rename to nested_field_access_p. Support
3351 static fields and generalise to outer-to-inner class and sibling
3352 inner class accesses.
3353 (outer_field_expanded_access_p): Rename to
3354 nested_field_expanded_access_p and support static fields.
3355 (outer_field_access_fix): Rename to nested_field_access_fix and
3356 support static fields.
3357 (build_outer_field_access_expr): Rename to
3358 build_nested_field_access_expr and support static fields.
3359 (build_outer_field_access_methods): Rename to
3360 build_nested_field_access_methods and support static fields. For
3361 static fields, generate accessors without class instance parameters.
3362 (build_outer_field_access_method): Rename to
3363 build_nested_field_access_method and support static fields.
3364 (build_outer_method_access_method): Use
3365 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3366 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3367 (resolve_expression_name): Consider static field accesses across
3369 (resolve_qualified_expression_name): Likewise.
3370 (java_complete_lhs): Use nested_field_access_fix instead of
3371 outer_field_access_fix.
3372 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3373 Use nested_field_expanded_access_p instead of
3374 outer_field_expanded_access_p. Use nested_field_access_fix instead
3375 of outer_field_access_fix.
3376 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3377 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3379 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
3381 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
3382 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3383 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3384 MINOR_BINARYCOMPAT_ABI_VERSION): New.
3385 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3386 (parse_version): Calculate version ID using new method. Use bit-flags
3387 for flag_indirect_dispatch and flag_bootstrap_classes.
3389 2005-05-25 Richard Henderson <rth@redhat.com>
3392 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3393 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3394 DECL_CONTEXT; avoid pushdecl_top_level.
3395 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3396 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3397 (layout_class_method): Likewise.
3398 * decl.c (java_mark_cni_decl_local): New.
3399 (java_mark_class_local): Use it.
3400 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3401 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3402 (struct lang_decl_func): Add local_cni;
3403 (struct lang_decl_var): Add class_field, vtable.
3404 (java_mangle_decl): Declare.
3405 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3406 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3407 (mangle_obstack_1): New.
3408 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
3409 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
3410 lhd_set_decl_assembler_name for things that don't need mangling.
3411 (mangle_class_field): Rename from java_mangle_class_field, make
3412 static, don't call init_mangling or finish_mangling.
3413 (mangle_vtable): Similarly.
3414 (mangle_local_cni_method_decl): New.
3415 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
3416 gcc_assert, and MANGLE_RAW_STRING.
3417 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3419 2005-05-25 DJ Delorie <dj@redhat.com>
3421 * class.c (set_constant_value): Move warning control from if() to
3424 2005-05-24 Richard Henderson <rth@redhat.com>
3426 * builtins.c (define_builtin): Don't call make_decl_rtl.
3427 * constants.c (build_constant_data_ref): Likewise.
3428 * class.c (build_utf8_ref): Likewise.
3429 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3430 (get_dispatch_table, layout_class_method): Likewise.
3431 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3433 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3434 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3435 to determine if we need a non-zero address.
3436 * decl.c (builtin_function): Don't call make_decl_rtl.
3437 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3438 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3439 * resource.c (compile_resource_data): Likewise.
3440 * parse.y (resolve_field_access): Re-word comment to avoid
3443 2005-05-24 Richard Henderson <rth@redhat.com>
3445 * class.c (registered_class): Take it out of class_roots; turn into
3447 (register_class): Make static. Don't duplicate decl node. Use
3449 (emit_register_classes): Use VEC_iterate. Use output_constant
3450 instead of assemble_integer. Don't call mark_decl_referenced
3452 * java-tree.h (register_class): Remove decl.
3454 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
3458 * parse.y (register_package, package_list): Remove.
3459 (package_declaration): Do not call register_package.
3460 (do_resolve_class): Do not use package_list.
3462 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
3464 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3467 2005-05-15 Tom Tromey <tromey@redhat.com>
3470 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3473 2005-05-12 Aaron Luchko <aluchko@redhat.com>
3475 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
3477 2005-05-11 Tom Tromey <tromey@redhat.com>
3479 * gcj.texi (Code Generation): Document -fbootstrap-classes.
3480 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3481 (parse_version): Use it.
3482 * lang.opt (-fbootstrap-classes): New option.
3484 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
3487 * class.c (maybe_layout_super_class): Look for imports in this_class.
3488 * parse.h (ctxp_for_generation_last): New.
3489 (do_resolve_class): Add a parameter.
3490 * parse.y (ctxp_for_generation_last): New.
3491 (java_pop_parser_context): Add at end of list.
3492 (find_in_imports, find_in_imports_on_demand): Look in ctxp
3493 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
3494 the given type are NULL.
3495 (do_resolve_class): Look into the imports of the new second parameter.
3496 Adjust recursive calls.
3497 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3498 calls to do_resolve_class.
3499 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3500 (java_complete_class): Do not do that here.
3502 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
3505 * Make-lang.in (java): Add gjnih.
3506 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3507 (GJNIH_OBJS): New variable.
3508 (gjnih$(exeext)): New target.
3509 (JAVA_MANFILES): Add gjnih.1.
3510 (java.uninstall): Add gjnih.1.
3511 (java.mostlyclean): Add gjnih.
3512 (java.maintainer-clean): Add gjnih.1.
3513 (java/gjavah-jni.o): New target.
3514 (.INTERMEDIATE): Add gjnih.pod.
3515 (gjnih.pod): New target.
3516 * config-lang.in (stagestuff): Add gjnih.
3517 * gcj.texi (Top): Add gjnih node.
3518 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3519 -bootclasspath options.
3520 (Invoking gjnih): New node.
3521 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3522 (TOOLNAME): New macro.
3523 (error): Replace hard-coded gcjh with TOOLNAME.
3524 (process_file): Likewise.
3526 (version): Likewise.
3527 (help): Likewise. Add help output for -force, -old, -trace and -J
3529 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3530 (options): Add force, old, trace and J fields.
3531 (main): Handle -force, -old, -trace and -J options.
3533 2005-05-03 Tom Tromey <tromey@redhat.com>
3536 * gjavah.c (main): Unlink output file on error.
3538 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
3540 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3543 2005-04-29 Tom Tromey <tromey@redhat.com>
3545 * expr.c (build_jni_stub): Updated for change to build_block.
3547 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
3549 * expr.c (force_evaluation_order): Declare 'saved' earlier.
3551 2005-04-28 Andrew Haley <aph@redhat.com>
3554 * java-tree.h (soft_resolvepoolentry_node): New.
3555 (alloc_constant_fieldref): Declare.
3556 * expr.c (expand_java_field_op): Don't call class_init for
3557 accesses to static fields with indirect dispatch.
3558 * builtins.c (initialize_builtins): Add "__builtin_expect".
3559 * decl.c (soft_resolvepoolentry_node): New variable.
3560 (java_init_decl_processing): Create a decl for
3561 "_Jv_ResolvePoolEntry".
3562 * class.c (build_fieldref_cache_entry): New function.
3563 (build_static_field_ref): Rewrite for indirect dispatch.
3564 * constants.c (find_name_and_type_constant_tree): New function.
3565 (alloc_constant_fieldref): Likewise.
3566 (build_constants_constructor): Handle CONSTANT_Fieldref and
3567 CONSTANT_NameAndType.
3570 * expr.c (force_evaluation_order): Convert outgoing args smaller
3573 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
3575 * gcj.texi (libgcj Runtime Properties): Remove obsolete
3576 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
3577 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
3579 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3581 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
3582 to `unlock_stream' with `unlock_std_streams'.
3584 2005-04-25 Jakub Jelinek <jakub@redhat.com>
3586 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
3587 instead of just expr.h.
3589 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3591 * gjavah.c (main): Unlock the stdio streams.
3592 * jcf-dump.c (main): Likewise.
3593 * jv-scan.c (main): Likewise.
3594 * jvgenmain.c (main): Likewise.
3596 2005-04-23 DJ Delorie <dj@redhat.com>
3598 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
3599 parse.y: Adjust warning() callers.
3601 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
3603 * gcj.texi (Object fields): Change "Integer" to "Int" in example
3606 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
3608 * gcj.texi: Fix typos and bogus example.
3610 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
3612 * except.c: Fix a comment typo.
3614 2005-04-19 Julian Brown <julian@codesourcery.com>
3616 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
3617 indirect dispatch with PIC.
3619 2005-04-18 Andrew Haley <aph@redhat.com>
3621 * java-except.h (struct eh_range.handler): Remove unused field.
3622 (handle_nested_ranges): Remove function declaration.
3623 (sanity_check_exception_range): Add function declaration.
3624 * verify.c (verify_jvm_instructions): Remove call to
3625 handle_nested_ranges.
3626 * verify-glue.c (verify_jvm_instructions_new): Call
3627 sanity_check_exception_range.
3628 * except.c (link_handler, eh_range_freelist, link_handler,
3629 handle_nested_ranges): Remove.
3630 (add_handler): Rewrite.
3631 (sanity_check_exception_range): New function.
3632 (print_ranges): New function.
3634 2005-04-13 Julian Brown <julian@codesourcery.com>
3636 * decl.c (finish_method): Give methods once-only linkage.
3638 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
3640 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
3642 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3644 * java-tree.h: Don't use PARAMS().
3646 2005-04-07 Per Bothner <per@bothner.com>
3648 * class.c (push_class): By default, suppress debug output.
3649 (finish_class): Enable debug output for classes we're emitting.
3651 2005-04-07 Andrew Haley <aph@redhat.com>
3653 * gcj.texi: Correct gcj-dbtool instructions.
3655 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
3657 * gcj.texi: Fix a typo.
3658 * lang.c: Fix a comment typo.
3660 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
3662 * gcj.texi (Invoking gij): Add descriptions of new -X options.
3663 Mention recognized-and-ignored compatibility options.
3664 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
3666 (About CNI): Add Memory allocation section.
3668 2005-04-01 Tom Tromey <tromey@redhat.com>
3670 * decl.c (java_init_decl_processing): Fix types of
3671 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
3672 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
3673 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
3675 2005-03-31 Jan Hubicka <jh@suse.cz>
3677 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
3678 * class.c: Include cgraph.h
3679 (make_local_functoin_alias): Mark aslias as needed.
3680 * resource.c: Include cgraph.h
3681 (compile_resource_data): Go via cgraph interface.
3683 2005-03-30 Ian Lance Taylor <ian@airs.com>
3685 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
3687 2005-03-30 Tom Tromey <tromey@redhat.com>
3689 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
3690 inner_class_info_index==0 or outer_class_info_index==0.
3692 2005-03-29 Tom Tromey <tromey@redhat.com>
3694 * gcj.texi (libgcj Runtime Properties): Document
3695 gnu.gcj.runtime.endorsed.dirs.
3697 2005-03-24 Anthony Green <green@redhat.com>
3699 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
3702 2005-03-23 Tom Tromey <tromey@redhat.com>
3704 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
3705 (parse_version): Use it.
3707 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
3709 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
3711 2005-03-18 Andrew Haley <aph@redhat.com>
3714 * decl.c (update_aliases): Don't update variables that are about
3716 (maybe_poplevels): Add comment.
3718 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
3721 * jcf-parse.c (duplicate_class_warning): New function.
3722 (java_parse_file): Call duplicate_class_warning if
3723 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
3724 (parse_zip_file_entries): Likewise. Also set
3725 CLASS_FROM_CURRENTLY_COMPILED_P.
3727 2005-03-16 Andrew Haley <aph@redhat.com>
3729 * expr.c (expand_java_arrayload): Don't generate a
3730 NullPointerException based on the type of the node.
3731 (build_java_array_length_access): Likewise.
3733 2005-03-15 Zack Weinberg <zack@codesourcery.com>
3735 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
3737 2005-03-11 Tom Tromey <tromey@redhat.com>
3739 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
3740 (libgcj Runtime Properties): Document the default .db.
3742 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
3745 * parse.y (checks_throws_clauses): Check exceptions list even when
3746 the base class does not come from a source file being compiled.
3747 (java_complete_lhs): Remove unused variable 'wfl'.
3749 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
3752 * decl.c (finish_method): Emit _Jv_InitClass for private static
3753 methods inside inner classes as well.
3755 2005-03-08 Julian Brown <julian@codesourcery.com>
3756 * Revert patch from 2005-03-08 for causing bootstrap failure on
3759 2005-03-08 Julian Brown <julian@codesourcery.com>
3761 * decl.c (finish_method): Give methods once-only linkage.
3763 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
3765 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
3767 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
3769 * verify-glue.c (vfy_is_assignable_from): Perform static check using
3770 can_widen_reference_to if the C++ ABI is in use.
3771 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
3772 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
3773 type_isresolved, init_state, set_pc, state_get_pc,
3774 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
3775 (verify_fail): Report the current PC from the verifier context.
3776 (free_state): Remove #if 0 block to enable this function.
3777 (free_verifier_context): Call free_state on state_list iterator
3778 values before freeing them.
3779 * expr.c (pop_type_0): Pop correct type for error message when stack
3780 contains a multi-word type.
3782 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
3784 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
3785 for known NULL array length access.
3787 2005-03-07 Tom Tromey <tromey@redhat.com>
3789 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
3791 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
3793 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
3794 typeck.c: Update copyright.
3796 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
3799 * xref.c, xref.h: Remove file.
3800 * Make-lang.in (java/xref.o): Remove.
3801 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
3802 * lang.c (flag_emit_xref): Remove definition.
3803 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
3804 * typeck.c (convert): Remove use of do_not_fold.
3805 * parse.y (do_not_fold): Remove definition.
3806 (parser grammar): Remove xref code.
3807 (maybe_create_class_interface_decl, create_class): Likewise.
3808 (register_fields, method_header, finish_method_declaration): Likewise.
3809 (declare_local_variables, source_end_java_method): Likewise.
3810 (java_complete_expand_classes): Do not set do_not_fold.
3811 (java_complete_expand_method): Remove xref code.
3812 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
3813 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
3814 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
3815 (patch_synchronized_statement, patch_throw_statement): Likewise.
3816 (maybe_build_class_init_for_field): Likewise.
3818 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
3820 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
3821 instead of IS_NON_TYPE_CODE_CLASS.
3823 2005-03-04 Andrew Haley <aph@redhat.com>
3826 * class.c (set_method_index): Don't set method_index if it is
3828 (layout_class_method): Don't complain about "non-static method foo
3829 overrides static method" in the case of indirect dispatch.
3831 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3833 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
3835 * Make-lang.in: Don't elide warnings in jcf-io.c.
3837 2005-03-01 Per Bothner <per@bothner.com>
3840 * check-init.c (wfl): Remove static.
3841 (final_assign_error, check_init): Replace calls to parse_error_context
3843 (check_init): Save, set, and restore input_location for each exp.
3845 2005-03-01 Per Bothner <per@bothner.com>
3847 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
3848 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
3849 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
3851 2005-03-01 Per Bothner <per@bothner.com>
3853 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
3855 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
3858 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
3861 2005-02-22 Tom Tromey <tromey@redhat.com>
3864 * verify-impl.c (EITHER): New define.
3865 (types_compatible): Handle it.
3866 (check_field_constant): Use it.
3868 2005-02-18 Tom Tromey <tromey@redhat.com>
3871 * verify-impl.c (types_equal): Fixed test.
3874 * verify-glue.c (vfy_class_has_field): New function.
3875 * verify.h (vfy_class_has_field): Declare.
3876 * verify-impl.c (check_field_constant): Added 'putfield'
3878 (verify_instructions_0): Updated.
3879 (types_equal): New function.
3881 2005-02-14 Tom Tromey <tromey@redhat.com>
3884 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
3885 stack effect of multianewarray.
3887 2005-02-14 Andrew Haley <aph@redhat.com>
3890 * expr.c (expand_byte_code): Call promote_arguments().
3891 (promote_arguments): New function.
3892 * decl.c (check_local_unnamed_variable): Remove special case for
3894 (find_local_variable): Promote all boolean types to int
3895 when searching for local variable decls.
3897 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
3899 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
3900 parse-scan.y: Update copyright.
3902 2005-02-11 Per Bothner <per@bothner.com>
3905 * parse-scan.y (input_location): Remove variable.
3906 (main_input_filename): New - replaces input_filename, which isn't
3907 settable if USE_MAPPED_LOCATION.
3908 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
3909 so we don't reference input_location or wfl_operator in that case.
3910 * jv-scan.c (expand_location): Remove - no longer used.
3911 (main): Set main_input_filename rather than input_filename.
3913 2005-02-09 Richard Henderson <rth@redhat.com>
3915 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
3916 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
3918 2005-02-08 Marcin Dalecki <martin@dalecki.de>
3920 * expr.c (add_type_assertion): Use the proper enumeration type,
3921 since this is what htab_find_slot() is expecting.
3923 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
3925 * gcj.texi: Update copyright dates.
3927 2005-02-02 Tom Tromey <tromey@redhat.com>
3929 * gcj.texi (libgcj Runtime Properties): Default library_control
3932 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
3935 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
3936 (modifiers) when square brackets are present in a declaration for
3938 * jv-scan.c (main): Set input_filename and input_line.
3940 2005-02-01 Tom Tromey <tromey@redhat.com>
3943 * gjavah.c (get_field_name): Don't override name for JNI header.
3945 2005-02-01 Roger Sayle <roger@eyesopen.com>
3947 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
3948 of unsigned types using iushr and lushr JVM bytecodes.
3950 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
3953 * gjavah.c (jni_print_float): Do not emit floating-point
3954 initialiser for a static final field.
3955 (jni_print_double): Likewise.
3957 2005-02-01 Mark Mitchell <mark@codesourcery.com>
3960 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3961 * gjavah.c (print_field_info): Mark static data members of
3962 floating-point type with "__extension__".
3964 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3966 * gjavah.c (print_field_info): Mark static data members of
3967 floating-point type with "__extension__".
3969 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
3972 * parse.y (build_string_concatenation): Remove redundant if.
3973 (patch_conditional_expr): Attempt to patch_string() the condition
3974 of a ?: as well, in addition to its other operands.
3976 2005-01-25 Tom Tromey <tromey@redhat.com>
3978 * Make-lang.in (java/java-tree-inline.o): Removed.
3980 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
3983 * parse.y (patch_binop): Allow comparisons against NULL only
3984 if the other operand is of a reference type.
3986 2005-01-24 Tom Tromey <tromey@redhat.com>
3988 * java-tree.h (gcj_abi_version): Declare.
3989 * class.c (make_class_data): Push gcj_abi_version into "next"
3990 field. Renamed field.
3991 * decl.c (gcj_abi_version): New global.
3992 (parse_version): New function.
3993 (java_init_decl_processing): Call it. Renamed 'next' field.
3995 (GCJ_BINARYCOMPAT_ADDITION): New define.
3997 2005-01-24 Roger Sayle <roger@eyesopen.com>
4000 * jcf-write.c (generate_bytecode_insns): Conversions between
4001 integer types of the same precision shouldn't generate widening
4002 or narrowing conversion bytecodes.
4004 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
4006 * java-except.h, java-tree.h: Remove unused prototypes.
4008 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
4011 * jcf-write.c (perform_relocations): Don't call memcpy if source
4012 and destination are the same.
4014 2005-01-17 Tom Tromey <tromey@redhat.com>
4016 * verify-impl.c (get_short): Sign extend.
4017 (get_int): Likewise.
4019 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
4021 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4024 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4026 * verify.c: Revert to the version before the BC-ABI merge.
4028 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4031 * check-init.c (check_init): Take care of references that do not
4032 have an explicit final variable declaration (e.g. array length
4033 access) for pre/post in/de-crement operators.
4035 2005-01-08 Mark Wielaard <mark@klomp.org>
4037 * parse.y (process_imports): Allocate (and free) original_name only
4038 when not already defined.
4039 * jcf-parse.c (read_class): Free results of find_class() and
4041 (java_parse_file): Keep pointer to head of file_list and free when
4042 done. Free result of lrealpath().
4044 2005-01-05 Tom Tromey <tromey@redhat.com>
4046 * gcj.texi (Standard Properties): java.ext.dirs is now used.
4048 2004-12-20 Andrew Haley <aph@redhat.com>
4050 * typeck.c: Use fold_convert for ints and booleans.
4052 2004-12-17 Andrew Haley <aph@redhat.com>
4055 * typeck.c (convert): Use a CONVERT_EXPR when converting to
4056 BOOLEAN_TYPE or CHAR_TYPE.
4057 (convert_to_boolean, convert_to_char) : Remove.
4058 * convert.h (convert_to_boolean, convert_to_char) : Remove.
4059 * expr.c (expand_load_internal): Do type conversion if type is not
4062 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
4065 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4068 2004-12-07 Andrew Haley <aph@redhat.com>
4071 * jcf-parse.c (load_class): Remove sanity test for missing inner
4074 2004-12-06 Tom Tromey <tromey@redhat.com>
4076 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4077 (java.uninstall): Likewise.
4078 (java.maintainer-clean): Likewise.
4079 (.INTERMEDIATE): Likewise.
4080 (java.install-man): Likewise.
4081 (gcj-dbtool.pod): New target.
4082 * gcj.texi (Code Generation): Document -findirect-dispatch.
4083 (libgcj Runtime Properties): Document
4084 gnu.gcj.precompiled.db.path.
4085 (Top): Link to "Invoking gcj-dbtool".
4087 2004-12-06 Tom Tromey <tromey@redhat.com>
4090 * java-tree.h (extract_field_decl): Declare.
4091 * parse.y (extract_field_decl): Renamed from
4092 strip_out_static_field_access_decl. No longer static.
4093 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4095 2004-12-03 Tom Tromey <tromey@redhat.com>
4097 * lang.c (flag_new_verifier): Define.
4098 (java_post_options): Set flag_new_verifier if indirect dispatch
4100 * lang.opt (fnew-verifier): Removed.
4102 2004-12-03 Tom Tromey <tromey@redhat.com>
4105 * Make-lang.in (java.install-common): Only install transformed
4106 gcjh if gcj-cross exists.
4108 2004-12-03 Andrew Haley <aph@redhat.com>
4111 * except.c (link_handler): Patch 'outer' field of siblings of the
4112 range we're demoting.
4114 2004-12-03 Andrew Haley <aph@redhat.com>
4117 * class.c (layout_class_method): Don't fail to override a method
4118 simply because it has DECL_ARTIFICIAL set.
4120 2004-12-02 Tom Tromey <tromey@redhat.com>
4123 * parse.y (craft_constructor): Special case null_pointer_node.
4125 2004-12-02 Tom Tromey <tromey@redhat.com>
4128 * java-gimplify.c (java_gimplify_expr): Don't call
4129 SET_EXPR_LOCATION unless wrapped tree is an expression.
4131 2004-11-27 Per Bothner <per@bothner.com>
4133 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
4134 Fix fencepost error in 'i', which got executed one too many times.
4135 Also, fold memcpy into explicit loop, as originally intended.
4136 Also, free temporary 'buf' which otherwise leaks.
4138 2004-11-27 Per Bothner <per@bothner.com>
4140 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4141 local static variables if not USE_MAPPED_LOCATION.
4143 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
4145 * class.c, decl.c, expr.c: Fix comment typos.
4147 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
4150 * decl.c (end_java_method): Call
4151 attach_init_test_initialization_flags on all the init_decls.
4152 * parse.y (attach_init_test_initialization_flags): Move to ...
4153 * expr.c (attach_init_test_initialization_flags): here and
4154 support BIND_EXPR also.
4155 * java-tree.h (attach_init_test_initialization_flags): Prototype.
4156 * jcf-parse.c (parse_class_file): Don't disable class init
4159 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
4161 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4164 2004-11-24 Richard Henderson <rth@redhat.com>
4166 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4167 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4169 2004-11-24 Tom Tromey <tromey@redhat.com>
4171 * verify.c (defer_merging): Don't use C++-style comment.
4172 * verify.h (java_opcode): Added java_opcode_end.
4173 * class.c (build_class_ref): Remove C++ comment and old FIXME.
4175 * verify-impl.c (vfy_push_type): Removed bogus "return".
4176 (initialize_stack): Use vfy_alloc and vfy_free.
4177 (verify_instructions_0): Likewise.
4179 * Merged gcj-abi-2-dev-branch to trunk.
4181 2004-11-24 Andrew Haley <aph@redhat.com>
4183 * jcf-parse.c (parse_class_file): Set file_start_location.
4185 2004-11-10 Tom Tromey <tromey@redhat.com>
4187 * class.c (make_field_value): Don't call build_static_field_ref.
4188 (build_static_field_ref): Don't emit direct references when using
4191 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
4192 -verbose:class into man page synopsis.
4194 2004-11-09 Tom Tromey <tromey@redhat.com>
4196 * expr.c (build_java_arraystore_check): Still generate check if
4197 element type is itself an array.
4199 2004-11-08 Tom Tromey <tromey@redhat.com>
4201 * java-tree.h (soft_check_assignment_node): Removed.
4202 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4203 * decl.c (java_init_decl_processing): Don't initialize
4204 soft_check_assignment_node.
4206 2004-11-05 Tom Tromey <tromey@redhat.com>
4208 * class.c (layout_class_methods): Don't add Miranda methods when
4209 using indirect dispatch.
4211 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
4213 * class.c (make_class_data): Call emit_assertion_table to set the
4214 'assertion_table' field.
4215 (build_signature_for_libgcj): Move here from expr.c.
4216 (add_assertion_table_entry): New function. Callback for assertion
4217 hashtable traversal.
4218 (emit_assertion_table): New. Take class argument, and generate
4219 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4220 * decl.c (init_decl_processing): Define assertion_entry_type record.
4221 Push 'assertion_table' class field instead of 'verify'.
4222 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4223 (type_assertion_hash): Include 'assertion_code' in hash.
4224 (add_type_assertion): Rewritten. Take class and assertion_code
4225 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4226 (can_widen_reference_to): Use new add_type_assertion() arguments.
4227 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4228 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4229 (verify_identifier_node): Removed.
4230 (assertion_entry_type, assertion_table_type): New.
4231 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4232 assertion code definitions.
4233 (struct type_assertion): Add assertion_code. Rename 'source_type' and
4234 'target_type' to 'op1' and 'op2'.
4235 (add_type_assertion): Declare.
4236 (lang_printable_name_wls): Remove unused definition.
4237 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4238 to emit runtime assertion.
4239 (vfy_note_stack_type): Clean up non-C90 declarations.
4240 (vfy_note_local_type): Likewise.
4241 * verify.h (vfy_is_assignable_from): Declare.
4242 * verify-impl.c (is_assignable_from_slow): Remove unused function.
4243 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4244 instead of is_assignable_from_slow().
4245 (types_compatible): Reinstate ref_compatible() call.
4247 2004-11-04 Tom Tromey <tromey@redhat.com>
4249 * class.c (build_static_field_ref): Reverted previous patch.
4251 * class.c (build_static_field_ref): Don't emit direct references
4252 when using indirect dispatch.
4254 2004-11-03 Tom Tromey <tromey@redhat.com>
4256 * expr.c (expand_java_arrayload): Set lhs_type_node.
4257 (expand_java_arraystore): Set rhs_type_node.
4259 2004-11-02 Tom Tromey <tromey@redhat.com>
4261 * jcf-parse.c (compute_class_name): Use filename length from zip
4262 directory, not strlen.
4264 * expr.c (expand_invoke): Mark new interface methods as abstract.
4266 2004-11-01 Tom Tromey <tromey@redhat.com>
4268 * verify-impl.c (push_jump): Removed check for uninitialized
4270 (push_exception_jump): Likewise.
4271 (handle_ret_insn): Likewise.
4272 (handle_jsr_insn): Likewise.
4273 (state_check_no_uninitialized_objects): Removed.
4275 * decl.c (check_local_unnamed_variable): Recognize
4276 promoted-to-int parameters when using the new verifier.
4277 * expr.c (expand_java_arraystore): Explicitly request array type
4278 when using new verifier.
4279 (expand_java_arrayload): Likewise.
4280 (invoke_build_dtable): Don't pass object_type_node as
4281 expression argument to build_java_indirect_ref.
4282 (build_java_check_indexed_type): Do nothing.
4283 (build_java_arraystore_check): Handle case where array doesn't
4285 (build_java_array_length_access): Likewise.
4286 (expand_invoke): Handle case where interface overrides a method
4288 (pop_type_0): Always succeed for reference types.
4289 (process_jvm_instruction): Don't pop a value in a dead
4291 (pop_arguments): Convert arguments to correct types.
4293 2004-10-29 Andrew Haley <aph@redhat.com>
4295 * jcf-parse.c (give_name_to_class): Remove line that was
4298 2004-10-29 Andrew Haley <aph@redhat.com>
4300 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4302 2004-10-20 Andrew Haley <aph@redhat.com>
4304 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4306 2004-10-26 Tom Tromey <tromey@redhat.com>
4308 * verify.h (vfy_notify_verified): Removed.
4309 * verify-glue.c (vfy_notify_verified): Removed.
4311 2004-10-26 Tom Tromey <tromey@redhat.com>
4313 * verify-impl.c (debug_print_state): Declare `i' before code.
4314 (merge_types): Modify `t' when it is null_type.
4316 2004-10-26 Tom Tromey <tromey@redhat.com>
4318 * verify-impl.c (type_print): Renamed from print. Now static and
4320 (debug_print_state): Use type_print.
4322 2004-10-25 Tom Tromey <tromey@redhat.com>
4324 * expr.c (build_invokeinterface): Compute correct offset for
4325 index into interface methods.
4327 2004-10-20 Tom Tromey <tromey@redhat.com>
4329 * java-tree.h (verify_jvm_instructions_new): Declare.
4331 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4334 * verify-impl.c (verify_instructions): Correctly handle wide
4336 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4337 (vfy_get_component_type): Strip pointer types.
4338 (vfy_find_class): Use get_type_from_signature. Strip pointer
4340 Include java-except.h.
4342 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
4344 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4345 vfy_push_type_t, set_variable, add_new_state, merge_into,
4346 handle_jsr_insn, branch_prepass, check_class_constant,
4347 check_wide_constant, get_one_type, compute_static_types,
4348 verify_instructions_0): Clean up C99 declarations after statements.
4350 2004-10-20 Tom Tromey <tromey@redhat.com>
4352 * verify-impl.c (merge_refs): Compare reference against iterator,
4355 * verify-glue.c (vfy_tag): Mask off resolved flag.
4357 2004-10-19 Tom Tromey <tromey@redhat.com>
4359 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4360 (init_state_with_stack): Initialize `this_type' in state.
4361 (verify_method): Use debug_print.
4362 * verify-glue.c (vfy_is_primitive): Removed debugging print.
4363 (vfy_note_stack_depth): Reverted last patch.
4364 (vfy_note_stack_type): Note pointer to Object, not Object.
4365 (vfy_note_local_type): Likewise.
4367 * verify.h (vfy_note_instruction_seen): Declare.
4368 * verify-glue.c (verify_jvm_instructions_new): Set
4369 BCODE_EXCEPTION_TARGET on target instruction.
4370 (vfy_note_instruction_seen): New function.
4371 * verify-impl.c (FLAG_INSN_SEEN): New define.
4372 (verify_instructions_0): Set flag on instruction. Save state for
4374 (verify_instructions): Call vfy_note_instruction_seen.
4376 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4377 (verify_jvm_instructions_new): Call method_init_exceptions,
4378 add_handler, and handle_nested_ranges.
4379 * verify-impl.c (verify_method): Return 1 on success.
4380 (verify_instructions_0): Save the state at PC=0.
4382 * verify-impl.c (init_type_from_class): Set is_resolved and
4383 ref_next on new ref_intersection.
4384 (init_type_from_string): Likewise.
4386 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
4388 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4389 if flag_new_verifier is set.
4390 * java-tree.h (flag_new_verifier): Declare.
4391 * lang.opt (fnew-verifier): New option.
4392 * verify-impl.c: Work around namespace pollution by undef'ing
4394 (struct verifier_context): Make 'bytecode' const.
4395 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4396 (types_compatible): For the BC-ABI, always consider reference types
4398 (check_class_constant): Use vfr->current_class.
4399 (check_constant): Likewise.
4400 (check_wide_constant): Likewise.
4401 (check_field_constant): Check for 'L' at start of type name.
4402 (get_one_type): Return pointer instead of type. Set type result in
4403 caller via passed type pointer.
4404 (compute_argument_types): Update to use new get_one_type arguments.
4405 (compute_return_type): Likewise.
4406 (make_verifier_context): New. Allocate and initialize 'vfr'.
4407 (free_verifier_context): New. Free 'vfr' and its contents.
4408 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4409 and free_verifier_context.
4411 2004-10-15 Tom Tromey <tromey@redhat.com>
4413 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4414 * verify.h (vfy_fail): Fixed formatting.
4416 * verify-impl.c (vfr): Fixed comment formatting.
4417 (collapse_type): New function.
4418 (verify_instructions): Notify compiler about type map.
4419 * verify.h (vfy_note_stack_depth): Updated.
4420 (vfy_note_stack_type): Likewise.
4421 (vfy_note_local_type): Likewise.
4422 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4424 * verify-glue.c (vfy_note_stack_depth): Correctly size type
4425 state. Added `method' argument.
4426 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
4428 (vfy_note_local_type): New function.
4429 (vfy_unsuitable_type): Likewise.
4430 (vfy_return_address_type): Likewise.
4431 (vfy_null_type): Likewise.
4433 * verify.h (VFY_IN_GCC): Removed.
4434 (VFY_WANT_TYPEMAP): Removed.
4435 * verify-impl.c (verify_instructions_0): Removed useless "\".
4436 (struct state) <next>: Uncomment.
4438 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
4440 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
4443 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4445 * Make-lang.in (verify.o): Re-enabled this target.
4446 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4447 (vfy_get_interface): Likewise.
4448 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4449 * verify.h (verify_jvm_instructions_new): Declare.
4450 * verify-impl.c (free_state): Temporarily comment out unused
4453 2004-10-06 Tom Tromey <tromey@redhat.com>
4455 * java-tree.h (JV_STATE_READ): New enum value.
4457 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4459 * verify.h: New file.
4461 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
4463 * verify-impl.c, verify-glue.c, verify.h: New files.
4464 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4466 2004-09-24 Andrew Haley <aph@redhat.com>
4468 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4469 for a slot if it's of pointer type.
4471 2004-09-14 Tom Tromey <tromey@redhat.com>
4473 * class.c (make_class_data): Correctly initialize "state" field.
4474 Initialize "engine" field.
4475 * decl.c (java_init_decl_processing): Add "engine" field.
4477 2004-09-10 Andrew Haley <aph@redhat.com>
4480 * expr.c (build_invokeinterface): Use fast method for interface
4482 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4483 JTI_ITABLE_PTR_TYPE.
4484 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
4485 (emit_symbol_table): Add new arg, element_size.
4486 * decl.c (java_init_decl_processing): Initialize Class.itable.
4487 * class.c (GEN_TABLE): New macro.
4488 (gen_indirect_dispatch_tables): Use it. Add itable.
4489 (make_class_data): Add new arg for emit_symbol_table().
4491 (add_miranda_methods): Make sure search_class has been parsed.
4492 (emit_symbol_table): Add new arg, element_size.
4494 2004-09-06 Andrew Haley <aph@redhat.com>
4496 * verify.c (merge_types): Return Object for all merges of
4498 * expr.c (add_type_assertion): Don't generate assertions when
4499 source type is array of Object.
4501 2004-09-03 Andrew Haley <aph@redhat.com>
4503 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4505 * lang.c (java_post_options): Force flag_verify_invocations if
4506 we're not using indirect dispatch.
4508 * expr.c (pop_type_0): Move test for interfaces before call to
4509 can_widen_reference_to().
4510 (build_signature_for_libgcj): Remove generation of canonical array
4512 (add_type_assertion): Canonicalize both arrays.
4513 Don't assert that type X can be assigned to Object.
4514 Don't assert that type X an be assigned to type X.
4515 Don't assert that Object can be assigned to type X.
4516 (can_widen_reference_to): Warn whenever we generate an assertion.
4517 (process_jvm_instruction): Use throwable_type_node for the type of
4520 2004-09-01 Andrew Haley <aph@redhat.com>
4522 * decl.c (java_init_decl_processing): Change
4523 verify_identifier_node to "__verify".
4524 * expr.c (add_type_assertion): Use verify_identifier_node for name.
4525 * java-tree.h (verify_identifier_node): Change to "__verify".
4527 * expr.c (build_signature_for_libgcj): New function.
4528 (add_type_assertion): Use it to construct signatures for
4529 source_type and target_type.
4531 2004-08-27 Andrew Haley <aph@redhat.com>
4533 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4534 (verify_identifier_node): New.
4535 (TYPE_VERIFY_METHOD): New.
4536 (struct type_assertion): New type.
4537 * expr.c (type_assertion_eq): New function.
4538 (type_assertion_hash): New function.
4539 (add_type_assertion): New function.
4540 (can_widen_reference_to): Call add_type_assertion().
4541 * decl.c (java_init_decl_processing): Add verify_identifier_node.
4542 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4543 (finish_class): Output TYPE_VERIFY_METHOD (type).
4545 * decl.c (end_java_method): Nullify unused fields.
4547 2004-08-17 Andrew Haley <aph@redhat.com>
4549 * verify.c (defer_merging): Quieten.
4550 * jcf-parse.c (load_class): Only try to open a class file if it's
4551 java.lang.Object or if it's part of the current compilation.
4552 Check that the class we just tried to load is the class we just
4554 (java_parse_file): Set flag_verify_invocations off if we're
4555 compiling from .class.
4556 (parse_zip_file_entries): Abort if we try to read a dummy class.
4557 * expr.c (can_widen_reference_to): Quieten.
4558 (build_invokevirtual): Abort if we try to invokevirtual an
4560 (expand_invoke): Don't build a non-interface call to an interface.
4561 (build_instanceof): Don't do premature optimization if
4562 flag_verify_invocations is not set.
4563 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
4565 (build_static_field_ref): Add correct type conversion for
4567 (add_miranda_methods): Disable generation of Miranda methods for
4569 (layout_class_method): Don't complain about non-static method
4570 overrides static method with dummy classes.
4572 2004-08-13 Tom Tromey <tromey@redhat.com>
4574 * class.c (build_static_field_ref): Re-enable atable lookups for
4577 * parse.y (strip_out_static_field_access_decl): Indentation fix.
4579 2004-08-11 Tom Tromey <tromey@redhat.com>
4581 * gcj.texi (libgcj Runtime Properties): Document new properties.
4583 2004-08-06 Andrew Haley <aph@redhat.com>
4585 * jcf-parse.c (load_class): Check that we really have loaded the
4586 class we're looking for.
4588 2004-07-19 Andrew Haley <aph@redhat.com>
4590 * verify.c (verify_jvm_instructions): Comment change only.
4592 * typeck.c (build_java_array_type): Add size field to array name.
4594 * java-tree.h (LOCAL_SLOT_P): New.
4595 (update_aliases): Add PC argument.
4596 (pushdecl_function_level): New function.
4598 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4599 MODIFY_EXPR, and SAVE_EXPR.
4600 (java_gimplify_modify_expr): New function.
4602 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4603 (expand_iinc): Pass PC to update_aliases().
4604 (STORE_INTERNAL): Likewise.
4605 (process_jvm_instruction): Likewise.
4607 * decl.c (base_decl_map): New variable.
4608 (uniq): New variable.
4609 (update_aliases): Rewrite with more thorough checking.
4610 (debug_variable_p): New function.
4611 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
4612 (check_local_named_variable): Delete whole function.
4613 (initialize_local_variable): New function.
4614 (check_local_unnamed_variable): Add checks and comments.
4615 (find_local_variable): Rewrite.
4616 (java_replace_reference): New function.
4617 (function_binding_level): New variable.
4618 (pushdecl_function_level): New function.
4619 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4620 (maybe_pushlevels): Call pushdecl() on each of the new decls.
4621 (start_java_method): Reset uniq. Create base_decl_map. Set
4622 function_binding_level.
4623 (end_java_method): Null unused fields to save memory.
4625 2004-06-29 Andrew Haley <aph@redhat.com>
4627 * except.c (expand_start_java_handler): Push a new binding level.
4628 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
4629 register_exception_range() to register where we'll do it.
4630 (expand_end_java_handler): Remove old bogus code. Replace with
4631 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4632 the top of the expression we're curently building.
4633 (maybe_end_try): Delete.
4634 * decl.c (binding_level.exception_range): New field.
4635 (clear_binding_level): Add field exception_range. Reformat.
4636 (poplevel): Call expand_end_java_handler().
4637 (poplevel): Call java_add_stmt only if functionbody is false.
4638 (maybe_poplevels): Don't call maybe_end_try() from here.
4639 (end_java_method): Clear no longer used trees in function decl.
4640 (register_exception_range): New function.
4641 * java-tree.h (register_exception_range, struct eh_range): Declare.
4643 2004-06-22 Andrew Haley <aph@redhat.com>
4645 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
4647 * check-init.c (get_variable_decl): Teach check-init about
4648 FIELD_DECLs addressed via the otable.
4649 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
4652 2004-05-28 Andrew Haley <aph@redhat.com>
4654 * jcf-parse.c (load_class): Don't try to read a class that we've
4657 * expr.c (build_invokeinterface): Use the old-fashioned way of
4658 doing indirect dispatch: look up interfaces by name.
4659 * java-tree.h (enum java_tree_index): Add
4660 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
4661 * decl.c (java_init_decl_processing): Add
4662 soft_lookupinterfacemethodbyname_node.
4664 * gjavah.c (print_method_info): Final methods have vtable entries,
4665 so gjavah needs to output them.
4666 * class.c (layout_class_method): Generate vtable entries for final
4668 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
4669 dispatch, even if a method is final.
4671 2004-05-25 Andrew Haley <aph@redhat.com>
4673 * class.c (build_symbol_entry): Convert the names of constructors
4674 to init_identifier_node when generating an entry for the indirect
4677 * expr.c (build_known_method_ref): Generate indirect calls for
4678 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
4680 2004-05-24 Andrew Haley <aph@redhat.com>
4682 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
4683 atable element is of the right type.
4685 * class.c (build_static_field_ref): Cast pointer to correct type
4688 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
4690 * Merged with HEAD as of 20040514. Diff against
4691 gcj-abi-2-merge-20040514.
4693 2004-04-16 Andrew Haley <aph@redhat.com>
4695 * verify.c (check_pending_block): Disable subroutine checks.
4696 (defer_merging): New function.
4697 (merge_types): If types are dummy, use defer_merging to combine them.
4698 (verify_jvm_instructions): If invocation is invokeinterface and
4699 target is dummy, assume target really is an interface.
4701 * parse.y (patch_invoke): Break out call to java_create_object.
4703 * lang.c (flag_verify_invocations): New.
4705 * jcf-parse.c (load_class): If we've already failed to load a
4706 class, don't try again.
4707 (load_class): If we can't find a .class file, don't fail, but emit
4709 (parse_class_file): Don't act on dummy methods.
4711 * java-tree.h (flag_verify_invocations): New.
4713 (lang_type.dummy_class): New field.
4714 (java_create_object): New function.
4715 (METHOD_DUMMY): New.
4717 * expr.c (build_field_ref): Widen field offset.
4718 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
4719 that each of its elements is compatible with the one we're
4721 (pop_type_0): Issue a warning to say that we need to generate a
4723 (java_create_object): New function.
4724 (build_field_ref): Only generate hard refs if we're not using
4726 (expand_java_field_op): If we're using !verify_invocations and we
4727 see a missing field, generate a decl for it.
4729 (expand_invoke): If a class doesn't have the method we seek and
4730 we're using !flag_verify_invocations, generate a decl for the
4733 (build_known_method_ref): Always use indirect dispatch via the
4734 atable for static methods.
4736 (expand_java_NEW): Break out object creation into new function,
4739 (can_widen_reference_to): Issue a warning to say that we need to
4740 generate a runtime check.
4742 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
4743 (make_method_value): Also use index for interfaces.
4744 (make_class_data): Skip dummy field for inherited data.
4745 Don't build method array for dummy methods.
4746 Set size_in_byte to -1 when using inirect dispatch
4747 Don't build a hard class ref if we don't have a hard ref to our
4748 superclass, or if we're using inirect dispatch.
4749 Null out dispatch tables.
4751 (layout_class_method): Don't complain about non-static method
4752 overrides static method is method is artificial.
4754 (build_static_field_ref): Disable atable references to static
4755 fields for the time being.
4757 (layout_class_methods): Check for CLASS_INTERFACE as
4758 well as CLASS_ABSTRACT.
4760 2004-11-24 Steven Bosscher <stevenb@suse.de>
4762 * class.c (make_class_data): Don't check flag_inline_functions.
4763 * lang.c (flag_really_inline): Remove unused flag.
4764 (java_handle_option): Don't set it here. Remove special handling
4765 of flag_inline_functions for Java.
4766 (java_init): Don't set flag_inline_trees here. Already done...
4767 (java_post_options): ...here. Don't clear flag_inline_functions.
4769 2004-11-24 Steven Bosscher <stevenb@suse.de>
4771 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
4772 (java_gimplify_exit_block_expr): New function.
4773 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
4775 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
4776 (EXIT_BLOCK_EXPR): Likewise.
4777 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
4778 (LABELED_BLOCK_BODY): Likewise.
4779 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
4780 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
4781 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
4783 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
4784 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
4785 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
4786 second operand of EXIT_BLOCK_EXPR.
4787 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
4789 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
4791 2004-11-23 Ben Elliston <bje@au.ibm.com>
4793 * xref.h (xref_flag_value): Remove.
4794 (xref_set_data, xref_get_data): Likewise.
4795 (xref_set_current_fp): Likewise.
4796 (XREF_NONE): Likewise.
4797 (XREF_GET_DATA): Likewise.
4798 * xref.c (xref_flag_value): Remove.
4799 (xref_set_data, xref_get_data): Likewise.
4800 (xref_set_current_fp): Likewise.
4802 2004-11-23 Ben Elliston <bje@au.ibm.com>
4804 * gjavah.c (output_directory): Make static.
4805 (temp_directory): Likewise.
4807 2004-11-15 Tom Tromey <tromey@redhat.com>
4809 * decl.c (instn_ptr_type_node): Removed.
4810 (lineNumbers_ptr_type_node): Removed.
4811 (jint_type): Removed.
4812 (jint_ptr_type): Removed.
4814 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
4817 * check-init.c (check_init): Ignore DECL_EXPR.
4818 * expr.c (always_initialize_class_p): Reenable.
4819 (build_class_init): Use a variable to store the decl. Also use
4820 boolean_false_node instead of integer_zero_node.
4821 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
4824 2004-11-08 Tom Tromey <tromey@redhat.com>
4827 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
4828 generating a JNI header.
4829 (print_field_info): Handle JNI headers.
4830 (jni_print_float): Likewise.
4831 (jni_print_double): Likewise.
4833 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
4835 * decl.c (end_java_method): Remove duplicated code.
4837 2004-11-06 Zack Weinberg <zack@codesourcery.com>
4838 Gerald Pfeifer <gerald@pfeifer.com>
4840 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4843 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
4846 * class.c: Reinstate 2004-08-18 patch.
4847 (make_local_function_alias): Don't create an alias for extern (native)
4850 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
4853 * class.c (make_local_function_alias): Revert 2004-08-18 change.
4854 (make_method_value): Likewise.
4856 2004-10-21 Andrew Haley <aph@redhat.com>
4859 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4861 2004-10-20 Andrew Haley <aph@redhat.com>
4863 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4864 Remove duplicated code block.
4866 2004-10-18 Steven Bosscher <stevenb@suse.de>
4868 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
4869 New rules to work around old Bison warnings.
4871 2004-10-17 Steven Bosscher <stevenb@suse.de>
4873 * class.c (ident_subst): Always alloca buffer.
4874 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
4875 opcode after including javaop.def.
4876 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
4877 conditional expression that exits, to avoid warnings.
4878 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
4879 a user of an extension.
4880 * win32-host.c: Move check down to have non-empty file when
4881 WIN32 is not defined.
4883 * Make-lang.in (java-warn): Add STRICT_WARN.
4884 (java/jcf-io.o-warn): Don't have Werror for this file.
4885 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
4887 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
4889 * expr.c (expr_add_location): Move declaration to before all
4891 * parse.y (java_expand_classes): Ditto.
4892 * lex.c (java_peek_unicode): Ditto.
4894 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
4896 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
4897 if possible, else convert `foo' to 'foo'.
4898 * class.c: Likewise.
4901 * jcf-io.c: Likewise.
4902 * jcf-parse.c: Likewise.
4905 * parse.h: Likewise.
4907 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
4909 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
4910 rename parameter 'msg' to 'msgid' in function declaration.
4911 (issue_warning_error_from_context): Likewise.
4912 (yyerror): Rename parameter 'msg' to 'msgid'.
4913 (all over): Use new quoting style for diagnostics.
4915 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
4917 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
4918 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
4921 2004-10-14 Matt Austern <austern@apple.com>
4923 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
4926 2004-10-13 Tom Tromey <tromey@redhat.com>
4929 * lang.opt (--extdirs): Document.
4930 * jvspec.c (lang_specific_driver): Recognize -encoding and
4933 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
4935 * parse.y (issue_warning_error_from_context): Use va_list *
4936 instead of va_list parameter.
4937 (parse_error_context): Update call.
4938 (parse_warning_context): Likewise.
4940 2004-10-05 Zack Weinberg <zack@codesourcery.com>
4942 * parse.y, parse-scan.y: Add list of diagnostic messages to
4943 insulate translation template from version of yacc/bison used
4944 to compile the grammar.
4946 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
4948 Prepare for %q, %< and %> in diagnostic message strings.
4949 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
4950 Name second parameter 'msgid'.
4951 * parse.y: Additionally include pretty-print.h and diagnostic.h.
4952 (issue_warning_error_from_context): Use pretty-printer functions
4953 instead of vsprintf for constructing formatted messages. Rename
4954 parameter 'msg' to 'msgid'.
4955 (parse_error_context): Rename parameter 'msg' to 'msgid'.
4956 (parse_warning_context): Likewise.
4958 2004-10-05 Andrew Haley <aph@redhat.com>
4961 * jcf-parse.c (parse_zip_file_entries): If a class has a
4962 superclass and a TYPE_SIZE of zero, lay it out.
4964 2004-09-30 Andrew Haley <aph@redhat.com>
4967 * jcf-parse.c (compute_class_name): Rewrite.
4969 2004-10-01 Jan Hubicka <jh@suse.cz>
4971 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
4973 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
4975 * lex.c: Fix a comment typo.
4977 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
4979 * java-tree.h: Fix a comment typo.
4981 2004-09-30 Per Bothner <per@bothner.com>
4983 Simplify lexer. Implement --enable-mapped-location support.
4984 * jcf-parse.c (parse_class_file): Use linemap_line_start.
4985 (parse_source_file_1): Pass filename as extra parameter, so we can call
4986 linemap_add and set input_location here, rather than in both callers.
4987 (read_class): Pass copied filename to parse_source_file_1.
4988 Don't initialize wfl_operator - only needed for source compilation.
4989 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
4990 * lex.h: Remove a bunch of debugging macros.
4991 * lex.h (struct_java_line, struct java_error): Remove types.
4992 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
4993 (struct java_lc_s): Remove prev_col field.
4994 (struct java_lexer): New fields next_unicode, next_columns, and
4995 avail_unicode. New position field, and maybe token_start field.
4996 Don't need hit_eof field - use next_unicode == -1 instead.
4997 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
4998 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
4999 * parse.h: Various changes for USE_MAPPED_LOCATION.
5000 (EXPR_WFL_EMIT_LINE_NOTE): XXX
5001 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5002 (struct parser_ctxt): New file_start_location field.
5003 Remove p_line, c_line fields since we no longer save lines.
5004 Remove elc, lineno, and current_jcf fields - no longer used.
5005 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
5006 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5007 source_location and is probably not needed anymore anyway.
5008 Use new expr_add_Location function.
5009 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
5010 (java_pop_parser_context): Minor cleanup.
5011 (java_parser_context_save_global, java_parser_context_restore_global,
5012 java_pop_parser_context): Save/restore input_location as a unit.
5013 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
5014 a source_location instead of a wfl context node.
5015 (check_class_interface_creation): input_filename is not addressable.
5016 (create_artificial_method): Calling java_parser_context_save_global
5017 and java_parser_context_restore_global is overkill. Instead,
5018 temporarily set input_location from class decl.
5019 (java_layout_seen_class_methods): Set input_location from method decl.
5020 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5021 (finish_loop_body): Likewise.
5022 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
5023 (java_sprint_unicode): Take a character, not index in line.
5024 (java_sneak_uncode): Replaced by java_peek_unicode.
5025 (java_unget_unicode): No longer used.
5026 (java_allocate_new_line. java_store_unicode): Removed, since we
5027 no longer remember "lines".
5028 (java_new_lexer): Update for new data structures.
5029 (java_read_char): Move unget_value checking to java_read_unicode.
5030 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5031 efficient functions that are used directly when lexing.
5032 (java_read_unicode_collapsing_terminators): No longer needed.
5033 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5034 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5035 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
5036 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
5037 combine switch branches, and test for common token kinds earlier.
5038 (java_lex_error): Rewrite.
5039 * jv-scan.c (expand_location): New function, copied from tree.c.
5040 (main): Set ctxp->filename instead of setting input_filename directly.
5042 2004-09-30 Per Bothner <per@bothner.com>
5044 More cleanup for --enable-mapped-location.
5045 * class.c (push_class): If USE_MAPPED_LOCATION don't set
5046 input_location here. Instead do it in give_name_to_class.
5047 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5048 * expr.c (expand_byte_code): Call linemap_line_start.
5049 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
5050 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
5051 (expr_add_location): New function, if USE_MAPPED_LOCATION.
5052 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
5053 to USE_MAPPED_LOCATION case.
5055 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
5056 * jcf-parse.c (java_parse_file): Don't set input_filename.
5057 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5058 Create a list of TRANSLATION_UNIT_DECL.
5059 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
5060 reason is so we can set a DECL_SOURCE_LOCATION for each file.
5061 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5062 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5063 (file_start_location): New static.
5064 (set_source_filename): Avoid extra access to input_filename macro.
5065 Concatenate new name with class's package prefix.
5066 (set_source_filename, give_name_to_class): Update.
5067 (give_name_to_class): Set class's "line 0" input_location here.
5068 (parse_class_file): Set input_location as a unit.
5070 * jcf-parse.c (load_class): Sanity test if missing inner class file.
5072 2004-09-29 Per Bothner <per@bothner.com>
5074 * java-tree.h: Redefine some macros and add some declaration
5075 to handle the USE_MAPPED_LOCATION case.
5076 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
5077 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
5078 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5079 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5081 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5082 * decl.c (finish_method, java_add_stmt): Likewise.
5083 * java-gimplify.c (java-gimplify.c): Likewise.
5084 * jcf-write.c (generate_bytecode_insns): Likewise.
5085 * lang.c (java_post_options): Likewise - call linemap_add.
5087 2004-09-29 Andrew Haley <aph@redhat.com>
5090 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5091 result of TRUNC_MOD_EXPR.
5092 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5093 * decl.c (java_init_decl_processing): Mark
5094 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5096 2004-09-28 Tom Tromey <tromey@redhat.com>
5099 * class.c (add_miranda_methods): Load superinterface if not
5102 2004-09-28 Andrew Haley <aph@redhat.com>
5105 * jcf-parse.c (load_class): Don't try to read a class that we've
5108 2004-09-28 Andrew Haley <aph@redhat.com>
5110 * jcf-parse.c (load_class): Back out previous broken patch.
5112 2004-09-28 Andrew Haley <aph@redhat.com>
5115 * jcf-parse.c (load_class): Don't try to read a class that we've
5117 Check that we really did read the right class.
5119 2004-09-25 Tom Tromey <tromey@redhat.com>
5122 * parse.y (create_artificial_method): Use add_method_1.
5124 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
5126 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5128 * gcj.texi: Fix typos.
5130 2004-09-24 Tom Tromey <tromey@redhat.com>
5133 * parse.y (class_instance_creation_expression): Set `$$' to NULL
5134 in error parts of rule.
5135 (unary_expression): Don't call error_if_numeric_overflow when $1
5138 2004-09-24 Tom Tromey <tromey@redhat.com>
5141 * parse.y (resolve_qualified_expression_name): Set
5142 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5143 * expr.c (force_evaluation_order): Check for empty argument list
5144 after stripping COMPOUND_EXPR.
5146 2004-09-23 Andrew Haley <aph@redhat.com>
5149 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5152 2004-09-23 Tom Tromey <tromey@redhat.com>
5155 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5156 where operand is null.
5158 2004-09-23 Tom Tromey <tromey@redhat.com>
5161 * parse.y (not_accessible_p): Allow access to protected members
5162 even when class is not static.
5164 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
5166 * Make-lang.in: Revert the gcc-none.o change.
5168 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
5170 * parse.y (patch_anonymous_class): VEC_space returns true if there
5173 2004-09-21 Matt Austern <austern@apple.com>
5176 * gjavah.c (free_method_name_list): Fix function definition so
5177 it's a proper C prototype.
5179 2004-09-21 Tom Tromey <tromey@redhat.com>
5182 * gjavah.c (free_method_name_list): New method.
5185 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
5186 Zack Weinberg <zack@codesourcery.com>
5188 * java-tree.def: Use tree_code_class enumeration constants
5189 instead of code letters.
5190 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5191 new tree-class enumeration constants.
5193 2004-09-13 Tom Tromey <tromey@redhat.com>
5196 * class.c (layout_class_method): Put synthetic methods into the
5199 2004-09-11 Andrew Pinski <apinski@apple.com>
5201 * Make-lang.in (java/ggc-none.c): Change dependency
5202 for ggc.h into $(GGC_H).
5204 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5206 * Make-lang.in (java/win32-host.o): Add dependency on
5208 * win32-host.c: Add includes for coretypes.h, jcf.h
5210 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5212 * Make-lang.in (GCJH_OBJS): Change dependency from
5213 ggc-none.o to java/ggc-none.o
5214 (JCFDUMP_OBJS): Likewise.
5215 (java/ggc-none.o): New target.
5217 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
5219 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
5220 * class.c (build_utf8_ref, build_static_field_ref,
5221 make_field_value, make_method_value, get_dispatch_table,
5222 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5223 * constants.c (get_tag_node, build_ref_from_constant_pool,
5224 build_constants_constructor): Likewise.
5225 * decl.c (java_init_decl_processing): Likewise.
5226 * expr.c (build_java_array_length_access, build_newarray,
5227 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5228 build_java_binop, build_field_ref, expand_java_add_case,
5229 expand_java_call, build_known_method_ref, build_invokevirtual,
5230 build_invokeinterface, build_jni_stub): Likewise.
5231 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5232 * jcf-parse.c (get_constant): Likewise.
5233 * lex.c (do_java_lex): Likewise.
5234 * parse.y (patch_binop, patch_unaryop, patch_cast,
5235 build_newarray_node, patch_newarray): Likewise.
5236 * resource.c (compile_resource_data): Likewise.
5237 * typeck.c (build_prim_array_type): Likewise.
5239 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
5241 * decl.c (java_init_decl_processing): Adjust
5242 initialize_sizetypes call.
5244 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
5246 * jv-scan.c (fancy_abort): Add.
5248 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
5250 * expr.c (build_java_arrayaccess): Use convert to change
5253 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
5255 * class.c (make_local_function_alias): Allocate extra space for 'L'
5256 in name buffer. Reported by Thomas Neumann.
5258 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
5260 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5261 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
5262 * lex.c (do_java_lex): Adjust.
5263 (error_if_numeric_overflow): Likewise.
5265 2004-08-18 Andrew Pinski <apinski@apple.com>
5267 * class.c (make_local_function_alias): Only make a new decl if we
5268 support alias attribute on all decls.
5270 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
5272 * class.c (make_local_function_alias): New function. Create local
5273 alias for public method DECL.
5274 (make_method_value): Use make_local_function_alias.
5275 * parse.y (craft_constructor): Don't special-case anonymous classes.
5276 Always set ctor_name to init_identifier_node.
5277 (lookup_method_invoke): Call layout_class_method when creating
5278 anonymous class constructor.
5280 2004-08-18 Richard Henderson <rth@redhat.com>
5282 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5283 default case. Treat '<' similarly. Update for
5284 is_gimple_formal_tmp_var name change.
5286 2004-08-17 Andrew Haley <aph@redhat.com>
5288 * lang.c (lang_printable_name): Obey verbose flag.
5289 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5290 lang_printable_name().
5291 (verify_constructor_circularity, get_printable_method_name,
5292 check_abstract_method_definitions, java_check_regular_methods,
5293 java_check_abstract_methods, check_inner_class_access,
5294 fix_constructors, patch_method_invocation, patch_return):
5296 * expr.c (pop_type_0): Likewise.
5298 * java-tree.h (lang_printable_name_wls): Delete.
5300 2004-08-16 Tom Tromey <tromey@redhat.com>
5303 * parse.y (primary): Changed for initialized and uninitialized
5305 (array_access): Handle array_creation_initialized.
5306 (array_creation_expression): Split into
5307 array_creation_initialized and array_creation_uninitialized.
5309 2004-08-16 Andrew Haley <aph@redhat.com>
5311 * jcf-write.c (find_constant_index): Canonicalize NaNs when
5312 generating bytecode.
5314 2004-08-16 Elliot Lee <sopwith@redhat.com>
5317 * jcf-parse.c (java_parse_file): Handle filenames with embedded
5318 spaces, and quoted filelists.
5320 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
5322 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5323 * class.c (build_utf8_ref, build_static_field_ref,
5324 make_field_value, make_method_value, get_dispatch_table,
5325 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5326 * constants.c (get_tag_node, build_ref_from_constant_pool,
5327 build_constants_constructor): Likewise.
5328 * decl.c (java_init_decl_processing): Likewise.
5329 * expr.c (build_java_array_length_access, build_newarray,
5330 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5331 build_java_binop, build_field_ref, expand_java_add_case,
5332 expand_java_call, build_known_method_ref, build_invokevirtual,
5333 build_invokeinterface, build_jni_stub): Likewise.
5334 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5335 * jcf-parse.c (get_constant): Likewise.
5336 * lex.c (do_java_lex): Likewise.
5337 * parse.y (patch_binop, patch_unaryop, patch_cast,
5338 build_null_of_type, patch_newarray): Likewise.
5339 * resource.c (compile_resource_data): Likewise.
5340 * typeck.c (build_prim_array_type): Likewise.
5342 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
5344 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5345 Don't create BLOCK here or call java_gimplify_block.
5347 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
5349 * java-tree.h (flag_deprecated): Removed.
5350 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5351 * parse.y (check_deprecation): Check warn_deprecated instead of
5354 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
5356 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5357 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5358 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5359 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5360 flag_force_classes_archive_check, flag_optimize_sci,
5361 flag_indirect_dispatch): Remove explicit declarations.
5362 * lang.opt: Add implicit declare/define/assign. Remove obsolete
5365 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
5368 * Make-lang.in (java.install-man): Install from either build
5369 tree or source tree, whichever has the file first.
5371 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
5373 * jcf-parse.c (get_constant): Adjust force_fit_type call.
5374 * lex.h (SET_LVAL_NODE_TYPE): Remove.
5375 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5376 (do_java_lex): Likewise. Adjust force_fit_type call.
5378 2004-08-04 Roger Sayle <roger@eyesopen.com>
5379 Andrew Haley <aph@redhat.com>
5381 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5382 checking trees as they're being built.
5383 (convert): Call convert_ieee_real_to_integer if we're
5384 converting a constant, even if we're writing a class file.
5386 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
5389 * parse.y (fold_constant_for_init): Call resolve_field_access with
5390 correct current_class context.
5392 2004-08-01 Roger Sayle <roger@eyesopen.com>
5394 * decl.c (update_aliases, initialize_local_variable): Replace calls
5395 to build with calls to buildN.
5396 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5397 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5398 * parse.h (BUILD_THROW): Likewise.
5399 * parse.y (switch_expression, synchronized_statement,
5400 catch_clause_parameter, array_creation_expression,
5401 conditional_expression, make_qualified_name,
5402 resolve_qualified_expression_name, patch_method_invocation,
5403 patch_invoke, build_method_invocation, build_new_invocation,
5404 build_assignment, patch_assignment, build_binop, patch_binop,
5405 build_string_concatenation, build_incdec, patch_unaryop,
5406 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5407 patch_return, build_if_else_statement, build_labeled_block,
5408 build_new_loop, build_loop_body, build_bc_statement,
5409 build_assertion, encapsulate_with_try_catch, build_try_statement,
5410 build_try_finally_statement, patch_synchronized_statement,
5411 emit_test_initialization): Likewise, replace build with buildN.
5413 2004-07-28 Eric Christopher <echristo@redhat.com>
5415 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5416 (java_unsafe_for_reeval): Ditto.
5418 2004-07-26 <hp@bitrange.com>
5420 * parse.y (build_super_invocation): Adjust declaration order to
5421 avoid declaration after statement.
5423 2004-07-25 Bernardo Innocenti <bernie@develer.com>
5425 * decl.c: Rename all identifiers named `class' to `cl'.
5427 2004-07-25 Richard Henderson <rth@redhat.com>
5429 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5431 2004-07-23 Mike Stump <mrs@apple.com>
5433 * boehm.c (set_bit): Improve type safety wrt unsignedness.
5434 * gjavah.c (throwable_p, decode_signature_piece,
5435 print_full_cxx_name, print_include, add_namelet, add_class_decl,
5436 process_file): Likewise.
5437 * jcf-dump.c (main): Likewise.
5438 * jcf-io.c (read_zip_member): Likewise.
5439 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5440 give_name_to_class, get_class_constant): Likewise.
5441 * jcf-write.c (find_constant_wide, push_long_const,
5442 generate_classfile): Likewise.
5443 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5444 * parse.y (read_import_dir): Likewise.
5445 * typeck.c (parse_signature_type): Likewise.
5446 * verify.c (verify_jvm_instructions): Likewise.
5447 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5449 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
5451 * Make-lang.in: Replace rmic and rmiregistry references with
5452 grmic and grmiregistry.
5453 * gcj.texi: Likewise.
5455 2004-07-20 Andrew Haley <aph@redhat.com>
5458 * verify.c (verify_jvm_instructions): Comment change only.
5460 * typeck.c (build_java_array_type): Add size field to array name.
5462 * java-tree.h (LOCAL_SLOT_P): New.
5463 (update_aliases): Add PC argument.
5464 (pushdecl_function_level): New function.
5466 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5467 MODIFY_EXPR, and SAVE_EXPR.
5468 (java_gimplify_modify_expr): New function.
5470 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5471 (expand_iinc): Pass PC to update_aliases().
5472 (STORE_INTERNAL): Likewise.
5473 (process_jvm_instruction): Likewise.
5475 * decl.c (base_decl_map): New variable.
5476 (uniq): New variable.
5477 (update_aliases): Rewrite with more thorough checking.
5478 (debug_variable_p): New function.
5479 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5480 (check_local_named_variable): Delete whole function.
5481 (initialize_local_variable): New function.
5482 (check_local_unnamed_variable): Add checks and comments.
5483 (find_local_variable): Rewrite.
5484 (java_replace_reference): New function.
5485 (function_binding_level): New variable.
5486 (pushdecl_function_level): New function.
5487 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5488 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5489 (start_java_method): Reset uniq. Create base_decl_map. Set
5490 function_binding_level.
5491 (end_java_method): Null unused fields to save memory.
5493 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
5495 * class.c (add_interface_do): Remove.
5496 (set_super_info, interface_of_p, maybe_add_interface,
5497 add_interface, make_class_data, layout_class,
5498 add_miranda_methods): Adjust BINFO accessors and addition.
5499 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5501 * jcf-write.c (generate_classfile): Likewise.
5502 * parse.y (patch_anonymous_class, check_inner_circular_reference,
5503 check_circular_reference, java_complete_class,
5504 check_abstract_method_definitions,
5505 java_check_abstract_method_definitions,
5506 check_interface_throws_clauses, java_check_abstract_methods,
5507 lookup_java_interface_method2,
5508 find_applicable_accessible_methods_list): Adjust BINFO accessors
5510 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5512 2004-07-18 Roger Sayle <roger@eyesopen.com>
5514 * builtins.c (max_builtin, min_builtin,
5515 java_build_function_call_expr): Replace calls to build with buildN.
5516 * class.c (build_class_ref, build_static_field_ref,
5517 get_dispatch_table, make_class_data, layout_class_method): Likewise.
5518 * constants.c (build_ref_from_constant_pool): Likewise.
5519 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5520 add_stmt_to_compound): Likewise.
5521 * except.c (build_exception_object_ref, expand_end_java_handler):
5523 * java-gimplify.c (java_gimplify_case_expr,
5524 java_gimplify_default_expr, java_gimplify_block,
5525 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5526 * jcf-write.c (generate_bytecode_insns): Likewise.
5527 * typeck.c (convert_ieee_real_to_integer): Likewise.
5529 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
5531 * java-tree.h (builtin_function): Declare.
5533 2004-07-16 Steven Bosscher <stevenb@suse.de>
5535 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5536 abuse restore_line_number_status.
5538 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
5541 * jcf-parse.c (java_emit_static_constructor): Specify default
5544 2004-07-13 Per Bothner <per@bothner.com>
5546 * java-tree.h (all_class_filename): Remove useless macro.
5547 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
5548 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
5549 * parse.y (java_parser_context_restore_global): Replace
5550 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
5551 * jcf-parse.c (read_class, java_parse_file): Likewise.
5553 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
5556 gjavah.c (print_field_info): Emit constant only if field is static.
5558 2004-07-11 Roger Sayle <roger@eyesopen.com>
5560 * expr.c (java_truthvalue_conversion, flush_quick_stack,
5561 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
5562 build_java_ret, build_java_throw_out_of_bounds_exception,
5563 build_java_array_length_access, java_check_reference,
5564 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
5565 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
5566 expand_java_arrayload, build_java_monitor, expand_java_return,
5567 expand_load_internal, expand_java_NEW, build_get_class,
5568 build_instanceof, expand_java_CHECKCAST, expand_iinc,
5569 build_java_soft_divmod, build_java_binop, build_field_ref,
5570 expand_compare, expand_java_goto, expand_java_switch,
5571 expand_java_add_case, build_class_init, build_known_method_ref,
5572 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
5573 expand_invoke, build_jni_stub, expand_java_field_op,
5574 java_expand_expr, expand_byte_code, STORE_INTERNAL,
5575 force_evaluation_order, emit_init_test_initialization): Convert
5576 calls to "build" into calls to the prefered "buildN" functions.
5578 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
5580 * java-tree.h (set_block): Remove.
5581 * lang.c (java_clear_binding_stack): New.
5582 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5583 * decl.c (struct binding_level): Remove this_block.
5584 (clear_binding_level): Likewise.
5585 (poplevel): Don't handle this_block.
5586 (set_block): Remove.
5588 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
5590 * class.c (common_enclosing_context_p): Remove statement with no
5593 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
5596 * parse.y (create_anonymous_class): Remove 'location' argument. Use
5597 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
5598 (craft_constructor): Inherit access flags for implicit constructor
5599 from the enclosing class.
5600 (create_class): Fix comment typo.
5601 (resolve_qualified_expression_name): Pass type of qualifier to
5602 not_accessible_p, not the type in which target field was found.
5603 (not_accessible_p): Handle inner classes. Expand protected
5604 qualifier-subtype check to enclosing instances, but don't apply this
5605 check to static members. Allow protected access to inner classes
5606 of a subtype. Allow private access within common enclosing context.
5607 (build_super_invocation): Get WFL line number info from current
5609 (build_incomplete_class_ref): Update for new create_anonymous_class
5611 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
5612 common_enclosing_instance_p.
5613 * class.c (common_enclosing_context_p): New. Determine if types
5614 share a common enclosing context, even across static contexts.
5615 (common_enclosing_instance_p): Renamed from
5616 common_enclosing_context_p. Determines if types share a common
5617 non-static enclosing instance.
5618 * java-tree.h (common_enclosing_instance_p): Declare.
5619 * jcf-write.c (get_method_access_flags): New. Surpress private flag
5620 for inner class constructors.
5621 (generate_classfile): Use get_method_access_flags.
5623 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
5625 * class.c (interface_of_p): Check for null TYPE_BINFO.
5627 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
5629 * class.c (make_class): Do not create binfo here.
5630 (set_super_info): Create it here.
5631 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
5633 2004-07-08 Richard Henderson <rth@redhat.com>
5635 * expr.c (case_identity, get_primitive_array_vtable,
5636 java_expand_expr, emit_init_test_initialization): Remove.
5637 * java-tree.h (java_expand_expr): Remove.
5638 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
5640 2004-07-07 Per Bothner <per@bothner.com>
5642 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
5643 get internal error due to mismatched types.
5645 * gcj.texi (Invoking gij): Document new -verbose:class flag.
5647 * gcj.texi (Linking): New node. Document -lgij usage.
5649 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
5651 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
5652 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
5653 * java/class.c (set_super_info, class_depth, interface_of_p,
5654 maybe_add_interface, add_interface, make_class_data,
5655 layout_class, add_miranda_methods): Adjust BINFO macros.
5656 * expr.c (can_widen_reference_to, lookup_field): Likewise.
5657 * jcf-write.c (generate_classfile): Likewise.
5658 * parse.y (patch_anonymous_class,
5659 check_inner_circular_reference, check_circular_reference,
5660 java_complete_class, check_abstract_method_definitions,
5661 java_check_abstract_method_definitions,
5662 check_interface_throws_clauses, java_check_abstract_methods,
5663 lookup_java_interface_method2,
5664 find_applicable_accessible_methods_list): Likewise.
5665 * typeck.c (find_method_in_interface): Likewise.
5666 * verify.c (merge_types): Likewise.
5668 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
5670 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
5671 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
5673 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
5675 * class.c (make_class): Use make_tree_binfo.
5676 (set_super_info, add_interface_do): Likewise.
5677 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
5679 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
5681 * verify.c: Correct array element access formatting thinko.
5683 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
5685 * verify.c: Insert a short blurb at the start referring to the JVMS.
5686 (merge_type_state): Remove redundant nested if statement.
5687 (verify_jvm_instructions): Ensure current_subr is initialised to
5689 Minor formatting fixes all over the place.
5691 2004-07-02 Richard Henderson <rth@redhat.com>
5693 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
5695 2004-07-01 Richard Henderson <rth@redhat.com>
5697 * class.c (registerClass_libfunc): Remove.
5698 (init_class_processing): Don't set it.
5699 (emit_register_classes): Take list_p parameter. Fill it in
5700 with _Jv_RegisterClass calls.
5701 * decl.c (java_init_decl_processing): Don't call
5702 init_resource_processing.
5703 * jcf-parse.c (java_emit_static_constructor): New.
5704 (java_parse_file): Call it.
5705 * resource.c (registerResource_libfunc): Remove.
5706 (init_resource_processing): Remove.
5707 (write_resource_constructor): Take list_p parameter. Fill it in
5708 with _Jv_RegisterResource calls.
5709 * java-tree.h: Update prototypes.
5711 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
5714 * class.c (layout_class_method): Do not override package-private
5715 method if its in a different package.
5716 (split_qualified_name): Move here from parse.y. Rename from
5717 breakdown_qualified. Add comment.
5718 (in_same_package): Move here from parse.y. Add comment.
5719 * java-tree.h (break_down_qualified, in_same_package): Declare.
5720 (in_same_package): Likewise.
5721 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
5724 2004-06-29 Andrew Haley <aph@redhat.com>
5726 * except.c (expand_start_java_handler): Push a new binding level.
5727 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
5728 register_exception_range() to register where we'll do it.
5729 (expand_end_java_handler): Remove old bogus code. Replace with
5730 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5731 the top of the expression we're curently building.
5732 (maybe_end_try): Delete.
5733 * decl.c (binding_level.exception_range): New field.
5734 (clear_binding_level): Add field exception_range. Reformat.
5735 (poplevel): Call expand_end_java_handler().
5736 (poplevel): Call java_add_stmt only if functionbody is false.
5737 (maybe_poplevels): Don't call maybe_end_try() from here.
5738 (end_java_method): Clear no longer used trees in function decl.
5739 (register_exception_range): New function.
5740 * java-tree.h (register_exception_range, struct eh_range): Declare.
5742 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
5744 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
5746 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
5749 * expr.c (class_has_finalize_method): Fix method name indentation.
5750 (expand_java_call): Remove K&R style parameter declaration.
5751 (expand_invoke): Fix statement indentation.
5752 (expand_java_field_op): Likewise.
5753 * parse-scan.y: Fix typo.
5754 (reset_report): Fix method name indentation.
5755 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
5757 * verify.c (verify_jvm_instructions): Document parameters, insert
5759 * lang.c (lang_init_source): Fix method name indentation.
5760 * class.c (common_enclosing_context_p): Likewise.
5761 (emit_symbol_table): Fix parameter list indentation.
5762 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
5763 parameter declaration.
5764 * constants.c: Fix copyright notice indentation.
5765 * typeck.c (find_method_in_superclasses): Fix parameter list
5767 (find_method_in_interfaces): Likewise.
5768 * zextract.c (makelong): Fix method name indentation.
5770 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5773 * parse.y (create_interface): Set correct access modifiers for
5775 * jcf-write.c (get_classfile_modifiers): New function.
5776 (generate_classfile): Use get_classfile_modifiers, not
5779 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5781 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
5782 dependency to current parser context, not NULL_TREE, for top-level
5784 (jdep_resolve_class): Enable member access check for all inner
5787 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5789 * parse.y (qualify_and_find): Pass type decl, not identifier, to
5792 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5795 * expr.c (expand_java_field_op): Ensure that target class for static
5796 field access has been loaded.
5798 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5799 Ranjit Mathew <rmathew@hotmail.com>
5801 PR java/1207, java/16178
5802 * jcf-parse.c (load_class): Return immediately if passed a type decl
5803 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
5804 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
5805 before calling load_class.
5806 (qualify_and_find): Likewise.
5807 (find_in_imports_on_demand): Likewise.
5808 (find_applicable_accessible_methods_list): Likewise.
5810 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
5812 * parse.y (java_layout_seen_class_methods): Don't call load_class
5813 on class defined by source parser.
5815 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
5817 * parse.y (set_nested_class_simple_name_value): Removed.
5818 (java_complete_expand_class): Remove calls to
5819 set_nested_class_simple_name_value.
5821 2004-06-22 Andrew Haley <aph@redhat.com>
5822 Ranjit Mathew <rmathew@hotmail.com>
5824 Fixes PR java/16113.
5825 * decl.c (force_poplevels): Remove call to expand_end_bindings.
5827 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
5829 * parse.y (create_class): Correct diagnostic message about
5830 java.lang.Object extending anything else.
5832 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5834 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
5835 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
5836 * constants.c (build_ref_from_constant_pool): Likewise.
5837 * expr.c (build_java_array_length_access): Likewise.
5838 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
5839 (invoke_build_dtable, build_invokevirtual): Likewise.
5840 (build_invokeinterface, java_expand_expr): Likewise.
5841 (emit_init_test_initialization): Likewise.
5842 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5843 * parse.y (make_qualifed_name, build_array_ref): Likewise.
5845 2004-06-21 Andrew Haley <aph@redhat.com>
5847 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
5850 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
5852 * jcf.h (struct JCF): Change java_source, right_zip and finished
5854 * lex.h (struct java_lexer): Change hit_eof, read_anything,
5855 byte_swap and use_fallback to unsigned int.
5856 * parse.h (struct _jdep): Change flag0 to unsigned int.
5858 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
5861 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
5862 before trying to lay out its methods.
5863 * jcf-parse.c (read_class): Track parsed files using canonical paths
5864 obtained via lrealpath from libiberty.
5865 (java_parse_file): Likewise.
5866 (parse_source_file_1): Rename formal parameter to reflect its
5867 modified purpose. Minor formatting fix.
5869 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
5871 * class.c (emit_register_classes): Make the function uninlinable,
5872 do not set current_function_cannot_inline.
5873 * resource.c (write_resource_constructor): Do not reset
5874 flag_inline_functions around rest_of_compilation.
5876 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
5879 * expr.c (java_truthvalue_conversion): Handle
5880 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
5881 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
5882 i.e. return the expression.
5884 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
5886 * gjavah.c: Include version.h
5888 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
5890 * jcf-write.c (generate_bytecode_conditional): Correct handling
5891 of unordered conditionals. Add comment.
5893 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
5894 Per Bothner <per@bothner.com>
5896 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
5897 local variable was initialised upon declaration.
5898 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
5899 variable was final and initialised upon declaration.
5900 * check-init.c (check_final_reassigned): Give error only if a blank
5901 final is not definitely unassigned or if an initialised final is
5903 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
5904 assignment expressions. Remove case MODIFY_EXPR, label do_default.
5905 (check_init): Perform initialised-variable-removing-optimisation
5906 only on non-final local variables.
5908 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5910 * jcf-write.c (generate_bytecode_conditional): Handle binops
5911 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
5913 (generate_bytecode_insns): Likewise.
5915 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5917 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
5918 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
5920 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5922 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
5923 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
5925 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
5927 * decl.c (struct binding_level): Add GTY marker. Compile
5928 binding_depth unconditionally.
5929 (current_binding_level, free_binding_level, global_binding_level):
5931 (clear_binding_level): Unconditionally set binding_depth.
5932 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
5934 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
5936 * lex.c (java_new_lexer): Set 'encoding'.
5937 (java_read_char): Improve error message for unrecognized characters.
5938 * lex.h (struct java_lexer): New field 'encoding'.
5940 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
5942 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
5944 2004-05-21 Mark Wielaard <mark@klomp.org>
5946 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
5949 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
5951 * typeck.c: Remove non-printable character 160.
5953 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
5955 * check-init.c: Correct minor typos.
5957 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5959 * Make-lang.in, expr.c, java-gimplify.c: Rename
5960 tree-simple.[ch] to tree-gimple.[ch].
5962 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
5964 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
5966 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5968 Merge from tree-ssa-20020619-branch. See
5969 ChangeLog.tree-ssa for details.
5971 * Make-lang.in, builtins.c, check-init.c, class.c,
5972 constants.c, decl.c, except.c, expr.c, java-except.h,
5973 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
5974 lang.c, lang.opt, parse.y, resource.c: Merged.
5975 * java-gimplify.c: New file.
5977 2004-05-10 Andrew Haley <aph@redhat.com>
5979 * parse.y (create_class): Set TYPE_VFIELD.
5980 * decl.c (java_init_decl_processing): Likewise.
5982 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
5983 * class.c (make_method_value): Replace DECL_VINDEX with call to
5985 (get_dispatch_vector): Likewise.
5986 (layout_class_method): Likewise.
5987 Replace set of DECL_VINDEX with call to set_method_index().
5988 (set_method_index): New function.
5989 (get_method_index): New function.
5990 * java-tree.h (set_method_index): New function decl.
5991 (get_method_index): New function decl.
5993 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
5995 * parse.y (check_pkg_class_access): Add new argument
5996 and use it when cl is NULL to call lookup_cl on it.
5997 (parser_check_super_interface): Do not call lookup_cl.
5998 Pass this_decl to check_pkg_class_access and NULL
5999 instead of lookup_cl.
6000 (parser_check_super): Update for change in
6001 check_pkg_class_access.
6002 (do_resolve_class): Likewise.
6003 (process_imports): Likewise.
6004 (find_in_imports_on_demand): Likewise.
6005 (resolve_qualified_expression_name): Likewise.
6007 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
6009 Fixes PR java/9685, PR java/15073
6010 * parse.y (accessibility_string): New method.
6011 (not_accessible_field_error): Use accessibility_string()
6012 instead of java_accstring_lookup().
6013 (resolve_qualified_expression_name): Check with
6014 check_pkg_class_access() before allowing access using
6017 Use check_pkg_class_access() instead of not_accessible_p()
6018 for unqualified types.
6019 (not_accessible_p): Use DECL_CONTEXT (member) instead of
6020 REFERENCE for package-private access checking.
6021 (patch_method_invocation): Use accessibility_string() instead
6022 of java_accstring_lookup().
6024 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
6027 * gjavah.c (struct method_name): Add member is_native.
6028 (overloaded_jni_method_exists_p): Match candidate method only if
6030 (print_method_info): Initialise is_native flag from the method's
6033 2004-04-30 Roger Sayle <roger@eyesopen.com>
6035 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6036 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6038 2004-04-22 Roger Sayle <roger@eyesopen.com>
6040 * resource.c (write_resource_constructor): Guard call to possibly
6041 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6043 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
6045 * class.c (make_class_data): Add new field aux_info.
6046 * decl.c (java_init_decl_processing): Push type and decl for
6049 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6051 * expr.c (expand_java_NEW): Don't use size argument for
6052 _Jv_AllocObject calls.
6053 * parse.y (patch_invoke): Likewise.
6055 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6057 * expr.c (build_invokeinterface): Remove unused variables to
6060 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6062 * class.c (get_interface_method_index): New function. Return dispatch
6063 index for interface method.
6064 (make_method_value): For interface methods, set index field to
6065 iface dispatch index, not DECL_VINDEX.
6066 * expr.c (build_invokeinterface): Use get_interface_method_index.
6068 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6070 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6072 2004-03-31 Andrew Haley <aph@redhat.com>
6075 * jcf-io.c (opendir_in_zip): Tidy up error handling.
6077 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6079 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6080 form of GTY markers.
6082 2004-03-25 Marcus Meissner <meissner@suse.de>
6085 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6087 2004-03-23 Tom Tromey <tromey@redhat.com>
6090 * jcf-write.c (make_class_file_name): Don't report if mkdir
6093 2004-03-23 Tom Tromey <tromey@redhat.com>
6095 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6097 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
6099 * class.c, gjavah.c, lang.c: Fix comment typos.
6100 * gcj.texi: Fix typos.
6102 2004-03-19 Per Bothner <per@bothner.com>
6104 * gcj.texi (Code Generation): Document new flags and assert defaults.
6106 * class.c (assume_compiled_node_struct): Rename type to
6107 class_flag_node_struct, as it is now also used for enable_assertions.
6108 Rename assume_compiled_node typedef. Rename excludep field to value.
6109 (find_assume_compiled_node): Rename function to find_class_flag_node.
6110 Minor optimization - avoid needless strlen.
6111 (add_assume_compiled): Some tweaking and optimization.
6112 Rename and generalize to add_class_flag takem an extra parameter.
6113 (add_assume_compled): New just calls add_class_flag.
6114 (add_enable_assert, enable_assertions): New functions.
6115 (enable_assert_tree): New static.
6116 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6117 * lang.opt (fenable-assertions, fenable-assertions=,
6118 fdisable-assertions, fdisable-assertions=): New options.
6119 * lang.c (java_handle_option): Handle new options.
6120 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
6121 class in an interface - create helper class nested in outer interface.
6122 (build_assertion): Short-circuit if enable_assertions is false.
6124 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6126 * java-tree.h: Changes throughout to add checking to macros
6127 and numerous whitespace changes.
6128 (VAR_OR_FIELD_CHECK): New macro.
6129 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6130 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6132 2004-03-16 Per Bothner <per@bothner.com>
6134 * jcf-jump.c (options): New --print-constants option.
6135 * gcj.texi (Invoking jcf-dump): Document --print-constants.
6137 * jcf-dump.c (flag_print_constant_pool): Default to off.
6138 (print_constant_terse_with_index): New helper function.
6139 (various places): Check flag_print_constant_pool where missing.
6140 (main): If verbose set flag_print_constant_pool.
6141 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
6143 2004-03-15 Andrew Haley <aph@redhat.com>
6146 * parse.y (java_complete_lhs): Check that final variable has an
6149 2004-03-12 Andrew Haley <aph@redhat.com>
6152 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6155 2004-02-29 Roger Sayle <roger@eyesopen.com>
6157 * jcf-parse.c (java_parse_file): Handle the case that input_filename
6160 2004-02-27 Per Bothner <per@bothner.com>
6162 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
6163 suggestion: Use build_incomplete_class_ref.
6164 This fixes PR java/13508, java/11714.
6166 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
6168 * java/parse.h: Update copyright.
6170 2004-02-26 Andrew Haley <aph@redhat.com>
6173 * parse.y (check_interface_throws_clauses): Check for
6174 !METHOD_INVISIBLE (iface_method).
6175 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6176 well as CLASS_ABSTRACT.
6178 2004-02-25 Per Bothner <per@bothner.com>
6180 * parse.y (build_assertion): If we're in an inner class, create the
6181 class$ helper routine in the outer class.
6183 2004-02-19 Richard Henderson <rth@redhat.com>
6185 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6187 2004-02-16 Geoffrey Keating <geoffk@apple.com>
6189 * Make-lang.in (java.install-man): Add extra dependencies.
6191 2004-02-13 Geoffrey Keating <geoffk@apple.com>
6193 * Make-lang.in: Install man pages under the same names
6194 (possibly transformed) as the program they document.
6196 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
6198 * gjavah.c: Include "intl.h".
6199 (error): New function.
6200 (main): Call gcc_init_libintl.
6201 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6202 print_stub_or_jni, process_file, main): Use error rather than
6204 (print_method_info, usage, help, version, main): Mark strings for
6205 translation with _. Avoid splitting up sentences. Send
6206 information messages to stdout.
6207 * jcf-dump.c: Include "intl.h".
6208 (main): Call gcc_init_libintl.
6209 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6210 Mark error, usage and version messages for translation with _.
6211 Avoid splitting up sentences.
6212 * jv-scan.c: Include "intl.h".
6213 (fatal_error, warning): Change parameter s to msgid. Translate
6215 (main): Call gcc_init_libintl.
6216 (usage, help, version): Mark error, usage and version messages for
6217 translation with _. Avoid splitting up sentences.
6218 * jvgenmain.c: Include "intl.h".
6219 (main): Call gcc_init_libintl.
6220 (usage, main): Mark error messages for translation with _.
6221 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6222 JVGENMAIN_OBJS): Add intl.o.
6223 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6224 java/jvgenmain.o): Update dependencies.
6226 2004-02-08 Per Bothner <per@bothner.com>
6228 * parse.y (resolve_qualified_expression_name): In case of inaccessible
6229 class don't use not_accessible_field_error, which can get confused.
6231 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6233 Make-lang.in (po-generated): Delete.
6235 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6237 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6239 * decl.c: Include target.h.
6240 (start_java_method): Replace PROMOTE_PROTOTYPES with
6241 targetm.calls.promote_prototypes.
6242 * expr.c: Include target.h.
6243 (pop_arguments): Replace PROMOTE_PROTOTYPES with
6244 targetm.calls.promote_prototypes.
6245 * parse.y: Include target.h.
6246 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6247 with targetm.calls.promote_prototypes.
6249 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6251 * typeck.c: Update copyright.
6253 2004-02-02 Tom Tromey <tromey@redhat.com>
6255 * decl.c (java_init_decl_processing): Remove duplicate
6258 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
6260 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6262 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
6264 * expr.c (build_field_ref): Move variable
6267 2004-01-28 Andrew Haley <aph@redhat.com>
6269 * expr.c (build_field_ref): Widen field offset.
6271 2004-01-27 Andrew Haley <aph@redhat.com>
6274 * parse.y (check_interface_throws_clauses): Make sure class_decl
6277 2004-01-22 Jeff Sturm <jsturm@one-point.com>
6280 * parse.y (patch_assignment): Don't modify lhs_type for
6281 reference assignments.
6283 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6285 * Make-lang.in: Replace $(docdir) with doc.
6286 (java.info, java.srcinfo, java.man, java.srcman): New rules.
6287 (java.install-man): Revamp rule.
6289 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6291 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6292 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6293 instead of deferred backquote.
6295 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
6297 * typeck.c (find_method_in_interfaces): Move variable
6300 2004-01-16 Andrew Haley <aph@redhat.com>
6303 * typeck.c (shallow_find_method): New.
6304 (find_method_in_superclasses): New.
6305 (find_method_in_interfaces): New.
6306 (lookup_do): Rewrite.
6307 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6309 * jcf-parse.c (read_class): Save and restore output_class.
6310 * decl.c (java_expand_body): Set output_class from fndecl.
6312 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
6314 * class.c (gen_indirect_dispatch_tables): Fix string length
6317 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6319 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6320 (java.srcextra): Copy above back to source directory if requested.
6321 (po-generated): Delete reference to $(parsedir).
6322 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6325 2004-01-14 Jan Hubicka <jh@suse.cz>
6327 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6330 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6332 * java-tree.h (java_expand_expr): Change prototype.
6333 * expr.c (java_expand_expr): Add alt_rtl parameter.
6335 2004-01-09 Andrew Haley <aph@redhat.com>
6338 * parse.y (java_fix_constructors): Set output_class.
6339 (java_reorder_fields): Likewise.
6340 (java_layout_classes): Likewise.
6341 (java_expand_classes): Generate indirect dispatch tables.
6342 (java_expand_classes): Set output_class.
6343 (java_finish_classes): Likewise.
6344 * lang.c (java_init): Turn on always_initialize_class_p if we're
6345 using indirect dis[atch.
6346 (java_decl_ok_for_sibcall): Use output_class, not current_class.
6347 (java_get_callee_fndecl): Use class local atable.
6349 (always_initialize_class_p): Decl moved to java-tree.h.
6350 (HANDLE_CLASS_INFO): Set output_class.
6351 (read_class): Likewise.
6352 (parse_class_file): Call gen_indirect_dispatch_tables.
6353 (parse_zip_file_entries): Set output_class.
6354 (java_parse_file): Set output_class. Don't emit symbol tables.
6355 * java-tree.h (output_class): New.
6356 Remove global declarations for otable, atable, and ctable.
6357 (always_initialize_class_p): moved here from decl.c.
6359 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6360 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6361 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6362 (struct lang_type): Add otable_methods, otable_decl,
6363 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6364 ctable_decl, catch_classes, type_to_runtime_map.
6365 * expr.c (build_field_ref): Make otable, atable, and ctable class
6366 local rather than global.
6367 (build_known_method_ref): Likewise.
6368 (build_invokeinterface): Likewise.
6369 (java_expand_expr): Pass runtime type (rather than actual type) to
6371 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6372 this class. Look up each class in that map to delete duplicates.
6373 (expand_end_java_handler): Pass runtime type (rather than actual
6374 type) to expand_start_catch.
6375 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6377 (java_init_decl_processing): Rearrange things. Remove global
6378 declarations of otable, atable, and ctable.
6379 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6380 (java_expand_body): Set output_class.
6381 * constants.c (build_constant_data_ref): Use output_class, not
6383 (alloc_name_constant): Likewise.
6384 * class.c (gen_indirect_dispatch_tables): New.
6385 (build_class_ref): Generate hard reference to superclass, even if
6386 using indirect dispatch.
6387 (build_static_field_ref): Use class local atable.
6388 (make_class_data): Generate hard reference to superclass, even if
6389 using indirect dispatch.
6390 Generate symbolic references to interfaces when using indirect
6392 (make_class_data): Emit otable, atable, and ctable.
6393 Make otable, atable, and ctable class local rather than global.
6394 (emit_catch_table): Make otable, atable, and ctable class local
6397 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
6399 * parse.y (catch_clause_parameter): Fix typo.
6402 * parse.y: (catch_clause_parameter): Return early if $3, aka
6403 formal_parameter, is null.
6405 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
6407 * class.c: Remove uses of "register" specifier in
6408 declarations of arguments and local variables.
6411 * gjavah.c: Likewise.
6412 * jcf-dump.c: Likewise.
6413 * jcf-io.c: Likewise.
6414 * jcf-parse.c: Likewise.
6415 * jcf-write.c: Likewise.
6416 * keyword.h: Likewise.
6417 * parse.y: Likewise.
6418 * typeck.c: Likewise.
6419 * verify.c: Likewise.
6421 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
6423 * Make-lang.in (GCJ_CROSS_NAME): Delete.
6424 (java.install_common, java.install-man): Adjust for above.
6425 (java.uninstall): Likewise.
6427 2003-12-03 Michael Koch <konqueror@gmx.de>
6429 * class.c (make_class_data):
6430 Push field value to 'hack_signers' instead of 'signers'.
6431 * decl.c (java_init_decl_processing):
6432 Push field 'hack_signers' instead of 'signers'.
6434 2003-12-03 Zack Weinberg <zack@codesourcery.com>
6436 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6439 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
6442 * parse.y (qualify_ambiguous_name): Remove lots of broken
6443 field access processing - there's no need to do that here,
6444 because we have resolve_field_access. Remove
6445 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6446 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6449 2003-12-01 Jeff Sturm <jsturm@one-point.com>
6452 * parse.y (java_complete_lhs): Save location prior to patching
6455 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
6458 * resource.c (write_resource_constructor): Append
6459 "_resource" to constructor identifier name.
6461 2003-11-25 Jeff Sturm <jsturm@one-point.com>
6464 * constants.c (cpool_for_class): New function.
6465 (outgoing_cpool): Remove global variable.
6466 (alloc_name_constant): Use cpool_for_class.
6467 (build_constants_constructor): Likewise.
6468 * decl.c (java_expand_body): Set current_class.
6469 * java-tree.h (outgoing_cpool) Remove declaration.
6470 (init_outgoing_cpool): Likewise.
6471 * jcf-parse.c (init_outgoing_cpool): Remove function.
6472 (parse_class_file): Don't call init_outgoing_cpool.
6473 * parse.y (java_complete_expand_methods): Don't call
6474 init_outgoing_cpool. Don't save outgoing_cpool.
6475 (java_expand_classes): Don't restore outgoing_cpool.
6476 (java_finish_classes): Likewise.
6478 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
6480 * Make-lang.in: (java.install-common) Add
6481 symlink for $(target_noncanonical)-gcjh for
6484 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6486 * Make-lang.in (java.extraclean): Delete.
6488 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6490 * Make-lang.in (check-java): Add.
6492 2003-11-19 Jeff Sturm <jsturm@one-point.com>
6495 * except.c (prepare_eh_table_type): Allocate variable-sized
6496 buffer `buf' with alloca.
6498 2003-11-17 Jeff Sturm <jsturm@one-point.com>
6502 decl.c (java_init_decl_processing): Don't initialize
6503 class_not_found_type_node, no_class_def_found_type_node.
6505 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6506 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6507 (class_not_found_type_node, no_class_def_found_type_node):
6510 parse.y (build_dot_class_method_invocation): Add this_class
6511 argument. Qualify method invocations to a different class.
6512 (create_new_parser_context): Initialize saved_data_ctx to 0.
6513 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6514 (build_dot_class_method): Don't load classes. Register
6516 (build_incomplete_class_ref): Special cases for interfaces
6517 and inner classes. Move build_dot_class_method call to here...
6518 (patch_incomplete_class_ref): ...from here. Pass current_class
6519 to build_dot_class_method_invocation.
6520 (build_assertion): Pass class_type to
6521 build_dot_class_method_invocation.
6522 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6524 2003-11-17 Jeff Sturm <jsturm@one-point.com>
6527 * java-tree.h (BLOCK_EMPTY_P): Define.
6528 * parse.y (java_complete_lhs): Check for empty blocks
6529 in TRY_FINALLY_EXPR case.
6531 2003-11-17 Andrew Haley <aph@redhat.com>
6533 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
6534 (struct lang_decl_var:freed): New variable.
6535 * decl.c (poplevel): Mark local vars that have gone out of scope.
6536 (push_jvm_slot): Don't use the RTL of a var that has gone out of
6539 2003-11-16 Jason Merrill <jason@redhat.com>
6541 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6542 and TAGS files that include them for each front end.
6544 2003-11-15 Tom Tromey <tromey@redhat.com>
6546 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
6548 2003-11-12 Jason Merrill <jason@redhat.com>
6550 PR optimization/12547
6551 * lang.c (java_tree_inlining_walk_subtrees): Just walk
6552 BLOCK_EXPR_BODY directly.
6554 2003-11-12 Andrew Haley <aph@redhat.com>
6557 * parse.y (fold_constant_for_init): Check that we really do have a
6561 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
6562 init_test_decls being inlined.
6565 * parse.y (do_resolve_class): Check return value from
6566 breakdown_qualified().
6568 2003-11-11 Tom Tromey <tromey@redhat.com>
6571 * parse.y (merge_string_cste): Handle case where we have a
6572 pointer that happens to be zero, not null_pointer_node.
6574 2003-11-10 Tom Tromey <tromey@redhat.com>
6576 * jcf-parse.c (classify_zip_file): Correctly compare
6577 filename_length against length of manifest file's name.
6579 2003-11-08 Tom Tromey <tromey@redhat.com>
6582 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
6584 2003-11-06 Andrew Haley <aph@redhat.com>
6586 * expr.c (java_stack_swap): Make sure destination stack slots are
6587 of the correct type.
6589 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
6591 * Make-lang.in (dvi): Move targets to $(docobjdir).
6592 (gcj.dvi): Simplify rule and adjust target.
6593 (gcj.info): Simplify rule.
6594 (gcj.pod): New intermediate rule.
6595 (gcjh.pod): Likewise.
6596 (jv-scan.pod): Likewise.
6597 (jcf-dump.pod): Likewise.
6598 (gij.pod): Likewise.
6599 (jv-convert.pod): Likewise.
6600 (rmic.pod): Likewise.
6601 (rmiregistry.pod): Likewise.
6604 (jv-scan.1): Delete.
6605 (jcf-dump.1): Delete.
6607 (jv-convert.1): Delete.
6609 (rmiregistry.1): Delete.
6611 2003-11-02 Jeff Sturm <jsturm@one-point.com>
6613 Fixes PR java/12866.
6614 * parse.y (resolve_qualified_expression_name): Move test
6615 for outer field access methods from here...
6616 (check_thrown_exceptions) ...to here.
6618 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
6620 * .cvsignore: Delete.
6622 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
6624 * verify.c (verify_jvm_instructions): Don't warn about legal
6625 eh binding regions generated for example by jdk 1.4.1.
6627 2003-10-24 David S. Miller <davem@redhat.com>
6629 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
6631 2003-10-22 Andrew Haley <aph@redhat.com>
6633 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
6634 (java_get_callee_fndecl): New.
6636 * jcf-parse.c (java_parse_file): Call emit_catch_table().
6638 * java-tree.h (ctable_decl): New.
6639 (catch_classes): New.
6640 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
6642 * decl.c (java_init_decl_processing): Add catch_class_type.
6644 Add catch_classes field.
6646 * class.c (build_indirect_class_ref): Break out from
6648 (make_field_value): Check flag_indirect_dispatch.
6649 (make_class_data): Ditto.
6650 Tidy uses of PUSH_FIELD_VALUE.
6651 Add field catch_classes.
6652 (make_catch_class_record): New.
6654 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
6656 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
6658 * jcf-write.c: Follow spelling conventions.
6659 * parse.y: Likewise.
6661 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
6663 * ChangeLog: Fix typos.
6664 * expr.c: Fix comment typos.
6665 * jcf-write.c: Likewise.
6668 * mangle.c: Likewise.
6669 * parse-scan.y: Likewise.
6670 * parse.y: Likewise.
6672 2003-10-22 Tom Tromey <tromey@redhat.com>
6674 * expr.c (expand_byte_code): Only warn about dead bytecode when
6675 extra_warnings is set.
6677 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
6679 Fix for PR java/12586.
6680 * mangle.c (find_compression_record_match): Don't iterate through
6681 package namespace elements unless they all match compression_table
6684 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
6686 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
6687 (generate-manpages): Likewise.
6688 (java.maintainer-clean): Likewise.
6689 (gcj.info): Likewise.
6692 (jv-scan.1): Likewise.
6693 (jcf-dump.1): Likewise.
6695 (jv-convert.1): Likewise.
6697 (rmiregistry.1): Likewise.
6698 (java.install-man): Likewise.
6699 (parse-scan.o): Move and define complete compile line.
6700 (parse.o): Likewise.
6701 (jcf-tree-inline.o): Move.
6703 2003-10-20 Mark Mitchell <mark@codesourcery.com>
6705 * Make-lang.in (info): Update dependencies.
6706 (java.install-info): Remove.
6707 ($(srcdir)/java/gcj.info): Replace with ...
6708 ($(docobjdir)/gcj.info): ... this.
6710 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
6712 * Make-lang.in: Replace uses of $(target_alias) with
6713 $(target_noncanonical).
6715 2003-10-09 Tom Tromey <tromey@redhat.com>
6717 * decl.c (java_init_decl_processing): Declare signers field.
6718 * class.c (make_class_data): Set signers field.
6720 2003-10-09 Jason Merrill <jason@redhat.com>
6722 * parse.y (patch_assignment): Use make_node to create a BLOCK.
6723 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
6726 2003-10-06 Mark Mitchell <mark@codesourcery.com>
6728 * Make-lang.in (java.info): Replace with ...
6730 (java.dvi): Replace with ...
6732 (java.generated-manpages): Replace with ...
6734 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
6736 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
6738 2003-10-01 Andrew Haley <aph@redhat.com>
6740 * jcf-parse.c (java_parse_file): Write otable and atable.
6741 * java-tree.h (atable_methods): New.
6743 (atable_syms_decl): New.
6744 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
6745 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
6746 (symbol_*type): Rename method_symbol* to symbol*type.
6747 (emit_offset_symbol_table): Delete.
6748 (emit_symbol_table): New.
6749 (get_symbol_table_index): New.
6751 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
6752 (build_known_method_ref): Likewise.
6753 (get_symbol_table_index): Rename from get_offset_table_index.
6754 Parameterize to allow re-use by differing types of symbol table.
6755 (build_invokevirtual): Pass table to get_offset_table_index.
6756 * decl.c (java_init_decl_processing): Push types and decls for
6757 atable and atable_syyms.
6758 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
6759 (make_class_data): Add new fields atable and atable_syms.
6760 (emit_symbol_table): Rename from emit_offset_symbol_table.
6761 Parameterize to allow re-use by different types of symbol table.
6762 (build_symbol_entry): Renamed from build_method_symbols_entry.
6764 2003-09-30 Roger Sayle <roger@eyesopen.com>
6766 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
6767 semantics for SAVE_EXPR, by caching the result in a temporary.
6769 2003-09-28 Richard Henderson <rth@redhat.com>
6771 * check-init.c (check_init): Save and restore input_location
6772 instead of file and line separately.
6773 * decl.c (java_expand_body): Likewise.
6774 * jcf-write.c (generate_bytecode_insns): Likewise.
6775 * parse.y (safe_layout_class): Likewise.
6776 * jcf-parse.c (read_class, parse_class_file): Likewise.
6777 (java_parse_file): Use %H for warning locator.
6779 2003-09-28 Roger Sayle <roger@eyesopen.com>
6781 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
6782 with void-type branches instead of using a COMPOUND_EXPR.
6784 2003-09-28 Jeff Sturm <jsturm@one-point.com>
6786 * decl.c (java_optimize_inline, dump_function): Remove.
6787 * java-tree.h (java_optimize_inline): Remove declaration.
6788 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
6789 * parse.y (source_end_java_method, java_expand_classes):
6790 Likewise. Remove dead code.
6792 2003-09-27 Roger Sayle <roger@eyesopen.com>
6794 * lang.c (java_init_options): Set flag_evaluation_order.
6795 * expr.c (force_evaluation_order): Don't attempt to force
6796 evaluation order of binary operations using save_expr.
6797 * parse.y (java_complete_lhs): No longer need to call
6798 force_evaluation_order when constructing binary operators.
6800 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6801 Bryce McKinlay <bryce@mckinlay.net.nz>
6804 * parse.y (not_accessible_field_error): New function.
6805 (resolve_expression_name): Check field access permissions.
6806 (resolve_qualified_expression_name): Use
6807 not_accessible_field_error.
6808 (resolve_qualified_expression_name): Likewise.
6810 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6812 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
6814 2003-09-23 Roger Sayle <roger@eyesopen.com>
6816 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
6817 with equal operands without side-effects.
6819 2003-09-22 Jeff Sturm <jsturm@one-point.com>
6821 * decl.c (java_init_decl_processing): Don't emit otable decls
6822 if flag_indirect_dispatch is not set.
6824 2003-09-21 Richard Henderson <rth@redhat.com>
6826 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6829 2003-09-21 Richard Henderson <rth@redhat.com>
6831 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6832 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
6834 2003-09-20 Richard Henderson <rth@redhat.com>
6836 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
6838 2003-09-18 Roger Sayle <roger@eyesopen.com>
6840 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
6841 * check-init.c (check_init): Likewise.
6843 2003-09-18 Roger Sayle <roger@eyesopen.com>
6845 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
6847 2003-09-16 Andrew Haley <aph@redhat.com>
6849 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
6851 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
6854 * mangle.c (find_compression_record_match): Skip
6855 over a "6JArray" (the array template mangled string)
6857 (mangle_array_type): Correct minor typo.
6858 (atms): Move definition to the beginning.
6860 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
6862 * class.c (add_miranda_methods): Ensure super-interfaces are laid
6863 out. Fix for PR java/12254.
6865 2003-09-11 Richard Henderson <rth@redhat.com>
6867 * parse.y (source_end_java_method): Update for new
6868 cgraph_finalize_function argument.
6870 2003-09-09 Richard Henderson <rth@redhat.com>
6872 * parse.y (source_end_java_method): Update call to
6873 cgraph_finalize_function.
6875 2003-09-03 Jeff Sturm <jsturm@one-point.com>
6877 * decl.c (java_expand_body): New function.
6878 * expr.c (build_class_init): Set DECL_IGNORED_P.
6879 * java-tree.h (start_complete_expand_method,
6880 java_expand_body): Declare.
6881 * jcf-parse.c (cgraph.h): Include.
6882 (java_parse_file): Handle flag_unit_at_a_time.
6883 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
6884 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
6885 (java_estimate_num_insns): Use walk_tree_without_duplicates.
6886 (java_start_inlining): New function.
6887 * parse.h (java_finish_classes): Declare.
6888 * parse.y: Include cgraph.h.
6889 (block): Don't special-case empty block production.
6890 (craft_constructor): Set DECL_INLINE.
6891 (source_end_java_method): Handle flag_unit_at_a_time.
6892 Replace inline code with call to java_expand_body.
6893 (start_complete_expand_method): Remove static modifier.
6894 (java_expand_method_bodies): Patch function tree for
6895 class initialization and/or synchronization as needed.
6896 Don't begin RTL expansion yet.
6897 (java_expand_classes): Check flag_unit_at_a_time before
6898 calling finish_class.
6899 (java_finish_classes): New function.
6900 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
6901 (patch_assignment): Set DECL_CONTEXT on temporary variable.
6902 (emit_test_initialization): Set DECL_IGNORED_P.
6904 2003-09-03 Roger Sayle <roger@eyesopen.com>
6906 * builtins.c (enum builtin_type): Delete unused enumeration.
6907 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
6909 2003-08-28 Tom Tromey <tromey@redhat.com>
6911 * gcj.texi (Extensions): Document gcjlib URLs.
6913 2003-08-20 Tom Tromey <tromey@redhat.com>
6915 * gcj.texi (Extensions): Added xref.
6916 (libgcj Runtime Properties): Document
6917 gnu.gcj.runtime.VMClassLoader.library_control.
6919 2003-08-20 Andrew Haley <aph@redhat.com>
6921 * except.c (prepare_eh_table_type): Use new encoding for exception
6922 handlers when using -fno-assume-compiled.
6924 2003-08-13 Tom Tromey <tromey@redhat.com>
6926 * gcj.texi (Invoking gij): Document -X and -?.
6928 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
6930 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
6931 GCJH_OBJS, JCFDUMP_OBJS
6932 * win32-host.c: Removed the unnecessary and broken dependency
6935 2003-08-11 Tom Tromey <tromey@redhat.com>
6937 * parse.y (java_check_regular_methods): Typo fixes. Call
6938 check_interface_throws_clauses. Use
6939 check_concrete_throws_clauses.
6940 (check_interface_throws_clauses): New function.
6941 (check_concrete_throws_clauses): New function.
6942 (hack_is_accessible_p): New function.
6943 (find_most_specific_methods_list): Added FIXME.
6944 * typeck.c (lookup_do): Use `flags' argument to decide what to
6946 (lookup_argument_method_generic): New function.
6947 (lookup_argument_method2): Removed.
6948 * jcf.h (ACC_INVISIBLE): New define.
6949 * jcf-write.c (generate_classfile): Skip invisible methods.
6950 * class.c (add_miranda_methods): New function.
6951 (layout_class_methods): Use it.
6952 (get_access_flags_from_decl): Use ACC_INVISIBLE.
6953 * java-tree.h (METHOD_INVISIBLE): New define.
6954 (lang_decl_func) [invisible]: New field.
6955 (lookup_argument_method_generic): Declare.
6956 (SEARCH_INTERFACE): New define.
6957 (SEARCH_SUPER): Likewise.
6958 (SEARCH_ONLY_INTERFACE): Likewise.
6959 (SEARCH_VISIBLE): Likewise.
6960 (lookup_argument_method2): Removed declaration.
6962 2003-08-05 Tom Tromey <tromey@redhat.com>
6964 Fix for PR java/11600:
6965 * parse.y (java_complete_lhs): See whether we're calling a method
6967 (check_thrown_exceptions): Added `is_array_call' argument;
6968 fixed `clone' checking; updated all callers.
6970 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
6972 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
6974 2003-08-03 Tom Tromey <tromey@redhat.com>
6976 * java-tree.h (METHOD_TRANSIENT): Removed.
6977 * decl.c (pushdecl): Removed some dead code.
6978 * class.c (get_access_flags_from_decl): Can't have transient
6980 (add_method_1): Can't have a transient method.
6982 2003-07-28 Andreas Jaeger <aj@suse.de>
6984 * jvspec.c: Convert to ISO C90 prototypes.
6986 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
6988 * decl.c (force_poplevels): Fix warning call.
6990 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6992 * expr.c (expand_java_field_op): Don't use xxx_with_decl
6993 (expand_java_field_op): Likewise.
6994 * class.c (layout_class_method): Likewise
6995 (emit_register_classes): Likewise.
6996 * decl.c (pushdecl): Likewise.
6997 (poplevel): Likewise.
6998 (force_poplevels): Likewise.
6999 (give_name_to_locals): Likewise.
7000 * check-init.c (check_for_initialization): Likewise.
7002 2003-07-24 Jason Merrill <jason@redhat.com>
7004 * java-tree.h: Move boolean_type_node et al to the back end.
7006 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7008 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7011 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
7013 * lang.opt: Don't show -MD_ and -MDD_.
7015 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
7017 * lang-options.h: Remove.
7018 * lang.opt: Add help text.
7020 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
7022 * expr.c: Remove the last argument to expand_assignment().
7024 2003-07-09 Jan Hubicka <jh@suse.cz>
7026 * java-tree.h (DECL_NUM_STMTS): Rename to...
7027 (DECL_ESTIMATED_INSNS): ... this.
7028 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7029 New static functions.
7030 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7031 * parser.y (add_stmt_to_compound): Do not account statements.
7033 2003-07-08 Mark Wielaard <mark@klomp.org>
7035 * gcj.texi: CNI now expands to Compiled Native Interface.
7037 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7039 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7041 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
7043 * expr.c (expand_byte_code): Adjist emit_line_note call.
7045 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
7047 * lang.c (java_handle_option): Don't handle filenames.
7049 2003-07-02 Zack Weinberg <zack@codesourcery.com>
7051 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7054 * jcf-write.c: Don't default-define DIR_SEPARATOR.
7055 * jcf.h: Delete COMPARE_FILENAMES definition.
7057 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
7059 * lang.c (java_init_options): Update prototype.
7061 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
7063 * decl.c (poplevel): Adjust define_label call.
7065 2003-06-27 Zack Weinberg <zack@codesourcery.com>
7067 * gjavah.c (flag_jni): Make non-static.
7068 * parse-scan.y (ctxp): Make non-static.
7070 * class.c (build_method_symbols_entry)
7071 * expr.c (get_offset_table_index)
7072 * jcf-parse.c (jcf_parse):
7073 Mark the definition static, matching the forward declaration.
7075 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
7077 * lang.c (java_handle_option): Don't check for missing arguments.
7079 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
7081 * class.c (push_class): Use a location_t to save place.
7082 (emit_register_classes): Set input_location. Adjust
7083 expand_function_end call.
7084 * resource.c (write_resource_constructor): Likewise.
7085 * decl.c (end_java_method): Adjust expand_function_end call.
7086 * parse.y (source_end_java_method): Likewise.
7088 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
7090 * lang.c (java_handle_option): Likewise.
7092 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
7094 * lang.c (java_handle_option): Special-casing of optional
7095 joined arguments no longer needed.
7096 * lang.opt: Update switches that take optional argument.
7098 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7100 * lang.opt: Declare Java.
7101 * lang.c (java_init_options): Update.
7103 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7105 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7107 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7109 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7110 * lang.c (java_handle_option): -MD and -MMD have an underscore.
7111 * lang.opt: -MD and -MMD have an underscore.
7113 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
7115 * class.c (emit_register_classes): Adjust init_function_start
7117 * decl.c (complete_start_java_method): Likewise.
7118 * resource.c (write_resource_constructor): Likewise.
7120 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7122 * Make-lang.in: Update to use options.c and options.h.
7123 * lang.c: Include options.h not j-options.h.
7124 (java_handle_option): Abort on unrecognized option.
7125 (java_init_options): Request Java switches.
7127 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
7129 * Make-lang.in: Handle mostlyclean.
7131 2003-06-11 Tom Tromey <tromey@redhat.com>
7133 * lang.c (java_handle_option): Update dependency_tracking for
7136 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7139 2003-06-10 Andrew Haley <aph@redhat.com>
7141 * resource.c (write_resource_constructor): Use expand_expr to
7142 generate the address of the label attached to a resource.
7143 * Make-lang.in (java/resource.o): Add expr.h
7145 2003-06-10 Andrew Haley <aph@redhat.com>
7147 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7148 (java_decl_ok_for_sibcall): New.
7150 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
7152 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7153 (java/j-options.c, java/j-options.h): New.
7154 * java-tree.h (resource_name, compile_resource_file,
7155 compile_resource_data): Constify.
7156 * jcf-write.c (jcf_write_base_directory): Similarly.
7157 * jcf.h (jcf_write_base_directory): Similarly.
7158 * lang.c: Include j-options.h.
7159 (cl_options_count, cl_options, string_option, java_decode_option,
7160 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7161 process_option_with_no): Remove.
7162 (resource_name): Constify.
7163 (LANG_HOOKS_HANDLE_OPTION): Override.
7164 (java_handle_option): New.
7165 (java_init): Don't call jcf_path_init.
7166 (java_init_options): Call jcf_path_init.
7168 * resource.c (compile_resource_data, compile_resource_file): Constify.
7170 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
7172 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7173 (struct lang_decl_func): Add last_line field.
7174 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7175 DECL_SOURCE_LINE_LAST): Remove.
7176 * parse.y (missing_return_error, finish_method_declaration,
7177 lookup_cl, start_artificial_method_body, source_end_java_method,
7178 start_complete_expand_method): Adjust.
7180 2003-06-08 Tom Tromey <tromey@redhat.com>
7182 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7183 fno-assume-compiled.
7185 2003-06-08 Roger Sayle <roger@eyesopen.com>
7187 * builtins.c (define_builtin_type, builtin_types): Delete.
7188 (define_builtin): Rewritten to take just the built-in code,
7189 the function's name, type and fallback library function name.
7190 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7191 (initialize_builtins): Overhaul to define the GCC builtins
7192 used by gcj manually, providing the Java run-time's
7193 implementations as the fallback library function.
7195 2003-06-08 Anthony Green <green@redhat.com>
7197 * parse.y (patch_cast): Fix conversions from floating-point to
7200 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
7202 * Make-lang.in: Update.
7203 * lang.c: Include opts.h. Define cl_options_count and cl_options.
7205 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
7207 * lang.c (java_init_options): Update.
7209 2003-06-05 Jan Hubicka <jh@suse.cz>
7211 * Make-lang.in: Add support for stageprofile and stagefeedback
7213 2003-05-31 Roger Sayle <roger@eyesopen.com>
7215 * lang.c (java_init_options): Prescribe wrap-around two's
7216 complement arithmetic overflow by setting flag_wrapv.
7218 2003-05-29 Roger Sayle <roger@eyesopen.com>
7220 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7221 (builtin_record): Add an additional builtin_code field to
7222 record which GCC built-in corresponds to the Java function.
7223 (java_builtins): Add new entries for atan, atan2, exp, log,
7225 (max_builtin, min_builtin, abs_builtin): Perform constant
7226 folding on the resulting tree.
7227 (java_build_function_call_expr): Likewise, perform constant
7228 folding on the resulting tree.
7229 (initialize_builtins): The NULL creators are now allowed in
7230 the java_builtins table, which is now terminated by an entry
7231 with builtin_code == END_BUILTINS.
7232 (check_for_builtin): Likewise. If the matching creator is
7233 NULL, construct the call using java_build_function_call_expr
7234 directly with the decl for the corresponding builtin_code.
7236 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
7238 * win32-host.c: Normalize copyright boilerplate.
7240 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7242 * parse.y (print_int_node): Use string concatentation on
7243 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7244 function calls into one.
7246 2003-05-13 Zack Weinberg <zack@codesourcery.com>
7248 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7249 fatal_io_error with calls to fatal_error; add ": %m" to the end of
7250 all the affected error messages.
7252 2003-05-13 Richard Henderson <rth@redhat.com>
7254 * class.c (layout_class_method): Set DECL_EXTERNAL.
7255 * decl.c (java_mark_decl_local, java_mark_class_local): New.
7256 * java-tree.h (java_mark_class_local): Declare.
7257 * jcf-parse.c (parse_class_file): Use it.
7258 * parse.y (java_expand_classes): Likewise.
7260 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
7262 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7263 * lex.h: #include input.h.
7264 * jv-scan.c (input_filename): Remove.
7266 2003-05-02 Tom Tromey <tromey@redhat.com>
7269 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7270 (handle_inner_classes): New function.
7272 2003-05-01 Tom Tromey <tromey@redhat.com>
7275 * parse.y (finish_for_loop): Do nothing if update expression is a
7276 EXPR_WFL_NODE wrapping nothing.
7277 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7279 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
7281 * lex.h (input_lineno): Remove declaration.
7282 * parse-scan.y: #include input.h.
7283 (input_filename): Remove declaration.
7284 (input_location): Add definition.
7285 (input_line): Remove definition.
7287 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
7289 * lex.h (lineno): Rename to ...
7290 (input_line): ... here
7291 * parse-scan.y (lineno): Rename to ...
7292 (input_line): ... here.
7293 (reset_report): Rename lineno to input_line.
7294 * check-init.c (check_init): Likewise.
7295 * class.c (push_class): Likewise.
7296 * decl.c (complete_start_java_method, end_java_method): Likewise.
7297 * expr.c (expand_byte_code): Likewise.
7298 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7299 * jcf-write.c (generate_bytecode_insns): Likewise.
7300 * lex.c (java_init_lex, java_allocate_new_line,
7301 do_java_lex): Likewise.
7302 * parse.h (YYNOT_TWICE): Likewise.
7303 * parse.y (empty_statement, expression_statement,
7304 java_pop_parser_context, java_parser_context_save_global,
7305 yyerror, register_fields, method_header, safe_layout_class,
7306 find_in_imports_on_demand, create_artificial_method,
7307 source_end_java_method, start_complete_expand_method,
7308 build_thisn_assign, java_complete_lhs,
7309 maybe_absorb_scoping_block): Likewise.
7311 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
7313 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7314 '/' when computing java source filename
7316 2003-04-13 Tom Tromey <tromey@redhat.com>
7318 * gjavah.c (print_c_decl): Indentation fix.
7320 2003-04-12 Zack Weinberg <zack@codesourcery.com>
7322 * class.c (make_field_value, make_method_value, get_dispatch_table)
7323 (make_class_data, emit_offset_symbol_table)
7324 * constants.c (build_constants_constructor)
7325 * java-tree.h (START_RECORD_CONSTRUCTOR)
7326 * parse.y (maybe_build_array_element_wfl):
7327 Use build_constructor.
7329 2003-04-10 Eric Blake <ebb9@email.byu.edu>
7332 * parse.y (string_convert_int_cst): Always use at least one digit
7333 in string conversion. Remove ASCII dependence.
7334 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7336 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
7338 * Make-lang.in: added win32-host.c
7339 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7340 resolves to open() on non-Win32 platforms and
7341 Win32-specific jcf_open_exact_case() on Win32
7342 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7343 when trying .java and .class files
7344 * win32-host.c: added to repository. Defines
7345 Win32-specific jcf_open_exact_case()
7347 2003-04-10 Andrew Haley <aph@redhat.com>
7349 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7350 (maybe_free_localvar): Renamed from localvar_free.
7351 Add new arg, really.
7352 (generate_bytecode_insns): Set new variable, jsrs.
7353 Only free local vars if no jsr insns have been emittted.
7354 Call maybe_free_localvar, not localvar_free.
7356 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
7358 * gcj.texi: Remove @ at start of file.
7360 2003-03-25 Tom Tromey <tromey@redhat.com>
7362 * parse.y (create_interface): Call CHECK_DEPRECATED.
7364 2003-03-23 Zack Weinberg <zack@codesourcery.com>
7366 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7368 2003-03-21 Zack Weinberg <zack@codesourcery.com>
7370 * javaop.h (jfloat, jdouble): Make them structures mirroring
7371 the bit fields of IEEE float and double respectively.
7372 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7373 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7374 (union Word, union DWord): Delete.
7375 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7377 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7378 D_NAN_MASK): Delete.
7379 (jni_print_float, jni_print_double): New. Generate
7380 hexadecimal floating constants.
7381 (print_field_info): Use jni_print_float/double.
7383 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
7384 finite floating point numbers for output; special case
7387 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
7389 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7390 Replace 0 and 1 with true and false in return statements.
7392 2003-03-19 Tom Tromey <tromey@redhat.com>
7394 * lex.c (do_java_lex): Renamed from java_lex.
7395 (java_lex): New function.
7398 2003-03-13 Tom Tromey <tromey@redhat.com>
7400 * parse.y (resolve_inner_class): Error if qualifier is a primitive
7403 2003-03-04 Andrew Haley <aph@redhat.com>
7405 * gjavah.c (is_first_data_member): New global variable.
7406 (print_c_decl): If it's the first data member, align it as the
7408 (process_file): Set is_first_data_member.
7410 2003-03-11 Tom Tromey <tromey@redhat.com>
7412 * parse.y (resolve_field_access): Initialize class if field is
7413 found in another static field.
7414 * expr.c (build_class_init): Don't optimize out initialization of
7415 implemented interface.
7417 2003-03-11 Andrew Haley <aph@redhat.com>
7419 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7422 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
7424 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7425 and DIR_SEPARATOR_2 for a target.
7426 Correct minor typos.
7428 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7429 and DIR_SEPARATOR_2 for a target into account.
7431 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
7433 * lang.c (java_init): Update prototype, move code to java_post_options.
7434 (java_post_options): Similarly.
7436 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
7438 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7439 compare file name components depending on the case-sensitivity
7440 or otherwise of the host file system.
7442 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7443 "strcmp" to compare file name components.
7444 Use IS_DIR_SEPARATOR instead of comparing directly against
7446 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
7447 comparing directly against DIR_SEPARATOR.
7449 2003-03-04 Tom Tromey <tromey@redhat.com>
7451 * Make-lang.in (java.tags): New target.
7453 2003-03-01 Roger Sayle <roger@eyesopen.com>
7455 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7456 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7458 2003-03-01 Tom Tromey <tromey@redhat.com>
7460 * parse.y (jdep_resolve_class): Only check deprecation if we found
7463 2003-02-28 Tom Tromey <tromey@redhat.com>
7466 * class.c (maybe_layout_super_class): Always pass a WFL to
7468 * parse.y (do_resolve_class): Updated comment to explain
7471 2003-02-26 Tom Tromey <tromey@redhat.com>
7473 * jcf-write.c (generate_classfile): Check whether class is
7474 deprecated before writing attribute count.
7476 2003-02-25 Roger Sayle <roger@eyesopen.com>
7478 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7479 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
7481 2003-02-23 Tom Tromey <tromey@redhat.com>
7483 * lang-options.h: Added -Wdeprecated.
7484 * gcj.texi (Warnings): Document -Wdeprecated.
7485 * java-tree.h (flag_deprecated): Declare.
7486 * lang.c (lang_W_options): Added deprecated.
7487 (flag_deprecated): New global.
7488 * chartables.h: Rebuilt.
7489 * gen-table.pl (process_one): Look at whitespace.
7490 (print_tables): Define LETTER_SPACE, LETTER_MASK.
7491 * parse.h (CLEAR_DEPRECATED): New macro.
7492 (CHECK_DEPRECATED_NO_RESET): New macro.
7493 * jcf-parse.c (handle_deprecated): New function.
7494 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
7495 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7496 * parse.y (resolve_type_during_patch): Check deprecation.
7497 (jdep_resolve_class): Likewise.
7498 (process_imports): Likewise.
7499 (resolve_expression_name): Likewise.
7500 (check_deprecation): Strip arrays from decl. Check
7502 (patch_method_invocation): Also check the particular constructor
7504 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7505 * jcf-write.c (append_deprecated_attribute): New function.
7506 (generate_classfile): Generate deprecated attribute when
7508 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
7509 (java_lex) [case '*']: Simplify logic.
7510 (java_start_char_p): Use LETTER_MASK.
7511 (java_part_char_p): Likewise.
7512 (java_space_char_p): New function.
7514 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
7516 Change base class access representation.
7517 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7518 (add_interface_do): Likewise.
7520 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
7522 * decl.c (java_init_decl_processing): Change
7523 soft_lookupjnimethod_node to reflect the change in
7524 signature of _Jv_LookupJNIMethod in libjava/jni.cc
7525 * expr.c (build_jni_stub): Calculate and pass the size
7526 on the stack of the arguments to a JNI function. Use
7527 new target macro MODIFY_JNI_METHOD_CALL to allow a
7528 target to modify the call to a JNI method.
7530 2003-02-08 Roger Sayle <roger@eyesopen.com>
7532 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7533 instead of basename to avoid compiler warnings on Tru64.
7535 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
7537 * gcj.texi: Update to GFDL 1.2.
7539 2003-01-31 Andrew Haley <aph@redhat.com>
7541 * parse.y (java_expand_classes): Scan the whole class list looking
7542 for access methods that haven't yet been expanded.
7544 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
7548 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
7549 to fix bootstrap on sparc-unknown-netbsdelf1.5.
7550 * jcf-parse.c: Likewise.
7552 2003-01-31 Mark Wielaard <mark@klomp.org>
7554 * gjavah.c (throwable_p): Allocate 1 more byte for string.
7556 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
7558 * class.c (make_class): Use BINFO_ELTS.
7559 (set_super_info): Likewse.
7560 (add_interface_do): Likewise.
7562 2003-01-30 Tom Tromey <tromey@redhat.com>
7564 * jcf-parse.c (read_class): Update identifier's class value if it
7565 changed during parsing.
7567 2003-01-30 Loren James Rittle <ljrittle@acm.org>
7569 * Make-lang.in (po-generated): Find the targets in $(parsedir).
7570 Propagate change to all other rules as required.
7571 (java/parse-scan.o): Add explicit dependency on
7572 $(parsedir)/java/parse-scan.c .
7574 2003-01-29 Tom Tromey <tromey@redhat.com>
7576 * parse.y (patch_assignment): Only transform the rhs of an
7577 assignment when compiling to native.
7579 2003-01-28 Tom Tromey <tromey@redhat.com>
7581 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
7583 2003-01-28 Tom Tromey <tromey@redhat.com>
7585 * lex.c (java_lex): Don't include UEOF as part of token.
7586 (java_read_unicode): Error if \u sequence prematurely terminated.
7588 2003-01-27 Tom Tromey <tromey@redhat.com>
7590 * parse.y (java_check_regular_methods): Check for construct after
7591 checking types in throws clause.
7593 2003-01-24 Tom Tromey <tromey@redhat.com>
7595 * class.c (build_static_field_ref): Only a String or numeric field
7596 can fold to a constant.
7598 2003-01-23 Tom Tromey <tromey@redhat.com>
7600 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
7601 file name in resource buffer.
7603 2003-01-23 Tom Tromey <tromey@redhat.com>
7605 * expr.c (build_known_method_ref): Use method's context to find
7608 2003-01-23 Tom Tromey <tromey@redhat.com>
7610 * constants.c (set_constant_entry): Allocated cleared memory.
7612 2003-01-22 Tom Tromey <tromey@redhat.com>
7614 * java-tree.h: Don't use PARAMS.
7615 * resource.c: Add prototypes for all functions.
7616 (write_resource_constructor): Use `const char *' to avoid
7619 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
7621 * jcf-parse.c (process_zip_dir): Remove unused variable.
7623 2003-01-22 Tom Tromey <tromey@redhat.com>
7625 * expr.c (build_invokeinterface): Abort if method's context is not
7628 2003-01-22 Tom Tromey <tromey@redhat.com>
7630 * gcj.texi (Input and output files): Mention non-class entries.
7631 * decl.c (java_init_decl_processing): Call
7632 init_resource_processing.
7633 * java-tree.h (compile_resource_data, write_resource_constructor,
7634 compile_resource_file, init_resource_processing): Declare.
7635 * config-lang.in (gtfiles): Added resource.c.
7636 * Make-lang.in (gt-java-resource.h): New target.
7637 (JAVA_OBJS): Added resource.o.
7638 (java/resource.o): New target.
7639 * resource.c: New file.
7640 * class.c (compile_resource_file): Moved to resource.c.
7641 (registerResource_libfunc): Likewise.
7642 (utf8_decl_list): Mark with GTY; now static.
7643 * jcf-parse.c (classify_zip_file): New function.
7644 (parse_zip_file_entries): Use it; compile .properties files.
7645 (process_zip_dir): Use classify_zip_file and compute_class_name.
7646 Don't write class name into zip directory.
7647 (java_parse_file): Call write_resource_constructor.
7648 (compute_class_name): New function.
7649 * jcf-io.c (read_zip_member): Reindented.
7651 2003-01-21 Tom Tromey <tromey@redhat.com>
7653 * class.c (supers_all_compiled): New function.
7654 (make_class_data): Use it.
7656 2003-01-21 Tom Tromey <tromey@redhat.com>
7658 * parse.y (method_header): Native method can't be strictfp.
7659 No method can be transient or volatile.
7661 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7663 Make-lang.in (jvspec.o-warn): Add -Wno-error.
7665 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
7667 * check-init.c: Fix comment typos.
7668 * class.c: Likewise.
7669 * constants.c: Likewise.
7671 * except.c: Likewise.
7673 * java-except.h: Likewise.
7674 * java-tree.h: Likewise.
7675 * javaop.h: Likewise.
7676 * jcf-dump.c: Likewise.
7677 * jcf-io.c: Likewise.
7678 * jcf-parse.c: Likewise.
7679 * jcf-write.c: Likewise.
7681 * mangle.c: Likewise.
7682 * typeck.c: Likewise.
7683 * verify.c: Likewise.
7685 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7687 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
7688 * jcf-write.c: Include "tm_p.h".
7690 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7692 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
7694 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7696 * builtins.c (java_build_function_call_expr): Renamed from
7697 build_function_call_expr. All callers changed.
7699 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
7700 * jcf-parse.c: Include tm_p.h.
7702 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
7705 2003-01-14 Tom Tromey <tromey@redhat.com>
7707 * class.c (make_class_data): Check that super is compiled before
7708 building class reference to it.
7710 2003-01-14 Andrew Haley <aph@redhat.com>
7712 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7713 varargs function -- correct.
7715 2003-01-14 Andrew Haley <aph@redhat.com>
7717 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
7719 2003-01-14 Andrew Haley <aph@redhat.com>
7721 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7722 varargs function -- correct.
7724 * parse.y (patch_assignment): Copy the rhs of an assignment into a
7725 temporary if the RHS is a reference.
7727 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7729 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
7730 * keyword.h: Regenerated.
7732 * All Files: Convert to ISO C style function definitions.
7734 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
7736 * parse.y (check_pkg_class_access): ANSIfy definition.
7738 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7740 * decl.c, parse-scan.y, parse.y: Don't cast return value of
7743 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
7745 2003-01-09 Geoffrey Keating <geoffk@apple.com>
7747 Merge from pch-branch:
7749 2002-12-02 Geoffrey Keating <geoffk@apple.com>
7751 * Make-lang.in (java/gjavah.o): Update dependencies.
7752 * gjavah.c: Include ggc.h.
7754 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
7756 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
7757 (JCFDUMP_OBJS): Add ggc-none.o.
7758 (java/jcf-dump.o): Depend on GGC_H.
7759 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
7760 CPool substructures.
7761 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
7762 * jcf-dump.c: Include ggc.h.
7764 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
7766 * jcf.h (union cpool_entry): New.
7767 (struct CPool): Use gengtype to mark. Change field 'data' to be
7769 (struct JCF): Use gengtype to mark.
7770 (CPOOL_UINT): Update for new cpool_entry type.
7771 (CPOOL_USHORT1): Likewise.
7772 (CPOOL_USHORT2): Likewise.
7773 (CPOOL_FINISH): Use GC to free cpool subfields.
7774 * parse.h (struct parser_ctxt): Mark field current_jcf.
7775 * lex.c (java_init_lex): Use GC to allocate struct JCF.
7776 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
7777 (main_jcf): Use gengtype to mark.
7778 (ggc_mark_jcf): Delete.
7779 (get_constant): Update for new cpool_entry type.
7780 (give_name_to_class): Likewise.
7781 (get_class_constant): Likewise.
7782 (init_outgoing_cpool): Use GGC to allocate struct CPool.
7783 (java_parse_file): Use GGC to allocate struct JCF.
7784 (init_jcf_parse): Don't call ggc_add_root.
7785 * jcf-reader.c (jcf_parse_constant_pool): Update for new
7787 * java-tree.h (current_jcf): Use gengtype to mark.
7788 (CPOOL_UTF): Update for new cpool_entry type.
7789 (outgoing_cpool): Use gengtype to mark.
7790 (struct lang_type): GC struct JCF and struct CPool.
7791 * config-lang.in (gtfiles): Add jcf.h.
7792 * constants.c (find_tree_constant): New.
7793 (set_constant_entry): Allocate cpool subfields using GGC. Update
7794 for new cpool_entry type.
7795 (find_constant1): Update for new cpool_entry type.
7796 (find_constant2): Likewise.
7797 (find_utf8_constant): Use find_tree_constant.
7798 (find_class_or_string_constant): Remove unnecessary cast to jword.
7799 Update for new cpool_entry type.
7800 (count_constant_pool_bytes): Update for new cpool_entry type.
7801 (write_constant_pool): Likewise.
7802 (alloc_name_constant): Use find_tree_constant.
7803 (build_constants_constructor): Update for new cpool_entry type.
7805 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
7807 * parse.y (mark_parser_ctxt): Delete.
7808 (goal): Don't use ggc_add_root.
7809 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
7810 (java_pop_parser_context): Let GC free parser_ctxt.
7811 (java_parser_context_resume): Likewise.
7812 * parse.h (struct parser_ctxt): Use gengtype to mark.
7814 (ctxp_for_generation): Likewise.
7815 * lex.h (struct java_lc_s): Mark for gengtype.
7816 (java_lexer): Rearrange for gengtype.
7817 * config-lang.in (gtfiles): Add lex.h, parse.h.
7819 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7821 * All Files: Remove PARAMS macro.
7823 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
7824 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
7827 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
7830 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
7832 * Make-lang.in (java.install-common, java.uninstall,
7833 java.install-info, java.install-man): Prepend $(DESTDIR)
7834 to destination paths in all (un)installation commands.
7835 (java.install-common): Rewrite $(LN) command to support
7836 DESTDIR with "ln" as well as with "ln -s".
7838 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
7840 * java-tree.h: Protect against multiple inclusion.
7842 2003-01-07 Tom Tromey <tromey@redhat.com>
7844 * class.c (add_assume_compiled): Don't adjust parent if we're
7845 already at the root of tree.
7847 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7849 * lang.c (dump_compound_expr): Prototype.
7851 2003-01-03 Tom Tromey <tromey@redhat.com>
7853 Fix for PR java/8712:
7854 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
7855 when simply checking against `null'.
7857 2003-01-03 Tom Tromey <tromey@redhat.com>
7859 * gcj.texi (Standard Properties): Document http.proxyHost and
7862 * gcj.texi (GNU Classpath Properties): Document new properties.
7864 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7866 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
7867 java/lang-options.h, java/mangle.c, java/mangle_name.c,
7868 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
7870 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7872 * Make-lang.in, boehm.c, buffer.c,
7873 buffer.h, builtins.c, class.c,
7874 config-lang.in, constants.c,
7875 convert.h, decl.c, except.c,
7876 expr.c, java-except.h,
7877 java-tree.h, javaop.def,
7878 jcf-parse.c, jcf-write.c,
7879 jv-scan.c, jvgenmain.c,
7880 jvspec.c, keyword.gperf,
7881 keyword.h, lang-options.h,
7882 lang-specs.h, lang.c, lex.c,
7883 lex.h, mangle.c, mangle_name.c,
7884 parse-scan.y, parse.h, parse.y,
7885 typeck.c, verify.c, xref.c,
7886 xref.h: Replace "GNU CC" with
7887 "GCC" in the copyright header.
7889 * check-init.c, gjavah.c, javaop.h,
7890 jcf-depend.c, jcf-dump.c, jcf-io.c,
7891 jcf-path.c, jcf-reader.c, jcf.h,
7892 zextract.c, zipfile.h: These files are
7893 "part of GCC". Also say "GCC" not "GNU CC".
7895 2002-12-30 DJ Delorie <dj@redhat.com>
7897 * Make-lang.in: Protect against texi2pod/pod2man failing.
7899 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
7901 * gcj.texi: Use @copying.
7903 2002-12-27 Mark Mitchell <mark@codesourcery.com>
7905 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
7906 print_cxx_classname.
7907 (print_cxx_classname): Add add_scope parameter.
7908 (print_class_decls): Do not emit a semicolon after the extern
7910 (process_file): Adjust calls to print_cxx_classname.
7912 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
7914 * gcj.texi: Include Cover Texts in man page.
7916 2002-12-23 Jeff Sturm <jsturm@one-point.com>
7918 * class.c (build_static_field_ref): Check FIELD_FINAL.
7920 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
7921 instead of current_constant_pool_data_ref.
7922 * java-tree.h (current_constant_pool_data_ref): Undefine.
7923 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
7924 * jcf-parse.c (init_outgoing_cpool): Don't initialize
7925 current_constant_pool_data_ref.
7927 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
7928 not build_internal_class_name.
7930 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
7931 Use it when class ref isn't certain to be compiled.
7933 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
7935 * gcj.texi: Include gcc-common.texi.
7936 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
7937 $(srcdir)/doc/include/gcc-common.texi.
7939 2002-12-22 Anthony Green <green@redhat.com>
7941 * gcj.texi (Limitations): Add note about org.xml.sax and
7944 2002-12-20 Tom Tromey <tromey@redhat.com>
7946 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
7947 where minimum case value is Integer.MIN_VALUE.
7950 2002-12-18 Andrew Haley <aph@redhat.com>
7952 * parse.y (patch_invoke): Force evaluation order when `check' is
7953 set. For PR libgcj/8945.
7955 2002-12-16 Mark Mitchell <mark@codesourcery.com>
7957 * gcj.texi: Change version number to 3.4.
7959 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
7960 Andrew Haley <aph@redhat.com>
7962 * parse.y (source_end_java_method): Remove custom encoding of line
7963 numbers for a function decl before passing it to the back end.
7965 2002-12-03 Andrew Haley <aph@redhat.com>
7967 * class.c (make_class_data): New field, "chain".
7968 * decl.c (java_init_decl_processing): Likewise.
7970 2002-12-02 Tom Tromey <tromey@redhat.com>
7973 * parse.y (do_resolve_class): Handle qualified name via
7976 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7978 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
7979 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
7980 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
7981 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
7982 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
7983 Include coretypes.h and tm.h.
7984 * Make-lang.in: Update dependencies.
7986 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7988 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
7990 2002-11-25 Diego Novillo <dnovillo@redhat.com>
7992 * jcf-reader.c: Don't expand JCF_readu4 inside the
7993 expansion of JCF_SKIP.
7995 2002-11-25 Diego Novillo <dnovillo@redhat.com>
7997 * jcf-reader.c: Don't expand JCF_readu4 inside the
7998 expansion of JCF_SKIP.
8000 2002-11-22 Tom Tromey <tromey@redhat.com>
8002 * parse.y (patch_binop): Cast right hand side of shift expression
8003 to `int'. Fixes PR java/8676.
8005 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
8006 Andrew Haley <aph@redhat.com>
8008 * gcc/java/jcf-write.c (write_classfile): Remove target
8009 class file, if it exists, before renaming the temporary
8012 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
8014 * jvspec.c (lang_specific_spec_functions): New.
8016 2002-11-18 Tom Tromey <tromey@redhat.com>
8018 Fix for PR java/7912:
8019 * expr.c (can_widen_reference_to): Allow cast of array to
8020 Cloneable or Serializable.
8021 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8022 (java_io_serializable_identifier_node): Likewise.
8023 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8024 (valid_ref_assignconv_cast_p): Use new identifier nodes.
8025 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8026 java_io_serializable.
8027 * decl.c (java_init_decl_processing): Initialize
8028 java_lang_cloneable_identifier_node and
8029 java_io_serializable_identifier_node.
8030 (java_lang_cloneable_identifier_node): New global.
8031 (java_io_serializable_identifier_node): Likewise.
8033 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
8035 * buffer.c: Remove unnecessary casts.
8036 * check-init.c: Likewise.
8037 * class.c: Likewise.
8038 * constants.c: Likewise.
8040 * except.c: Likewise.
8041 * gjavah.c: Likewise.
8042 * jcf-io.c: Likewise.
8043 * jcf-parse.c: Likewise.
8044 * jcf-path.c: Likewise.
8045 * jvspec.c: Likewise.
8048 * verify.c: Likewise.
8050 2002-11-06 Tom Tromey <tromey@redhat.com>
8052 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8055 2002-11-05 Tom Tromey <tromey@redhat.com>
8057 Fix for PR java/6388.
8058 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8059 * java-tree.h (enum java_tree_index): New values
8060 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8061 (decimal_int_max, decimal_long_max): New defines.
8062 * lex.c (yylex): Rewrote range checking. Sign extend literals.
8063 (error_if_numeric_overflow): Rewrote range checking.
8064 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8067 2002-11-02 Tom Tromey <tromey@redhat.com>
8069 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8071 * class.c (make_method_value): Put class name, not signature, into
8072 `throws' field. For PR java/8415.
8074 2002-10-24 Tom Tromey <tromey@redhat.com>
8076 * gcj.texi (Invoking gij): Document --showversion.
8077 (Standard Properties): java.library.path now set.
8079 2002-10-23 Tom Tromey <tromey@redhat.com>
8081 * gjavah.c (decode_signature_piece): In JNI mode, print
8082 `jobjectArray' when array depth is nonzero.
8085 2002-10-15 Andrew Haley <aph@redhat.com>
8087 * parse.y (patch_invoke): Call force_evaluation_order on a static
8089 (resolve_qualified_expression_name): Call force_evaluation_order
8090 on a arg list that is part of a Qualified Expression Name.
8092 * lang.c (dump_compound_expr): New.
8093 (java_dump_tree): New.
8095 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
8097 * gcj.texi: Added item describing the GCJ runtime property
8100 2002-10-15 Richard Henderson <rth@redhat.com>
8102 * jcf-parse.c (get_constant): Fix type warning.
8104 2002-10-15 Andrew Haley <aph@redhat.com>
8106 * java-tree.h (java_inlining_merge_static_initializers): Declare.
8107 (java_inlining_map_static_initializers): Declare.
8109 2002-10-14 Andrew Haley <aph@redhat.com>
8111 * tree-inline.c (remap_block): All local class initialization
8112 flags go in the outermost scope.
8113 (expand_call_inline): Call java_inlining_map_static_initializers.
8114 (expand_call_inline): Call java_inlining_merge_static_initializers.
8115 * java/lang.c (merge_init_test_initialization): New.
8116 (java_inlining_merge_static_initializers): New.
8117 (inline_init_test_initialization): New.
8118 (java_inlining_map_static_initializers): New.
8120 2002-10-11 Mark Wielaard <mark@klomp.org>
8122 * gcj.texi (Compatibility): Add Limitations and Extensions section.
8124 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8126 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8128 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8130 * parse.y (merge_string_cste): Add parentheses around & within |.
8132 2002-10-08 Tom Tromey <tromey@redhat.com>
8134 * parse.y (variable_declarator_id): Simplify error path for
8135 array declarator error. For PR java/8003.
8137 2002-10-08 Zack Weinberg <zack@codesourcery.com>
8139 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8142 2002-10-08 Andrew Haley <aph@redhat.com>
8144 * parse.y (attach_init_test_initialization_flags): Check for
8147 2002-10-07 Anthony Green <green@redhat.com>
8149 * parse.y (merge_string_cste): Fix bug in string concatenation.
8151 2002-10-03 Michael Koch <konqueror@gmx.de>
8153 * gcj.texi (Standard properties):
8154 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8156 2002-10-02 Roger Sayle <roger@eyesopen.com>
8158 PR optimization/6627
8159 * lang.c (java_init): If storing the vbit in function
8160 pointers, ensure that force_align_functions_log is atleast
8161 one to aid compatability with g++ vtables.
8163 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
8165 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8166 foul of type-based aliasing.
8168 2002-09-30 Anthony Green <green@redhat.com>
8170 * gcj.texi (Invoking jv-scan): Fix texinfo.
8172 2002-09-28 Anthony Green <green@redhat.com>
8174 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8175 (Code Generation): Add -fno-assert documentation.
8176 * jv-scan.c (flag_assert): New global.
8177 (options): Add assert option.
8178 (help): Add --no-assert documentation.
8179 * parse-scan.y (flag_assert): New global.
8180 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8181 (flag_assert): New global.
8182 * java-tree.h (flag_assert): New global.
8183 * lex.c (java_lex): Obey flag_assert.
8184 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8187 2002-09-26 Andrew Haley <aph@redhat.com>
8189 * expr.c (build_java_array_length_access): Check for null pointer.
8190 * expr.c (expand_java_arrayload): Likewise.
8192 2002-09-21 Richard Henderson <rth@redhat.com>
8194 * jcf-parse.c (get_constant): Decode from IEEE no matter
8195 what the target format.
8197 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
8199 * ChangeLog: Follow spelling conventions.
8200 * class.c: Likewise.
8203 * gjavah.c: Likewise.
8204 * java-tree.h: Likewise.
8205 * jcf-dump.c: Likewise.
8206 * jcf-parse.c: Likewise.
8207 * jvspec.c: Likewise.
8209 * mangle.c: Likewise.
8210 * parse.y: Likewise.
8212 2002-09-17 Tom Tromey <tromey@redhat.com>
8214 * lex.c (java_read_unicode_collapsing_terminators): Handle case
8215 where \r appears at EOF. Fixes PR java/7950.
8217 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
8219 * jvspec.c (lang_specific_driver): Remove unused variable.
8221 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8223 * java-tree.h (union lang_tree_node): Add chain_next option.
8225 2002-09-16 Richard Henderson <rth@redhat.com>
8227 * jcf-parse.c (get_constant): Runtime check for IEEE format;
8228 use new real.h interface.
8229 * jcf-write.c (find_constant_index): Use new real.h interface.
8230 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8232 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8234 * lang.c: Follow spelling conventions.
8236 2002-09-11 Per Bothner <per@bothner.com>
8238 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
8239 constant to the type of the field.
8240 (java_complete_tree): Remove now-redundant code.
8242 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
8244 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
8247 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8248 return label if a ret instruction for the jsr has been reached.
8250 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
8252 * parse.y (DIR_SEPARATOR): Don't define.
8253 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8255 2002-08-28 Andrew Haley <aph@redhat.com>
8257 * verify.c (verify_jvm_instructions): Allow exception handler
8258 inside code that is being protected, but generate a warning.
8259 * except.c (link_handler): Initialize `expanded' in new eh_range.
8260 (binding_depth, is_class_level, current_pc): Declare extern.
8262 2002-09-01 Mark Wielaard <mark@klomp.org>
8264 * gcj.texi: Add chapter about system properties.
8267 2002-08-26 Tom Tromey <tromey@redhat.com>
8269 * parse.y (try_builtin_assignconv): Allow narrowing primitive
8270 conversion if RHS_TYPE is byte, short, or char.
8272 2002-08-22 Tom Tromey <tromey@redhat.com>
8274 * gcj.texi (Invoking gij): Document -cp and -classpath.
8276 2002-08-21 Tom Tromey <tromey@redhat.com>
8278 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8279 $(prefix)/share. For PR libgcj/7633.
8281 For PR java/6005 and PR java/7611:
8282 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8283 (java_can_use_bit_fields_p): New function.
8285 2002-08-16 Tom Tromey <tromey@redhat.com>
8287 * gcj.texi (Class Initialization): Mention class initialization of
8290 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
8292 * Make-lang.in (java-tree-inline.o): New.
8293 (JAVA_OBJS): Add java-tree-inline.o.
8294 * parse.y (source_end_java_method): Call java_optimize_inline.
8295 (java_expand_method_bodies): Save method's tree in
8297 (add_stmt_to_compound): Keep track of the number of statments.
8298 * lang.c (java_init): Enable flag_inline_trees.
8299 (java_post_options): If flag_inline_functions is on, enable
8300 flag_inline_trees instread.
8301 (decl_constant_value): New.
8302 (java_tree_inlining_walk_subtrees): New.
8303 * java-tree.h (DECL_NUM_STMTS): New macro.
8304 (java_optimize_inline): Declare.
8305 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8306 Handle a LABEL_EXPR.
8307 * decl.c (build_result_decl): If we already have a DECL_RESULT
8309 (dump_function): New.
8310 (java_optimize_inline): New.
8311 (dump_function): New.
8313 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
8316 * parse.y (build_assertion): Invert return from
8317 desiredAssertionStatus.
8319 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8321 * jcf-write.c (get_access_flags): Return correct access flags for
8322 private and protected inner classes.
8324 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8326 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8328 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8330 * mangle_name.c: Don't include obstack.h twice.
8331 * xref.c: Don't include obstack.h.
8333 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8335 * class.c: (permanent_obstack): Delete declaration.
8336 * constants.c: (permanent_obstack): Delete declaration.
8337 * except.c: (permanent_obstack): Delete declaration.
8338 * expr.c: (permanent_obstack): Delete declaration.
8339 * jcf-parse.c: (permanent_obstack): Delete declaration.
8340 (saveable_obstack): Delete declaration.
8341 * parse.h: (permanent_obstack): Delete declaration.
8342 * typeck.c: (permanent_obstack): Delete declaration.
8344 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
8346 * gcj.texi (version-gcc): Increase to 3.3.
8348 2002-07-22 Tom Tromey <tromey@redhat.com>
8350 * lex.c (java_lex): Check for `e' or `E' after 0.
8352 2002-07-21 Richard Henderson <rth@redhat.com>
8354 * lang.c (java_unsafe_for_reeval): New.
8355 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8357 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
8359 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8360 (jcf_path_init): Use GET_ENVIRONMENT.
8362 2002-07-10 Roger Sayle <roger@eyesopen.com>
8363 Zack Weinberg <zack@codesourcery.com>
8365 * builtins.c (initialize_builtins): Remove defines that
8366 handled C/C++ specific junk hereby removed from builtins.def.
8368 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
8370 * lang.c (java_post_options): Update prototype.
8372 2002-07-05 Roger Sayle <roger@eyesopen.com>
8374 * builtins.c (initialize_builtins): Ignore the additional
8375 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
8376 the builtins.def file.
8378 2002-07-01 Tom Tromey <tromey@redhat.com>
8381 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8384 2002-07-01 Roger Sayle <roger@eyesopen.com>
8386 * java/decl.c (builtin_function): Accept additional parameter.
8387 (java_init_decl_processing): Pass an additional NULL_TREE
8388 argument to builtin_function.
8390 2002-06-29 T.J. Mather <tjmather@maxmind.com>
8392 * gcj.texi: Fixed gcj invocation example so that it compiles.
8394 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8396 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8397 * parse.y (mark_parser_ctxt): Likewise.
8398 (check_modifiers, declare_local_variables): Avoid incorrect
8399 hardcoded constant 10.
8401 * lex.c (java_read_char): Avoid "comparison is always true"
8404 2002-06-25 Andreas Schwab <schwab@suse.de>
8406 * expr.c (JSR): Avoid undefined operation on PC.
8408 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8410 * decl.c (clear_binding_level): Const-ify.
8412 2002-06-13 Akim Demaille <akim@epita.fr>
8414 * parse.y (class_declaration, interface_declaration): Make sure
8415 all their rules have an action, in order to avoid meaningless `$$
8416 = $1' and their type clashes.
8418 2002-06-11 Tom Tromey <tromey@redhat.com>
8420 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8421 * parse-scan.y (statement_without_trailing_substatement): Added
8423 (assert_statement): New rule.
8424 * java-tree.h (struct lang_type) [assertions]: New field.
8425 (TYPE_USES_ASSERTIONS): New macro.
8426 (CLASS_USES_ASSERTIONS): Likewise.
8427 (FIELD_SYNTHETIC): New define.
8428 * lex.c (java_lval;): Added ASSERT_TK.
8429 * parse.y (ASSERT_TK): Added.
8430 (statement_without_trailing_substatement): Added assert_statement.
8431 (assert_statement): New rule.
8432 (build_assertion): New function.
8433 (maybe_generate_pre_expand_clinit): Create and initialize
8434 $assertionsDisabled.
8435 (lookup_package_type): Removed decl.
8436 * keyword.h: Rebuilt.
8437 * keyword.gperf (assert): New token.
8439 2002-06-10 Akim Demaille <akim@epita.fr>
8441 * parse.y (interface_type_list, class_member_declaration)
8442 (unary_expression_not_plus_minus): Remove duplicate %type.
8445 2002-06-09 Tom Tromey <tromey@redhat.com>
8447 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8449 * parse.y (method_header): Give error message in all cases.
8452 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8454 Don't use RTL inlining. Fix for PR java/6820.
8455 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8456 (flag_really_inline): New.
8457 (java_decode_option): Set flag_really_inline if -finline-functions
8459 (java_post_options): New function. Turn off inlining unless
8460 flag_really_inline is set.
8462 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8464 * gjavah.c (throwable_p): Accept argument as either a classname or
8465 signature fragment. Create null-terminated classname string for super
8466 when calling itself recursively.
8467 (decode_signature_piece): Skip first character from class name
8468 signature when calling throwable_p.
8470 2002-06-08 H.J. Lu (hjl@gnu.org)
8472 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8474 2002-06-04 Tom Tromey <tromey@redhat.com>
8476 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8478 2002-06-04 Michael Koch <konqueror@gmx.de>
8480 * gcj.texi (Input Options): Fixed typo.
8482 2002-06-04 Zack Weinberg <zack@codesourcery.com>
8484 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8485 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8486 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8487 and all now-pointless local variables. Rename other local
8488 variables to reflect their not being handles.
8490 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
8491 #if JCF_USE_STDIO blocks.
8493 * parse.y: Add missing semicolon at end of rule.
8495 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
8497 * check-init.c (attach_initialized_static_class): Delete, unused.
8498 * parse.y: Use htab_t instead of struct hashtable, update
8500 * java-tree.h: Include hashtab.h instead of hash.h.
8501 (struct lang_decl_func): Use htab_t, set up for gengtype.
8502 (struct init_test_hash_entry): Delete.
8503 (struct treetreehash_entry): New.
8504 (java_treetreehash_find): New
8505 (java_treetreehash_new): New prototype.
8506 (java_treetreehash_create): New prototype.
8507 (java_mark_tree): Delete prototype.
8508 (java_hash_hash_tree_node): Delete prototype.
8509 (java_hash_compare_tree_node): Delete prototype.
8510 (attach_initialized_static_class): Delete prototype.
8511 * expr.c (build_class_init): Update to use java_treetreehash
8513 (java_expand_expr): Update to use htab_t.
8514 (emit_init_test_initialization): Likewise.
8515 * decl.c (java_mark_tree): Delete.
8516 * class.c (init_test_hash_newfunc): Delete.
8517 (java_hash_hash_tree_node): Delete.
8518 (java_hash_compare_tree_node): Delete.
8519 (add_method_1): Update to use java_treetreehash functions.
8520 (JAVA_TREEHASHHASH_H): New macro.
8521 (java_treetreehash_hash): New function.
8522 (java_treetreehash_compare): New function.
8523 (java_treetreehash_find): New function.
8524 (java_treetreehash_new): New function.
8525 (java_treetreehash_create): New function.
8526 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8528 * Make-lang.in (java/parse.o): Depend on debug.h.
8529 * java-tree.h (struct lang_identifier): Use gengtype.
8530 (union lang_tree_node): New.
8531 (struct lang_decl_func): Use gengtype.
8532 (struct lang_decl_var): Likewise.
8533 (struct lang_decl): Likewise.
8534 * parse.y: Include debug.h.
8535 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8537 * lang.c (struct language_function): New dummy structure.
8539 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8540 descriminator for DECL_LANG_SPECIFIC.
8541 (struct lang_decl_func): Rename from struct lang_decl.
8542 (enum lang_decl_desc): New.
8543 (struct lang_decl): Make it a union. Update all the accessor macros.
8544 (struct lang_type): Use gengtype.
8545 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
8546 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
8547 are now the same size.
8548 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
8549 use discriminator to mark DECL_LANG_SPECIFIC.
8551 * Make-lang.in (gt-java-builtins.h): New rule.
8552 (java/builtins.o): Add dependency on gt-<filename>.h.
8553 * builtins.c: Use gengtype for roots.
8554 (union string_or_tree): Use gengtype.
8555 (struct builtin_record): Use gengtype.
8556 * config-lang.in (gtfiles): Add builtins.c.
8558 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
8559 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
8560 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
8561 gt-java-parse.h, gtype-java.h): Add rules to generate.
8562 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
8563 (class.o): Add dependency on gt-*.h.
8564 (constants.o): Likewise.
8567 (jcf-parse.o): Likewise.
8568 (jcf-write.o): Likewise.
8570 * config-lang.in (gtfiles): New.
8571 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8572 * constants.c: Replace uses of ggc_add_* with GTY markers.
8574 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8575 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8576 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
8577 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
8579 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
8581 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8582 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
8584 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8585 Include gtype-java.h.
8587 2002-06-02 Tom Tromey <tromey@redhat.com>
8589 Fix for PR java/5913:
8590 * parse.y (patch_binop): Call patch_string on op1.
8592 2002-06-02 Tom Tromey <tromey@redhat.com>
8594 Fix for PR java/1343, PR java/6336:
8595 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
8596 formatting. Changed return type.
8597 (anonymous_class_counter): Moved to top of file.
8598 (maybe_make_nested_class_name): Append number to class name for
8599 function-local classes.
8601 2002-05-28 Zack Weinberg <zack@codesourcery.com>
8603 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
8604 * Make-lang.in: Update dependency lists.
8606 2002-05-18 Mark Mitchell <mark@codesourcery.com>
8608 * gjavah.c (throwable_p): Do not free the name of the class after
8609 passing it to find_class.
8610 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
8611 * jcf-io.c (dirent.h): Include it.
8612 (fnmatch.h): Likewise.
8613 (compare_path): New function.
8614 (java_or_class_file): Likewise.
8615 (memoized_dirlist_entry): New type.
8616 (memoized_dirlist_lookup_eq): New function.
8617 (memoized_dirlists): New variable.
8618 (caching_stat): New function.
8619 (memoized_class_lookup_eq): New function.
8620 (memoized_class_lookups): Likewise.
8621 (find_class): Use memoized_class_lookups and caching_stat.
8622 * jcf.h (JCF_USE_SCANDIR): Define.
8623 * parse.y (java_expand_classes): Write the class files in reverse
8626 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8628 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
8630 2002-05-13 Mark Mitchell <mark@codesourcery.com>
8632 * jcf-write.c (write_classfile): Unlink the temporary file if it
8633 cannot be renamed. Use concat to build up the name of the
8636 2002-05-08 Mark Mitchell <mark@codesourcery.com>
8638 * jcf-write.c (write_classfile): Write the file to a
8639 temporary file and then rename it.
8641 2002-05-07 Tom Tromey <tromey@redhat.com>
8643 * gjavah.c (throwable_p): Use xstrdup, not strdup.
8645 Fix for PR java/1200:
8646 * gjavah.c (throwable_p): New function.
8647 (decode_signature_piece): Use it. A `WeakReference' isn't the
8650 (gcjh_streq): New function.
8652 2002-05-07 Andreas Jaeger <aj@suse.de>
8654 * parse.y (finish_for_loop): Fix if statement.
8656 2002-05-06 Tom Tromey <tromey@redhat.com>
8658 Fix for PR java/5941:
8659 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
8660 loop update expression.
8661 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
8662 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
8664 2002-05-04 Mark Wielaard <mark@klomp.org>
8667 * parse.y (build_string_concatenation): Return just op1 only when op2
8668 is null and op1 is a STRING_CST, otherwise always construct a
8671 2002-04-27 Tom Tromey <tromey@redhat.com>
8674 * parse.y (string_convert_int_cst): New function.
8675 (merge_string_cste): Use it.
8677 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
8679 * java-tree.h (java_parse_file): Update.
8680 (java_set_yydebug): Remove.
8681 * jcf-parse.c (yydebug): Remove.
8682 (java_set_yydebug): Die.
8683 (java_parse_file): Update.
8684 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8686 2002-04-24 Tom Tromey <tromey@redhat.com>
8689 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
8690 EXPR_WFL_QUALIFICATION of qual_wfl.
8692 2002-04-23 Per Bothner <per@bothner.com>
8694 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
8695 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
8696 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
8698 2002-04-23 Tom Tromey <tromey@redhat.com>
8701 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
8702 recognize `-fcompile-resource='.
8703 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
8706 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
8708 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
8709 paths. Fixes PR java/2791.
8711 2002-04-19 Andrew Haley <aph@redhat.com>
8713 * jcf-write.c (push_long_const): lo, hi: New variables.
8714 Use rshift_double to extract the high part of a 64-bit long.
8715 Use WORD_TO_INT to extract the low part.
8717 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
8718 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
8719 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
8721 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
8723 * typeck.c (incomplete_type_error): Remove.
8725 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8727 * class.c (make_class_data): Set DECL_ALIGN on static class data,
8728 for hash synchronization.
8729 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
8730 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
8733 2002-04-16 Mark Wielaard <mark@klomp.org>
8735 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
8738 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8740 Fix for PR java/6294:
8741 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
8744 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8746 Fix for PR java/6085:
8747 * parse.y (patch_method_invocation): Always use build_access_to_thisn
8748 to get enclosing "this" argument for inner-class constructor
8749 invocation. Pass correct arguments to build_access_to_thisn.
8751 2002-04-10 Andreas Jaeger <aj@suse.de>
8753 * gcj.texi (Input Options): Fix extdirs patch.
8755 2002-04-10 Anthony Green <green@redhat.com>
8757 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
8759 2002-04-09 Anthony Green <green@redhat.com>
8761 * gcj.texi (Input Options): Add --extdirs documentation.
8762 * jcf-dump.c (OPT_extdirs): New macro.
8763 (options): Add extdirs option.
8764 (help): Describe --extdirs.
8765 (main): Handle OPT_extdirs.
8766 * gjavah.c (OPT_extdirs): New macro.
8767 (options): Add extdirs option.
8768 (help): Describe --extdirs.
8769 (main): Handle OPT_extdirs.
8770 * jcf-path.c (jcf_path_init): Add extdirs support.
8771 (jcf_path_extdirs_arg): New function.
8772 (extensions): New variable to hold extensions path entries.
8773 * jvspec.c: Remove -fextdirs= when compiling main().
8774 * lang.c (java_decode_option): Handle -fextdirs=.
8775 * jcf.h (jcf_path_extdirs_arg): Declare new function.
8776 * Make-lang.in: Compile jcf-path with version info for use in
8777 identifying the appropriate libgcj.jar.
8779 2002-04-08 Tom Tromey <tromey@redhat.com>
8782 * .cvsignore: Added rmic.1 and rmiregistry.1.
8783 * gcj.texi (Top): Link to new nodes.
8784 (Invoking rmic): New node.
8785 (Invoking rmiregistry): Likewise.
8786 * Make-lang.in (java.generated-manpages): Added rmic.1 and
8788 (java.maintainer-clean): Likewise.
8789 ($(srcdir)/java/rmic.1): New target.
8790 ($(srcdir)/java/rmiregistry.1): Likewise.
8791 (java.install-man): Handle rmic.1 and rmiregistry.1.
8793 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8795 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
8796 Add note about handling uncaught exceptions. Add an exception handler
8799 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8801 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
8802 after using it to patch CALL_EXPR.
8804 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8806 * gcj.texi (Invocation): Document CNI invocation API.
8808 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
8810 * expr.c (truthvalue_conversion): Rename. Update.
8811 (expand_compare): Update.
8812 * java-tree.h (java_truthvalue_conversion): New.
8813 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8815 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8817 * java-tree.h (java_mark_addressable): New.
8818 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8819 * typeck.c (mark_addressable): Rename, update.
8821 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8823 * expr.c (build_java_binop): Update.
8824 * java-tree.h (java_signed_type, java_unsigned_type,
8825 java_signed_or_unsigned_type): Update.
8826 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8827 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8828 * parse.y (patch_binop): Update.
8829 * typeck.c (signed_or_unsigned_type, unsigned_type,
8830 signed_type): Update.
8832 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8834 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8835 (java_dummy_print): Remove.
8836 (lang_print_error): Rename. Exit early if inhibiting output.
8837 (inhibit_error_printing_function): New.
8838 (java_init): Don't set hook.
8839 (lang_init_source): Use new boolean.
8841 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
8843 * parse.y (do_resolve_class): Fix infinite recursion.
8845 2002-03-29 Tom Tromey <tromey@redhat.com>
8847 * parse.y (check_inner_circular_reference): Ignore incomplete
8850 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8852 * Make-lang.in (builtins.o): Update.
8853 * boehm.c (get_boehm_type_descriptor): Update.
8854 * builtins.c: Include langhooks.h.
8855 * decl.c (java_init_decl_processing): Update.
8856 * java-tree.h (java_type_for_mode, java_type_for_size): New.
8857 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
8859 * typeck.c (type_for_mode, type_for_size): Update.
8861 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
8863 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
8865 2002-03-28 Tom Tromey <tromey@redhat.com>
8867 * except.c (expand_end_java_handler): If the handler type is NULL,
8868 use java.lang.Throwable. Fixes PR java/5986.
8870 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
8872 Fix for PR java/4715:
8873 * jcf-parse.c (parse_source_file_3): New function.
8874 (read_class): Call it.
8875 (java_parse_file): Likewise.
8877 2002-03-28 Jan Hubicka <jh@suse.cz>
8879 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
8881 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8883 * parse.y (resolve_package): Initialize "decl".
8884 (lookup_package_type): Remove unused function.
8886 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8888 Fix for PR java/5993:
8889 * parse.y (resolve_package): Return the decl if resolution was
8890 successful. Don't special case "java.lang" and "java.lang.reflect"
8891 packages. Set type_name to the merged identifier.
8892 (resolved_qualified_expression_name): Print error using "name" if
8893 resolve_package returns NULL_TREE.
8895 2002-03-27 Tom Tromey <tromey@redhat.com>
8897 * expr.c (expand_invoke): Don't generate null pointer check if
8898 we're calling <init>.
8900 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8902 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
8904 * java-tree.h (java_lang_expand_expr): Similarly.
8905 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8906 (java_init): Don't set hook.
8908 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8910 Fix for PR java/5850:
8911 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
8912 context if field was not found in the current scope.
8913 * expr.c (lookup_field): Don't look in enclosing contexts.
8915 2002-03-26 Tom Tromey <tromey@redhat.com>
8917 Fix for PR java/5942:
8918 * parse.y (init_src_parse): Added sanity check.
8919 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
8922 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
8924 * decl.c (lang_mark_tree): Rename java_mark_tree.
8925 * java-tree.h (java_mark_tree): New.
8926 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8928 2002-03-25 Zack Weinberg <zack@codesourcery.com>
8930 * lex.c: Change java_perform_atof to take normal parameters
8931 instead of a pointer to a parameter block. Call it directly
8934 2002-03-22 Mark Wielaard <mark@klomp.org>
8936 Fix for PR java/5368:
8937 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
8938 when printing error message.
8940 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
8942 * decl.c (maybe_build_cleanup): Remove.
8944 2002-03-22 Tom Tromey <tromey@redhat.com>
8946 Andrew Haley <aph@cambridge.redhat.com>
8948 * expr.c (build_field_ref): Don't build a check if the field is a
8951 2002-03-21 Eric Blake <ebb9@email.byu.edu>
8953 Fix for PR java/6026:
8954 * lex.c (java_lex): Fix parsing of consecutive floats.
8956 2002-03-21 Tom Tromey <tromey@redhat.com>
8958 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
8961 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
8963 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8964 insert_block, getdecls, kept_level_p, global_bindings_p): New.
8966 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
8968 * gcj.texi: @code{gcj} becomes @command{gcj}.
8969 @code{gcc} becomes @command{gcc}.
8970 GcjRaw changed to gnu.gcc.RawData.
8972 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
8974 * decl.c (start_java_method): Use new hook.
8975 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8976 (java_init): Remove old hook.
8978 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
8980 * builtins.c (define_builtin): Do nothing if `type' is null.
8983 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8985 * parse.y (parser_check_super_interface): Fix error message
8988 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8990 * jcf-parse.c (get_constant): Delete unused variables.
8992 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
8994 * java-tree.h (java_parse_file): New.
8995 * jcf-parse.c (yyparse): Rename java_parse_file.
8996 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8998 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9000 * parse.y (craft_constructor): Return the constructor decl.
9001 (java_expand_classes): Update comments.
9002 (lookup_method_invoke): Call fix_constructors immediately for
9003 anonymous class. Fixes PR java/5935.
9005 2002-03-15 Anthony Green <green@redhat.com>
9007 * jcf-parse.c (yyparse): Don't emit class registration
9008 constructor when compiling resource files.
9010 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9012 * lang.c (java_tree_code_type, java_tree_code_length,
9013 tree_code_name): Delete.
9014 (tree_code_type, tree_code_length, tree_code_name): Define.
9015 (java_init): Don't try to copy into the various tree_code
9018 2002-03-12 Tom Tromey <tromey@redhat.com>
9020 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9021 UTF-8, not UCS-2. Fixes PR java/5923.
9023 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9024 a call_expr wrapped in a convert. Fixes PR java/5848.
9026 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9028 * jcf-write.c (write_classfile): Improve error strings.
9030 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9032 * lex.c: Adjust comments to GNU standards.
9034 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9036 Fix for PR java/5902:
9037 * lex.c (java_lex): Fix parsing of literals.
9039 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9041 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9042 to prevent it getting evaluated twice in the store checking case.
9043 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9046 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9048 * decl.c (java_init_decl_processing): Make sure class_type_node
9049 alignment is not less than 64 bits if hash synchronization is enabled.
9051 2002-03-08 Per Bothner <per@bothner.com>
9053 * parse.y (java_complete_lhs): Check if patch_assignment
9054 returned an error-mark.
9056 * parse.y (try_builtin_assignconv): Don't special-case zero.
9058 2002-03-08 Per Bothner <per@bothner.com>
9060 Fix for PR java/5812.
9061 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
9062 here instead of in JSR macro. Likewise with load_type_state call.
9063 Do the latter on if the return_pc has been verified (the jsr returns).
9064 (JSR): Now just call build_java_jsr.
9066 2002-03-07 Jeff Sturm <jsturm@one-point.com>
9068 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9069 (java.install-common): Link native driver to
9070 JAVA_TARGET_INSTALL_NAME.
9072 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
9074 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9075 * builtins.c(sin_builtin): Likewise
9076 * builtins.c(sqrt_builtin): Likewise
9078 2002-03-03 Zack Weinberg <zack@codesourcery.com>
9080 * java/expr.c, java/jcf-parse.c, java/lex.c:
9081 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9082 REAL_ARITHMETIC blocks unconditional. Delete some further
9083 #ifdef blocks predicated on REAL_ARITHMETIC.
9085 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9087 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9088 explicit sizeof/sizeof.
9089 * decl.c (java_init_decl_processing): Likewise.
9090 * jcf-parse.c (init_jcf_parse): Likewise.
9091 * parse.y (init_src_parse): Likewise.
9093 2002-03-02 Per Bothner <per@bothner.com>
9095 Make --CLASSPATH by a synonym for --classpath and -classpath.
9096 Implement --bootclasspath.
9097 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
9098 (classpath_l): Remove.
9099 (jcf_path_CLASSPATH_arg): Remove.
9100 (jcf_path_bootclasspath_arg): New function.
9101 (jcf_path_seal): Simplify accordingly.
9103 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
9104 (jcf_path_CLASSPATH): Remove declaration.
9105 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
9106 (lang_specific_driver): Translate -bootclasspath.
9107 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
9108 * lang.c (decode_lang_options): Do jcf_path_init first.
9109 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
9110 * gjavah.c: Also handle --bootclasspath.
9111 Handle --CLASSPATH as a synonum for --classpath.
9112 * jcf-dump.c: Likewise.
9114 "." is not part of system path, but is the default for --classpath.
9115 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
9116 (jcf_path_seal): Add "." if no CLASSPATH specified.
9118 * gcj.texi: Document changes.
9120 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9122 * expr.c (build_java_arraystore_check): Fix formatting.
9124 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9126 Fix for PR java/5758, java/5632:
9127 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9128 inner-class separator too.
9129 * parse.y (do_resolve_class): New local `decl_result.'
9130 Progressively build a name for what can have been loaded.
9132 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9134 * expr.c (java_array_data_offset): Removed function.
9135 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9136 (build_java_array_length_access): Obtain "length" value using a
9137 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9138 (build_java_arrayaccess): Correct comment. Access "data" using a
9139 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9140 (build_java_arraystore_check): New function.
9141 (expand_java_arraystore): Use build_java_arraystore_check.
9142 * parse.y (patch_assignment): Simplify code to insert a store check
9143 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9144 * check-init.c (check_init): Update to reflect that an array length
9145 access is now a COMPONENT_REF.
9146 * gcj.texi (Code Generation): Improve documentation of
9147 -fno-bounds-check. Add documentation for -fno-store-check.
9148 * java-tree.h (flag_store_check): Declare.
9149 (build_java_arraystore_check): Declare.
9150 * lang.c (flag_store_check): Initialize to 1.
9151 (lang_f_options): Add store-check option.
9152 * jvspec.c: Don't pass store-check option to jvgenmain.
9153 * lang-options.h: Add help string for -fno-store-check.
9155 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9157 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9158 * java-tree.h (java_dup_lang_specific_decl): New.
9159 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9161 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9163 * builtins.c, decl.c: Delete traditional-mode-related code
9164 copied from the C front end but not used, or used only to
9165 permit the compiler to link.
9167 2002-02-22 Tom Tromey <tromey@redhat.com>
9169 Fix for PR java/2369:
9170 * jvspec.c (verify_class_name): New function.
9171 (lang_specific_driver): Call it.
9172 (JAVA_START_CHAR_P): New macro.
9173 (JAVA_PART_CHAR_P): Likewise.
9175 2002-02-22 Per Bothner <per@bothner.com>
9177 * class.c: Change vtable to be more compatible with g++ v3 abi.
9178 (get_dispatch_table): Prepend offset-to-top (always 0) and
9179 type_info pointer (currently unimplemented hence NULL) to vtable.
9180 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9181 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
9182 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9183 (build_dtable_decl): Add declarations for new fields.
9185 2002-02-20 Per Bothner <per@bothner.com>
9187 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9188 to finit$ (otherwise generate_bytecode_insns drops it). However, we
9189 don't need to set it on the COMPOUND_EXPR - the caller does that.
9191 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9193 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9194 `--CLASSPATH' becomes `--classpath.'
9195 * gjavah.c: Likewise.
9196 * jcf-dump.c: Likewise.
9197 * lang-options.h: Likewise.
9199 * jcf-path.c: Updated comment.
9200 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9201 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9202 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9203 (jcf_path_CLASSPATH_arg): Ditto.
9204 (classpath_u): Updated leading comment.
9206 2002-02-20 Per Bothner <per@bothner.com>
9208 * builtins.c (check_for_builtin): New function.
9209 (build_call_or_builtin): Remove.
9210 * java-tree.h: Update accordingly.
9211 * expr.c (expand_invoke): Use build + check_for_builtin instead
9212 of build_call_or_builtin.
9213 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
9214 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9215 flag (which had caused jcf-write to incorrectly emit invokevirtual).
9217 2002-02-17 Tom Tromey <tromey@redhat.com>
9219 * java-tree.h (TYPE_STRICTFP): New macro.
9220 (struct lang_type) [strictfp]: New field.
9221 (CLASS_STRICTFP): New macro.
9222 (METHOD_STRICTFP): New macro.
9223 (struct lang_decl) [strictfp]: New field.
9224 * parse.y (method_header): Disallow strictfp constructor or
9226 (STRICT_TK): Move before MODIFIER_TK.
9227 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9228 (METHOD_MODIFIERS): Likewise.
9229 (INTERFACE_MODIFIERS): Likewise.
9230 * jcf-write.c (get_access_flags): Likewise.
9231 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9232 (add_method_1): Likewise.
9233 (get_access_flags_from_decl): Likewise.
9234 * jcf-dump.c (print_access_flags): Print in standard order. Also,
9235 recognize strictfp flag.
9236 * jcf.h (ACC_STRICT): New define.
9238 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
9240 * class.c(build_utf8_ref): Move declaration of decl_size
9242 2002-02-07 Tom Tromey <tromey@redhat.com>
9244 * gcj.texi (Input Options): --CLASSPATH does not suppress system
9247 2002-02-04 Anthony Green <green@redhat.com>
9249 * class.c (build_utf8_ref): Put UTF-8 constants into merged
9250 sections if available.
9252 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9254 * parse.y (java_expand_classes): Fix typo in static field loop.
9256 2002-02-02 Richard Henderson <rth@redhat.com>
9258 * class.c (add_field): Mark static fields external.
9259 (build_class_ref): Remove redundant set.
9260 * parse.y (java_expand_classes): Mark static fields of classes
9261 to be compiled as local.
9262 * jcf-parse.c (parse_class_file): Likewise.
9264 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9266 * gcj.texi (About CNI): New node.
9268 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
9271 * jcf-parse.c : Check for HAVE_LOCALE_H before using
9272 setlocale() with LC_CTYPE as a parameter.
9275 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
9277 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9278 Follow GNU Coding Standards for --version.
9280 2002-01-28 Tom Tromey <tromey@redhat.com>
9282 * expr.c (build_jni_stub): Ensure storage for `meth' is
9284 * parse.y (java_complete_expand_methods): Set
9285 current_function_decl before building JNI stub.
9287 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9289 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9292 2002-01-22 Tom Tromey <tromey@redhat.com>
9294 * decl.c (java_init_decl_processing): Use add_predefined_file.
9295 Predefine RawData.java.
9296 (predef_filenames): Removed.
9297 (java_init_decl_processing): Don't register predef_filenames.
9298 * jcf-parse.c (add_predefined_file): New function.
9299 (predefined_filename_p): Rewrote.
9300 (predefined_filename_p): No longer static.
9301 * decl.c (java_init_decl_processing): Call initialize_builtins.
9302 * Make-lang.in (JAVA_OBJS): Added builtins.o.
9303 (java/builtins.o): New target.
9304 * builtins.c: New file.
9305 * parse.y (patch_invoke): Use build_call_or_builtin.
9306 * java-tree.h (build_call_or_builtin): Declare.
9307 (initialize_builtins): Declare.
9308 (java_set_exception_lang_code): Removed unused declaration.
9309 (PREDEF_FILENAMES_SIZE): Removed.
9310 (java_tree_index): Added JTI_PREDEF_FILENAMES.
9311 (predef_filenames): New define.
9312 (add_predefined_file): Declare.
9313 (predefined_filename_p): Declare.
9314 * expr.c (expand_invoke): Use build_call_or_builtin.
9316 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9318 * parse.y (patch_switch_statement): Fix format specifier.
9320 2002-01-16 Tom Tromey <tromey@redhat.com>
9322 More for PR java/5365:
9323 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9325 (process_file): Generate include for
9326 java.lang.UnsupportedOperationExceptions.
9328 2002-01-15 Andreas Jaeger <aj@suse.de>
9330 * .cvsignore: Add man pages.
9332 2002-01-15 Tom Tromey <tromey@redhat.com>
9334 Fix for PR java/5365:
9335 * gjavah.c (process_file): Turn class name into a file name.
9337 2002-01-14 Matthias Klose <doko@debian.org>
9339 * gcj.texi: Fix whitespace and formatting errors in the
9340 synopsis of the man pages. Update copyright.
9342 2002-01-14 Tom Tromey <tromey@redhat.com>
9345 * Make-lang.in (java.install-man): Handle jv-convert man page.
9346 (java.generated-manpages): Added jv-convert.1.
9347 (java.uninstall): Remove jv-convert.1.
9348 (java.maintainer-clean): Likewise.
9349 ($(srcdir)/java/jv-convert.1): New target.
9350 * gcj.texi (Top): Link to jv-convert node.
9351 (Individual utilities): Likewise.
9352 (Invoking jv-convert): New node.
9354 2001-01-10 Jeff Sturm <jsturm@one-point.com>
9355 Martin Kahlert <martin.kahlert@infineon.com>
9357 * jcf-parse.c (get_constant): Don't swap lo/hi for big
9358 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9360 2002-01-03 Graham Stott <grahams@redhat.com>
9362 * class.c (compile_resource_file): Update copyright date.
9363 Constify filename parameter.
9364 (java-tree.h): Update copyright date.
9365 (compile_resource_file): Constify filename parameter.
9367 2002-01-03 Graham Stott <grahams@redhat.com>
9369 * gcc/jcf-parse.c: Update copyright date.
9370 (yyparse): Constify resource_filename.
9372 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9374 * parse.y (src_parse_roots): Don't needlessly zero init.
9376 2001-12-31 Tom Tromey <tromey@redhat.com>
9378 * parse.y (dump_java_tree): New function.
9379 (source_end_java_method): Call it.
9380 (end_class_declaration): Likewise.
9381 * lang.c (java_decode_option): Call dump_switch_p.
9383 2001-12-28 Tom Tromey <tromey@redhat.com>
9385 * gen-table.pl: Don't process characters after \uffff. Added
9386 comment pointing to input file.
9388 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9390 * gen-table.pl: Const-ify output. Document the location of a
9391 suitable unicode input file.
9393 * chartables.h: Regenerate.
9395 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9397 * chartables.h: Const-ify.
9398 * gjavah.c (options): Likewise.
9399 * jcf-dump.c (options): Likewise.
9400 * jv-scan.c (options): Likewise.
9401 * lex.c (java_start_char_p, java_part_char_p): Likewise.
9402 * parse.y (binop_lookup): Likewise.
9404 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9406 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9407 the static arrays that are output.
9408 * jvspec.c (jvgenmain_spec): Make static.
9409 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9410 * keyword.h: Regenerate.
9411 * lang.c (string_option, process_option_with_no, lang_f_options,
9412 lang_W_options): Const-ify.
9413 * lex.c (java_lex): Likewise.
9415 2001-12-21 Richard Henderson <rth@redhat.com>
9417 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9418 (get_boehm_type_descriptor): ... here. Arrange for the
9419 TREE_TYPE to get set properly.
9421 2001-12-21 Richard Henderson <rth@redhat.com>
9423 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9424 only if the target requires collect2.
9426 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9428 2001-12-20 Tom Tromey <tromey@redhat.com>
9431 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9432 CAN_COMPLETE_NORMALLY for the node.
9433 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9434 generate code for second branch if first branch can't complete
9436 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9437 the loop head if the loop body can't complete normally.
9439 2001-12-20 Tom Tromey <tromey@redhat.com>
9442 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9443 case where `finally' clause can't complete normally.
9445 2001-12-20 Tom Tromey <tromey@redhat.com>
9448 * parse.y (analyze_clinit_body): Added this_class parameter.
9449 Check for more cases where we must keep <clinit>.
9450 (maybe_yank_clinit): Cleaned up flow control.
9452 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9454 * decl.c (java_init_decl_processing): Don't initialize
9455 finit_leg_identifier_node.
9456 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9457 (finit_leg_identifier_node): Remove.
9458 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9460 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9462 * mangle.c (mangle_member_name): Don't special-case for
9464 * mangle_name.c (unicode_mangling_length): Likewise.
9465 (append_unicode_mangled_name): Likewise.
9466 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9469 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9471 * expr.c (build_java_array_length_access): Don't force null pointer
9472 check unless flag_check_references is set.
9474 2001-12-20 Tom Tromey <tromey@redhat.com>
9476 Fix for PR java/3417:
9477 * parse.y (patch_assignment): Added special processing for
9479 (patch_return): Don't convert booleans to integers, and don't
9480 special-case `null'.
9482 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
9484 * config-lang.in (diff_excludes): Remove.
9486 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
9488 * gcj.texi: Update link to GCC manual.
9490 2001-12-17 Tom Tromey <tromey@redhat.com>
9492 * parse.y (link_nested_class_to_enclosing): Removed useless
9495 2001-12-16 Tom Tromey <tromey@redhat.com>
9497 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9500 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
9502 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9503 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9506 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9508 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9510 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9512 * decl.c (java_init_decl_processing): Build otable_type correctly.
9513 otable_decl is an otable_type.
9515 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9517 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
9518 otable_type, otable_ptr_type, method_symbol_type,
9519 method_symbols_array_type, method_symbols_array_ptr_type): New
9520 field/global tree definitions.
9521 (flag_indirect_dispatch): New flag.
9522 * decl.c (java_init_decl_processing): Initialize new otable and
9523 otable_syms type nodes and decls. Add new field "index" to
9525 * class.c (build_method_symbols_entry): New function.
9526 (make_method_value): Set "index" to to method's vtable index for
9527 virtual methods when indirect-dispatch is not used.
9528 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
9529 and set vtable_method_count to -1. Set otable and otable_syms field
9530 if indirect-dispatch is used and there was something to put in them.
9531 (build_method_symbols_entry): New function.
9532 (emit_offset_symbol_table): New function.
9533 * expr.c (get_offset_table_index): New function.
9534 (build_invokevirtual): Build array reference to otable at the index
9535 returned by get_offset_table_index, and use the result as the vtable
9537 (build_invokeinterface): Similar.
9538 * jcf-parse.c (yyparse): If indirect-dispatch, call
9539 emit_offset_symbol_table at the end of compilation, after all classes
9540 have been generated.
9541 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9542 * lang.c (flag_indirect_dispatch): Define.
9543 (lang_f_options): Add indirect-dispatch flag.
9545 2001-12-14 Matthias Klose <doko@debian.org>
9547 * gcj.texi: Markup for man page generation. Document missing
9548 options printed by <tool> --help.
9549 Terminate description of gij's -ms option with a dot.
9550 * Make-lang.in ($(srcdir)/java/*.1): New targets.
9551 (java.generated-manpages java.install-man, java.uninstall,
9552 java-maintainer-clean) Updated.
9554 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
9556 * class.c (get_dispatch_table): Fix java vtable layout
9557 for TARGET_VTABLE_USES_DESCRIPTORS.
9558 * decl.c (java_init_decl_processing): Initialize
9559 alloc_no_finalizer_node, finalize_identifier_node.
9560 * expr.c (class_has_finalize_method): New function.
9561 (expand_java_NEW): Generate calls for finalizer-free allocation.
9562 (build_invokevirtual): Fix java vtable layout for
9563 TARGET_VTABLE_USES_DESCRIPTORS.
9564 * java-tree.h (enum java_tree_index): New entries:
9565 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
9566 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
9567 (class_has_finalize_method): declare.
9568 (HAS_FINALIZER_P): New macro.
9569 * parse.y (patch_invoke): Generate calls for finalizer-free
9572 2001-12-12 Matthias Klose <doko@debian.org>
9574 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
9575 whitespace at end of line.
9577 2001-12-11 Tom Tromey <tromey@redhat.com>
9579 * lex.c (java_init_lex): Define wfl_to_string as
9580 gnu.gcj.runtime.StringBuffer unless generating bytecode.
9582 2001-12-11 Jeff Sturm <jsturm@one-point.com>
9584 * class.c (make_method_value): Use null_pointer_node to
9585 represent empty exception table.
9587 2001-12-10 Tom Tromey <tromey@redhat.com>
9589 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
9591 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
9593 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
9595 2001-12-09 Per Bothner <per@bothner.com>
9597 * check-init.c (current_switch_has_default): New static field.
9598 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
9599 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
9600 DEFAULT_EXPR seen, simulate a default alternative that copies state.
9602 2001-12-09 Tom Tromey <tromey@redhat.com>
9604 * check-init.c (check_init): Don't allow pre- or post- increment
9605 or decrement of final variable.
9606 (final_assign_error): Minor error message rewording.
9608 2001-12-08 Tom Tromey <tromey@redhat.com>
9610 * java-tree.h: Fixed typo.
9612 * gjavah.c (decompile_method): Don't decompile to `return this'
9615 * gjavah.c (cxx_keywords): Re-sorted.
9616 * lex.c (cxx_keywords): Re-sorted.
9618 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
9621 * gjavah.c (print_namelet): Clear subnamelets.
9622 (HANDLE_METHOD): Set `method_printed' earlier.
9624 2001-12-07 Tom Tromey <tromey@redhat.com>
9626 * lang.c (lang_f_options): Added
9627 optimize-static-class-initialization.
9628 (java_decode_option): Removed special case.
9630 2001-12-07 Per Bothner <per@bothner.com>
9632 * check-init.c (check_init): Fix typo freeing memory twice.
9634 2001-12-05 Per Bothner <per@bothner.com>
9636 Restore support for static class initialization optimization.
9637 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
9638 * check-init.c (check_int): At end of BLOCK handle initialization
9639 blocks, which used to be done in java_complete_expand_method but did
9640 not handle the case where check_for_initialization might allocate
9641 more than a word of bits.
9642 * decl.c (lang_make_tree): The smic field is now a tree.
9643 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
9644 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
9646 * parse.y (emit_test_initialization): Combine hash_lookup calls.
9648 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
9649 Change from a hash table to a list.
9650 (struct_lang_decl): Change field 'smic' to match.
9651 * class.c (add_method_1): Initialize
9652 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
9653 * parse.y (adjust_init_test_initialization): Removed - inlined into -
9654 (java_expand_method_bodies): -here, since 'smic' is now a list.
9655 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
9657 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
9659 * class.c (java_hash_compare_tree_node): Fix casts.
9661 2001-12-04 Per Bothner <per@bothner.com>
9663 * check-init.c: Handle definite unassignment to finals in addition
9664 to definite assignment.
9665 (loop_current_locals): New field.
9666 (num_current_locals, int start_current_locals, num_current_words):
9668 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
9669 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
9670 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
9671 (get_variable_decl, check_final_reassigned): New functions.
9672 (check_init, check_bool_init): Modify as needed for checking finals.
9673 (check_for_initialization): Take extra parameter and return void.
9674 Do extra start-up logic to check final fields for assignment.
9675 * parse.y (check_static_final_variable_assignment_flag,
9676 reset_static_final_variable_assignment_flag, check_final_assignment,
9677 check_final_variable_local_assignment_flag,
9678 reset_final_variable_indirect_assignment_flag,
9679 reset_final_variable_global_assignment_flag): Remove functions.
9680 (java_complete_expand_methods, outer_field_access_fix,
9681 patch_assignment): Remove no-longer used logic.
9682 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
9683 * parse.y (register_fields, java_complete_tree): Update accordingly.
9685 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
9686 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
9687 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
9689 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
9691 * java-tree.h (DECL FINAL): New bit-field.
9692 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
9693 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
9694 (DECL_INIT_CALLS_THIS): New macro.
9695 (struct lang_decl): New bit-field init_calls_this.
9696 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
9697 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
9698 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
9699 use it for both local variables and final fields.
9700 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
9702 (struct lang_type): Remove hfv bit-field.
9703 (check_for_initialization): Change to return void.
9705 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
9706 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
9707 * check-init.c (final_assign_error): New helper function.
9708 (check_final_reassigned, check_init): Use it.
9709 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
9711 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
9712 bit-fields to unsigned.
9714 2001-12-03 Per Bothner <per@bothner.com>
9716 * parse.y (patch_binop): Minor constant folding.
9718 * parse.y (build_current_thisn): Shorter 'buffer'.
9720 2001-12-03 Per Bothner <per@bothner.com>
9722 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
9723 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
9724 * jcf-write.c (generate_bytecode_insns): Remove support for
9725 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
9726 * check-init.c (check_init): Likewise.
9728 2001-12-03 Per Bothner <per@bothner.com>
9730 * verify.c (subroutine_nesting): New function.
9731 (verify_jvm_instructions): Use it to fix logic for checking that
9732 we're done with the current subroutine.
9734 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
9735 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
9737 2001-12-03 Per Bothner <per@bothner.com>
9739 * jcf.h: Fix obvious typo in comment.
9740 * typeck.c (build_null_signature): Add comment.
9742 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
9744 * expr.c: Remove leading capital from diagnostic messages, as
9745 per GNU coding standards.
9746 * jcf-io.c: Similarly.
9747 * jcf-parse.c: Similarly.
9748 * jv-scan.c: Similarly.
9749 * jvspec.c: Similarly.
9750 * mangle.c: Similarly.
9752 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
9753 Alexandre Petit-Bianco <apbianco@redhat.com>
9755 * expr.c (build_java_arrayaccess): Call save_expr on array for
9756 correct evaluation order, modified comment, fixed indentation.
9757 * parse.y: (patch_assignment): Correctly extract the array base
9758 from the tree generate by build_java_arrayaccess, added comments.
9759 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
9760 Fixes PR java/3096, PR java/3803, PR java/3965.
9762 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
9764 * expr.c (expand_byte_code): Remove trailing periods from messages.
9765 * jcf-parse.c (load_class, jcf_parse): Similarly.
9766 * jcf-write.c (generate_classfile): Similarly.
9767 * lex.c (java_lex): Similarly.
9769 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9771 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
9773 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
9775 * Make-lang.in (java.generated-manpages): New dummy target.
9777 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9779 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9781 (lang_specific_pre_link): Use set_input to set input_filename.
9783 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9784 (main): Fix definition.
9785 Strip `main' from classname.
9788 2001-11-18 Roger Sayle <roger@eyesopen.com>
9790 * parse.h (java_expand_switch): Remove old prototype.
9792 2001-11-18 Tom Tromey <tromey@redhat.com>
9794 Fix for PR java/1401:
9795 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
9797 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
9800 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
9802 * lang.c (finish_parse): Rename to java_finish.
9803 (LANG_HOOKS_FINISH, java_finish): New.
9805 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
9807 * decl.c (init_decl_processing): Rename java_init_decl_processing.
9808 * java-tree.h: New prototype.
9809 * lang.c (java_init): Update prototype. Combine with old init_parse.
9811 2001-11-13 Tom Tromey <tromey@redhat.com>
9813 * gjavah.c (method_signature): New global.
9814 (HANDLE_METHOD): Set it.
9815 (decompile_return_statement): New function.
9816 (decompile_method): Use it.
9817 (print_method_info): Removed `synth' argument.
9819 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9821 * java-tree.h (java_set_yydebug): New.
9822 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
9823 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
9824 (print_lang_decl, print_lang_type, print_lang_identifier,
9825 print_lang_statistics, lang_print_xnode): Remove.
9827 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9829 * jcf-parse.c (init_lex): Remove.
9830 * lang.c (language_string, lang_identify): Remove.
9831 (struct lang_hooks): Constify.
9832 (LANG_HOOKS_NAME): Override.
9833 (init_parse): Update.
9835 2001-11-08 Andreas Franck <afranck@gmx.de>
9837 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
9838 program_transform_name the way suggested by autoconf.
9839 (java.install-common): Also transform auxiliary program names with
9840 program_transform_name.
9842 2001-11-08 Tom Tromey <tromey@cygnus.com>
9844 * parse.y (trap_overflow_corner_case): New rule.
9845 (unary_expression): Use it.
9846 * lex.c (java_init_lex): Don't set minus_seen.
9847 (yylex): Don't use minus_seen. Communicate overflow to parser for
9849 (error_if_numeric_overflow): New function.
9850 * parse.h (minus_seen): Removed field.
9851 (JAVA_RADIX10_FLAG): New define.
9853 2001-11-07 Tom Tromey <tromey@redhat.com>
9855 Patch for PR java/1414:
9856 * parse.y (case_label_list): New global.
9857 (goal): Register case_label_list with GC.
9858 (java_complete_lhs): Save new case on case_label_list.
9859 (patch_switch_statement): Check for duplicate case labels.
9861 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9863 * parse.y (patch_assignment): Removed unused third argument.
9864 (java_complete_lhs): Removed unused third argument to patch_assignment.
9866 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9868 * lang.c: Include langhooks-def.h.
9869 * Make-lang.in: Update.
9871 2001-10-31 Zack Weinberg <zack@codesourcery.com>
9873 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9875 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9877 * mangle.c (find_compression_record_match): Don't match compression
9878 records for package name elements unless they occur at the start of
9879 the name. Fix for PR java/4717.
9881 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9883 * expr.c (expand_java_field_op): Don't special-case references to
9884 java.lang.PRIMTYPE.TYPE.
9885 (build_primtype_type_ref): Removed.
9886 * java-tree.h (build_primtype_type_ref): Remove prototype.
9887 * parse.y (maybe_build_primttype_type_ref): Removed.
9888 (complete_function_arguments): Don't special-case references to
9889 java.lang.PRIMTYPE.TYPE.
9890 (patch_assignment): Likewise.
9891 (array_constructor_check_entry): Likewise.
9893 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
9895 * mangle.c (static tree compression_table): Fixed leading comment.
9896 * parse.h (struct parser_ctxt): Fixed field comment.
9897 * parse.y (check_pkg_class_access): New prototype, fixed leading
9898 comment, new parameter used to emit error only if passed as true.
9899 (parse_check_super): Pass extra argument to check_pkg_class_access.
9900 (do_resolve_class): Likewise.
9901 (process_imports): Likewise.
9902 (read_import_dir): Fixed indentation.
9903 (find_in_imports_on_demand): New local class_type_name. Local
9904 node_to_use deleted. while loop changed into for loop. Report
9905 multiple definition only for accessible classes. Improved error
9907 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
9908 assigned to parameter list, fixed indentation. while loop changed
9909 into for loop, restore TREE_CHAIN on local `tem' before the next
9912 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9914 * lang.c (lang_get_alias_set): Deleted.
9916 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9918 * gjavah.c (jni_print_char): Fix thinko in last change.
9920 * gjavah.c (jni_print_char, decode_signature_piece): Use
9921 safe-ctype macros and/or fold extra calls into fewer ones.
9922 * lex.c (java_read_unicode, java_lex): Likewise.
9923 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
9924 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
9925 * mangle_name.c (append_unicode_mangled_name,
9926 unicode_mangling_length): Likewise.
9928 2001-10-17 Richard Henderson <rth@redhat.com>
9930 * Make-lang.in (java/lang.o): Depend on langhooks.h.
9932 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
9934 * lang.c (langhooks.h): Included.
9935 (LANG_HOOKS_INIT): Redefined.
9936 (LANG_HOOKS_INIT_OPTIONS): Likewise.
9937 (LANG_HOOKS_DECODE_OPTION): Likewise.
9938 (struct lang_hooks lang_hooks): New initialization.
9940 2001-10-11 Per Bothner <per@bothner.com>
9942 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
9943 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
9944 The former is simpler, and jcf-write.c handles it better.
9945 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
9946 or WITH_CLEANUP_EXPR.
9947 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
9948 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
9950 * parse.y (patch_if_else_statement): If the condition is constant,
9951 optimize away the test.
9953 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9955 * parse.y (patch_cast): Call patch_string on the first operand of
9956 the incoming node, update it if necessary. Fixes PR java/4510.
9958 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9960 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
9961 when name qualifier matches a package name.
9963 2001-10-08 Tom Tromey <tromey@redhat.com>
9965 Fix for PR java/4489:
9966 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
9967 force a new label when computing `body_block'.
9969 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9971 * jcf-io.c (format_uint): Const-ify.
9972 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
9973 * lex.c (java_get_line_col): Likewise.
9974 * parse.y (build_incdec): Likewise.
9976 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
9978 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
9979 a NULL enclosing context if appropriate. Fixes PR java/4466.
9981 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
9983 * parse.y (patch_assignment): Use lvalue's original TYPE when
9984 building the final COMPOUND_EXPR.
9985 (try_reference_assignconv): Fixed leading comment.
9987 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
9989 * parse.y (check_final_variable_indirect_assignment): For
9990 COMPOUND_EXPR, return only if finals were found initialized
9991 properly, if not, keep on checking.
9992 (check_final_variable_global_assignment_flag): New local
9993 error_found, set when appropriate and used to decide whether to
9994 report uninitialized finals. Fixed typo in comment.
9996 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9998 * decl.c (init_decl_processing): Fixed typo in predef_filenames
9999 last three initializations. Fixes PR java/4360.
10001 2001-09-21 Richard Henderson <rth@redhat.com>
10003 * class.c (get_dispatch_table): Handle function descriptors.
10004 (build_dtable_decl): Likewise.
10005 * expr.c (build_invokevirtual): Likewise.
10007 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10009 * parse.y (patch_method_invocation): Build class initialization
10010 when static finals are used to qualify method invocation.
10011 Fixes PR java/4366.
10013 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
10015 * parse.h: (WFL_STRIP_BRACKET): Re-written using
10016 build_type_name_from_array_name.
10017 (STRING_STRIP_BRACKETS): New macro.
10018 * parse.y (build_type_name_from_array_name): New function.
10019 (array_creation_expression:): Accumulate []s instead of [s.
10020 (cast_expression:): Accumulate []s instead of [s after cast type
10022 (build_array_from_name): Local string deleted, use
10023 build_type_name_from_array_name.
10024 (build_unresolved_array_type): Accumulate []s instead of [s after
10026 (register_fields): Fixed comment.
10027 (resolve_class): Local name, base deleted, new locals tname and
10028 array_dims. Use build_type_name_from_array_name. Use array_dims to
10030 (purify_type_name): Use STRING_STRIP_BRACKETS.
10032 2001-09-18 Andreas Jaeger <aj@suse.de>
10034 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10035 * jv-scan.c: Likewise.
10037 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10039 * parse.y (patch_method_invocation): Inner class creation context
10040 check not enforced within constructors. Fixes PR java/1873.
10042 2001-09-16 Tom Tromey <tromey@redhat.com>
10044 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10045 NOTE_PUSH for single-case push. Fixes PR java/4189.
10047 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10049 * java-tree.h (TYPE_IMPORT_LIST): New macro.
10050 (TYPE_IMPORT_DEMAND_LIST): Likewise.
10051 (struct lang_type): New fields import_list and import_demand_list.
10052 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10053 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10054 (do_resolve_class): New local saved_enclosing_type, initialized,
10055 passed as parameter to find_in_imports and find_in_imports_on_demand.
10056 (find_in_imports): Added paramater enclosing_type, use its
10057 TYPE_IMPORT_LIST when applicable.
10058 (find_in_imports_on_demand): Added parameter enclosing_type, use
10059 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10060 declaration and initialization.
10061 (fold_constant_for_init): Switch/restore current_class to the
10062 appropriate context.
10064 2001-09-13 Mark Mitchell <mark@codesourcery.com>
10066 * verify.c (verify_jvm_instructions): Fix typo.
10068 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10070 * expr.c (expand_invoke): Const-ification.
10071 * parse.y (patch_method_invocation): Likewise.
10073 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10075 * gjavah.c (cxx_keywords): Const-ification.
10076 * keyword.gperf (java_keyword): Likewise.
10077 * lang.c (java_tree_code_name): Likewise.
10078 * lex.c (cxx_keywords): Likewise.
10079 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10081 2001-09-11 Richard Henderson <rth@redhat.com>
10083 * parse.h (ctxp_for_generation): Mark extern.
10085 2001-09-10 Richard Henderson <rth@redhat.com>
10087 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10089 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10091 * typeck.c (java_array_type_length, build_prim_array_type):
10092 Represent empty arrays by NULL index.
10094 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
10096 * java-tree.h (compile_resource_file): Grouped with other prototypes.
10097 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10099 2001-09-06 Anthony Green <green@redhat.com>
10101 * class.c (O_BINARY): Define if necessary.
10102 (registerResource_libfunc): Declare.
10103 (init_class_processing): Initilize registerResource_libfunc.
10104 (compile_resource_file): New function.
10105 * java-tree.h (resource_name): Declare.
10106 (compile_resource_file): Declare.
10107 * jcf-parse.c (yyparse): Handle compiling java resource files.
10108 * lang.c (java_decode_option): Handle -fcompile-resource option.
10109 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10111 * gcj.texi (Code Generation): Add documentation for -R flag.
10113 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10115 * jcf-write.c (generate_classfile): Issue an error in case of
10116 field/initial value mismatch.
10117 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10118 being initialized and we're generating bytecode.
10119 (java_complete_lhs): In MODIFY_EXPR section: added comments,
10120 set DECL_INITIAL properly when appropriate.
10124 2001-09-01 Per Bothner <per@bothner.com>
10126 * parse.y (maybe_yank_clinit): A field without an initializer is not
10127 relevant. All initializers except static final and constant require
10128 <clinit>, regardless of flag_emit_class_files.
10130 2001-08-31 Per Bothner <per@bothner.com>
10132 * class.c (set_constant_value): When not emitting class files, then a
10133 String ConstantValue is a utf8const_ptr_type.
10135 2001-08-30 Per Bothner <per@bothner.com>
10137 * jcf-write.c (generate_classfile): Check that field is primitive
10138 or string before emitting ConstantValue attribute.
10140 2001-08-30 Per Bothner <per@bothner.com>
10142 * parse.y (resolve_qualified_expression_name): If creating a
10143 COMPOUND_EXPR, set it's type correctly.
10145 2001-08-30 Per Bothner <per@bothner.com>
10147 * jcf-io.c (open_class): Set filename field.
10149 * jcf-parse,c (parse_class_file): Set current_function_decl
10150 for better error message when Code attribute is missing.
10152 * lang.c (put_decl_node, lang_print_error): Re-arrange for
10153 better diagnostics, especially for constructors.
10155 2001-08-30 Per Bothner <per@bothner.com>
10157 * jcf-write.c (generate_classfile): Don't write ConstantValue
10158 attribute if field is not final, for compatibility with jdk.
10160 * jcf-write.c (generate_classfile): Convert ConstantValue values
10161 to correct type. Work-around for front-end bug.
10162 * class.c (set_constant_value): Error if constant has wrong type.
10164 2001-08-30 Per Bothner <per@bothner.com>
10166 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
10167 "Double" are printed at verbosity 1.
10169 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
10171 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
10173 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10175 * parse.y (patch_assignment): Don't verify final re-assignment here.
10176 (java_complete_lhs): Verify assignments to finals calling
10177 patch_assignment. Verify re-assignments to finals before calling
10180 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
10182 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10185 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
10187 * lex.c (java_lex): new local found_hex_digits. Set and then used
10188 in test to reject invalid hexadecimal numbers.
10189 * parse.y (java_complete_tree): Prevent unwanted cast with
10190 initialized floating point finals.
10191 (patch_binop): Emit a warning when detecting a division by zero,
10192 mark result not constant, don't simplify non integer division.
10194 2001-08-28 Per Bothner <per@bothner.com>
10196 * jcf-write.c (generate_bytecode_insns): For increments and
10197 decrements just recurse to push constant. Improvement on Mark's patch.
10199 2001-08-28 Mark Mitchell <mark@codesourcery.com>
10201 * jcf-write.c (generate_bytecode_insns): Generate an integer to
10202 real conversion for increments and decrements of reals.
10204 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10206 * parse.y (resolve_qualified_expression_name): Handle unresolved
10207 qualified expressions, prevent numerical qualifiers, fixed typo.
10210 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10212 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10213 don't report anything but deprecated class when marked so. Handle
10215 (patch_method_invocation): Check deprecation on methods and types.
10216 (patch_binop): code becomes an enum tree_code, added default: to
10217 switch to handle that. Detect division by zero, try to fold and
10218 return before using a subroutine.
10220 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10222 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10223 file smaller than 4 bytes.
10224 * parse.y (check_inner_circular_reference): New function.
10225 (check_circular_reference): Likewise.
10226 (array_initializer:): Accept {,}.
10227 (java_check_circular_reference): Rewritten using
10228 check_circular_reference and check_inner_circular_reference.
10229 (java_complete_expand_method): Unconditionally save and restore
10230 the unpurged exception list.
10231 (build_dot_class_method_invocation): Unmangle signature parameter.
10233 2001-08-21 Tom Tromey <tromey@redhat.com>
10235 * decl.c (init_decl_processing): Add `throws' field to method
10237 * class.c (make_method_value): Compute `throws' field for method.
10239 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10241 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10242 circularity is detected.
10243 (ctors_unchecked_throws_clause_p): Fixed leading comment.
10245 2001-08-17 Richard Henderson <rth@redhat.com>
10247 * class.c (emit_register_classes): Add align parameter to
10248 call to assemble_integer.
10250 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
10252 * jcf-parse.c (load_class): New locals saved and class_loaded. If
10253 loading a class_or_name fails, try considering an innerclass name
10254 and load the enclosing context.
10255 * parse.y (resolve_inner_class): New function.
10256 (find_as_inner_class): Added leading comment.
10257 (register_incomplete_type): Keep the current context as enclosing
10258 context for JDEP_FIELD dependencies.
10259 (do_resolve_class): Locals new_class_decl and super initialized to
10260 NULL. Call resolve_inner_class, explore the enclosing context
10261 superclass if necessary.
10264 2001-08-16 Tom Tromey <tromey@redhat.com>
10266 * jcf-dump.c (main): Updated for change to jcf_path_seal.
10267 * gjavah.c (main): Updated for change to jcf_path_seal.
10268 * lang.c (version_flag): New global.
10269 (java_decode_option): Recognize `-version'.
10270 (java_init): Update for change to jcf_path_seal.
10271 * jcf.h (jcf_path_seal): Added `print' argument.
10272 * jcf-path.c (jcf_path_seal): Added `print' argument.
10274 2001-08-13 Zack Weinberg <zackw@panix.com>
10276 * Make-lang.in (java/decl.o): Update dependencies.
10277 * decl.c: Include libfuncs.h, don't include toplev.h.
10279 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10281 * decl.c (init_decl_processing): exception_type_node,
10282 class_not_found_type_node, and no_class_def_found_type_node
10283 initialized. predef_filenames augmented accordingly.
10284 instinit_identifier_node initialized.
10285 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10286 * java-tree.h (enum java_tree_index): New entries
10287 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10288 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10289 (exception_type_node): New macro.
10290 (class_not_found_type_node): Likewise.
10291 (no_class_def_found_type_node): Likewise.
10292 (instinit_identifier_node): Likewise.
10293 (PREDEF_FILENAMES_SIZE): Adjusted.
10294 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10295 (struct lang_type): Fixed typo in bitfield name.
10296 (DECL_INSTINIT_P): New macro.
10297 (ID_INSTINIT_P): Likewise.
10298 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10300 * parse.y (encapsulate_with_try_catch): New function.
10301 (generate_instinit): Likewise.
10302 (build_instinit_invocation): Likewise.
10303 (ctors_unchecked_throws_clause_p): Likewise.
10304 (add_instance_initializer): Deleted.
10305 (build_instance_initializer): Likewise.
10306 (in_instance_initializer): Likewise.
10307 (check_method_redefinition): instinit$ not to be verified.
10308 (java_complete_expand_methods): Generate instinit$, simplified code.
10309 (build_dot_class_method): Eliminated unnecessary locals. Use
10310 encapsulate_with_try_catch, removed unnecessary code.
10311 (fix_constructors): New local iii. Use build_instinit_invocation.
10312 (patch_method_invocation): Added comment.
10313 (maybe_use_access_method): Don't consider instinit$.
10314 (find_applicable_accessible_methods_list): Shorten the search for
10316 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10317 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10318 (patch_throw_statement): Likewise. Fixed typo.
10320 2001-08-12 David Edelsohn <edelsohn@gnu.org>
10323 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10324 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10326 (lang_specific_pre_link): Use set_input to set input_filename.
10327 Append `main' here.
10328 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10329 (main): Fix definition.
10330 Strip `main' from classname.
10333 2001-08-11 Zack Weinberg <zackw@panix.com>
10335 * lex.h: Don't include setjmp.h. Don't define
10336 SET_FLOAT_HANDLER or prototype set_float_handler.
10338 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10340 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10341 `poplevel' in the right order.
10343 2001-08-09 Richard Henderson <rth@redhat.com>
10345 * Make-lang.in (class.o): Depend on TARGET_H.
10346 * class.c (emit_register_classes): Use target hooks instead of
10347 assemble_constructor and assemble_destructor.
10349 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
10351 * check-init.c (flags.h): Include
10352 (check_init): Don't report uninitialized static class
10353 initialization flags, don't free bit index when doing static class
10354 initialization optimization.
10355 (check_for_initialization): Return type changed to `unsigned int.'
10356 (attach_initialized_static_class): New function.
10357 * class.c (add_method_1): Create the initialized static class
10358 table if necessary.
10359 (finish_class): Always emit deferred inline methods.
10360 * decl.c (emit_init_test_initialization): Moved to expr.c
10361 (complete_start_java_method): Don't traverse
10362 DECL_FUNCTION_INIT_TEST_TABLE.
10363 (lang_mark_tree): Mark hash tables in function decls.
10364 * expr.c (emit_init_test_initialization): Moved from decl.c.
10365 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10366 initialization flag, set DECL_CONTEXT and
10367 LOCAL_CLASS_INITIALIZATION_FLAG.
10368 (java_lang_expand_expr): Emit initialization code for static class
10369 initialized flags when entering block, if necessary.
10370 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10371 * java-tree.h (flag_optimize_sci): New global variable declaration.
10372 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10373 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10374 (LOCAL_FINAL_P): Fixed typo in comment.
10375 (FINAL_VARIABLE_P): Likewise.
10376 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10377 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10378 (struct lang_decl): New fields `ict', `smic' and `cif.'
10379 (check_for_initialization): New returned value for global.
10380 (attach_initialized_static_class): New global function.
10381 (STATIC_CLASS_INIT_OPT_P): New macro.
10382 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10383 * lang.c (java_decode_option): Handle
10384 `-fno-optimize-static-class-initialization'
10385 * parse.y (start_complete_expand_method): New function.
10386 (java_expand_method_bodies): Likewise.
10387 (attach_init_test_initialization_flags): Likewise.
10388 (adjust_init_test_initialization): Likewise.
10389 (emit_test_initialization): Likewise.
10390 (java_complete_expand_methods): Nullify abstract and native method
10392 (java_complete_expand_method): New locals `fbody', `block_body'
10393 and `exception_copy.' Reorganized: directly return on empty method
10394 bodies, call `start_complete_expand_method', remember definitely
10395 initialized static class in function, don't expand method bodies.
10396 (java_expand_classes): Call `java_expand_method_bodies' before
10397 `finish_class' when compiling to native.
10398 (resolve_expression_name): Use `orig' after building outer class
10400 (patch_invoke): Remember static method invocations.
10402 2001-08-06 Richard Henderson <rth@redhat.com>
10404 * class.c (emit_register_classes): Pass a symbol_ref and priority
10405 to assemble_constructor.
10407 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
10409 * java-tree.h (all_class_filename): New macro.
10410 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10411 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10412 newly created IDENTIFIER_NODE to `all_class_filename.'
10414 2001-08-01 Jeff Sturm <jsturm@one-point.com>
10416 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10417 Use ggc_add_tree_root to register roots.
10419 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10421 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10422 second operand calling check_init.
10423 * decl.c (complete_start_java_method): Swaped second and third
10424 arguments while creating WITH_CLEANUP_EXPR node.
10425 * jcf-write.c (generate_bytecode_insns): Use second operand
10426 instead of third when handling WITH_CLEANUP_EXPR.
10427 * parse.y (java_complete_lhs): Expand second operand of
10428 WITH_CLEANUP_EXPR nodes.
10429 (patch_synchronized_statement): Swaped second and third arguments
10430 while creating WITH_CLEANUP_EXPR node.
10432 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
10434 * parse.y (create_interface): Avoid cyclic inheritance report when
10435 syntax error encountered during class definition.
10438 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10440 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10442 (lang_specific_pre_link): Use set_input to set input_filename.
10443 Append `main' here.
10444 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10445 (main): Fix definition.
10446 Strip `main' from classname.
10449 2001-07-18 Tom Tromey <tromey@redhat.com>
10452 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10453 * lex.c (java_new_lexer): Use ICONV_CONST.
10454 (java_read_char): Likewise.
10455 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10456 (jv-scan$(exeext)): Likewise.
10458 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10460 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10461 * parse.y (check_class_interface_creation): Allow `private' if the
10462 enclosing is not an interface.
10463 (create_interface): Interface tagged public if the enclosing
10464 context is an interface.
10465 (create_class): Class tagged public if the enclosing context
10469 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10471 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10474 2001-07-14 Tim Josling <tej@melbpc.org.au>
10476 * check-init.c (check_init): Remove references to EXPON_EXPR.
10478 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10480 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10481 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
10484 2001-07-13 Tom Tromey <tromey@redhat.com>
10486 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10489 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10491 * parse.y (patch_method_invocation): Don't override primary if one
10492 is already provided, but let this$<n> be built. Fixed comment.
10494 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10496 * parse.y (empty_statement:): Report empty statement error only
10497 when found at class declaration level.
10500 2001-07-12 Tom Tromey <tromey@redhat.com>
10502 * expr.c (expand_load_internal): New function.
10503 (LOAD_INTERNAL): Use it.
10505 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
10507 * parse.y (verify_constructor_super): Compare anonymous class ctor
10508 args with `valid_method_invocation_conversion_p.'
10511 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10513 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10514 `-fsyntax-only.' Fixes PR java/3248
10516 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10518 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10520 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10522 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10523 current function is static. Fixes PR java/1970
10525 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10527 * parse.y (patch_method_invocation): Add enclosing context to ctor
10528 calls if necessary. Fixes PR java/2953
10530 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10532 * parse.y (resolve_package): Abort if qualified expression member
10534 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10537 2001-07-07 Zack Weinberg <zackw@stanford.edu>
10539 * verify.c: Don't use // comments.
10541 2001-07-05 Tom Tromey <tromey@redhat.com>
10543 * lang.c (flag_assume_compiled): Removed.
10544 * java-tree.h (flag_assume_compiled): Removed.
10545 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
10546 -fhash-synchronization, -fuse-divide-subroutine,
10547 -fcheck-references, -femit-class-file, -femit-class-files,
10548 -fassume-compiled. Updated --encoding information. Changed
10549 -foutput-class-dir to `-d'.
10551 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
10553 * jcf-parse.c (parse_class_file): Add lineno parameter to
10554 debug_start_source_file call.
10556 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
10558 * gcj.texi: Use gpl.texi.
10559 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
10560 dependencies and use doc/include in search path.
10562 2001-07-03 Jeff Sturm <jsturm@one-point.com>
10564 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
10565 `this'. If so, don't build instance initializers.
10567 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
10569 * parse.y (resolve_expression_name): Improved error message for
10570 inner class cases. Fixes PR java/1958
10572 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
10574 * lang.c: #include diagnostic.h
10575 (lang_print_error): Add a `diagnostic_context *' parameter.
10576 (java_dummy_print): Likewise.
10577 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
10579 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10581 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
10582 * jcf.h (typedef struct JCF): New bitfield `finished.'
10583 (JCF_FINISH): Set `finished.'
10584 (JCF_ZERO): Reset `finished.'
10587 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10589 * parse.y (class_body_declaration:): Don't install empty instance
10593 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10595 * class.c (set_super_info): Call `set_class_decl_access_flags.'
10596 (set_class_decl_access_flags): New function.
10597 * java-tree.h (set_class_decl_access_flags): New prototype.
10598 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
10599 (parse_class_file): New local `decl_max_locals.' Take wide types
10600 into account to compute DECL_MAX_LOCALS.
10601 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
10604 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
10606 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
10608 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10610 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
10611 * parse.y (do_resolve_class): Moved comments out to leading comment
10612 section. Removed local `start', New local `_ht' and
10613 `circularity_hash.' Record `enclosing' in hash table and search
10614 it to detect circularity. Use `enclosing' as an argument to
10615 `lookup_cl.' Free the hash table when done.
10617 2001-06-19 Tom Tromey <tromey@redhat.com>
10619 * lex.c (java_read_char): Disallow invalid and overlong
10620 sequences. Fixes PR java/2319.
10622 2001-06-05 Jeff Sturm <jsturm@one-point.com>
10624 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
10626 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10628 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
10629 arguments accordingly.
10631 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
10633 * gcj.texi: Move contents to just after title page.
10635 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
10637 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
10639 (patch_incomplete_class_ref): Build the class ref, build the class
10640 init if necessary, complete the tree.
10643 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10645 * parse.y (lookup_field_wrapper): Test `name' code.
10646 (resolve_qualified_expression_name): Test `qual_wfl' code.
10647 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
10648 handle `qual_wfl' by code.
10649 (maybe_build_primttype_type_ref): Test `wfl' code.
10651 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10653 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
10655 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
10656 the dvi file in the java directory.
10658 2001-05-25 Sam TH <sam@uchicago.edu>
10660 * gen-table.pl javaop.h jcf.h lex.h,
10661 parse.h: Fix header include guards.
10663 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
10665 * jv-scan.c (version): Update copyright year.
10667 2001-05-21 Per Bothner <per@bothner.com>
10669 * jcf-parse.c (read_class): If class is from .class or .zip file
10670 and it's already been read, don't push/pop parser context.
10672 2001-05-18 Per Bothner <per@bothner.com>
10674 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
10675 command line so the jvgenmain-generated main program comes first.
10677 2001-05-15 Tom Tromey <tromey@redhat.com>
10679 * class.c (build_utf8_ref): Don't generate identifier based on
10680 utf8const contents.
10682 2001-05-12 Richard Henderson <rth@redhat.com>
10684 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
10685 * expr.c (java_lang_expand_expr): Expand it.
10686 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
10687 calling build_exception_object_ref.
10688 * parse.y (catch_clause_parameter): Likewise.
10689 (build_dot_class_method): Likewise.
10690 (try_reference_assignconv): Likewise.
10691 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
10692 * jcf-write.c (generate_bytecode_insns): Likewise.
10694 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10696 * parse.y (build_unresolved_array_type): Set
10697 EXPR_WFL_QUALIFICATION on the newly created wfl.
10698 Fixes PR java/2538. Fixes PR java/2535.
10700 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10702 * parse.y (fix_constructors): Removed unnecessary assignment to
10703 local. Moved assignment to `this$<n>', fixed comments and
10705 (build_wfl_wrap): Fixed indentation.
10706 Fixes PR java/2598, java/2579 and java/2658.
10708 2001-05-03 Mo DeJong <mdejong@redhat.com>
10710 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
10711 check for byte swap.
10713 2000-05-02 Jeff Sturm <jsturm@one-point.com>
10715 * expr.c (build_class_init): Move MODIFY_EXPR
10716 outside of COND_EXPR. Remove variable `call'.
10718 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10720 * decl.c: NULL_PTR -> NULL.
10721 * jcf-write.c: Likewise.
10723 2001-05-01 Tom Tromey <tromey@redhat.com>
10725 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
10726 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
10727 * gcj.texi: Updated copyright text. Include fdl.texi.
10728 (Top): Link to new node.
10730 2001-05-01 Per Bothner <per@bothner.com>
10732 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
10734 2001-05-01 Per Bothner <per@bothner.com>
10736 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
10737 import_list contains the name, not the TREE_PURPOSE.
10739 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10741 * jcf-io.c (read_zip_member): Cast to long in comparison with
10744 * jvspec.c (lang_specific_driver): Initialize variables.
10746 * mangle.c (find_compression_record_match): Likewise.
10748 * typeck.c (build_null_signature): Provide static prototype. Mark
10749 parameter with ATTRIBUTE_UNUSED.
10751 * verify.c (verify_jvm_instructions): Initialize variable.
10753 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10755 * parse.y (do_resolve_class): Check for cyclic inheritance during
10756 inner class resolution.
10758 2001-04-27 Per Bothner <per@bothner.com>
10760 * parse.y (java_expand_classes): Don't change ctxp_for_generation
10761 while iterating, since that could cause gc to lose stuff.
10763 2001-04-26 Per Bothner <per@bothner.com>
10765 Fix method search wrt scope of inner classes to match JLS2.
10766 * typeck.c (build_null_signature): New static function.
10767 (has_method): New function. Uses build_null_signature and lookup_do.
10768 * java-tree.h (has_method): New declaration.
10769 * parse.y (find_applicable_accessible_methods_list): Do not search
10770 context of inner classes here.
10771 (patch_method_invocation): Search scope, ie. current and outer clases,
10772 for method matching simple name, to find class.
10774 2001-04-26 Per Bothner <per@bothner.com>
10776 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
10777 Fix thinko: If a single case, use if_icmpeq, not ifeq.
10779 * constants.c (find_methodref_with_class_index): New function.
10780 (find_methodref_index): Use find_methodref_with_class_index.
10781 * java-tree.h (find_methodref_with_class_index): New declaration.
10782 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
10783 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
10784 If context changed from interface to class, don't use invokeinterface.
10786 2001-04-25 Per Bothner <per@bothner.com>
10788 * verify.c (verify_jvm_instructions): For field instructions,
10789 check that field index is valid. For invoke instructions, check that
10790 method index is valid.
10792 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
10794 * config-lang.in (target_libs): Copy from $libgcj_saved.
10796 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10798 * decl.c (init_decl_processing): Add new class "protectionDomain"
10800 * class.c (make_class_data): Set initial value for "protectionDomain".
10802 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10804 * jvspec.c (lang_specific_driver): Fix memory allocation
10805 deficit, by using concat in lieu of xmalloc/sprintf.
10807 2001-04-20 Per Bothner <per@bothner.com>
10809 Fixes to compile multiple .class files at once.
10810 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
10811 * java-tree.h (CLASS_PARSED_P): New macro.
10812 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
10813 * jcf-parse.c (jcf_parse_source): Inline into read_class.
10814 (read_class): Avoid some code duplication.
10815 Don't call JCF_FINISH for a .class file - might be needed later.
10816 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
10817 rather than CLASS_LOADED_P, since latter implies class laid out.
10818 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
10819 * parse.y: Don't need to set CLASS_LOADED_P for array types.
10821 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10823 * Make-lang.in (java/boehm.o): Depend on toplev.h.
10825 * boehm.c: Include toplev.h.
10827 2001-04-06 Tom Tromey <tromey@redhat.com>
10828 Alexandre Petit-Bianco <apbianco@redhat.com>
10830 Fix for PR gcj/1404 and PR gcj/2332:
10831 * parse.y (build_array_from_name): If we use the type_wfl then
10832 accumulate dimensions from the original type as well.
10833 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
10835 2001-04-06 Tom Tromey <tromey@redhat.com>
10837 * parse.y (analyze_clinit_body): Return true if the second operand
10838 of a METHOD_EXPR is nonzero.
10840 2001-04-06 Tom Tromey <tromey@redhat.com>
10842 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
10844 ($(srcdir)/java/parse.c): Likewise.
10846 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10848 * gcj.texi: Use `which-gcj' instead of `which-g77.'
10849 (version-gcc): Initialized.
10850 (which-gcj): Likewise.
10852 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10854 * java-tree.h (struct lang_decl): New macro
10855 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
10856 * parse.y (build_instance_initializer): New function.
10857 (add_instance_initializer): Use it.
10858 (java_fix_constructors): Set `current_class' before fix pass.
10859 (fix_constructors): Just return if already fixed. Move `super()'
10860 invocation ahead. Use `build_instance_initializer.'
10861 Fixes PR java/1315.
10863 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10865 * parse.y (resolve_qualified_expression_name): Pass field's
10866 DECL_CONTEXT to `not_accessible_p.'
10867 (not_accessible_p): Changed parameters order in `inherits_from_p'
10870 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
10872 * lang-options.h: Add flag_check_references.
10874 2001-04-04 Per Bothner <per@bothner.com>
10876 * java-tree.h (CONSTANT_VALUE_P): New macro.
10877 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
10878 * parse.y (maybe_build_class_init_for_field): New static function.
10879 (resolve_expression_name, resolve_field_access): Use
10880 maybe_build_class_init_for_field instead of build_class_init
10881 This does not do the init if the field is compile-time-constant.
10882 (resolve_field_access): Simplify.
10884 * parse.y (fold_constant_for_init): Merge test into switch.
10886 2001-04-03 Zack Weinberg <zackw@stanford.edu>
10888 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
10890 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
10892 2001-04-02 Zack Weinberg <zackw@stanford.edu>
10894 * expr.c (pop_type_0): Save the result of the first
10895 lang_printable_name call in a scratch buffer, so it
10896 won't be clobbered by the second call.
10898 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10900 * parse-scan.y (array_type:): Rewritten.
10901 (type_declaration:): `empty_statement' replaces `SC_TK.'
10902 (class_member_declaration:): `empty statement' added.
10903 (method_body:): Simplified.
10904 (static_initializer:): Likewise.
10905 (primary_no_new_array:): Use `type_literals.'
10906 (type_literals:): New rule.
10907 (dims:): Set and update `bracket_count.'
10908 Fixes PR java/1074. Fixes PR java/2412.
10910 2001-03-28 Hans Boehm <boehm@acm.org>
10912 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
10913 (get_boehm_type_descriptor): Set type on returned value to be a
10914 pointer length integer.
10916 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10918 * expr.c (pop_type_0): Call `concat' rather than building the
10920 (pop_type): Add format specifier in call to `error'.
10922 * parse.y (patch_method_invocation): Avoid casting away
10925 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
10927 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
10929 2001-03-28 Richard Henderson <rth@redhat.com>
10931 IA-64 ABI Exception Handling:
10932 * Make-lang.in (except.o): Don't depend on eh-common.h.
10933 * check-init.c (check_init): Handle EXC_PTR_EXPR.
10934 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
10935 [soft_exceptioninfo_call_node]: Remove.
10936 [eh_personality_libfunc, lang_eh_runtime_type]: New.
10937 (end_java_method): No emit_handlers.
10938 * except.c (java_set_exception_lang_code): Remove.
10939 (method_init_exceptions): Don't call it.
10940 (prepare_eh_table_type): No CATCH_ALL_TYPE.
10941 (build_exception_object_ref): New.
10942 (expand_end_java_handler): Update for except.h name changes.
10943 (emit_handlers, expand_resume_after_catch): Remove.
10944 * expr.c (java_lang_expand_expr): Update for except.h name changes.
10945 (process_jvm_instruction): Use build_exception_object_ref.
10946 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
10947 (soft_exceptioninfo_call_node): Remove.
10948 (build_exception_object_ref): Declare.
10949 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
10950 soft_exceptioninfo_call_node. Move processing ...
10951 [EXC_PTR_EXPR]: ... here.
10952 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
10953 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
10954 (source_end_java_method): No java_set_exception_lang_code or
10956 (build_dot_class_method): Use build_exception_object_ref.
10957 (try_reference_assignconv): Check EXC_PTR_EXPR not
10958 soft_exceptioninfo_call_node.
10960 2001-03-28 Richard Henderson <rth@redhat.com>
10962 * java-tree.h (throw_node): Define as a single member of
10963 java_global_trees instead of a separate array.
10964 (JTI_THROW_NODE): New.
10965 * decl.c (throw_node): Don't declare.
10966 (init_decl_processing): Init a scalar throw_node.
10967 Don't register it for gc.
10968 * check-init.c (check_init): Reference scalar throw_node.
10969 * expr.c (build_java_athrow): Likewise.
10970 * jcf-write.c (generate_bytecode_insns): Likewise.
10971 * parse.h (BUILD_THROW): Likewise.
10973 2001-03-28 Richard Henderson <rth@redhat.com>
10975 * decl.c (end_java_method): Do not save and restore
10976 flag_non_call_exceptions.
10977 * parse.y (source_end_java_method): Likewise.
10978 * lang.c (flag_exceptions): Don't declare.
10979 (java_init_options): Set flag_non_call_exceptions. Set
10980 flag_exceptions here ...
10981 (java_init): ... not here.
10983 2001-03-27 Richard Henderson <rth@redhat.com>
10985 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
10986 exceptions_via_longjmp.
10988 * lang.c (flag_new_exceptions): Don't declare it.
10989 (java_init_options): Or set it.
10991 2001-03-27 Richard Henderson <rth@redhat.com>
10993 * decl.c (end_java_method): Rename asynchronous_exceptions to
10994 flag_non_call_exceptions.
10995 * parse.y (source_end_java_method): Likewise.
10997 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10999 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11001 2001-03-26 Mark Mitchell <mark@codesourcery.com>
11003 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11005 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
11007 * parse.y (find_as_inner_class): Follow current package
11008 indications not to mistakingly load an unrelated class.
11010 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11012 * constants.c (PUTN): Use memcpy, not bcopy.
11014 * lex.c (java_read_char): Use memmove, not bcopy.
11016 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11018 2001-03-23 Per Bothner <per@bothner.com>
11020 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
11021 macro for better error pin-pointing.
11022 * java-tree.h: Fix typo in comment.
11024 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
11025 Don't include jsr/goto in exception range.
11026 Check if start and end of exception range are the same (also TRY_EXPR).
11027 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11028 However, do emit the following goto even if try_block is empty.
11029 Defer freeing exception_decl until after the finalizer, to make
11030 sure the local isn't reused in the finalizer. Fixes PR java/1208.
11032 * parse.y (java_complete_lhs): If the try-clause is empty, just
11033 return the finally-clause and vice versa.
11035 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
11037 * gcj.texi (Input Options): documented the check for attribute
11038 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11039 * java-tree.h (flag_force_classes_archive_check): Declared extern.
11040 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11041 (jcf_parse): Check for the right classes archive if necessary.
11042 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11043 (jcf_parse_fields): Fixed indentation.
11044 * jcf-write.c (append_gcj_attribute): New function.
11045 (generate_classfile): Compute the attribute count, invoke
11046 `append_gcj_attribute'.
11047 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11048 turned into bit-fields. New bit-field `right_zip.'
11049 (JCF_ZERO): Set `right_zip' to zero.
11050 * lang-options.h (-fforce-classes-archive-check): Added flag.
11051 * lang.c (flag_force_classes_archive_check): New flag.
11052 (lang_f_options): New entry `force-classes-archive-check.'
11053 Fixes PR java/1213.
11055 2001-02-07 Andrew Haley <aph@redhat.com>
11057 * gcj.texi (Configure-time Options): Add -fcheck-references.
11058 * expr.c (build_java_indirect_ref): New function.
11059 (java_check_reference): New function.
11060 (build_java_array_length_access): Use build_java_indirect_ref to
11061 check for null references.
11062 (build_java_arrayaccess): Likewise.
11063 (build_get_class): Likewise.
11064 (build_field_ref): Likewise.
11065 (invoke_build_dtable): Likewise.
11066 (build_invokeinterface): Likewise.
11067 * lang.c (lang_f_options): Add flag_check_references.
11068 * jvspec.c (jvgenmain_spec): Add flag_check_references.
11069 * java-tree.h (flag_check_references): New variable.
11070 * lang.c (flag_check_references): Likewise.
11071 * parse.y (patch_invoke): Use java_check_reference.
11072 (patch_assignment): Allow for extra nesting in
11073 _Jv_CheckArrayStore.
11075 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
11077 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11078 * lex.c (cxx_keywords): Likewise.
11080 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11082 * parse.y (qualify_ambiguous_name): Broaden `length'
11083 recognition. Help MODIFY_EXPR be resolved as expression names.
11084 Fixes PR java/2066. Fixes PR java/2400.
11086 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
11088 * gjavah.c (process_file): Mark interface definitions with
11089 "__attribute__ ((java_interface))".
11091 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11093 * class.c (layout_class): Fixed push_super_field's second
11094 argument. Fixes PR java/2333.
11095 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11096 too early to lay innerclasses out.
11098 2001-03-20 Tom Tromey <tromey@redhat.com>
11099 Alexandre Petit-Bianco <apbianco@redhat.com>
11101 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11102 inside an array reference. Insertion of the array store check
11103 rewritten. Fixes PR java/2299.
11105 2001-03-20 Tom Tromey <tromey@redhat.com>
11107 * lex.c (java_read_unicode): Only accept leading `u's.
11109 2001-03-20 Tom Tromey <tromey@redhat.com>
11111 * jcf-parse.c (read_class): Initialize `class'.
11113 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11115 * jcf_parse.c (jcf_parse): Eliminate unused variable.
11117 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11119 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11120 (layout_class): Likewise.
11121 (layout_class_method): Likewise.
11122 (emit_register_classes): Likewise.
11123 * decl.c (builtin_function): Likewise.
11124 (give_name_to_locals): Likewise.
11126 2001-03-19 Per Bothner <per@bothner.com>
11128 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
11129 before trying to load an inner class.
11131 Fixes to process to command-line .class files in two passes.
11132 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
11133 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
11134 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
11135 * class.c (is_compiled_class): Fix for renamed flag.
11136 * parse.y (maybe_create_class_interface_decl): Likewise.
11137 * jcf-parse.c (yyparse): Also set if compiling .class files.
11138 * jcf-parse.c (read_class); Read current_class.
11139 (jcf_parse): Make static.
11140 (load_inner_classes): New function, with code moved from jcf_parse,
11141 because we need to inner classes after the command-line files are read.
11142 (yyparse): Set finput to NULL when it doesn't need to be closed.
11143 Reduce use of main_jcf (basically only for archive) and
11144 use finput instead of main_jcf->read_state.
11145 Inline jcf_figure_file_type into yyparse.
11146 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11147 Defer load_inner_classes and parse_class_file to a second pass,
11148 after we've correctly mapped command-line .clas fiels to classes.
11149 (jcf_figure_file_type): Removed.
11150 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
11151 (JCF_ZERO): Also clear zipd field.
11152 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
11154 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11156 * jcf-parse.c (yyparse): Change ch from char * to char.
11158 2001-03-19 Per Bothner <per@bothner.com>
11160 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
11161 Add constructed filelist-file at end, following -xjava. Thus any .o
11162 and library files are not affected by the -xjava. Also wrap
11163 explicit @FILE with -xjava and -xnone.
11165 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
11167 * class.c (build_static_field_ref): Call make_decl_rtl() after
11168 setting the DECL_EXTERNAL flag.
11170 2001-03-17 Per Bothner <per@bothner.com>
11172 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
11174 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
11175 when result is is needed (target is STACK_TARGET).
11177 * parse.h (JDEP_SOLV): Removed.
11178 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
11180 * parse.y (incomplete_class_list): Removed.
11181 (obtain_incomplete_type): Don't use or set incomplete_class_list.
11182 It doesn't work if resolve_class changes the name of an array type
11183 that is on the list and then someone else looks for the modified name.
11184 Also, seems liable to break when compiling multiple source files at
11185 once. So the simplest is to just remove incomplete_class_list -
11186 it is only a minor space win and it is not even clear it saves time.
11188 * parse.y (resolve_class): Remove unneeded promote_type.
11190 2001-03-15 Per Bothner <per@bothner.com>
11192 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
11193 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
11194 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11195 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11197 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
11198 * parse.y (java_expand_classes): Likewise.
11200 * parse.y (expand_start_java_method): Was only called once and had a
11201 misleading name, so inline in caller java_complete_expand_method.
11202 (enter_a_block): Likewise inline in enter_block and remove.
11204 Remove junk from when gcc/java was created (by copying from C/C++).
11205 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
11206 (struct binding_level): Remove fields keep, keep_if_subblocks,
11207 more_cleanups_ok, have_cleanups (which have never been used).
11208 (pushlevel, poplevel): Remove related useless code.
11210 * class.c (make_class_data): The class_dtable_decl (i.e. the
11211 vtable for Class) should be external, except when compiling Class.
11213 * jvspec.c (lang_specific_driver): Fix -C handling.
11214 Check -save-temps to see if temp @FILE should be deleted.
11215 Follow-up to/fix for February 16 patch.
11217 * verify.c (verify_jvm_instructions): Better error msgs for dup.
11218 (type_stack_dup): Remove no-longer neded error check.
11220 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
11222 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11223 to 'for_pointer'. If this type is for a pointer (argument) mangling,
11224 don't surround the element with 'N..E' if the type name is
11227 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11229 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11230 DECL_RTL_SET_P, etc.
11231 (make_method_value): Likewise.
11232 (get_dispatch_table): Likewise.
11234 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11236 2001-03-07 Tom Tromey <tromey@redhat.com>
11238 * config-lang.in (lang_requires): Define.
11240 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
11242 * typeck.c (convert): Check flag_unsafe_math_optimizations,
11243 not flag_fast_math.
11245 2001-03-05 Per Bothner <per@bothner.com>
11247 Fix a problem where rest_of_decl_compilation applied to
11248 class_dtable_decl causes problems because it was done too early,
11249 before output file was opened.
11250 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
11251 * class.c (class_dtable_decl): Add macro - element of class_roots.
11252 (make_class_data): Define class_dtable_decl.
11253 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
11255 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11257 * java/class.c, java/decl.c, java/java-tree.h: Replace all
11258 uses of 'boolean' with 'bool'.
11260 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11262 * lang-specs.h: Add zero initializer for cpp_spec field to all
11265 2001-02-16 Per Bothner <per@bothner.com>
11267 Handle compiling multiple input files at once, and @FILE syntax.
11268 * gcj.texi: Updated documentation to match.
11269 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
11270 * jcf-parse.c (parse_source_file): Split into ...
11271 (parse_source_file_1): New function - and:
11272 (parse_source_file_2): New function.
11273 (yyparse): On -ffilelist-file, open and scan named file.
11274 On first pass over files, only do parse_source_file_1.
11275 A new second pass calls parse_source_file_2 for each file to compile.
11276 (init_jcf_parse): Call init_src_parse.
11277 * jvspec.c (INDIRECT_FILE_ARG): New flag.
11278 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
11279 as multiple input file combined in one compilation.
11280 * lang-options.h: Add -ffilelist-file
11281 * lang.c (flag_filelist_file): New flag variable.
11282 (lang_f_options): Handle -ffilelist-file.
11283 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11284 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
11285 gclass_list - use global fields of src_parse_roots instead.
11286 * parse.y (src_parse_roots): New array.
11287 (incomplete_class_list, gclass_list): New macros.
11288 (push_parser_context, java_pop_parser_context,
11289 java_parser_context_resume): Don't fiddle with deleted fields.
11290 (various): Use incomplete_class gclass_list and global macros
11291 instead of parse_ctxt fields - the lists are global.
11292 (init_src_parse): New function.
11294 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11296 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11298 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11300 * parse.y (check_inner_class_access): Moved declaration of local
11301 `enclosing_decl_type' to the right location.
11303 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
11305 * parse.y (parser_check_super_interface): Don't call
11306 check_pkg_class_access for an inner interface.
11307 (parser_check_super): Don't call check_pkg_class_access for inner
11309 (do_resolve_class): Simplify enclosing type loop. Don't call
11310 check_pkg_class_access if CL and DECL are not set.
11311 (find_in_imports_on_demand): Set DECL if class_type needed to be
11312 loaded. Don't call check_pkg_class_access for an inner class.
11313 (check_inner_class_access): Rewritten to implement member access
11314 rules as per spec 6.6.1.
11315 (check_pkg_class_access): Handle the empty package correctly.
11316 (in_same_package): New function. Determine if two classes are in the
11319 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
11321 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11322 method into array types.
11323 * parse.y (patch_method_invocation): Bypass access check on clone call
11326 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
11328 * expr.c (build_instanceof): Check for arrays when trying fold to
11331 2001-02-15 Jim Meyering <meyering@lucent.com>
11333 * Make-lang.in (java.install-common): Depend on `installdirs'.
11334 (java.install-info): Likewise.
11336 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
11338 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11340 2001-02-14 Tom Tromey <tromey@redhat.com>
11341 Alexandre Petit-Bianco <apbianco@cygnus.com>
11343 Fix for PR java/1261.
11344 * typeck.c (build_java_array_type): Add public `clone' method to
11346 * parse.y (resolve_qualified_expression_name): Use current_class
11347 when checking for inaccessibility.
11348 (patch_method_invocation): Fixed error message when accessibility
11349 denied. Added `from_super' argument.
11351 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11353 * parse.y (resolve_class): Don't build a fake decl. Use the one
11355 * typeck.c (build_java_array_type): Build and assign decl to array
11358 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11360 * parse.y (not_accessible_p): Changed leading comment. Added extra
11361 `where' argument. Use it to enforce protected access rules.
11362 (resolve_qualified_expression_name): Added extra argument to
11364 (patch_method_invocation): Use argument `primary' to provide
11365 not_accessible_p with an extra argument.
11366 (lookup_method_invoke): Added extra argument to not_accessible_p.
11367 (search_applicable_method_list): Likewise.
11369 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
11371 * parse.y (resolve_qualified_expression_name): Try to resolve as
11372 an inner class access only if `decl' is a TYPE_DECL.
11374 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11376 * decl.c (classdollar_identifier_node): Initialize.
11377 * java-tree.h (enum java_tree_index): New entry
11378 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11379 (classdollar_identifier_node): New macro.
11380 (ID_CLASSDOLLAR_P): Likewise.
11381 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11382 (build_dot_class_method_invocation): Likewise.
11383 (find_applicable_accessible_methods_list): `class$' can't be
11386 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
11388 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11390 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11392 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11393 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11396 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11398 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11399 outside of the `__U' sequence too.
11400 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11403 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11405 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11407 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11409 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11410 (JVGENMAIN_OBJS): Likewise.
11411 * java-tree.h (append_gpp_mangled_name): New prototype.
11412 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11413 Removed cast calling `gcc_add_root.'
11414 * jvgenmain.c (mangle_obstack): New global, initialized.
11416 (do_mangle_class): Constify local `ptr.'
11417 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11418 append_gpp_mangle_name and update `count' if necessary.
11419 Use `mangle_obstack.'
11420 * mangle.c (append_unicode_mangled_name): Removed.
11421 (append_gpp_mangled_name): Likewise.
11422 (unicode_mangling_length): Likewise.
11423 (mangle_member_name): Return type set to `void.'
11424 (mangle_field_decl): Don't append `U' in escaped names.
11425 (mangle_method_decl): Likewise.
11426 (mangle_member_name): Just use `append_gpp_mangled_name.'
11427 * mangle_name.c: New file.
11429 2001-02-07 Per Bothner <per@bothner.com>
11431 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
11433 * check-init.c (check_init): Don't call done_alternative after
11434 processing loop code, as a LOOP_EXPR never terminates normally.
11436 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
11438 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11440 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11442 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11445 2001-02-06 Tom Tromey <tromey@redhat.com>
11447 * lex.c (java_new_lexer): Longer error message.
11449 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
11450 Alexandre Petit-Bianco <apbianco@cygnus.com>
11452 * typeck.c (build_prim_array_type): Added leading comment.
11453 (build_java_array_type): Moved locals out of
11454 block. Always create the `data' field, fixed alignment to match
11457 2001-02-04 Tom Tromey <tromey@redhat.com>
11459 * expr.c (java_lang_expand_expr): Don't bother recomputing
11460 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
11461 Fixes PR java/1866.
11463 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11465 * parse.y (process_imports): Save the original name of the import
11466 for better error report.
11468 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
11470 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11471 of macros used when compiling jvspec.c.
11472 * jvspec.c (lang_specific_driver): Link with the shared
11475 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11477 * check-init.c (check_init): Call internal_error instead of fatal.
11478 * expr.c (java_lang_expand_expr): Likewise.
11479 * jcf-parse.c (get_constant): Likewise.
11480 * mangle.c (java_mangle_decl): Likewise.
11481 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11482 (operator_string): Likewise.
11483 * check-init.c (check_init): Call abort instead of fatal.
11484 * class.c (build_class_ref): Likewise.
11485 * constants.c (write_constant_pool): Likewise.
11486 * decl.c (start_java_method): Likewise.
11487 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11488 (java_stack_dup, encode_newarray_type): Likewise.
11489 (build_java_array_length_access): Likewise.
11490 (build_java_check_indexed_type, expand_java_pushc): Likewise.
11491 (build_java_soft_divmod, build_invokeinterface): Likewise.
11492 * java-tree.h (INNER_CLASS_P): Likewise.
11493 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
11494 (give_name_to_class, get_class_constant): Likewise.
11495 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11496 (find_constant_index, generate_bytecode_conditional): Likewise.
11497 (generate_bytecode_insns, perform_relocations): Likewise.
11498 * lex.c (java_unget_unicode, java_lex): Likewise.
11499 * mangle.c (mangle_type, mangle_record_type): Likewise.
11500 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11501 (finish_mangling): Likewise.
11502 * parse.h (MARK_FINAL_PARMS): Likewise.
11503 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11504 (obtain_incomplete_type, java_complete_class): Likewise.
11505 (java_check_regular_methods, java_complete_expand_method): Likewise.
11506 (cut_identifier_in_qualified, check_deprecation): Likewise.
11507 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11508 (java_complete_lhs, lookup_name_in_blocks): Likewise.
11509 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11510 * typeck.c (set_local_type, parse_signature_type): Likewise.
11511 (parse_signature_string, build_java_signature): Likewise;
11512 (set_java_signature): Likewise.
11513 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11514 * class.c (add_method): Call fatal_error instead of fatal.
11515 (build_static_field_ref): Likewise.
11516 * expr.c (build_known_method_ref, expand_invoke): Likewise.
11517 * jcf-parse.c (get_constant, jcf_parse): Likewise.
11518 * lex.c (java_new_new_lexer): Likewise.
11519 * jv-scan.c (main): Likewise.
11520 (fatal_error): Renamed from fatal.
11521 * jcf-parse.c (yyparse): Call fatal_io_error instead of
11523 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11524 (yyparse): Likewise.
11525 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11526 * lex.c (java_get_line_col): Likewise.
11527 * jcf-parse.c (load_class): Make errors non-fatal.
11528 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
11530 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
11532 * jvgenmain.c (class_mangling_suffix): Remove unused string.
11533 (error): Remove unused function.
11534 (main): Don't use "__attribute__ alias" on generated class symbol.
11536 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11538 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11540 * parse.y (finish_method_declaration): Code accounting for WFLed
11541 method DECL_NAMEs deleted.
11542 (check_abstract_method_definitions): Likewise.
11543 (resolve_type_during_patch): Layout resolved type.
11544 * typeck.c (lookup_do): Removed unused local.
11546 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
11548 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
11549 * decl.c (init_decl_processing): Use integer_minus_one_node, not
11550 integer_negative_one_node.
11551 * expr.c (build_java_binop): Likewise.
11553 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
11555 * zextract.c (read_zip_archive): Read file_offset before writing
11556 zipd and consequently clobbering the header contents.
11558 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11560 * Make-lang.in: Remove all dependencies on defaults.h.
11561 * decl.c: Don't include defaults.h.
11562 * expr.c: Likewise.
11563 * parse.y: Likewise.
11565 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11567 * ChangeLog (2001-01-21): Fixed typo.
11568 * class.c (layout_class_method): Code accounting for WFLed
11569 method DECL_NAMEs deleted.
11570 * constant.c (find_methodref_index): Likewise.
11571 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
11572 * java-tree.h (DECL_FUNCTION_WFL): New macro.
11573 (struct lang_decl): New field `wfl'.
11574 (java_get_real_method_name): Prototype deleted.
11575 * mangle.c (mangle_method_decl): Code accounting for WFLed
11576 method DECL_NAMEs deleted.
11577 * parse.h (GET_METHOD_NAME): Macro deleted.
11578 * parse.y (reset_method_name): Deleted.
11579 (method_header): Set DECL_FUNCTION_WFL.
11580 (check_abstract_method_header): Code accounting for WFLed method
11581 DECL_NAMEs deleted.
11582 (java_get_real_method_name): Deleted.
11583 (check_method_redefinition): Code accounting for WFLed method
11584 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
11585 (java_check_regular_methods): Likewise.
11586 (java_check_abstract_methods): Likewise.
11587 (java_expand_classes): Don't call `reset_method_name.'
11588 (search_applicable_method_list): Use DECL_NAMEs instead of
11590 * typeck.c (lookup_do): Code accounting for WFLed method
11591 DECL_NAMEs deleted.
11593 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
11595 * lex.c (java_read_char): Check for EOF from getc first.
11597 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11599 * class.c (layout_class): Don't lay the superclass out if it's
11600 already being laid out.
11601 * jcf-parse.c (handle_innerclass_attribute): New function.
11602 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
11603 handle_innerclasses_attribute.
11604 (jcf_parse): Don't load an innerclasses if it's already being
11606 * jcf-write.c (append_innerclass_attribute_entry): Static
11607 `anonymous_name' and its initialization deleted. `ocii' and `ini'
11608 to be zero for anonymous classes.
11610 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11612 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
11614 * jcf-parse.c (set_source_filename): Use
11615 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
11617 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11619 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
11620 gets a unique asm name.
11622 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11624 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
11625 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11627 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
11628 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
11629 * parse.y (lookup_package_type_and_set_next): Deleted.
11630 (resolve_package): Removed unnecessary code.
11631 (find_applicable_accessible_methods_list): `finit$' can't be
11633 * verify.c (pop_argument_types): Added missing prototype.
11635 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
11637 * config-lang.in: Disable java by default.
11639 2001-01-23 Tom Tromey <tromey@redhat.com>
11641 * gcj.texi (Copying): New node.
11642 Added copyright information.
11644 2001-01-21 Per Bothner <per@bothner.com>
11646 Various fixes to allow compiling a compressed .jar/.zip archive.
11647 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
11648 (struct ZipFile): Add fields name and next (from ZipFileCache).
11649 (struct ZipDirectory): New field zipf points to owning ZipFile.
11650 * jcf.h (struct ZipDirectory): Add forward declaration.
11651 (struct JCF): Declare zipd field to have type struct ZipDirectory.
11652 Remove seen_in_zip and zip_offset fields.
11653 (JCF_SEEN_IN_ZIP): New macro.
11654 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
11655 * jcf-io.c: Change all ZipFileCache to ZipFile.
11656 (read_zip_member): New function.
11657 (open_in_zip): Call read_zip_member.
11658 * jcf-parse.c (find_in_current_zip): Remove function.
11659 (read_class): Merge in find_in_current_zip functionality.
11660 Call read_zip_member if needed.
11661 (parse_zip_file_entries): Use read_zip_member.
11662 (process_zip_dir): Update for removed and added JCF fields.
11663 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
11665 2001-01-21 Per Bothner <per@bothner.com>
11667 Minor optimization of static ggc roots.
11668 * jcf-parse.c (parse_roots): New static field.
11669 (current_field, current_method, current_file_list): Replace by macros
11670 naming fields of parse_roots.
11671 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
11672 * class.c (class_roots): New static field.
11673 (registered_class, fields_ident, info_ident, class_list):
11674 New macros naming fields of parse_roots.
11675 (build_static_field_ref): Don't register roots here.
11676 (layout_class): Static field list replaced by macro class_list.
11677 (init_class_processing): Call ggc_add_tree_root for 4 roots.
11678 Initialize fields_ident and info_ident here.
11680 2001-01-21 Per Bothner <per@bothner.com>
11682 * jcf-parse.c (ggc_mark_jcf): New function.
11683 (init_jcf_parse): Register current_jcf as ggc root.
11685 2001-01-21 Per Bothner <per@bothner.com>
11687 * lang.c (put_decl_node): Print method's name.
11689 2001-01-21 Per Bothner <per@bothner.com>
11691 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
11692 (verify_jvm_instructions): Use it, for better error messages on loads.
11694 2001-01-21 Per Bothner <per@bothner.com>
11696 * verify.c (merge_type_state): Still may have to merge even if
11697 LABEL_VERIFIED (label).
11699 2001-01-21 Per Bothner <per@bothner.com>
11701 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
11702 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
11704 2001-01-19 Per Bothner <per@bothner.com>
11706 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
11707 if expeting an interface type. Refines Tom's change of 2000-09-12.
11709 2001-01-18 Per Bothner <per@bothner.com>
11711 * gcj.texi (Input Options): Mention .java files.
11713 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11715 * lang-options.h (-Wunsupported-jdk11): Removed.
11716 * lang.c (flag_not_overriding): Deleted.
11717 (flag_static_local_jdk1_1): Likewise.
11718 (lang_W_options): Removed "unsupported-jdk11" entry.
11719 * parse.y (java_check_methods): Removed dead code.
11721 2001-01-17 Tom Tromey <tromey@redhat.com>
11723 Changes suggested by Per Bothner:
11724 * gcj.texi (Input Options): Don't mention input files.
11725 (Code Generation): Updated --main information.
11726 (Invoking jcf-dump): Mention that --javap is incomplete.
11727 From Alexandre Petit-Bianco:
11728 (Warnings): Don't mention -Wunsupported-jdk11.
11730 (Compatibility): Mention JDK 1.2-ness of libraries.
11731 (Resources): Mention resources used when writing gcj.
11733 2001-01-17 Tom Tromey <tromey@redhat.com>
11735 * gcj.texi: New file.
11736 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
11737 (java.info): Depend on gcj.info.
11738 (java/gcj.dvi): New target.
11739 (java.dvi): Depend on gcj.dvi.
11740 (java.install-info): Wrote.
11742 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
11744 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
11745 having called make_decl_rtl.
11747 2001-01-14 Per Bothner <per@bothner.com>
11749 Various patches to emit better messages on verification errors.
11750 * expr.c (push_type_0): Return error indication on stack overflow,
11751 instead of callinfg fatal.
11752 (push_type): Now just call push_type_0 (nd fatal on overflow).
11753 (pop_type_0): Return detailed error message (in a char** argument).
11754 (pop_type): If pop_type_0 fails, print error message.
11755 (pop_argument_types): Moved to verify.c.
11756 * verify.c (pop_argument_types): Moved from expr.c.
11757 Return a (possible) error message, rather than void.
11758 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
11759 (verify_jvm_instruction): Use new macros, improving error messages.
11760 For case OPCODE_astore use object_ptr_type_node.
11761 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
11762 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
11764 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
11765 constant, return body without wrapper. (Improves constant folding.)
11766 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
11768 2001-01-13 Per Bothner <per@bothner.com>
11770 * expr.c (expand_java_field_op): Assigning to a final field outside
11771 an initializer does not violate JVM spec, so should be warning, not
11772 error. (Sun's verifier does not complain - though MicroSoft's does.)
11774 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
11776 * gjavah.c (version), jcf-dump.c (version): Update copyright year
11779 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
11781 * parse.y (resolve_expression_name): Permit instance variables from
11782 enclosing context in super constructor call.
11783 (resolve_qualified_expression_name): Permit enclosing class's qualified
11784 "this" in super constructor call.
11786 2001-01-10 Mark Mitchell <mark@codesourcery.com>
11788 * class.c (build_utf8_ref): Remove last argument in call to
11789 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11790 (build_class_ref): Likewise.
11791 (build_static_field_ref): Likewise.
11792 (get_dispatch_table): Likewise.
11793 (layout_class_method): Likewise.
11794 (emit_register_classes): Likewise.
11795 * constants.c (build_constant_data_ref): Likewise.
11796 * decl.c (builtin_function): Likewise.
11797 (create_primitive_vtable): Likewise.
11798 * expr.c (build_known_method_def): Likewise.
11799 (build_jni_stub): Likewise.
11800 (java_lang_expand_expr): Likewise.
11802 2001-01-10 Tom Tromey <tromey@redhat.com>
11804 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
11806 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11808 * java-tree.h (lang_printable_name_wls): New prototype.
11809 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
11810 rather than `current_class' to print type name. Don't prepend type
11811 names when printing constructor names.
11812 (lang_printable_name_wls): New function.
11813 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
11814 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
11815 * parse.y (patch_method_invocation): Message tuned for constructors.
11816 (not_accessible_p): Grant `private' access from within
11817 enclosing contexts.
11819 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11821 All files with updated copyright when applicable.
11822 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
11823 * class.c (mangle_class_field): Function removed.
11824 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
11825 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
11826 (build_class_ref): Call `java_mangle_class_field' instead of
11827 `mangle_class_field.'
11828 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
11829 (layout_class): Call `java_mangle_decl' instead of
11830 `mangle_static_field.'
11831 (cxx_keywords): Initialized static array moved to `lex.c.'
11832 (layout_class_method): Changed leading comment. Simplified to
11833 call `java_mangle_decl.' Local `ptr' moved in for loop body.
11834 * decl.c (lang_mark_tree): Mark field `package_list.'
11835 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
11836 (struct lang_type): New field `package_list.'
11837 (unicode_mangling_length): Prototype removed.
11838 (append_gpp_mangled_name, append_gpp_mangled_classtype,
11839 emit_unicode_mangled_name): Likewise.
11840 (cxx_keyword_p): New prototype.
11841 (java_mangle_decl, java_mangle_class_field,
11842 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
11843 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
11845 * jvgenmain.c (main_method_prefix): Global variable removed.
11846 (main_method_suffix): Likewise.
11847 (do_mangle_classname): New function.
11848 (main): Call it. Format changed to accommodate new mangling scheme.
11849 * lex.c: (utf8_cmp): Conditionally prototyped.
11850 (cxx_keywords): Moved from class.c, conditionally defined.
11851 (utf8_cmp, cxx_keyword_p): Likewise.
11852 * mangle.c (obstack.h, ggc.h): Included.
11853 (mangle_field_decl): New function.
11854 (mangle_method_decl, mangle_type, mangle_pointer_type,
11855 mangle_array_type, mangle_record_type,
11856 find_compression_pointer_match, find_compression_array_match,
11857 find_compression_record_match,
11858 find_compression_array_template_match, set_type_package_list,
11859 entry_match_pointer_p, emit_compression_string, init_mangling,
11860 finish_mangling, compression_table_add, mangle_member_name): Likewise.
11861 (mangle_obstack): New global.
11862 (MANGLE_RAW_STRING): New macro.
11863 (unicode_mangling_length): Turned static.
11864 (append_unicode_mangled_name): Renamed from
11865 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
11866 replaces `obstack', removed from the parameter list.
11867 (append_gpp_mangled_name): Turned static. `mangle_obstack'
11868 replaces parameter `obstack', removed from the parameter list. Call
11869 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
11870 (append_gpp_mangled_classtype): Removed.
11871 (compression_table, compression_next): New static variables.
11872 * parse.y (temporary_obstack): Extern declaration removed.
11874 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11876 * parse.y (patch_binop): Compute missing type in error situations.
11878 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
11880 * class.c (make_class_data): Push initial value for "arrayclass".
11881 * decl.c (init_decl_processing): Add new class field "arrayclass".
11883 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
11885 From patha@softlab.ericsson.se:
11886 * parse.y (switch_label): Use build, not build1, to construct
11889 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
11891 * lang.c (lang_decode_option): Change -MA to -MP.
11892 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
11893 Update to new prototype; do quote targets.
11894 (jcf_dependency_write): Update.
11896 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
11898 Shorten primitive array allocation path:
11899 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
11900 to create new primitive arrays.
11901 * expr.c (build_newarray): If generating native code, call
11902 soft_newarray_node with a reference to the primitive TYPE identifier
11903 instead of type_value.
11905 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
11907 Fix for PRs gcj/312 and gcj/253:
11908 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
11909 dest if they arn't already.
11910 * class.c (layout_class): Call maybe_layout_super_class on
11911 superinterfaces also, but only if compiling from bytecode.
11913 Fix for PR gcj/373:
11914 * parse.y (create_class): Set ACC_STATIC if class is declared in an
11917 2000-12-15 Tom Tromey <tromey@redhat.com>
11919 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
11922 2000-12-14 Andrew Haley <aph@redhat.com>
11924 * boehm.c (mark_reference_fields): Change test to correctly detect
11927 2000-12-15 Andreas Jaeger <aj@suse.de>
11929 * config-lang.in (lang_dirs): Added.
11931 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
11933 * parse.y (end_artificial_method_body): Fixed undefined behavior.
11934 Credits go to rth for finding it.
11936 2000-12-13 Mike Stump <mrs@wrs.com>
11938 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
11940 2000-11-07 Tom Tromey <tromey@cygnus.com>
11942 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
11943 * lex.c (java_ignorable_control_p): Removed.
11944 (java_letter_or_digit_p): Removed.
11945 (java_start_char_p): New function.
11946 (java_read_char): Return `int', not `unicode_t'. Changed
11948 (java_read_unicode): Likewise.
11949 (java_read_unicode_collapsing_terminators): Likewise.
11950 (java_get_unicode): Likewise.
11951 (java_new_lexer): Initialize hit_eof.
11952 (java_parse_end_comment): Take `int' argument.
11953 (java_parse_doc_section): Likewise.
11954 (java_parse_escape_sequence): Don't allow backlash-newline.
11956 * lex.h (JAVA_DIGIT_P): Removed.
11957 (_JAVA_LETTER_OR_DIGIT_P): Removed.
11958 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
11959 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
11960 (JAVA_PART_CHAR_P): New macro.
11962 (JAVA_CHAR_ERROR): Now -2.
11963 (java_lexer): New field `hit_eof'.
11964 * chartables.h: New file.
11965 * gen-table.pl: new file.
11967 2000-11-20 Tom Tromey <tromey@cygnus.com>
11968 Alexandre Petit-Bianco <apbianco@cygnus.com>
11970 * parse.y (java_complete_lhs): Only allow compound assignment of
11971 reference type if type is String.
11973 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11975 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
11976 jcf-path.c: Likewise.
11978 2000-12-09 Anthony Green <green@redhat.com>
11980 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
11981 filestart and filename_length as int values.
11983 2000-12-07 Mo DeJong <mdejong@redhat.com>
11985 * jcf-io.c (find_class): Correct the logic that tests to see if a
11986 .java file is newer than its .class file. The compiler was
11987 incorrectly printing a warning when file mod times were equal.
11989 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
11991 * jvgenmain.c: Use ISPRINT not isascii.
11993 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11995 * parse.y (end_artificial_method_body): Fixed typo.
11997 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
11999 * parse.y (patch_method_invocation): Pick the correct enclosing
12000 context when creating inner class instances.
12003 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
12005 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12006 Update copyright year to 2000.
12008 2000-11-23 Anthony Green <green@redhat.com>
12010 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12011 Move current_file_list out of yyparse and make it static.
12013 * expr.c: Declare quick_stack and tree_list_free_list as static
12014 (init_expr_processing): Register quick_stack and
12015 tree_list_free_list roots.
12017 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12019 * parse.y (build_outer_field_access): New local `decl_ctx', use
12020 it. Check for field's context and current class immediate outer
12021 context inheritance.
12022 (outer_field_access_p): Consider fields inherited from the last
12024 (build_access_to_thisn): Stop at the last enclosing context if
12028 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
12030 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12032 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
12034 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12037 2000-11-20 Tom Tromey <tromey@cygnus.com>
12039 * jv-scan.c (help): Document --complexity.
12040 (options): Added --complexity.
12041 (flag_complexity): New global.
12042 (main): Call `report'.
12043 * parse-scan.y (complexity): New global.
12044 (if_then_statement, if_then_else_statement,
12045 if_then_else_statement_nsi, switch_block_statement_group,
12046 while_expression, do_statement, for_begin, continue_statement,
12047 throw_statement, catch_clause, finally, method_invocation,
12048 conditional_and_expression, conditional_or_expression,
12049 conditional_expression): Update complexity.
12050 (reset_report): Reset complexity.
12051 (report): New function.
12053 2000-11-20 Tom Tromey <tromey@cygnus.com>
12055 * lex.c (yylex): Added STRICT_TK case.
12056 * parse.y (STRICT_TK): Added.
12057 * parse-scan.y (STRICT_TK): Added.
12058 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12059 `;'. Use 4, not 3, with -k option. Correctly rename resulting
12061 * keyword.h: Rebuilt.
12062 * keyword.gperf (strictfp): Added.
12064 2000-11-20 Tom Tromey <tromey@cygnus.com>
12066 * lex.c (yylex): Recognize floating point constants with leading
12069 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12071 * java-tree.h (cyclic_inheritance_report): Constify.
12072 * parse.y (cyclic_inheritance_report): Likewise.
12074 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
12076 * parse.y (goal): Remove call to ggc_add_string_root.
12078 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
12080 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12081 Create string in scratch buffer, then pass to build_string.
12083 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
12085 * parse.y (issue_warning_error_from_context): Add
12088 2000-11-11 Anthony Green <green@redhat.com>
12090 * jcf-parse.c (process_zip_dir): Add finput parameter.
12091 (jcf_figure_file_type): Call process_zip_dir with appropriate
12094 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12096 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12097 * jcf-parse.c (jcf_figure_file_type): Likewise.
12099 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
12101 * parse.y (create_new_parser_context): Use memset () instead of
12104 2000-11-08 Tom Tromey <tromey@cygnus.com>
12106 * gjavah.c (process_file): Only include gcj/cni.h when generating
12109 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
12111 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12112 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12113 instead of bzero ().
12115 2000-11-05 Tom Tromey <tromey@cygnus.com>
12117 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12118 * lex.c (IS_ZERO): New define.
12119 (java_perform_atof): Error on floating point underflow.
12121 2000-11-04 Tom Tromey <tromey@cygnus.com>
12123 * lex.c (java_parse_escape_sequence): Only read two octal
12124 characters if the first one is greater than 3. Don't allow
12125 "octal" numbers to include the digits 8 or 9.
12127 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
12129 * Make-lang.in (java.distdir): Remove.
12131 2000-11-03 Tom Tromey <tromey@cygnus.com>
12133 * Make-lang.in (java.dvi): New target.
12134 Partial fix for PR other/567.
12136 * lang-options.h: Mention -Wout-of-date.
12137 * jcf-dump.c (flag_newer): New global.
12138 * gjavah.c (flag_newer): New global.
12139 * jcf-io.c (find_class): Only warn when flag_newer set.
12140 * lang.c (flag_newer): New global.
12141 (struct string_option): New declaration.
12142 (lang_W_options): New global.
12143 (process_option_with_no): New function.
12144 (lang_decode_option): Use it.
12146 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12147 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12150 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12151 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12152 * lex.c (java_read_unicode): Removed `term_context' argument.
12153 Recognize any number of `u' in `\u'.
12154 (java_read_unicode_collapsing_terminators): New function.
12155 (java_get_unicode): Use it.
12156 (java_lineterminator): Removed.
12157 (yylex): Produce error if character literal is newline or single
12158 quote. Return if eof found in middle of `//' comment. EOF in
12159 `//' comment is only an error if pedantic.
12160 (java_ignorable_control_p): New function.
12161 (java_parse_end_comment): Return if eof found in middle of
12164 * jv-scan.c (pedantic): New global.
12166 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12168 * parse.y (outer_field_access_p): Inherited fields aren't
12169 consider outer fields.
12170 (maybe_build_thisn_access_method): Use
12171 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12172 (resolve_expression_name): Trigger an error if a static field
12173 is being accessed as an outer field.
12175 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12177 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12180 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12182 * Make-lang.in: Move all build rules here from Makefile.in,
12183 adapt to new context. Wrap all rules that change the current
12184 directory in parentheses. Expunge all references to $(P).
12185 When one command depends on another and they're run all at
12186 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12187 all object-file generation rules. Delete obsolete variables.
12189 * Makefile.in: Delete.
12190 * config-lang.in: Delete outputs= line.
12192 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12194 * parse.y (patch_method_invocation): NULLify this_arg when already
12196 (maybe_use_access_method): Handle call to methods unrelated to the
12197 current class. Fixed comment.
12200 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12202 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12205 2000-10-24 Tom Tromey <tromey@cygnus.com>
12207 * lex.c (java_new_lexer): Initialize new fields. Work around
12208 broken iconv() implementations.
12209 (java_read_char): Swap bytes if required. Use fallback decoder if
12211 (byteswap_init, need_byteswap): New globals.
12212 (java_destroy_lexer): Only close iconv handle if it is in use.
12213 * lex.h (java_lexer): New fields read_anything, byte_swap,
12215 Made out_buffer unsigned.
12217 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12219 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12220 where an enclosing context can be set on the jdep.
12221 (do_resolve_class): Fixed identation.
12223 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12225 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12227 * jcf-reader.c (peek_attribute, skip_attribute): Only define
12230 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12232 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12234 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12236 * jcf-write.c (OP1): Update `last_bc'.
12237 (struct jcf_block): Fixed indentation and typo in comments. New
12239 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12240 follows `monitorenter'.
12241 * parse.y (patch_synchronized_statement): New local `tmp'. Call
12245 2000-10-16 Tom Tromey <tromey@cygnus.com>
12247 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12248 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12249 * lang-options.h: Added -MA, -MT, -MF..
12250 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12251 (DEPEND_TARGET_SET): New macro.
12252 (DEPEND_FILE_ALREADY_SET): Likewise.
12253 (init_parse): Handle new flags.
12254 * jcf.h (jcf_dependency_print_dummies): Declare.
12255 * Make-lang.in (s-java): Added mkdeps.o.
12256 * Makefile.in (BACKEND): Added mkdeps.o.
12257 (../gcjh$(exeext)): Added mkdeps.o.
12258 (../jcf-dump$(exeext)): Added mkdeps.o.
12259 * jcf-depend.c: Include mkdeps.h.
12260 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12261 add_entry): Removed.
12262 (jcf_dependency_reset): Rewrote.
12263 (dependencies): New global.
12264 (jcf_dependency_set_target): Rewrote.
12265 (jcf_dependency_add_target): Likewise.
12266 (jcf_dependency_add_file): Likewise.
12268 (print_ents): Removed.
12269 (jcf_dependency_write): Rewrote.
12270 (print_dummies): New global.
12271 (jcf_dependency_print_dummies): New function
12272 (jcf_dependency_write): Call deps_dummy_targets if required.
12274 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12276 * gjavah.c (add_class_decl): Removed unused variables `tname',
12277 `tlen' and `name_index'.
12278 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12279 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12280 in `wfl_operator' with value.
12281 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12282 (jcf_figure_file_type): Fixed identation.
12283 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12284 * parse.y (analyze_clinit_body): New function.
12285 (static_initializer:): Reset `current_static_block'.
12286 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12287 `wfl_operator' with new value.
12288 (lookup_cl): Use EXPR_WFL_FILENAME.
12289 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12290 analyze_clinit_body.
12291 (build_outer_field_access): Access to this$<n> built from
12292 current_class, not its outer context.
12293 (build_access_to_thisn): Fixed leading comment. Tidied things up.
12294 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12295 (patch_method_invocation): Use `is_static_flag' when already
12297 (patch_newarray): Removed assignment in ternary operator.
12299 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12301 * except.c (free_eh_ranges): Don't free `whole_range'.
12303 2000-10-15 Anthony Green <green@redhat.com>
12305 * decl.c (init_decl_processing): Call init_class_processing before
12308 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12310 * check-init.c (check_init): Fixed leading comment. Use
12312 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12313 (give_name_to_locals): Likewise.
12314 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12315 fields in lang_decl_var.
12316 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12317 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12318 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12319 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12320 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12321 (LOCAL_FINAL): Rewritten.
12322 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12323 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12324 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12325 `init_final' fields.
12326 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12327 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12328 (TYPE_HAS_FINAL_VARIABLE): New macro.
12329 (struct lang_type): Added `afv' field.
12330 * parse.y (check_static_final_variable_assignment_flag): New function.
12331 (reset_static_final_variable_assignment_flag): Likewise.
12332 (check_final_variable_local_assignment_flag): Likewise.
12333 (reset_final_variable_local_assignment_flag): Likewise.
12334 (check_final_variable_indirect_assignment): Likewise.
12335 (check_final_variable_global_assignment_flag): Likewise.
12336 (add_inner_class_fields): Use LOCAL_FINAL_P.
12337 (register_fields): Handle local finals and final variables.
12338 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12339 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12340 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12342 (java_complete_expand_methods): Loop to set
12343 TYPE_HAS_FINAL_VARIABLE. Call
12344 `reset_final_variable_local_assignment_flag' and
12345 `check_final_variable_local_assignment_flag' accordingly before
12346 and after constructor expansion. Call
12347 `reset_static_final_variable_assignment_flag'
12348 before expanding <clinit> and after call
12349 `check_static_final_variable_assignment_flag' if the
12350 current_class isn't an interface. After all methods have been
12351 expanded, call `check_final_variable_global_assignment_flag' and
12352 `check_static_final_variable_assignment_flag' if the current class
12354 (maybe_yank_clinit): Fixed typo in comment.
12355 (build_outer_field_access_methods): Removed old sanity check. Use
12356 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12357 Don't create access methods for finals.
12358 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12359 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12360 existing DECL_INIT has been processed.
12361 (java_complete_lhs): Likewise.
12362 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12363 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12365 (patch_assignment): Use LOCAL_FINAL_P.
12366 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12367 DECL_INITIAL is nullified.
12370 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12372 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12374 * Makefile.in (parse.c, parse-scan.c): Likewise.
12376 2000-10-12 Mark Mitchell <mark@codesourcery.com>
12378 * class.c (temporary_obstack): Remove.
12379 (make_class): Don't mess with obstascks.
12380 (push_class): Likewise.
12381 (set_super_info): Likewise.
12382 (add_method_1): Likewise.
12383 (add_method): Likewise.
12384 (add_field): Likewise.
12385 (build_utf8_ref): Likewise.
12386 (build_class_ref): Likewise.
12387 (build_static_field_ref): Likewise.
12388 (finish_class): Likewise.
12389 (push_super_field): Likewise.
12390 (layout_class): Likewise.
12391 (layout_class_methods): Likewise.
12392 (init_class_processing): Likewise.
12393 * constants.c (get_tag_node): Likewise.
12394 (build_constant_data_ref): Likewise.
12395 * decl.c (ggc_p): Remove.
12396 (copy_lang_decl): Use ggc_alloc.
12397 (complete_start_java_method): Don't mess with obstacks.
12398 (start_java_method): Likewise.
12399 (end_java_method): Likewise.
12400 * except.c (link_handler): Use xmalloc.
12401 (free_eh_ranges): New function.
12402 (method_init_exceptions): Use it.
12403 (add_handler): Use xmalloc.
12404 (expand_start_java_handler): Don't mess with obstacks.
12405 (prepare_eh_table_type): Likewise.
12406 (expand_end_java_handler): Likewise.
12407 * expr.c (push_value): Likewise.
12408 (create_label_decl): Likewise.
12409 (build_jni_stub): Likewise.
12410 (java_lang_expand_expr): Likewise.
12411 (note_instructions): Use xrealloc.
12412 (java_push_constant_from_pool): Don't mess with obstacks.
12413 (process_jvm_instruction): Likewise.
12414 * java-tree.h (cyclic_inheritance_report): Remove duplicate
12416 * jcf-parse.c (get_constant): Don't mess with obstacks.
12417 (read_class): Likewise.
12418 (jcf_parse): Likewise.
12419 * lex.c (expression_obstack): Remove.
12420 (java_lex): Don't use obstack_free.
12421 * parse.h (exit_java_complete_class): Don't mess with obstacks.
12422 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12423 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12424 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12425 * parse.y (gaol): Add more GC roots.
12426 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12427 (lookup_field_wrapper): Likewise.
12428 (obtain_incomplete_type): Don't mess with obstacks.
12429 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
12431 (craft_constructor): Don't mess with obstacks.
12432 (safe_layout_class): Likewise.
12433 (java_complete_class): Likewise.
12434 (source_end_java_method): Likewise.
12435 (build_outer_field_access_methods): Likewise.
12436 (build_outer_method_access_method): Likewise.
12437 (maybe_build_thisn_access_method): Likewise.
12438 (build_dot_class_method_invocation): Likewise.
12439 (java_complete_tree): Likewise.
12440 (java_complete_lhs): Likewise.
12441 (do_merge_string_cste): Likewise.
12442 (patch_string_cst): Likewise.
12443 (array_constructor_check_entry): Likewise.
12444 * typeck.c (build_java_array_type): Likewise.
12445 (parse_signature_string): Likewise.
12446 (build_java_signature): Likewise.
12448 2000-10-12 Tom Tromey <tromey@cygnus.com>
12450 Fix for PR gcj/356:
12451 * gjavah.c (add_class_decl): Don't special-case inner classes.
12452 (add_namelet): Likewise.
12454 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
12456 * java-tree.h: Constify current_encoding.
12457 * lang.c: Constify current_encoding.
12459 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
12461 * jvgenmain.c (class_mangling_suffix): Omit `.'.
12462 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12464 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12466 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12467 patch. Fixes gcj/340.
12469 2000-10-10 Tom Tromey <tromey@cygnus.com>
12471 * lex.c (java_new_lexer): Initialize out_first and out_last
12473 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12475 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12477 * parse.y (pop_current_osb): New function.
12478 (array_type:): Use `dims:', changed actions
12479 accordingly. Suggested by Anthony Green.
12480 (array_creation_expression:): Used pop_current_osb.
12481 (cast_expression:): Likewise.
12482 (search_applicable_method_list): Fixed indentation.
12484 2000-10-08 Anthony Green <green@redhat.com>
12486 * parse.y (array_type_literal): Remove production.
12487 (type_literals): Refer to array_type, not array_type_literal.
12489 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12491 Patch contributed by Corey Minyard.
12492 * decl.c (check_local_named_variable): New function.
12493 (tree check_local_unnamed_variable): Likewise.
12494 (find_local_variable): Splitted. Call check_local_{un}named_variable.
12496 2000-10-07 Anthony Green <green@redhat.com>
12498 * class.c (layout_class): Handle case where superclass can't be
12501 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
12503 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12506 2000-10-05 Tom Tromey <tromey@cygnus.com>
12508 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12509 * jvgenmain.c (class_mangling_prefix): Removed.
12510 (class_mangling_suffix): New global.
12512 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12514 (print_method_info): Handle overrides for static and final
12516 (process_file): Generate declaration for class object field.
12517 * class.c (cxx_keywords): New array.
12518 (utf8_cmp): New function.
12519 (cxx_keyword_p): New function.
12520 (layout_class_method): Mangle C++ keywords by appending `$'.
12521 (mangle_field): New function.
12522 (mangle_class_field): Use mangle_field. Mangle class name as
12524 (mangle_static_field): Use mangle_field.
12526 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12528 * decl.c (find_local_variable): Removed uncessary type check and
12529 fixed range check typo. From Corey Minyard.
12531 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12533 * decl.c (give_name_to_locals): New local `code_offset'. Call
12534 `maybe_adjust_start_pc'.
12535 * expr.c (note_instructions): New function.
12536 (expand_byte_code): Don't collect insn starts here.
12537 (peek_opcode_at_pc): New function.
12538 (maybe_adjust_start_pc): Likewise.
12539 * java-tree.h (maybe_adjust_start_pc): Declare.
12540 (note_instructions): Likewise.
12541 * jcf-parse.c (parse_class_file): Call `note_instructions'.
12543 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12545 * parse.y (field_access:): Fixed indentation.
12546 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
12548 2000-09-07 Tom Tromey <tromey@cygnus.com>
12550 Fix for PR gcj/307:
12551 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
12552 JPRIMITIVE_TYPE_P, for arithmetic operators.
12553 (patch_method_invocation): Indentation fix.
12554 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
12555 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
12556 (do_unary_numeric_promotion): Cleaned up code.
12557 (valid_cast_to_p): Handle boolean correctly.
12559 2000-09-27 Tom Tromey <tromey@cygnus.com>
12561 * lex.c (java_read_unicode): Reset bs_count when finished with
12564 2000-10-01 Mark Mitchell <mark@codesourcery.com>
12567 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
12568 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
12569 (typeck.o): Depend on ggc.h.
12570 * class.c (add_method_1): Use GC functions for allocation.
12571 (init_class_processing): Register roots.
12572 * decl.c (ggc_p): Set to 1.
12573 (pending_local_decls): Make it static.
12574 (push_jvm_slot): Use GC functions for allocation.
12575 (init_decl_processing): Register roots.
12576 (give_name_to_locals): Use GC functions for allocation.
12577 (lang_mark_tree): New function.
12578 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
12579 functions for allocation.
12580 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
12581 * lex.c (java_lex): Use build_string, rather than replicating it
12583 * parse.y (goal): Add more roots.
12584 (mark_parser_ctxt): New function.
12585 * typeck.c: Include ggc.h.
12587 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12589 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
12590 contains something else than MODIFY_EXPR.
12592 2000-09-23 Mark Mitchell <mark@codesourcery.com>
12594 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
12595 * Makefile.in (parse.o): Depend on ggc.h.
12596 (class.o): Likewise.
12597 (constants.o): Likewise.
12598 (decl.o): Likewise.
12599 (expr.o): Likewise.
12600 (jcf-parse.o): Likewise.
12601 (jcf-write.o): Likewise.
12602 (mangle.o): Likewise.
12603 * class.c: Include ggc.h.
12604 (build_static_field_ref): Register GC roots.
12605 (layout_class): Likewise.
12606 (init_class_processing): Likewise.
12607 * constants.c: Include ggc.h.
12608 (current_constant_pool_data_ref): Remove.
12609 (tag_nodes): Move it to ...
12610 (get_tag_node): ... here. Register GC roots.
12611 * decl.c: Include ggc.h. Remove many global tree definitions.
12612 (throw_node): Define.
12613 (java_global_trees): Likewise.
12614 (predef_filenames): Make the size a constant.
12615 (init_decl_processing): Adjust accordingly.
12616 (init_decl_processing): Call init_jcf_parse. Register GC roots.
12617 * expr.c: Include ggc.h.
12618 (init_expr_processing): Register GC roots.
12619 (build_invokeinterface): Likewise.
12620 * java-tree.h: Replace extern tree declarations with macros.
12621 (java_global_trees): New variable.
12622 (java_tree_index): New enumeration.
12623 (init_jcf_parse): Declare.
12624 * jcf-parse.c: Include ggc.h.
12625 (current_class): Remove declaration.
12626 (main_class): Likewise.
12627 (all_class_list): Likewise.
12628 (predefined_filename_p): Adjust for constant size of
12630 (init_jcf_parse): New function.
12631 * jcf-write.c: Include ggc.h.
12632 (generate_classfile): Register GC roots.
12633 (append_synthetic_attribute): Likewise.
12634 (append_innerclass_attribute_entry): Likewise.
12635 * lang.c: Include ggc.h.
12636 (lang_print_error): Register GC roots.
12637 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
12639 * parse.y: Include ggc.h.
12640 (wfl_operator): Remove.
12641 (goal): Register GC roots.
12642 (java_pop_parser_context): Adjust for new field names.
12643 (java_parser_context_save_global): Likewse.
12644 (java_parser_context_restore_global): Likewise.
12645 (java_parser_context_suspend): Likewise.
12646 (java_parser_context_resume): Likewise.
12647 (verify_constructor_circularity): Register GC roots.
12648 (lookup_cl): Likewise.
12649 (java_reorder_fields): Likewise.
12650 (build_current_this): Likewise.
12651 (class_in_current_package): Likewise.
12652 (argument_types_convertible): Likewise.
12653 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
12655 2000-09-14 Tom Tromey <tromey@cygnus.com>
12657 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
12659 2000-09-13 Tom Tromey <tromey@cygnus.com>
12661 * jcf-parse.c: Include <locale.h>.
12662 * jv-scan.c: Include <locale.h>.
12664 2000-09-12 Tom Tromey <tromey@cygnus.com>
12666 * expr.c (pop_type_0): Return `Object' if trying to merge two
12668 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
12669 interface types; `Object' is always a valid supertype.
12671 2000-09-12 Tom Tromey <tromey@cygnus.com>
12674 * jv-scan.c (help): Document --encoding.
12675 (options): Added `encoding' entry.
12676 (OPT_ENCODING): New define.
12677 (main): Handle --encoding.
12678 Include <langinfo.h> if nl_langinfo exists.
12679 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
12681 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
12682 (parse_source_file): Correctly call java_init_lex. Added `finput'
12683 argument. Use nl_langinfo to determine default encoding.
12684 * java-tree.h (current_encoding): Declare.
12685 * parse.y (java_parser_context_restore_global): Don't restore
12687 (java_parser_context_save_global): Don't set `finput' field.
12688 (java_pop_parser_context): Don't restore `finput'. Free old lexer
12690 * lang.c (current_encoding): New global.
12691 (lang_decode_option): Recognize `-fencoding='.
12692 (finish_parse): Don't close finput.
12693 * parse.h (struct parser_ctxt): Removed `finput' and
12694 `unget_utf8_value' fields. Added `lexer' field.
12695 (java_init_lex): Fixed declaration.
12696 * lex.c (java_new_lexer): New function.
12697 (java_destroy_lexer): Likewise.
12698 (java_read_char): Added `lex' argument. Handle iconv case.
12699 (java_read_unicode): Added `lex' argument. Count backslashes in
12701 (java_init_lex): Added `finput' and `encoding' arguments. Set
12702 `lexer' field in ctxp.
12703 (BAD_UTF8_VALUE): Removed.
12704 (java_lex): Handle seeing UEOF in the middle of a string literal.
12705 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
12706 (java_lexer): New structure.
12709 (DEFAULT_ENCODING): New define.
12710 (java_destroy_lexer): Declare.
12712 2000-09-12 Tom Tromey <tromey@cygnus.com>
12714 Fix for PR gcj/343:
12715 * lex.c (java_init_lex): Initialize java_io_serializable.
12716 * parse.y (java_io_serializable): New global.
12717 (valid_ref_assignconv_cast_p): An array can be cast to
12720 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
12722 * decl.c, expr.c: Include defaults.h if not already included.
12723 Don't define the *_TYPE_SIZE macros.
12725 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
12727 * typeck.c (build_java_array_type): Correct first parameter
12728 in ADJUST_FIELD_ALIGN invocation.
12730 2000-09-06 Tom Tromey <tromey@cygnus.com>
12732 * lang-specs.h: Also recognize `-femit-class-files'.
12734 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12736 * verify.c (merge_types): Load the types to merge if necessary.
12738 2000-09-02 Anthony Green <green@redhat.com>
12740 * jcf-io.c: Include zlib.h.
12741 (open_in_zip): Read compressed class file archives.
12742 * zipfile.h (ZipDirectory): Add uncompressed_size and
12743 compression_method fields.
12744 * zextract.c (read_zip_archive): Collect file compression info.
12746 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
12748 * parse.y (do_resolve_class): Also explore superclasses of
12749 intermediate enclosing contexts when searching for inner classes.
12751 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12753 * parse.y (variable_declarator_id:): Better error message.
12754 (expression_statement:): Use YYNOT_TWICE.
12755 (cast_expression:): Likewise.
12756 (assignment:): Likewise.
12758 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12760 * parse.y (do_merge_string_cste): New locals. Create new
12761 STRING_CSTs each time, use memcpy. Fixes gcj/311.
12763 2000-08-07 Hans Boehm <boehm@acm.org>
12765 * boehm.c (mark_reference_fields): Set marking bits for all words in
12766 a multiple-word record.
12767 (get_boehm_type_descriptor): Use the procedure marking descriptor for
12770 2000-08-31 Mike Stump <mrs@wrs.com>
12772 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
12773 jcf-dump$(exeext)): Make parallel safe.
12775 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12777 * jcf-parse.c (set_source_filename): Constify a char *.
12778 * jcf-write.c (append_innerclasses_attribute,
12779 make_class_file_name): Constify a char *. Don't recycle a
12780 variable for an unrelated purpose.
12781 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
12782 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
12784 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12786 * expr.c (can_widen_reference_to): Fixed indentation.
12787 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
12788 * parse.y: `finit$' replaces `$finit$' in comments.
12789 (try_builtin_assignconv): Fixed leading comment.
12791 2000-08-25 Greg McGary <greg@mcgary.org>
12793 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
12795 2000-08-24 Greg McGary <greg@mcgary.org>
12797 * lang.c (lang_decode_option): Use ARRAY_SIZE.
12798 * parse.y (BINOP_LOOKUP): Likewise.
12800 2000-08-22 Andrew Haley <aph@cygnus.com>
12802 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
12803 sign extending. Fixes gcj/321.
12804 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
12805 combining to make a jlong. Fixes gcj/321.
12807 2000-08-21 Nix <nix@esperi.demon.co.uk>
12809 * lang-specs.h: Do not process -o or run the assembler if
12812 2000-08-16 Andrew Haley <aph@cygnus.com>
12814 * typeck.c (build_java_array_type): Rewrite code to do array
12815 alignment. Take into account back-end macros when aligning array
12816 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
12817 user to set alignment. Fixes gcj/252 and 160.
12819 2000-08-09 Tom Tromey <tromey@cygnus.com>
12821 * parse.y (check_abstract_method_definitions): Now return `int'.
12822 Check implemented interfaces. Fixes PR gcj/305.
12824 * parse.y (patch_switch_statement): Disallow `long' in switch
12825 expressions. Fixes PR gcj/310.
12827 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12829 * decl.c (finit_leg_identifier_node): New global.
12830 (init_decl_processing): Use `finit$' to initialize
12831 finit_identifier_node. Use `$finit$' to initialize
12832 finit_leg_identifier_node.
12833 * expr.c (expand_java_field_op): Use ID_FINIT_P.
12834 * java-tree.h (finit_identifier_node): Changed attached comment.
12835 (finit_leg_identifier_node): New declaration.
12836 (ID_FINIT_P): Take finit_identifier_node and
12837 finit_leg_identifier_node into account. This is a backward
12838 compatibility hack.
12840 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12842 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
12844 (generate_bytecode_insns): Check `nargs' before emitting it.
12845 * verify.c (merge_type_state): Fixed typo.
12846 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
12847 generate_bytecode_{conditional,insns}.
12849 2000-08-13 Anthony Green <green@redhat.com>
12851 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
12854 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12856 * class.c (maybe_layout_super_class): Fixed indentation.
12857 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
12858 (java_check_methods): New function declaration.
12859 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
12860 instead of `str_ptr'.
12861 * jcf-write.c (generate_bytecode_insns): Emit number the of args
12862 of a `invokeinterface' at the right time.
12863 * parse.h (WFL_STRIP_BRACKET): New macro.
12864 (SET_TYPE_FOR_RESOLUTION): Use it.
12865 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
12866 (check_class_interface_creation): Don't check for cross package
12867 innerclass name clashes.
12868 (method_header): Behave properly if MDECL is `error_mark_node'.
12869 (method_declarator): Return `error_mark_node' if bogus current
12871 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
12872 (resolve_and_layout): New local `decl_type', set and used. Call
12873 java_check_methods.
12874 (java_check_methods): New method.
12875 (java_layout_classes): Use it.
12876 (resolve_qualified_expression_name): No EH check necessary in
12878 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
12880 (patch_assignment): Set DECL_INITIAL on integral final local.
12882 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12884 * java-tree.h (flag_extraneous_semicolon): New extern.
12885 * lang-options.h: (-Wextraneous-semicolon): New option.
12886 * lang.c (flag_redundant): Fixed typo in leading comment.
12887 (flag_extraneous_semicolon): New global.
12888 (lang_decode_option): Set `flag_extraneous_semicolon' when
12889 -Wall. Decode `-Wextraneous-semicolon'.
12890 * parse.y (type_declaration:): Removed `SC_TK' hack, added
12891 `empty_statement' rule.
12892 (class_body_declaration): Likewise.
12893 (method_body:): Accept `;' as a method body.
12894 (static_initializer:): Removed `SC_TK' hack.
12895 (constructor_block_end:): Likewise.
12896 (empty_statement:): Report deprecated empty declaration. Fixes
12899 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12901 * parse.y (build_dot_class_method_invocation): Changed parameter
12902 name to `type'. Build signature from `type' and convert it to a
12903 STRING_CST if it's an array.
12904 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
12905 to use `ref_type' directly.
12907 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
12909 * lang-options.h: Added a comma after the last element to avoid
12910 syntax errors when other languages define additional options.
12912 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
12914 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
12915 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
12916 (jc1): Link with $(BACKEND).
12917 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
12919 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
12921 * jvspec.c: Adjust type of second argument to
12922 lang_specific_driver, and update code as necessary.
12924 * class.c (build_dtable_decl): Initialize dummy.
12926 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12928 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
12929 method bodies not to rule out discarding `<clinit>'; don't use
12930 <clinit> to initialize static fields with constant initializers.
12932 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12934 * gjavah.c (print_method_info): Added `synth' parameter. Skip
12936 (method_synthetic): New global.
12937 (HANDLE_METHOD): Recognize synthetic method and tell
12938 `print_method_info' about it.
12939 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
12940 processing a synthetic method.
12941 * jcf-reader.c (skip_attribute): New function.
12942 ( skip_attribute): Likewise.
12944 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12946 * parse.y (build_outer_field_access): Fixed comments.
12947 (fix_constructors): Emit the initialization of this$<n> before
12949 (resolve_qualified_expression_name): Build an access to `decl' if
12952 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12954 * parse-scan.y (curent_class): Non longer const.
12955 (inner_qualifier, inner_qualifier_length): Deleted.
12956 (current_class_length): New global.
12957 (bracket_count): Fixed typo in leading comment.
12958 (anonymous_count): New global.
12959 (class_instance_creation_expression:): Handle anonymous classes.
12960 (anonymous_class_creation:): New rule.
12961 (push_class_context): Rewritten.
12962 (pop_class_context): Likewise.
12963 (INNER_QUALIFIER): Macro deleted.
12964 (report_class_declaration): call `push_class_context' when
12965 entering the function. `fprintf' format modified not to use
12967 (report_class_declaration): Assign `package_name' and
12968 `current_class' to NULL separately.
12970 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12972 * expr.c (build_invokeinterface): Call layout_class_methods on
12975 2000-07-27 Tom Tromey <tromey@cygnus.com>
12976 Anthony Green <green@cygnus.com>
12977 Alexandre Petit-Bianco <apbianco@cygnus.com>
12979 * class.c (make_class_data): Create vtable for abstract classes.
12980 (get_dispatch_table): Changed to cope with abstract classes.
12982 2000-07-27 Tom Tromey <tromey@cygnus.com>
12984 * parse.y (patch_method_invocation): Don't reverse the argument
12985 list when dealing with anonymous class constructors. Fixed typo in
12988 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12990 * parse.y (build_alias_initializer_parameter_list): Reverse
12991 crafted list when building aliases for anonymous class
12994 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12996 * parse.y (jdep_resolve_class): Don't bother checking potential
12997 innerclass access if `decl' is NULL.
12998 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13001 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13003 * parse.c: Remove (again.)
13005 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13007 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13008 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13009 outside the `if' statement, alias to innerclass removed, `decl'
13010 used to mark the class complete.
13012 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13014 * parse.y (simple_name:): Fixed typo in error message.
13016 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13018 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13019 or its first operand can be error marks.
13021 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13023 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13024 * parse.y (method_header): Likewise.
13026 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13028 * parse.y (process_imports): Consider that one might be trying to
13029 import an innerclass. Fixes gcj/254
13031 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13033 * parse.y (find_as_inner_class): Handle the case where the
13034 enclosing context of an innerclass has been loaded as bytecode.
13036 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13038 * parse.y (simple_name:): Reject `$' in type names.
13039 (resolve_type_during_patch): Use `type' as a second
13040 argument to resolve_no_layout. Fixes gcj/257.
13042 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
13044 * parse.y (find_most_specific_methods_list): Select the only
13045 non-abstract method even if max has been set.
13046 Fixes gcj/285, gcj/298.
13048 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
13050 * lang-specs.h: Added %(jc1) to java compiler options.
13052 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
13054 * .cvsignore: New file.
13056 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13058 * parse.y (not_accessible_p): Access granted to innerclasses
13059 (indirectly) extending the reference type. Fixes gcj/249.
13061 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13063 * parse.y (patch_method_invocation): Fixed comment.
13064 (maybe_use_access_method): Build this$<n>s to the context of the
13065 target method, or a type that extends it. Fixes gcj/242.
13067 2000-07-13 Mark Mitchell <mark@codesourcery.com>
13071 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13073 * parse.y (fold_constant_for_init): Avoid bullish conversion.
13075 2000-07-13 Tom Tromey <tromey@cygnus.com>
13077 * lang-specs.h: Added %{I*}.
13079 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13081 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13083 2000-07-12 Mark Mitchell <mark@codesourcery.com>
13085 * parse-scan.c: Remove.
13087 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13089 * class.c (set_super_info): Handled protected inner classes.
13090 (common_enclosing_context_p): Bail early if arguments aren't both
13092 (get_access_flags_from_decl): Handle private and protected inner
13094 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13095 (CLASS_PROTECTED): Likewise.
13096 (struct lang_type): New bitfield `poic'.
13097 * parse.y (jdep_resolve_class): Call check_inner_class_access on
13098 inner classes only.
13099 (check_inner_class_access): Renamed arguments, added
13100 comments. Handles protected inner classes (fixes gcj/225)
13101 (not_accessible_p): Fixed comments. Avoid handling inner classes.
13103 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13105 * parse.y (resolve_qualified_expression_name): Verify qualified
13106 access to `this'. Fixes gcj/239.
13108 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13110 * jcf-write.c (generate_classfile): Don't install ConstantValue
13113 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13115 * parse.y (resolve_qualified_expression_name): Handle inner class
13116 access. Fixes gcj/256.
13118 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13120 * jcf-write.c (generate_classfile): Properly install the
13121 ConstantValue attribute and the initial value constant pool index
13122 on string constants.
13123 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13126 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13128 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13130 * parse.y (find_as_inner_class): Fixed typo.
13131 (do_resolve_class): Explore enclosing contexts when searching for
13132 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13133 (check_inner_class_access): Check `decl' which can be null in case
13134 of previous errors.
13136 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13138 * java-tree.h (java_debug_context): Declared `extern'.
13139 (safe_layout_class): Likewise.
13140 * parse.y (resolve_field_access): Field must be `static' in order
13141 to be replaced by its initial value. Added comments.
13142 (find_applicable_accessible_methods_list): Fixed typo.
13143 (find_most_specific_methods_list): Methods found in innerclasses
13144 take over methods founds in the enclosing contexts.
13145 (java_complete_tree): Loosen restrictions on the type of DECLs
13146 that can be replaced by their initialization values.
13147 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13149 2000-07-05 Tom Tromey <tromey@cygnus.com>
13151 * Make-lang.in (PARSE_DIR): New macro.
13152 (PARSE_RELDIR): Likewise.
13153 (PARSE_C): Likewise.
13154 (PARSE_SCAN_C): Likewise.
13155 ($(PARSE_C)): New target.
13156 ($(PARSE_SCAN_C)): Likewise.
13157 (SET_BISON): New macro.
13158 (BISONFLAGS): Likewise.
13159 (JAVABISONFLAGS): Likewise.
13161 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
13163 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13164 argument on the first pass for CNI as well as JNI.
13165 (print_method_info): Set up method name on the first pass only.
13167 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13169 * parse.y (parser_qualified_classname): Removed parameter
13171 (create_interface): Removed first passed parameter to
13172 parser_qualified_classname.
13173 (create_class): Likewise. Don't install alias on static
13174 innerclasses. Fixes gcj/275.
13176 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13178 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13179 debugable statement with empty_stmt_node. Fixes gcj/272
13181 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13183 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13186 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13188 * jcf-write.c (push_long_const): Appropriately cast short negative
13191 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13193 * parse.y (verify_constructor_super): Use loop variable
13194 `m_arg_type' initialized with `mdecl_arg_type'.
13196 2000-06-29 Tom Tromey <tromey@cygnus.com>
13198 * parse.y (resolve_field_access): Handle case where `type_found'
13201 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13203 * expr.c (lookup_field): The same field can be found through two
13204 different interface. Don't declare it ambiguous in that case.
13206 2000-06-27 Tom Tromey <tromey@cygnus.com>
13208 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
13209 follows \r, then unget it at a lower level.
13211 2000-06-26 Tom Tromey <tromey@cygnus.com>
13213 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13214 java_complete_tree.
13216 2000-06-25 Tom Tromey <tromey@cygnus.com>
13218 * parse.y (for_statement): Wrap expression in a WFL if it is a
13219 constant. For PR gcj/268.
13221 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13223 * parse.y (do_resolve_class): Minor optimiztion in the package
13224 list search. Removed unnecessary test and return statement.
13225 (valid_ref_assignconv_cast_p): Order of arguments to
13226 enclosing_context_p fixed.
13228 2000-06-24 Tom Tromey <tromey@cygnus.com>
13230 * expr.c (lookup_field): Print error and return error_mark_node if
13231 field reference is ambiguous.
13233 * parse.y (check_abstract_method_definitions): Also check if
13234 `other_method' is abstract.
13236 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13238 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13240 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13241 (struct lang_type): New field `pic'.
13242 (CLASS_PRIVATE): New macro.
13243 * parse.y (check_inner_class_access): New function.
13244 (jdep_resolve_class): Call it.
13246 2000-06-23 Tom Tromey <tromey@cygnus.com>
13248 * parse.y (patch_incomplete_class_ref): Initialize the returned
13249 class. For PR gcj/260.
13251 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13253 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13255 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13257 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13258 Java specific checks.
13259 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13260 screened by DECL_P.
13261 * java-tree.def (CASE_EXPR): Marked 'e'.
13262 (DEFAULT_EXPR): Likewise.
13263 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13264 screened by DECL_P.
13265 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13266 Java specific checks.
13267 (generate_bytecode_insns): Test try_block for BLOCK before using
13269 * parse.y (build_wfl_wrap): Added `location' argument. Set
13270 EXPR_WFL_LINECOL accordingly.
13271 (dim_expr:): Wrap constants with WFLs.
13272 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13273 (resolve_package): Check for `stmt' not being a BLOCK before
13274 building a debuggable statement with it.
13275 (make_qualified_primary): Added extra parameter to build_wfl_wrap
13277 (resolve_field_access): Make sure `decl' is a DECL before treating
13279 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13280 IDENTIFIER_NODE before treating it as such.
13281 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13282 treating it as such.
13283 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13284 to be applied only on non array types.
13286 2000-06-16 Per Bothner <per@bothner.com>
13288 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
13289 define in terms of DECL_RESULT, as that fails when --enable-checking.
13291 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13293 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
13294 types the same in comparison.
13295 (CHECK_OP): Add static prototype.
13297 2000-06-13 Jakub Jelinek <jakub@redhat.com>
13299 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13300 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13301 * parse.c: Rebuilt.
13303 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13305 * decl.c (create_primitive_vtable): Prototype.
13307 * jcf-write.c (generate_bytecode_insns): Initialize variable
13310 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13312 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13314 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13315 to track searched classes, and do not search the same class more than
13316 once. Call find_applicable_accessible_methods_list on immediate
13317 superclass, instead of search_applicable_method_list on all ancestors.
13318 Fix for PR gcj/238.
13320 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13322 * parse.y (register_fields): Permit static fields in inner classes
13323 if they are final. Fix for PR gcj/255.
13325 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13327 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13328 * parse.y (find_in_imports): Returned type changed to void,
13329 leading comment fixed.
13330 (register_package): New function.
13331 (qualify_and_find): Likewise.
13332 (package_declaration:): Use `register_package'.
13333 (single_type_import_declaration:): Removed local variable
13334 `node'. Added missing `;' for consistency.
13335 (type_import_on_demand_declaration:): Use `chainon' to link new
13337 (lookup_field_wrapper): Lookup local variables defined in outer
13339 (java_complete_class): Don't reverse the list of imported on demand.
13340 (do_resolve_class): Reorganized. Removed local variable
13341 `original_name'. Call `qualify_and_find' with the current package
13342 name, invoke `find_in_imports_on_demand' right after. Call
13343 `qualify_and_find' with the packages we've seen so far. Fixed
13344 operations numbering in comments.
13345 (java_expand_class): Don't reverse `package_list'.
13346 (find_most_specific_methods_list): New local variables `abstract'
13347 and `candidates'. Use them to pick the right method.
13349 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
13351 * parse.y (check_modifiers_consistency): Don't subtract out
13352 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13354 2000-06-04 Philipp Thomas <pthomas@suse.de>
13356 * Makefile.in (INTLLIBS): New.
13360 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13362 * class.c (get_dispatch_table): Build the vtable dummy entry list
13363 element with a null purpose. Fixed leading comment.
13364 (build_dtable_decl): Build an accurate dtable type when appropriate
13367 2000-06-02 Richard Henderson <rth@cygnus.com>
13369 * lang.c (lang_get_alias_set): New.
13371 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13373 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13374 before using it as the accessed field.
13376 2000-05-31 Tom Tromey <tromey@cygnus.com>
13378 * java-tree.h (boolean_array_vtable, byte_array_vtable,
13379 char_array_vtable, short_array_vtable, int_array_vtable,
13380 long_array_vtable, float_array_vtable, double_array_vtable):
13382 * expr.c (get_primitive_array_vtable): New function.
13383 (create_primitive_vtable): New function.
13384 (java_lang_expand_expr): Enable code to statically generate
13386 * decl.c (init_decl_processing): Create primitive vtables.
13387 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13388 short_array_vtable, int_array_vtable, long_array_vtable,
13389 float_array_vtable, double_array_vtable): Define.
13391 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
13393 * java/parse.y (find_applicable_accessible_methods_list):
13394 Don't add an uninitialized value to the list.
13396 2000-05-25 Tom Tromey <tromey@cygnus.com>
13398 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13399 when trying to see if field's class should be initialized. Always
13400 initialize field's declaring class, not qualified class.
13403 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13404 `wfl_operator', to maybe_build_primttype_type_ref.
13407 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
13409 * parse.y (patch_method_invocation): Don't try to lookup methods
13410 in primitive types.
13412 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13414 * parse.y (resolve_field_access): Call the appropriate <clinit>
13415 before accessing the length of a static array. Craft a decl for
13416 the field while its time. Fixes PR gcj/129.
13418 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13420 * parse.y (resolve_package): Correctly set `*next' (was off by
13422 (resolve_qualified_expression_name): Fixed comment.
13424 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13426 * jcf-parse.c (jcf_parse_source): Reset current_class and
13427 current_function_decl to NULL before parsing a new file.
13429 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13431 * parse.y (block_end:): If the collected block doesn't feature a
13432 statement, insert an empty statement.
13434 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13436 * parse.y (maybe_yank_clinit): New function.
13437 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13438 end of the list of methods belonging to a class.
13439 (java_complete_expand_method): Check whether <clinit> is really
13440 necessary and expand it accordingly.
13442 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13444 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13445 processed by the method's switch statement.
13447 2000-05-19 Tom Tromey <tromey@cygnus.com>
13449 * java-tree.h: Added init state enum.
13450 * decl.c (emit_init_test_initialization): Initialize class
13451 initialization check variable by looking at class' state.
13453 2000-05-19 Tom Tromey <tromey@cygnus.com>
13455 * java-tree.h (build_instanceof): Declare.
13456 (build_get_class): Declare.
13457 * parse.y (patch_binop): Use build_instanceof.
13458 * expr.c (build_instanceof): New function. If class is final,
13459 don't make a function call.
13460 (expand_java_INSTANCEOF): Use it.
13461 (build_get_class): New function.
13463 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
13465 * jcf-write.c (generate_classfile): Scan the source_file for
13466 slashes with the right pointer variable.
13468 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
13470 * lang.c (lang_decode_option): Update -Wunused flags by calling
13472 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13474 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
13476 * check_init.c (check_init): Constify local char *.
13477 * class.c (push_class): Constify local char *.
13478 * java_tree.h: Update prototypes.
13479 * jcf-io.c (open_class): Constify filename parameter and
13481 (find_class): Remove redundant string copy. Cast return from
13483 * jcf-parse.c (read_class, parse_class_file, yyparse):
13484 Constify local char *.
13485 * jcf-write.c (generate_bytecode_insns, generate_classfile):
13486 Constify local char *.
13487 * jcf.h (JCF): Constify filename and classname.
13488 (JCF_FINISH): Cast args to FREE to char * when appropriate.
13489 * lang.c (init_parse): Constify parameter and return value.
13490 * lex.c (java_get_line_col): Constify filename parameter.
13491 * parse.h: Constify parser_ctxt.filename. Update prototypes.
13492 * parse.y (java_parser_context_suspend,
13493 issue_warning_error_from_context, safe_layout_class): Constify
13495 * parse.c: Regenerate.
13497 2000-05-08 Tom Tromey <tromey@cygnus.com>
13499 * expr.c (build_jni_stub): Cache the result of
13500 _Jv_LookupJNIMethod.
13502 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13504 * decl.c (predef_filenames_size): Now 7.
13505 (predef_filenames): New seventh entry.
13507 2000-05-04 Tom Tromey <tromey@cygnus.com>
13509 * boehm.c (mark_reference_fields): Don't mark RawData fields.
13510 Keep track of when we've seen a reference field after a
13511 non-reference field.
13512 (get_boehm_type_descriptor): Handle case where we see
13513 non-reference fields but no trailing reference field.
13514 * decl.c (rawdata_ptr_type_node): Define.
13515 (init_decl_processing): Initialize rawdata_ptr_type_node.
13516 * java-tree.h (rawdata_ptr_type_node): Declare.
13518 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13520 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13521 specifiers in calls to fprintf.
13523 2000-05-03 Andrew Haley <aph@cygnus.com>
13525 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13527 * javaop.h (WORD_TO_INT): New function.
13528 (IMMEDIATE_s4): Use WORD_TO_INT.
13529 * jcf.h (JPOOL_INT): Ditto.
13531 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13534 2000-04-19 Tom Tromey <tromey@cygnus.com>
13536 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13537 on native function.
13538 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13540 * expr.c (build_jni_stub): New function.
13541 * lang-specs.h: -fjni and -femit-class-file are incompatible.
13542 * parse.c: Rebuilt.
13543 * parse.y (java_complete_expand_methods): Expand a native method
13544 and call build_jni_stub if -fjni given.
13545 * lang-options.h: Document -fjni.
13546 * lang.c (flag_jni): New global.
13547 (lang_f_options): Added `jni' entry.
13548 * java-tree.h (soft_lookupjnimethod_node,
13549 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
13551 (flag_jni): Declare.
13552 (build_jni_stub): Declare.
13553 (struct lang_decl): Added `native' flag.
13554 (METHOD_NATIVE): Redefined to use `native' field of lang specific
13556 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
13557 soft_jnipopsystemframe_node): New globals.
13558 (init_decl_processing): Set them. _Jv_InitClass only takes one
13561 * java-tree.def: Put into `C' mode.
13563 2000-04-27 Tom Tromey <tromey@cygnus.com>
13566 * expr.c (expand_invoke): Generate check to see if object pointer
13567 is null in nonvirtual invocation case.
13568 * java-tree.h (soft_nullpointer_node): Declare.
13569 * decl.c (soft_nullpointer_node): New global.
13570 (init_decl_processing): Initialize soft_nullpointer_node.
13571 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13572 or `private' methods.
13573 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13575 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
13577 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13580 2000-04-26 Tom Tromey <tromey@cygnus.com>
13582 * zextract.c (find_zip_file_start): New function.
13583 (read_zip_archive): Use it.
13585 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13587 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
13589 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13591 * class.c (common_enclosing_context_p): New function.
13592 * java-tree.h (common_enclosing_context_p): Added prototype.
13593 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
13594 classes sharing an outer context with the current instance.
13595 * parse.y (build_access_to_thisn): Fixed leading comment.
13596 (verify_constructor_super): New local `supper_inner'. Skip
13597 enclosing context argument in the case of inner class constructors.
13598 (patch_method_invocation): Insert proper context as second
13599 parameter to pure inner class constructor super invocations.
13601 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13603 * parse.y (end_class_declaration): Reset the interface number
13606 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13608 * parse.y (source_start_java_method): Deleted unnecessary code.
13609 (patch_method_invocation): Fixed comment.
13611 2000-04-24 Robert Lipe <robertlipe@usa.net>
13613 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
13615 2000-04-23 Tom Tromey <tromey@cygnus.com>
13617 * boehm.c (mark_reference_fields): Use int_byte_position.
13619 2000-04-22 Tom Tromey <tromey@cygnus.com>
13621 * boehm.c (mark_reference_fields): Only call byte_position on
13624 2000-04-22 Tom Tromey <tromey@cygnus.com>
13626 * boehm.c (mark_reference_fields): Added `last_view_index'
13627 argument. Use DECL_FIELD_OFFSET to determine field's offset.
13629 2000-04-20 Mo DeJong <mdejong@cygnus.com>
13631 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
13632 * parse.y (check_class_interface_creation): Fixed comments. Select
13633 permitted modifiers for (inner) interfaces. Changed error message
13634 to report rejected modifiers used with local classes.
13636 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13638 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
13639 of directly inherited type considered in scope.
13640 * parse.y (do_resolve_class): Search inherited classes for inner
13643 2000-04-20 Tom Tromey <tromey@cygnus.com>
13645 * parse.y (not_accessible_p): Use member's class, not current
13646 class, when doing inheritance check for protected reference.
13649 2000-04-20 Jason Schroeder <shrode@subnature.com>
13651 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
13653 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13655 * parse.y (lookup_field_wrapper): Search for final local aliases.
13656 (resolve_expression_name): Let lookup_field_wrapper search for
13657 final local aliases. Force the value of `name' if one is found.
13658 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
13659 an expression name. Fixed comments.
13661 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13663 * parse.y (yyerror): `msg' can be null, don't use it in that case.
13665 2000-04-19 Tom Tromey <tromey@cygnus.com>
13667 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
13669 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13671 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
13673 2000-04-18 Tom Tromey <tromey@cygnus.com>
13676 * gjavah.c (utf8_cmp): Changed return value.
13677 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
13679 (cxx_keywords): New global.
13680 (get_field_name): Handle new result of cxx_keyword_subst.
13681 (print_method_info): Likewise.
13683 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
13685 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
13686 with a newline, for CNI.
13687 (print_stub_or_jni): Print a space or newline before method name for
13688 CNI as well as JNI.
13689 (print_cxx_classname): Don't write leading "::" in CNI stub method.
13690 (process_file): Include gcj/cni.h if generating CNI stubs.
13692 2000-04-16 Tom Tromey <tromey@cygnus.com>
13694 * gjavah.c (decompile_method): Use print_field_name.
13697 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13699 * parse.y (java_expand_classes): Reverse the package list once.
13700 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
13702 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
13703 the `==' and `!=' operators.
13705 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13707 * jcf-write.c (generate_bytecode_insns): At invocation time,
13708 always relate an interface method to the type of its selector.
13710 2000-04-05 Tom Tromey <tromey@cygnus.com>
13713 * expr.c (expand_invoke): Generate check to see if object pointer
13714 is null in nonvirtual invocation case.
13715 * java-tree.h (soft_nullpointer_node): Declare.
13716 * decl.c (soft_nullpointer_node): New global.
13717 (init_decl_processing): Initialize soft_nullpointer_node.
13718 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13719 or `private' methods.
13720 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13722 2000-04-05 Tom Tromey <tromey@cygnus.com>
13724 Fix for PR gcj/140:
13725 * parse.y (check_final_assignment): Recognize assignments to the
13726 `length' field of an array when generating class files.
13728 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13730 * class.c (decl_hash): Prototype removed.
13731 (decl_compare): Likewise.
13733 2000-04-05 Tom Tromey <tromey@cygnus.com>
13735 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
13736 * parse.y (check_modifiers_consistency): Check for final/volatile
13737 clash. Fixes PR gcj/164.
13739 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13741 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
13743 (java_hash_compare_tree_node): Renamed from `decl_compare, made
13745 (add_method_1): Use `java_hash_hash_tree_node' and
13746 `java_hash_compare_tree_node'.
13747 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
13748 (java_hash_compare_tree_node): Likewise.
13749 * parse.y (find_applicable_accessible_methods_list): Create,
13750 delete and use a hash table to remember already searched interfaces.
13752 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
13754 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
13757 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13759 * boehm.c (mark_reference_fields, set_bit): Prototype.
13760 (set_bit): Un-ANSI-fy definition.
13762 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
13765 * decl.c (emit_init_test_initialization): Likewise.
13767 * gjavah.c (jni_print_char): Likewise.
13769 * parse.y (create_new_parser_context): Likewise.
13771 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
13773 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
13774 patch missing hunk. Fixed indentation.
13776 2000-03-30 Tom Tromey <tromey@cygnus.com>
13778 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
13779 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
13781 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13783 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13784 when negative *before* using it as an array index.
13785 * ChangeLog: Fixed typo.
13787 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13789 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13790 to 0 when it reaches -1.
13792 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13794 * jcf-parse.c (get_constant): Properly cast `num' during the
13795 invocation of `add_double'.
13796 * jcf-write.c (push_long_const): Properly cast `lo' before
13797 comparing it to short bounds.
13798 * parse-scan.y (interface_declaration:): Rule re-arrange so that
13799 `interface_body:' is reduced after the current interface is
13802 2000-03-26 Tom Tromey <tromey@cygnus.com>
13804 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
13805 Java-specific `-f' option.
13807 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13809 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
13810 Adjust order of making types.
13811 Make bitsize_*_node values.
13813 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13815 * class.c (make_field_value): Use byte_position.
13816 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
13817 (java_array_data_offset): Likewise.
13818 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
13821 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13823 * parse.y (check_abstract_method_definitions): New local
13824 `end_type_reached'. Make sure we also consider `end_type'.
13825 (java_check_abstract_method_definitions): Make sure we eventually
13826 consider `java.lang.Object'.
13827 (maybe_use_access_method): Don't use access method if not in the
13828 context of a pure inner class or if the method's context is right.
13829 (find_applicable_accessible_methods_list): New static flag
13830 `object_done'. Don't search abstract classes as interfaces. Fixed
13831 indentation. Fixed the `java.lang.Object' only search. Search
13832 class interface(s) first, then fully search enclosing contexts.
13833 (find_most_specific_methods_list): Pick the closest candidate when
13834 they're all abstract.
13836 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13838 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13839 properly initialize `finished_label'. Don't emit gotos for empty
13842 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13844 * except.c (emit_handlers): Clear catch_clauses_last.
13846 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13848 * parse.y (check_method_types_complete): New function.
13849 (create_class): Reset anonymous class counter only when seeing an
13851 (java_complete_class): JDEP_METHOD: Don't recompute signature
13854 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13856 * class.c (build_static_ref): Fixed indentation in comment.
13857 * java-tree.def (TRY_EXPR): Fixed typo in name.
13858 (CLASS_LITERAL): Likewise.
13859 * java-tree.h: (TYPE_DOT_CLASS): New macro.
13860 (struct lang_type): New field `dot_class'.
13861 * jcf-write.c (generate_bytecode_insns): Fixed error message.
13862 (generate_classfile): Method `class$' is synthetic.
13863 * parse.y (build_do_class_method): New function.
13864 (build_dot_class_method_invocation): Likewise.
13865 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
13866 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
13867 (qualify_ambiguous_name): Likewise.
13868 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
13869 (build_try_statement): Fixed leading comment.
13871 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13873 * class.c (make_field_value): Properly handle sizes.
13874 (get_dispatch_vector): Use tree_low_cst and host_integerp.
13875 (layout_class_method): Count using trees.
13876 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
13877 * expr.c (java_array_data_offset): Use int_bit_position.
13878 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
13879 (build_invokevirtual): Use tree_low_cst and do computations with trees.
13881 2000-03-16 Tom Tromey <tromey@cygnus.com>
13883 * lang.c (flag_hash_synchronization): New global.
13884 (lang_f_options): Added `hash-synchronization'.
13885 * lang-options.h: Mention -fhash-synchronization.
13886 * java-tree.h (flag_hash_synchronization): Declare.
13887 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
13888 hash table synchronization is disabled.
13889 * decl.c (init_decl_processing): Only push `sync_info' value when
13890 hash table synchronization is disabled.
13891 * class.c (make_class_data): Only push `sync_info' field when hash
13892 table synchronization is disabled. Removed dead code.
13894 2000-03-16 Tom Tromey <tromey@cygnus.com>
13896 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
13898 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13900 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
13902 * parse.y (patch_method_invocation): Handle anonymous classes
13903 creation in static context.
13905 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13907 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
13908 * parse.y (resolve_qualified_expression_name): Use it.
13909 (patch_method_invocation): Likewise.
13911 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13913 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
13914 depending on the type of dependency which dictates what the
13916 (unresolved_type_p): Resolved types limited to the current class.
13918 2000-03-15 Tom Tromey <tromey@cygnus.com>
13920 * decl.c (init_decl_processing): Set type of `sync_info' to be
13923 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
13924 Correctly compute bit number for current slot. Zero `high' and
13925 `low' in DS_LENGTH case. Don't skip inherited fields. Use
13926 mark_reference_fields.
13927 (mark_reference_fields): New function.
13929 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13931 * parse.y (register_incomplete_type): Fixed initialization of
13934 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13936 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
13938 (push_class_context, pop_class_context): New function.
13939 (class_body:): Call pop_class_context.
13940 (interface_body:): Likewise.
13941 (INNER_QUALIFIER): New macro.
13942 (report_class_declaration): Changed output format and use
13943 INNER_QUALIFIER. Call push_class_context.
13945 2000-02-14 Andrew Haley <aph@cygnus.com>
13947 * check-init.c (check_init): Add new cases for unary and binary
13950 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13952 * parse.y (resolve_package): Set `next' once a type name has been
13953 progressively discovered.
13954 (resolve_qualified_expression_name): Propagate resolution only if
13955 there are remaining qualifiers. Take into account `q' might have
13956 been cleared after re-qualification.
13957 * parse.y (patch_method_invocation): New local `resolved'.
13958 Section dealing with qualified expression rewritten to use
13959 resolve_field_access.
13961 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13963 * parse.h (PUSH_CPC): Fixed indentation.
13964 (DEBUG_CPC): New macro.
13965 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
13966 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
13967 * parse.y (class_body_declaration:): Use
13968 SET_CPC_INSTANCE_INITIALIZER_STMT.
13969 (method_declaration:): Check for null current_function_decl.
13970 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
13971 (java_parser_context_pop_initialized_field): Better handling of
13973 (maybe_make_nested_class_name): Mark nested class name as
13974 qualified when necessary.
13975 (end_class_declaration): Don't call java_parse_context_resume when
13976 one or more error occurred.
13977 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
13978 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
13979 SET_CPC_INITIALIZER_STMT.
13980 (method_header): Check for inner classes declaring static methods.
13981 (resolve_qualified_expression_name): Handle situation where `this'
13984 2000-03-13 Hans Boehm <boehm@acm.org>
13986 * typeck.c (build_prim_array_type): Correctly set the high word too.
13988 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13990 * parse.y (java_complete_expand_methods): Leave <clinit> out of
13992 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
13993 list of methods for interfaces.
13995 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13997 * parse.y (qualify_ambiguous_name): Properly handle expressions
14000 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14002 * parse.y (check_final_assignment): Extended to process
14004 (patch_assignment): Have check_final_assignment called only once.
14006 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14008 * java-tree.h (IS_INIT_CHECKED): New flag.
14009 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14010 * parse.y (patch_string): Call force_evaluation_order on the
14011 completed string concatenation tree.
14012 * expr.c (force_evaluation_order): Call force_evaluation_order on
14013 function's arguments too.
14015 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14017 * decl.c (emit_init_test_initialization): Mark KEY as unused.
14018 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14019 (build_anewarray): Likewise.
14020 * parse.y (patch_newarray): Likewise.
14021 * parse.c: Regenerated.
14023 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14025 * decl.c (init_decl_processing): Added new class fields `depth',
14026 `ancestors', and `idt' to class_type_node. Use
14027 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14028 * class.c (make_class_data): Push initial values for new fields.
14029 * java-tree.h: Updated prototype for `build_invokeinterface'.
14030 * expr.c (build_invokeinterface): Changed parameters to accept
14031 `method' tree. Calculate index of `method' in its declaring
14032 interface. Build call to _Jv_LookupInterfaceMethodIdx.
14033 (expand_invoke): Call `build_invokeinterface' with new parameters.
14034 * parse.y (patch_invoke): Call `build_invokeinterface' with new
14037 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14039 * typeck.c (lookup_do): Search superinterfaces first
14040 when looking up an interface method. From Godmar Back
14041 <gback@cs.utah.edu>
14043 2000-03-06 Tom Tromey <tromey@cygnus.com>
14045 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14047 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14049 * java-tree.h (lookup_argument_method2): Declared.
14050 (safe_layout_class): Prototype moved from parse.h.
14051 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14052 * parse.y (java_check_regular_methods): Local `super_class' gone.
14053 Call lookup_argument_method2 instead of lookup_argument_method.
14054 Perform modifier match for methods found declared in implemented
14055 interfaces. Fixed indentation problem. Overriding/hiding error
14056 report to take place only for methods found in classes.
14057 * typeck.c (lookup_argument_method): Changed leading
14058 comment. Re-written by calling lookup_do.
14059 (lookup_argument_method2): New function.
14060 (lookup_java_method): Re-written by calling lookup_do.
14061 (lookup_do): New function.
14063 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14065 * check-init.c (check_init): Removed dead code. Handle (blank)
14067 * parse.y (declare_local_variables): New local `final_p', set it
14068 and use it to initialize LOCAL_FINAL.
14069 (check_final_assignment): Only check FIELD_DECLs.
14071 2000-02-17 Tom Tromey <tromey@cygnus.com>
14073 * Makefile.in (JAVA_OBJS): Added boehm.o.
14074 (boehm.o): New target.
14075 * Make-lang.in (JAVA_SRCS): Added boehm.c.
14076 * java-tree.h (flag_use_boehm_gc): Declare.
14077 (get_boehm_type_descriptor): Declare.
14078 * lang.c (lang_f_options): Added `use-boehm-gc'.
14079 (flag_use_boehm_gc): New global.
14080 * lang-options.h: Added -fuse-boehm-gc.
14081 * boehm.c: New file.
14082 * class.c (get_dispatch_table): If class uses a Boehm type
14083 descriptor, put it in the vtable.
14084 (make_class_data): Removed dead code.
14086 2000-03-03 Per Bothner <per@bothner.com>
14088 * decl.c (init_decl_processing): Initialize sizetype properly.
14090 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14092 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14093 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14094 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14095 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14096 (jcf_parse): New local `current'. Load innerclasses seen in outer
14097 context being processed.
14098 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14099 * jcf-write.c (append_innerclasses_attribute): New function.
14100 (append_innerclasses_attribute_entry): Likewise.
14101 (get_access_flags): Handle static classes. Set anonymous and local
14102 classes to be private.
14103 (generate_classfile): Attribute count adjusted. Call
14104 append_innerclasses_attribute.
14105 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14106 PURE_INNER_CLASS_TYPE_P.
14107 * parse.y (parser_qualified_classname): New parameter `is_static',
14108 produce non qualified name accordingly.
14109 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14110 (create_interface): Added argument to parser_qualified_classname.
14111 (create_class): Added argument to parser_qualified_classname. Setup
14112 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14113 (add_inner_class_fields): Fixed indentation.
14114 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14115 (method_declarator): Fixed typo in comment.
14116 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14117 (build_current_thisn): Likewise.
14118 (patch_method_invocation): Likewise.
14120 2000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
14122 * decl.c (current_function_decl): Move to toplev.c.
14124 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14126 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14127 (DECL_BIT_INDEX): Use underlying representation.
14128 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14130 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14132 * expr.c (build_java_ret): Pass proper type to size_binop.
14134 2000-02-25 Anthony Green <green@cygnus.com>
14136 * expr.c (build_class_init): Mark the decl to be ignored by
14138 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14139 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14140 * class.c (init_test_hash_newfunc): New function.
14141 (decl_hash): New function.
14142 (decl_compare): New function.
14143 * decl.c (emit_init_test_initialization): New function.
14144 (complete_start_java_method): Traverse the init test hashtable,
14145 calling emit_init_test_initialization.
14146 (always_initialize_class_p): Define.
14147 * expr.c (build_class_init): Use initialization tests when
14148 emitting class initialization code.
14149 (always_initialize_class_p): Declare.
14150 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14152 * java-tree.h: Include hash.h.
14153 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14154 (struct lang_decl): Add init_test_table field.
14155 (init_test_hash_entry): Define.
14157 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14159 * gjavah.c (main): Avoid using `argi' to report unimplemented
14162 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14164 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14165 initialize locals to avoid warnings. Local `exception_type' moved
14168 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14170 * parse.y (resolve_expression_name): Use `orig' as a second
14171 argument to resolve_field_access.
14172 (resolve_field_access): Removed unnecessary code when dealing with
14175 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14177 * class.c (push_super_field): Don't push the field twice.
14178 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14179 * parse.h (java_reorder_fields): Prototyped.
14180 * parse.y (java_reorder_fields): New function.
14181 (java_layout_class): Simplified not to worry about re-ordering.
14183 2000-02-23 Tom Tromey <tromey@cygnus.com>
14185 * gjavah.c (print_name): In JNI case, correctly quote string.
14186 (print_method_info): Don't handle overrides in JNI mode.
14188 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14190 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14191 value type set to `boolean_type_node'.
14193 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14195 * jcf-dump.c (main): Test for correct condition after
14196 output file creation.
14198 2000-02-19 Anthony Green <green@cygnus.com>
14200 * jcf-depend.c (add_entry): Fix test for first list entry.
14202 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14204 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14205 * constants.c (build_constants_constructor): Likewise.
14207 2000-02-19 Anthony Green <green@cygnus.com>
14209 * jcf-depend.c (add_entry): Add entries to the end of the list.
14211 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
14213 * decl.c (INT_TYPE_SIZE): Define if necessary.
14214 (expand_java_return): Handle the case of a native integer smaller
14215 than a JVM integer.
14217 2000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
14219 * gjavah.c (help): Use GCCBUGURL.
14220 * jv-scan.c (help): Likewise.
14221 * jcf-dump.c (help): Likewise.
14223 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14225 * jcf-write.c (generate_bytecode_insns): Don't generate empty
14228 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14230 * jcf-parse.c (load_class): Call `fatal' if no file containing
14231 the target class are found.
14233 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
14235 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14236 lex.c, lex.h, and PARSE_H to...
14237 (parse.o, parse-scan.o): ...here, respectively.
14239 * lex.c: Split out code that may trigger SIGFPE from yylex()
14240 to its own function.
14241 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14243 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14245 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14247 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14249 * parse.y (outer_field_access_p): Stop in time when outer contexts
14251 (resolve_qualified_expression_name): Properly qualify *everything*
14252 after a package.type to be resoled as expression names.
14253 (find_applicable_accessible_methods_list): Save/restore `class' to
14254 isolate it from a possible outer context search.
14256 2000-02-15 Tom Tromey <tromey@cygnus.com>
14258 * gjavah.c (jni_print_char): New function.
14259 (print_full_cxx_name): Use it.
14260 (decode_signature_piece): Likewise.
14261 (print_cxx_classname): Likewise.
14263 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14265 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14267 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14269 * gjavah.c: Include version.h.
14271 * jcf-dump.c: Likewise.
14273 * jv-scan.c: Likewise.
14275 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14277 * parse.y (outer_field_access_fix): First parameter now a tree
14278 node. Check for assignment to final. First argument to
14279 build_outer_field_access_fix modified to accommodate prototype.
14280 (build_outer_field_access): Don't check for assignment to final
14282 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14283 possibly returned by outer_field_access_fix. Changed
14284 outer_field_access_fix's first argument.
14285 (check_final_assignment): $finit$'s context is OK.
14286 (patch_unaryop): Use node instead of its line/column value when
14287 calling outer_field_access_fix.
14289 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14291 * parse.y (interface_declaration:): No longer tagged
14292 <node>. Re-installed default action.
14293 (class_member_declaration:): Handle inner interfaces.
14294 (interface_member_declaration): Handle inner interfaces and
14296 (create_interface): Push error if one seen. Suspend parsing
14297 context when processing an inner interface.
14298 (register_fields): Inner class static field limitations not to
14299 apply to inner interfaces.
14301 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14303 * jcf-parse.c (load_class): Update `java_error_count' when a
14304 class' file can't be found.
14305 (parse.y): Avoid (byte)code generation when errors seen.
14307 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14309 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14310 decodes a valid node.
14311 (patch_binop): Handle TRUNC_DIV_EXPR.
14313 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14315 * parse.y (resolve_package): New local `acc'. Try to progressively
14316 build and guess a package and type name.
14318 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14320 * parse.y (find_applicable_accessible_methods_list): Load and
14321 layout the search class if necessary.
14322 (java_complete_tree): Keep to original type of the folded initial
14325 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14327 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14328 Generate error message if circularity is detected. New static
14330 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
14331 * jcf-write.c (generate_bytecode_insns): Very simply handle
14333 * parse.y (java_check_circular_reference): Use
14334 `cyclic_inheritance_report' during report, if necessary.
14335 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14336 walking NEW_ARRAY_INIT twice.
14338 2000-02-09 Tom Tromey <tromey@cygnus.com>
14340 * parse.y (check_class_interface_creation): Allow inner classes to
14341 be `private' or `protected', check modifiers' consistency. Prevent
14342 block local classes from bearing any modifiers.
14344 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14346 * except.c (check_start_handlers): Re-add prototype lost in last
14348 (maybe_start_try): Remove excess argument to `check_start_handlers'.
14350 2000-02-09 Andrew Haley <aph@cygnus.com>
14352 * decl.c (clear_binding_level): Remove excess initializer.
14353 (maybe_poplevels): Remove unused variable.
14354 (force_poplevels): Ditto.
14355 (struct binding_level): Add comment.
14357 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14359 * jcf-write.c (generate_classfile): Don't consider
14360 pre-initialization with reference value (use <clinit> instead.)
14361 * parse.y (java_fix_constructors): No generated constructor for
14363 (build_outer_field_access): Removed debug message.
14364 (outer_field_expanded_access_p): Adapted to bytecode generation.
14365 (build_outer_field_access_method): Use fix_method_argument_names.
14366 (build_outer_method_access_method): Fixed indentation. Added
14367 comment. Handle access method generation for static and also void
14369 (build_access_to_thisn): Inserted debug message.
14370 (maybe_build_thisn_access_method): Use fix_method_argument_names.
14371 (resolve_qualified_expression_name): Fixed comment.
14372 (not_accessible_p): Adapted to bytecode generation. Added comment.
14373 (patch_method_invocation): Added comment.
14374 (maybe_use_access_method): Fixed leading comment. Handle static
14376 (java_complete_lhs): Don't shortcut handling of initialized upon
14377 declaration String type static fields when generating bytecode.
14378 (patch_unaryop): Handle outer field access when generating
14381 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14383 * java-tree.h (FIELD_THISN): New macro.
14384 * jcf-write.c (append_synthetic_attribute): New function.
14385 (generate_classfile): Set "Synthetic" attribute on this$<n>,
14386 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14387 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14389 (build_outer_field_access): Turned on access functions usage and
14390 generation when compiling to bytecode.
14391 (maybe_use_access_method): Likewise.
14393 2000-01-25 Andrew Haley <aph@cygnus.com>
14395 * java-except.h (struct eh_range): Add `expanded' field.
14396 (maybe_start_try): Add end_pc arg.
14397 (maybe_end_try): Ditto.
14398 * java-tree.h (force_poplevels): new function.
14399 * expr.c (expand_byte_code): Don't call maybe_start_try or
14401 * except.c (add_handler): Reset expanded.
14402 (expand_start_java_handler): Set expanded.
14403 (check_start_handlers): Don't expand a start handler that's
14404 already been expanded.
14405 (maybe_start_try): Add end_pc arg. Only expand a handler which
14407 (expand_end_java_handler): call force_poplevels.
14408 (force_poplevels): new function.
14409 * decl.c (binding_level): Add start_pc of binding level.
14410 (maybe_pushlevels): Call maybe_start_try when pushing binding
14412 (maybe_poplevels): Call maybe_end_try when popping binding levels.
14413 (LARGEST_PC): Define.
14414 (clear_binding_level): Use LARGEST_PC.
14416 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14417 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14418 (binding_depth, is_class_level, current_pc): new variables.
14419 (struct binding_level): ditto.
14420 (indent): new function.
14421 (push_jvm_slot): add debugging info.
14422 (maybe_pushlevels): ditto.
14423 (maybe_poplevels): ditto.
14424 (pushlevel): ditto.
14426 (start_java_method): ditto.
14427 (give_name_to_locals): comment only.
14428 * except.c (binding_depth, is_class_level, current_pc):
14430 (expand_start_java_handler): add debugging info.
14431 (expand_end_java_handler): ditto.
14433 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14435 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14436 (print_name_for_stub_or_jni, process_file): Constify a char*.
14438 2000-02-03 Tom Tromey <tromey@cygnus.com>
14440 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14442 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14444 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14445 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14448 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14450 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14451 * java-tree.h (TYPE_II_STMT_LIST): New macro.
14452 (struct lang_type): New field `ii_block'.
14453 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14454 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14455 * parse.h (struct parser_ctxt): New field `instance_initializers'.
14456 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14457 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14458 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14460 * parse.y (add_instance_initializer): New function.
14461 (in_instance_initializer): New static global.
14462 (class_body_declaration:): Link instance initializer block.
14463 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14464 (array_creation_expression:): Remove unused local.
14465 (java_parser_context_push_initialized_field): Fixed leading
14466 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14467 CPC_INSTANCE_INITIALIZER_LIST.
14468 (java_parser_context_pop_initialized_field): Likewise.
14469 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14470 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14471 CPC_INITIALIZER_STMT.
14472 (fix_constructors): New local `class_type'. Use it. Call
14473 add_instance_initializer.
14474 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14475 (patch_return): Forbid return in instance initializers.
14476 (patch_throw_statement): Enforce exception handling in the context
14477 of instance initializers.
14479 2000-02-03 Tom Tromey <tromey@cygnus.com>
14481 * Make-lang.in (java.mostlyclean): Remove executables in
14484 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14486 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14487 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14488 (java_float_finite): Convert to use union Word from javaop.h.
14489 (java_double_finite): Convert to use union DWord from javaop.h.
14491 2000-02-02 Tom Tromey <tromey@cygnus.com>
14493 * gjavah.c (options): Added `jni' entry.
14494 (help): Document -jni.
14495 (flag_jni): New global.
14496 (process_file): Handle JNI output. Don't print text from
14497 -prepend, -add, etc, when generating stubs. Only remove `.class'
14498 suffix if it actually exists.
14499 (main): Create a `.c' file when run with `--jni --stubs'. Create
14500 correct output file name with `--jni'.
14501 (print_include): Mangle header name differently in JNI case.
14502 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14504 (print_method_info): Handle JNI case. Put signature info into
14505 method name. Handle case when STREAM is NULL.
14506 (print_name_for_stub_or_jni): New function.
14507 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
14508 (print_cxx_classname): Handle JNI.
14509 (print_full_cxx_name): Likewise.
14510 (decode_signature_piece): Likewise.
14511 (overloaded_jni_method_exists_p): New function.
14512 (struct method_name): Added `signature' and `sig_length' fields.
14513 (HANDLE_END_FIELD): Do nothing in JNI mode.
14515 2000-02-02 Tom Tromey <tromey@cygnus.com>
14517 * jv-scan.c: Include version.c, <getopt.h>.
14518 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14519 (options): New array.
14520 (usage): New function.
14521 (version): New function.
14522 (main): Use getopt_long to parse command line.
14523 * jcf-dump.c: Include version.c, <getopt.h>.
14524 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14525 OPT_JAVAP): New macros.
14526 (options): New array.
14527 (usage): Return `void'. Changed message.
14528 (help): New function.
14529 (version): New function.
14530 (main): Use getopt_long_only to parse command line.
14531 * gjavah.c: Include <getopt.h>.
14532 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14533 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14534 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14535 (options): New array.
14536 (java_no_argument): Removed.
14537 (help): Updated with missing options.
14538 (main): Use getopt_long_only to parse command line.
14539 (usage): Changed message.
14541 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14543 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14544 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
14545 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
14546 * parse.y (array_creation_expression:): Handle anonymous arrays.
14547 (build_array_from_name): Don't set `ret_name' if null.
14548 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
14549 (qualify_ambiguous_name): Likewise.
14550 (java_complete_expand_class): Likewise.
14552 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14554 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
14555 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
14556 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
14557 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
14558 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
14559 AIPL_FUNCTION_COMPLETED_INVOCATION.
14560 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
14561 AIPL_FUNCTION_INVOCATION_READY.
14562 (AIPL_FUNCTION_DECLARATION): New enum entry.
14563 * parse.y (reorder_static_initialized): New function.
14564 (java_parser_context_pop_initialized_field): Use it.
14565 (add_inner_class_fields): Use
14566 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
14567 augmented. Install marker after last alias initializer, if any.
14568 (generate_finit): Fixed typo. Don't try to retain only the used
14570 (method_header): Compute and set DECL_FUNCTION_NAP.
14571 (method_declarator): Fixed comment. Insert alias initializer in
14573 (build_alias_initializer_parameter_list): Fixed leading
14574 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
14575 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
14576 (java_complete_expand_class): Code to retain only used aliases
14578 (java_complete_expand_methods): New local `first_decl'. Generate
14579 $finit$ first, then expand the constructors, regular methods and
14581 (java_complete_expand_method): Don't report error on missing
14582 return statement if previously detected bogus.
14583 (fix_constructors): Don't patch constructor parameters list.
14584 (patch_method_invocation): Use new AIPL enum values. Reverse
14585 alias initializer list for anonymous classes.
14587 2000-01-30 Anthony Green <green@redhat.com>
14589 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
14590 determine how many stack slots to pop.
14592 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
14594 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
14595 error handling/recovery.
14596 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
14598 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14600 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
14601 FIELD_LOCAL_ALIAS_USED): New macros.
14602 (DECL_FUNCTION_NAP): New macro.
14603 (struct lang_decl): New field `nap'.
14604 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
14605 (struct lang_type): New fields `finit_stmt_list' and
14606 `clinit_stmt_list'.
14607 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
14608 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
14609 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
14610 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
14611 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
14612 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
14613 (BUILD_THROW): Macro line separator re-indented.
14614 * parse.y (end_class_declaration): New function.
14615 (maybe_generate_pre_expand_clinit): New name for
14616 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
14617 pre-expand static fields.
14618 (maybe_generate_clinit): Function deleted.
14619 (check_for_static_method_reference): Prototype's parameter list
14621 (generate_finit): New name for maybe_generate_finit. Changed
14622 leading comment. Function rewritten to use
14623 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
14624 (build_alias_initializer_parameter_list): New function.
14625 (java_parser_context_pop_initialized_field): Likewise.
14626 (add_inner_class_fields): Likewise.
14627 (type_declaration:): Call end_class_declaration.
14628 (class_member_declaration:): Likewise.
14629 (formal_parameter_list:): Fixed typos.
14630 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
14631 element. Improved error handling.
14632 (block_statement:): Call end_class_declaration.
14633 (anonymous_class_creation:): Likewise.
14634 (create_anonymous_class): Fixed comments.
14635 (create_class): Call add_inner_class_fields.
14636 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
14637 (method_header): Use MARK_FINAL_PARMS.
14638 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
14639 (method_declarator): Propagate final argument flag.
14640 (craft_constructor): New local `artificial'. Call
14641 build_alias_initializer_parameter_list. Use
14642 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
14643 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
14645 (complete_expand_class): Get rid of unused outer context local
14647 (java_complete_expand_methods): Fixed leading
14648 comment. Generate/pre-expand <clinit> first. Changed method
14649 expansion order to regular, $finit$, constructors, <clinit>.
14650 (java_complete_expand_method): Set current_function_decl.
14651 (fix_constructors): Fix constructor parameter list to account for
14652 outer context local alias initializers.
14653 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14654 (resolve_expression_name): Lookup outer context local aliases. New
14655 local `access', use it.
14656 (patch_method_invocation): Patch inner class ctor invocation with
14657 outer context local aliases initialization values. $finit$
14658 invocation patching now includes things generated with
14659 build_alias_initializer_parameter_list.
14660 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14661 (build_super_invocation): Likewise.
14662 (patch_assignment): Changed comment.
14664 2000-01-27 Andrew Haley <aph@cygnus.com>
14666 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
14670 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14672 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
14674 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
14676 * parse.y (register_fields): Don't pass a format specifier to
14677 OBSOLETE_MODIFIER_WARNING.
14678 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
14679 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
14681 (check_modifiers): Change function into a macro.
14682 (check_class_interface_creation): Pass a literal format string.
14684 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14686 * buffer.h: PROTO -> PARAMS.
14687 * check-init.c: Likewise.
14688 * class.c: Likewise.
14689 * constants.c: Likewise.
14690 * convert.h: Likewise.
14691 * decl.c: Likewise.
14692 * except.c: Likewise.
14693 * expr.c: Likewise.
14694 * gjavah.c: Likewise.
14695 * java-except.h: Likewise.
14696 * java-tree.h: Likewise.
14697 * jcf-depend.c: Likewise.
14698 * jcf-dump.c: Likewise.
14699 * jcf-parse.c: Likewise.
14700 * jcf-path.c: Likewise.
14701 * jcf-reader.c: Likewise.
14702 * jcf-write.c: Likewise.
14704 * jv-scan.c: Likewise.
14705 * jvgenmain.c: Likewise.
14706 * jvspec.c: Likewise.
14707 * lang.c: Likewise.
14710 * parse-scan.y: Likewise.
14711 * parse.h: Likewise.
14712 * parse.y: Likewise.
14713 * typeck.c: Likewise.
14714 * verify.c: Likewise.
14715 * xref.c: Likewise.
14716 * xref.h: Likewise.
14717 * zextract.c: Likewise.
14718 * zipfile.h: Likewise.
14720 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14722 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14723 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
14724 * constants.c (build_constant_data_ref): Check for cached
14725 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
14726 in TYPE_CPOOL_DATE_REF.
14727 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
14728 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
14729 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
14730 (LOCAL_FINAL): New macro.
14731 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
14732 constant pool -- don't try to reuse.
14733 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
14734 TYPE_LANG_SPECIFIC.
14735 (find_in_current_zip): Use TYPE_JCF.
14736 * parse.h (java_check_final): Prototype removed.
14737 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
14738 (maybe_create_class_interface_decl,
14739 check_class_interface_creation): Likewise.
14740 (java_expand_finals): Function removed.
14741 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
14742 (block_statement:): Fixed comment.
14743 (anonymous_class_creation:): Likewise.
14744 (check_class_interface_creation): Reversed Jan 12, 2000 extra
14746 (check_class_interface_creation): Loosened error report on (inner)
14747 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
14748 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
14749 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
14751 (create_interface): Likewise.
14752 (anonymous_class_counter): New static global.
14753 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
14754 patch. Fixed comments.
14755 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
14756 anonymous_class_counter when declaring a toplevel class.
14757 (craft_constructor): Fixed constructor name when handling
14758 anonymous classes. Anonymous class constructors to feature hidden
14759 this$<n> parameter.
14760 (java_fix_constructors): Added comment.
14761 (java_check_final): Function removed.
14762 (java_complete_expand_methods): Fixed comment. Don't generate
14763 class data, save its outgoing constant pool instead.
14764 (verify_constructor_super): Skip anonymous class constructor
14765 hidden this$<n> parameter.
14766 (java_expand_classes): New local `saved_ctxp'. Removed call to
14767 java_expand_finals and java_check_final. Expand anonymous class
14768 constructors. Generate class data.
14769 (build_super_invocation): Skip anonymous class hidden this$<n>
14771 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
14772 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14773 (set_java_signature): Likewise.
14775 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14777 * gjavah.c: Delete ACC_VISIBILITY define.
14778 * jcf.h: Add ACC_VISIBILITY define.
14779 * parse.y: final: rule tagged <value>.
14780 (java_check_regular_methods): Use ACC_VISIBILITY define for
14781 default package access check.
14782 (local_variable_declaration_statement): Use final: rule.
14784 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14786 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
14787 (final:): New rule.
14789 2000-01-17 Tom Tromey <tromey@cygnus.com>
14791 * gjavah.c (print_field_info): Allow non-static final fields.
14793 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14795 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
14796 * parse.y (patch_anonymous_class): New function.
14797 (create_anonymous_class): Register incomplete type when the
14798 class/interface to extends/implement isn't known yet.
14799 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
14800 (verify_constructor_super): Tuned error message.
14802 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14804 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
14805 (ANONYMOUS_CLASS_P): New macro.
14806 (TYPE_SIGNATURE, TYPE_JCF): New macros.
14807 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
14808 * parse.y (create_class): Added leading argument.
14809 (maybe_create_class_interface_decl,
14810 check_class_interface_creation): Likewise.
14811 (craft_constructor): New function.
14812 (verify_constructor_super): Added argument in prototype.
14813 (class_declaration:): Inserted leading argument.
14814 (for_begin:): Use FOR_LOOP_P.
14815 (anonymous_class_creation): Create WFL of the anonymous class to
14816 instantiate. Call build_new_invocation. Added comments.
14817 (check_class_interface_creation): Handle parameter `anonymous' in
14818 verbose mode class creation announce.
14819 (link_nested_class_to_enclosing): Exclude anonymous classes.
14820 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
14821 anonymous class, even though they appear to have an enclosing
14823 (create_interface): Pass extra argument to
14824 check_class_interface_creation.
14825 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
14826 (create_class): Call check_class_interface_creation and
14827 maybe_create_class_interface_decl with extra new argument. Don't
14828 add private this$<n> to anonymous classes.
14829 (method_declarator): Insert hidden this$<n> to anonymous class
14831 (java_fix_constructors): Deleted code creating default
14832 constructor. Call craft_constructor instead.
14833 (java_check_regular_methods): Set `saw_constructor' to 1 for
14835 (fix_constructors): Pass extra argument to verify_constructor_super.
14836 (verify_constructor_super): New local `sdecl', use it. Search for
14837 matching constructor (possibly featuring arguments) in super
14839 (lookup_method_invoke): Craft constructor according to arguments
14840 list when dealing with anonymous class constructors.
14841 (build_super_invocation): Pass arguments to anonymous class super
14843 (search_loop): Use FOR_LOOP_P.
14844 (labeled_block_contains_loop_p): Likewise.
14846 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14848 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
14849 (enclosing_context_p): New function.
14850 (get_access_flags_from_decl): Handle CLASS_STATIC.
14851 (maybe_layout_super_class): Extra first argument passed to
14853 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
14855 * decl.c (access0_identifier_node): New global.
14856 (init_decl_processing): access0_identifier_node initialized.
14857 (pushdecl): Set DECL_CONTEXT only on non type decls.
14858 * expr.c (lookup_field): Lookup inner class fields in enclosing
14860 (expand_invoke): Use ID_INIT_P.
14861 (expand_java_field_op): Use DECL_CLINIT_P.
14862 * java-tree.def (CLASS_LITERAL): New tree code.
14863 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
14864 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
14865 (struct lang_decl): New field `inner_access'.
14866 (enclosing_context_p): Prototyped.
14867 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
14868 ID_CLINIT_P): New macros.
14869 (CLASS_STATIC): New macro.
14870 (CLASS_ACCESS0_GENERATED_P): New macro.
14871 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
14872 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
14873 INNER_CLASS_P): New macros.
14874 (DECL_INNER_CLASS_LIST): New macro.
14875 * jcf-parse.c (yyparse): Avoid the use of ANSI string
14877 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14878 the shift value to int. Fixed typo in comment.
14879 * lex.c (inst_id, wpv_id): Initialize.
14880 * mangle.c (unicode_mangling_length): Take `$' into account.
14881 * parse.h (DRECOVER, RECOVER): Terminate properly.
14882 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
14883 (typedef struct _jdep): New field `enclosing'.
14884 (JDEP_ENCLOSING): New macro.
14885 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
14886 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
14887 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
14888 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
14889 GET_ENCLOSING_CPC_CONTEXT): New macros.
14890 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
14891 (do_resolve_class): Added extra argument in prototype.
14892 * parse.y (resolve_class): Added extra argument in prototype.
14893 (maybe_create_class_interface_decl): Likewise.
14894 (maybe_use_access_method, build_wfl_wrap): New functions.
14895 (java_complete_expand_classes, java_complete_expand_class):
14897 (java_parser_context_push_initialized_field,
14898 java_parser_context_suspend, java_parser_context_resume):
14900 (maybe_make_nested_class_name, make_nested_class_name,
14901 set_nested_class_simple_name_value,
14902 link_nested_class_to_enclosing, find_as_inner_class,
14903 find_as_inner_class_do, check_inner_class_redefinition,
14904 build_thisn_assign, build_current_thisn, build_access_to_thisn,
14905 maybe_build_thisn_access_method, build_outer_field_access,
14906 build_outer_field_access_methods, build_outer_field_access_expr,
14907 build_outer_method_access_method, build_new_access_id,
14908 build_outer_field_access_method, outer_field_access_p,
14909 outer_field_expanded_access_p, outer_field_access_fix,
14910 build_incomplete_class_ref, patch_incomplete_class_ref,
14911 create_anonymous_class): Likewise.
14912 (inst_id, wpv_id): New static global variables.
14913 (synchronized:): New rule, tagged <node>.
14914 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
14916 (anonymous_class_creation:): New rule, tagged <node>.
14917 (NEW_TK): Tagged <node>.
14918 (type_literals, array_type_literal): New rules, tagged <node>.
14919 (class_declaration:): Removed action when reducing by class_body:
14920 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
14921 using GET_CPC in sub-rules.
14922 (class_member_declaration): Handle inner classes.
14923 (method_declaration): When reducing method_header:, reset
14924 current_function_decl when appropriate.
14925 (method_declarator:): Set the number of formal parameter to 0 for
14926 method declared without arguments.
14927 (constructor_declarator:): Likewise.
14928 (static_initializer:): List of elements kept in a list.
14929 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
14930 use of the keyword `static' for type declarations.
14931 (block_statement:): Handle inner class declarations.
14932 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
14933 type qualified `this'.
14934 (class_instance_creation_expression): Use anonymous_class_creation:
14935 to handle inner class instances creation. Handle qualified `new'.
14936 (something_dot_new): Added appropriate actions.
14937 (create_new_parser_context): New function.
14938 (java_push_parser_context, java_parser_context_save_global,
14939 java_parser_context_suspend): Use create_new_parser_context.
14940 (check_modifiers): Changed leading comment.
14941 (check_class_interface_creation): Handle interclasses.
14942 (add_superinterfaces): Fixed comment.
14943 (create_interface): Build qualified name from the raw_name instead
14944 of its matching WFL. Push the initialized fields list. raw_name added
14945 as an extra argument to maybe_create_class_interface_decl.
14946 (create_class): Build qualified name from the raw_name instead of
14947 its matching WFL. Removed assignment to current_parsed_class_un.
14948 Call PUSH_ERROR before returning an error. Suspend the current
14949 parser context when processing an inner class. Push the
14950 initialized fields list. raw_name added as an extra argument to
14951 maybe_create_class_interface_decl. Add the private this$<n>
14953 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
14954 (register_fields): Get the class type from GET_CPC and handle
14955 previous errors. Added code to handle the creation of static
14956 fields in inner classes. Initialized fields initialization
14957 statements kept in a list of lists.
14958 (maybe_generate_finit): Initialized fields initialization
14959 statements kept in a list of lists. Use GET_CPC.
14960 (maybe_generate_clinit): Likewise.
14961 (method_header): Use GET_CPC and GET_CPC_UN.
14962 (parser_qualified_classname): Handle inner classes.
14963 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
14964 (java_fix_constructors): Hide pointer to enclosing context
14965 instance in constructor list when dealing with inner classes.
14966 (jdep_resolve_class): Call resolve_class with extra first argument
14968 (resolve_class): Add enclosing context as a first extra argument
14969 to do_resolve_class.
14970 (do_resolve_class): Call find_as_inner_class. Handle WFLs
14972 (resolve_no_layout): Extra argument added to resolve_class
14974 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
14975 (java_get_real_method_name): Use GET_CPC_UN.
14976 (check_abstract_method_definitions): Use DECL_CLINIT_P.
14977 (java_check_abstract_methods): Handle static method declared in
14978 inner classes by an error.
14979 (java_check_regular_methods): Use DECL_CLINIT_P.
14980 (source_start_java_method): Also set DECL_MAX_LOCALS.
14981 (create_artificial_method): Call java_parser_context_save_global
14982 and java_parser_context_restore_global instead of saving/restoring
14983 the context by hand.
14984 (expand_start_java_method): Improved verbose mode message.
14985 (java_complete_expand_methods): Fixed leading comment. Use
14987 (fix_constructors): Added assignment to this$<n> if necessary.
14988 (java_expand_classes): Call java_complete_expand_classes instead
14989 of java_complete_expand_methods.
14990 (make_qualified_primary): Simplified.
14991 (merge_qualified_name): Optimized for missing left or right parts.
14992 (resolve_expression_name): Handle access to outer class fields from
14994 (resolve_qualified_expression_name): New macro
14995 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
14996 classes. Report error on non appropriate qualification of
14997 `new'. Handle qualified `this'.
14998 (not_accessible_p): Allow access to outer class private fields from
15000 (patch_method_invocation): Handle method invocations through
15001 access methods and inner class constructor invocations.
15002 (find_applicable_accessible_methods_list): Search enclosing
15003 contexts of an inner class.
15004 (search_applicable_methods_list): Fixed typo.
15005 (argument_types_convertible): Handle inner class constructors'
15006 hidden outer context reference argument.
15007 (qualify_ambiguous_name): Handle qualified `this'.
15008 (java_complete_lhs): Handle use of field accessed through
15009 artificial access methods in various cases of assignments. Handle
15010 CLASS_LITERAL node.
15011 (check_final_assignment): Use DECL_CLINIT_P.
15012 (valid_ref_assignconv_cast_p): Handle the destination being an
15013 enclosing context of the source.
15014 (patch_unaryop): Handle use of field accessed through artificial
15016 (patch_return): Use DECL_CLINIT_P.
15017 (patch_throw_statement): Use DECL_CLINIT_P.
15018 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15019 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15022 2000-01-16 Anthony Green <green@cygnus.com>
15024 * parse.y (build_string_concatenation): Only use
15025 StringBuffer(String) shortcut if String arg is constant.
15027 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15029 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15030 the shift value to int. Fixed typo in comment.
15032 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
15034 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15035 * jcf-write.c: Likewise.
15036 * parse.y: Likewise.
15037 * parse.c: Regenerate.
15039 2000-01-09 Anthony Green <green@cygnus.com>
15041 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15042 bytecodes in the correct order.
15044 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15046 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15048 2000-01-06 Anthony Green <green@cygnus.com>
15050 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15051 before building constant array decl.
15053 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
15055 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15056 method invocation and typo in conditional expression.
15057 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15058 the appropriate NOTE_POP.
15059 * parse.y (patch_binop): Shift value mask to feature the right
15062 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15064 * class.c (assume_compiled, assume_compiled_node): Add static
15066 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15068 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15070 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15072 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15073 to `__modifier' to avoid stringifying it.
15075 * parse.y (verify_constructor_circularity): Don't call a variadic
15076 function with a non-literal format string.
15077 (java_check_abstract_methods): Move unreachable code inside
15078 `continue' statement.
15079 (lookup_method_invoke): Call xstrdup, not strdup.
15081 * expr.c (expand_java_field_op): Avoid the use of ANSI string
15084 * jcf-parse.c (yyparse): Likewise.
15086 * jv-scan.c (main): Likewise.
15088 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15090 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15091 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15092 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15095 * parse.y (synchronized, variable_redefinition_error,
15096 check_class_interface_creation, create_interface, create_class,
15097 method_header, finish_method_declaration,
15098 check_modifiers_consistency, method_declarator,
15099 complete_class_report_errors, check_abstract_method_definitions,
15100 java_check_regular_methods, check_throws_clauses,
15101 java_check_abstract_methods, read_import_dir,
15102 check_pkg_class_access, declare_local_variables, fix_constructors,
15103 cut_identifier_in_qualified, resolve_expression_name,
15104 resolve_qualified_expression_name, patch_method_invocation,
15105 java_complete_lhs, patch_assignment, try_builtin_assignconv,
15106 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15107 patch_exit_expr, patch_exit_expr, patch_switch_statement,
15108 patch_try_statement, patch_synchronized_statement,
15109 patch_throw_statement, check_thrown_exceptions,
15110 patch_conditional_expr): Likewise.
15112 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15114 * Makefile.in (LIBDEPS): Added gcc's errors.o
15115 (../jcf-dump$(exeext):): Link with gcc's errors.o
15116 (../gcjh$(exeext):): Likewise.
15117 * expr.c (expand_java_NEW): Layout the entire target type instead of
15118 laying out its methods only.
15119 (lookup_field): Layout the class after having loaded it.
15120 * java-tree.h (java_debug_context): Declared.
15121 * jcf-io.c (toplev.h): Included.
15122 (find_class): Removed assignment to jcf's outofsynch
15123 field. Force source file to be read if newer than its matching
15124 class file. Tweaked debug messages.
15125 * jcf-parse.c (jcf_out_of_synch): Deleted.
15126 (read_class): Call to jcf_out_of_synch removed.
15127 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15128 (jcf_out_of_synch): Prototype deleted.
15129 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15130 `deprecated' and `class_err': integer turned into bit-fields.
15131 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15132 * parse.y (package_list): New global.
15133 (package_declaration:): Record newly parsed package name.
15134 (extra_ctxp_pushed_p): Static global deleted.
15135 (java_parser_context_save_global): Create buffer context for the
15136 purpose of saving globals, if necessary.
15137 (java_parser_context_restore_global): Pop context pushed for the
15138 purpose of saving globals, if necessary.
15139 (java_debug_context_do): New prototype and function.
15140 (java_debug_context): Likewise.
15141 (do_resolve_class): Use already parsed package names to qualify
15142 and lookup class candidate.
15143 (java_pre_expand_clinit): Removed unnecessary local variable.
15145 1999-12-17 Tom Tromey <tromey@cygnus.com>
15147 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
15149 (process_file): Use `\n\' at end of each line in string.
15151 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15153 * expr.c (expand_invoke): Layout the loaded class before
15154 attempting to use it.
15155 (expand_java_field_op): Allow final field assignments to take
15157 * typeck.c (convert): Return error_mark_node if expr is null.
15159 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15161 * class.c (class_depth): Return -1 if the class doesn't load
15163 * expr.c (can_widen_reference_to): Check for errors during depth
15164 computation and return 0 accordingly.
15165 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15166 create default constructors and add an other error check.
15167 * parse.h (java_fix_constructors): Prototyped.
15168 * parse.y (java_pre_expand_clinit): Likewise.
15169 (build_super_invocation): Re-prototyped to feature one argument.
15170 (java_check_circular_reference): Directly use `current'.
15171 (java_fix_constructors): New function.
15172 (java_check_regular_methods): Don't create default constructors
15173 here, but abort if none were found.
15174 (java_complete_expand_methods): Pre-process <clinit> calling
15175 java_pre_expand_clinit.
15176 (java_pre_expand_clinit): New function.
15177 (fix_constructors): build_super_invocation invoked with the
15178 current method declaration as an argument.
15179 (build_super_invocation): Use the context of the processed method
15180 decl argument instead of current_class.
15181 * typeck.c (lookup_java_method): Take WFLs in method names into
15184 1999-12-14 Per Bothner <per@bothner.com>
15186 * class.c (make_class_data): flag_keep_inline_functions to keep
15187 private methods in the method array.
15189 1999-12-15 Anthony Green <green@cygnus.com>
15191 * check-init.c (check_init): Take into account both types of
15192 `throw's when checking for uninitialized variables.
15194 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15196 * parse.y (java_complete_lhs): Force conversion of array
15197 dimensions to int_type_node, that's what runtime's ABI expects.
15199 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15201 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15202 operand of a WFL, until the Java front-end gets fixed with regard
15203 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15205 1999-12-10 Andrew Haley <aph@cygnus.com>
15207 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15208 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15209 expr.c (build_java_athrow): Add support for sjlj-exceptions.
15210 java-tree.h: Ditto.
15211 jcf-write.c: Ditto.
15213 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
15215 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15216 before calling expand_eh_region_start and expand_start_all_catch.
15217 * except.c (expand_start_java_handler): Switch to permanent
15218 obstack before calling expand_eh_region_start.
15219 (expand_end_java_handler): Switch to permanent obstack before
15220 calling expand_start_all_catch.
15222 1999-12-5 Anthony Green <green@cygnus.com>
15224 * decl.c (init_decl_processing): Mark throw_node as a noreturn
15225 function with side effects.
15226 (init_decl_processing): Mark all memory allocating DECLs with
15229 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15231 * except.c (expand_end_java_handler): Call
15232 expand_resume_after_catch and end_catch_handler.
15234 1999-11-30 Anthony Green <green@cygnus.com>
15236 * verify.c (verify_jvm_instructions): Create new return label
15237 chain if non existent (don't rely on the verified state of the jsr
15240 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15242 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15243 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15245 * parse.y (patch_assignment): Removed bogus final class test on
15246 lhs when checking on whether to emit an ArrayStoreException runtime
15248 * expr.c (expand_java_arraystore): Likewise.
15250 1999-11-28 Anthony Green <green@cygnus.com>
15252 * decl.c (find_local_variable): Reuse single slot decls when
15255 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15257 * jcf-parse.c (saw_java_source): Global variable removed.
15258 (read_class): Don't use `saw_java_source'. Added extra braces.
15259 (yyparse): Code setting `saw_java_source' removed.
15261 1999-11-24 Mark Mitchell <mark@codesourcery.com>
15263 * except.c (emit_handlers): Zero catch_clauses after emitting them.
15265 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15267 * verify.c (merge_type_state): Non verified subroutines being
15268 considered more than once to trigger passive type merge.
15270 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15272 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15273 in case of error. Error message tuned.
15275 1999-11-21 Anthony Green <green@cygnus.com>
15277 * constants.c (find_methodref_index): Unwrap method names before
15278 inserting them in the constant pool.
15280 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15282 * class.c (assume_compiled_node): New typedef.
15283 (assume_compiled_tree): New static data.
15284 (find_assume_compiled_node): New function.
15285 (add_assume_compiled): New function.
15286 (assume_compiled): New function.
15287 * class.c (make_class_data): Use assume_compiled.
15288 (is_compiled_class): Use assume_compiled.
15290 * java-tree.h (add_assume_compiled): Declare.
15292 * lang.c (lang_decode_option): Parse new options.
15294 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15296 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15297 int_type_node: that's what `_Jv_AllocObject' expects.
15299 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15301 * parse.y (lookup_method_invoke): Use lang_printable_name to
15302 reliably build the type name during error report. Fixes PR gcj/97.
15304 1999-11-09 Tom Tromey <tromey@cygnus.com>
15306 * jcf-path.c: Include <sys/stat.h>.
15307 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
15308 (DIR_UP): New macro.
15310 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15312 * parse.y (source_end_java_method): Resume permanent allocation,
15313 reversing Apr 27 1998 patch.
15314 (patch_string_cst): Pop obstacks after having pushed the permanent
15317 1999-11-05 Tom Tromey <tromey@cygnus.com>
15319 * class.c (finish_class): Emit inlined methods if any native
15320 methods exist in the class. Fixes PR gcj/85.
15322 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
15324 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15325 (qualify_ambiguous_name): Likewise.
15327 1999-11-03 Godmar Back <gback@cs.utah.edu>
15329 * typeck.c: (lookup_java_method): search all inherited
15330 interfaces when looking up interface method.
15332 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15334 * parse.y (method_header:): Issue error message for rule `type
15336 (synchronized:): Error report when not using synchronized.
15338 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15340 * parse.y (resolve_qualified_expression_name): Prevent `this' from
15341 being used before the superclass constructor has been called.
15342 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15343 instead of `CALL_THIS_CONSTRUCTOR_P'.
15345 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
15347 * check-init.c: Fix typo in comment.
15349 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15351 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15354 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15356 * parse.y (expression_statement:): Call function to report
15357 improper invocation of a constructor.
15358 (parse_ctor_invocation_error): New function.
15360 1999-10-26 Mark Mitchell <mark@codesourcery.com>
15362 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15365 1999-10-21 Tom Tromey <tromey@cygnus.com>
15367 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15368 in generated `main'.
15370 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15372 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15373 (qualify_ambiguous_name): Likewise.
15375 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15377 * parse.y (java_complete_tree): fold_constant_for_init to work on
15379 (java_complete_lhs): Likewise.
15380 (array_constructor_check_entry): Complete an initializer element
15381 on permanent_obstack.
15383 1999-10-19 Tom Tromey <tromey@cygnus.com>
15385 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15386 From Mike Moreton <mike@pillim.demon.co.uk>.
15388 1999-10-15 Greg McGary <gkm@gnu.org>
15390 * java-tree.h (flag_bounds_check): Remove extern decl.
15391 * lang.c (flag_bounds_check): Remove global variable.
15392 (lang_f_options): Remove "bounds-check" entry.
15393 (lang_init_options): Default flag_bounds_check to "on".
15395 1999-10-14 Tom Tromey <tromey@cygnus.com>
15397 * jvgenmain.c (usage): New function.
15398 (main): Use it. Also, handle `-D' options.
15399 * jvspec.c (lang_specific_driver): Recognize -D.
15400 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15402 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15404 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15406 * jcf-dump.c (print_constant, disassemble_method): Don't call a
15407 variadic function with a non-literal format string.
15409 * parse-scan.y (report_main_declaration): Likewise.
15411 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15413 * parse.y (read_import_dir, patch_assignment, patch_binop,
15414 patch_array_ref): Likewise.
15416 * typeck.c (build_java_array_type): Likewise.
15418 * verify.c (verify_jvm_instructions): Likewise.
15420 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15422 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
15424 1999-10-07 Anthony Green <green@cygnus.com>
15426 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15427 where CHECK_PUT may fail for valid reasons.
15429 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
15430 UNSAFE_PUTN): New macros.
15432 1999-10-04 Tom Tromey <tromey@cygnus.com>
15434 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15435 well. Fixes Java PR gcj/59.
15436 * parse-scan.y (yyerror): Report errors.
15438 1999-09-24 Glenn Chambers <GChambers@provsol.com>
15440 * decl.c (insert_block): Remove unconditional `abort'.
15442 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
15444 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
15445 FUNCTION_CODE now of type int. All callers changed.
15446 Set the builtin's DECL_BUILT_IN_CLASS.
15448 1999-09-23 Tom Tromey <tromey@cygnus.com>
15450 * jvspec.c (lang_specific_driver): Don't read spec file if
15451 -fsyntax-only given.
15453 1999-09-22 Tom Tromey <tromey@cygnus.com>
15455 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15457 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15458 (WORDS_TO_LONG): Likewise.
15459 (WORDS_TO_DOUBLE): Likewise.
15461 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15463 * jcf-write.c (RELOCATION_VALUE_0): New macro.
15464 (RELOCATION_VALUE_1): Likewise.
15465 (emit_iinc, emit_reloc, push_constant1, push_constant2,
15466 push_in_const, push_long_const): Prototyped.
15467 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15468 (push_constant2): Likewise.
15469 (push_int_const): Cast find_constant1's integer arguments to `jword'.
15470 (find_constant_wide): Cast find_constant2's integer arguments to
15472 (find_constant_index): Cast find_constant2's and find_constant2's
15473 integer arguments to `jword'.
15474 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15475 (emit_switch_reloc): Use RELOCATION_VALUE_0.
15476 (emit_if): Use RELOCATION_VALUE_1.
15477 (emit_goto): Likewise.
15478 (emit_jsr): Likewise.
15479 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
15480 argument to push_long_const to HOST_WIDE_INT.
15482 1999-09-15 Andreas Schwab <schwab@suse.de>
15484 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15486 1999-09-20 Nick Clifton <nickc@cygnus.com>
15488 * lang.c (lang_decode_option): Extend comment.
15490 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15492 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
15495 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15497 * gjavah.c (get_field_name, print_method_info, print_include,
15498 add_namelet): Use xmalloc, not malloc.
15500 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
15501 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15504 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15506 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
15508 * jcf-path.c (add_entry): Likewise.
15510 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15512 * jv-scan.c (xmalloc): Remove definition.
15514 * jvgenmain.c (xmalloc): Likewise.
15516 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15518 * lex.c (java_store_unicode): Use xrealloc, not realloc.
15520 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
15521 concat, not xmalloc/sprintf.
15522 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15523 (xstrdup): Remove definition.
15525 * parse.y (duplicate_declaration_error_p,
15526 constructor_circularity_msg, verify_constructor_circularity,
15527 check_abstract_method_definitions, java_check_regular_methods,
15528 java_check_abstract_methods, patch_method_invocation,
15529 check_for_static_method_reference, patch_assignment, patch_binop,
15530 patch_cast, array_constructor_check_entry, patch_return,
15531 patch_conditional_expr): Use xstrdup, not strdup.
15533 * zextract.c (ALLOC): Use xmalloc, not malloc.
15535 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15537 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15539 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
15540 (do_spec, lang_specific_pre_link, lang_specific_driver,
15541 input_filename, input_filename_length): Don't declare.
15542 (main_class_name, jvgenmain_spec, lang_specific_driver):
15544 (lang_specific_driver): All calls to the function pointer
15545 parameter now explicitly call `fatal'.
15547 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15549 * parse.y (find_applicable_accessible_methods_list): Search
15550 abstract classes as interfaces.
15552 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15554 * class.c (finish_class): We're now outside a valid method
15555 declaration. Tell the rest of gcc so.
15557 1999-09-08 Bruce Korb autogen@linuxbox.com
15559 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
15561 1999-09-07 Tom Tromey <tromey@cygnus.com>
15563 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
15565 (decode_signature_piece): Don't emit "::" in JArray<>.
15566 (print_namelet): Only print trailing `;' when printing a class.
15568 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
15570 * java-tree.h: Delete declarations for all tree nodes now moved to
15572 * decl.c: Delete their definitions.
15574 1999-09-04 Mark Mitchell <mark@codesourcery.com>
15576 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
15577 * Makefile.in (OBJS): Add ggc-callbacks.o.
15578 (OBJDEPS): Likewise.
15580 1999-09-03 Tom Tromey <tromey@cygnus.com>
15582 * parse.y (strip_out_static_field_access_decl): Return operand if
15583 it satisfies JDECL_P.
15585 1999-09-02 Tom Tromey <tromey@cygnus.com>
15587 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
15588 Handle nested arrays, like `[[I'.
15590 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15592 * class.c (finish_class): Remove unused parameter, all callers
15595 * expr.c (build_java_athrow): Change return type to void.
15596 (java_lang_expand_expr): Make sure each case in switch returns a
15599 * java-tree.h (finish_class): Fix prototype to take void args.
15601 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
15602 (main): Issue return from main, not exit.
15604 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
15606 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
15608 * jv-scan.c (main): Issue return from main, not exit.
15610 * parse.y (check_abstract_method_definitions,
15611 java_check_abstract_method_definitions): Add static prototypes.
15612 (java_complete_expand_methods): Fix call to `finish_class'.
15614 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
15617 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15619 * lang.c (language_string): Constify.
15621 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15623 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
15624 Remove hacks for stuff which comes from libiberty.
15626 * Make-lang.in: Likewise.
15628 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
15630 * Makefile.in (xref.o): Depend on xref.c explicitly.
15632 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15634 * java-tree.h (lang_printable_name): Constify a char*.
15636 * lang.c (lang_printable_name): Likewise.
15638 1999-08-27 Jeffrey A Law (law@cygnus.com)
15640 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
15641 comments in C code.
15643 1999-08-26 Tom Tromey <tromey@cygnus.com>
15645 * gjavah.c (print_cxx_classname): Print "::" before qualified
15648 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
15650 * parse.y (lookup_cl): Changed leading comment. Now does its best
15651 to set the column number.
15652 (qualify_ambiguous_name): Take WFL wrappers into account.
15654 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
15656 * verify.c (verify_jvm_instructions): Don't check instruction
15657 validity beyond end of method.
15659 1999-08-25 Tom Tromey <tromey@cygnus.com>
15661 * jvspec.c (lang_specific_driver): Correctly handle --help again.
15663 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15665 * gjavah.c (print_name, print_base_classname, utf8_cmp,
15666 cxx_keyword_subst, generate_access, name_is_method_p,
15667 get_field_name, print_field_name, super_class_name, print_include,
15668 decode_signature_piece, print_class_decls, usage, help,
15669 java_no_argument, version, add_namelet, print_namelet): Add static
15671 (print_base_classname, utf8_cmp, cxx_keyword_subst,
15672 name_is_method_p): Constify a char*.
15673 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
15674 Provide a final else clause in an if-else-if.
15675 (print_field_info): Add missing final arg in function call to
15676 `print_field_name'.
15677 (print_method_info, decompile_method, decode_signature_piece,
15678 print_c_decl, print_full_cxx_name, print_stub,
15679 print_mangled_classname, super_class_name, print_include,
15680 add_namelet, add_class_decl, print_class_decls, process_file,
15681 help): Constify a char*.
15683 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
15684 push_int_const, find_constant_wide, find_constant_index,
15685 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
15686 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
15687 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
15688 emit_if, emit_goto, emit_jsr, call_cleanups,
15689 make_class_file_name): Add static prototypes.
15690 (generate_bytecode_return, generate_bytecode_insns): Pass a
15691 NULL_PTR, not a NULL_TREE.
15693 * jv-scan.c: Include "jcf.h".
15694 (main): Declare using DEFUN macro.
15696 * jvspec.c (find_spec_file, lang_specific_pre_link,
15697 lang_specific_driver): Add prototypes.
15698 (find_spec_file): Constify a char*.
15700 * keyword.gperf (hash, java_keyword): Add prototypes.
15702 * lang.c (lang_print_error): Add static prototype.
15703 (lang_init): Prefer memcpy over bcopy to avoid casts.
15705 * lex.c (yylex): Add static prototype.
15707 * parse-scan.y: Include "lex.c" earlier.
15709 * parse.h: Remove redundant declaration for `yylex'.
15711 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
15712 labeled_block_contains_loop_p): Add static prototypes.
15713 (not_accessible_p): Make static to match prototype.
15715 * verify.c (start_pc_cmp): Don't needlessly cast away const.
15717 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15719 * parse.y (check_method_redefinition): Changed leading comment.
15720 (check_abstract_method_definitions): New function.
15721 (java_check_abstract_method_definitions): New function.
15722 (java_check_regular_methods): Call it.
15723 (verify_constructor_super): Fixed indentation.
15724 (lookup_method_invoke): Likewise.
15726 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15728 * parse.y (method_header): Return a null pointer if the current
15729 class node is null.
15730 (finish_method_declaration): Return if the current function decl
15732 (source_start_java_method): Likewise.
15733 (java_method_add_stmt): Likewise.
15735 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15737 * class.c (emit_register_class): Removed unnecessary call to
15739 * parse.y (labeled_block_contains_loop_p): Removed unused local
15742 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15744 * parse.y (java_refold): Added prototype.
15746 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15748 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
15749 (java_stabilize_reference): Removed unnecessary `else'.
15750 (java_complete_lhs): Set flag to remember boolean. Call
15751 java_refold. Added comments.
15752 (java_decl_equiv): New function.
15753 (binop_compound_p): Likewise.
15754 (java_refold): Likewise.
15755 (patch_unaryop): Striped static field access assigned to decl and
15756 op. Changed promotion scheme for ++/-- operators.
15757 (search_loop): New function.
15758 (labeled_block_contains_loop_p): Likewise.
15759 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
15761 (patch_bc_statement): Call search_loop. Fixed comment.
15763 1999-08-14 Anthony Green <green@cygnus.com>
15765 * expr.c (java_lang_expand_expr): Mark static array data as
15768 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
15770 * jvgenmain.c (main): NUL-terminate name_obstack.
15772 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15774 * check-init.c (check_bool2_init, done_alternative): Add static
15777 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
15778 (add_method, build_utf8_ref, build_class_ref,
15779 append_gpp_mangled_type, layout_class_method): Constify a char*.
15781 * decl.c (push_promoted_type, make_binding_level): Add static
15783 (push_promoted_type, pushdecl): Constify a char*.
15785 * except.c (find_handler_in_range, link_handler,
15786 check_start_handlers): Add static prototypes.
15788 * expr.c (process_jvm_instruction): Constify a char*.
15790 * gjavah.c (main): Constify a char*.
15792 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
15795 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
15797 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
15798 munge, print_ents): Constify a char*.
15800 * jcf-dump.c (disassemble_method): Constify a char*.
15801 (print_constant_pool, print_exception_table): Add static prototypes.
15802 (print_constant, print_exception_table, main, disassemble_method):
15805 * jcf-io.c (find_classfile, find_class): Likewise.
15807 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
15808 (set_source_filename, predefined_filename_p): Add static prototypes.
15809 (set_source_filename, get_constant, get_class_constant,
15810 find_in_current_zip): Constify a char*.
15812 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
15814 (add_entry, add_path, jcf_path_classpath_arg,
15815 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15817 * jcf-reader.c (get_attribute, jcf_parse_preamble,
15818 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
15819 jcf_parse_one_method, jcf_parse_methods,
15820 jcf_parse_final_attributes): Add static prototypes.
15821 (get_attribute): Constify a char*.
15823 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
15824 jcf_dependency_add_target, jcf_path_classpath_arg,
15825 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15827 * jv-scan.c (main): Constify a char*.
15828 (gcc_obstack_init): Add prototype arguments.
15830 * jvgenmain.c (gcc_obstack_init): Likewise.
15831 (main): Constify a char*.
15833 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
15835 (put_decl_string, lang_print_error): Constify a char*.
15836 (lang_init): Remove redundant extern prototype.
15838 * mangle.c (emit_unicode_mangled_name): Constify a char*.
15840 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
15841 Add static prototypes.
15842 (get_type_from_signature): Constify a char*.
15844 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
15845 Add static prototypes.
15846 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
15847 (verify_jvm_instructions): Constify a char*.
15849 * xref.c (xref_flag_value): Likewise.
15851 * xref.h (xref_flag_value): Likewise.
15853 * zextract.c (makeword, makelong): Add static prototypes.
15854 (makeword, makelong): Constify a uch*.
15856 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15858 * lang.c (java_dummy_print): Constify a char*.
15859 (lang_print_error): Likewise.
15860 (lang_init): Remove redundant prototype for `print_error_function'.
15861 (lang_init_source): Likewise.
15862 (lang_identify): Constify a char*.
15864 1999-08-09 Tom Tromey <tromey@cygnus.com>
15866 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
15867 (WORDS_TO_LONG): Likewise.
15868 (WORDS_TO_DOUBLE): Likewise.
15870 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15872 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
15874 * expr.c (java_stack_pop, java_array_data_offset,
15875 build_java_throw_out_of_bounds_exception, case_identity,
15876 build_java_check_indexed_type): Add static prototypes.
15877 (linenumber_table, expand_invoke, expand_java_field_op,
15878 build_primtype_type_ref, expand_byte_code): Constify a char*.
15880 * java-tree.h (build_primtype_type_ref, linenumber_table):
15882 (java_lang_expand_expr): Add prototype.
15884 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
15885 `java_lang_expand_expr'.
15887 * lex.c (java_lex_error): Constify a char*.
15888 (java_get_unicode, java_read_char, java_allocate_new_line,
15889 java_unget_unicode, java_sneak_unicode): Prototype.
15891 * parse-scan.y (current_class, package_name, method_declarator,
15892 report_class_declaration, yyerror): Constify a char*.
15894 * parse.h (java_report_errors): Prototype.
15895 (yyerror): Constify a char*.
15897 * parse.y (classitf_redefinition_error, check_modifiers,
15898 parse_jdk1_1_error, lookup_package_type,
15899 lookup_package_type_and_set_next, get_printable_method_name,
15900 purify_type_name): Constify a char*.
15901 (build_super_invocation, maybe_generate_finit,
15902 verify_constructor_super, parser_add_interface,
15903 add_superinterfaces, jdep_resolve_class, note_possible_classname,
15904 java_complete_expand_methods, java_expand_finals,
15905 cut_identifier_in_qualified, java_stabilize_reference,
15906 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
15907 merge_string_cste): Prototype.
15908 (single_type_import_declaration, yyerror,
15909 variable_redefinition_error, build_array_from_name,
15910 build_unresolved_array_type, check_class_interface_creation,
15911 resolve_class, complete_class_report_errors,
15912 note_possible_classname, read_import_dir,
15913 find_in_imports_on_demand, resolve_package, fix_constructors,
15914 check_deprecation, lookup_method_invoke,
15915 maybe_build_primttype_type_ref, array_constructor_check_entry):
15917 (java_complete_expand_methods, java_expand_finals): Make static.
15918 (convert_narrow): Remove static prototype.
15920 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
15922 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
15924 1999-08-02 Richard Henderson <rth@cygnus.com>
15926 * decl.c: Include defaults.h instead of expr.h.
15927 * parse.y: Likewise.
15929 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
15931 * java/decl.c (start_java_method): Change all uses of
15932 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
15933 Ensure expr.h is included.
15934 * java/expr.c (pop_arguments): Ditto.
15935 * java/parse.y (expand_start_java_method): Ditto.
15937 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15939 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
15941 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
15943 * decl.c: Include "function.h".
15944 * except.c: Likewise.
15945 * parse.y: Likewise.
15946 * Makefile.in: Update dependencies.
15948 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15950 * expr.c (build_java_soft_divmod): Provide a default case in switch.
15951 (java_lang_expand_expr): Mark parameters `target', `tmode' and
15952 `modifier' with ATTRIBUTE_UNUSED.
15954 * gjavah.c (process_file): Add braces around ambiguous `else'.
15956 * jcf-dump.c (print_access_flags, localvar_free): Change return
15959 * parse.y (java_complete_expand_method): Initialize variable
15961 (resolve_qualified_expression_name): Likewise for `field_decl'.
15962 (patch_method_invocation): Likewise for `class_to_search'.
15963 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
15964 (patch_assignment): Likewise for `lhs_type'.
15966 * verify.c (verify_jvm_instructions): Remove unused variable
15969 1999-07-25 Richard Henderson <rth@cygnus.com>
15971 * decl.c (va_list_type_node): New.
15973 1999-07-25 Anthony Green <green@cygnus.com>
15975 * gjavah.c (print_stub): New function.
15976 (METHOD_IS_NATIVE): New macro.
15977 (print_mangled_classname): Make static.
15978 (HANDLE_END_FIELD): Don't emit fields during stub generation.
15979 (process_file): Perform stub generation.
15980 (HANDLE_METHOD): Don't emit class decls during stub
15982 (HANDLE_END_METHOD): Take into account stub generation.
15983 (print_method_info): Handle stub generation.
15984 (print_stub): New function.
15985 (print_cxx_classname): Make signature consistant with others.
15986 (help): Describe -stubs option.
15987 (main): Create stub file.
15988 (version): Use version.c.
15989 (print_full_cxx_name): New function.
15990 (print_c_decl): Use print_full_cxx_name.
15992 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15994 * check-init.c (check_init): Handle MAX_EXPR.
15996 1999-07-15 Andrew Haley <aph@cygnus.com>
15998 * lang.c (flag_use_divide_subroutine): New variable.
15999 * typeck.c: (convert_ieee_real_to_integer): Bounds check
16000 fp-to-integer conversion.
16001 (convert): Call convert_ieee_real_to_integer when flag_fast_math
16004 * expr.c (build_java_soft_divmod): New function.
16005 (build_java_binop): Call build_java_soft_divmod if
16006 flag_use_divide_subroutine is set.
16007 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16008 soft_lrem_node: new builtin functions.
16009 (init_decl_processing) Initialize the new builtins.
16010 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16011 soft_lrem_node: new builtin functions.
16012 (build_java_soft_divmod): New function.
16013 * parse.y: Call build_java_soft_divmod if
16014 flag_use_divide_subroutine is set.
16015 * parse.c: Rebuilt.
16017 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16018 a --specs= arg) even if not linking.
16019 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16020 -fuse-divide-subroutine
16022 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16024 * parse.y (resolve_and_layout): Check methods only once.
16025 (resolve_qualified_expression_name): Verify thrown exceptions
16027 (check_thrown_exceptions): Reject exceptions thrown in
16028 initializer. Error message tuned.
16030 1999-07-14 Andrew Haley <aph@cygnus.com>
16032 * expr.c (expand_expr): Do not return the last statement in a
16033 block as the block's value.
16035 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16037 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16038 CALL_EXPR, to avoid order of evaluation changes.
16040 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16042 * parse.y (qualify_ambiguous_name): Do not use
16043 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16045 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16047 * check-init.c (check_init): Handle MAX_EXPR.
16048 * expr.c (force_evaluation_order): Force method call arguments to
16049 be evaluated in left-to-right order.
16050 * parse.y (qualify_ambiguous_name): Loop again to qualify
16051 NEW_ARRAY_EXPR properly.
16053 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16055 * parse.y (patch_invoke): Resolve unresolved invoked method
16057 (qualify_ambiguous_name): STRING_CST to qualify expression for
16058 type name resolution.
16060 1999-06-24 Andrew Haley <aph@cygnus.com>
16062 * class.c (finish_class): Whenever a deferred method is
16063 output, rescan the list of methods to see if a new candidate for
16064 output can be found.
16066 1999-06-28 Tom Tromey <tromey@cygnus.com>
16068 * jvspec.c (lang_specific_driver): Recognize --help.
16070 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16072 * parse.y (resolve_package): Fixed bogus return statement.
16073 (patch_method_invocation): Resolve method invocation beginning with
16074 a package name qualifier.
16076 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16078 * Make-lang.in (java.stage1): Depend on stage1-start.
16079 (java.stage2): Likewise for stage2-start.
16080 (java.stage3): Likewise for stage3-start.
16081 (java.stage4): Likewise for stage4-start.
16083 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16085 * parse.y (java_complete_lhs): When doing cross referencing, don't
16086 try to keep file location on a WFL expanded as a CALL_EXPR.
16088 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16090 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16091 compiling to class file a void method with an empty method body.
16092 As a side effect, the bytecode backend will generate the
16093 appropriate `return' instruction.
16095 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16097 * parse.y (lookup_package_type_and_set_next): New function prototype.
16098 (resolve_package): Search current and imported packages.
16099 (lookup_package_type_and_set_next): New function.
16101 1999-06-22 Andrew Haley <aph@cygnus.com>
16103 * verify.c (verify_jvm_instructions): Check for pending blocks
16104 before invalid PC test and opcode switch, not after.
16106 1999-06-21 Andrew Haley <aph@cygnus.com>
16108 * except.c (find_handler_in_range): The upper limit for exception
16109 ranges is exclusive, not inclusive: (start <= pc < end).
16110 (link_handler): find child pointer which points to outer by
16111 searching sibling list: previous code incorrectly assumed that
16112 outer->outer->first_child must point to outer.
16113 * verify.c (verify_jvm_instructions): FIXME added to code for
16115 (verify_jvm_instructions): Do not assume that the last block
16116 processed in a subroutine is a block which ends with a `ret'
16117 instruction. With some control flows it is possible that the last
16118 block ends with an `athrow'.
16120 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16122 * parse.y (qualify_ambiguous_name): Reorganized the post
16123 evaluation of non WFL leading expression nodes.
16125 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16127 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16130 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16132 * parse.y (qualify_ambiguous_name): Handle qualified expression
16133 beginning with a STRING_CST.
16135 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16137 * parse.y (register_fields): Set DECL_INITIAL on both
16138 pre-initialized static and public fields.
16139 (resolve_field_access): Static field access expressions to always
16141 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16142 qualification. CONVERT_EXPR to be resolved as an expression name.
16143 (java_complete_lhs): Identify and access qualified final
16144 initialized field in switch statement case expression.
16145 (fold_constant_for_init): Pre-initialized field decl constant to
16148 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16150 * parse.y (note_possible_classname): Mark returned node with
16151 QUALIFIED_P only if the original class name contained a '/'.
16153 1999-06-05 Anthony Green <green@cygnus.com>
16155 * Make-lang.in (gcjh): More parallel build fixes.
16157 1999-06-03 Mike Stump <mrs@wrs.com>
16159 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16161 1999-06-02 Anthony Green <green@cygnus.com>
16163 * except.c (link_handler): Chain exception handlers in order.
16165 1999-06-02 Anthony Green <green@cygnus.com>
16167 * expr.c (expand_byte_code): Fill unreachable bytecode regions
16168 with nops and process as usual in order to always set correct EH
16169 ranges. Emit detailed warnings about unreachable bytecodes.
16171 1999-06-02 Anthony Green <green@cygnus.com>
16173 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16176 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16178 * parse.y (lookup_field_wrapper): Unified returned value to NULL
16179 or the searched field decl.
16181 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16183 * parse.y (fold_constant_for_init): Convert numerical constant
16184 values to the type of the assigned field.
16186 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16188 * expr.c (lookup_field): Relaxed the test on class loading error
16190 * parse.y (fold_constant_for_init): Enabeled old code.
16192 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16194 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16195 decide the validity of the cast of a java.lang.Cloneable reference
16197 (patch_conditional_expr): Fixed first argument passed to
16198 binary_numeric_promotion.
16200 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16202 * parse.y (qualify_ambiguous_name): Take into account that a
16203 CONVERT_EXPR might specify a type as a WFL.
16205 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16207 * parse.y (patch_assignment): Save the rhs before using it as an
16208 argument to _Jv_CheckArrayStore.
16210 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16212 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16214 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16216 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16217 floating point literal only when the exponent indicator has been
16220 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16222 * parse.y (formal_parameter:): Construct argument tree list
16223 element even if a yet unsupported final parameter was encountered.
16225 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16227 * parse.y (finish_method_declaration): Issue errors for native or
16228 abstract methods declared with a method body, as well as for non
16229 native or non abstract methods with no method body.
16231 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16233 * class.c (build_utf8_ref): Initialize variable `field'.
16235 * decl.c (init_decl_processing): Initialize variable `field'.
16237 * expr.c (build_known_method_ref): Mark parameters `method_type',
16238 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16239 (process_jvm_instruction): Likewise for parameter `length'.
16241 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16242 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16245 * parse.y (maybe_generate_clinit): Remove unused variable
16246 `has_non_primitive_fields'.
16247 (find_in_imports_on_demand): Initialize variables `node_to_use'
16249 (patch_binop): Likewise for variable `prom_type'.
16250 (patch_unaryop): Likewise for variable `prom_type'.
16252 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16254 * xref.c (xref_table): Add missing initializer.
16256 1999-05-14 Tom Tromey <tromey@cygnus.com>
16258 * java-except.h (struct eh_range): Removed unused `next' member.
16259 * verify.c (verify_jvm_instructions): Call check_nested_ranges
16260 after adding all exception handlers. Sort exception ranges in
16262 (struct pc_index): New structure.
16263 (start_pc_cmp): New function.
16264 * except.c (add_handler): Return `void'. Don't call link_handler;
16265 instead construct an ordinary linked list and do range
16267 (check_nested_ranges): New function.
16268 (link_handler): Changed interface to allow merging of eh_ranges.
16269 Split overlapping ranges. Return `void'.
16271 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16273 * parse.y (constructor_block_end:): New rule, tagged <node>.
16274 (constructor_body:): Use `constructor_block_end' instead of
16277 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16279 * parse.y (statement_nsi:): Pop `for' statement block.
16280 (java_complete_lhs): Labeled blocks containing no statement are
16281 marked as completing normally.
16283 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16285 * xref.c (xref_set_current_fp): New function, defined.
16286 * xref.h (xref_set_current_fp): New function, prototyped.
16288 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16290 * check-init.c (check_init): Take into account that
16291 LABELED_BLOCK_STMT can be empty.
16293 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16295 * parse.y (java_check_regular_methods): Warning check on not
16296 overriding methods with default access in other packages does not
16297 apply to `<clinit>'.
16298 (java_complete_lhs): If block body is an empty_stmt_node, replace
16299 it by NULL_TREE. This prevents gcc from generating an irrelevant
16302 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16304 * check-init.c (check_init): Removed code accepting to see things
16305 falling through default:, when doing xrefs.
16306 * java-tree.h (do_not_fold): New global variable, declared.
16307 * parse.y (do_not_fold): New global variable, defined.
16308 (java_complete_expand_method): Set `do_not_fold' to the value of
16309 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16310 and reinstall them after them have been purged; do not check for
16311 initializations; do not issue missing return errors.
16312 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16314 (patch_binop): Skip the fold part when doing xrefs.
16315 (build_string_concatenation): Skip the concatenation part when
16317 (patch_synchronized_statement): Do not generate a try-finally when
16319 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16320 and keep the location where the throw was seen.
16321 * typeck.c (convert): When `do_not_fold' is set, do not attempt
16322 any treatment on the converted node an simply return a NOP_EXPR of
16324 * xref.c (xref_get_data): New function, defined.
16325 * xref.h (xref_get_data): New function, declared.
16326 (XREF_GET_DATA): Use xref_get_data.
16328 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16330 * gjavah.c (print_include): Cast the result of `strlen' to int
16331 when comparing against a signed value.
16332 (add_namelet): Likewise.
16334 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16336 * expr.c (expand_invoke): Mark parameter `nargs' with
16338 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16340 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16343 * jcf-reader.c (get_attribute): Cast a value to long
16344 when comparing against a signed expression. Likewise.
16346 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16347 HOST_BITS_PER_CHAR.
16349 1999-05-11 Andrew Haley <aph@cygnus.com>
16351 * parse.y (source_end_java_method): If the current method contains
16352 any exception handlers, force asynchronous_exceptions: this is
16353 necessary because signal handlers in libjava may throw exceptions.
16354 * decl.c (end_java_method): Ditto.
16356 1999-05-11 Tom Tromey <tromey@cygnus.com>
16358 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16360 * jvspec.c (THREAD_NAME): Removed.
16361 (GC_NAME): Likewise.
16362 (MATHLIB): Likewise.
16363 (WITHLIBC): Likewise.
16365 (THREADLIB): Likewise.
16366 (MATH_LIBRARY): Likewise.
16367 (lang_specific_driver): Don't add `-l' options to command line.
16368 Instead, add a single --specs option. Recognize `-L' options and
16369 use them to search for spec file.
16370 (find_spec_file): New function.
16371 (SPEC_FILE): New define.
16373 1999-05-11 Dave Brolley <brolley@cygnus.com>
16375 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16376 cpplib-enabled build.
16378 1999-05-05 Per Bothner <bothner@cygnus.com>
16380 * class.c (make_field_value): DECL_INITIAL may be a string literal;
16381 temporarily zero it while calling rest_of_decl_compilation.
16383 * java-tree.h (string_ptr_type_node): Add declaration.
16384 * decl.c: Define and initialize string_ptr_type_node.
16385 * parse.y (patch_string_cst): Use string_ptr_type_node.
16387 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
16388 * parse.y (for_statement): Now unconditionally exit_block.
16389 (finish_labeled_statement): No longer exit_block if for-loop.
16390 (patch_loop_statement): Check harder if the loop is already labeled.
16392 * parse.y (patch_initialized_static_field): Removed function.
16393 (maybe_generate_clinit): Removed special handling for interfaces.
16394 (java_complete_expand_methods): Do a preliminary java_complete_tree
16395 on <clinit> to determine if it can be removed.
16396 (java_complete_expand_method): Remove special handling for <clinit>.
16397 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
16398 optimize if we get back empty_stmt_node.
16399 For MODIFY_EXPR, re-do checking of static initializers.
16400 (fold_constant_for_init): Don't return immediate if VAR_DECL.
16401 For VAR_DECL, pass correct context.
16403 * verify.c (verify_jvm_instructions): Better error messages.
16405 1999-05-03 Tom Tromey <tromey@cygnus.com>
16407 * parse-scan.y (interface_declaration): Call
16408 report_class_declaration for interfaces.
16410 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
16412 * Makefile.in: Remove -v from bison command lines.
16414 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16416 * check-init.c (check_init): Exclude a case of error when doing
16418 * class.c (layout_class_method): Don't generate the error message
16419 twice when compiling from source.
16420 * lang-options.h: Added `-Wredundant-modifers' and
16421 `-Wunusupported-jdk11' flags and help text.
16422 * lang.c (lang_decode_option): Added support for
16423 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
16424 flag_static_local_jdk11 and flag_redundant set accordingly.
16425 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16426 * parse.h (EXPR_WFL_ADD_COL): New macro.
16427 (DECL_END_SOURCE_LINE): Likewise.
16428 (DECL_INHERITED_SOURCE_LINE): Likewise.
16429 * parse.y (static_ref_err): New function, prototyped.
16430 (CCB_TK): Now tagged <operator>.
16431 (class_body:): Remember the location of the closing '}' of a class
16432 definition when doing xrefs.
16433 (block:): Likewise.
16434 (block_end:): Likewise.
16435 (create_class): Remember the location of the inherited class
16436 identifier when doing xrefs.
16437 (register_fields): Added test on first operand of `init' before
16438 testing it TREE_CODE.
16439 (method_header): Store the location of the class identifier in the
16440 class decl when doing xrefs.
16441 (finish_method_declaration): Don't combine first/last method line
16443 (java_check_regular_methods): Warning check on not overriding
16444 methods with default access on other packages move before check on
16445 static methods. Initialization of `aflags' also moved up.
16446 (resolve_expression_name): Call static_ref_err to report the error.
16447 (static_ref_err): New function, implemented.
16448 (resolve_field_access): Returned simplified static field access
16450 (resolve_qualified_expression_name): Check for illegal use of
16451 static fields in a non static context. Call static_ref_err to
16452 report error in various places.
16453 (java_complete_tree): Do not fold initialized static fields when
16455 (java_complete_lhs): Likewise.
16457 1999-04-29 Anthony Green <green@cygnus.com>
16459 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16460 create internal labels.
16461 (lookup_label): Ditto.
16463 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16465 * class.c (layout_class_method): Generate <clinit>'s rtl for
16467 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
16468 for interfaces' <clinit>.
16469 * expr.c (lookup_field): Search for fields in interfaces.
16470 (expand_invoke): Fixed indentation.
16471 (expand_java_field_op): Likewise. Use IS_CLINIT.
16472 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16473 (IS_CLINIT): New macro.
16474 * parse.y (type_declaration:): Call maybe_generate_clinit after an
16475 interface was parsed.
16476 (maybe_generate_clinit): Don't generate if the current class is an
16477 interface with only fields of primitive types.
16478 (reset_method_name): Use IS_CLINIT.
16479 (java_complete_expand_method): Expand <clinit> when it exists for
16480 interfaces. Use IS_CLINIT.
16481 (resolve_expression_name): Use DECL_CONTEXT instead of
16482 current_class to build static field references.
16483 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
16484 ARRAY_REF when doing xreferencing.
16485 (check_final_assignment): Fixed typo in leading comment. Use
16487 (patch_array_ref): Don't fully expand array references when
16489 (patch_return): Use IS_CLINIT.
16490 (patch_throw_statement): Likewise.
16492 1999-04-22 Tom Tromey <tromey@cygnus.com>
16494 * Make-lang.in (JAVA_SRCS): Added check-init.c.
16496 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
16498 * decl.c (predef_filenames, predef_filenames_size): New globals
16499 (init_decl_processing): predef_filenames and predef_filenames_size
16501 * java-tree.h (predef_filenames, predef_filenames_size): Declared
16503 * jcf-parse.c (predefined_filename_p): New function.
16504 (yyparse): Check that files on the command line are specified only
16505 once and issue a warning otherwise.
16506 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16507 * parse.y (source_end_java_method): Nullify NOP method bodies, to
16508 avoid a gcc warning with -W -Wall turned on.
16509 (java_expand_classes): Abort if errors were encountered.
16510 (java_complete_lhs): If the cross reference flag is set, wrap
16511 field DECL node around a WFL when resolving expression name.
16513 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16515 * lang.c (lang_decode_option): Fixed returned value when parsing
16516 `-fxref=...' and `-Wall'.
16517 * parse.y (source_end_java_method): Do not generate code when
16518 flag_emit_xref is set.
16519 (resolve_expression_name): Do not build static field access when
16520 flag_emit_xref is set.
16521 (resolve_field_access): No special treatment on `length' when
16522 flag_emit_xref is set. Do not build qualified static field access
16523 when flag_emit_xref is set.
16524 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
16525 when flag_emit_xref is set.
16526 (patch_assignment): Do not generate array store runtime check when
16527 flag_emit_xref is set.
16528 * xref.c (xref_flag_value): Fixed function declaration
16530 (xset_set_data): New function.
16531 * xref.h (xref_set_data): Added prototype for new function.
16532 (typedef struct xref_flag_table): New field data.
16533 (XREF_GET_DATA): New macro.
16535 1999-04-19 Tom Tromey <tromey@cygnus.com>
16537 * xref.h (enum): Removed trailing comma.
16539 * parse.y (resolve_qualified_expression_name): Added missing
16542 1999-04-15 Anthony Green <green@cygnus.com>
16544 * gjavah.c: New prototypes for java_float_finite and
16545 java_double_finite.
16547 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16549 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
16552 1999-04-06 Jeffrey A Law (law@cygnus.com)
16554 * Makefile.in (TREE_H): Add tree-check.h.
16555 (RTL_H): Add genrtl.h.
16557 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
16559 * parse.y (patch_assignment): Added ArrayStoreException runtime
16562 1999-04-06 Per Bothner <bothner@cygnus.com>
16564 * expr.c (pop_type_0): New function.
16565 (pop_type): Use pop_type_0.
16566 * java-tree.h (pop_type_0): New declaration.
16567 * verify.c (verify_jvm_instructions): Check return instructions.
16569 * parse.y (patch_binop): Don't fold if non-constant and emiting
16572 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16574 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
16576 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
16577 (main_jcf): Don't define.
16578 (process_file): Don't set `main_jcf'.
16580 * java-tree.h (main_jcf): Don't declare.
16582 * jcf-parse.c (main_jcf): Add static definition.
16584 * lang.c (main_jcf): Don't define.
16586 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16588 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
16590 * decl.c (copy_lang_decl): Likewise for `bcopy'.
16592 * jcf-depend.c: Include "config.h", not <config.h>.
16594 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
16597 * jcf-path.c: Include "config.h", not <config.h>.
16599 * lex.c: Don't include various system header files.
16600 (java_init_lex): Cast the argument of `bzero' to PTR
16602 * parse-scan.y (java_push_parser_context): Likewise.
16604 * parse.y (java_push_parser_context): Likewise.
16605 (patch_bc_statement): Match format specifier to variable argument.
16607 * xref.c: Don't include <stdio.h>.
16609 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
16611 * parse.y (struct parser_ctxt *ctxp): Now global.
16612 (declare_local_variables): Use WFL compound value for the
16613 declaration source line value, when doing cross-referencing.
16615 1999-03-31 Tom Tromey <tromey@cygnus.com>
16617 * gjavah.c (print_field_info): Allow constants of other types.
16618 (print_include): Generate include when new name is proper prefix
16619 of already printed name.
16620 (add_namelet): Likewise.
16621 (cxx_keyword_subst): New function.
16622 (print_method_info): Use it.
16623 (print_field_name): New function.
16624 (get_field_name): New function.
16625 (print_field_info): Use get_field_name and print_field_name.
16627 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16629 * Makefile.in (keyword.h): Generate using gperf language 'C', not
16630 'KR-C', so gperf uses the `const' keyword on strings.
16632 * keyword.gperf (java_keyword): Const-ify a char*.
16634 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16636 * parse.y (patch_bc_statement): Fixed identation and a bogus
16639 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16641 * parse.y (patch_assignment): Allow static variables in other
16642 classes to be assigned.
16644 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16646 * class.c (maybe_add_interface): Remove unused variable
16648 (make_class_data): Use = for assignment, not ==. Likewise.
16649 (emit_register_classes): Remove unused variable `decl'.
16651 * lex.c: Fix comment so as not to contain an embedded `/*'.
16653 * verify.c (verify_jvm_instructions): Remove unused variable
16656 1999-03-27 Per Bothner <bothner@cygnus.com>
16658 * parse.y (complete_loop_body): Rename to finish_loop_body.
16659 (complete_labeled_statement): Rename to finish_labeled_statement.
16660 (complete_for_loop): Rename to finish_for_loop.
16661 (complete_method_declaration): Rename to finish_method_declaration.
16663 * java-tree.h (continue_identifier_node): New global node.
16664 * decl.c: Define and initialize continue_identifier_node.
16665 * parse.y (generate_labeled_block): Remove - no longer needed.
16666 (build_loop_body): Use continue_identifier_node for continue block.
16667 (finish_labeled_statement): Also do pop_labeled_block actions.
16668 (java_complete_lhs): POP_LOOP even if error.
16669 (build_labeled_block): Special handling for continue_identifier_node.
16670 (patch_loop_statement): Re-organize.
16671 (patch_bc_statement): Re-write.
16673 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16675 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
16676 using a WFL compound value.
16677 * parse.y (xref.h): Include.
16678 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
16679 WFL compound value.
16680 (register_fields): Set WFL compound value to lineno if doing
16682 (java_complete_expand_method): Call expand_xref if flag_emit_xref
16684 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
16685 * xref.h (expand_xref): Prototype renamed from xref_generate.
16687 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16689 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
16690 (GET_CURRENT_BLOCK): New macro.
16691 * parse.y (current_static_block): New global variable.
16692 (method_body:): Define action.
16693 (complete_method_declaration): Set current_function_decl to NULL
16694 when work on the current method is done.
16695 (declare_local_variables): Use GET_CURRENT_BLOCK.
16696 (java_method_add_stmt): Likewise.
16697 (java_complete_expand_method): Disable the use of `this' when
16698 expanding <clinit>.
16699 (enter_a_block): If no current method exist, use
16700 current_static_block to link static initializer blocks.
16701 (exit_block): Rewritten to use current_static_block when no current
16702 method decl exists.
16703 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
16704 (patch_return): Forbid the use of `return' in static initializers.
16705 (patch_throw_statement): Fixed indentation. Issue specific error
16706 for uncaught thrown checked exception in static initializer
16707 blocks. Removed FIXME.
16709 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
16711 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
16712 Link gcj from gcc.o.
16714 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16716 * parse.y (find_applicable_accessible_methods_list): When dealing
16717 with interface: ensure that a given interface or java.lang.Object
16718 are searched only once.
16720 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16722 * gjavah.c (print_c_decl): Remove unused argument `flags'.
16724 * jcf-dump.c (print_access_flags): Add braces around if-else.
16726 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
16729 * lex.c (build_wfl_node): Add static prototype.
16731 * lex.h (build_wfl_node): Remove static prototype.
16733 * parse.y: Include lex.c early enough to declare everything needed.
16734 Ensure calls to `build_wfl_node' pass the proper arguments.
16735 (create_class): Remove unused variable `super_decl'.
16736 (get_printable_method_name): Initialize variable `name'.
16738 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16740 * Changelog: Fixed 1999-03-22 typos.
16741 * lang.c (lang_decode_option): Fixed typo in error string in the
16744 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16746 * Makefile.in (JAVA_OBJS): Added entry xref.o.
16747 (xref.o): New rule.
16748 * java-tree.h (flag_emit_xref): Declared extern.
16749 * lang.c (xref.h): Included.
16750 (flag_emit_xref): New global variable.
16751 (lang_decode_option): Added support for -fxref.
16753 * xref.h: Likewise.
16755 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
16757 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
16760 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16762 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
16763 $(srcdir)/../system.h and $(JAVA_TREE_H).
16764 (jcf-io.o): Depend on $(JAVA_TREE_H).
16765 (mangle.o): Likewise.
16767 * check-init.c (check_cond_init): Add static prototype.
16769 * class.c (build_java_method_type, hashUtf8String,
16770 make_field_value, get_dispatch_vector, get_dispatch_table,
16771 append_gpp_mangled_type, mangle_static_field): Likewise.
16772 (strLengthUtf8): Hide unused definition.
16773 (hashUtf8String): Const-ify.
16774 (make_field_value): Un-ANSI-fy.
16776 * constants.c: Move inclusion of jcf.h above java-tree.h.
16777 (set_constant_entry, find_class_or_string_constant,
16778 find_name_and_type_constant, get_tag_node,
16779 build_constant_data_ref): Add static prototype.
16781 * decl.c (push_jvm_slot, builtin_function,
16782 lookup_name_current_level): Likewise.
16783 (builtin_function): Const-ify.
16785 * except.c (expand_start_java_handler, expand_end_java_handler):
16786 Add static prototype.
16788 * expr.c (flush_quick_stack, push_value, pop_value,
16789 java_stack_swap, java_stack_dup, build_java_athrow,
16790 build_java_jsr, build_java_ret, expand_java_multianewarray,
16791 expand_java_arraystore, expand_java_arrayload,
16792 expand_java_array_length, build_java_monitor, expand_java_pushc,
16793 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
16794 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
16795 expand_compare, expand_test, expand_cond, expand_java_goto,
16796 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
16797 expand_java_field_op, java_push_constant_from_pool): Likewise.
16799 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
16800 (build_java_arraynull_check): Mark parameters `node' and `type'
16801 with ATTRIBUTE_UNUSED.
16802 (note_label): Likewise for parameter `current_pc'.
16803 (expand_java_call, expand_java_ret): Hide unused definition.
16805 * java-tree.h (make_class, build_constants_constructor,
16806 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
16807 init_outgoing_cpool, register_class, emit_register_classes,
16808 java_layout_seen_class_methods): Prototype.
16809 (unicode_mangling_length): Const-ify.
16810 (append_gpp_mangled_name, append_gpp_mangled_classtype,
16811 emit_unicode_mangled_name, format_int, format_uint,
16812 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
16813 jcf_print_utf8_replace, open_class): Prototype.
16815 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
16816 <stdio.h>. Include tree.h/java-tree.h.
16817 (utf8_equal_string usage, process_class): Add static prototype.
16818 (open_class): Don't prototype this here.
16819 (utf8_equal_string): Match arguments to format specifiers.
16820 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
16821 TABLE_SWITCH, disassemble_method): Likewise.
16823 * jcf-io.c: Include tree.h/java-tree.h.
16824 (open_class, find_classfile, jcf_print_utf8,
16825 jcf_print_utf8_replace): Const-ify.
16827 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
16828 parse_class_file): Add static prototype.
16829 (find_in_current_zip): Match definition to existing static
16832 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
16833 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
16834 finish_jcf_block, define_jcf_label, get_jcf_label_here,
16835 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
16836 write_chunks, adjust_typed_op, generate_bytecode_conditional,
16837 generate_bytecode_return, perform_relocations, init_jcf_state,
16838 init_jcf_method, release_jcf_state, generate_classfile):
16839 Add static prototype.
16840 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
16841 (make_class_file_name): Const-ify.
16843 * jcf.h (find_classfile): Const-ify.
16845 * jv-scan.c (reset_report): Remove prototype.
16847 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
16848 (error): Rewrite to allow varargs.
16850 * lang.c (lang_f_options): Const-ify.
16852 * lex.c (java_parse_escape_sequence): Add static prototype.
16853 (java_allocate_new_line): Match definition to existing static
16856 * mangle.c Include tree.h/java-tree.h.
16857 (unicode_mangling_length, emit_unicode_mangled_name,
16858 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
16860 * parse.h (jdep_code): Remove trailing comma in enumeration.
16861 (java_get_line_col): Move prototype outside of !JC1_LITE test.
16862 (reset_report): Add prototype.
16864 * verify.c (push_pending_label, merge_types): Add static
16867 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
16869 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16871 * parse.y (find_applicable_accessible_methods_list): Extend the
16872 search to superinterfaces when relevant.
16873 (search_applicable_methods_list): New function.
16875 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16877 * class.c (unmangle_classname): Implemented stricter testing
16878 before setting the QUALIFIED_P flag on an identifier.
16880 1999-03-16 Per Bothner <bothner@cygnus.com>
16882 * parse.y (java_complete_lhs): Call force_evaluation_order
16883 after patch_newarray.
16884 (patch_binop): Don't call fold if there are side effects.
16886 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16888 * parse.y (java_stabilize_reference): Use save_expr instead of
16889 building a SAVE_EXPR node.
16890 (java_complete_lhs): Patch the resulting string of the `+='
16891 operator (if necessary) and complete the RHS after having built
16894 1999-03-15 Per Bothner <bothner@cygnus.com>
16896 * class.c (make_class): Don't set CLASS_P here (because
16897 this function is also called by build_java_array_type).
16898 (push_class): Set CLASS_P here instead.
16899 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
16901 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
16902 context. If the context is class, perfer "super" over "synchronized".
16903 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
16905 * parse.y (create_class): Don't call parser_check_super here;
16906 it is not robust. Always wait until later.
16908 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
16909 match what JDK 1.2 does), but don't set ACC_PUBLIC.
16911 1999-03-13 Per Bothner <bothner@cygnus.com>
16913 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
16914 * lex.h (UNGETC): Change misleading macro.
16916 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16918 * parse.y (java_stabilize_reference): Return NODE when patching a
16920 (java_complete_lhs): Put parenthesis around truth values.
16922 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16924 * class.c (layout_class_method): Don't make rtl for interface
16926 * parse.h (GET_TYPE_NAME): New macro.
16927 * parse.y (if_then_statement:): Fixed indentation.
16928 (if_then_else_statement:): Likewise.
16929 (for_statement:): Fixed spacing.
16930 (try_statement:): Fixed indentation.
16931 (create_interface): Don't force interfaces to be abstract.
16932 (method_header): Abstract methods are OK in interfaces.
16933 (declare_local_variables): Fixed typo in comment.
16934 (java_complete_expand_method): Fixed indentation.
16935 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
16936 non accessible fields.
16937 (java_stabilize_reference): New function.
16938 (java_complete_lhs): Fixed indentation. Use
16939 java_stabilize_reference in compound assignment. Insert the
16940 cast. If not processing `+' fix string constants before processing
16943 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16945 * constants.c (find_class_or_string_constant): Cast variable `j'
16946 to a `jword' when comparing against one.
16948 * expr.c (java_lang_expand_expr): Remove unused variables
16949 `has_finally_p' and `op0'.
16951 * gjavah.c (print_field_info): Cast a value to jint when comparing
16952 against one. Likewise for a jlong.
16953 (add_namelet): Likewise cast a `sizeof' to an int when comparing
16954 against a signed quantity.
16956 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
16957 (print_signature): Don't needlessly dereference variable `str'
16959 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
16960 `max_locals' with ATTRIBUTE_UNUSED.
16961 (jcf_parse_class): Likewise for variable `index'.
16963 * parse.h (reverse_jdep_list): Remove static prototype.
16965 * parse.y (build_jump_to_finally): Remove prototype and definition.
16966 (reverse_jdep_list): Add static prototype.
16968 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
16969 `assignment' and `expr_decl'.
16971 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
16973 1999-03-12 Andrew Haley <aph@cygnus.com>
16975 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
16976 we'll need a directory separator and a null character.
16978 1999-03-10 Per Bothner <bothner@cygnus.com>
16980 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
16982 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
16984 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
16987 1999-03-05 Per Bothner <bothner@cygnus.com>
16989 * lex.c (java_parse_end_comment): Take extra parameter (next char).
16991 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
16993 * class.c (layout_class_method): A static method in a base class
16994 is never overridden, so treat it like it doesn't exist.
16995 However, do complain about private non-static method overriding
16996 public static method.
16998 * parse.y: Don't set unused INITIALIZED_P flag.
16999 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
17001 * parse.y (find_expr_with_wfl): Optimize tail-calls.
17002 (build_array_from_name): Re-order &index[string] to &string[index].
17004 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
17005 error_mark (it might catch more errors, but it is more likely to lose).
17007 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17009 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17010 (parse-scan.o): Depend on toplev.h.
17012 * class.c (make_method_value): Add prototype. Make it static.
17013 Remove unused second argument, caller changed.
17015 * expr.c (java_lang_expand_expr): Remove unused variable
17018 * java-tree.h: Don't prototype find_in_current_zip.
17019 Add prototypes for verify_constant_pool, start_java_method,
17020 end_java_method, give_name_to_locals, expand_byte_code,
17021 open_in_zip, set_constant_value, find_constant1, find_constant2,
17022 find_utf8_constant, find_string_constant, find_class_constant,
17023 find_fieldref_index, find_methodref_index, write_constant_pool,
17024 count_constant_pool_bytes and encode_newarray_type.
17026 * jcf-dump.c: Remove unused variable `LONG_temp'.
17028 * jcf-parse.c: Include parse.h.
17029 (jcf_parse_source): Remove unused parameter, all callers changed.
17030 (jcf_figure_file_type): Add static prototype.
17031 (find_in_current_zip): Likewise. Also remove unused parameter,
17032 all callers changed.
17033 (read_class): Initialize variable `saved_pos'.
17035 * jcf-reader.c (jcf_parse_preamble): Mark variables
17036 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17038 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17039 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17040 (java_parse_doc_section): Initialize variable `seen_star'.
17041 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17042 (java_lex_error): Mark parameters `msg' and `forward' with
17044 (java_get_line_col): Mark parameters `filename' and `line' with
17047 * parse-scan.y: Include toplev.h.
17048 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17050 * parse.h: use `struct JCF', not plain `JCF'.
17051 (java_parser_context_save_global, java_expand_classes
17052 java_parser_context_restore_global, java_parse): Add prototypes.
17054 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17057 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
17059 * check-init.c (check_init): COPYN takes word count, not bit count.
17061 1999-02-26 Per Bothner <bothner@cygnus.com>
17063 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
17064 explicit build_decl. (Avoids crash in reload when optimizing.)
17066 1999-02-25 Per Bothner <bothner@cygnus.com>
17068 * decl.c (complete_start_java_method): Handle synchronized method
17069 even when compiling from bytecode.
17071 1999-02-26 Tom Tromey <tromey@cygnus.com>
17073 * gjavah.c (add_class_decl): Only generate `#include' if outer
17074 class is not the name of the class we are processing. Correctly
17075 append `.h' in #include.
17076 (process_file): Clean up newlines around generated `#include's.
17077 (decode_signature_piece): Correctly handle inner classes.
17078 (struct include): New structure.
17079 (all_includes): New global.
17080 (print_include): New function.
17081 (add_class_decl): Use it.
17082 (process_file): Likewise.
17083 (add_class_decl): Generate include for java-array.h if array
17085 (process_file): Don't generate java-array.h include.
17087 * gjavah.c (add_namelet): Check for standard package names here.
17088 (add_class_decl): Don't check for standard package names here.
17090 1999-02-25 Tom Tromey <tromey@cygnus.com>
17092 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17093 When reading a zip file, only use strncmp if both strings are
17094 bigger than the buffer length. Initialize `k' when looping
17097 1999-02-24 Tom Tromey <tromey@cygnus.com>
17099 * gjavah.c (struct namelet): New structure.
17100 (add_namelet): New function.
17101 (print_namelet): New function.
17102 (print_class_decls): Use add_namelet and print_namelet to generate
17103 namespaces and not classes.
17104 (method_printed): New global.
17105 (HANDLE_END_METHOD): Examine method_printed.
17106 (print_method_info): Set method_printed when required. Print
17107 error if function to be ignored is marked virtual. Handle $finit$
17109 (METHOD_IS_FINAL): New macro.
17110 (print_field_info): Use it.
17111 (HANDLE_METHOD): Clear method_printed.
17112 (method_pass): New global.
17113 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17114 (process_file): Do two passes over both fields and methods.
17115 (HANDLE_METHOD): Examine method_pass.
17116 (root): New global.
17117 (add_class_decl): New function.
17118 (print_class_decls): Don't scan over entire constant pool.
17120 1999-02-23 Tom Tromey <tromey@cygnus.com>
17122 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17123 disable linking in that case.
17125 1999-02-20 Tom Tromey <tromey@cygnus.com>
17127 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17130 1999-02-21 Per Bothner <bothner@cygnus.com>
17132 * decl.c (build_result_decl), java-tree.h: New method.
17133 (complete_start_java_method): Handle synchronized methods.
17134 Don't build DECL_RESULT here. (Ordering dependency problem.)
17135 (start_java_method): Call build_result_decl here instead ...
17136 * parse.y (java_complete_expand_method): ... and here.
17137 (expand_start_java_method): Don't call complete_start_java_method here.
17138 (java_complete_expand_method): Call it here instead.
17139 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
17140 * java-tree.h: ... here.
17142 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
17143 * parse.y (java_complete_lhs): Don't call force_evaluation_order
17144 for ARRAY_REF - it doesn't work when array bounds are checked.
17145 (patch_array_ref): Handle it here instead.
17147 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
17149 1999-02-19 Per Bothner <bothner@cygnus.com>
17151 Force left-to-right evaluation of binary operations etc.
17152 * expr.c (force_evaluation_order), java-tree.h: New function.
17153 * parse.y (java_complete_lhs): Pass binary operations, procedure
17154 calls, and ARRAY_REFs to force_evaluation_order.
17155 (various): Set TREE_SIDE_EFFECTS more carefully.
17157 Tolerate random (non-UTF8) encoding in comments without complaining.
17158 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
17159 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
17161 * parse.y (resolve_qualified_expression_name): Handle error_mark.
17162 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
17164 * parse.y (java_complete_lhs): Ignore an empty statement in a
17165 COMPOUND_EXPR. Don't complain about empty statement after return.
17167 1999-02-19 Per Bothner <bothner@cygnus.com>
17169 * parse.y (obtain_incomplete_type): Don't wrap unknown types
17170 in TREE_LIST - just chain the POINTER_TYPEs together.
17171 (resolve_class): If type already resolved, return decl.
17172 After resolving, update TREE_TYPE(class_type), and name (if array).
17173 * parse.h (do_resolve_class), parse.y: Make non-static.
17174 * class.c (maybe_layout_super_class): Take this_class argument.
17175 Do do_resolve_class if necessary.
17176 (layout_class, layout_class_methods): Adjust calls appropriately.
17177 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17178 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
17179 * typeck.c (build_java_array_type): Don't call layout_class.
17181 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17183 * parse.y (check_pkg_class_access): Allow private class access
17184 within the same package.
17185 (strip_out_static_field_access_decl): New function.
17186 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17187 operator argument before testing its nature.
17189 1999-02-03 Per Bothner <bothner@cygnus.com>
17191 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
17192 (TRY_EXPR): Simplify - it no longer has a finally clause.
17193 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
17194 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17195 * expr.c (java_lang_expand_expr): Likewise.
17196 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
17197 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
17198 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
17199 (build_try_statement): Remove finally parameter and handling.
17200 (build_try_finally_statement): New function.
17201 (patch_try_statement): No longer need to support finally clause.
17202 (try_statement): Update grammar action rules.
17203 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
17204 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17206 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
17208 * jcf-parse.c (get_constant): Add braces around computation of 'd'
17209 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
17211 1999-02-17 Andrew Haley <aph@cygnus.com>
17213 * class.c (build_utf8_ref): Back out broken patch which was
17214 intended to to output signatures using '.' as a separator.
17216 * class.c (make_class_data): Output signatures using '.' as a
17217 separator, rather than '/'.
17218 (mangled_classname): Likewise.
17219 (make_field_value): Likewise.
17220 (make_method_value): Likewise.
17221 * constants.c (alloc_class_constant): Likewise.
17222 * expr.c (build_invokeinterface): Likewise.
17224 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17226 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17227 of an ancient workaround.
17229 1999-02-10 Jeffrey A Law (law@cygnus.com)
17231 * jvspec.c (xmalloc): Kill the prototype. It does not belong
17234 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17236 * lex.c (yylex): Encode \0 as UTF8.
17238 1999-02-10 Tom Tromey <tromey@cygnus.com>
17240 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17241 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17242 (libgcj_zip): Renamed.
17243 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17245 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17247 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17248 (GC_NAME): Renamed -lgc to -lgcjgc.
17250 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17252 * lex.c (java_lang_cloneable): Initialize.
17253 * parse.y (java_lang_cloneable): New static variable.
17254 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17255 doing one more qualification round.
17256 (valid_ref_assignconv_cast_p): Reject null source or
17257 destination. Allow an array to be cast into java.lang.Cloneable.
17258 (patch_cast): Swapped two first arguments to first call to
17259 valid_ref_assignconv_cast_p.
17261 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
17263 * parse.h: DECL_P renamed JDECL_P.
17264 * parse.y: DECL_P replaced by JDECL_P.
17265 (build_array_from_name): Always use pointer's type.
17266 (patch_bc_statement): Extra code to search continue target in a
17267 for loop. Fixed comments. Continue target is current loop when
17270 1999-02-05 Andrew Haley <aph@cygnus.com>
17272 * class.c (make_class_data): The superclass of an interface should
17273 be null, not class Object.
17275 * lex.c (java_lex): Sign extend hex literals.
17277 1999-02-04 Andrew Haley <aph@cygnus.com>
17279 * class.c (build_utf8_ref): Output signatures using '.' as a
17280 separator, rather than '/'.
17281 (make_class_data): Likewise.
17283 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
17285 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17286 mkstemp.o. Get them from libiberty now.
17288 1999-02-02 Jeffrey A Law (law@cygnus.com)
17290 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17292 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17294 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17297 1999-02-02 Per Bothner <bothner@cygnus.com>
17299 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17300 * jcf-write.c (generate_bytecode_return): New function.
17301 (generate_bytecode_insns): Use it, for RETURN_EXPR.
17303 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
17304 generate special [fd]const_[01] instructions.
17306 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
17308 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
17309 handling OPCODE_lookupswitch or OPCODE_tableswitch.
17311 1999-02-01 Per Bothner <bothner@cygnus.com>
17313 * parse.y (patch_method_invocation): Handle calling static methods,
17314 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17316 * parse.y (java_complete_lhs): Don't complain about unreachable
17317 exit condition in a do-while statement.
17319 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
17321 * lex.c (java_read_char): Fixed utf8 decoding.
17322 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17324 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17325 comments. Local variable `all_primitive' is gone. Broadened
17326 acceptance of `0' to floating point targets. `long' can now be
17327 widened to `double' or `float'.
17328 (valid_method_invocation_conversion_p): Added leading
17329 comment. Fixed tabulation.
17330 (build_string_concatenation): Optimize out left or right empty
17333 1999-01-28 Per Bothner <bothner@cygnus.com>
17335 * jcf-write.c (localvar_alloc): Only emit entry for
17336 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17337 (generate_bytecode_insns): Only call put_linenumber if
17338 debug_info_level > DINFO_LEVEL_NONE.
17339 * jvspec.c (lang_specific_driver): If no -O* or -g* option
17340 is specified, add -g1 (for compatibility wih javac).
17342 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
17344 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17345 gjavah.o, check-init.o, jv-scan.o
17347 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17349 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17351 * gjavah.c: Include config.h and system.h.
17353 * javaop.h (inline): Don't define, its handled by system.h.
17354 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17355 from `inline' to `static inline'.
17357 * jcf.h (inline): Don't define, its handled by system.h.
17359 * lex.c (inline): Likewise.
17361 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
17363 * lang-specs.h: Map -Qn to -fno-ident.
17365 1999-01-29 Richard Henderson <rth@cygnus.com>
17367 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17369 1999-01-29 Tom Tromey <tromey@cygnus.com>
17371 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17372 then cast it to Object before calling `append' method.
17374 1999-01-28 Per Bothner <bothner@cygnus.com>
17376 * check-init.c (check_bool2_init, check_bool_init, check_init):
17377 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17378 * jcf-write.c (generate_bytecode_insns): Likewise.
17380 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
17382 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17383 * parse.y (patch_cast): Allow a boolean to be cast into a
17386 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17388 * parse.y: (class_declaration:): Fixed indentation.
17389 (class_member_declaration:): Extra `;' after field declaration now
17391 (interface_declaration:): Removed debug messages in error reports.
17392 (patch_binop): Nodes created and returned inherit the orignal
17393 node's COMPOUND_ASSIGN_P flag value.
17394 (patch_cast): Fix cast from char to floating point.
17396 1999-01-25 Andrew Haley <aph@cygnus.com>
17398 * except.c, java-except.h (expand_resume_after_catch): new
17400 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17401 to branch back to main flow of control after a catch block.
17403 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17405 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17406 $(srcdir)/../system.h.
17407 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17408 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17409 (jcf-write.o): Likewise.
17410 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17411 (mangle.o): Depend on $(srcdir)/../toplev.h.
17412 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17413 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17415 * class.c: Include output.h and parse.h.
17416 (mangled_classname): Add the `const' keyword to a char*.
17417 (find_named_method): Hide unused function definition.
17418 (build_utf8_ref): Change type of variable `c' to unsigned char.
17419 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17420 (build_class_ref): Add the `const' keyword to a char*.
17421 (layout_class_method): Remove unused variable `buf'.
17423 * decl.c (find_local_variable): Remove unused variable `rtl'.
17424 (pushdecl): Likewise for variables `different_binding_level' and
17426 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17427 (maybe_build_cleanup): Likewise for parameter `decl'.
17429 * except.c (expand_start_java_handler): Mark parameter `range'
17430 with ATTRIBUTE_UNUSED.
17432 * expr.c: Include except.h.
17433 (pop_type): Remove unused variable `i'.
17434 (pop_value): Likewise for variables `n_words' and `i'.
17435 (expand_java_arrayload): Likewise for variable `convert'.
17436 (java_lang_expand_expr): Likewise for variables `op0', `type',
17437 `mode', `unsignedp', `node' and `elements'.
17438 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17440 (process_jvm_instruction): Add a `const' qualifier to a char*.
17442 * gjavah.c (output_directory): Add the `const' keyword to a char*.
17443 (temp_directory): Likewise.
17444 (print_c_decl): Likewise.
17445 (print_method_info): Likewise.
17446 (decode_signature_piece): Likewise.
17447 (print_mangled_classname): Likewise.
17449 * java-except.h: Provide prototypes for maybe_start_try,
17450 maybe_end_try and add_handler.
17452 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17453 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
17454 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17455 init_expr_processing, push_super_field, init_class_processing,
17456 can_widen_reference_to, class_depth, verify_jvm_instructions,
17457 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17458 set_local_type, merge_type_state, push_type, load_type_state,
17459 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17460 emit_unicode_mangled_name): Add prototypes.
17462 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17463 (print_signature_type): Use ISDIGIT, not isdigit.
17464 (print_signature): Remove unused variable `j'.
17466 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17467 int when comparing against one.
17469 * jcf-parse.c: Include toplev.h.
17471 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
17472 (localvar_free): Remove unused variable `i'.
17473 (generate_bytecode_conditional): Likewise for variable `kind'.
17475 * jv-scan.c: Include config.h and system.h. Remove redundant
17476 OS header and gansidecl.h includes.
17477 (warning): Add the `const' keyword to a char*. Also add
17478 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
17479 __STDC__, when determining whether to use ANSI-isms.
17480 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
17481 (xmalloc): Don't redundantly prototype here.
17482 (main): Remove unused parameter `envp'. Also fix the arguments
17483 passed to function `fatal' to match the format specifier.
17485 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17487 * mangle.c: Include toplev.h.
17488 (emit_unicode_mangled_name): Declare parameter `len'.
17490 * parse.y (parse_warning_context): Add the `const' keyword to a
17491 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
17492 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
17493 (issue_warning_error_from_context): Add the `const' keyword to
17495 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
17496 not `__STDC__' for whether to use ANSI-isms.
17498 * typeck.c (incomplete_type_error): Mark parameters `value' and
17499 `type' with ATTRIBUTE_UNUSED.
17500 (parse_signature_type): Use ISDIGIT, not isdigit.
17502 * verify.c (check_pending_block): Add the `const' keyword to a char*.
17503 (verify_jvm_instructions): Likewise. Remove unused variables
17504 `field_name' and `default_val'.
17506 * zextract.c: Include config.h and system.h. Remove redundant
17507 OS header includes.
17509 * zipfile.h: Prototype `read_zip_archive'.
17511 1999-01-21 Andrew Haley <aph@cygnus.com>
17513 * typeck.c (convert): Allow conversions to void type: some
17514 optimizations in gcc do this.
17516 1999-01-21 Andrew Haley <aph@cygnus.com>
17518 * typeck.c (convert_ieee_real_to_integer): New function.
17519 (convert): When not using fast-math and using hardware fp, convert
17520 an IEEE NaN to zero.
17522 1999-01-18 Andrew Haley <aph@cygnus.com>
17524 * parse.y (patch_binop): Do a type conversion from signed to
17525 unsigned and then back to signed when a ">>>" is found.
17527 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17529 * java-tree.h: (check_for_initialization): Added prototype.
17530 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17531 * parse.y (do_resolve_class): Removed unused locals.
17532 (read_import_dir): Likewise.
17533 (resolve_qualified_expression_name): Array creation
17534 expressions are valid primary expressions.
17535 (qualify_ambiguous_name): Likewise.
17536 (patch_synchronized_statement): Removed unused local.
17538 1999-01-17 Jeffrey A Law (law@cygnus.com)
17540 * Makefile.in (zextract.o): Add dependencies.
17542 * Makefile.in: Do not put ^Ls at the start of a line.
17544 1999-01-15 Per Bothner <bothner@cygnus.com>
17546 * expr.c (process_jvm_instruction): Coerce to correct Throwable
17547 sub-type the result of the call that gets the exception value.
17549 * parse.y (java_complete_expand_methods): If flags_syntax_only,
17550 don't call finish_class.
17552 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
17553 clear found before continuing.
17555 * verify.c (verify_jvm_instructions): On an array load, allow
17556 and handle top of stack to be TYPE_NULL.
17558 * gjavah.c (generate_access): Translate Java package private or
17559 protected access to C++ public, but with a comment.
17561 1999-01-13 Andrew Haley <aph@cygnus.com>
17563 * expr.c (generate_name): Name prefix changed to avoid clashes
17564 with assembler temp labels.
17566 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
17567 MODIFY_EXPR. Without this, code for the assignment may not be
17568 generated at all and the synchronized statement will read an
17569 uninitialized variable.
17571 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
17573 * class.c (maybe_layout_super_class): Fixed returned value.
17574 * lex.c: Added 1999 to the copyright.
17575 (java_init_lex): Initialize java_lang_imported.
17576 * lex.h: Added 1999 to the copyright.
17577 * parse.h: Added 1999 to the copyright.
17578 (REGISTER_IMPORT): Fixed typo in trailing macro.
17579 (CURRENT_OSB): New macro.
17580 (struct parser_ctxt): New fields osb_depth, osb_limit.
17581 * parse.y (java_lang_id): New global variable.
17582 (type_import_on_demand_declaration): Don't import java.lang.* twice.
17583 (array_creation_expression:): Use CURRENT_OSB.
17584 (dims:): Uses a stack to keep track of array dimensions.
17585 (cast_expression:): Use CURRENT_OSB.
17586 (find_expr_with_wfl): Return NULL if node found doesn't meet the
17588 (register_fields): Fixed typos in comment.
17589 (check_method_redefinition): Fixed comment indentation.
17590 (java_check_regular_methods): Set saved found wfl to NULL after
17591 having reinstalled it in the previously found DECL_NAME.
17593 1999-01-10 Richard Henderson <rth@cygnus.com>
17595 * gjavah.c (java_float_finite): Use a union to do type punning.
17596 (java_double_finite): Likewise.
17598 1999-01-09 Per Bothner <bothner@cygnus.com>
17600 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
17601 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
17602 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
17603 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
17604 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
17605 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
17607 1999-01-08 Per Bothner <bothner@cygnus.com>
17609 * check-init.c (check_init): If compiling to native, we don't
17610 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
17612 1999-01-08 Tom Tromey <tromey@cygnus.com>
17614 * parse-scan.y (variable_declarator_id): Set or increment
17616 (bracket_count): New global.
17617 (formal_parameter): Handle case where bracket pairs trail variable
17620 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
17622 * jcf-parse.c (yyparse): variable len changed from a char to an
17623 int to prevent overflow.
17625 1999-01-06 Per Bothner <bothner@cygnus.com>
17627 * java-tree.h: Declare read_class.
17628 * jcf-parse.c (read_class): New function.
17629 (load_class): Now just call read_class.
17631 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
17632 * jcf-parse.c (parse_source_file): Declare save_error_count,
17633 which is needed by java_parse_abort_on_error macro,
17634 * parse.y (java_layout_classes, java_expand_classes): Likewise.
17636 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
17637 constructor, if initializing a static field.
17638 (patch_new_array_init): Set TREE_CONSTANT if it is.
17639 * expr.c (java_lang_expand_expr): For a static array constructor
17640 of primitive elements, allocate the array itself statically.
17641 Disabled until we can set the vtable field statically.
17643 * check-init.c: New file. Checks for definite assignment.
17644 * Makefile.in (JAVA_OBJS): Add check-init.o.
17645 * parse.y (java_complete_expand_method): Call check_for_initialization.
17646 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
17648 1999-01-06 Graham <grahams@rcp.co.uk>
17650 * parse.y : include system.h instead of including
17651 standard headers directly with the exception of <dirent.h>.
17653 1999-01-06 Per Bothner <bothner@cygnus.com>
17655 * lex.h: Moved static function declarations to lex.c,
17656 to shut up some -Wall warnings.
17657 * lex.c: Static function declarations moved here.
17658 * jcf-dump.c: Small fixes to shut up -Wall warnings.
17660 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17662 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
17664 1998-12-22 Per Bothner <bothner@cygnus.com>
17666 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
17667 * verify.c (verify_jvm_instructions): Fix off-by-one error.
17669 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
17670 (localvar_alloc): Change return type to void,
17671 (emit_unop): Remove unused variable size.
17673 * jcf-write.c (struct jcf_block): Add new union.
17674 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
17675 (call_cleanups): New functions.
17676 (struct jcf_partial): New fields num_finalizers and return_value_decl.
17677 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
17678 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
17679 * lang.c (lang_init): Call using_eh_for_cleanups.
17680 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
17681 completing operands to patch_synchronized_statement.
17682 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
17683 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
17684 WITH_CLEANUP_EXPR instead of TRY_EXPR.
17686 1998-12-20 John F. Carr <jfc@mit.edu>
17688 * Make-lang.in: Comment out control-Ls; they upset some makes.
17690 1998-12-18 Tom Tromey <tromey@cygnus.com>
17692 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
17695 1998-12-17 Tom Tromey <tromey@cygnus.com>
17697 * parse.y (DIR_SEPARATOR): New define.
17698 (check_class_interface_creation): Use it.
17700 * parse-scan.y (report_main_declaration): Recognize
17701 `java.lang.String' in argument to main.
17703 1998-12-16 Per Bothner <bothner@cygnus.com>
17705 * parse.y (create_interface): Remove bogus test.
17707 1998-12-16 Per Bothner <bothner@cygnus.com>
17709 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
17710 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
17712 1998-12-16 Tom Tromey <tromey@cygnus.com>
17714 * parse-scan.y (qualified_name): Use correct sprintf format.
17716 1998-12-15 Tom Tromey <tromey@cygnus.com>
17718 * gjavah.c (print_field_info): Changed how most negative number is
17721 1998-12-14 Per Bothner <bothner@cygnus.com>
17723 * parse.y (fold_constant_for_init): New function.
17724 (resolve_expression_name): Don't replace static final
17725 constant-initialized fields by its value.
17726 (java_complete_lhs): New. Same as java_complete_tree, except does
17727 not replace static final constant-initialized fields by their values.
17728 (register_fields): If there is an initializer, set DECL_INITIAL and
17729 MODIFY_EXPR_FROM_INITIALIZATION_P.
17730 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
17731 Only call patch_initialized_static_field if
17732 MODIFY_EXPR_FROM_INITIALIZATION_P.
17733 (patch_initialized_static_field): If not valid constant, clear
17736 * parse.y (lookup_field_wrapper): Fix thinko.
17738 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
17739 set and restore global lineno.
17741 1998-12-14 Tom Tromey <tromey@cygnus.com>
17743 * gjavah.c (print_field_info): If value to print is the smallest
17744 value of its size, then print as hex to avoid later warnings from
17747 1998-12-14 Tom Tromey <tromey@cygnus.com>
17749 * gjavah.c (decompile_method): Decompile `return null'.
17750 (process_file): Generate `#pragma interface'.
17751 (method_declared): New global.
17752 (print_method_info): Set it.
17753 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
17754 (print_method_info): Handle abstract methods.
17756 1998-12-13 Per Bothner <bothner@cygnus.com>
17758 * parse.y (patch_method_invocation): If class_decl is null
17759 (e.g. an array type), use original type.
17761 * parse.y (check_thrown_exceptions): Temporary hack to suppress
17762 errors about uncaught exception from clone (of array, specifically).
17764 1998-12-13 Tom Tromey <tromey@cygnus.com>
17766 * gjavah.c (decompile_method): Handle all types of `return'
17767 opcode. Decompile `return this' and `return'.
17768 (method_access): New global.
17769 (print_method_info): Set it.
17770 (decompile_method): Don't decompile a synchronized method.
17772 1998-12-13 Tom Tromey <tromey@cygnus.com>
17774 * jcf-reader.c (jcf_parse_one_method): Recognize
17776 * gjavah.c (HANDLE_END_METHOD): New macro.
17777 (HANDLE_CODE_ATTRIBUTE): New macro.
17778 (decompile_method): New function.
17779 (print_method_info): Don't print `;\n' at end of function decl.
17780 Include java-opcodes.h.
17781 (decompiled): New global.
17783 1998-12-12 Per Bothner <bothner@cygnus.com>
17785 * class.c (build_class_ref): Handle PRIMTYPE.class if
17786 flag_emit_class_files.
17787 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
17788 if flag_emit_class_files.
17789 * parse.y (java_complete_tree): Pre-liminary support for
17790 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
17792 * parse.y (patch_synchronized_statement): Don't call monitorexit
17793 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
17795 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
17797 * zipfile.h (opendir_in_zip): New declaration.
17798 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
17799 (opendir_in_zip): New function, using code from open_in_zip.
17800 (open_in_zip): Call opendir_in_zip.
17801 (find_class): Remove no-longer-used do_class_file parameter,
17802 but add source_ok parameter. Change logic so if we find a .java file,
17803 we don't look for .class in later classpath emtries.
17804 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
17805 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
17806 * gjavah.c: Update call to find_class.
17807 * jcf-dump.c: Likewise.
17809 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
17810 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
17811 nothing if body is empty_stmt_node.
17812 Various little fixes so SP gets correctly adjusted.
17813 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
17814 For CALL_EXPR, test if static first.
17815 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
17816 such as the ones we create for Object and Class.
17817 Set and restore current_function_decl.
17818 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
17819 (note_possible_classname): New function.
17820 (read_import_entry): Removed. Merged with read_import_dir.
17821 (read_import_dir): Don't call find_class - that only gives us
17822 the first classpath entry having the needed package.
17823 Use the struct buffer data structure from buffer.h.
17824 (read_import_dir, find_in_imports_on_demand): The remembered
17825 class names now use '.' (not '/') as package separator.
17827 * parse.y (java_complete_expand_methods): Call write_classfile
17828 here, and not in java_expand_classes (which only gets first class).
17830 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17832 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
17833 (register_fields): If a static fields has an initializer, just
17834 chain it on ctxp->static_initialized, and handle later.
17835 (java_complete_expand_methods): Force <clinit> first.
17836 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
17837 - it's already been completed.
17838 (patch_initialized_static_field): New function.
17839 (java_complete_field): Call it.
17841 1998-12-12 Per Bothner <bothner@cygnus.com>
17843 * expr.c (encode_newarray_type, build_new_array): New functions.
17844 * java-tree.h: Declare build_new_array.
17845 * jcf-write.c (patch_newarray): Use build_new_array.
17847 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
17848 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
17850 * parse.y (patch_new_array_init): Re-organize.
17851 Now is passed the actual array (pointer) type of the value.
17852 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
17853 (patch_array_constructor): Removed - merged into patch_new_array_init.
17854 (java_complete_tree): Update patch_new_array_init.
17856 * jcf-write.c (find_constant_index): New function.
17857 (generate_bytecode_insns): Use find_constant_index.
17858 (generate_classfile): Use find_constant_index for ConstantValue.
17860 1998-12-11 Tom Tromey <tromey@cygnus.com>
17862 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
17863 * decl.c (init_decl_processing): Renamed dtable -> vtable.
17864 * class.c (make_class_data): Renamed dtable -> vtable, and
17865 dtable_method_count -> vtable_method_count.
17867 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17869 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
17870 global variables, initialized.
17871 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
17872 Declared new global variables.
17873 * lex.c (java_lex): Return long_zero_node, float_zero_node,
17874 double_zero_node, integer_zero_node upon direct matching.
17875 * parse.y (purify_type_name): Added function prototype.
17876 (duplicate_declaration_error_p): Consider new_type as potentially
17877 being a incomplete type. Use purify_type_name on type string.
17878 (method_header): saved_type: unused variable removed. Don't figure
17879 return type if method name is invalid.
17880 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
17881 processed by patch_unaryop.
17882 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
17883 increment/decrement node into its original type after binary
17884 numeric promotion on its operands.
17886 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17888 * parse.y (array_initializer:): Array init operand is NULL_TREE
17889 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
17890 now an error. Fixed indentation problems.
17891 (patch_string): Handle error_mark_node as an argument.
17892 (patch_new_array_init): Fixed indentation problems.
17893 (array_constructor_check_entry): Removed check on null wfl_value.
17894 Return an error if wfl_value's walk returns an error.
17896 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17898 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
17899 * lex.c (java_lex): Remember column position before advancing one
17900 token. Retain location information on OCB_TK.
17901 * lex.h (typedef struct java_lc): Added new field.
17902 * parse.h (GET_SKIP_TYPE): New macro.
17903 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
17904 * parse.y (build_new_array_init, patch_new_array_init,
17905 patch_array_constructor, maybe_build_array_element_wfl,
17906 array_constructor_check_entry): New function prototypes.
17907 (switch_block:): Tagged <node>.
17908 (OCB_TK): Tagged <operator>.
17909 (array_initializer:): Installed actions.
17910 (variable_initializer): Build location information on element if
17912 (switch_statement:): Fixed indentation typo.
17913 (switch_block:): Redefined default action.
17914 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
17915 (patch_assignment): Removed duplicate code.
17916 (maybe_build_array_element_wfl, build_new_array_init,
17917 patch_new_array_init, patch_array_constructor,
17918 array_constructor_check_entry): New functions.
17920 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
17922 * parse.y (array_initializer): Tagged <node>.
17923 (variable_initializer:): Use default rule.
17924 (array_initializer:): Defined actions.
17925 (variable_initializers:): Likewise.
17926 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
17927 non-static field accesses.
17928 (patch_invoke): Fixed indentation typo.
17929 (java_complete_tree): Likewise.
17930 (build_labeled_block): Changed leading comment. Generate an error
17931 in case of duplicate loop labels.
17932 (patch_conditional_expr): Patch results of string concatenation
17935 1998-12-06 Per Bothner <bothner@cygnus.com>
17937 * constants.c (find_methodref_index): When the class is an interface,
17938 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
17940 * decl.c (finit_identifier_node): Use "$finit$", rather than
17941 "<finit>" (which Sun's verifier rejects).
17942 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
17943 (generate_field_initialization_code): Removed.
17944 (fix_constructors) Don't add call to $finit$ here (wrong order).
17945 (patch_method_invocation): Add $finit$ call here.
17947 * java-tree.h (CALL_USING_SUPER): New macro.
17948 * parse.y (patch_invoke): Remove im local variable.
17949 (patch_method_invocation, patch_invoke): Don't pass super parameter.
17950 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
17951 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
17953 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
17955 * parse.y (java_complete_tree): Don't complain about unreachable
17956 statement if it is empty_stmt_node.
17958 * jcf-write.c (find_constant_wide): New function.
17959 (push_long_const): Use find_constant_wide.
17961 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
17962 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
17963 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
17964 Emit invokeinterface when calling an interface method.
17965 Emit invokespecial also when calling super or private methods.
17967 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
17969 1998-12-06 Per Bothner <bothner@cygnus.com>
17971 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
17973 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
17975 * java-tree.h (java_layout_seen_class_methods): New function
17977 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
17978 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
17979 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
17980 * parse.y (method_declarator:): Defined action.
17981 (issue_warning_error_from_context): input_filename saved, set to
17982 the appropriate value and restored after java_error is called.
17983 (build_unresolved_array_type): Fixed comment.
17984 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
17985 (method_header): Deal with return type the same way type are
17986 handled for fields and method's parameters and local variables
17988 (check_method_redefinition): Removed extra CR.
17989 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
17990 (java_layout_seen_class_methods): New function.
17991 (java_layout_classes): Call java_layout_seen_class_methods.
17993 1998-12-03 Per Bothner <bothner@cygnus.com>
17995 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
17997 1998-12-03 Per Bothner <bothner@cygnus.com>
17999 * jcf-dump.c (main): Fix error message.
18000 * jcf-path.c (add_entry): Style fix.
18002 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18004 * class.c (layout_class_method): Call build_java_argument_signature
18005 on constructors too.
18006 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18007 (patch_method_invocation): Define a primary when resolving an
18008 expression name. Augmented comment on code checking illegal `this'
18009 usage. Loosened it test by accepting NEW_CLASS_EXPR.
18011 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
18013 * class.c (layout_class_method): Don't report error on non-static
18014 overriding static if the method is private.
18015 * java-tree.h (finish_class): Prototype added.
18016 * lex.c (java_get_line_col): Handle col argument -2 value.
18017 * parse.h: All static method declarations moved to parse.y.
18018 * parse.y: Now contains all static method declarations previously
18020 (find_expr_with_wfl, missing_return_error,
18021 unreachable_stmt_error): New functions.
18022 (java_get_real_method_name): Identify constructors bearing class
18023 names in source code compiled classes only.
18024 (java_complete_expand_methods): Call missing_return_error.
18025 (invocation_mode): Private methods invoked as static methods.
18026 (java_complete_tree): Call unreachable_stmt_error.
18028 1998-12-01 Tom Tromey <tromey@cygnus.com>
18030 * Makefile.in (+target): Removed.
18031 (+xmake_file): Likewise.
18032 (+tmake_file): Likewise.
18033 (.NOEXPORT): Removed duplicate.
18035 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18037 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18039 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
18041 * jvgenmain.c: Remove the xmalloc prototype, we get it from
18042 libiberty.h. Provide an xmalloc definition.
18044 * jvspec.c: Remove the xmalloc prototype.
18046 * parse-scan.y: Include config.h and system.h. Don't include
18047 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
18048 Provide an xstrdup definition.
18050 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
18052 * jcf-path.c (add_entry): Recognize ".jar" too.
18053 * lang-specs.h: Likewise.
18055 1998-11-26 Per Bothner <bothner@cygnus.com>
18057 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
18058 soft_monitorenter_node, soft_monitorexit_node, throw_node.
18060 * jcf-write.c (generate_bytecode_insns):
18061 Handle pre/post-increment/decrement of long.
18063 * jcf-write.c (generate_bytecode_insns):
18064 Handle missing exception handler (finally for synchronized).
18066 1998-11-25 Per Bothner <bothner@cygnus.com>
18068 * java-tree.h (end_params_node): Declare global.
18069 * decl.c (end_params_node): New global.
18070 (init_decl_processing, start_java_method): Use end_params_node for
18071 end of list of parameter types. Follows correct gcc conventions.
18072 * expr.c (pop_argument_types, pop_arguments): Likewise.
18073 * lang.c (put_decl_node): Likewise.
18074 * typeck.c (various places): Likewise.
18075 * class.y (various places): Likewise.
18076 * parse.y (various places): Likewise.
18078 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
18079 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
18081 * class.c: Add #include flags.h, remove no-longer needed declaration.
18083 * class.c (layout_class_method): Remove commented-out code, re-format.
18084 Don't add vtable entry (or index) for private methods.
18085 * expr.c (expand_invoke): A private method is implicitly final.
18086 * class.c (make_class_data): If inlining or optimizing,
18087 skip private methods.
18089 * class.c (finish_class): New function. Calls existing methods,
18090 but alls emits deferred inline functions.
18091 * jcf-parse.c (parse_class_file): Call finish_class.
18092 * parse.y (java_complete_expand_methods): Likewise.
18094 * expr.c (build_java_binop): Explicit default, to silence -Wall.
18096 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
18098 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
18100 * jcf-write.c (generate_bytecode_conditional): Fix typo.
18102 1998-11-24 Per Bothner <bothner@cygnus.com>
18104 * (generate_classfile): Always write class access flag with
18107 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
18109 * class.c (maybe_layout_super_class): New function.
18110 (layout_class): Reorganized. Loop on class methods dispatched into
18111 a new function. Call maybe_layout_super_class.
18112 (layout_class_methods, layout_class_method): New functions.
18113 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18115 (expand_invoke): Likewise.
18116 * java-tree.h (all_class_list): New global variable declared.
18117 (layout_class_methods, layout_class_method): New function
18119 (LAYOUT_SEEN_CLASS_METHODS): New macro.
18120 * jcf-parse.c (all_class_list): New global variable.
18121 (load_class): Extended what class_or_name can be. Use parser
18122 context mechanism to save globals before calling jcf_parse.
18123 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18124 is set on the file name.
18125 (jcf_parse): Layout class methods when Object is loaded, otherwise
18126 record class in all_class_list for delayed method layout.
18127 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18128 * lang.c (put_decl_node): Decode <init> into the decl context
18130 * lex.c (java_allocate_new_line): Use xmalloc.
18131 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18132 pointers, not TREE_LIST elements.
18133 (struct parser_ctxt): Fixed comment indentations, added comments
18134 and reordered some fields.
18135 (java_check_methods): Function prototype removed.
18136 * parse.y (java_push_parser_context): Use xmalloc.
18137 (java_parser_context_restore_global): Pop extra pushed ctxp only
18138 when there's nothing next.
18139 (maybe_create_class_interface_decl): Fixed comment, add new
18140 created class decl to all_class_list.
18141 (method_header): Use GET_REAL_TYPE on argument's types.
18142 (method_declarator): Use GET_REAL_TYPE, change type to the real
18143 type in TREE_LIST dependency node. Build argument list with the
18145 (create_jdep_list): Use xmalloc. Removed allocation error message.
18146 (obtain_incomplete_type): Fixed leading comment. Broadened
18147 incoming argument meaning.
18148 (register_incomplete_type): Use xmalloc. Removed allocation error
18150 (safe_layout_class): Fixed leading comment.
18151 (jdep_resolve_class): Reversed if statement condition and switch
18152 if and else bodies.
18153 (resolve_and_layout): Fixed leading comment. Broadened incoming
18155 (complete_class_report_errors): New local variable name, for
18156 clarity. purify_type_name used for all error cases.
18157 (java_get_real_method_name): Stricter check on constructors.
18158 (java_check_regular_methods): Reverse methods list only if not
18159 already laid out. Layout artificial constructor.
18160 (java_check_methods): Deleted.
18161 (source_start_java_method): Obtain incomplete type for patchable
18163 (java_layout_classes): Fixed leading comment. Use
18164 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18165 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18166 before returning. Fixed comments.
18167 (java_expand_classes): Check for errors up front.
18168 (patch_method_invocation): Class to search is resolved and laid
18171 1998-11-24 Per Bothner <bothner@cygnus.com>
18173 * expr.c (java_lang_expand_expr): Add missing emit_queue.
18175 * javaop.h (int8): Removed - not used.
18176 (jbyte): Redefine portably with correct signedness.
18178 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
18180 * jcf-write.c (generate_bytecode_insns): Fix typo
18181 OPCODE_getstatic to OPCODE_getfield.
18183 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
18184 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
18185 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18187 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
18189 * jcf-parse.c (jcf_parse_source): Function returned type is
18190 void. Added prototype.
18191 (jcf_parse): Function returned type is void.
18192 (yyparse): Remove call to fclose on the last parsed file.
18194 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18196 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
18198 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18199 (layout_class): Cope with methods featuring WFL in decl names.
18200 * decl.c (unqualified_object_id_node): New global variable,
18202 (build_decl_no_layout): Removed.
18203 * expr.c (build_primtype_type_ref): Handle Double.
18204 (java_lang_expand_expr): Fixed indentations.
18205 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18206 (flag_wall, flag_redundant, flag_not_overriding,
18207 flag_static_local_jdk1_1, unqualified_object_id_node): Global
18208 variable declarations.
18209 (build_decl_no_layout): Removed prototype.
18210 (java_get_real_method_name): Added prototype.
18211 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18212 (java_parse_abort_on_error): Macro now just returns.
18213 * jcf-parse.c (jcf_parse_source): Check fclose returned
18214 value. Call emit_register_classes if java_report_errors returns
18216 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18217 flag_static_local_jdk1_1): New integer flags.
18218 (lang_decode_option): New flags set here.
18219 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18220 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18221 the flag_redundant variable.
18222 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18223 when parsing java.lang.Object class.
18224 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18225 NULL_TREE to build.
18226 (resolve_qualified_expression_name): Fixed indentation.
18227 (patch_array_ref): Changed prototype.
18228 (not_initialized_as_it_should_p): Prototype removed.
18229 (java_report_errors): Added function prototype.
18230 * parse.y (formal_parameter:): Changed error message for not yet
18231 supported final parameters.
18232 (class_type_list:): Set both PURPOSE and VALUE of created
18233 TREE_LIST to be class_type.
18234 (primary_no_new_array:): Handle class literals on primitive types.
18235 (parse_warning_context): Reinstalled correct force_error and
18236 do_warning flags setups.
18237 (java_report_errors): Changed prototype. Return java_error_count
18239 (variable_redefinition_error): Consider treating variable type as
18241 (create_interface): Warn about redundant abstract modifier if
18242 flag_redundant is set. Changed error message.
18243 (lookup_field_wrapper): Save/restore globals before/after looking
18245 (duplicate_declaration_error_p): Consider treating declaration
18246 type as a fake pointer.
18247 (register_fields): Extract real type from dependency node. Check
18248 for duplicate field declaration after type adjustment. Use
18249 DECL_INITIAL to store static final initialized values.
18250 (method_header): Extract real function type from dependency node.
18251 (check_abstract_method_header): Use GET_METHOD_NAME.
18252 (obtain_incomplete_type): Layout fake pointer type.
18253 (safe_layout_class): Don't try to check for methods before layout.
18254 (java_complete_class): Don't check for correct throws clause
18255 elements inheritance here.
18256 (resolve_and_layout): Broadened name parameter meaning.
18257 (reset_method_name): Use GET_METHOD_NAME.
18258 (java_get_real_method_name): New function.
18259 (java_check_regular_methods): Don't check methods in
18260 java.lang.Object. Verify lineage of throws clause elements. Use
18261 flag_no_overriding in warning report.
18262 (check_throws_clauses): Don't check if class was from
18263 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18264 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18265 (declare_local_variables): Use flag_static_local_jdk1_1 to report
18266 warning on unsupported final local variables. Use build_decl
18267 instead of build_decl_no_layout. Get real local variable type from
18269 (source_start_java_method): Get real parameter type from
18270 dependency node. Call build_decl instead of build_decl_no_layout.
18271 (java_layout_classes): Reverse tree and layout type and class as
18272 required. Mark class as loaded when done.
18273 (resolve_field_access): Fixed indentation. Restricted condition
18274 leading to static field access code generation. Set field_type
18275 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18276 (resolve_qualified_expression_name): Initialize type_found to
18277 null. Handle static field resolved during qualification. Fixed
18278 layout on non primitive field decl types.
18279 (not_accessible_p): Fixed typo in comment.
18280 (patch_method_invocation): Resolve and layout class to search from
18282 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18283 layout non primitive type, if necessary. Make method node only to
18285 (find_applicable_accessible_methods_list): Consider WFL'ed method
18286 decl names. Fixed indentation.
18287 (argument_types_convertible): Resolve and layout target type if
18289 (java_complete_tree): Fixed indentation problems. Rewrote
18290 CALL_EXPR thrown exceptions check. Re-installed further processing
18291 of the assignment in certain cases.
18292 (patch_assignment): Call maybe_build_primttype_type_ref to perform
18293 inlining on class literals.
18294 (valid_builtin_assignconv_identity_widening_p): Cope with constant
18296 (valid_method_invocation_conversion_p): Likewise.
18297 (patch_string): Temporary disable forbidden use of `this' in
18298 explicit constructor invocations when doing string concatenation
18299 within their scope.
18300 (patch_unaryop): Added comment. Reinstalled code to disable
18301 further check on assignment operation with cast expression RHS.
18302 (patch_switch_statement): Fixed indentation.
18303 (build_try_statement): Call build_decl instead of
18304 build_decl_no_layout.
18305 (patch_synchronized_statement): Likewise.
18306 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18307 IS_UNCHECKED_EXPRESSION_P.
18308 (check_thrown_exceptions_do): Changed leading comment. Resolve and
18309 layout argument exception type.
18310 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18311 of IS_UNCHECKED_EXPRESSION_P.
18313 1998-11-18 Anthony Green <green@cygnus.com>
18315 * jcf-parse.c (yyparse): Open class file in binary mode.
18317 1998-11-15 Per Bothner <bothner@cygnus.com>
18319 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
18321 * jcf-write.c (perform_relocations): Move check out one loop.
18323 1998-11-15 Anthony Green <green@hoser.cygnus.com>
18325 * Make-lang.in: Fix reference to srcdir.
18326 * jv-scan.c: Add missing xmalloc prototype.
18327 * jvgenmain.c: Ditto.
18329 1998-11-15 Per Bothner <bothner@cygnus.com>
18331 * decl.c (error_mark_node), java-tree.h: New global.
18332 * parse.y: Use empty_stmt_node instead of size_zero_node.
18333 (build_if_else_statement): If missing else, use empty_stmt_node.
18335 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
18336 (java_complete_expand_method): Complain if return is missing.
18337 (java_check_regular_methods): Comment out incorrect error check.
18338 (not_accessible_p): Fix incorrect handling of protected methods.
18339 (patch_method_invocation): Pass correct context to not_accessible_p.
18340 (find_applicable_accessible_methods_list): Likewise.
18341 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
18342 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
18343 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
18344 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
18346 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
18347 (push_int_const): Remove reundant NOTE_PUSH.
18348 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
18349 (- case SWITCH_EXPR): Fix code generation bug.
18350 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
18351 (generate_classfile): More robust for abstract methods.
18353 1998-11-15 Anthony Green <green@cygnus.com>
18355 * Makefile.in: jv-scan and jvgenmain all require libiberty.
18356 * Make-lang.in: Ditto.
18358 * jv-scan.c: Remove xmalloc and xstrdup definitions.
18359 * jvgenmain: Ditto.
18361 1998-11-15 Per Bothner <bothner@cygnus.com>
18363 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
18365 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
18367 1998-11-14 Per Bothner <bothner@cygnus.com>
18369 Allow uses of interface types to verify. This is not really
18370 type-safe, but it matches what Sun does, and is OK as long as
18371 there are appropriate run-time checks.
18372 * verify.c (merge_types): If merging two interface types,
18373 just set the result to java.lang.Object.
18374 * expr.c (pop_type): Any interface is matches by java.lang.Object.
18376 1998-11-13 Tom Tromey <tromey@cygnus.com>
18378 * gjavah.c (main): Handle --output-class-directory argument.
18379 * jvspec.c (lang_specific_driver): Translate `-d' into
18380 -foutput-class-dir.
18381 * jcf.h (jcf_write_base_directory): Declare.
18382 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18383 * lang-options.h: Mention -foutput-class-dir.
18384 * jcf-write.c (jcf_write_base_directory): New global.
18385 (make_class_file_name): Put generated .class file into `-d'
18386 directory, or into source directory if -d not given. Function now
18388 (write_classfile): Free class file name. Handle case where class
18390 (DIR_SEPARATOR): New macro.
18391 Include <sys/stat.h>
18393 * Makefile.in (prefix): New macro.
18395 1998-11-12 Per Bothner <bothner@cygnus.com>
18397 * parse.y (patch_invoke): Do less if flag_emit_class_files.
18398 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
18399 here (done in patch_invoke instead).
18400 (case_identity): Moved here from parse.y.
18402 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
18403 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
18404 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
18405 so they can be efficiently scanned without recursion.
18406 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18407 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
18408 in BLOCK iteratively, rather than recursively.
18410 * parse.y (do_unary_numeric_promotion): New function.
18411 (patch_unaryop, patch_binop, patch_array_ref): Use it.
18413 * parse.y (patch_newarray): Various fixes.
18415 Re-do handling of switch statements (for proper block scoping).
18416 * parse.y: Add just a single block for the enture switch block,
18417 but don't create any "case blocks".
18418 (group_of_labels): Rmeoved unneeded non-terminal.
18419 CASE_EXPR and DEFAULT_EXPR are added to current block.
18420 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
18421 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18422 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
18423 * parse.y (wfl_operator, print_int_node): Make non-static.
18424 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
18425 as part of recursive scan of block.
18426 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
18427 (patch_switch_statement): Most tests move dinto java_complete_tree.
18429 * parse.y: Make various production be non-typed (void).
18430 * parse.y (parse_error): Merged into issue_warning_error_from_context.
18431 * parse.y (add_stmt_to_compound): Don't create/change extra node.
18432 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
18434 * jcf-write.c (struct jcf_handler): New type.
18435 (struct jcf_switch_state): New type.
18436 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
18437 (alloc_handler, emit_unop, emit_reloc): New functions.
18438 (adjust_typed_op): Add extra parameter ("max type" offset).
18439 (emit_switch_reloc, emit_case-reloc): New function.
18440 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
18441 (generate_bytecode_insns): Support REAL_CST, switch statements,
18442 exception handling, method calls, object/array creation, and more.
18444 * class.c: Remove some unused variables.
18445 * constants.c (find_string_constant): New function.
18446 (count_constant_pool_bytes): Fix to correctly handle wide constants.
18447 * decl.c (complete_start_java_method): Don't _Jv_InitClass
18448 if flag_emit_class_files.
18450 1998-11-12 Tom Tromey <tromey@cygnus.com>
18452 * jcf-io.c (find_class): Added explanatory comment.
18454 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
18455 trailing slash to `.zip' entries.
18457 * jvspec.c (lang_specific_driver): Correctly handle case where
18458 GC_NAME not defined.
18460 1998-11-11 Tom Tromey <tromey@cygnus.com>
18462 * jvspec.c (GC_NAME): New define.
18463 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
18465 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18467 1998-11-11 Per Bothner <bothner@cygnus.com>
18469 * jcf-dump.c (TABLE_SWITCH): Fix typos.
18471 1998-11-11 Tom Tromey <tromey@cygnus.com>
18473 * jcf-dump.c (main): Correctly recognize `--'-style long options.
18475 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18477 * class.c (is_compiled_class): Call safe_layout_class for class
18478 compiled from source.
18479 * conver.h (convert_to_integer, convert_to_real,
18480 convert_to_pointer): Added prototypes.
18481 * decl.c (init_decl_processing): Non longer push the decls of
18482 `methodtable', `constants', `Class', `Field', `dispatchTable'
18483 `jexception' and `Method'.
18484 * expr.c (build_invokeinterface): New function.
18485 (expand_invoke): static variable CLASS_IDENT now in
18486 build_invokeinterface. Use build_invokeinterface.
18487 (expand_java_field_op): Moved code to inline
18488 java.lang.PRIMTYPE.TYPE into a function.
18489 (build_primtype_type_ref): New function.
18490 * java-tree.def (INSTANCEOF_EXPR): New tree code.
18491 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
18492 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
18493 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
18494 (DECL_LOCAL_STATIC_VALUE): New macro.
18495 (build_invokeinterface, build_primtype_type_ref): New function
18497 (java_parse_abort_on_error): Macro rewritten.
18498 * jcf-parse.c (current_method): Add comment to declaration.
18499 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
18500 Function prototypes fixed.
18501 (jcf_parse_source): push/pop parser context. save/restore global.
18502 (parse_source_file): Fixed leading comment. Now take a
18503 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18504 classes and pop the parser context anymore.
18505 (yyparse): Push parser context, save globals, parse the source
18506 file, restore globals and pop the parser context when processing a
18508 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18509 * lex.c (java_parse_doc_section): New function.
18510 (java_lex): Call java_parse_doc_section when appropriate. Build an
18511 operator around INSTANCEOF_TK.
18512 * lex.h (java_lineterminator, java_sprint_unicode,
18513 java_unicode_2_utf8, java_lex_error, java_store_unicode):
18514 Prototypes rewritten.
18515 (java_parse_escape_sequence, java_letter_or_digit_p,
18516 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18517 java_read_unicode, java_store_unicode, java_read_char,
18518 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18519 Added function prototypes.
18520 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
18522 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
18524 (struct parser_ctxt): New fields: deprecated,
18525 current_parsed_class_un, gclass_list.
18526 (fix_method_argument_names, issue_warning_error_from_context,
18527 resolve_package, lookup_package_type): New function prototypes.
18528 (resolve_expression_name): Fixed function prototype.
18529 (find_applicable_accessible_methods_list): Fixed indentation, added
18530 extra argument in prototype.
18531 (check_final_assignment, build_null_of_type, check_deprecation,
18532 check_method_redefinition, reset_method_name,
18533 java_check_regular_methods, java_check_abstract_methods,
18534 maybe_build_primttype_type_ref): New function prototype.
18535 * parse.y (conver.h): Include.
18536 (INSTANCEOF_TK): Tagged <operator>.
18537 (single_type_import_declaration): Use REGISTER_IMPORT macro.
18538 (relational_expression:): Build binop for instanceof.
18539 (java_push_parser_context): Remember ctxp->gclass_list across
18541 (java_pop_parser_context): Simply return if no context
18542 exists. Remember gclass_list across contexts.
18543 (issue_warning_error_from_context): New function.
18544 (parse_error_context): Don't setup ctxp->elc here. Call
18545 issue_warning_error_from_context instead.
18546 (parse_warning_context): Likewise.
18547 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
18548 setup. Link new class/interface to ctxp->gclass_list.
18549 (add_superinterfaces): Register interface as incomplete if not
18551 (create_class): Remember class unqualified name in
18552 ctxp->current_parsed_class_un. Check class deprecation.
18553 (register_fields): Check field deprecation. Remember static final
18554 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
18556 (method_header): New local variable ORIG_ARG. Use unqualified
18557 current class name for check on constructor errors. Promote return
18558 type if of record type. Argument list fix moved in
18559 fix_method_argument_names, called here. Check method deprecation.
18560 (fix_method_argument_names): New function.
18561 (method_declarator): Promote record typed arguments.
18562 (safe_layout_class): Check class methods before layout.
18563 (java_complete_class): Compute field layout when patched.
18564 (do_resolve_class): Try to load class after having it renamed
18565 after the package name.
18566 (get_printable_method_name): Use DECL_CONTEXT.
18567 (reset_method_name): New function.
18568 (check_method_redefinition): Use reset_method_name.
18569 (java_check_regular_methods): New local variable
18570 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
18571 names for error report. Check for compile-time error when method
18572 found has default (package) access.
18573 (java_check_abstract_methods): Now takes an interface DECL node as
18574 an argument. Also reinstall real name on unchecked
18575 overriding/hiding methods for error report.
18576 (java_check_methods): Fixed leading comment. Get classes to verify
18577 from ctxp->gclass_list. Use CHECK_METHODS macro and set
18578 CLASS_METHOD_CHECKED_P on class verification.
18579 (lookup_java_method2): Get real method name if necessary.
18580 (find_in_imports): Don't check package class access here.
18581 (resolve_package, lookup_package_type): New functions.
18582 (java_layout_classes): Fixed leading comment. Take classes to be
18583 laid out from ctxp->gclass_list.
18584 (java_complete_expand_methods): Don't expand native and abstract
18586 (java_expand_classes): New function.
18587 (resolve_expression_name): Use additional argument ORIG. Retrieve
18588 values of static final field of primitive types.
18589 (resolve_field_access): Handles static final field of promotive
18591 (resolve_qualified_expression_name): Handle STRING_CST as
18592 primaries and package name resolution. Check deprecation on found
18593 decls. Set where_found and type_found on non static field resolved
18594 during qualification. Layout non primitive field decl types.
18595 (check_deprecation): New function.
18596 (maybe_access_field): Simplified.
18597 (patch_method_invocation_stmt): Local variable CLASS_TYPE
18598 removed. Reverse method's argument when primary is a type. Don't
18599 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
18600 instead. Include abstract class in the list of class searchable
18601 for constructors. Use DECL_CONTEXT of found method for access
18602 checks. Check method deprecation.
18603 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
18604 converting arguments. Handle INVOKE_INTERFACE.
18605 (lookup_method_invoke): Search constructor using existing
18606 infrastructure (don't rely on lookup_java_constructor anymore).
18607 (find_applicable_accessible_methods_list): Extra argument flag
18608 LC. Now include constructor in the search.
18609 (qualify_ambiguous_name): Conditional expression are primaries.
18610 (not_initialized_as_it_should_p): static final are always
18612 (java_complete_tree): Pass extra NULL argument to
18613 resolve_expression_name. Stricter test to carry on patching
18614 assignments. New case for INSTANCEOF_EXPR.
18615 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
18616 (check_final_assignment, maybe_build_primttype_type_ref): New
18618 (patch_assignment): Detect resolved static finals and carry normal
18619 assignment error check on them. Inline PRIMTYPE.TYPE read access.
18620 (try_builtin_assignconv): Access constant 0 on all primitive
18622 (valid_builtin_assignconv_identity_widening_p): Accept identical
18623 types. Accept all promoted type on int type.
18624 (valid_ref_assignconv_cast_p): Accept a null pointer to be
18625 assigned to a reference.
18626 (valid_method_invocation_conversion_p): Accept to check null
18628 (build_binop): Merge declaration and initialization of local
18630 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
18631 numeric types. Improved validity test for qualify operators on
18633 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
18634 and PREINCREMENT_EXPR. Also detect resolved static finals of a
18635 primitive type and issue the appropriate error message.
18636 (resolve_type_during_patch): Mark class loaded when resolved.
18637 (patch_cast): Allow null to be cased to reference types.
18638 (build_null_of_type): New function.
18639 (patch_array_ref): Handle array on references correctly.
18640 (patch_return): Removed unused local variable MODIFY. Force
18641 boolean to be returned as integers. Allows null to be returned by
18642 a function returning a reference.
18643 * typeck.c (convert_to_integer, convert_to_real,
18644 convert_to_pointer): Prototypes moved to convert.h
18645 (lookup_argument_method): Use method real name, if necessary.
18647 1998-10-30 Tom Tromey <tromey@cygnus.com>
18649 * class.c (build_class_ref): Changed name of primitive classes to
18652 * class.c (make_class_data): Renamed fields: nmethods to
18653 method_count, method_count to dtable_method_count. Always set
18654 `state' field to 0.
18655 * decl.c (init_decl_processing): Likewise.
18657 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
18659 * class.c (layout_class): Don't mangle <finit>, produce
18660 __finit<class> instead. Don't verify artificial methods.
18661 * decl.c (finit_identifier_node): New declared global.
18662 (init_decl_processing): finit_identifier_node initialized.
18663 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
18664 * java-tree.h (finit_identifier_node): Declared as extern.
18665 (struct lang_decl): New field called_constructor.
18666 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
18667 (CLASS_HAS_FINIT_P): New macro.
18668 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
18669 explicit constructor invocation.
18670 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
18671 CALL_SUPER_CONSTRUCTOR_P): New macros.
18672 (write_classfile): Added prototype.
18673 * jcf-parse.c (jcf_parse_source): Parse and remember for
18674 generation if the file was seen on the command line.
18675 (parse_source_file): Don't write the class file here.
18676 (yyparse): Loop on files rewritten. Set current_jcf.
18677 (parse_zip_file_entries): Parse class file only if it was found.
18678 * lang.c (init_parse): Don't open command line provided filename
18680 (lang_parse): Don't set main_jcf anymore.
18681 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
18682 (JCONSTRUCTOR_CHECK): New macro.
18683 (JBSC_TYPE_P): New macro.
18684 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
18685 (COMPLETE_CHECK_OP_2): New macro.
18686 (struct parse_ctxt): New field explicit_constructor_p.
18687 (check_class_interface_creation): Fixed prototype indentation.
18688 (patch_method_invocation_stmt): Prototype reflects added argument.
18689 (patch_invoke): Likewise.
18690 (complete_method_declaration, build_super_invocation,
18691 verify_constructor_circularity,
18692 build_this_super_qualified_invocation, get_printable_method_name,
18693 patch_conditional_expr, maybe_generate_finit, fix_constructors,
18694 verify_constructor_super, create_artificial_method,
18695 start_artificial_method_body, end_artificial_method_body,
18696 generate_field_initialization_code): New function prototypes.
18697 * parse.y: Fixed leading comment
18698 (constructor_header:, constructor_body:, block_end:): Rules tagged
18700 (type_declaration:): Call maybe_generate_finit.
18701 (method_declaration:): Action for method_body: placed in new
18702 function complete_method_declaration, called here.
18703 (constructor_declaration:): Defined actions. Removed leading
18705 (constructor_header:): New rule with action.
18706 (constructor_body:): Rule rewritten using block_begin: and
18707 block_end:. Defined actions.
18708 (constructor_declarator:, explicit_constructor_invocation:):
18710 (block:): Use new rules block_begin: block_end:.
18711 (block_begin:, block_end:): New rules and actions.
18712 (block_statements:): Fixed error message for explicit
18714 (method_invocation:): Call build_this_super_qualified_invocation
18715 if primary is `this' or `super' was seen.
18716 (conditional_expression:): Action defined.
18717 (extra_ctxp_pushed_p): New static global flag.
18718 (java_parser_context_save_global): Create parser context if
18719 necessary. Use extra_ctxp_pushed_p to remember it.
18720 (java_parser_context_restore_global): Pop extra parser context if
18722 (build_array_from_name): Array on primitive types are marked
18724 (register_fields): Restore new name in field initializer
18725 expression if type was altered. Non static fields initialized upon
18726 declaration marked initialized.
18727 (maybe_generate_finit): New function.
18728 (maybe_generate_clinit): Use create_artificial_method,
18729 start_artificial_method_body, end_artificial_method_body. Generate
18730 debug info for enclosed initialization statements.
18731 (method_header): Fixed leading comment. Check constructor
18732 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
18734 (complete_method_declaration, constructor_circularity_msg,
18735 verify_constructor_circularity): New functions.
18736 (get_printable_method_name): New function.
18737 (check_method_redefinition): Don't rename <finit> methods. Fix
18738 declared constructor names. Error message for
18739 constructors modified.
18740 (java_check_regular_methods): Local variable seen_constructor
18741 renamed saw_constructor. Skip verification on constructors. Create
18742 default constructor with create_artificial_method.
18743 (java_check_methods): Removed unnecessary empty line.
18744 (create_artificial_method, start_artificial_method_body,
18745 end_artificial_method_body): New functions.
18746 (java_layout_classes): Changed leading comment. Reverse fields
18747 list if necessary. Always layout java.lang.Object if being
18749 (java_complete_expand_methods): Verify constructor circularity.
18750 (java_complete_expand_method): Call fix_constructor on
18751 constructors. Local variable no_ac_found removed. Restore
18752 bindings if method body expansion failed.
18753 (fix_constructors, verify_constructor_super,
18754 generate_field_initialization_code): New function.
18755 (java_expand_classes): Fixed leading comment. Write class file
18757 (resolve_expression_name): Check for illegal instance variable
18758 usage within the argument scope of an explicit constructor
18760 (resolve_qualified_expression_name): Pass extra from_super flag
18761 when invoking patch_method_invocation_stmt. New case for
18762 conditional expression when used as a primary. Check for error
18763 when acquiring super.
18764 (patch_method_invocation_stmt): Added extra argument super. New
18765 local variable is_static_flag. Set class_to_search according to
18766 the nature of the constructor invocation. Don't add `this'
18767 argument when expanding NEW_CLASS_EXPR. Check for illegal method
18768 invocation within the argument scope of explicit constructor
18769 invocation. Set is_static according to is_static_flag. Provide
18770 extra `super' argument to patch_invoke invocation.
18771 (patch_invoke): New argument from_super. Loop on arguments
18772 indentation fixed. Pass from_super to invocation_mode. New switch
18773 case INVOKE_SUPER. Fixed error message in switch default case.
18774 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
18776 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
18777 (lookup_method_invoke): Fixed prototypes in candidates list. Error
18778 message takes constructors into account.
18779 (find_applicable_accessible_methods_list): Fixed indentation.
18780 (qualify_ambiguous_name): Take explicit constructor invocation
18781 into account. Deal with a conditional expression as a primary to
18783 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
18784 case. Added extra argument to patch_method_invocation_stmt.
18785 Register calls made to explicit constructor `this'. Don't call
18786 save_expr in ARRAY_REF case when emitting class files. Check for
18787 illegal use of this when expanding explicit constructor invocation
18789 (complete_function_arguments): Set and reset parser context
18790 explicit_constructor_p field value when appropriate.
18791 (build_super_invocation, build_this_super_qualified_invocation):
18793 (patch_assignment): Fixed typo.
18794 (patch_unaryop): Check on final fields occurs only when a decl
18796 (patch_return): Take constructors into account.
18797 (patch_conditional_expr): New function.
18798 * typeck.c (build_java_signature): Removed unnecessary empty line.
18800 1998-10-28 Jeffrey A Law (law@cygnus.com)
18802 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
18804 1998-10-28 Tom Tromey <tromey@cygnus.com>
18806 * decl.c (init_decl_processing): Renamed fields.
18807 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
18808 interface_len, msize fields.
18810 * class.c (make_class_data): Removed subclass_head and
18811 subclass_next fields.
18812 * decl.c (init_decl_processing): Removed subclass_head and
18813 subclass_next fields.
18815 1998-10-28 Jeffrey A Law (law@cygnus.com)
18817 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
18818 * mangle.c (emit_unicode_mangled_name): Similarly.
18820 1998-10-26 Nick Clifton <nickc@cygnus.com>
18822 * jcf-parse.c (get_constant): Place braces around code to compute
18823 'd' when REAL_ARITHMETIC is not defined.
18825 1998-10-25 H.J. Lu (hjl@gnu.org)
18827 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
18830 1998-10-23 Tom Tromey <tromey@cygnus.com>
18832 * lang-specs.h: `.zip' files are input to jc1.
18834 1998-10-22 Per Bothner <bothner@cygnus.com>
18836 * jvspecs.c: Add (but don't enable) support for combining multiple
18837 .class and .java input filenames to a single jc1 invocation.
18838 Add support for -C flag (copile to .class files).
18839 Translate -classpath and -CLASSPATH arguments.
18840 * lang-specs.h: Don't set %2 spec.
18842 1998-10-22 Tom Tromey <tromey@cygnus.com>
18844 * jcf-path.c (add_entry): Don't add trailing separator if entry is
18846 (add_path): Don't add trailing separator to non-empty path
18849 * lang.c (lang_decode_option): Check for -fclasspath and
18850 -fCLASSPATH before examining other `-f' options.
18852 * java-tree.h (finalize_identifier_node): Don't declare.
18853 * class.c (make_class_data): Don't push "final" field.
18854 * decl.c (init_decl_processing): Don't push "final" field.
18855 (finalize_identifier_node): Removed.
18856 (init_decl_processing): Don't set finalize_identifier_node.
18858 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
18860 1998-10-11 Anthony Green <green@cygnus.com>
18862 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
18863 (JV_SCAN_SOURCES): New macro.
18864 (JCF_DUMP_SOURCES): Likewise.
18865 (jcf-dump$(exeext)): New target.
18866 (jv-scan$(exeext)): New target.
18868 1998-10-22 Tom Tromey <tromey@cygnus.com>
18870 * Makefile.in (LEX): Removed.
18871 (LEXFLAGS): Likewise.
18872 (SET_BISON): New macro.
18874 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
18875 spurious diffs in parse.c.
18876 ($(PARSE_SCAN_C)): Likewise.
18877 (PARSE_DIR): New macro.
18879 (PARSE_SCAN_C): Likewise.
18880 (PARSE_RELDIR): New macro.
18882 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
18884 * jcf-io.c (find_class): Use saw_java_source to determine when to
18885 look for `.java' file.
18886 * jcf-parse.c (saw_java_source): New global.
18887 (yyparse): Set it if `.java' file seen.
18889 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
18890 (GCJH_SOURCES): Likewise.
18891 * Makefile.in (datadir): New macro.
18892 (libjava_zip): Likewise.
18893 (JAVA_OBJS): Added jcf-path.o.
18894 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18895 (../gcjh$(exeext)): Likewise.
18896 (jcf-path.o): New target.
18897 * java-tree.h (fix_classpath): Removed decl.
18898 * jcf-parse.c (fix_classpath): Removed.
18899 (load_class): Don't call fix_classpath.
18900 * parse.y (read_import_dir): Don't call fix_classpath.
18901 * lex.h: Don't mention classpath.
18902 * lex.c (java_init_lex): Don't initialize classpath.
18903 * jcf-io.c (classpath): Removed global.
18904 (find_class): Use jcf_path iteration functions. Correctly search
18905 class path for .java file.
18906 (open_in_zip): New argument `is_system'.
18907 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
18908 classpath-related options.
18909 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
18911 (lang_init): Call jcf_path_init.
18912 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
18913 * lang-specs.h: Handle -I. Minor cleanup to -M options.
18914 Correctly put braces around second string in each entry.
18915 * gjavah.c (main): Call jcf_path_init. Recognize all the new
18916 classpath-related options.
18917 (help): Updated for new options.
18918 * jcf.h: Declare functions from jcf-path.c. Don't mention
18919 `classpath' global.
18920 * jcf-path.c: New file.
18922 * jcf-depend.c: Include jcf.h.
18924 * jcf-write.c (localvar_alloc): Returns `void'.
18925 (localvar_free): Removed unused variable.
18927 * lang.c (OBJECT_SUFFIX): Define if not already defined.
18928 (init_parse): Use OBJECT_SUFFIX, not ".o".
18930 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
18932 * class.c (emit_register_classes): Renamed from
18933 emit_register_class.
18934 * java-tree.h (emit_register_classes): Prototype renamed from
18935 emit_register_class.
18936 * jcf-parse.c (yyparse): Call emit_register_classes once before
18938 * parse.y (java_expand_classes): No longer register classes.
18940 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
18942 * class.c (is_compiled_class): New local variable
18943 seen_in_zip. Identify classes found in currently compiled source
18945 * decl.c (complete_start_java_method): Fixed typo.
18946 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
18947 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
18948 (CLASS_P): Moved around.
18949 (java_parse_abort_on_error): Macro moved from jcf-parse.c
18950 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
18952 (jcf_parse_source): Changed leading comment. Removed unnecessary
18953 fclose and CLASS_FROM_SOURCE_P marking.
18954 (parse_source_file): New local variables remember_for_generation
18955 and filename. Mark parsed file name identifier node. Removed block
18956 executed when parse_only was null. Set remember_for_generation.
18957 Use it as an argument to java_pop_parser_context.
18958 (yyparse): New local variables several_files, list, next node and
18959 current_file_list. Split ampersand separated file names into
18960 current_file_list. Iterate through the list and parse accordingly.
18961 * parse.h (java_pop_parser_context): New function prototype.
18962 * parse.y (ctxp_for_generation): New static global variable.
18963 (java_pop_parser_context): New argument generate. Link popped ctxp
18964 to ctxp_for_generation list accordingly.
18965 (java_complete_expand_methods): Fixed indentation.
18966 (java_expand_classes): New function.
18968 1998-10-17 Per Bothner <bothner@cygnus.com>
18970 * Makefile.in: Link with libiberty.a instead of memmove.o.
18972 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
18974 * lex.c (setjmp.h): No longer included.
18975 * lex.h (setjmp.h): Included.
18976 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
18977 (duplicate_declaration_error_p): Renamed from
18978 duplicate_declaration_error.
18979 (build_array_from_name): New function prototype.
18980 * parse.y (setjmp.h): No longer included.
18981 (variable_declarator_id): Define action.
18982 (build_array_from_name): New function.
18983 (duplicate_declaration_error_p): Renamed from
18984 duplicate_declaration_error. Fixed leading comment.
18985 (register_fields): Main `for' loop reorganized. Uses
18986 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
18987 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
18988 build_array_from_name.
18989 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
18991 (read_import_dir): Don't try to skip `.' and `..'.
18992 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
18993 build_array_from_name. Main `for' loop reorganized.
18994 (resolve_qualified_expression_name): When building access to a
18995 field, use the type where the field was found, not its own type.
18996 (maybe_access_field): Use field DECL_CONTEXT if the type where the
18997 field was found is null.
18998 (qualify_ambiguous_name): Sweep through all successive array
19001 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
19003 * java-tree.h (pop_labeled_block, lang_printable_name,
19004 maybe_add_interface, set_super_info, get_access_flags_from_decl,
19005 interface_of_p, inherits_from_p, fix_classpath,
19006 complete_start_java_method, emit_handlers, init_outgoing_cpool,
19007 make_class_data, register_class, alloc_name_constant): New
19008 function prototypes.
19009 * lang.c (lang_decode_option): Set argc argument unused. Fixed
19010 indentation. Added cast to remove warning.
19011 (lang_printable_name): Set v argument unused.
19012 (lang_print_error): Added argument to lang_printable_name call.
19013 (java_dummy_print, print_lang_decl, print_lang_type,
19014 print_lang_identifier, lang_print_xnode): All argument marked
19016 * lex.c (java_unget_unicode): Removed unnecessary argument.
19017 (java_allocate_new_line): Unused local variable is gone.
19018 (java_read_char): Added parenthesis in expressions to remove
19019 warnings. Added final return statement.
19020 (java_read_unicode): Added parenthesis in expression to remove
19022 (java_parse_end_comment): Fixed java_unget_unicode invocation.
19023 (java_parse_escape_sequence): Likewise.
19024 (java_lex): Unused local variables are gone. Fixed
19025 java_unget_unicode invocation.
19026 * lex.h (set_float_handler): Prototype added when JC1_LITE not
19028 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19029 lang_printable_name invocation in macro.
19030 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19032 (duplicate_declaration_error): Suppressed unused argument in
19034 (identical_subpath_p): Function declaration is gone.
19035 (patch_invoke): Suppressed unused argument in prototype.
19036 (patch_cast, build_labeled_block, check_thrown_exceptions):
19038 * parse.y (setjmp.h): Included
19039 (toplev.h): Likewise.
19040 (field_declaration:): Suppressed unused local
19041 (label_decl:): Fixed build_labeled_block invocation.
19042 (java_pop_parser_context): Put extra parenthesis around assignment
19044 (yyerror): Suppressed unused local variables.
19045 (variable_redefinition_error): Fixed lang_printable_name
19047 (create_interface): Suppressed unused local variables.
19048 (create_class): Likewise.
19049 (duplicate_declaration_error): Suppressed unused argument. Fixed
19050 lang_printable_name invocation.
19051 (register_fields): Suppressed unused local variable. Fixed
19052 duplicate_declaration_error invocation.
19053 (method_header): Suppressed unused local variable.
19054 (method_declarator, parser_check_super): Likewise.
19055 (java_complete_class): Suppressed unused local variable. Fixed
19056 fatal error message.
19057 (complete_class_report_errors): Added default: in switch.
19058 (java_check_regular_methods): Fixed lang_printable_name
19060 (check_throws_clauses): Likewise.
19061 (java_check_abstract_methods): Suppressed unused local
19062 variable. Fixed lang_printable_name invocation.
19063 (read_import_entry): Added supplemental return statement.
19064 (read_import_dir): Suppressed unused local variables.
19065 (check_pkg_class_access, declare_local_variables): Likewise.
19066 (source_start_java_method): Suppressed unused extern variable
19068 (expand_start_java_method): Suppressed unused extern and local
19069 variable declarations.
19070 (java_complete_expand_methods): Likewise.
19071 (java_complete_expand_method): Suppressed unused local variables.
19072 (make_qualified_name): Likewise.
19073 (resolve_qualified_expression_name): Added default: in
19074 switch. Fixed lang_printable_name invocation.
19075 (class_instance_creation_expression): Added parenthesis around
19077 (patch_method_invocation_stmt): Fixed lang_printable_name and
19078 patch_invoke invocations.
19079 (check_for_static_method_reference): Fixed lang_printable_name
19081 (patch_invoke): Suppressed unused arguments and local variables.
19082 (lookup_method_invoke): Suppressed unused local variables.
19083 (qualify_ambiguous_name): Added default: in switch.
19084 (identical_subpath_p): Function removed.
19085 (patch_assignment): Suppressed unused local variables. Suppressed
19086 unnecessary if statement. Fixed lang_printable_name invocations.
19087 (try_builtin_assignconv): Fixed lang_printable_name invocations.
19088 (valid_ref_assignconv_cast_p): Parenthesis around
19089 expression. Suppressed unused local variables.
19090 (build_binop): Suppressed unused local variables. fixed
19091 lang_printable_name invocations.
19092 (string_constant_concatenation): Suppressed unused local
19094 (patch_unaryop): Fixed lang_printable_name invocation.
19095 (patch_cast): Suppressed unnecessary argument. Fixed
19096 lang_printable_name invocation.
19097 (patch_array_ref): Fixed lang_printable_name invocation.
19098 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19099 (build_labeled_block): Suppressed unused argument.
19100 (generate_labeled_block): Fixed build_labeled_block invocation.
19101 (build_loop_body): Suppressed unused local variables.
19102 (patch_loop_statement): Likewise.
19103 (patch_exit): Fixed lang_printable_name invocation.
19104 (patch_switch_statement): Likewise.
19105 (case_identity): First argument marked unused.
19106 (patch_try_statement): Fixed lang_printable_name invocations.
19107 (patch_synchronized_statement, patch_throw_statement): Likewise.
19108 (check_thrown_exceptions): Fixed check_thrown_exceptions and
19109 lang_printable_name invocations.
19110 (check_thrown_exceptions_do): Suppressed unused argument.
19112 1998-10-14 Tom Tromey <tromey@cygnus.com>
19114 * jcf-write.c (write_classfile): Add output class file as target.
19115 * lang-options.h: Added -MD, -MMD, -M, and -MM.
19116 * jcf.h: Added declarations for dependency-tracking functions.
19117 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19118 * lang.c (lang_decode_option): Recognize -MD and -MMD.
19119 (finish_parse): Call jcf_dependency_write.
19120 (dependency_tracking): New global.
19121 (DEPEND_SET_FILE): New define.
19122 (DEPEND_ENABLE): New define.
19123 (init_parse): Enable dependency tracking if required.
19125 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19126 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19127 (../gcjh$(exeext)): Likewise.
19128 (jcf-depend.o): New target.
19129 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19130 (GCJH_SOURCES): Likewise.
19131 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
19133 (find_classfile): Added dep_name argument.
19134 (find_class): Compute name of dependency.
19135 (open_in_zip): Call jcf_dependency_add_file.
19136 * gjavah.c (output_file): No longer global.
19137 (usage): Don't mention "gjavah".
19139 (java_no_argument): Likewise.
19140 (version): Likewise.
19141 (main): Recognize and handle -M family of options.
19142 (print_mangled_classname): Return is void.
19143 (process_file): Handle case where output is suppressed.
19144 (HANDLE_END_FIELD): Likewise.
19145 (HANDLE_METHOD): Likewise.
19146 * jcf-depend.c: New file.
19148 1998-10-13 Jeffrey A Law (law@cygnus.com)
19150 * java-tree.def: Add missing newline at EOF.
19152 1998-10-13 Tom Tromey <tromey@cygnus.com>
19154 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19155 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
19157 Include <config.h> and "system.h".
19158 (disassemble_method): Undefine RET to avoid clash with
19159 config/i386/i386.h.
19161 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
19163 * decl.c (runtime_exception_type_node, error_exception_type_node):
19164 New global variables.
19165 (init_decl_processing): Initialized.
19166 * expr.c (java_lang_expand_expr): Set caught exception type to
19167 null if catch handler argument doesn't exit.
19168 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19170 * java-tree.h (runtime_exception_type_node,
19171 error_exception_type_node): Global variables declared.
19172 (DECL_FUNCTION_THROWS): New macro.
19173 (DECL_FUNCTION_BODY): Modified comment.
19174 (DECL_SPECIFIC_COUNT): Likewise.
19175 (struct lang_decl): New field throws_list.
19176 (IS_UNCHECKED_EXPRESSION_P): New macro.
19177 * lex.c (java_lex): Generate location information for THROW_TK.
19178 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19179 EXCEPTIONS_P): New macros.
19180 (enum jdep_code): New value JDEP_EXCEPTION.
19181 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19182 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19183 PATCH_METHOD_RETURN_ERROR): New macros.
19184 (patch_method_invocation_stmt): Added new argument to prototype.
19185 (patch_synchronized_statement, patch_throw_statement,
19186 check_thrown_exceptions, check_thrown_exceptions_do,
19187 purge_unchecked_exceptions, check_throws_clauses): New function
19189 * parse.y Fixed typo in keyword section.
19190 (throw:): Rule tagged <node>.
19191 (THROW_TK): Keyword tagged <operator>.
19192 (method_header:): Last argument to call to method_header passed
19194 (throws:, class_type_list:, throw_statement:,
19195 synchronized_statement:, synchronized:): Defined actions.
19196 (method_header): New local variable current. Register exceptions
19197 from throws clause.
19198 (java_complete_tree): Complete and verify exceptions from throws
19200 (complete_class_report_errors): Error message on exceptions not
19202 (java_check_regular_methods): Fixed typo. Shortcut on private
19203 overriding methods. Changed error message on method
19204 redefinition. Check for throws clause compatibility.
19205 (check_throws_clauses): New function.
19206 (java_check_abstract_methods): Use DECL_NAME for wfl or current
19207 method. Changed error message on method redefinition.
19208 (currently_caught_type_list): New static variable.
19209 (java_complete_expand_methods): Purge unchecked exceptions from
19210 throws clause list. Call PUSH_EXCEPTIONS before walk and
19211 POP_EXCEPTIONS after.
19212 (resolve_qualified_expression_name): Pass new argument as NULL to
19213 patch_method_invocation_stmt.
19214 (patch_method_invocation_stmt): New argument ref_decl. Invoke
19215 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19216 argument list when appropriate. Use new argument if non null to
19217 store selected method decl.
19218 (patch_invoke): Convert if necessary args of builtin types before
19219 forming CALL_EXPR. Argument list no longer reversed here.
19220 (invocation_mode): Treat final methods as static methods.
19221 (java_complete_tree): New cases for THROW_EXPR: and
19222 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19224 (complete_function_arguments): No more RECORD_TYPE
19225 conversion. Function parameter nodes no longer saved.
19226 (valid_ref_assignconv_cast_p): Avoid handling null type.
19227 (patch_binop): Fixed null constant reference handling.
19228 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19229 BUILD_THROW macros.
19230 (patch_try_statement): Fixed comments. Record caught types in
19231 list, push the list, expand try block and pop the list.
19232 (patch_synchronized_statement, patch_throw_statement,
19233 check_thrown_exceptions, check_thrown_exceptions_do,
19234 purge_unchecked_exceptions): New functions.
19235 * typeck.c (lookup_argument_method): Allow WFL in place of method
19236 DECL_NAME during method definition check
19238 1998-10-09 Tom Tromey <tromey@cygnus.com>
19240 * gjavah.c (decode_signature_piece): New function.
19241 (print_c_decl): Use it. Added `name_override' argument.
19242 (print_method_info): Use name_override argument to print_c_decl.
19243 (seen_fields): Removed.
19244 (print_field_info): Don't update seen_fields.
19245 (struct method_name): New structure.
19246 (method_name_list): New global.
19247 (print_method_info): Add new method to list of methods.
19248 (name_is_method_p): New function.
19249 (print_field_info): If field name has same name as method, then
19251 (process_file): Parse methods before fields.
19252 (field_pass): New global.
19253 (HANDLE_END_FIELD): Take field_pass into account.
19255 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19257 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19258 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19260 1998-10-03 Anthony Green <green@cygnus.com>
19262 * jvspec.c: Fix bug in jvgenmain_spec patch.
19264 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19266 * Makefile.in (lang.o:): Install dependency on java-tree.def.
19267 * decl.c (soft_exceptioninfo_call_node): New global variable.
19268 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19269 takes extra integer argument. soft_exceptioninfo_call_node
19271 * except.c (java_set_exception_lang_code): New function
19272 (method_init_exceptions): Called here.
19273 (prepare_eh_table_type): New function.
19274 (expand_end_java_handler): Called here.
19275 * expr.c (build_java_throw_out_of_bounds_exception): Now features
19276 one argument. Modified generation of call to
19277 soft_badarrayindex_node to use new argument.
19278 (build_java_arrayaccess): Pass faulty index value to
19279 build_java_throw_out_of_bounds_exception.
19280 (generate_name): New function.
19281 (java_lang_expand_expr): New local variables node, current,
19282 has_finally_p. Expand TRY_EXPR node.
19283 (process_jvm_instruction): Replace top of the stack with thrown
19284 object reference when entering exception handler.
19285 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19286 specific tree codes.
19287 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19289 (DECL_SPECIFIC_COUNT): New macro.
19290 (prepare_eh_table_type, java_set_exception_lang_code,
19291 generate_name): New function declarations.
19292 (match_java_method): Declaration deleted.
19293 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19295 * lex.c (TRY_TK, CATCH_TK): Generate location information.
19296 * parse.h (redefinition_error, refine_accessible_methods_list,
19297 can_cast_to_p): Function declaration removed.
19298 (classitf_redefinition_error, variable_redefinition_error,
19299 parse_jdk1_1_error, find_applicable_accessible_methods_list,
19300 find_most_specific_methods_list, argument_types_convertible,
19301 enter_a_block, valid_builtin_assignconv_identity_widening_p,
19302 valid_cast_to_p, valid_method_invocation_conversion_p,
19303 try_reference_assignconv, add_stmt_to_compound,
19304 build_jump_to_finally, build_tree_list, patch_try_statement,
19305 java_get_catch_block): New function declarations.
19306 * parse.y (string_buffer_type): Global variable deleted.
19307 (group_of_labels, catches, catch_clause, catch_clause_parameter,
19308 finally): Rules tagged <node>.
19309 (TRY_TK, CATCH_TK): Token tagged <operator>.
19310 (class_body_declaration:, class_member_declaration:,
19311 formal_parameter:, explicit_constructor_invocation:,
19312 interface_member_declaration:, constant_declaration:,
19313 primary_no_new_array:, class_instance_creation_expression:,
19314 array_creation_expression:): Issue error on unsuported JDK1.1
19316 (try_statement:, catches:, finally:): Define actions.
19317 (catch_clause_parameter): New rule.
19318 (catch_clause:): Use new rule catch_clause_parameter.
19319 (parse_jdk1_1_error): New function.
19320 (redefinition_error): Renamed classitf_redefinition_error.
19321 (variable_redefinition_error): New function.
19322 (check_class_interface_creation): Call
19323 classitf_redefinition_error.
19324 (java_complete_tree): Added error message on JDEP_TYPE: case.
19325 (complete_class_report_errors): Fixed indentation.
19326 (declare_local_variables): Call variable_redefinition_error.
19327 (source_end_java_method): Call java_set_exception_lang_code and
19328 emit_handlers where appropriate.
19329 (java_method_add_stmt): Call add_stmt_to_block.
19330 (add_stmt_to_block): New function.
19331 (lookup_method_invoke): Fixed outside comment. new local variable
19332 candicates. Call find_applicable_accessible_methods_list and
19333 find_most_specific_methods_list when searching for a
19334 method. Modified error report to list possible candidates when
19336 (find_applicable_accessible_methods_list,
19337 find_most_specific_methods_list, argument_types_convertible): New
19339 (refine_accessible_methods_list): Function deleted.
19340 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19341 expr (if applicable) before calling patch_array_ref.
19342 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19343 (enter_block): Fixed comment.
19344 (enter_a_block): New function.
19345 (patch_assignment): Reorganized. Call try_reference_assignconv for
19346 references. Call valid_cast_to_p instead of can_cast_to_p.
19347 (try_reference_assignconv,
19348 valid_builtin_assignconv_identity_widening_p): New functions.
19349 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19350 (valid_cast_to_p, valid_method_invocation_conversion_p): New
19352 (build_string_concatenation): Don't resolve StringBuffer.
19353 (patch_cast): Fixed inverted arguments.
19354 (patch_array_ref): Code to save array expr deleted. Call
19355 valid_cast_to_p instead of can_cast_to_p.
19356 (generate_labeled_block): Call generate_name.
19357 (build_jump_to_finally, build_try_statement, java_get_catch_block,
19358 patch_try_statement): New functions.
19359 * typeck.c (match_java_method): Function deleted.
19361 1998-10-02 Anthony Green <green@cygnus.com>
19363 * jvspec.c: jvgenmain_spec uses different temporary file names.
19365 1998-10-02 Anthony Green <green@cygnus.com>
19367 * jvspec.c (lang_specific_driver): Fail if user specifies
19368 --main= when not linking.
19370 1998-09-28 Tom Tromey <tromey@cygnus.com>
19372 * class.c (make_class_data): Push value for `thread' field.
19373 * decl.c (init_decl_processing): Added `thread' field to class.
19375 * class.c (add_field): Always make static fields externally
19378 1998-09-26 Anthony Green <green@cygnus.com>
19380 * expr.c (build_java_athrow,
19381 build_java_throw_out_of_bounds_exception, expand_invoke,
19382 build_newarray, expand_java_multianewarray, build_java_monitor):
19383 Update comments to reflect _Jv_* function names.
19385 1998-09-25 Per Bothner <bothner@cygnus.com>
19387 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
19388 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
19389 * parse.y (expand_start_java_method): Likewise.
19391 1998-09-24 Per Bothner <bothner@cygnus.com>
19393 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
19395 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19396 (add_field): No longer need to convert from RECORD_TYPE to pointer,
19397 * expr.c: Remove no-longer-needed calls to promote_type.
19398 * decl.c (give_name_to_locals): Liekwise.
19399 * jcf-parse.c (get_class_constant): Compensate for new signatures.
19400 * parse.y: Add/remove promote_type calls as appropriate.
19401 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
19402 (parse_signature_string): Likewise.
19403 (build_java_array_type): Fix for now signature convenions.
19405 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
19407 1998-09-23 Tom Tromey <tromey@cygnus.com>
19409 * class.c (init_class_processing): libjava function renamed to
19412 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
19414 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19415 * java-tree.def: Fixed DEFTREECODE third argument.
19416 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
19417 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
19418 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19419 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19420 JAVA_THIS_EXPR): Now replaced by tree code definitions.
19421 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19422 * lang.c (java_tree_code_type, java_tree_code_length,
19423 java_tree_code_name): New arrays.
19424 (lang_init): Append Java tree node definitions to Gcc ones.
19425 * lex.c (expression_obstack): Declared as extern when JC1_LITE
19427 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
19429 (java_lex): Allow declaration of empty string constants. Retain
19430 location information on CASE_TK and DEFAULT_TK.
19431 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
19432 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19433 Modified to be more robust.
19434 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19435 (build_new_invocation, try_builtin_assignconv,
19436 patch_switch_statement, string_constant_concatenation,
19437 build_string_concatenation, patch_string_cst, patch_string,
19438 java_expand_switch): New function declarations.
19439 * parse.y: Rules related to switch and EH tagged <node>.
19440 (label_id): Set to NULL_TREE
19441 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
19443 (this_or_super:): Fixed indentation.
19444 (statement:, statement_nsi:, statement_without_trailing_substatement:,
19445 statement_expression:): Removed call to RULE on all sub-rules.
19446 (switch_expression:, switch_labels:): New rules.
19447 (switch_statement:, switch_block:, switch_block_statement_groups:,
19448 switch_block_statement_group:, switch_labels:, switch_label:):
19450 (throw_statement:, synchronized_statement:, try_statement:):
19451 Defined temporary actions.
19452 (class_instance_creation_expression:): Call
19453 build_new_invocation. Fixed indentation.
19454 (field_access): Fixed indentation.
19455 (method_invocation): Likewise.
19456 (make_qualified_primary): Use THIS_EXPR.
19457 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
19458 resolving from SUPER, set *type_found.
19459 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19460 (java_complete_tree): Removed unused local variable `location'. Case
19461 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19462 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19463 on MODIFY_EXPR: and all binary operator tree code cases. Removed
19464 STRING_CST: case. default: checks for patchable strings.
19465 (complete_function_arguments): Transform string constant or
19466 crafted StringBuffer if necessary.
19467 (build_method_invocation): Fixed comments.
19468 (build_new_invocation): New function.
19469 (patch_assignment): Call try_builtin_assignconv to figure a valid
19470 assignment conversion between builtin types.
19471 (try_builtin_assignconv): New function.
19472 (build_binop): Use URSHIFT_EXPR directly to call build.
19473 (operator_string): Use UNARY_PLUS_EXPR.
19474 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
19476 (do_merge_string_cste, merge_string_cste,
19477 string_constant_concatenation, build_string_concatenation,
19478 patch_string, patch_string_cst): New function.
19479 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19480 (patch_unaryop): Likewise. New test of valid ++/-- operands.
19481 (build_newarray_node): Use NEW_ARRAY_EXPR.
19482 (build_this): Use THIS_EXPR.
19483 (build_return): Enable debug information on return statement.
19484 (build_if_else_statement): Likewise.
19485 (complete_labeled_statement): Fixed related comment.
19486 (build_loop_body): Fixed comment.
19487 (build_bc_statement): Enable debug information on break/continue
19489 (patch_bc_statement): Fixed typos. Handle SWITCH statement
19491 (patch_switch_statement, case_identity, java_expand_switch): New
19494 1998-09-21 Per Bothner <bothner@cygnus.com>
19496 * buffer.h (BUFFER_INIT): New macro.
19497 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
19498 Pass (struct jcf_partial *state) to most functions.
19499 (jcf_block, jcf_relocation): New types.
19500 Support labels, branches, conditionals, loops.
19502 1998-09-21 Tom Tromey <tromey@cygnus.com>
19504 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19506 1998-09-21 Per Bothner <bothner@cygnus.com>
19508 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
19509 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
19510 not integer_type_node (INT_TYPE_SIZ bits).
19512 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
19514 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
19515 * jcf-dump.c (print_exception_table): New function.
19516 (disassemble_method): Better handling of wide instructions.
19517 Make more robust for bad input.
19519 1998-09-30 Jeffrey A Law (law@cygnus.com)
19521 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19524 1998-09-17 Jeffrey A Law (law@cygnus.com)
19526 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19528 1998-09-17 Tom Tromey <tromey@cygnus.com>
19530 * Makefile.in ($(PARSE_H)): Removed target.
19532 1998-09-17 Jeffrey A Law (law@cygnus.com)
19534 * Makefile.in (JAVA_OBJS): Add memmove.o
19535 (memmove.o): New target & rules.
19537 1998-09-15 Tom Tromey <tromey@cygnus.com>
19539 * expr.c (expand_invoke): Don't generate a call to the class init
19542 1998-09-14 Jeffrey A Law (law@cygnus.com)
19544 * Makefile.in: Add many missing dependencies.
19545 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
19547 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
19548 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
19550 1998-09-11 Per Bothner <bothner@cygnus.com>
19552 * decl.c (complete_start_java_method): If method is static (and
19553 not private) call _Jv_InitClass.
19554 * expr.c (expand_invoke): Don't call build_class_init.
19556 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
19558 1998-09-10 Jeffrey A Law (law@cygnus.com)
19560 * Make-lang.in (GCJ): Define before using.
19562 1998-09-09 Jeffrey A Law (law@cygnus.com)
19564 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
19565 losing due to namespace pollution in GNU getopt.h
19567 1998-09-09 Tom Tromey <tromey@cygnus.com>
19569 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
19570 (java.all.cross): Likewise.
19571 (java.rest.encap): Likewise.
19573 1998-09-08 Jeffrey A Law (law@cygnus.com)
19575 * gjavah.c (print_class_decls): Fix thinko in arglist
19576 * jcv-io.c (find_classfile): Similarly.
19578 1998-09-07 Jeffrey A Law (law@cygnus.com)
19580 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
19582 1998-09-05 Tom Tromey <tromey@cygnus.com>
19584 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
19585 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
19586 * Makefile.in (PARSE_C): New macro.
19587 (PARSE_H): Likewise.
19588 (PARSE_SCAN_C): Likewise.
19589 ($(PARSE_C)): Target renamed from parse.c.
19590 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
19591 (clean): Remove parse-scan.c as well.
19592 (parse.o): Depend on $(PARSE_C).
19594 1998-09-05 Anthony Green <green@cygnus.com>
19596 * README, license.terms: Removed.
19598 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
19599 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
19600 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
19601 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
19602 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
19603 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
19604 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
19605 and Java trademark attribution.
19607 1998-09-04 Tom Tromey <tromey@cygnus.com>
19609 * Makefile.in: Use gcjh, not gjavah.
19610 * config-lang.in (stagestuff): Use gcjh, not gjavah.
19611 * Make-lang.in: Changed gjavah to gcjh everywhere.
19613 1998-09-03 Per Bothner <bothner@cygnus.com>
19615 * gjavah.c: Support new -prepend -add -append flags.
19616 (print_method_info): Method is not virtual if class is final.
19618 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
19620 * jv-scan.c: Fixed copyright assignment.
19621 * keyword.gperf: Likewise.
19622 * keyword.h: Likewise.
19623 * lex.c: Fixed copyright assignment.
19624 (java_lex): Push unicode back when parsing '<'.
19625 * lex.h: Fixed copyright assignment.
19626 * parse-scan.y: Likewise.
19627 * parse.h: Fixed copyright assignment.
19628 (build_debugable_stmt, complete_for_loop): New function prototypes.
19629 * parse.y: Fixed copyright assignment.
19630 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
19631 size_zero_node when completing a loop with no exit condition.
19632 (for_statement_nsi:): Define action.
19633 (for_init:, for_update:): Return size_zero_node when empty.
19634 (declare_local_variables): Call build_debugable_stmt.
19635 (build_debugable_stmt): New function.
19636 (build_loop_body): Build debugable statement around loop
19638 (complete_loop_body): Take into account the debugable statement
19639 around the EXIT_EXPR.
19640 (complete_loop_body): New function.
19641 (patch_exit_expr): Fixed condition inversion.
19643 1998-09-02 Tom Tromey <tromey@cygnus.com>
19645 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
19646 name of thread define.
19647 * jvspec.c (THREAD_NAME): New macro.
19649 (THREADLIB): Likewise.
19650 (lang_specific_driver): Recognize attempt to link with thread
19651 library or gc library. Recognize -ljava on command line so it
19652 isn't linked against more than once.
19654 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19656 * parse-scan.y (report_main_declaration): Name of the class
19657 containing `main' can be a qualified name.
19659 1998-08-31 Tom Tromey <tromey@cygnus.com>
19661 * config-lang.in: Changed gjavac to gjc everywhere.
19662 * Make-lang.in: Changed gjavac to gjc everywhere.
19664 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
19666 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
19667 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
19668 and install the files.
19669 * Makefile.in (JAVA_OBJS_LITE): New variable.
19670 (compiler:): Now include jv-scan as a dependency.
19671 (../jv-scan$(exeext), parse-scan.c): New targets.
19672 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
19673 * config-lang.in (compilers): Removed gcj, gjavah from the list.
19674 * jcf-parse.c (parse_source_file): Call java_layout_classes and
19675 check for errors even if parse_only.
19676 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
19678 (yylex): New function. Uses java_lex body.
19679 (java_lex): Removed commented out statement. Remove local variable
19680 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
19681 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
19682 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
19683 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
19684 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
19685 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
19687 (java_lex_error): Empty if JC1_LITE is defined.
19688 (java_get_line_col): Return 0 if JC1_LITE is defined.
19689 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
19690 SET_MODIFIER_CTX): Moved into the section containing the macros
19691 conditionally defined by JC1_LITE.
19692 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
19693 argument if JC1_LITE is defined.
19694 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
19695 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
19697 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
19698 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
19699 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
19700 to different values according to JC1_LITE.
19701 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
19702 declared if JC1_LITE set.
19703 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
19704 defined if JC1_LITE not set.
19705 (struct parser_ctx): Reorganized and skip the jc1 front end part
19707 (java_layout_classes): New function definition.
19708 (java_push_parser_context, java_init_lex, yyparse, yylex,
19709 yyerror): Prototype always declared. All other static function
19710 prototypes declared only if JC1_LITE is not set.
19711 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
19712 declared in parse.h.
19713 (java_layout_classes): New function.
19714 (java_complete_expand_methods): No longer layout the class here.
19715 * parse-scan.y: New file.
19716 * jv-scan.c: New file.
19718 1998-08-25 Tom Tromey <tromey@cygnus.com>
19720 * gjavah.c (main): Handle -friend option.
19721 (friend_specs): New global.
19722 (generate_access): Handle friend_specs.
19723 (process_file): Likewise.
19724 (MAX_FRIENDS): New macro.
19725 (friend_count): New global.
19726 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
19727 Changed all callers.
19729 1998-08-24 Per Bothner <bothner@cygnus.com>
19731 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
19732 (main): Handle processing all the entries of a named .zip archive.
19733 * jcf-io.c (jcf_trim_old_input): New function.
19734 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
19736 1998-08-24 Per Bothner <bothner@cygnus.com>
19738 * lang.c (flag_assume_compiled): Make default be on.
19740 1998-08-21 Per Bothner <bothner@cygnus.com>
19742 * jcf-dump.c: Add bunches of flags to control output more.
19743 (process_class): New function; support printing more than one class.
19744 (main): Support new --print-main and --javap flags.
19745 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
19746 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
19748 1998-08-20 Per Bothner <bothner@cygnus.com>
19750 Change mangling of dispatch table to match C++ vtable (w/thunks).
19751 * class.c (build_dtable_decl), java-tree.h: New function.
19752 (make_class_data): Call it.
19753 * decl.c (init_decl_processing): Likewise.
19755 1998-08-19 Warren Levy <warrenl@cygnus.com>
19757 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
19758 soft_anewarray; adjust args passed.
19759 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
19760 match _Jv_NewObjectArray.
19762 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
19764 * decl.c (push_labeled_block, pop_labeled_block): New functions.
19765 * expr.c (loopup_label): Call create_label_decl.
19766 (create_label_decl): New function.
19767 (java_lang_expand_expr): Call expand_start_bindings with argument
19769 * java-tree.h Added space after PROTO in function declarations
19771 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
19772 (create_label_decl, push_labeled_block): New function
19774 * lex.c (label_id): Initialize.
19775 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
19777 * parse.h Added space after PROTO in function declarations when
19779 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
19780 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
19781 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
19782 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
19784 (struct parser_ctxt): New fields current_loop,
19785 current_labeled_block.
19786 (build_if_else_statement, patch_if_else_statement,
19787 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
19788 generate_labeled_block, complete_labeled_statement,
19789 build_bc_statement, patch_bc_statement, patch_loop_statement,
19790 build_new_loop, build_loop_body, complete_loop_body): New function
19792 * parse.y (java_warning_count): New global variable.
19793 (label_id): New static variable.
19794 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
19795 (block:): Return size_zero_node when block is empty.
19796 (empty_statement:): Return size_zero_node.
19797 (statement:): Implement supplemental action when for_statement: is
19799 (label_decl:): New rule.
19800 (labeled_statement:): Rewritten using label_decl. Actions
19802 (labeled_statement_nsi:): Likewise.
19803 (if_then_statement): Actions implemented.
19804 (while_expression): New rule.
19805 (while_statement:): Rewritten using while_expression. Actions
19807 (while_statement_nsi:): Likewise.
19808 (do_statement_begin:): New rule.
19809 (do_statement:): Rewritten using do_statement_begin. Actions
19811 (for_statement:): Rewritten using for_begin. Actions implemented.
19812 (for_statement_nsi:): Likewise.
19813 (for_header:, for_begin:): New rules.
19814 (for_init:): Actions implemented.
19815 (statement_expression_list:, break_statement:,
19816 continue_statement:): Likewise.
19817 (yyerror): Count number of issued warning(s).
19818 (java_report_errors): Report error(s) and/or warning(s).
19819 (java_complete_class): Use build_java_argument_signature to
19820 recompute completed method signature.
19821 (java_check_regular_methods): New locals method_wfl and aflags.
19822 Use method_wfl instead of lookup_cl during error reports. Fixed
19823 indentation and modified some error messages. Use
19824 lang_printable_name in method instead of the DECL_NAME. New code
19825 to issue warnings on methods not overriding corresponding methods
19826 private to a different package.
19827 (java_method_add_stmt): Call add_stmt_to_compound.
19828 (add_stmt_to_compound): New function.
19829 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
19830 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
19831 (build_if_else_statement, patch_if_else_statement,
19832 build_labeled_block, generate_labeled_block,
19833 complete_labeled_statement, build_new_loop, build_loop_body,
19834 complete_loop_body, patch_loop_statement, build_bc_statement,
19835 patch_bc_statement, patch_exit_expr): New functions.
19836 * typeck.c (build_java_signature): Build argument signature before
19837 enclosing it in between parenthesis.
19839 1998-08-17 Warren Levy <warrenl@cygnus.com>
19841 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
19842 (JAVA_OBJS): Added reminder comment
19844 1998-08-13 Nick Clifton <nickc@cygnus.com>
19846 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
19847 be interpreted as a long long.
19849 1998-08-13 Warren Levy <warrenl@cygnus.com>
19851 * decl.c (init_decl_processing): Use _Jv_InitClass, not
19852 soft_initialise_class. Use _Jv_NewMultiArray, not
19853 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
19854 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
19855 _Jv_CheckArrayStore, not soft_checkarraystore. Use
19856 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
19858 1998-08-12 Per Bothner <bothner@cygnus.com>
19860 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
19861 length_identifier_node): New global tree node constants.
19862 * parse.y (kw_super, kw_this, kw_length): Removed globals.
19863 Replace uses by super_identifier_node etc.
19864 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
19866 * parse.y (resolve_field_access): Don't special-case ".length" if
19867 flag_emit_class_files.
19868 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
19869 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
19872 1998-08-11 Per Bothner <bothner@cygnus.com>
19874 * decl.c (init_decl_processing): Remove unused method_type_node fields.
19875 * class.c (make_method_value): Remove init for removed fields.
19877 * class.c (layout_class): Use build_java_argument_signature.
19878 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
19880 * typeck.c (push_java_argument_signature): Removed. Merged into ...
19881 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
19882 (build_java_signature): Don't use push_java_argument_signature.
19884 * typeck.c (lookup_argument_method): New function.
19885 * parse.y (java_check_regular_methods): Use lookup_argument_method
19886 instead of lookup_java_method2 followed by lookup_java_method.
19888 * parse.y (check_method_redefinition): Minor optimization.
19890 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
19891 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
19893 1998-08-10 Tom Tromey <tromey@cygnus.com>
19895 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
19898 * gjavah.c (java_float_finite): Use K&R-style definition.
19899 (java_double_finite): Likewise.
19900 (generate_access): Now returns void. Changed all callers.
19901 (last_access_generated): Removed.
19902 (process_file): Only make a single pass over the .class file.
19904 1998-07-29 Per Bothner <bothner@cygnus.com>
19906 * class.c (get_dispatch_table): Add extra dummy vtable entry,
19907 for compatibility for G++ (with -fvtable-thunks).
19908 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
19910 * gjavah.c (process_file): Use public inheritance for super-class.
19912 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
19914 * lex.c (java_init_lex): Initialize ctxp->package.
19915 * parse.h (struct parser_ctxt): package and package_len replaced
19916 by tree package, an identifier node. Field method_decl_list is
19917 gone. Fixed comments.
19918 (lookup_field_wrapper, merge_qualified_name, not_accessible,
19919 class_in_current_package): New function prototypes.
19920 * parse.y (array_type:): Set class loaded flag on primitive type
19922 (package_declaration:): Assign ctxp->package to the
19924 (method_invocation:): Handle invocation of method qualified by
19926 (single_type_import_declaration:): Removed ambiguity check.
19927 (java_pop_parser_context): New local variable `next'. Reset and
19928 set IMPORT_CLASSFILE_NAME flags on current and previous import
19930 (java_accstring_lookup): Use new local macro COPY_RETURN.
19931 (lookup_field_wrapper): New function.
19932 (parser_qualified_classname): Use merge_qualified_name.
19933 (parser_check_super_interface): Broaden error message.
19934 (do_resolve_class): Check for qualified class name in the current
19935 compilation unit if appropriate.
19936 (process_imports): Check for already defined classes.
19937 (check_pkg_class_access): Got rid of call to
19938 get_access_flags_from_decl.
19939 (java_complete_expand_methods): Call safe_layout_class based on
19940 the current class size.
19941 (make_qualified_primary): Build a WFL qualification on primary if
19943 (merge_qualified_name): New function.
19944 (make_qualified_name): Use merge_qualified_name.
19945 (resolve_expression_name): Use safe_lookup_field.
19946 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
19947 (resolve_qualified_expression_name): Likewise. Check on resolved
19948 element accessibility.
19949 (not_accessible_p, class_in_current_package): New functions.
19950 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
19951 (patch_method_invocation_stmt): Merged common pieces. Check
19952 accessibility of invoked method.
19953 (check_for_static_method_reference): Add returned type in error
19955 (invocation_mode): Get rid of bogus check on PRIVATE methods.
19956 (refine_accessible_methods_list): Merged two conditions in test.
19957 (java_complete_class): Sanity check on stabilize_ref gone.
19958 * zextract.c (read_zip_archive): Cast lseek second argument to long.
19960 1998-07-28 Per Bothner <bothner@cygnus.com>
19962 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
19964 1998-07-24 Tom Tromey <tromey@cygnus.com>
19966 * gjavah.c (F_NAN): Removed.
19967 (F_NAN_MASK): New macro.
19968 (F_POSITIVE_INFINITY): Removed.
19969 (F_NEGATIVE_INFINITY): Likewise.
19970 (java_float_finite): Rewrote.
19971 (D_NAN_MASK): Renamed.
19972 (java_double_finite): Rewrote.
19973 (D_POSITIVE_INFINITY): Removed.
19974 (D_NEGATIVE_INFINITY): Likewise.
19976 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
19977 If verbose, print underlying representation of value in hex.
19979 1998-07-24 Per Bothner <bothner@cygnus.com>
19981 * buffer.h, buffer.c: New files.
19982 * Makefile.in (JAVA_OBJS): Add buffer.o.
19984 Support locals variables and writing their debug entries to .class.
19985 * jcf-write.c: Simplify some by user new buffer type.
19986 (vode_buffer_grow): Removed.
19987 (struct localvar_info): New type.
19988 (localsvars, localvartable): New buffers.
19989 (localvar_alloc, localvar_free): New functions.
19990 (generate_bytecode_insns): Handle local variables.
19991 (generate_classfile): Write LocalVariableTable attribute.
19993 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
19995 * jcf-io.c (open_in_zip): Check the zipfile magic number.
19996 * zipfile.h (ZIPMAGIC): New macro.
19998 1998-07-24 Tom Tromey <tromey@cygnus.com>
20000 * Makefile.in (gjavah.o): Updated dependencies.
20001 (jcf-dump.o): Likewise.
20002 (all.indirect): Use ../gjavah.
20003 (../gjavah$(exeext)): Likewise.
20004 (clean): Don't remove gjavah.
20005 (clean): Remove parse.c, not java/parse.c.
20006 * Make-lang.in (java): Added gjavah.
20007 (gjavah$(exeext)): New target.
20008 (GJAVAH_SOURCES): New macro.
20009 (java.all.build): Added gjavah.
20010 (java.all.cross): Likewise.
20011 (java.rest.encap): Likewise.
20012 * config-lang.in (compilers, stagestuff): Added gjavah.
20014 1998-07-23 Tom Tromey <tromey@cygnus.com>
20016 * gjavah.c (java_float_finite): New function.
20017 (java_double_finite): Likewise.
20018 (F_POSITIVE_INFINITY): New macro.
20019 (F_NEGATIVE_INFINITY): Likewise.
20021 (D_POSITIVE_INFINITY): Likewise.
20022 (D_NEGATIVE_INFINITY): Likewise.
20024 (print_field_info): Use java_float_finite and java_double_finite.
20026 1998-07-23 Per Bothner <bothner@cygnus.com>
20028 * parse.y (method_header): Name "this" implicit argument.
20030 1998-07-22 Per Bothner <bothner@cygnus.com>
20032 * jcf-write.c: Write out LineNumberTable attribute in .class file.
20033 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
20034 (put_linenumber): New function.
20035 (generate_bytecode_insns, generate_classfile): Write line numbers.
20037 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
20039 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20040 (lookup_name, build_known_method_ref, build_class_init,
20041 build_invokevirtual, invoke_build_dtable, match_java_method,
20042 build_field_ref, pushdecl_force_head, build_java_binop,
20043 binary_numeric_promotion, build_decl_no_layout,
20044 build_java_arrayaccess, build_newarray, build_anewarray,
20045 build_java_array_length_access, build_java_arraynull_check): New
20046 extern function prototypes.
20047 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20048 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20050 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20052 * jcf.h (jcf_out_of_synch): New extern function prototype.
20053 * parse.h: Static/global function implemented in parse.y
20054 prototyped and declarations moved at the end of the file.
20055 (DECL_P): Check that the argument isn't null.
20056 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20057 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20058 (QUAL_DECL_TYPE): New macro.
20059 (PARAMS): Macro definition removed.
20060 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20061 (return_statement:): Call build_return.
20062 (field_access:): Call make_qualified_primary in sub rule.
20063 (method_invocation:): Build method invocation and call
20064 make_qualified_primary when processing primaries.
20065 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20066 get_type_from_signature.
20067 (java_check_regular_method): Extra integer 0 argument when calling
20068 lookup_java_method2.
20069 (lookup_java_interface_method2): Extra method DECL argument when
20070 calling lookup_java_interface_method2.
20071 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20072 COMPOUND_EXPR node.
20073 (java_complete_expand_method): Layout current class iff not
20074 already done. Don't process interface's methods.
20075 (java_complete_expand_method): Use super class only if it
20076 exists. Use current class otherwise.
20077 (make_qualified_primary): New function.
20078 (resolve_expression_name): Process qualified expression or
20079 expression from primary the same way.
20080 (resolve_expression_name): Two last arguments to
20081 resolve_field_access are now NULL_TREEs.
20082 (resolve_field_access): New variable is_static. Local field must
20083 be DECLs. is_static computed on field DECLs only. Append code in
20084 where_found to the field access if necessary. Use QUAL_DECL_TYPE
20085 to initialize field_type.
20086 (resolve_qualified_expression_name): New local variable,
20087 previous_call_static and is_static. Handle primaries with function
20088 calls, casts, array references and `this'. `super' now handled as
20089 `(super_class)this'. Use is_static to clarify boolean expressions.
20090 Added code to handle case where a proper handle is required to
20091 access a field. Use QUAL_DECL_TYPE where applicable.
20092 (maybe_access_field): New function.
20093 (patch_method_invocation_stmt): New arguments primary, where,
20094 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20095 deleted. Use `where' as a type to search from if specified. Check
20096 for static method reference where forbidden. Append primary or
20097 current_this to the argument list if not calling constructor nor
20099 (check_for_static_method_reference): New function.
20100 (patch_invoke): Layout the class on which new is done if
20102 (lookup_method_invoke): Changed format to report errors on
20104 (qualify_ambiguous_name): New local variable this_found. Now
20105 handle things from primaries. Method call are considered
20107 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20108 changed into NULLs.
20109 (not_initialized_as_it_should_p): Comply with the new DECL_P.
20110 (java_complete_tree): New case fo RETURN_EXPR. Process function
20111 call arguments in separate function.
20112 (complete_function_arguments): New function.
20113 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20115 (patch_assignment): Take the return function slot into account as
20116 a RHS. Distinguish assignment from a return.
20117 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20118 when checking methods in interfaces.
20119 (resolve_type_during_patch): NULL argument to unresolve_type_p
20120 instead of NULL_TREE.
20121 (patch_newarray): Fixed typo in comment.
20122 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20123 (build_return, patch_return): New functions.
20124 * typeck.c (lookup_java_constructor): Fixed typo in comment.
20126 1998-07-21 Per Bothner <bothner@cygnus.com>
20128 * constants.c (find_name_and_type_constant, find_fieldref_index,
20129 find_methodref_index): New methods.
20130 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
20131 just return given method. Also, rename to build_known_method_ref.
20132 (expand_invoke): Rename call to build_invoke_non_interface.
20133 * java-tree.h, parse.h: Update prototype.
20134 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
20135 (such as expand_expr_stmt) if flag_emit_class_files.
20136 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20137 STACK_TARGET, IGNORE_TARGET): New macros.
20138 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
20139 (generate_bytecode_insn): New function to generate method's bytecode.
20140 (generate_classfile): Node generate Code attribute for a method.
20141 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20142 push_long_const, field_op, adjust_typed_op, maybe_wide):
20143 New functions used by generate_bytecode_insn.
20145 * typeck.c (signature_include_return): Remove variable.
20146 (push_java_argument_signature, build_java_argument_signature): New.
20147 (build_java_signature): Use push_java_argument_signature.
20148 * parse.y: Use build_java_argument_signature instead of fiddling
20149 with signature_include_return.
20151 1998-07-17 Tom Tromey <tromey@cygnus.com>
20153 * gjavah.c (print_c_decl): Always generate JArray<>* for array
20156 * Makefile.in (all.indirect): Added gjavah$(exeext).
20157 (gjavah$(exeext)): Added $(exeext).
20160 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
20162 * class.c (layout_class): Call to java_layout_parsed_class replace
20163 by safe_layout_class.
20164 * expr.c (build_java_array_length_access): Removed static storage
20165 class in the function definition.
20166 (build_java_arraynull_check): Likewise.
20167 Also fixed typos in two comments.
20168 * lex.c (java_init_lex): Initialize static global kw_length.
20169 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20170 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20172 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20173 * parse.h (resolve_no_layout): New static function declaration.
20174 (get_identifier_in_static): Declaration removed.
20175 (java_layout_parsed_class): Function name declaration changed to
20177 (build_newarray_node, patch_newarray, resolve_type_during_patch,
20178 not_initialized_as_it_should_p, build_this): New static function
20180 (pushdecl_force_head, build_java_binop, int_fits_type_p,
20181 binary_numeric_promotion, stabilize_reference,
20182 build_decl_no_layout, build_java_arrayaccess): Extern function
20183 declarations moved into their own section.
20184 (build_newarray, build_anewarray, build_java_array_length_access,
20185 build_java_arraynull_check): New extern function declarations.
20186 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20187 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20189 (CALL_CONSTRUCTOR_P): New macro.
20190 * parse.y (kw_length): New static global tree node.
20191 (return_statement): Tagged <node>.
20192 (RETURN_TK): Tagged <operator>.
20193 (variable_declarator_id:): Build variable declaration with an
20194 empty initialization value if a syntax error was found in the
20195 initialization part of the variable declaration.
20196 (statement_without_trailing_substatement:): return_statement: now
20197 uses the default rule.
20198 (return_statement:): Temporarily fixed to return NULL_TREE.
20199 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20200 (class_instance_creation_expression:): Class creation rules now
20201 call build_method_invocation upon reduction.
20202 (array_creation_expression:): Rules call build_newarray_node upon
20204 (dim_exprs:): Build a list of dimension expressions.
20205 (dim_expr:): Store location of the OSB_TK in the dimension
20207 (method_invocation:): Added a new error rule.
20208 (build_unresolved_array_type): WFL argument may also be an array
20209 on a primitive type. Name of the argument changed to reflect this.
20210 (method_declarator): Insert argument type at the beginning of the
20211 argument type list and later reverse the list.
20212 (unresolved_type_p): Argument 'returned' may be optionally
20214 (java_layout_class_from_source): Function renamed
20216 (resolve_and_layout): Now call resolve_no_layout and
20218 (resolve_no_layout): New function.
20219 (purify_type_name): New function.
20220 (complete_class_report_errors): Call purify_type_name during error
20221 report on a type not found.
20222 (process_imports): error_found local variable doesn't need to be
20223 initialized to zero.
20224 (declare_local_variables): New local type_wfl. Fixed typo in error
20225 message. type_wfl assigned to unresolved type and used to register
20226 incomplete type. Build a WFL around the variable initialization
20227 statement so that debug info can be generated on it.
20228 (source_start_java_method): Reverse argument list after they've
20230 (current_this): New static global variable.
20231 (java_complete_expand_methods): Set current_this when appropriate.
20232 (resolve_expression_name): Build correct static and non static
20233 field access bearing a simple name.
20234 (resolve_field_access): Resolve the length field of arrays. Handle
20236 (patch_method_invocation_stmt): Set the type of the method
20237 invocation to error_mark_node. This value is later overridden by a
20238 valid type, if any. Don't handle qualified constructor invocation
20239 as qualified method invocation. Call lookup_method_invoke with its
20240 new flag. It's no longer necessary to access the selected method
20241 as the value of a tree list. Handle constructor invocation.
20242 (patch_invoke): Reverse argument list when invoking non interface
20243 methods. Insert call to new as the first argument of the
20245 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20246 defined within a final class. Return INVOKE_STATIC if the invoked
20247 method is a constructor.
20248 (lookup_method_invoke): New lc argument is a flag to indicate a
20249 constructor lookup. Now handle constructor lookup. Choose the most
20250 specific method in case several were matching the invocation
20251 requirements. Return a method decl instead of a tree list featuring
20252 one single method decl element.
20253 (refine_accessible_methods_list): New lc flag argument to
20254 indicate that a constructor is being looked up.
20255 (not_initialized_as_it_should_p): New function.
20256 (java_complete_tree): Now process fake tree codes
20257 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20258 save_expr on resolved function call arguments. Case on
20259 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20260 (patch_assignment): LHS can be a field access expression. When
20261 dealing with reference, lhs_type is the promoted type of the
20262 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20264 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20265 (patch_binop): Use not_initialized_as_it_should_p where
20267 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20268 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20270 (resolve_type_during_patch): New function.
20271 (patch_cast): Call resolve_type_during_patch to resolve type and
20272 report error accordingly.
20273 (patch_array_ref): Use not_initialized_as_it_should_p where
20274 applicable. Array base expression is saved before being
20275 used. Promote the type of an array elements if it contains non
20277 (build_newarray_node, patch_newarray, build_this): New functions.
20279 1998-07-16 Tom Tromey <tromey@cygnus.com>
20281 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20282 increment it in `for' statement.
20283 (print_field_info): If number is inf or nan, don't print it.
20284 (print_method_info): If method name is `delete', just ignore it.
20285 (print_c_decl): Special-case jstringArray.
20287 * gjavah.c (help): New function.
20288 (no_argument): New function.
20289 (usage): Changed text.
20290 (main): Rewrote argument handling. Now handles -v, --help,
20292 (version): New function.
20293 (found_error): New global.
20294 (main): Return found_error.
20295 (generate_access): Set found_error.
20296 (print_c_decl): Likewise.
20298 1998-07-15 Tom Tromey <tromey@cygnus.com>
20300 * gjavah.c (print_c_decl): Don't print "," when examining field.
20301 Skip type name when looking at "[L" types.
20302 (process_file): Now static.
20303 (generate_access): Now returns int.
20304 (last_access_generated): New global.
20305 (process_file): Clear last_access_generated; make multiple passes
20307 (print_field_info): Just return if generate_access returns true.
20308 (print_method_info): Likewise. Also, allow <init> functions to
20310 (print_c_decl): Added is_init argument. Print constructors
20312 (print_cxx_classname): Use UTF8_GET to extract characters from
20314 (print_base_classname): New function.
20315 (print_class_decls): New function.
20316 (process_file): Use it.
20317 (utf8_cmp): New function.
20319 1998-07-13 Nick Clifton <nickc@cygnus.com>
20321 * lang-options.h: Format changed to match changes in gcc/toplev.c
20322 to implement a --help option.
20324 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
20326 * decl.c (init_decl_processing): Revert change to dtable_type.
20328 1998-07-09 Per Bothner <bothner@cygnus.com>
20330 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20332 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
20334 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20336 * lang.c (lang_init): Default flag_exceptions to 1, without
20337 checking to see if it's 2 first.
20339 1998-07-08 Jeffrey A Law (law@cygnus.com)
20341 * constants.c: Include "system.h".
20342 * decl.c: Likewise.
20343 * lang.c (flag_new_exceptions): Get via extern now.
20344 (lang_init_options): New functions. Turn on flag_new_exceptions.
20346 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
20348 * lex.c (java_lex): Return 0 when we see an invalid character in
20351 * lex.c (java_read_char): Specify extra argument when calling
20353 (java_read_unicode, java_parse_end_comment,
20354 java_parse_escape_sequence): Likewise,
20355 (java_lex): Specify extra argument when calling
20356 java_lex_error. Test that IDs are beginning with a legal character
20357 for IDs. Handle invalid characters with an error message and a
20358 call to java_lex_error.
20359 (java_lex_error): Adjust column position by new argument
20360 `forward'. Issue an error even if in the middle of reporting an
20363 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
20365 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20366 we don't explicitly put a null pointer when we're copying it.
20368 1998-07-07 Tom Tromey <tromey@cygnus.com>
20370 * gjavah.c (print_cxx_classname): New function.
20371 (super_class_name): Likewise.
20372 (print_super_fields): Removed.
20373 (in_super): Removed.
20374 (print_field_info): Never generate #defines.
20375 (print_c_decl): Changed generated types to match JNI. No longer
20376 print class name before method name.
20377 (print_method_info): Print "static" before static methods.
20378 Print "virtual" before non-final methods.
20379 (usage): Use exit(1), not exit(-1).
20381 (print_field_info): Use %.17g to print a double.
20382 (last_access): New globals.
20383 (process_file): Initialize last_access.
20384 (usage): Now static.
20385 (ACC_VISIBILITY): New define.
20386 (generate_access): New function.
20387 (print_field_info): Call it.
20388 (print_method_info): Likewise. Also, generate information for all
20389 methods, not just native methods. Return void.
20390 (print_c_decl): Return void.
20391 (print_field_info): Return void.
20393 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20395 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20396 processing the jc1 grammar file. Prefix bison functions and
20397 variables with java_.
20398 (parse.c): Dependencies on parse.h and lex.h
20399 * expr.c (build_java_arrayaccess): Function now global.
20400 * java-tree.h: Comment reorganized to carry on previous
20401 classification effort.
20402 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20403 RESOLVE_TYPE_NAME_P): New flags on WFLs.
20404 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20405 java_parse (new prefix java_ generated by bison).
20406 (java_layout_parsed_class, java_register_parsed_class): Function
20408 (yyparse): Removed unnecessary call to init_outgoing_cpool.
20409 * lex.c (static tree wfl_op): Variable deleted.
20410 (java_init_lex): Initialize kw_super and kw_this. Initialize more
20411 ctxp fields to NULL_TREE.
20412 (java_lex): No longer create WFL for operators. Filename caching
20413 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20414 created as STRING_CST and later expanded. Removed extra argument
20415 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20417 (build_wfl_node): Removed code in comments.
20418 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
20419 store token and location data in the current bison token.
20420 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
20421 static/extern function declaration at the beginning of the file.
20422 (struct qualification): Data structure definition deleted.
20423 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20424 (qualify_ambiguous_name): Function declaration modified. Function
20425 now returns nothing.
20426 (build_array_ref, patch_array_ref, make_qualified_name,
20427 resolve_qualified_expression_name, maybe_generate_clinit,
20428 resolve_field_access): New static function declarations.
20429 (build_java_arrayaccess): New extern function declaration.
20430 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20431 (CALL_EXPR_PRIMARY): Macro deleted.
20432 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20433 (struct parser_ctxt): Field initialized_final
20434 removed. non_static_initialized, static_initialized: New fields.
20435 * parse.y (static tree kw_super, static tree kw_this): New global
20437 (%union): tree wfl field of operator member replaced by int
20438 location. WFLs are non longer created for operators.
20439 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20440 (qualified_name:): Now calls make_qualified_name to build the
20442 (type_declaration:): Consider generating <clinit> when class
20444 (variable_declarator:): Directly build an assignment node when the
20445 variable is initialized when declared.
20446 (this_or_super:): Build a WFL and set current location when THIS
20447 or SUPER are parsed.
20448 (expression_statement:): Wrap statement around a WFL.
20449 (primary_no_new_array:): Fixed typo. Changed value returned by
20450 THIS_TK because of its new type (temporary).
20451 (dim_exprs:): Temporary fix because of OSB_TK's new type.
20452 (field_access:): Build qualified name with SUPER.
20453 (method_invocation:): Fixed returned value because of SUPER's new
20455 (array_access:): Use OSB_TK location information.
20456 (post_increment_expression:, post_decrement_expression:,
20457 unary_expression:, pre_increment_expression:,
20458 pre_decrement_expression:, unary_expression_not_plus_minus:,
20459 cast_expression:, multiplicative_expression:,
20460 additive_expression:, shift_expression:, relational_expression:,
20461 equality_expression:, and_expression:, exclusive_or_expression:,
20462 inclusive_or_expression:, conditional_and_expression:,
20463 conditional_or_expression:, assignment:): Use new location/token
20464 information available on operators.
20465 (create_class): Set super_decl_type to NULL_TREE when processing
20467 (register_fields): Field initialization is now a MODIFY_EXPR
20468 node. Chain initialization code to the matching lists (according
20469 to the field declaration modifiers).
20470 (maybe_generate_clinit): New function.
20471 (method_header): Don't set method's DECL_NAME to a WFL when adding
20472 methods to java.lang.Object.
20473 (resolve_and_layout): Now can return NULL_TREE if the type
20474 resolution fails. Otherwise, return the class DECL instead of its
20476 (check_method_redefinition): Don't patch method DECL_NAME if it
20477 belongs to java.lang.Object.
20478 (process_imports): Simply assign error_found to the value returned
20479 by check_pkg_class_access.
20480 (declare_local_variables): Don't use their init statements (if
20481 any) when parsing error were previously found. Reuse MODIFY_EXPR
20482 build during parsing as an init statement.
20483 (java_method_add_stmt): Now return the current method body.
20484 (java_layout_parsed_class, java_register_parsed_class): Functions
20486 (java_complete_expand_methods): Initialize the constant pool on a
20487 per class basis. Layout the classes before expanding their method
20488 bodies. Don't try expand artificial constructor code if error were
20489 found. Make the classes data and register them if no error were
20491 (java_complete_expand_method): Retrieve an artificial constructor
20492 argument list before entering its body. Assign the top block to
20493 the artificial constructor function body and set types of declared
20494 blocks and compound statements to void. Walk method body if not an
20495 artificial constructor.
20496 (make_qualified_name, cut_identifier_in_qualified): New functions.
20497 (resolve_expression_name): Fixed comments. Save/restore the
20498 current class CLASS_LOADED_P flag value. Build non qualified
20499 static field access and handle qualified expression names.
20500 (resolve_field_access, resolve_qualified_expression_name): New
20502 (patch_method_invocation_stmt): Use the new expression resolution
20503 scheme, calling resolve_field_access when the function call is
20504 resolved as an expression.
20505 (qualify_ambiguous_name): Function rewritten to work on qualified
20506 expression produced by make_qualified_name.
20507 (java_complete_tree): Promote type when function's argument are
20508 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20509 the assignment to discover further errors if RHS is a expression
20510 name that fails to evaluate. Declare LHS initialized even though
20511 the assignment failed. Don't use the location variable and removed
20512 extra argument in patch function calls. Now handle the ARRAY_REF
20513 case and build internal string representation when STRING_CSTs are
20515 (build_method_invocation): Don't wrap function call around a WFL.
20516 (build_assignment): Likewise. Use the operator location
20518 (patch_assignment): Handle array access LHSs. Handle error
20519 provenance, resulting in a better error report.
20520 (build_binop): Use op_location from operator as binop location
20522 (build_unaryop, build_incdec, build_cast): Likewise.
20523 (patch_binop): Extract location information from the node. Fixed
20524 typo in error message.
20525 (patch_unary_op): Extract location information from the node.
20526 (build_array_ref, patch_array_ref): New functions.
20528 1998-07-01 Tom Tromey <tromey@cygnus.com>
20530 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20531 match _Jv_IsInstanceOf.
20532 * decl.c (init_decl_processing): Use _Jv_NewArray, not
20533 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
20535 1998-06-30 Tom Tromey <tromey@cygnus.com>
20537 * decl.c (init_decl_processing): Functions are now named
20538 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20540 1998-06-29 Per Bothner <bothner@cygnus.com>
20542 * java-tree.h (load_class): Add prototype.
20543 * class.c (is_compiled_class): Add missing arg to load_class.
20544 * expr.c (expand_java_NEW): Call load_class.
20545 * parse.y (process_import): Removed bogus use of void return value.
20547 1998-06-25 Per Bothner <bothner@cygnus.com>
20549 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
20550 Function name is "_Jv_Throw" instead of "soft_athrow".
20551 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
20552 Function name is "_Jv_AllocObject" instead of "soft_new".
20553 Takes an extra parameter (object size).
20554 * expr.c: Update calls.
20556 1998-06-24 Per Bothner <bothner@cygnus.com>
20558 * lex.c (java_get_line_col): Handle end-of-file.
20559 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
20561 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
20563 * lang.c (lang_init): Make -fexceptions the default.
20564 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
20565 exception handling is not turned on.
20567 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
20569 * lang.c (flag_new_exceptions): Make this this default.
20570 * decl.c (end_java_method): Call emit_handlers.
20571 * except.c (method_init_exceptions): Set language code and version.
20572 (expand_start_java_handler): Enable exception, and call
20573 expand_eh_region_start.
20574 (expand_end_java_handler): Enable exception, and set up catch blocks.
20575 (emit_handlers): New routine to generate the saved handlers.
20576 * java-except.h (emit_handlers): Add prototype.
20578 1998-06-12 Per Bothner <bothner@cygnus.com>
20580 We used to have three different representations of the constant pool:
20581 the CPool structure, the tree_constant_pool, and the constructures
20582 used to build the Class object (which may need class and string
20583 constants) in compiled code. None were appropriate for compiling
20584 to .class files, so I did a major overhaul.
20586 First, the tree_constant_pool array was removed. Things were
20587 modified to the CPool structure in the JCF could be used.
20588 Second, a "capacity" field was added to the CPool, and functions
20589 written to search for a matching constant, adding one if not found.
20590 The code that generated the Class object was changed to use a CPool.
20591 The actual TREE_LISTs used to build the CONSTRUCTORs used for
20592 the static Class object are now only in build_constants_constructor.
20593 Finally, I wrote code which can generate a .class file (including its
20594 constant pool) from the RECORD_TYPE of a class. This is a big step
20595 on the way to compiling Java source into .class files.
20597 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
20598 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
20600 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
20601 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
20602 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
20603 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
20604 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
20605 (lang_type): Removed constant_pool field.
20606 * jcf.h (CPool): Renamed size to count. Added field capacity.
20607 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
20608 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
20609 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
20611 * constants.c (current_constant_pool_tags, current_constant_pool_data,
20612 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
20613 * constants.c (build_constants_constructor): Use new outgoing_cpool.
20614 (set_constant_entry, find_constant1, find_constant2,
20615 find_class_constant, count_constant_pool_bytes, write_constant_pool,
20616 find_utf8_constant, find_class_or_string_constant): New functions.
20618 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
20619 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
20620 (give_name_to_class, get_class_constant): Likewise.
20621 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
20622 (get_name_and_type_constant, get_ref_constant): Removed.
20623 * parse.h (parser_ctxt): Remove field tree_constant_pool.
20624 * parse.y: Don't save/restore tree_constant_pool.
20625 * verify.c (verify_jvm_instructions): Update for new approach.
20626 * expr.c (expand_invoke, expand_java_field_op): Likewise.
20628 * lang-options.h: Added -femit-class-file, -femit-class-files.
20629 * lang.c (flag_emit_class_files), java-tree.h: New flag.
20630 (lang_f_options): Added "emit-class-file(s)".
20632 * expr.c (build_java_arrayaccess): Generate more efficient array
20633 bounds checking, by using unsigned compare.
20635 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
20637 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
20639 * parse.h: New comment on the handling of unresolved type
20640 identifiers. JDEPs are now part of the jdep_code enum.
20641 (typedef struct jdep): Now use enum jdep_code or int, depending on
20642 availability. Both are narrowed down to an 8 bits bitfield.
20643 (CALL_EXPR_PRIMARY): Fixed comment.
20645 1998-06-10 Tom Tromey <tromey@cygnus.com>
20647 * Make-lang.in (java): Added gjavac and jvgenmain.
20648 (java.start.encap): Depend on gjavac.
20649 (java.rest.encap): Depend on jvgenmain.
20651 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
20652 (JAVA_CROSS_NAME): Likewise.
20653 (java.all.build): Depend on jvgenmain and gjavac.
20654 (java.all.cross): Depend on jvgenmain and gjavac-cross.
20655 (jvgenmain$(exeext)): New target.
20656 (java.install-common): Wrote.
20657 * config-lang.in (compilers, stagestuff): Added gjavac and
20660 1998-06-10 Dave Brolley <brolley@cygnus.com>
20662 * lang.c (lang_decode_option): New argc/argv interface.
20664 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
20666 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
20667 * decl.c (build_decl_no_layout): New function.
20668 * expr.c (java_lang_expand_expr): Layout declarations found in
20669 blocks before they're pushed.
20670 * jcf-parse.c (load_class): Save current line when parsing class
20672 (parse_source_file): Register class before expanding their
20674 * lang.c (put_decl_node): Produce `null' when `void *' is
20676 * lex.c (static tree wfl_op): New static global, for error report
20678 (java_init_lex): wfl_operator and wfl_op initialized
20679 here. Filename caching added for wfl_op. Return wfl_op when `(' is
20681 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
20682 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
20683 build_unresolved_array_type): New static function definitions.
20684 (build_decl_no_layout): New extern function declared.
20685 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
20686 faulty modifier exists.
20687 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
20688 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
20689 (UNARY_PLUS_EXPR): New fake operator.
20690 (struct parser_ctxt): New field osb_number.
20691 * parse.y (static tree wfl_operator): New static WFL for operator
20692 bound error messages.
20693 (DECR_TK, INCR_TK): Moved.
20694 (OP_TK): Tagged <operator>.
20695 (array_type:): Now call build_unresolved_array_type.
20696 (dim_expr:): Count the number of '[' seen.
20697 (post_increment_expression, post_decrement_expression,
20698 pre_increment_expression, pre_decrement_expression,
20699 unary_expression_not_plus_minus, unary_expression:): Actions are
20700 now building the corresponding unary expressions.
20701 (cast_expression:): Actions are now building cast expressions.
20702 (build_unresolved_array_type): New function.
20703 (create_interface): Reset the number of declared interfaces.
20704 (create_class): Likewise.
20705 (method_header): Methods declared within the scope of an interface
20706 are now implicitly set public and abstract.
20707 (java_complete_class): Variable's and parameter's type are patched
20708 with a promoted type.
20709 (declare_local_variables): Resolved non builtin types are promoted
20710 before being used to build a variable decl. Removed type patch
20711 posted on variable initialization statement.
20712 (source_start_java_method): Use build_decl_no_layout to build the
20713 decl of a parameter of incomplete type.
20714 (java_register_parsed_class): Process interfaces too. Call
20715 rest_of_decl_compilation on each processed class declarations.
20716 (java_complete_expand_methods): Don't attempt to expand things in
20718 (java_complete_tree): Process CONVERT_EXPR, even though it always
20719 has a type. Propagate error_mark_node to node's type too. Promote
20720 method's call argument type and return error_mark_node if
20721 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
20722 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
20723 handle unary operator nodes.
20724 (build_assignment): Added comment.
20725 (print_int_node): New function.
20726 (patch_assignment): New second argument. New error handling. Use
20727 print_int_node. Handle references. Use can_cast_to_p to issue
20728 different error message according to the context and check upon
20729 the initialization of the RHS.
20730 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
20731 (operator_string): Handle more operators.
20732 (patch_binop): No longer use a function static
20733 wfl_operator. Improved error message on shift distance.
20734 (build_unaryop, build_incdec, build_cast, patch_unaryop,
20735 patch_cast): New functions.
20737 1998-06-05 Per Bothner <bothner@cygnus.com>
20739 * jvspec.c: New file.
20740 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
20742 * java-tree.h (identifier_subst): Add declaration.
20744 1998-06-04 Tom Tromey <tromey@cygnus.com>
20746 * jvgenmain.c (main): Generate call to JvRunMain.
20748 * class.c (make_class_data): Push value for "sync_info" field.
20749 * decl.c (init_decl_processing): Push "sync_info" field.
20751 1998-06-03 Per Bothner <bothner@cygnus.com>
20753 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
20754 Java (source) name, not signature.
20755 Set TYPE_ALIGN to (at least) that of element_type.
20757 1998-06-02 Per Bothner <bothner@cygnus.com>
20759 * class.c: Moved classname-mangling-rekated code to ...
20760 * mangle.c: ... this new file.
20761 * jvgenmain.c: New program (needs mangle.c) to generate main program.
20762 * Makefile.in: Update for above changes.
20764 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
20766 * expr.c (truthvalue_conversion): Convert integer and floating
20767 point value to their truth value.
20768 * lex.c (java_lex): Handle the `null' literal.
20769 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
20770 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
20771 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
20774 * parse.y: Reorganization/documentation on token declaration.
20775 (binop_lookup[]): New added new tree codes.
20776 (relational_expression): Build corresponding binary operators.
20777 (equality_expression, conditional_and_expression,
20778 conditional_or_expression): Likewise.
20779 (java_complete_class): Fix crash in debug message.
20780 (java_complete_tree): Check initialization of method call
20781 arguments. Further bogus node evaluation to detect more error
20782 during assignments. Handles more binary operators.
20783 (patch_assignment): Use DECL_P.
20784 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
20786 (operator_string): Handle more case. Compacted source.
20787 (patch_binop): Changed function comment. Checking for
20788 uninitialized first operand takes the compound assignment into
20789 account and uses DECL_P. Checking for uninitialized second operand
20790 delayed to routine's end. Use macros to issue type bound error
20791 messages and issue messages on both operands if their types are
20792 different. Force fixed type into node. Handle all binary
20795 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20797 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
20798 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
20799 build operator node and return tokens.
20800 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
20801 * parse.h (java_complete_tree): Changed returned type in prototype.
20802 (build_method_invocation, build_assignment, patch_assignment,
20803 patch_binop): New static function declarations.
20804 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
20805 BUILD_EXPR_WFL): New macros.
20806 * parse.y (enum tree_code binop_lookup[]): New static for token to
20808 (%union): Parser union has new sub-structure `operator'.
20809 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
20810 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
20811 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
20812 ASSIGN_ANY_TK): Tokens tagged `operator'.
20813 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
20814 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
20815 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
20816 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
20817 (assignment_operator:): Rule tagged `operator'.
20818 (expression_statement:): Re-installed default rule.
20819 (method_invocation:): Sub rules call build_method_invocation.
20820 (postfix_expression:): Don't attempt to resolve name here. Just
20822 (multiplicative_expression:): Sub-rules build corresponding binop
20824 (additive_expression:, shift_expression:, and_expression:,
20825 exclusive_or_expression:, inclusive_or_expression:): Likewise.
20826 (assignment:): Sub rule invoke build_assignment.
20827 (assignment_operator:): Default rules on sub rules.
20828 (force_error): Added documentation on this variable.
20829 (declare_local_variables): Build initialization calling
20831 (expand_start_java_method): Removed unused rtx declaration. Mark
20832 arguments as already initialized.
20833 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
20834 (java_complete_expand_methods): Don't process next method if
20835 completion of the previous one triggered errors.
20836 (java_complete_expand_method): Call source_end_java_method if no
20837 error were found during completion.
20838 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
20839 locals declaratilon. Handle names found within a class. Return
20840 error_mark_node when things aren't found.
20841 (patch_method_invocation_stmt): Return error_mark_node on failures.
20842 (patch_invoke): Removed unused local. Return the correct node.
20843 (java_complete_tree): Now returns a value. The BLOCK section binds
20844 local identifiers and the type of a BLOCK is now void. Assign the
20845 result of operand completion on COMPOUND_EXPR. Assign the
20846 encapsulated node of a WFL to the result of its completion, except
20847 when the node is an identifier. Now handle MODIFY_EXPR and several
20848 binary operators. Return error_mark_node on errors.
20849 (build_method_invocation, build_assignment, patch_assignment,
20850 build_binop, operator_string, patch_binop): New functions.
20851 * typeck.c (binary_numeric_promotion): New function.
20853 1998-05-21 Per Bothner <bothner@cygnus.com>
20855 * class.c (identifier_subst): New convenience wrapper for ident_subst.
20856 Replace most uses of ident_subst by identifier_subst.
20858 * class.c (push_class_static_dummy_field): Removed function.
20859 (build_class_ref): Find Class object decl by looking up "CNAME.class",
20860 instead of looking got "class" static field. Create that decl here.
20861 (class_identifier_node): Removed; no longer needed.
20862 (init_class_processing): Don't init class_identifier_node.
20863 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
20864 Do nreverse 0 times (instead of twice) for Object and Class.
20865 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
20867 1998-05-20 Per Bothner <bothner@cygnus.com>
20869 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
20870 while initializing linenumber_count and linenumber_table.
20871 Do it before init_function_start (which calls emit_line_note).
20872 * expr.c (expand_byte_code): Don't need to clear lineno here.
20874 1998-05-18 Tom Tromey <tromey@cygnus.com>
20876 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
20877 then mangle number as _N_.
20879 * class.c (mangle_class_field): New function.
20880 (build_class_ref): Set assembler name of class reference using
20881 mangle_class_field.
20882 (push_class_static_dummy_field): Likewise.
20884 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
20886 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
20887 of assigning to TREE_CODE. The latter method exploits a feature
20888 of GCC that is not ANSI compliant.
20890 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
20892 * decl.c (pushdecl_force_head): New function.
20893 (pushlevel): Removed conditional printf.
20894 (complete_start_java_method): Don't enter local variable scope if
20895 function is compiled from source code.
20896 * expr.c: parse.h now included
20897 (java_lang_expand_expr): New function.
20898 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
20899 printf. Terminate buffer when doing directories.
20900 * jcf-parse.c (parse_source_file): Call lang_init_source before
20901 parsing and before code generation.
20902 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
20903 use printf if the macro is defined.
20904 * lang.c (lang_init): Install lang_expand_expr hook on
20905 java_lang_expand_expr.
20906 (java_dummy_print): New function.
20907 (lang_init_source): New function.
20908 * lex.c (java_lex): Remember location of an opening brace at the
20909 second nesting level.
20910 (java_is_eol): Unget character seen after a CR if it is EOF.
20911 * parse.h: Now includes lex.h
20912 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
20913 printf if the macro is defined.
20914 (expand_start_java_method, build_expr_block, enter_block,
20915 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
20916 New static function declarations.
20917 (pushdecl_force_head): New extern function declaration.
20918 (INCOMPLETE_TYPE_P): New macro.
20919 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
20920 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
20921 BLOCK_EXPR_ORIGIN): New macros.
20922 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
20923 DECL_SOURCE_LINE_LAST): New macros.
20924 (struct parser_ctxt): Removed field current_method_decl, redundant
20925 with the field current_function_decl. Added fields
20926 first_ccb_indent1 and pending_block.
20927 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
20928 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
20930 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
20931 (compilation_unit:): Cosmetic on sub rule.
20932 (type_declaration:): Cosmetic on sub rules. Added an error rule.
20933 (variable_initializer:): Installed default rule on expression:.
20934 (method_declaration:): method_header: starts a new
20935 method. method_body: installs the function body, absorbs blocks
20936 emitted for temporary variable scopings, pops function's body block
20937 and merges function's last statement lineno in DECL_SOURCE_LINE.
20938 (method_body:): Installed default rules.
20939 (block:): Call enter_block when an opening brace is seen. Absorb
20940 scoping blocks and call exit_block when a closing brace is seen.
20941 (block_statement:): Cosmetic changes.
20942 (method_invocation:): Create WFL around CALL_EXPR node.
20943 (patch_stage): Added comment around definition.
20944 (method_header): Try to use first_ccb_indent1 as the first line of
20945 the method, so BP debug info are emitted at the first opening
20946 brace of the function. If the function has no body, use the
20947 location of the function's name. Override currently defined method
20948 name with the matching WFL so we can point redefinition errors
20949 using the location where the function's name was declared.
20950 (check_abstract_method_header): Interprets DECL_NAME as an
20951 identifier or as a WFL, accordingly.
20952 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
20953 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
20954 location and name information out of it and reinstall DECL_NAME to
20955 its original identifier node value.
20956 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
20957 function's source code).
20958 (read_import_dir): Test the value returned by find_class and issue
20959 a fatal accordingly.
20960 (declare_local_variables): Push a new block for the scope of the
20961 new variable(s) if code has been already generated at that nesting
20962 level. Pinpoint redefinition errors using the variable id
20963 WFLs. Generate initialization code if necessary. If the variable
20964 type is incomplete, register a patch on its decl.
20965 (source_start_java_method): Rewritten. Define a new block for the
20966 function's parameters. Build parameter decl out of function's
20967 arguments and register them for a patch if their types are
20969 (expand_start_java_method): Includes the part of
20970 source_start_java_method that was pushing the parameter decls and
20971 completing the method start code.
20972 (source_end_java_method): Removed call the expand_end_bindings and
20973 poplevel (already taken care of). Reinstall function's arguments
20974 and get function's last line of code before calling
20975 expand_function_end.
20976 (java_method_add_stmt): New comment before the function's
20977 code. Complement the second operand of the current COMPOUND_EXPR
20979 (java_complete_expand_methods): Don't generate debug info on line
20980 zero when expanding a generated constructor.
20981 (java_complete_expand_method): Set start and end line numbers for
20982 a artificially generated constructor to one and manually call
20983 enter_block and exit_block when defining it. For all methods:
20984 expand function's start calling the new expand_start_java_method
20985 and invoke java_complete_tree on the effective method's body, if
20987 (resolve_expression_name): Now use lookup_name_in_blocks to search
20988 local variable decls and print out an error when variables are
20990 (patch_method_invocation_stmt): Inserted comment before the
20992 (lookup_method_invoke): Chain method's arguments using chainon
20993 with the current arg list as a second argument. Inserted missing
20994 IDENTIFIER_POINTER when reporting an error on methods not found.
20995 (refine_accessible_methods_list): Don't retain constructors.
20996 (patch_arguments): Function removed.
20997 (java_complete_tree): Inserted comment before the function's
20998 code. New case for BLOCKs. Moved the WFL case a bit
20999 further. Complete function's arguments.
21000 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21001 maybe_absorb_scoping_blocks): New functions.
21003 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21005 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21007 * jcf-parse.c (parse_source_file, java_error_count): New forward
21008 and extern declarations.
21009 (java_parse_abort_on_error): Macro moved.
21010 (jcf_parse_source): fatal called if fopen fails. Now calls
21012 (parse_source_file): New parse_only parameter. Reflects the
21013 elimination of the second pass.
21014 (yyparse): parse_source_file called with argument set to 0.
21015 * jcf.h (JCF_ZERO): Sets java_source to zero.
21016 * lex.c (java_init_lex): pass argument is gone. Function modified
21017 to be called once during the analysis of a file.
21018 (java_unget_unicode): Fixed typo in fatal message.
21019 (java_get_line_col): Likewise.
21020 (java_lval): Likewise. String literals no longer built during
21022 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21024 * parse.h (MODIFIER_WFL): New macro.
21025 (parse_check_super, parser_check_super_interface): Now return int.
21026 (parser_chain_incomplete_item, not_builtin_p,
21027 complete_method_decl): Declarations removed.
21028 (build_method_invocation_stmt, build_invoke): Renamed using the
21029 `patch' instead of `build'
21030 (register-incomplete_type, obtain_incomplete_type,
21031 java_complete_tree, java_complete_expand_method,
21032 unresolved_type_p, create_jdep_list): New function declarations.
21033 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21034 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21035 (jdep): New typedef on new struct _jdep.
21036 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21037 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21038 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21039 JDEP_RESOLVED_P): New macros.
21040 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21041 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21042 JDEP_VARIABLE): New enum values and jdep kinds.
21043 (jdeplist): New typedef on struct _jdeplist.
21044 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21046 (CALL_EXPR_PRIMARY): New macro.
21047 (struct parser_ctxt): Fields java_pass, current_method_decl,
21048 method_decl_list deleted. New field jdeplist.
21049 (INCOMPLETE_P): Macro deleted.
21050 * parse.y (single_type_import_declaration:): Removed pass switch.
21051 (type_import_on_demand_declaration): Likewise.
21052 (field_declaration:): Removed pass switch on all sub rules.
21053 (class_declaration:): Call the complete_class_decl removed on
21055 (method_declaration:): Removed second pass switch. No longer chain
21056 methods decl when method_header reduced.
21057 (method_header:): Sub rules no longer depend on pass switch.
21058 (method_declarator:): Likewise.
21059 (method_body:): Likewise.
21060 (abstract_method_declaration:): Likewise.
21061 (block_statement:): Likewise.
21062 (local_variable_declaration:): Likewise.
21063 (argument_list:): Likewise.
21064 (method_invocation:): Likewise. Call to build_method_invocation_stmt
21065 removed. Partial CLASS_EXPR tree node built instead.
21066 (postfix_expression:): Removed pass switch on all sub rules.
21067 (java_pop_parser_context): Free classd_list content.
21068 (yyerror): Call obstrack_grow0 to finalize error message.
21069 (check_class_interface_creation): Comment modified to reflect new
21070 returned value meaning. Removed second pass switch. Return 1 if an
21071 error was found, 0 otherwise. Adjust pointer on filename if a
21072 leading path separator was found.
21073 (maybe_create_class_interface_decl): Removed first pass switch
21074 when linking the class decl to the class_list. Install a new
21075 jdep_list for the class.
21076 (add_superinterfaces): List of unresolved interfaces is
21077 gone. Unresolved interfaces are directly added to the current
21079 (create_interface): Second pass shortcut removed.
21080 ctpx->modifier_ctx access through MODIFIER_WFL.
21081 (create_class): Second pass shortcut removed. Call to
21082 register_incomplete_type replaces the call to
21083 parser_chain_incomplete_item.
21084 (complete_class_decl): Function removed.
21085 (duplicate_declaration_error): New way of retrieving redeclared
21087 (register_fields): Call to lookup_modifier_cl replaced by
21088 MODIFIER_WFL. New way of handling unresolved type, using
21089 unresolved_type_p and obtain_incomplete_type.
21090 register_incomplete_type replaces call to parser_chain_incomplete_item.
21091 (patch_stage): New static global variable.
21092 (method_header): New way of handling unresolved type, using
21093 unresolved_type_p and obtain_incomplete_type. patch_stage used to
21094 indicates that the method decl needs to be patched.
21095 (check_abstract_method_header): Call to lookup_modifier_cl
21096 replaced by MODIFIER_WFL.
21097 (method_declarator): Incomplete argument type are registered
21098 calling register_incomplete_type. Patch on the declared method is
21099 issued in that case.
21100 (unresolved_type_p): New function.
21101 (parser_check_super_interface): New comment to reflect function's
21102 modified returned type (int). Function and has a new argument
21103 this_wfl. Call to parse_error_context uses this_wfl instead of
21104 relying on lookup_cl.
21105 (parser_check_super): Comment reflects function's new returned
21106 type (int). Function returns nonzero value on error.
21107 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21108 register_incomplete_type, jdep_resolve_class): New functions to
21109 handle incomplete types in declarations.
21110 (java_complete_class): Rewritten to work with the new incomplete
21111 type handling scheme.
21112 (complete_class_report_errors): Likewise.
21113 (complete_method_decl): Removed: it jobs is now handled by
21114 java_complete_class.
21115 (do_resolve_class): Class loaded in not already loaded and not
21116 found in Java source code.
21117 (java_check_regular_methods, java_check_abstract_methods): Don't
21118 call complete_method_decl anymore.
21119 (lookup_modifier_cl, not_builtin_p): Functions deleted.
21120 (read_import_dir): Got rid of the pass number dependency.
21121 (declare_local_variables): New handling of unresolved types (patch
21123 (source_start_java_method): New parameter level. Function called
21124 with level set to 1 when argument types are potentially
21125 unresolved. Called to complete the job with level set to 2 once
21126 types are complete.
21127 (source_end_java_method): Call to permanent_allocation
21128 removed. Waiting to be replaced by a more suitable obstack
21130 (java_complete_expand_methods, java_complete_expand_method,
21131 java_expand_finals): New functions.
21132 (build_method_invocation_stmt): Renamed
21133 patch_method_invocation_stmt. Extracts function call expression
21134 (wfl) and arguments (args) from CALL_EXPR tree operands.
21135 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21136 call. Patch the function and argument operand of the CALL_EXPR
21138 (patch_argument, java_complete_tree): New functions.
21140 1998-04-20 Per Bothner <bothner@cygnus.com>
21142 Recover from missing fields and methods (i.e. error instead of fatal).
21143 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
21144 * expr.c (expand_invoke): Recover from missing method.
21145 (expand_java_field_op): Recover from missing field.
21146 Inline references to java.lang.{Integer,Char,...}.TYPE.
21147 * typeck.c (get_type_from_signature), java-tree.h: New function.
21148 * class.c (add_method): Use get_type_from_signature.
21149 (build_class_ref): Handle a class that was not found.
21150 * typeck.c (convert): Handle conversion to pointers (for convenience).
21151 * verify.c (verify_jvm_instructions): Use get_type_from_signature
21152 instead of lookup_field to handle missing fields.
21154 * jcf-parse.c (process_zip_dir): Set java_source.
21156 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
21158 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21160 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
21162 * jcf-parse.c (load_class): Don't change input_filename before
21163 calling jcf_parse_source (but still do it before calling
21165 (jcf_parse_source): Assign input_filename after having saved the
21167 * lex.c (java_init_lex): Chain a WFL node to the import on demand
21168 list. ctxp->modifier_ctx zeroed according to its new
21169 definition. ctxp->filename initialized. Removed
21170 JAVA_MODIFIER_CTX_UNMARK.
21171 (java_unget_unicode): Update the character based column position.
21172 (java_allocate_new_line): ref_count not used anymore. Always free
21173 ctxp->p_line. Initialize c_line->char_col to 0.
21174 (java_get_unicode): Update the character based column position.
21175 (java_lex): Use ctxp->elc to store current position in source
21176 file, at the beginning of the parsed token. Set modifier_ctx entry
21177 corresponding to the parse modifier to a WFL node. Return a WFL
21178 node when an identifier is parsed.
21179 (java_lex_error): Now uses ctxp->elc to store current position in
21181 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21182 * lex.h (build_wfl_node): New function definitions.
21183 (struct java_line): ref_count and next fields are gone. New field
21185 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21186 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21187 (JAVA_COLUMN_DELTA): New macro.
21188 (java_lc): New typedef on new struct _java_lc.
21189 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21190 (parse_error_context, parse_warning_context): Changed prototypes.
21191 (java_get_line_col): Added as an available global function.
21192 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21193 (IC_DECL): Replaced by macro IC_TYPE
21194 (DEPEND_WFL): New macro.
21195 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21197 (exit_java_complete_class): Removed a commented out statement.
21198 (struct parser_ctxt): Added comments on fields. modifier_ctx is
21199 now an array of tree nodes. Deleted fields line_list and
21200 e_line. New field elc, to replace e_line.
21201 * parse.y (array_type:): Build WFL node.
21202 (qualified_name:): Build a single WFL node out of two. Retain
21203 the location information of the first node in the resulting node.
21204 (package_declaration:): Use package name as a WFL node
21205 (single_type_import_declaration:): Use imported name as a WFL node.
21206 (type_import_on_demand_declaration:): Use root of the imported
21207 packages as a WFL node.
21208 (field_declaration:): Removed unused local variable cl.
21209 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21210 (yyerror): New static elc. Removed static error_line, error_pos.
21211 New local code_from_source. Save ctxp->elc into elc at the first
21212 pass. Call java_get_line_col to get a string of the line where
21213 the error occurred.
21214 (debug_line): Removed static function.
21215 (parse_error_context, parse_warning_context): Parameter cl is now
21216 a WFL node. Use its value to initialize ctxp->elc.
21217 (redefinition_error): Parameter cl is now a WFL node.
21218 (parse_add_interface): New parameter wfl. No longer call
21219 lookup_cl, use wfl instead.
21220 (check_class_interface_creation): Parameter cl is now a WFL node.
21221 (maybe_create_class_interface_decl): Likewise.
21222 (add_superinterfaces): New function.
21223 (create_interface): Removed local cl, node, super_decl,
21224 super_decl_type. Function now uses id as a WFL node. Better
21225 warning/error report on obsolete or forbidden mix of
21226 modifiers. Now calls add_superinterfaces to register interfaces.
21227 (create_class): Removed local cl, node. Local variable id is used
21228 as a WFL node. Better error report on forbidden modifier
21229 mix. Uses add_superinterfaces to register interfaces.
21230 (find_field): Argument cl is now a WFL node. Now store the WFL
21231 node of a fields that needs to be checked for their
21233 (method_header): Local variable node non longer used. Local
21234 variable id replaces cl.
21235 (check_modifiers_consistency): Local variable cl is now a WFL
21237 (method_declarator): Local variable cl replaced by parameter id.
21238 (parser_qualified_name): Now uses parameter name as a WFL node.
21239 (parser_check_super_interface): New parameter wfl, for achieve
21240 greater accuracy during error reports.
21241 (parser_chain_incomplete_item): New parameter named location. Used,
21242 along the decl, to construct the incomplete item node.
21243 (java_complete_class): resolve_class now uses WFL node extracted
21244 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21246 (complete_method_decl): Unresolved function's argument types are WFL.
21247 (resolve_class): Parameter cl is now a WFL node.
21248 (resolve_and_layout): Likewise.
21249 (do_resolve_class): Likewise. Try first to use cl and then do the
21250 lookup on the decl when calling check_pkg_class_access.
21251 (complete_class_report_errors): Use IC_TYPE in place of
21252 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21253 instead of doing a lookup over the decl.
21254 (java_check_final): Use WFL info from field tree list.
21255 (lookup_cl): Rewritten and returns a statically defined WFL node.
21256 (lookup_modifier_cl): Now uses information from WFL nodes.
21257 (process_imports): Likewise.
21258 (read_import_dir): name and cl arguments replaced by a single WFL
21259 node. Function modified accordingly.
21260 (find_in_imports_on_demand): Now uses WFL node.
21261 (check_pkg_class_access): cl argument is now a WFL node.
21262 (declare_local_variables): Fixed to use WFL nodes.
21263 (resolve_expression_name): Likewise.
21264 (build_method_invocation_stmt): name_combo argument renamed
21265 wfl. Function modified to use WFL nodes.
21266 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21267 (lookup_method_invoke): cl is now a WFL node. Added missing
21268 IDENTIFIER_POINTER to class type decl name.
21270 1998-04-14 Dave Brolley <brolley@cygnus.com>
21272 * lang.c (init_parse): Now returns char* containing the filename.
21274 1998-04-10 Per Bothner <bothner@cygnus.com>
21276 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
21278 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
21279 * class.c (make_class_data): If flag_assume_compiled, initial class
21280 state is CSTATE_PREPARED; make superclass and interfaces direct
21281 references, rather than constant pool indexes.
21283 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21285 * parser.y: Include flags.h. Removed debug variable pl.
21286 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21287 (block:): Likewise.
21288 (labeled_statement_nsi:): Generate debug info when reducing
21289 expression_statement:.
21290 (check_pkg_class_access): get_access_flags_from_decl invocation
21291 fixed for new CLASS_* flags location.
21292 (source_end_java_method): Save/restore parser context when
21293 entering/leaving this routine. Restore lineno to its right value
21294 before calling expand_end_bindings.
21295 (build_method_invocation_stmt): build_invoke called with the
21296 current line information.
21297 (build_invoke): New argument cl. Wrap the function call around a
21299 (refine_accessible_methods_list): Changed comment, removed
21301 * parse.h: Fixed typo in comments.
21302 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21303 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21304 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21306 * lex.c (java_lex): Record the last closing curly bracket of a
21308 * jcf-parse.c (jcf_parse_source): Now calls
21309 java_check_methods. Clarified comment, fixed typo.
21311 1998-04-09 Dave Brolley <brolley@cygnus.com>
21313 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21314 (finish_parse): Expose for non USE_CPPLIB builds.
21316 1998-04-08 Jeffrey A Law (law@cygnus.com)
21318 * lang.c (lang_print_xnode): New function.
21320 1998-04-03 Per Bothner <bothner@cygnus.com>
21322 * decl.c (class_dtable_decl), java-tree.h: New tree node.
21323 * class.c (get_dispatch_vector, get_dispatch_table): New functions
21324 used to build a class's dispatch table.
21325 (make_class_data): Generate dispatch table if flag_assume_compiled.
21326 Set dtable of class object to address of class_dtable_decl.
21328 * decl.c (int_decl_processing): Make soft_badarrayindex_node
21329 be volatile and have side effects - generates better code.
21331 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
21332 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21334 * expr.c (expand_invoke): If class is final, method is
21335 effectively final, so can call it directly.
21337 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
21339 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
21341 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
21343 * parse.y (build_method_invocation_stmt): Removed extra argument
21346 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
21348 * expr.c (dtable_indent): Now static global.
21349 (expand_invoke): Now call invoke_build_dtable and
21350 build_invokevirtual.
21351 (invoke_build_dtable, build_invokevirtual): New functions.
21352 * jcf-io.c (find_class): Defer issuing a warning by setting
21353 jcf->outofsynch to 1.
21354 * jcf-parse.c (jcf_out_of_synch): New function.
21355 (load_class): Test this_jcf.outofsynch flag and call
21356 jcf_out_of_synch accordingly.
21357 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21358 comment indentation.
21359 * lex.c (java_get_unicode): Fixed code indentation.
21360 (java_lex): Create string literal. Fixed typo. Removed several
21361 premature obstack_free.
21362 * parse.h: New enums for name resolution and invocation mode.
21363 (struct qualification): New data structure.
21364 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21365 (do_resolve_class, build_method_invocation_stmt,
21366 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21367 debug_line, identical_subpath_p, invocation_mode,
21368 refine_accessible_methods_list, build_invoke,
21369 lookup_method_invoke): New functions declared.
21370 (build_invokevirtual, invoke_build_dtable, match_java_method,
21371 build_field_ref, jcf_out_of_synch): New references to external
21373 (struct parse_ctxt): Removed artificial_constructor field.
21374 * parse.y: (array_type:): Type defined for this rule.
21375 (class_type:): Installed default rule for interface_type:.
21376 (array_type:): Now build Java array type.
21377 (qualified_name:): Now use obstack_grow0.
21378 (method_declaration:): Skip the artificial constructor added to
21380 (abstract_method_declaration:): Execute the code only during pass 1.
21381 (block:): Installed default rule in block_statements:.
21382 (block_statement:): Add the statement to the method during pass 2.
21383 (statement_expression): Installed default rule for
21384 method_invocation:.
21385 (argument_list:): Added code to build the argument list.
21386 (method_invocation:): Added call to create the method invocation
21388 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21389 (debug_line): New function for debug.
21390 (complete_class_decl): No longer do something during pass 1.
21391 (method_header): Use BUILD_PTR_FROM_NAME.
21392 (parser_qualified_classname): Use obstack_grow0. Removed bogus
21394 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21395 function's main comment.
21396 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21398 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21399 (resolve_class): Now works with arrays.
21400 (do_resolve_class, resolve_and_layout): New functions.
21401 (java_check_regular_methods): Reverse method list before and after
21402 having processed it. No longer set ctxp->artificial_constructor.
21403 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21404 accordingly. Fixed typo in issued error message. Now use
21406 (find_in_imports_on_demand): Now use obstack_grow0.
21407 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21408 (source_end_java_method): Call expand_expr_stmt instead of
21409 expand_expr. Calls it before calling expand_function_end.
21410 (java_method_add_stmt): Do nothing if errors were found during
21412 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21413 (build_method_invocation_stmt, build_invoke, invocation_mode,
21414 lookup_method_invoke, refine_accessible_methods_list,
21415 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21417 * typeck.c (build_java_signature): Properly end method signature
21418 if return type skipped.
21419 (match_java_method): New function.
21421 1998-03-16 Per Bothner <bothner@cygnus.com>
21423 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
21425 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
21427 * expr.c (build_invoke_non_interface): New function.
21428 (methods_ident, ncode_ident): Now static globals.
21429 (expand_invoke): Use build_invoke_non_interface.
21430 * java-tree.h (struct lang_decl): New field function_decl_body.
21431 (DECL_FUNCTION_BODY): New macro.
21432 * jcf-parse.c (jcf_parse_source): Deeper check before setting
21433 CLASS_FROM_SOURCE_P.
21434 (parse_source_file): Fixed typos. Call java_layout_parsed_class
21435 before starting pass 2. Call to java_generate_parsed_class replaced
21436 by java_register_parsed_class.
21437 * lex.c: Fixed typo in header. Some line width related formating.
21438 * lex.h: Some line width related formating.
21439 * parse.h (source_end_java_method, resolve_expression_name,
21440 complete_class_decl, maybe_create_class_interface_decl,
21441 check_class_interface_creation): New static function declarations.
21442 (java_layout_parsed_class, java_method_add_stmt): New function
21444 (struct parser_ctxt): Field mark_class_generate removed. New
21445 fields class_list and artificial_constructor.
21446 * parse.y: Fixed typo in header.
21447 (class_declaration:): Call complete_class_decl when class body
21449 (method_declaration:): Call source_end_java_method in pass 2 when
21450 the method body is defined.
21451 (postfix_expression:): Do expression name resolution on sub-rule
21452 name during pass 2.
21453 (create_class, create_interface): Merged common pieces.
21454 (check_class_interface_creation, maybe_create_class_interface_decl):
21456 (complete_class_decl): New function.
21457 (register_fields): Fixed line width related typo.
21458 (method_header): Correctly skip first argument when fixing
21459 argument line. Changed the loop.
21460 (java_check_circular_reference): Now use ctxp->class_list.
21461 (java_complete_class): Removed start/stop marking.
21462 (java_check_regular_methods): Now takes a class decl as an
21463 argument. Add default constructor if none were encountered.
21464 (java_check_methods): Now use ctxp->class_list. Changed call to
21465 java_check_regular_methods.
21466 (source_start_java_method): Set DECL_ARG_TYPE for each function
21468 (source_end_java_method, java_method_add_stmt): New functions.
21469 (java_generate_parsed_class): No longer exists.
21470 (java_layout_parsed_class, java_register_parsed_class): New functions.
21471 (resolve_expression_name): New function.
21473 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21475 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21476 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
21477 until pass initializations are done. Call read_import_dir with
21479 * parse.h: (lookup_modifier_cl): New function declared.
21480 (INTERFACE_FIELD_MODIFIERS): New macro.
21481 (OBSOLETE_MODIFIER_WARNING): New macro.
21482 * parse.y: (register_fields): Class type and current field name in
21483 local variables. Check modifier(s) if adding field(s) to an interface.
21484 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
21485 and report errors using the faulty modifier line context.
21486 (lookup_modifier_cl): New function.
21487 (read_import_dir): Detect and report default import processing
21490 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
21492 Add a pair of -fassume-compiled/-fno-assume-compiled options.
21493 * class.c (is_compiled_class): Return 1 after making sure it
21494 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
21495 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21496 * java-tree.h (flag_assume_compiled): Add decl.
21497 * lang.c (lang_f_options): Add the flag.
21498 (flag_assume_compiled): Add decl, default to 0.
21500 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
21502 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21503 (is_compiled_class): Likewise.
21504 (layout_class): Likewise.
21505 (layout_class): Detect and lay out classes defined in source code.
21506 (interface_of_p, add_interface_do, may_add_interface): New
21508 (add_interface): Now use add_interface_do.
21509 (add_method_1): New function.
21510 (add_method): Now use add_method_1.
21511 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21512 (complete_start_java_method): New function.
21513 (start_java_mehod): Now call complete_start_java_method.
21514 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21515 (expand_invoke): Likewise and fixed typo.
21516 *gjava.c: (print_super_field): Use new argument to find_class
21519 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
21520 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21521 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21523 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
21524 (add_method_1, push_class): New prototypes.
21525 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21526 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
21527 directory where the class was found.
21528 (find_class): New argument DO_CLASS_FILE. Function find_class
21529 modified accordingly.
21530 *jcf-parse.c: (fix_class_path): New function.
21531 (load_class): Use new VERBOSE argument. load_class now finds and
21532 loads/parses .class/.java files. Save read_state of current_jcf
21534 (java_parser_abort_on_error): New macro.
21535 (jcf_parse_source, parse_source_file): New function.
21536 (jcf_parse): Fixed typo.
21537 (yyparse): Call parse_source_file () only.
21538 (process_zip_dir): Fixed typo, fix zdir->filename_length when
21539 writing the real class name back in the zip directory entry.
21540 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21541 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21542 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21543 (find_class): Prototype fixed.
21544 *lex.c: Added 1998 time stamp.
21545 Removed all static global variables, moved into the parser
21546 context data structure.. Now include unistd.h if SEEK_SET not
21548 (java_init_lex): Rewritten.
21549 (java_sneak_unicode): Modified current unicode access in current line.
21550 (java_unget_unicode): Likewise.
21551 (java_allocate_new_line): New allocation management.
21552 (java_read_char): Modified access and storage of unget_utf8_value.
21553 New way of processing current unicode.
21554 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
21555 (java_get_unicode): Now use the parser context.
21556 (java_lineterminator): Likewise.
21557 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
21558 of the reentrant parser implementation. Function now use the
21559 parser context data structure and java_lval. Fixed production of
21560 the float and double constant "out of range" error message. Fixed
21561 obstack use. Return integer value when hitting a modifier. Now
21562 return type for TRUE, FALSE and other predefined types. Return
21563 identifier as a TREE_LIST list containing the current line context
21564 as the TREE_VALUE sub-node.
21565 (java_unicode_2_utf8): Fixed typo in declaration.
21566 (java_lex_error): Now use the parser context data structure.
21567 *lex.h: Added 1998 time stamp.
21568 (struct java_line): New fields ref_count and next.
21569 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21570 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
21571 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
21572 *parse.h: Added 1998 time stamp.
21573 (java_parse_source_file): Renamed from parse_source_file.
21574 (YYERROR_NOW, YYNOT_TWICE): Fixed.
21575 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
21576 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
21577 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
21578 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
21579 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
21580 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
21581 (struct parser_ctxt): New data structure to keep the parser context.
21582 *parse.y: Added 1998 time stamp, got rid of static global variables.
21583 (java_error_count, ctxp): New global variables.
21584 (%union): New value field.
21585 (numeric_type, integral_type): Rules removed.
21586 (primitive_type): Rule defined to handle integral, float, double and
21588 (qualified_name, package_declaration,
21589 single_type_import_declaration, type_import_on_demand_declaration,
21590 modifiers, class_declaration, super, interfaces,
21591 interface_type_list, class_body, field_declaration,
21592 field_declaration, variable_declarators, variable_declarator,
21593 variable_declarator_id, method_declaration, method_header,
21594 formal_parameter_list, formal_parameter, method_body, block,
21595 static, interface_declaration, extends_interfaces,
21596 abstract_method_declaration, local_variable_declarators): Rules now
21598 (force_error, do_warning): New global statics.
21599 (push_parser_context, parser_context_save_global,
21600 parser_context_restore_global, pop_parser_context): New functions.
21601 (yyerror): Now uses the global parser context. Fixed use of obstack.
21602 (parse_error, parse_error_context, parse_warning_context,
21603 java_accstring_lookup, redefinition_error, check_modifiers,
21604 parser_add_interface, create_interface, create_class, find_field,
21605 duplicate_declaration_error, register_fields, method_header,
21606 check_modifiers_consistency, check_abstract_method_header,
21607 method_declarator, parser_qualified_classname,
21608 parser_check_super_interface, parser_check_super,
21609 parser_chain_incomplete_item, java_check_circular_reference,
21610 layout_class_from_source, java_complete_class,
21611 complete_method_decl, resolve_class, complete_class_report_errors,
21612 java_check_final, check_method_redefinition,
21613 java_check_regular_methods, java_check_abstract_methods,
21614 java_check_methods, lookup_java_interface_method2,
21615 lookup_java_method2, lookup_cl, find_name_in_single_imports,
21616 process_imports, find_in_imports, read_import_entry,
21617 read_import_dir, find_in_imports_on_demand,
21618 check_pkg_class_access, not_builtin_p, declare_local_variables,
21619 source_start_java_method, java_generate_parsed_class): New
21621 *typeck.c: (signature_include_return): New global variable.
21622 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
21623 to add the function returned type in the signature.
21625 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
21627 * jcf-io.c (open_in_zip): Use strncmp and LEN.
21629 1998-01-29 Dave Brolley <brolley@cygnus.com>
21631 * Make-lang.in (java.info): Added.
21632 (java.install-info): Added
21634 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
21636 * Makefile.in (clean): Also remove java/parse.c.
21638 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
21640 Add a pair of -fbounds-check/-fno-bounds-check options.
21641 * lang.c (lang_decode_option): Add code to grok arguments.
21642 (flag_bounds_check): Add decl.
21643 (lang_f_options): New array w/ the option in it.
21644 * java-tree.h (flag_bounds_check): Add decl.
21645 * lang-options.h: New file.
21646 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
21647 of a static macro value.
21648 (JAVA_ARRAY_EXCEPTION): Delete macro.
21650 1998-01-23 Per Bothner <bothner@cygnus.com>
21652 * typeck.c (build_java_array_type): Fix two bugs in previous change.
21653 * expr.c (build_anewarray): Add missing promote_type.
21655 1998-01-22 Per Bothner <bothner@cygnus.com>
21657 Add array types with known length to optimize bounds checking.
21658 * typeck.c (build_java_array_type): Take length parameter.
21659 (java_array_type_length, build_prim_array_type): New functions.
21660 * java-tree.h: Update for new functions.
21661 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
21662 * class.c: Use build_prim_array_type.
21663 * expr.c (can_widen_reference_to): Handle known-length array types.
21664 (verify_jvm_instructions): Keep track of integer push instructions
21665 followed by newarray/anewarray, so we can build known-length arrays.
21666 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
21667 (java_array_data_offset): New function.
21668 (build_java_array_length_access): New function. Optimize if constant.
21669 (build_java_arrayaccess): Constant fold bounds check.
21670 (expand_java_newarray, expand_java_anewarray): Replaced by ...
21671 (build_newarray, build_anewarray): New functions.
21672 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
21673 * verify.c (merge_types): Handle known-lengh array types.
21675 1998-01-19 Per Bothner <bothner@cygnus.com>
21677 * expr.c (expand_byte_code): Fix performace bug, which caused
21678 searching linenumber_table to be linear rather than constant.
21680 1997-12-12 Per Bothner <bothner@cygnus.com>
21682 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
21684 * decl.c, java-tree.h (soft_fmod_node): New global.
21685 * decl.c (init_decl_processing): Define __builtin_fmod.
21686 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
21687 using __builtin_fmod.
21689 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
21691 * keyword.h: New file, output of keyword.gperf as processed by
21693 * lex.c (java_lex_init): Initialize java_error_flag.
21694 * parse.c (YYERROR_NOW): Uses java_error_flag.
21695 * parse.y: New static java_error_flag. Useless definition of
21697 * parse.y (java_error): Portable error recovery using
21698 java_error_flag (not yet completely tuned).
21700 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
21702 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
21704 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
21706 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
21707 (parse.c, lex.c, keyword.h): New rules for Java source code
21709 * parse.c: Renamed into jcf-parse.c.
21710 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
21711 * keyword.gperf: New file, Java keywords.
21712 * parse.y: New file, Java language grammar.
21713 * parse.h: New file, Java language grammar definitions.
21714 * lex.c: New file, Java language lexer.
21715 * lex.h: New file, Java language lexer definitions.
21717 1997-12-03 Per Bothner <bothner@cygnus.com>
21719 * decl.c (clinit_identifier_node), java-tree.h: New global.
21720 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
21721 * verify.c (verify_jvm_instructions): Inline use of removed macros.
21722 * expr.c (expand_java_field_op): Check for invalid assignment
21725 * jcf-reader.c (get_attribute): Test for wrong attribute length.
21727 1997-10-27 Per Bothner <bothner@cygnus.com>
21729 * verify.c (verify_jvm_instructions): When processing a handler,
21730 attempt to set the current_subr to the right value.
21731 (More complicated code combines Sep 17 and Oct 22 versions.)
21733 1997-10-24 Per Bothner <bothner@cygnus.com>
21735 * class.c (push_class): Figure out (guess) name of source file.
21736 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
21737 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
21738 (parse_class_file): Change return type from int to void.
21739 Call debug_start_source_file/debug_end_source_file.
21741 * expr.c (build_java_binop): Fix masking 2nd operand.
21742 * decl.c (init_decl_processing): Set sizetype first.
21744 1997-10-22 Per Bothner <bothner@cygnus.com>
21746 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
21747 (Revert Sep 17 change.)
21749 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
21751 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
21752 .class extension in their name and fix thing so we don't process
21753 them parse_zip_file_entries().
21754 (parse_zip_file_entries): Cleaned unused local variables.
21756 1997-10-20 Per Bothner <bothner@cygnus.com>
21758 * expr.c (can_widen_reference_to): Allows equal array element types.
21759 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
21760 * jcf-dump.c (RET): Get (and print) index.
21762 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
21763 Promote element type to POINTER_TYPE.
21765 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
21767 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
21768 find_in_current_zip, jcf_figure_file_type): Moved from
21769 jcf-reader.c to parse.c.
21770 * zextract.c: (read_zip_archive): takes file_comment_length possible
21771 field into account.
21773 1997-10-20 Per Bothner <bothner@cygnus.com>
21775 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
21777 * verify.c (merge_types): Handle array types even better ...
21779 1997-10-17 Per Bothner <bothner@cygnus.com>
21781 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
21783 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
21784 * class.c (make_class_data): Don't build fields_decl if no fields.
21785 When building fields_decl, skip if DECL_ARTIFICIAL.
21787 * expr.c (java_stack_swap): Update stack_type_map.
21788 * verify.c (merge_types): Handle array types better.
21790 1997-10-15 Per Bothner <bothner@cygnus.com>
21792 * class.c (add_field): Don't promote short integral fields to
21793 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
21794 * expr.c (push_value): Promote and convert short integral values.
21796 * decl.c, java-tree.h (integer_two_node): New constant node.
21797 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
21799 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
21801 * class.c (append_gpp_mangled_type): Use function argument
21802 unpromoted type to generate mangled name.
21804 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
21806 * constants.c (build_constant_data_ref): Now uses current_class
21807 instead of main_class.
21808 (build_constants_constructor): Now uses current_class instead of
21810 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
21811 of the global variable SeepZipFiles done here.
21812 * zextract.c (read_zip_archive): extra_field optional field taken
21813 into account while computing the position of the class file in the
21815 * verify.c (verify_jvm_instructions): Use current_jcf to search
21817 * parse.c (load_class): First search for the class to load in the
21818 current zip file. Saves current_jcf (restored before returning
21819 from that function). Don't call JCF_FINISH in the class was found
21820 in the current ZIP file.
21821 (jcf_parse): If the class was found in the current ZIP file, save
21822 its tree_constant_pool (for later reuse).
21823 (parse_class_file): New function. Process each method defined in
21824 the current class and record the class as to be later registered.
21825 (yyparse): Rewritten. Figure the type of the current file and switch
21827 * lang.c: New global variable current_jcf.
21828 (lang_init): Removed compiling_from_source test (done later, in
21829 yyparse). Removed call the jcf_parse ().
21830 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
21831 (typedef struct JCF): New fields seen_in_zip (to mark a class found
21832 in the current ZIP file) and zip_offset (offset to the class data in
21833 the current zip file).
21834 * jcf-reader.c: zipfile.h included.
21835 localToFile: New ZipFileCache static global variable
21836 (parse_zip_file_entries): New function. Browse the current ZIP
21837 file directory and process each class found.
21838 (process_zip_dir): New function. Register each class found in the
21839 ZIP file directory. The class aren't parsed but a valid JCF is
21840 link to each of them.
21841 (find_in_current_zip): New function. Search for a class in the
21842 current ZIP file directory. If found, prepare the class so that it
21844 (jcf_figure_file_type): New function. Examine the file structure
21845 to figure a class file, a ZIP file. If none of these categories are
21846 matched, a source file is assumed.
21847 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
21848 SeenZipFile: New global variable.
21849 (open_in_zip): Use zipmember's length to accelerate the search for
21850 a member. If zipmember was NULL and zip file successfully read,
21852 * java-tree.h: New global variable current_jcf declared. Added
21853 declaration for current_constant_pool_tags, current_constant_pool_data,
21854 current_constant_pool_length, current_constant_pool_data_ref.
21855 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
21856 store the JCF of classes seen in a zip file) and tree *constant_pool
21857 (to save a loaded class constant pool). current_class declared here.
21858 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
21859 retrieve method_ref_constant.
21860 (PUSHC): java_push_constant_from_pool now uses current_jcf.
21861 (OBJECT): get_class_constant now uses current_jcf.
21862 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
21863 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
21864 (expand_invoke): Now uses current_class instead of main_class
21865 (build_class_init): Now uses current_class instead of main_class
21866 * class.c: New static global variable registered_class.
21867 (register_class): New function.
21868 (emit_register_class): Modified to use registered_class instead of
21870 (is_compiled_class): Now take into account class seen in the archive.
21872 1997-10-06 Per Bothner <bothner@cygnus.com>
21874 * except.h: Renamed to: java-except.h.
21875 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
21876 * except.c: Add semi-working (commented out) implementation.
21878 * expr.c (expand_iinc): Add needed flush_quick_stack.
21879 * parse.c (set_source_filename): New function.
21880 (give_name_to_class): Set input_filename from package.classname.java.
21882 * jcf-io.c (find_class): Don't look first in ".".
21884 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21886 * zextract.c (read_zip_archive): Now takes into account the
21888 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
21890 1997-09-20 Per Bothner <bothner@cygnus.com>
21892 * constants.c, java-tree.h (build_internal_class_name): New function.
21893 (alloc_class_constant): Re-implement using build_internal_class_name.
21894 * class.c (make_class_data): Likewise.
21895 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
21897 1997-09-17 Per Bothner <bothner@cygnus.com>
21899 * verify.c (verify_jvm_instructions): Temporarily set current_subr
21900 to NULL before pushing an exception handler target.
21902 * expr.c (flush_quick_stack): Save from low stack indexes to high.
21903 (java_stack_swap, java_stack_dup): Re-write to be safe from
21904 clobbering registers.
21905 (build_class_init): New function.
21907 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
21909 * typeck.c (build_java_array_type): Temporary use
21910 permanent_obstack to create the array 'length' field.
21911 * expr.c (lookup_label): Temporay use permanent_obstack to create
21912 label if not found.
21913 * class.c (push_super_field): Tempory use permanent_obstack.
21915 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
21917 * typeck.c (type_for_mode): Now handles double_type_node and
21919 * verify.c (verify_jvm_instructions): The instruction following
21920 the wide bytecode is checked. OPCODE_ret added to the list of
21923 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
21925 * class.c (make_class): Temporary use permanent_obstack. Set the
21926 class CLASS_P field to 1.
21927 (push_class): Temporary use permanent_obstack.
21928 (set_super_info): Temporary use permanent_obstack.
21929 (add_method): Temporary use permanent_obstack, set
21930 METHOD_TRANSIENT().
21931 (add_field): Temporary use permanent_obstack. Sets
21932 FIELD_VOLATILE() and FIELD_TRANSIENT().
21933 (build_class_ref): Temporary use permanent_obstack if the class
21935 (build_static_field_ref): Temporary use permanent_obstack when
21936 creating field's rtl.
21937 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
21938 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
21939 and fields. Function finalized, as far as flag handling.
21940 (push_class_static_dummy_field): Temporary use permanent_obstack.
21941 (emit_register_class): Force generation of class registration at
21943 * decl.c (end_java_method): Call permanent_allocation() before
21945 * expr.c (can_widen_reference_to): Added comment to interface
21946 handling, fixed typo.
21947 (lookup_field): Now uses CLASS_P() to correct FIXME
21948 (expand_invoke): Verification on public && !static &&
21949 !abstract moved into soft_lookupinterfacemethod (kaffe).
21950 Use Object class dtable if objectref is an array when expanding
21952 (java_push_constant_from_pool): Temporary use permanent_obstack
21953 for CONSTANT_string
21954 * parse.c (get_ref_constant): Temporary use permanent_obstack to
21955 create constant references.
21956 (get_constant): Temporary use permanent_obstack to create constant.
21957 (load_class): Temporary use permanent_obstack to load class.
21958 (jcf_parse): Temporary use permanent_obstack to perform class
21960 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
21961 (build_java_signature): Temporary use permanent_obstack.
21962 * verify.c: (verify_jvm_instruction): removed unnecessary verification
21964 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
21965 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
21968 1997-09-11 Per Bothner <bothner@cygnus.com>
21970 * class.c (append_gpp_mangled_type): Fix typo.
21971 (emit_register_class): Use main_class to get class object, rather
21972 than looking for no-longer-existing static decl starting with _CL.
21973 * typeck.c (parse_signature_type): Promote array element type
21974 if it is a RECORD_TYPE.
21976 1997-09-10 Per Bothner <bothner@cygnus.com>
21978 * class.c (push_class_static_dummy_field): New function.
21979 (mangle_static_field): New. Do G++-style mangling of static fields.
21980 (layout_class): Mandle static fields here, not in add_field.
21981 (build_class_ref): The class object is now a dummy static field.
21982 * decl.c (find_local_variable): Look for best, instead of first match.
21983 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
21984 (build_java_athrow): Don't check here if exception is Throwable.
21985 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
21986 (TYPE_USED): Removed. No longer used ...
21987 * parse.c (jcf_parse): Call push_class_static_dummy_field.
21988 * verify.c (push_pending_label): New function.
21989 (push_pending_block): Renamed to check_pending_block.
21990 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
21991 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
21992 re-checking possible handlers) after a store (less wasted work).
21993 Check for null handler (finally) before calling add_handler.
21994 Various changes to (finally?) correctly handle try/finally.
21996 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
21998 * class.c: Include stdio.h.
22000 1997-09-04 Per Bothner <bothner@cygnus.com>
22002 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22003 to make sure class is initialized before static/special invoke.
22005 * verify.c (verify_jvm_instructions): On a store instruction,
22006 call find_local_variable to force pre-allocation of decl and rtx.
22007 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
22009 1997-09-03 Per Bothner <bothner@cygnus.com>
22011 * class.c (build_class_ref): Strip off "promoted_" if need be.
22012 (make_field_value): Call build_java_signature when needed.
22013 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
22014 * expr.c (build_java_athrow): Don't push_value of exception.
22015 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22016 match specification of [fd]cmp[lg] for NaNs.
22017 (expand_byte_code): Add support for exception handler ranges.
22018 * except.c: Add skeleton for EH code-generation.
22019 * verify.c (merge_types): Treat all promoted integral types as equal.
22020 * constants.c (build_constants_constructor): To force creation of
22021 current_constant_pool_data_ref, call build_constant_data_ref.
22023 * javaop.def (lload): Fix typo.
22024 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
22026 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
22028 * parse.c: Don't include function.h.
22030 1997-08-27 Per Bothner <bothner@cygnus.com>
22032 * except.[ch]: New files.
22033 * Makefile.in (JAVA_OBJS): Add except.o
22034 * expr.c: Temporary warning about unimplemented exceptions.
22035 * verify.c: Verify exception handlers.
22037 * jcf-dump.c (disassemble_method): Print exception table.
22039 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
22041 * expr.c (verify_jvm_instructions): Started a thorough
22042 verification of invoke* bytecodes.
22043 (expand_byte_code): flush quick stack if PC is the target of a
22044 branch. and undef RET (conflicting with config/i386/i386.h).
22045 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22047 (expand_invoke): Now handles invokeinterface and do more
22048 verification according to the bytecode.
22049 (lookup_field): Don't try to load the class if processing
22051 (can_widen_reference_to): Now handles interfaces.
22052 * decl.c (init_decl_processing): New global variable
22053 soft_lookupinterfacemethod_node, declared in java-tree.h.
22054 Call set_super_info on string_type_node.
22055 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22057 * class.c (set_super_info): Fills the CLASS_* flags according to
22059 (get_access_flags_from_decl): Handles all class flags.
22061 1997-08-26 Per Bothner <bothner@cygnus.com>
22063 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
22064 * parse.c (yyparse): Check for abstract method, and missing code.
22065 * expr.c (expand_byte_code): Change interface.
22066 * lang.c (put_decl_node): Print promoted types prettier.
22067 * verify.c (verify_jvm_instruction): Change interface.
22068 Partial support for scanning exception table.
22069 For load instructions, handle promoted integral types.
22071 1997-08-21 Per Bothner <bothner@cygnus.com>
22073 * verify.c: New file, with contents moved from expr.c.
22074 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
22075 * typeck.c (is_array_type_p): Moved here from expr.c.
22076 * java-tree.h: Add some now-needed function declarations.
22077 * Makefile.in (JAVA_OBJS): Added verify.o.
22079 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22081 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22082 METHOD_ABSTRACT flag.
22084 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22085 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22086 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22088 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22090 (start_java_method): Hook for SYNCHRONIZED methods.
22092 * expr.c (build_java_jsr, build_java_ret): New functions
22093 (JSR,PRE): New macros
22094 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22095 (verify_jvm_instructions): tableswitch, lookupswitch,
22096 monitorenter, monitorexit, goto_w: verified.
22097 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22098 (build_java_monitor): New function.
22099 (MONITOR_OPERATION): Modified to call build_java_monitor()
22100 (verify_jvm_instructions): Started a thorough verification of
22103 1997-08-19 Per Bothner <bothner@cygnus.com>
22105 Support verification of jsr/ret subroutines (used for try/finally).
22106 * decl.c (return_address_type_node): New type node.
22107 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22108 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22109 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
22110 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22111 TYPE_USED): New macros for special types in type_map.
22113 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
22114 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
22116 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
22118 * expr.c (can_widen_reference_to): New function.
22119 (pop_type): Use it.
22120 (merge_type_state): Support handling start of subroutine.
22121 (push_pending_block): Return char* error message, instead of calling
22122 fatal on an error. Also handle subroutines.
22123 (verify_jvm_instructions): Handle errors from push_poending_block.
22124 Support jsr and ret instructions.
22126 1997-08-19 Per Bothner <bothner@cygnus.com>
22128 * jcf-io.c (find_classfile): Fix thinko.
22129 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
22131 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
22133 * Makefile.in (BISON): Remove.
22135 1997-08-07 Per Bothner <bothner@cygnus.com>
22137 * Makefile.in: Convert to autoconf.
22138 * config-lang.in (outputs): Added java/Makefile.
22140 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22141 Rename cc1java to jc1.
22143 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
22144 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
22146 * class.c (class_depth): Do load_class if needed.
22148 Mostly better verification.
22149 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
22150 (init_decl_processing): Change return type of soft_checkcast.
22151 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
22152 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22153 lang_print_error): New functions.
22154 (lang_init): Set global hook print_error_function to lang_print_error.
22155 * expr.c: In the type_map ptr_type_node is only used for null now.
22156 (pop_type, merge_types): Hence ptr_type_node matches any reference.
22157 (merge_types): Dererence pointer to record types before comparing.
22158 (decode_newarray_type, merge_types): On error just return NULL.
22159 (build_java_binop): Add preliminary implementation (with warning)
22160 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22161 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
22162 (expand_compare, expand_java_goto, expand_java_call): Don't
22163 push_pending_block, since that only makes sense when verifying.
22164 (merge_type_state): Different return codes.
22165 (push_pending_block): A block may need to be verified more than once.
22166 (expand_byte_code): Warn about unused code at code generation time.
22167 (verify_jvm_instruction): Changed logic, since code may need to be
22168 re-verified if type-state has changed. Also, better error handling.
22169 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22170 Improve newarray, anewarray, ?aload, athrow,
22171 * java-tree.h (LABEL_CHANGED): New macro.
22173 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
22175 * decl.c (soft_athrow_node): New global variable initialized.
22176 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22177 * typeck.c (convert): Added support for REAL_TYPE.
22178 (convert_to_char): New function.
22179 (convert): Handle CHAR_TYPE.
22180 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22181 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22182 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22184 (verify_jvm_instructions): Added break a the end of bogus unop: label.
22185 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22186 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22187 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22188 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22189 to Use The Right Things.
22190 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22191 compatible with INT. BOOLEAN is made equivalent to BYTE.
22192 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22193 OPCODE_ifnonnull): Now supported.
22194 (build_java_athrow): New function.
22196 1997-08-04 Per Bothner <bothner@cygnus.com>
22198 Rename method name <init> to match G++ (and fix mangling).
22199 * class.c (layout_class): Replace method name of <init> by class name.
22200 (make_method_value): Do inverse renaming of constructor from <init>.
22201 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
22202 * typeck.c (lookup_java_constructor): New function.
22203 * expr.c (expand_invoke): If method_name is <init>, call
22204 lookup_java_constructor to find constructor.
22206 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
22208 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22210 * parse.c (get_class_constant): Modified to handle array "classes"
22211 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22213 (convert): Modified to handle real type.
22214 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22215 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22216 variables declared.
22217 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22218 soft_multianewarray, soft_newarray_node, soft_throw_node): New
22219 global variables initialized.
22220 (find_local_variable): Handles the case of a pointer
22221 (end_java_method): Restore the use of one more scope
22222 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22223 build_java_array_length_access, expand_java_arrayload,
22224 expand_java_arraystore, expand_java_array_length,
22225 expand_java_multianewarray, expand_java_anewarray,
22226 build_java_check_indexed_type, is_array_type_p,
22227 build_java_throw_out_of_bound_exception): New functions.
22228 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22229 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22230 OPCODE_<t>aload): Implemented code for verification.
22231 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22232 ARRAY_NEW_MULTI): Macro defined.
22233 (CONVERT): Modified to invoke convert().
22234 (case OPCODE_aload2): Fixed index typo from 2 to 1.
22236 1997-07-31 Per Bothner <bothner@cygnus.com>
22238 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
22239 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
22240 (make_class_data): Field name needs '/' as package prefix.
22241 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
22243 1997-07-25 Per Bothner <bothner@cygnus.com>
22245 Implement debug information for local variables.
22246 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22247 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22248 DECL_LOCAL_SLOT_CHAIN): New macros.
22249 (struct lang_decl_var): New type.
22250 * parse.c (give_name_to_locals): Move to decl.c.
22251 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
22252 (start_java_method): Re-write parameter handling.
22253 (pending_local_decls): New global variable.
22254 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
22255 (find_local_variable): Accept pc so we can skips decls not in range.
22256 (struct binding_level): Add end_pc field.
22257 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22258 (various): Change so current pc gets passed to find_local_variable.
22260 * decl.c (init_decl_processing): Re-arrange fields in
22261 class_type_node and and method_type_node to match kaffe 0.9.1.
22262 * class.c (make_method_value, make_class_data): Update
22263 initializations to match.
22265 1997-07-16 Per Bothner <bothner@cygnus.com>
22267 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22268 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
22269 (push_super_field): New function.
22270 (make_class_data): Handle inheritance of class static initializer.
22271 (layout_class): New name mangling.
22272 * constants.c (build_constant_data_ref): Init type of data array
22273 to a one-element array.
22274 (build_constants_constructor): Set DECL_SIZE from complete array type.
22275 * decl.c: Rename class_type, object_type etc to class_type_node,
22276 object_type_node etc. Make former inherit from latter.
22277 * expr.c (expand_invoke): Add cast of function address.
22278 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
22279 * parse.c (yyparse): Don't call layout_class here.
22280 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
22282 1997-06-14 Per Bothner <bothner@cygnus.com>
22284 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
22285 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
22286 (alloc_class_constant): New.
22287 * expr.c (expand_invoke): Make sure method's class is initialized.
22288 * class.c (interits_from_p, emit_register_class): New functions.
22289 * parse.c (yyparse): Call emit_register_class.
22291 1997-06-09 Per Bothner <bothner@cygnus.com>
22293 * constants.c: New file, to handle constant pool.
22294 * Makefile.in (JAVA_OBJS): Add constants.o.
22295 * decl.c (init_decl_processing): Update, fix, finish various structs.
22296 (pushdecl_top_level): New.
22297 * parse.c (layout_class): Moved to class.c.
22298 * expr.c (java_push_constant_from_pool): New function.
22299 * class.c (build_class_ref): Make work fully
22300 (make_class_data): Emit super-class, constant pool, interface vector.
22302 1997-06-03 Per Bothner <bothner@cygnus.com>
22304 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
22305 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
22306 * class.c (class_depth): New function.
22307 (lookup_named_class): Replaced by new function lookup_class.
22308 * decl.c (object_type_node, string_type_node): New.
22309 Remove various types that we no longer need.
22310 * expr.c (verify_jvm_instructions): New separate verifier pass.
22311 (push_type, pop_type): New functions for verifier.
22312 (type_stack_dup, pop_argument_types, merge_types): Likewise.
22313 (expand_byte_code): Simplify, since we assume already verified.
22314 (expand_invoke): Now mostly works.
22315 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22316 * lang.c (main_class): Move to parse.c. Don't make_class yet.
22317 * parse.c: Wait to allocate class object until we know its name.
22318 (layout_class): Calculate DECL_VINDEX for each virtual method.
22319 * typeck.c (get_array_type): Rename to ...
22320 (build_java_array_type): ... and provide working implementation.
22321 (build_java_signature): New function - build Java signature of type.
22322 (set_java_signature): New function - cache signature with type.
22323 (lookup_java_method): New function.
22325 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
22327 * class.c (ident_subst): Take extra SUFFIX parameter.
22328 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
22329 (set_constant_value, build_static_field_ref, is_compiled_class): New.
22330 (build_class_ref): Actually implement.
22331 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
22332 * decl.c (builtin_function): New.
22333 (init_decl_processing): Update for current Kaffe. Declare some
22334 builtin Kaffe functions.
22335 * expr.c (build_address_of): New.
22336 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22337 Renamed (from expand_java_new etc), and added working implementations.
22338 (build_field_ref): Now also handle static fields.
22339 (expand_invoke): Implement invokestatic, and start implement rest.
22340 * java-opcodes.h: Use javaop.def to avoid duplicated list.
22341 * javaop.def: Rename invokevirt -> invokevirtual.
22342 * lang.c (use_handles): Removed.
22343 * parse.c: Add support for ConstantValue attribute.
22344 Handle nested loading of a class. (JPOOL_UTF): New.
22346 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
22348 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
22350 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
22352 * Make-lang.in (java.install-man): New empty rule.
22353 * typeck.c (set_local_type): New function.
22354 * expr.c (STORE_INTERNAL): Call find_local_variable,
22355 not find_stack_slot. Call set_local_type.
22357 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
22359 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
22360 and building RECORD_TYPE CONSTRUCTORs.
22361 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22363 * lang.c (use_handles): Change the default to 0.
22364 * decl.c: Define and build class_type, field_type, utf8const_type.
22365 * class.c (make_class_data, make_field_value,
22366 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22367 hashUtf8String, strLengthUtf8, mangled_classname:
22368 Functions to build reflective data structures.
22369 * parse.c (yyparse): Call make_class_data.
22371 * jcf-io.c (open_class, find_classfile): New functions.
22372 * jcf-dump.c: Support reading classfile from explicitly-named
22373 class file (without CLASSPATH searching).
22375 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22377 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
22378 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22379 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22380 (get_constant): Now trivial for CONSTANT_Utf8.
22382 * jcf.h: Make NEW_CPOOL the default.
22383 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
22385 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22390 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
22391 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
22393 Copying and distribution of this file, with or without modification,
22394 are permitted in any medium without royalty provided the copyright
22395 notice and this notice are preserved.