1 2010-12-03 Joseph Myers <joseph@codesourcery.com>
3 * lang.opt (static-libgcj): New option.
5 2010-12-01 Joseph Myers <joseph@codesourcery.com>
7 * jcf-parse.c: Don't include toplev.h.
8 * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
10 2010-11-30 Joseph Myers <joseph@codesourcery.com>
12 * boehm.c: Don't include toplev.h.
13 * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
15 2010-11-30 Joseph Myers <joseph@codesourcery.com>
17 * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
18 verify-glue.c: Don't include toplev.h.
19 * Make-lang.in: Dependencies for above files changed to remove
22 2010-11-29 Joseph Myers <joseph@codesourcery.com>
24 * boehm.c: Include "config.h" instead of <config.h>.
25 * builtins.c: Don't include <stdarg.h>.
26 * class.c: Don't include "stdio.h".
27 (O_BINARY): Don't define here.
28 * jcf-depend.c: Don't include <assert.h>.
29 (jcf_dependency_set_dep_file, jcf_dependency_init,
30 jcf_dependency_write): Use gcc_assert.
31 * jcf-io.c (O_BINARY): Don't define here.
32 * jcf-path.c: Don't include "tm.h".
33 (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
34 * resource.c: Don't include "stdio.h".
35 (O_BINARY): Don't define here.
36 * verify-impl.c: Don't include <stdio.h>.
38 2010-11-17 Joseph Myers <joseph@codesourcery.com>
40 * jcf-parse.c (java_parse_file): Take no arguments.
41 * java-tree.h (java_parse_file): Update prototype.
43 2010-11-09 Joern Rennecke <amylaar@spamcop.net>
44 Andrew Haley <aph@redhat.com>
47 * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
49 2010-11-12 Joseph Myers <joseph@codesourcery.com>
51 * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
52 * lang.c (java_handle_option): Take location_t parameter.
54 2010-11-10 Joseph Myers <joseph@codesourcery.com>
56 * expr.c (expand_java_field_op): Use %' in diagnostic.
57 * jcf-parse.c (java_parse_file): Use %' in diagnostics.
58 * jvspec.c (lang_specific_driver): Use %' in diagnostic.
59 * lang.c (java_post_options): Use %' in diagnostics.
61 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
64 * class.c: Include target.h.
65 (make_local_function_alias):
66 Use targetm.asm_out.generate_internal_label.
67 * expr.c (lookup_label, generate_name): Likewise.
69 2010-11-03 Joern Rennecke <joern.rennecke@embecosm.com>
72 * jfc-parse.c (target.h): Include.
73 (handle_constant): Use targetm.words_big_endian and
74 targetm.float_words_big_endian.
75 (get_constant): Use targetm.float_words_big_endian.
77 2010-10-13 Richard Henderson <rth@redhat.com>
79 * lang.c (java_eh_personality): Update call to
80 build_personality_function.
82 2010-10-12 Joseph Myers <joseph@codesourcery.com>
84 * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
87 2010-10-11 Nathan Froyd <froydnj@codesourcery.com>
89 * decl.c (java_init_decl_processing): Use build_function_type_list
90 instead of build_function_type.
91 * jcf-parse.c (java_emit_static_constructor): Likewise.
92 * builtins.c (initialize_builtins): Likewise.
94 2010-10-08 Joseph Myers <joseph@codesourcery.com>
96 * lang.c (java_init_options_struct): New. Split out from
98 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
100 2010-10-04 Andi Kleen <ak@linux.intel.com>
102 * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
105 2010-09-29 Joseph Myers <joseph@codesourcery.com>
107 * lang.opt: Don't use VarExists.
109 2010-09-29 Joseph Myers <joseph@codesourcery.com>
111 * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
112 flag_force_classes_archive_check, flag_redundant, flag_newer,
113 flag_use_divide_subroutine, flag_use_atomic_builtins,
114 flag_use_boehm_gc, flag_hash_synchronization,
115 flag_check_references, flag_optimize_sci, flag_indirect_classes,
116 flag_indirect_dispatch, flag_store_check,
117 flag_reduced_reflection): Remove.
118 * jcf-dump.c (flag_newer): Remove.
119 * jcf.h (quiet_flag): Remove.
120 * parse.h (quiet_flag): Remove.
122 2010-09-28 Richard Henderson <rth@redhat.com>
124 * lang.c: Include "target.h".
125 (java_eh_personality): Use targetm.except_unwind_info.
126 * Make-lang.in (lang.o): Update deps.
128 2010-09-27 Andrew Haley <aph@redhat.com>
131 * jvgenmain.c (main): Fix arg processing.
133 2010-09-22 Joseph Myers <joseph@codesourcery.com>
135 * jvspec.c (lang_specific_driver): Handle OPT__help instead of
137 * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
138 -dependencies, -encoding, -extdirs, -include-directory,
139 -include-directory=, -output-class-directory,
140 -output-class-directory=, -resource, -resource=,
141 -user-dependencies): New.
143 2010-09-16 Richard Guenther <rguenther@suse.de>
145 * jcf-parse.c (current_file_list): Remove.
146 (java_parse_file): Use build_translation_unit_decl. Adjust.
148 2010-09-03 Joseph Myers <joseph@codesourcery.com>
152 2010-09-03 H.J. Lu <hongjiu.lu@intel.com>
155 * jvgenmain.c (main): Check "-D XXX=YYY".
157 2010-09-02 Joseph Myers <joseph@codesourcery.com>
159 * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
161 2010-09-02 Joseph Myers <joseph@codesourcery.com>
163 * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
164 fCLASSPATH=): Mark as Java options and as aliases.
165 * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
166 (lang_specific_driver): Don't handle options marked as aliases.
167 * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
169 2010-08-22 Joseph Myers <joseph@codesourcery.com>
171 * Make-lang.in (jvspec.o): Update dependencies.
172 * jvspec.c: Include opts.h.
174 (find_spec_file): Do not add leading -specs=.
175 (lang_specific_driver): Use cl_decoded_option structures.
176 * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
177 extdirs, fmain=, s-bc-abi): New options.
179 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
181 * class.c: Use FOR_EACH_VEC_ELT.
183 * jcf-parse.c: Likewise.
184 * resource.c: Likewise.
186 2010-08-16 Joseph Myers <joseph@codesourcery.com>
188 * lang.opt (MD_, MMD_, version): Mark RejectDriver.
190 2010-08-05 David Daney <ddaney@caviumnetworks.com>
192 * class.c (build_utf8_ref): Fix code formatting from previous commit.
194 2010-08-05 David Daney <ddaney@caviumnetworks.com>
196 * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
198 2010-07-27 Joseph Myers <joseph@codesourcery.com>
200 * lang.c (java_handle_option): Update prototype and return value
203 2010-07-27 Joseph Myers <joseph@codesourcery.com>
205 * lang.c (java_option_lang_mask): New.
206 (java_init_options): Update prototype.
207 (LANG_HOOKS_OPTION_LANG_MASK): Define.
209 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
211 * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
216 * jcf-parse.c: Likewise.
217 * typeck.c: Likewise.
218 * verify-glue.c: Likewise.
220 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
222 * boehm.c: Include diagnostic-core.h in every file that includes
225 * constants.c: Likewise.
227 * except.c: Likewise.
229 * jcf-parse.c: Likewise.
230 * mangle.c: Likewise.
231 * mangle_name.c: Likewise.
232 * resource.c: Likewise.
233 * typeck.c: Likewise.
234 * verify-glue.c: Likewise.
236 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
239 * class.c (make_class_data): Cast result of VEC_length calls to int.
241 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
243 * constants.c (build_constants_constructor): Use build_constructor
244 instead of build_constructor_from_list.
245 * class.c (make_method_value): Likewise.
246 (get_dispatch_table): Likewise.
247 (make_class_data): Likewise.
248 (emit_indirect_register_classes): Likewise.
249 (emit_symbol_table): Likewise.
250 (add_assertion_table_entry): Likewise.
251 (emit_assertion_table): Likewise.
252 (make_field_value): Use build_constructor_single instead of
253 build_constructor_from_list.
255 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
257 * java-tree.h (struct lang_type) [catch_classes]: Change type to a
259 * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
260 instead of tree_cons.
261 * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
262 (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
264 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
266 * lang.c: Do not include except.h
267 * except.c: Likewise.
268 (doing_eh): New, moved from except.c (in gcc/) but removed the
270 (maybe_start_try): Update doing_eh call.
271 * Make-lang.in: Update dependencies.
273 2010-06-23 Anatoly Sokolov <aesok@post.ru>
275 * decl.c (java_init_decl_processing): Use double_int_to_tree instead
276 of build_int_cst_wide.
277 * boehm.c (set_bit): Remove.
278 (mark_reference_fields): Use double_int type for 'mask' argument.
279 Use double_int_setbit instead of set_bit.
280 (get_boehm_type_descriptor): Use double_int_setbit instead of
281 set_bit. Use double_int_to_tree instead of build_int_cst_wide.
283 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
285 * gcj.texi: Move to GFDL version 1.3. Fix copyright years.
287 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
289 * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
291 * jcf-parse.c (java_parse_file): Likewise.
292 (process_zip_dir): Likewise.
294 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
295 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
297 * expr.c (add_type_assertion): Likewise.
299 * decl.c (make_binding_level): Likewise.
300 (java_dup_lang_specific_decl): Likewise.
302 * constants.c (set_constant_entry): Likewise.
303 (cpool_for_class): Likewise.
305 * class.c (add_method_1): Likewise.
306 (java_treetreehash_new): Likewise.
308 * java-tree.h (struct lang_type): Add variable_size GTY option.
309 (struct lang_decl): Likewise.
311 * jch.h (struct cpool_entry): Likewise.
313 * java-tree.h (java_treetreehash_create): Remove parameter ggc.
315 * except.c (prepare_eh_table_type): Update
316 java_treetreehash_create call.
318 * class.c (add_method_1): Update java_treetreehash_create call.
319 (java_treetreehash_create): Remove parameter gc. Use
322 2010-06-04 Joseph Myers <joseph@codesourcery.com>
324 * jvspec.c (lang_specific_driver): Use GCC-specific formats in
327 2010-05-30 Steven Bosscher <steven@gcc.gnu.org>
329 * except.c: Include tm.h.
331 2010-05-28 Joseph Myers <joseph@codesourcery.com>
333 * jvspec.c (lang_specific_driver): Use fatal_error instead of
334 fatal. Use warning instead of error for warnings.
336 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
338 * expr.c (get_symbol_table_index): Add spaces in expression.
340 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
342 * java-tree.h (method_entry): Declare. Declare VECs containing it.
343 (struct lang_type): Change type of otable_methods, atable_methods, and
344 itable_methods to VECs. Fix comment for atable_methods.
345 (emit_symbol_table): Take a VEC instead of a tree.
346 (get_symbol_table_index): Take a VEC * instead of a tree *.
347 * class.c (add_table_and_syms): Take a VEC instead of a tree.
348 (emit_symbol_table): Update for changed parameter type.
349 * expr.c (get_symbol_table_index): Likewise.
351 2010-05-27 Steven Bosscher <steven@gcc.gnu.org>
353 * buildings.c: Pretend to be a backend file by undefining
354 IN_GCC_FRONTEND (still need rtl.h here).
356 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
358 * java-tree.h (struct lang_decl_func): Change type of throws_list
360 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
361 of DECL_FUNCTION_THROWS.
362 * class.c (make_method_value): Likewise.
364 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
366 * class.c (utf8_decl_list): Delete.
367 (build_utf8_ref): Remove references to it.
368 * java-tree.h (all_class_list): Delete.
369 (predef_filenames): Delete.
370 (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
372 * jcf-parse.c (parse_roots): Decrease size to 2.
373 (current_file_list): Convert to a VEC.
374 (all_class_list): Declare.
375 (jcf_parse): Adjust for new type of all_class_list.
376 (java_layout_seen_class_methods): Likewise.
377 (predefined_filenames): Declare.
378 (add_predefined_file): Use it.
379 (predefined_filename_p): Likewise.
380 (java_parse_file): Adjust for new type of current_file_list. *
382 2010-05-25 Jakub Jelinek <jakub@redhat.com>
384 * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
388 * java-tree.h (pending_static_fields): New extern declaration.
389 (java_write_globals): New prototype.
390 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
391 * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
392 of a static field push it into pending_static_fields vector.
393 * class.c (pending_static_fields): New variable.
394 (add_field): If static field is not DECL_EXTERNAL, push it into
395 pending_static_fields vector.
396 (java_write_globals): New function.
398 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
400 * expr.c (quick_stack): Change type to a VEC. Update comment.
401 (tree_list_free_list): Delete.
402 (flush_quick_stack): Update for quick_stack type change.
403 (push_value): Likewise.
404 (pop_value): Likewise.
406 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
408 * java-gimplify.c: Do not include tm.h, toplev.h.
409 * typeck.c: Do not include tm.h.
410 * mangle_name.c: Do not include tm.h.
411 * jcf-dump.c: Do not include tm.h, ggc.h.
412 * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
413 * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
415 * jcf-parse.c: Do not include tm.h and tm_p.h.
416 * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
417 target.h, and expr.h.
418 * except.c: Do not include tm.h, rtl.h, function.h.
419 * builtins.c: Do not include convert.h. Explain why RTL headers
420 have to be included here.
421 * verify-glue.c: Do not include tm.h.
422 * jcf-depend.c: Do not include tm.h.
423 * jcf-reader.c: Include ggc.h.
424 * jcf-io.c: Do not include tm.h, toplev.h.
425 * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
427 * lang.c: Do not include rtl.h, expr.h.
428 * Make-lang.in: Update dependencies.
430 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
432 * jcf-parse.c: Include bitmap.h.
433 * Make-lang.in: Update dependencies.
435 2010-05-20 Jakub Jelinek <jakub@redhat.com>
438 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
441 2010-05-19 Anatoly Sokolov <aesok@post.ru>
443 * jcf-parse.c (get_constant): Use double_int_to_tree instead of
444 build_int_cst_wide_type.
446 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
448 * expr.c (pop_arguments): Fix use of undeclared variable.
450 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
452 * expr.c (expand_java_multianewarray): Use build_call_vec instead of
454 (pop_arguments): Return a VEC instead of a tree. Take a method type
455 rather than a list of argument types.
456 (rewrite_rule): Change signature. of rewrite_arglist member.
457 (rewrite_arglist_getcaller): Update signature.
458 (rewrite_arglist_getclass): Likewise.
459 (maybe_rewrite_invocation): Update for rewrite_arglist change.
460 (build_known_method_ref): Take a VEC instead of a tree.
461 (invoke_build_dtable): Likewise.
462 (expand_invoke): Update calls to pop_arguments. Use build_call_vec
463 instead of build_call_list.
464 (build_jni_stub): Use build_call_vec instead of build_call_list.
465 * java-tree.h (maybe_rewrite_invocation): Update declaration.
466 (build_known_method_ref): Likewise.
467 (invoke_build_dtable): Likewise.
469 2010-05-14 Nathan Froyd <froydnj@codesourcery.com>
472 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
473 vector. Move call to build_constructor...
474 (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear
475 TREE_CONSTANT on the constructor.
476 (PUSH_SUPER_VALUE): Change first argument to a vector.
477 (PUSH_FIELD_VALUE): Likewise.
478 * resource.c (compile_resource_data): Update calls to above macros.
479 * constants.c (build_constants_constructor): Likewise.
480 * class.c (build_utf8_ref): Likewise.
481 (make_field_value): Likewise.
482 (make_method_value): Likewise.
483 (add_table_and_syms): New function.
484 (make_class_data): Call it. Update calls to above macros.
485 (build_symbol_table_entry): New function.
486 (build_symbol_entry): Call it. Update calls to above macros.
487 (emit_symbol_table): Likewise.
488 (make_catch_class_record): Update calls to above macros.
489 (build_assertion_table_entry): New function.
490 (add_assertion_table_entry): Call it.
491 (emit_assertion_table): Likewise.
493 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
496 * lang.c (java_handle_option): Add argument kind.
498 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
500 * decl.c (java_init_decl_processing): Remove argument in call to
503 2010-04-07 Jakub Jelinek <jakub@redhat.com>
505 * exception.cc (_Jv_Throw): Avoid set but not used warning.
506 * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
507 sizeof to avoid set but not used warnings.
509 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
511 * lang.c (java_post_options): Constify variable "dot".
513 * jcf-parse.c (set_source_filename): Constify variable "dot".
514 (load_class): Constify variable "separator".
515 Use get_identifier_with_length.
517 * jvspec.c (lang_specific_driver): Constify two variables named "p".
519 2010-01-09 Jakub Jelinek <jakub@redhat.com>
521 * jcf-dump.c (version): Update copyright notice dates.
523 2009-11-28 Jakub Jelinek <jakub@redhat.com>
525 * jvspec.c (lang_specific_driver): Remove unused
526 saw_verbose_flag variable.
527 * jcf-dump.c (main): Remove unused general_purpose_bits
529 * builtins.c (initialize_builtins): Remove unused float_ftype_float
531 * expr.c (java_stack_pop): Remove unused val variable.
532 (build_jni_stub): Remove unused res_type variable.
533 * verify-impl.c (check_field_constant): Remove unused len variable.
535 2009-10-20 Joel Dice <dicej@mailsnare.net>
538 * mangle_name.c (append_unicode_mangled_name): Fix mangling
539 of names with multiple underscores and "U".
540 (unicode_mangling_length): Likewise.
542 2009-10-03 Simon Baldwin <simonb@google.com>
544 * config-lang.in (lang_dirs): Remove zlib.
546 2009-09-28 Richard Henderson <rth@redhat.com>
548 * builtins.c (initialize_builtins): Update call to
549 build_common_builtin_nodes.
550 * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
552 2009-09-14 Richard Henderson <rth@redhat.com>
554 * builtins.c (initialize_builtins): Update call to
555 build_common_builtin_nodes.
556 * decl.c (java_init_decl_processing): Don't call
557 default_init_unwind_resume_libfunc.
558 * except.c: Include tree-iterator.h.
559 (build_exception_object_var): New.
560 (build_exception_object_ref): Use it.
561 (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
562 Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
563 * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
565 2009-09-13 Richard Guenther <rguenther@suse.de>
566 Rafael Avila de Espindola <espindola@google.com>
568 * decl.c (do_nothing): Remove.
569 (java_init_decl_processing): Do not set lang_eh_runtime_type.
570 * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
571 * lang.c (java_eh_personality): New.
572 (java_eh_personality_decl): Likewise.
573 (LANG_HOOKS_EH_PERSONALITY): Define.
575 2009-09-03 Diego Novillo <dnovillo@google.com>
577 * lang.c (lang_hooks): Remove const qualifier.
579 2009-09-01 Jakub Jelinek <jakub@redhat.com>
581 * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
584 2009-09-01 Richard Guenther <rguenther@suse.de>
586 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
587 * java-tree.h (java_mark_addressable): Likewise.
588 * typeck.c (java_mark_addressable): Likewise.
590 2009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
592 * Make-lang.in (java.install-pdf): Install gcj.pdf in
593 $(pdfdir)/gcc, alongside the other manuals.
595 2009-08-12 Andrew Haley <aph@redhat.com>
597 * builtins.c (compareAndSwapInt_builtin): Use
598 flag_use_atomic_builtins.
599 (compareAndSwapLong_builtin): Likewise.
600 (compareAndSwapObject_builtin): Likewise.
601 * jvspec.c: Add flag_use_atomic_builtins.
602 * gcj.texi: Likewise.
603 * java-tree.h: Likewise.
604 * lang.opt: Likewise.
606 2009-08-11 Dodji Seketeli <dodji@redhat.com>
609 * lang.c (put_decl_node): Outputs different level of information
610 depending on the verbosity level.
612 2009-07-31 Andrew Haley <aph@redhat.com>
615 * decl.c (java_replace_references): Set EXPR_LOCATION on all
616 generated expressions.
617 (binding_level.loc): new field.
618 (clear_binding_level): Initialize loc.
619 (set_input_location): New function.
620 (pushlevel): Set new binding_level.loc.
621 (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
622 (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
623 (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
625 2009-07-17 Richard Guenther <rguenther@suse.de>
628 * java-gimplify.c (java_genericize): Do not gimplify here.
629 But replace all local references.
630 (java_gimplify_expr): Do not replace local references here.
631 (java_gimplify_modify_expr): Likewise.
632 * jcf-parse.c (java_parse_file): Do not finalize the CU or
633 optimize the cgraph here.
634 * decl.c (java_replace_reference): Make static.
635 (java_replace_references): New function.
636 (end_java_method): Clear base_decl_map.
637 * java-tree.h (java_replace_references): Declare.
638 (java_replace_reference): Remove.
640 2009-07-14 Taras Glek <tglek@mozilla.com>
641 Rafael Espindola <espindola@google.com>
643 * Make-lang.in (java.install-plugin): New target for
644 installing plugin headers.
646 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
648 * class.c: Replace %J by an explicit location. Update all calls.
650 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
652 * jcf-parse.c: Replace %H by an explicit location. Update all calls.
654 2009-06-29 Andrew Haley <aph@redhat.com>
657 * java-tree.h (cxx_keyword_p): New declaration.
658 * mangle_name.c (utf8_cmp): Move here from mangle.c.
659 (cxx_keywords): Likewise.
660 (cxx_keyword_p): Likewise.
661 (MANGLE_CXX_KEYWORDS): New macro.
662 (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
663 (append_gpp_mangled_name): Likewise.
664 * mangle.c: Move code to mangle_name.c.
665 (mangle_member_name): Don't call cxx_keyword_p.
667 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
669 * java-gimplify.c (java_gimplify_block): New argument to
671 * expr.c (force_evaluation_order): Same.
672 * typeck.c: Add location to build_decl or PUSH_FIELD calls.
681 * java-tree.h (PUSH_FIELD): Add location field.
683 2009-06-09 Ian Lance Taylor <iant@google.com>
685 * verify.h: Remove extern "C".
687 2009-06-07 Ian Lance Taylor <iant@google.com>
689 * jcf-parse.c (handle_constant): Change local variable 'kind' to
692 2009-06-01 Ian Lance Taylor <iant@google.com>
694 * jcf-io.c (find_class): Use CONST_CAST.
696 2009-05-27 Ian Lance Taylor <iant@google.com>
698 * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
700 (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
702 2009-05-26 Ian Lance Taylor <iant@google.com>
704 * Make-lang.in (jvspec.o): Use $(COMPILER).
705 ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
706 (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
708 2009-05-12 Alexandre Oliva <aoliva@redhat.com>
710 * Make-lang.in (GCJ): Renamed to...
713 2009-04-27 Ian Lance Taylor <iant@google.com>
715 * builtins.c (java_builtins): Add casts to enum type.
716 * verify-impl.c (check_class_constant): Add cast to enum type.
717 (check_constant, check_wide_constant): Likewise.
719 2009-04-27 Richard Guenther <rguenther@suse.de>
722 * constants.c (build_constants_constructor): Retain the old
723 pointer type as valid TYPE_POINTER_TO after patching the
724 type of the constant pool decl.
726 2009-04-24 Ian Lance Taylor <iant@google.com>
728 * jcf-parse.c (handle_constant): Add cast to enum type.
730 2009-04-21 Taras Glek <tglek@mozilla.com>
732 * builtins.c: Update GTY annotations to new syntax
734 * java-tree.h: Likewise
738 2009-04-21 Joseph Myers <joseph@codesourcery.com>
740 * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
743 2009-04-18 Ian Lance Taylor <iant@google.com>
745 * verify-impl.c (verify_instructions_0): Add cast to enum type.
747 2009-04-09 Paolo Bonzini <bonzini@gnu.org>
749 * builtins.c (compareAndSwapLong_builtin,
750 compareAndSwapInt_builtin, compareAndSwapObject_builtin,
751 VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
753 2009-03-31 Richard Guenther <rguenther@suse.de>
755 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
756 the first operand of binary and comaprison expressions.
758 2009-03-30 Joseph Myers <joseph@codesourcery.com>
760 PR rtl-optimization/323
761 * lang.c (java_post_options): Set flag_excess_precision_cmdline.
762 Give an error for -fexcess-precision=standard for processors where
763 the option is significant.
765 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
767 * lang.opt: Unify help text for -Wdeprecated.
769 2009-02-03 Jakub Jelinek <jakub@redhat.com>
771 * jcf-dump.c (version): Update copyright notice dates.
773 2009-01-16 Richard Guenther <rguenther@suse.de>
775 PR tree-optimization/38835
777 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
779 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
782 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
784 2008-11-04 Andrew Haley <aph@redhat.com>
787 * jcf-parse.c (java_emit_static_constructor): Don't call
788 cgraph_build_static_cdtor. Rewrite.
790 2008-10-24 Jakub Jelinek <jakub@redhat.com>
792 * Make-lang.in (check-java-subtargets): New target.
794 2008-10-16 David Edelsohn <edelsohn@gnu.org>
797 * Make-lang.in (class.o): Depend on $(TM_P_H).
799 * class.c: Include tm_p.h.
800 * expr.c: Include tm_p.h.
802 2008-10-14 Andrew Haley <aph@redhat.com>
804 * constants.c (build_constant_data_ref): Make sure we only build
805 one copy of the decl for the constant pool.
807 2008-09-22 Andrew Haley <aph@redhat.com>
809 * expr.c (rules): Add new rule for
810 gnu.java.lang.VMCPStringBuilder.toString.
811 (rewrite_rule.new_classname): New field.
812 (maybe_rewrite_invocation): Use new_classname field instead of
813 DECL_CONTEXT (*method_p).
814 Allow rewrite_arglist to be NULL.
816 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
818 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
819 (java_get_callee_fndecl): Kill.
821 2008-09-17 Jan Hubicka <jh@suse.cz>
824 * class.c (add_method_1): Do not initialize DECL_INLINE.
825 (make_local_function_alias): Likewise.
826 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
827 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
829 2008-09-09 Richard Guenther <rguenther@suse.de>
831 * decl.c (build_result_decl): Remove no longer applicable
834 2008-09-05 David Daney <ddaney@avtrex.com>
836 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
838 2008-08-21 David Daney <ddaney@avtrex.com>
840 * class.c (make_class_data): Don't add field_index when
841 flag_reduced_reflection set.
843 2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
845 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
847 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
850 * lang.c (java_handle_option): Replace set_Wunused with
853 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
855 * gcj.texi: Update copyright years. Do not list GPL as
858 2008-07-29 Jakub Jelinek <jakub@redhat.com>
860 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
863 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
866 2008-07-29 Jan Hubicka <jh@suse.cz>
868 * lang.c (java_post_options): Remove handling of flag_no_inline.
870 2008-07-28 Richard Guenther <rguenther@suse.de>
872 Merge from gimple-tuples-branch.
874 2008-07-18 Richard Guenther <rguenther@suse.de>
876 * expr.c: Include tree-iterator.h.
877 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
879 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
881 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
884 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
886 * java-gimplify.c (java_gimplify_expr): Same.
887 (java_gimplify_modify_expr): Same.
888 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
890 2008-05-02 Diego Novillo <dnovillo@google.com>
892 * expr.c (build_java_throw_out_of_bounds_exception): Fix
893 mixed declarations and code.
895 2008-05-02 Doug Kwan <dougkwan@google.com>
897 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
898 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
900 2008-02-19 Diego Novillo <dnovillo@google.com>
902 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
904 * java-gimplify.c (java_gimplify_self_mod_expr): Change
905 gimple_seq arguments to gimple_seq *. Update all users.
907 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
909 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
911 (java_gimplify_self_mod_expr): Same.
912 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
915 2008-07-24 Jan Hubicka <jh@suse.cz>
917 * java/decl.c: Include cgraph.h
918 (end_java_method): Remove non-unit-at-a-time code.
919 (java_mark_decl_local): Likewise; sanity check that we don't touch
922 2008-07-15 Jan Hubicka <jh@suse.cz>
924 * lang.c (java_init_options): Enable unit-at-a-time by default.
926 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
928 * Make-lang.in (jvspec.o): Fix dependencies.
930 2008-07-06 Tom Tromey <tromey@redhat.com>
932 * Make-lang.in (java/parse.o-warn): Remove.
933 (java/jcf-io.o-warn): Remove.
935 2008-07-05 Tom Tromey <tromey@redhat.com>
937 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
938 (compare_path): Remove.
939 (java_or_class_file): Likewise.
940 (memoized_dirlist_entry): Likewise.
941 (memoized_dirlist_hash): Likewise.
942 (memoized_dirlist_lookup_eq): Likewise.
943 (memoized_dirlists): Likewise.
944 (caching_stat): Likewise.
945 (find_class): Use stat.
946 * jcf.h (JCF_USE_SCANDIR): Remove.
948 2008-06-30 Joshua Sumali <jsumali@redhat.com>
950 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
952 (java.uninstall): Likewise.
953 (java.maintainer-clean): Likewise.
954 (aot-compile.pod): New rule.
955 (rebuild-gcj-db.pod): New rule.
956 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
957 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
959 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
961 * Make-lang.in (java/jcf-io.o-warn): New.
963 2008-06-24 Tom Tromey <tromey@redhat.com>
965 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
966 * expr.c (add_type_assertion): Rename argument.
967 (build_java_arrayaccess): Don't name variable 'throw'.
968 (ARRAY_NEW_MULTI): Don't name variable 'class'.
969 * jcf-io.c (find_class): Don't name variable 'class'.
970 * mangle.c (compression_table_add): Don't name variable 'new'.
971 * constants.c (cpool_for_class): Rename argument.
972 (alloc_constant_fieldref): Likewise.
973 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
975 (read_class): Likewise.
976 (parse_zip_file_entries): Likewise.
977 (process_zip_dir): Likewise.
978 * decl.c (java_mark_class_local): Rename argument.
979 * class.c (GEN_TABLE): Use type_name, not typename.
980 (gen_indirect_dispatch_tables): Likewise.
981 (add_field): Rename argument.
982 (is_compiled_class): Likewise.
983 (safe_layout_class): Likewise.
984 (emit_assertion_table): Likewise.
985 * typeck.c (has_method): Rename argument.
987 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
989 * class.c (ident_subst, mangled_classname, unmangle_classname,
990 gen_indirect_dispatch_tables, add_method_1,
991 build_fieldref_cache_entry, make_local_function_alias,
992 layout_class, java_treetreehash_find, java_treetreehash_new,
993 split_qualified_name): Fix for -Wc++-compat.
994 * constants.c (set_constant_entry, cpool_for_class): Likewise.
995 * decl.c (make_binding_level, java_dup_lang_specific_decl,
996 start_java_method): Likewise.
997 * except.c (prepare_eh_table_type): Likewise.
998 * expr.c (type_assertion_hash, note_instructions): Likewise.
999 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1000 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1001 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1003 * jcf-parse.c (reverse, java_read_sourcefilenames,
1004 annotation_grow, rewrite_reflection_indexes, java_parse_file,
1005 process_zip_dir): Likewise.
1006 * jcf-path.c (add_entry, add_path, jcf_path_init,
1007 jcf_path_extdirs_arg): Likewise.
1008 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1009 * jvgenmain.c (do_mangle_classname): Likewise.
1010 * lang.c (put_decl_string): Likewise.
1011 * verify-impl.c (make_state_copy, make_state, add_new_state):
1014 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1016 * gcj.texi: Expand TABs, remove whitespace from blank lines.
1018 2008-06-14 Tom Tromey <tromey@redhat.com>
1021 * class.c (build_class_ref): Initialize this_classdollar when
1024 2008-05-23 Andrew Haley <aph@redhat.com>
1026 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1027 pathname of source file.
1029 2008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1031 * jcf-dump.c (print_constant): Use
1032 HOST_LONG_LONG_FORMAT.
1034 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1036 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1039 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1041 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1042 (build_classdollar_field): Don't set TREE_INVARIANT.
1043 (get_dispatch_table): Don't set TREE_INVARIANT.
1044 (make_class_data): Don't set TREE_INVARIANT.
1045 (build_symbol_entry): Don't set TREE_INVARIANT.
1046 (emit_symbol_table): Don't set TREE_INVARIANT.
1047 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1048 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1049 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1050 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1052 2008-04-03 Tom Tromey <tromey@redhat.com>
1054 * Make-lang.in (java_OBJS): New variable.
1056 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1058 * java-tree.h (insert_block): Kill.
1059 * decl.c (insert_block): Kill.
1061 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1063 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1064 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1067 2008-03-27 Tom Tromey <tromey@redhat.com>
1069 * Make-lang.in: Revert automatic dependency patch.
1071 2008-03-25 Tom Tromey <tromey@redhat.com>
1073 * Make-lang.in: Removed most explicit .o targets.
1074 (java/jvspec.o): Reduce to variable setting. Moved to java/.
1075 ($(GCJ)$(exeext)): Update.
1076 (JAVA_OBJS): New variable.
1077 (JCFDUMP_OBJS): Reformat.
1078 (java_OBJS): New variable.
1079 (java/jvspec.o-warn): Update.
1080 (java/parse.o-warn): Remove.
1081 (JAVA_TREE_H): Remove.
1082 (java/jcf-io.o): Reduce to variable setting.
1083 (ALL_CPPFLAGS): Likewise.
1085 2008-03-12 Paolo Bonzini <bonzini@gnu.org>
1087 * mangle.c (java_mangle_decl): Remove dead check.
1089 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1091 * jcf-parse.c (java_parse_file): Assert binding levels are
1093 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1096 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1098 * jcf-dump.c (version): Update copyright notice dates.
1100 2008-02-29 Tom Tromey <tromey@redhat.com>
1102 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1104 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1106 2008-02-26 Tom Tromey <tromey@redhat.com>
1108 * lang.c (java_post_options): Remove conditional.
1109 * expr.c (expand_byte_code): Remove old location code.
1110 * jcf-parse.c (set_source_filename): Remove old location code.
1111 (give_name_to_class): Likewise.
1112 (jcf_parse): Likewise.
1113 (duplicate_class_warning): Likewise.
1114 (parse_class_file): Likewise.
1115 (java_parse_file): Likewise.
1116 * decl.c (finish_method): Remove old location code.
1117 * class.c (push_class): Remove old location code.
1119 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1122 * Make-lang.in (jc1): Add $(GMPLIBS).
1124 2008-01-23 David Daney <ddaney@avtrex.com>
1126 * class.c (hide) Rename to...
1127 (java_hide_decl) ... this throughout, and make public.
1128 * resource.c (Jr_count): Remove.
1129 (compile_resource_data): Call java_mangle_resource_name to generate
1130 decl name. Make resource decl public and hidden.
1131 * mangle.c (java_mangle_resource_name): New function.
1132 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1135 2008-01-04 Andrew Haley <aph@redhat.com>
1138 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1141 2008-01-03 Andrew Haley <aph@redhat.com>
1144 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1145 we're about to re-layout the type.
1147 2007-12-20 Alexandre Oliva <aoliva@redhat.com>
1149 * lang.c (java_classify_record): Don't return
1150 RECORD_IS_INTERFACE for now.
1152 2007-12-18 Andrew Haley <aph@redhat.com>
1155 * jcf-parse.c (java_parse_file): Remove call to
1156 java_mark_class_local.
1157 (parse_class_file): Reinstate call to java_mark_class_local here.
1158 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1159 already set, call java_mangle_decl() and make_decl_rtl() to
1160 rewrite its name as a hidden alias.
1162 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1165 * lang.c (java_classify_record): New.
1166 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1168 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1171 * decl.c (finish_method): Pass 'false' for the new
1172 allocate_struct_function parameter.
1174 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1176 * expr.c (build_jni_stub): Use the computed jni func type for
1179 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1181 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1183 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1185 * expr.c (type_assertion_hash): Hash type uids rather than
1188 2007-11-17 David Daney <ddaney@avtrex.com>
1189 Andrew Haley <aph@redhat.com>
1191 * constants.c (build_constants_constructor): Use POINTER_SIZE
1192 insead of BITS_PER_WORD in big-endian work around.
1194 2007-11-07 Tom Tromey <tromey@redhat.com>
1197 * gcj.texi (Input Options): Add missing noun.
1199 2007-11-02 Tom Tromey <tromey@redhat.com>
1202 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1203 * zipfile.h (ZIPEMPTYMAGIC): New define.
1205 2007-11-01 Tom Tromey <tromey@redhat.com>
1207 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1208 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1209 (java/jcf-io.o): Depend on zipfile.h.
1211 2007-10-17 Richard Guenther <rguenther@suse.de>
1213 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1216 2007-10-03 Andrew Haley <aph@redhat.com>
1219 * class.c (mangled_classname): Detect and replace illegal
1220 characters in assembly language symbols.
1221 (gen_indirect_dispatch_tables): Call mangled_classname() on
1224 2007-09-27 Jakub Jelinek <jakub@redhat.com>
1226 * lang.c (java_print_error_function): Add third argument.
1228 2007-09-15 Tom Tromey <tromey@redhat.com>
1230 * java-tree.h (struct lang_decl_func) <function_decl_body>:
1232 <init_final>: Likewise.
1233 * lang.c (java_dump_tree): Update.
1234 * java-tree.h (DECL_FUNCTION_BODY): Remove.
1236 2007-09-11 Jan Hubicka <jh@suse.cz>
1238 * decl.c (java_expand_body): Kill.
1239 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1241 2007-09-06 Tom Tromey <tromey@redhat.com>
1243 * jcf-parse.c (parse_class_file): Re-enter the current file.
1245 2007-09-07 Roman Zippel <zippel@linux-m68k.org>
1247 * boehm.c (mark_reference_fields): Move misaligned pointer check
1248 after JREFERENCE_TYPE_P test
1250 2007-09-06 Roman Zippel <zippel@linux-m68k.org>
1252 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1253 if pointer is misaligned.
1255 2007-09-06 Tom Tromey <tromey@redhat.com>
1257 * lang.c (java_post_options): Update.
1258 * jcf-parse.c (set_source_filename): Update.
1259 (give_name_to_class): Update.
1260 (jcf_parse): Update.
1261 (duplicate_class_warning): Update.
1262 (parse_class_file): Update.
1263 (java_parse_file): Update.
1264 * expr.c (expand_byte_code): Update.
1266 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1268 * decl.c (finish_method): Use set_cfun.
1270 2007-09-04 Andrew Haley <aph@redhat.com>
1272 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1273 when using the ARM EABI.
1275 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1277 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1279 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1281 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1283 * jcf.h (JCF_FINISH): Likewise.
1285 2007-08-28 Tom Tromey <tromey@redhat.com>
1287 * Make-lang.in (java.tags): Don't tag '*.y' files.
1289 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1291 * lang.c (java_decl_ok_for_sibcall): Likewise.
1293 2007-08-21 Paul Brook <paul@codesourcery.com>
1294 Nathan Sidwell <nathan@codesourcery.com>
1295 Mark Mitchell <mark@codesourcery.com>
1296 Joseph Myers <joseph@codesourcery.com>
1298 * jcf-dump.c (version): Use pkgversion_string. Update copyright
1301 2007-08-20 Richard Guenther <rguenther@suse.de>
1303 * lang.c (java_tree_inlining_walk_subtrees): Remove.
1304 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1306 2007-08-17 Tom Tromey <tromey@redhat.com>
1308 * typeck.c (find_method_in_interfaces): Update.
1309 * jcf-parse.c (load_class): Update.
1310 * java-gimplify.c (java_gimplify_component_ref): Removed.
1311 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
1313 (java_gimplify_expr): Update.
1314 * decl.c (java_init_decl_processing): Update.
1315 * class.c (set_constant_value): Update.
1316 (make_class_data): Update.
1317 (finish_class): Update.
1318 (build_static_field_ref): Update.
1319 (is_compiled_class): Update.
1320 (maybe_layout_super_class): Update.
1321 (layout_class): Update.
1322 (layout_class_method): Update.
1323 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1324 (lang_decl_var) <am, final_iud, cif>: Removed fields.
1325 (lang_decl_func) <init_calls_this>: Removed field.
1326 (lang_type) <dot_class, verify_method>: Removed fields.
1327 (FIELD_NESTED_ACCESS): Removed.
1328 (FIELD_NESTED_ACCESS_P): Removed.
1329 (DECL_FIELD_FINAL_IUD): Removed.
1330 (DECL_LOCAL_FINAL_IUD): Removed
1331 (LOCAL_FINAL_P): Removed.
1332 (FINAL_VARIABLE_P): Removed.
1333 (CLASS_FINAL_VARIABLE_P): Removed.
1334 (DECL_BIT_INDEX): Removed.
1335 (DECL_INIT_CALLS_THIS): Removed.
1336 (FIELD_LOCAL_ALIAS): Removed.
1337 (FIELD_LOCAL_ALIAS_USED): Removed.
1338 (FIELD_THISN): Removed.
1339 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1340 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1341 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1342 (TYPE_DOT_CLASS): Removed.
1343 (TYPE_VERIFY_METHOD): Removed.
1344 (ID_CLASSDOLLAR_P): Removed.
1345 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1347 (classdollar_identifier_node): Removed.
1348 (TYPE_UNKNOWN): Removed.
1349 (CLASS_FROM_SOURCE_P): Removed.
1350 * expr.c (build_jni_stub): Update.
1351 (force_evaluation_order): Update.
1352 (build_java_empty_stmt): Update.
1353 (build_class_init): Update.
1354 (java_stack_swap): Update.
1355 (build_jni_stub): Update.
1357 2007-08-17 Tom Tromey <tromey@redhat.com>
1359 * java-tree.h (LABEL_TYPE_STATE): Removed.
1360 (load_type_state): Removed.
1361 (LABEL_PC): Removed.
1362 (LABEL_VERIFIED): Removed.
1363 (type_states): Declare.
1364 * expr.c (type_states): New global.
1365 (load_type_state): Now static. Use type_states. Changed
1367 (lookup_label): Don't set LABEL_PC.
1368 (expand_byte_code): Don't use LABEL_VERIFIED.
1369 (note_instructions): Initialize type_states.
1370 * verify-glue.c (vfy_note_stack_depth): Rewrote.
1371 (vfy_note_stack_type): Use type_states.
1372 (vfy_note_local_type): Likewise.
1374 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1376 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1377 * jcf.h (JCF_FINISH): Likewise.
1379 2007-07-31 Nick Clifton <nickc@redhat.com>
1381 * java-gimplify.c: Change copyright header to refer to version 3
1382 of the GNU General Public License and to point readers at the
1383 COPYING3 file and the FSF's license web page.
1384 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1385 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1386 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1387 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1388 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1389 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1390 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1392 2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1394 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1396 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1398 * lang.c (java_get_callee_fndecl): Constify.
1400 2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1402 * mangle.c (set_type_package_list): Constify.
1403 * verify-glue.c (vfy_make_string): Delete.
1404 * verify.h (vfy_make_string): Likewise.
1406 2007-07-26 Tom Tromey <tromey@redhat.com>
1408 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1409 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1410 EXIT_BLOCK_LABELED_BLOCK): Likewise.
1411 * lang.c (java_tree_inlining_walk_subtrees): Update.
1412 (java_dump_tree): Likewise.
1413 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1415 * decl.c (push_labeled_block, pop_labeled_block): Remove.
1416 * java-gimplify.c (java_gimplify_labeled_block_expr,
1417 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1418 (java_gimplify_expr): Update.
1420 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1422 * class.c (java_treetreehash_hash, java_treetreehash_compare):
1424 * expr.c (type_assertion_eq): Likewise.
1425 * jcf-io.c (compare_path): Likewise.
1426 * jcf-parse.c (cmpstringp): Likewise.
1427 * verify-impl.c (get_one_type, compute_argument_types,
1428 compute_return_type): Likewise.
1430 2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1434 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1436 2007-07-12 Richard Guenther <rguenther@suse.de>
1438 * expr.c (expand_java_return): RETURN_EXPR has void type.
1439 (build_jni_stub): Likewise. Use a comparison against zero
1440 for null-pointer test in COND_EXPR.
1441 (build_field_ref): Build POINTER_PLUS_EXPR with correct
1442 type. Convert result instead.
1443 (build_invokevirtual): Likewise.
1445 2007-07-09 Geoffrey Keating <geoffk@apple.com>
1448 * lang.c (java_init): Remove setting of force_align_functions_log.
1449 * class.c (add_method_1): Set DECL_ALIGN of non-static method
1450 to cope with ptrmemfunc_vbit_in_pfn.
1452 2007-07-03 David Daney <ddaney@avtrex.com>
1454 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
1456 (doc/gcj.dvi): Same.
1457 (doc/gcj.pdf): Same.
1458 (java/index.html): Same.
1460 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1462 * class.c (make_class_data): Build the index in sizetype.
1463 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1464 adding to a pointer type.
1465 (build_symbol_entry): Likewise.
1466 * expr.c (build_java_arrayaccess): Likewise.
1467 (build_field_ref): Likewise.
1468 (build_known_method_ref): Likewise.
1469 (build_invokevirtual): Likewise.
1470 * except.c (build_exception_object_ref): Do a
1471 NEGATIVE and then a POINTER_PLUS_EXPR instead
1474 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
1476 * typeck.c (java_signed_type): Remove.
1477 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1478 * java-tree.h (java_signed_type): Remove.
1480 2007-05-18 Geoffrey Keating <geoffk@apple.com>
1482 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1483 (print_constant): Likewise.
1485 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
1487 * expr.c (build_java_binop): Use unsigned_type_for instead of
1489 * java-tree.h (java_unsigned_type): Remove.
1490 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1491 * typeck.c (java_unsigned_type): Remove.
1493 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1495 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1496 instead of checking GIMPLE_STMT_P in chain_next.
1498 2007-04-06 Colin Walters <walters@redhat.com>
1500 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1501 * jcf-io.c (open_class): Copy 'filename'.
1503 2007-04-03 Andrew Haley <aph@redhat.com>
1505 * jvgenmain.c (main): Change main to use class$, not class$$.
1506 (do_mangle_classname): Likewise.
1507 * class.c (hide): New function.
1508 (add_field): Hide everything that shouldn't be visible outside a
1510 (build_static_class_ref): Likewise.
1511 (build_classdollar_field): Likewise.
1512 (make_class_data): Likewise.
1513 (layout_class_method): Likewise.
1514 * expr.c (special_method_p): New function.
1516 * class.c (push_class): Don't bogusly guess the source filename.
1517 * jcf-parse.c (give_name_to_class): Don't set input_location from
1518 DECL_ARTIFICIAL decls.
1520 2007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
1522 * typeck.c (java_signed_or_unsigned_type): Removed.
1523 (java_signed_type): use get_signed_or_unsigned_type instead of
1524 java_signed_or_unsigned_type.
1525 (java_unsigned_type): Ditto.
1526 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1527 * java-tree.h (java_signed_or_unsigned_type): Removed.
1529 2007-03-26 Tom Tromey <tromey@redhat.com>
1531 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1532 (java.maintainer-clean): Likewise.
1533 (java.install-man): Likewise.
1534 (.INTERMEDIATE): Removed grmiregistry.pod.
1535 (grmiregistry.pod): Removed.
1536 * gcj.texi (Invoking gcjh): Removed.
1537 (Invoking gjnih): Likewise.
1538 (Invoking grmiregistry): Likewise.
1539 (direntry): Updated.
1541 (which-gcj): Removed.
1543 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1545 * Make-lang.in: Add install-pdf target as copied from
1546 automake v1.10 rules.
1548 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
1550 * gcj.texi: Standardize title page.
1552 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1554 * class.c: Fix a comment typo.
1556 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1557 Brooks Moses <brooks.moses@codesourcery.com>
1558 Lee Millward <lee.millward@codesourcery.com>
1560 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
1562 (BUILD_MONITOR_EXIT): Likewise.
1564 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
1565 (java_gimplify_modify_expr): Likewise.
1567 * class.c (cache_this_class_ref): Use build_call_expr.
1568 (build_static_field_ref): Likewise.
1569 (emit_indirect_register_classes): Likewise.
1570 (emit_register_classes): Likewise.
1572 * resource.c (write_resource_constructor): Use build_call_expr.
1574 * builtins.c (builtin_creator_function): Change interpretation of
1575 the second parameter to be the whole CALL_EXPR instead of the arglist.
1576 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
1577 (min_builtin): Likewise.
1578 (abs_builtin): Likewise.
1579 (java_build_function_call_expr): Likewise.
1580 (convert_real): Likewise.
1581 (UNMARSHAL3): Likewise.
1582 (UNMARSHAL4): Likewise.
1583 (UNMARSHAL5): Likewise.
1584 (build_arglist_for_builtin): Delete. Fix callers to use
1585 build_call_expr instead.
1586 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
1588 (compareAndSwapInt_builtin): Likewise.
1589 (compareAndSwapLong_builtin): Likewise.
1590 (compareAndSwapObject_builtin): Likewise.
1591 (putVolatile_builtin): Likewise.
1592 (getVolatile_builtin): Likewise.
1593 (VMSupportsCS8_builtin): Likewise.
1594 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
1597 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
1598 (build_java_throw_out_of_bounds_exception): Likewise.
1599 (java_check_reference): Likewise.
1600 (build_java_arraystore_check): Likewise.
1601 (build_newarray): Likewise.
1602 (build_anewarray): Likewise.
1603 (expand_java_multinewarray): Use build_call_list instead of build3.
1604 (build_java_monitor): Use build_call_nary instead of build3.
1605 (java_create_object): Likewise.
1606 (expand_java_NEW): Likewise.
1607 (build_instanceof): Likewise.
1608 (expand_java_CHECKCAST): Likewise.
1609 (build_java_soft_divmod): Likewise.
1610 (build_java_binop): Likewise.
1611 (build_field_ref): Likewise.
1612 (build_class_init): Likewise.
1613 (rewrite_arglist_getcaller): Use build_call_expr.
1614 (build_invokeinterface): Use build_call_nary instead of build3.
1615 (expand_invoke): Use build_call_list instead of build3.
1616 (build_jni_stub): Use build_call_nary, build_call_list, or
1617 build_call_expr instead of build3.
1618 (expand_java_field_op): Use build_call_expr instead of build3.
1619 (force_evaluation_order): Use new CALL_EXPR accessors.
1621 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
1623 2007-02-15 David Daney <ddaney@avtrex.com>
1625 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
1626 (java.maintainer-clean):Add gc-analyze.1.
1627 (.INTERMEDIATE): Add gc-analyze.pod.
1628 (gc-analyze.pod): New rule.
1629 (java.install-man): Install gc-analyze.1
1630 * gcj.texi: Add new section for the gc-analyze program.
1632 2007-02-07 Andrew Haley <aph@redhat.com>
1634 * class.c (uncache_this_class_ref): New.
1635 * expr.c (build_jni_stub): Initialize the class.
1636 (expand_byte_code): Call uncache_this_class_ref after generating
1639 2007-02-06 Tom Tromey <tromey@redhat.com>
1642 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
1644 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
1646 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
1648 2007-02-02 Andrew Haley <aph@redhat.com>
1650 * expr.c (expand_byte_code): Call cache_this_class_ref() and
1651 cache_cpool_data_ref().
1652 Set TYPE_CPOOL_DATA_REF.
1653 (cache_cpool_data_ref): New function.
1654 * constants.c (build_ref_from_constant_pool): Remove special-case
1655 code for flag_indirect_classes.
1656 (build_constant_data_ref): Move special-case code for
1657 flag_indirect_classes here from build_ref_from_constant_pool.
1658 * decl.c (finish_method): Move class initialization from here to
1659 cache_this_class_ref.
1660 * class.c (cache_this_class_ref): New function.
1661 (build_class_ref): Use this_classdollar for the ouput class.
1663 2007-02-02 David Daney <ddaney@avtrex.com>
1665 * class.c (is_compiled_class): Move check to avoid reloading
1667 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
1670 2007-02-01 Andrew Haley <aph@redhat.com>
1673 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
1675 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
1677 * class.c, jcf-parse.c: Fix comment typos.
1679 2007-01-30 Tom Tromey <tromey@redhat.com>
1681 * gcj.texi (Strings): Fix documentation for JvNewString.
1683 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1685 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
1688 2007-01-30 Ben Elliston <bje@au.ibm.com>
1690 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
1692 2007-01-29 Tom Tromey <tromey@redhat.com>
1695 * jvspec.c (lang_specific_driver): Handle separate -I argument.
1696 * lang.opt (-I): Add 'Separate'.
1698 2007-01-29 Andrew Haley <aph@redhat.com>
1700 * class.c (add_method_1): Mark fndecl as external unless we are
1701 compiling it into this object file.
1703 2007-01-24 Andrew Haley <aph@redhat.com>
1705 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
1706 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
1708 2007-01-22 Andrew Haley <aph@redhat.com>
1710 * builtins.c (VMSupportsCS8_builtin): New function.
1712 2007-01-23 Andrew Pinski <pinskia@gmail.com>
1715 * jcf-io.c (opendir_in_zip): Close the file
1716 and free zipf before returning after an error.
1718 2007-01-16 Tom Tromey <tromey@redhat.com>
1720 * java-tree.def: Added copyright header.
1722 2007-01-15 Tom Tromey <tromey@redhat.com>
1724 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
1726 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
1728 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
1729 (EXPR_WFL_NODE): Likewise.
1730 (EXPR_WFL_LINECOL): Likewise.
1731 (EXPR_WFL_FILENAME): Likewise.
1732 (EXPR_WFL_LINENO): Likewise.
1733 (build_expr_wfl, expr_add_location): Don't declare.
1734 (build_unknown_wfl): Removed.
1735 (EXPR_WFL_FILENAME_NODE): Removed.
1736 (EXPR_WFL_COLNO): Removed.
1737 (EXPR_WFL_SET_LINECOL): Removed.
1738 (DECL_FUNCTION_WFL): Removed.
1739 (DECL_FIELD_FINAL_WFL): Removed.
1740 (struct lang_decl_func) <wfl>: Removed field.
1741 <called_constructor>: Likewise.
1742 <inner_access>: Likewise.
1743 (struct lang_decl_var) <wfl>: Removed field.
1744 (DECL_CONSTRUCTOR_CALLS): Removed.
1745 (DECL_FUNCTION_ACCESS_DECL): Likewise.
1746 (DECL_FUNCTION_INNER_ACCESS): Likewise.
1747 (DECL_SPECIFIC_COUNT): Likewise.
1748 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
1749 * expr.c (build_expr_wfl): Removed.
1750 (expr_add_location): Likewise.
1752 2007-01-12 Tom Tromey <tromey@redhat.com>
1754 * jcf-dump.c (main): Updated call to find_class.
1755 * lang.c (java_init): Removed dead code.
1756 * jcf-parse.c (read_class): Don't use java_source field. Removed
1758 (parse_zip_file_entries): Don't use java_source field.
1759 (process_zip_dir): Likewise.
1760 (jcf_parse): Removed dead code.
1761 (java_parse_file): Likewise.
1762 (read_class): Updated call to find_class.
1763 * jcf-io.c (find_class): Don't use java_source field. Removed
1764 'source_ok' argument, .java logic.
1765 * jcf.h (JCF) <java_source>: Removed field.
1766 (JCF_ZERO): Updated. (find_class): Updated.
1767 * decl.c: Removed dead code.
1768 * class.c: Removed dead code.
1770 2007-01-11 Tom Tromey <tromey@redhat.com>
1772 * typeck.c (convert): Don't use flag_emit_class_files.
1773 * lang.c (java_post_options): Don't use flag_emit_class_files.
1774 (java_handle_option): Don't use flag_extraneous_semicolon or
1776 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
1777 flag_emit_class_files.
1778 (load_class): Likewise.
1779 * java-tree.h (flag_emit_class_files): Don't declare.
1780 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
1781 (flag_extraneous_semicolon): Don't declare.
1782 (flag_not_overriding): Likewise.
1783 (flag_static_local_jdk1_1): Likewise.
1784 (flag_redundant): Likewise.
1785 * expr.c (build_newarray): Don't use flag_emit_class_files.
1786 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
1787 flag_emit_class_files.
1788 (build_class_ref): Likewise.
1789 * builtins.c (check_for_builtin): Don't use
1790 flag_emit_class_files.
1792 2007-01-10 Tom Tromey <tromey@redhat.com>
1794 * lang.c (java_can_use_bit_fields_p): Removed.
1795 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
1797 2007-01-09 Andrew Haley <aph@redhat.com>
1799 * expr.c (build_java_arrayaccess): Rewrite to generate array
1800 access in canonical form.
1801 (expand_java_arraystore): Use build_fold_addr_expr() on address of
1804 2007-01-03 Andrew Haley <aph@redhat.com>
1807 * expr.c (expand_java_field_op): If we're initializing a field's
1808 declaring interface we should not also initialize the class
1809 context in which it was referenced.
1811 2007-01-02 Tom Tromey <tromey@redhat.com>
1813 * java-tree.h (compiling_from_source, current_encoding,
1814 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
1815 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
1816 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
1817 JTI_WFL_OPERATOR): Removed
1818 (finit_identifier_node, instinit_identifier_node,
1819 length_identifier_node, super_identifier_node,
1820 continue_identifier_node, access0_identifier_node, wfl_operator):
1822 (cyclic_inheritance_report,
1823 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
1824 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
1825 DECL_FIXED_CONSTRUCTOR_P): Removed.
1826 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
1828 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
1829 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
1830 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
1831 import_list, import_demand_list>: Removed.
1832 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
1833 cxx_keyword_p): Removed.
1834 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
1835 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
1836 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
1837 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
1838 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
1839 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
1840 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
1841 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
1842 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
1843 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
1844 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
1845 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
1846 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
1847 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
1848 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
1849 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
1850 java_parse_abort_on_error, extract_field_decl): Removed.
1852 * lang.c: (compiling_from_source, current_encoding): Removed.
1853 (java_handle_option): Ignore -fencoding.
1854 * parse.h: Don't include lex.h.
1855 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
1856 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
1857 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
1858 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
1859 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
1860 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
1861 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
1862 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
1863 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
1864 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
1865 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
1866 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
1867 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
1868 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
1869 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
1870 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
1871 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
1872 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
1873 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
1874 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
1875 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
1876 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
1877 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
1878 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
1879 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
1880 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
1881 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
1882 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
1883 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
1884 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
1885 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
1886 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
1887 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
1888 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
1889 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
1890 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
1891 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
1892 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
1893 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
1894 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
1895 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
1896 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
1897 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
1898 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
1899 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
1900 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
1901 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
1902 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
1903 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
1904 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
1905 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
1906 SET_CPC_STATIC_INITIALIZER_STMT,
1907 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
1908 java_complete_class, java_check_circular_reference,
1909 java_fix_constructors, java_layout_classes, java_reorder_fields,
1910 java_method_add_stmt, java_get_line_col, reset_report,
1911 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
1912 java_finish_classes, ctxp, ctxp_for_generation,
1913 ctxp_for_generation_last): Removed.
1914 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
1915 * mangle.c (utf8_cmp): New function.
1916 (cxx_keywords): New global.
1917 (cxx_keyword_p): New function.
1918 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
1919 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
1920 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
1921 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
1922 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
1923 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
1924 * Make-lang.in (java.srcextra): Do nothing.
1925 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
1926 (JAVA_OBJS): Don't mention deleted files.
1927 (java.mostlyclean): Likewise.
1928 (java.clean): Likewise.
1929 (JAVA_LEX_C): Removed.
1930 (buffer.o, check-init.o, parse.o): Remove unused targets.
1931 (typeck.o): Updated.
1932 * jcf-parse.c (read_class): Comment out unused code.
1933 (java_layout_seen_class_methods): New function.
1934 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
1936 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
1937 (init_jcf_parse): Removed.
1938 * config-lang.in (gtfiles): Remove deleted files.
1939 * decl.c (java_init_decl_processing): Don't initialize
1940 finit_identifier_node, instinit_identifier_node,
1941 length_identifier_node, super_identifier_node,
1942 continue_identifier_node, access0_identifier_node. Don't call
1944 * class.c (cyclic_inheritance_report): New global.
1945 (add_method_1): Don't use
1946 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
1947 (maybe_layout_super_class): Comment out code.
1948 (safe_layout_class): New function.
1949 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
1950 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
1951 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
1952 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
1953 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
1954 (java_gimplify_case_expr): Removed.
1955 (java_gimplify_default_expr): Likewise.
1956 (java_gimplify_new_array_init): Likewise.
1958 * keyword.gperf, keyword.h: Removed.
1959 * chartables.h: Removed.
1960 * check-init.c: Removed.
1961 * buffer.c, buffer.h: Removed.
1962 * convert.h: Removed.
1963 * gen-table.pl: Removed.
1964 * lex.c, lex.h: Removed.
1966 2007-01-02 Andrew Haley <aph@redhat.com>
1968 * expr.c (expand_java_arraystore): Make sure we perform a bounds
1969 check at runtime before we perform a type check.
1971 2006-12-19 Andrew Haley <aph@redhat.com>
1973 * decl.c: Bump minor BC ABI version.
1975 2006-12-13 Gary Benson <gbenson@redhat.com>
1977 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
1979 2006-12-12 Tom Tromey <tromey@redhat.com>
1981 * lang-specs.h: Pass -M options to jc1.
1982 * jcf-depend.c (jcf_dependency_add_file): Don't emit
1985 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
1987 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
1989 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
1991 * lang-specs.h: Pass '%U'-based options as separate arguments.
1993 2006-12-05 Tom Tromey <tromey@redhat.com>
1996 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
1998 * class.c (add_field): Handle ACC_SYNTHETIC.
1999 (add_method_1): Likewise. Handle bridge and varargs.
2000 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2002 (set_class_decl_access_flags): Handle synthetic and annotation.
2003 * java-tree.h (METHOD_BRIDGE): New macro.
2004 (METHOD_VARARGS): Likewise.
2005 (TYPE_SYNTHETIC): Likewise.
2006 (TYPE_ANNOTATION): Likewise.
2007 (lang_type): New fields 'synthetic' and 'annotation'.
2008 (lang_decl_func): New fields 'varargs' and 'bridge'.
2010 2006-12-04 Andrew Haley <aph@redhat.com>
2012 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2015 2006-11-29 Gary Benson <gbenson@redhat.com>
2017 * expr.c (rewrite_arglist_getcaller): Reorder.
2019 2006-11-29 Andrew Haley <aph@redhat.com>
2021 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2022 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2024 2006-11-23 Andrew Haley <aph@redhat.com>
2026 * expr.c (rewrite_arglist_getcaller): New.
2027 (rewrite_arglist_getclass): Fix indentation.
2028 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
2029 gnu.classpath.VMStackWalker.getCallingClassLoader().
2030 * builtins.c (initialize_builtins): Remove duplicate def'n of
2032 Add __builtin_return_address.
2034 2006-11-22 Andrew Haley <aph@redhat.com>
2036 * jcf-reader.c (get_attribute): Mark attr_type unused.
2038 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2040 2007-01-08 Richard Guenther <rguenther@suse.de>
2042 * lex.c (do_java_lex): Use build_int_cst_wide_type.
2043 * jcf-parse.c (get_constant): Likewise.
2045 2006-11-12 Jan Hubicka <jh@suse.cz>
2047 * resource.c (compile_resource_data): Update for new varpool names.
2048 * java/class.c (build_utf8_ref): Likewise.
2050 2006-11-12 David Daney <ddaney@avtrex.com>
2053 * typeck.c (build_java_array_type): Increase buffer sizes.
2055 2006-11-11 Richard Guenther <rguenther@suse.de>
2057 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2058 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2060 2006-11-06 Andrew Haley <aph@redhat.com>
2062 * java-tree.h (CONSTANT_LazyFlag): New.
2063 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2064 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2066 (handle_constant): Return 0 for dummy cpool entries.
2067 Handle constants of kind Class.
2068 Handle constants of kind NameAndType.
2069 (handle_enclosingmethod_attribute): New.
2070 (handle_signature_attribute): New.
2071 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2072 (HANDLE_SIGNATURE_ATTRIBUTE): New.
2073 (handle_constant): Use unmangle_classname()rather than calling
2074 identifier_subst() directly.
2076 2006-11-02 Andrew Haley <aph@redhat.com>
2078 * java-tree.h (FIELD_ENUM): New.
2079 (lang_decl_var.field_enum): New.
2080 (lang_type.enum_class): New.
2082 * class.c (set_class_decl_access_flags): Handle enum types.
2083 (add_field): Handle enum fields.
2084 (get_access_flags_from_decl): Likewise.
2086 * class.c (make_class_data): Put reflection_data into rodata.
2088 2006-11-01 Andrew Haley <aph@redhat.com>
2090 * jcf-parse.c (field_offsets, bit_obstack): New variables.
2091 (jcf_parse): Write end marker to annotation_data.
2092 (java_parse_file): Create field_offsets bitmap. Destroy it.
2093 (annotation_grow, annotation_rewrite_byte)
2094 (annotation_rewrite_short, annotation_rewrite_int)
2095 (annotation_read_short, annotation_write_byte)
2096 (annotation_write_short, annotation_write_int)
2097 (handle_long_constant, handle_constant, handle_element_value)
2098 (handle_annotation, handle_annotations)
2099 (handle_annotation_attribute, rewrite_reflection_indexes)
2100 (handle_member_annotations, handle_parameter_annotations)
2101 (handle_default_annotation): New functions.
2102 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2103 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2104 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2105 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2106 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2107 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
2108 (TYPE_REFLECTION_DATA): New.
2109 (TYPE_REFLECTION_DATASIZE): New.
2110 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2112 * jcf-reader.c (get_attribute): Pass field/method index and
2113 attribute type to get_attribute().
2114 * constants.c (find_class_or_string_constant): Make nonstatic.
2115 (cpool_for_class): Likewise.
2116 (build_constants_constructor): Separate string and scalar types.
2117 * class.c (make_class_data): Generate field_indexes permutation.
2118 Pass it to rewrite_reflection_indexes().
2119 (make_class_data): Generate constructor for reflection_data field.
2121 2006-10-20 Tom Tromey <tromey@redhat.com>
2123 * gcj.texi (Top): Don't mention jv-scan.
2124 (Invoking gcj): Likewise.
2125 (Invoking gcjh): Likewise.
2126 (Invoking gjnih): Likewise.
2127 (Invoking gij): Likewise.
2128 (Invoking gcj-dbtool): Likewise.
2129 (Invoking jv-scan): Removed.
2130 * parse-scan.y: Removed.
2131 * jv-scan.c: Removed.
2132 * config-lang.in (stagestuff): Don't mention jv-scan.
2133 * Make-lang.in (java): Removed jv-scan.
2134 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2135 (JVSCAN_OBJS): Removed.
2136 (jv-scan$(exeext)): Likewise.
2137 (JAVA_MANFILES): Removed jv-scan.1.
2138 (java.uninstall): Don't mention jv-scan.
2139 (java.mostlyclean): Likewise.
2140 (java.maintainer-clean): Likewise.
2141 (.INTERMEDIATE): Likewise.
2142 (java/jv-scan.o): Removed.
2143 (jv-scan.pod): Likewise.
2144 (java.srcextra): Don't mention parse-scan.c.
2145 (java.mostlyclean): Likewise.
2146 (java/parse-scan.c): Removed.
2147 (java/parse-scan.o-warn): Removed.
2148 (java/parse-scan.o): Removed.
2150 2006-10-20 Tom Tromey <tromey@redhat.com>
2152 * lang.c (java_handle_option): Don't use
2153 jcf_write_base_directory.
2154 * jcf.h (jcf_write_base_directory): Removed.
2155 * parse.y (java_expand_classes): Don't call write_classfile.
2156 * config-lang.in (gtfiles): Removed jcf-write.c.
2157 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2158 (java/jcf-write.o): Removed.
2159 * jcf-parse.c (parse_class_file): Don't call write_classfile.
2160 * java-tree.h (write_classfile): Removed declaration.
2161 * jcf-write.c: Removed.
2163 2006-10-20 Tom Tromey <tromey@redhat.com>
2165 * Make-lang.in (java): Removed gjnih, gcjh.
2166 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2167 (GCJH_OBJS): Removed.
2168 (GJNIH_OBJS): Likewise.
2169 (gjnih$(exeext)): Likewise.
2170 (gcjh$(exeext)): Likewise.
2171 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2172 (java.install-common): Don't special case gcjh.
2173 (java.uninstall): Don't mention gcjh, gjnih.
2174 (java.mostlyclean): Likewise.
2175 (java.maintainer-clean): Likewise.
2176 (.INTERMEDIATE): Likewise.
2177 (gcjh.pod): Removed.
2178 (gjnih.pod): Likewise.
2179 (GCJH_TARGET_INSTALL_NAME): Removed.
2180 (java/gjavah-jni.o): Removed.
2181 (java/gjavah.o): Likewise.
2182 * config-lang.in (stagestuff): Removed gjnih, gcjh.
2183 * gjavah.c: Removed.
2185 2006-10-17 Tom Tromey <tromey@redhat.com>
2187 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2190 2006-10-17 Tom Tromey <tromey@redhat.com>
2192 * jvgenmain.c (main): Handle -findirect-dispatch.
2193 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2196 2006-10-06 Andrew Haley <aph@redhat.com>
2198 * builtins.c (compareAndSwapInt_builtin): Check that we really do
2199 have a compare_and_swap builtin.
2200 (compareAndSwapLong_builtin): Likewise.
2201 (compareAndSwapObject_builtin): Likewise.
2203 2006-10-04 Andrew Haley <aph@redhat.com>
2205 * builtins.c (java_builtins): Add compareAndSwapInt,
2206 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2207 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2208 putObjectVolatile, getObjectVolatile, getIntVolatile,
2209 getLongVolatile, getLong.
2210 (UNMARSHAL3): New macro.
2211 (UNMARSHAL4): Likewise.
2212 (UNMARSHAL5): Likewise.
2213 (build_arglist_for_builtin): New function.
2214 (build_addr_sum, build_check_this): New functions.
2215 (putObject_builtin. compareAndSwapInt_builtin,
2216 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2217 putVolatile_builtin, getVolatile_builtin): New builtins.
2219 2006-06-08 Andrew Haley <aph@redhat.com>
2221 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2222 get_symbol_table_index().
2223 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2225 (build_known_method_ref): New arg: special. Pass it to
2226 get_symbol_table_index.
2227 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2229 (build_invokevirtual): New arg: special. Pass it to
2230 get_symbol_table_index.
2231 (expand_invoke): New variable: special.
2232 Pass it to maybe_rewrite_invocation().
2233 Pass it to build_known_method_ref().
2234 * class.c (build_symbol_entry): Add new arg: special. Use it to
2235 build the symbol table conbstructor.
2236 (emit_symbol_table): Extract SPECIAL from the method list and pass
2237 it to build_symbol_entry().
2238 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2239 special accordingly.
2241 2006-09-08 Andrew Haley <aph@redhat.com>
2243 * class.c (layout_class_method): Use build_java_signature, not
2244 build_java_argument_signature. Use lookup_java_method, not
2245 lookup_argument_method.
2247 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2248 Bryce McKinlay <bryce@mckinlay.net.nz>
2250 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2252 2006-07-18 Tom Tromey <tromey@redhat.com>
2254 * lang.opt: Added missing -W options.
2256 2006-07-12 Tom Tromey <tromey@redhat.com>
2259 * lang-specs.h: Pass '%U'-based options as separate arguments.
2260 Use -faux-classpath.
2261 * lang.c (java_handle_option): Handle OPT_faux_classpath.
2262 * lang.opt (faux-classpath): New option.
2264 2006-07-07 Tom Tromey <tromey@redhat.com>
2266 * class.c (make_class_data): Set value for reflection_data field.
2267 * decl.c (java_init_decl_processing): Add reflection_data field.
2269 2006-07-07 Tom Tromey <tromey@redhat.com>
2271 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2273 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2275 2006-07-07 Andrew Haley <aph@redhat.com>
2277 * jcf-parse.c (set_source_filename): Don't check for
2278 CLASS_FROM_CURRENTLY_COMPILED_P.
2281 2006-07-07 Andrew Haley <aph@redhat.com>
2283 * java-tree.h (java_read_sourcefilenames): Declare.
2284 * lang.c (java_handle_option): Call java_read_sourcefilenames().
2285 * lang.opt (fsource-filename): New opt.
2286 * lang-specs.h: Add -fsource-filename.
2287 * jcf-parse.c (num_files, filenames): New variables.
2288 (reverse, cmpstringp, java_read_sourcefilenames,
2289 find_sourcefile): New.
2290 (set_source_filename): Call find_sourcefile to find the real name
2293 2006-06-27 Tom Tromey <tromey@redhat.com>
2295 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2296 Signature, LocalVariableTypeTable, annotation attributes.
2297 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2298 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2299 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2300 (HANDLE_METHOD): Likewise.
2301 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2302 (print_annotation): New function.
2303 (print_element_value): Likewise.
2305 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2306 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2307 (print_parameter_annotations): New function.
2308 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2309 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2311 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2312 (print_annotations): New function.
2314 2006-06-23 Tom Tromey <tromey@redhat.com>
2316 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
2317 emitting class files, always use 1.5.
2318 * gcj.texi (Input Options): Document -fsource.
2319 (Code Generation): Document -ftarget.
2321 2006-06-21 Tom Tromey <tromey@redhat.com>
2324 * expr.c (expand_java_field_op): Initialize field's declaring
2327 2006-06-20 Tom Tromey <tromey@redhat.com>
2329 * expr.c (push_value): Always flush quick stack.
2331 2006-06-19 Tom Tromey <tromey@redhat.com>
2333 * expr.c (push_value): Also flush quick stack if value is a
2336 2006-06-19 Tom Tromey <tromey@redhat.com>
2338 * expr.c (push_value): Flush quick stack if value has side
2341 2006-06-13 Tom Tromey <tromey@redhat.com>
2343 * class.c (is_compiled_class): Explicitly check for current
2346 2006-06-09 Tom Tromey <tromey@redhat.com>
2348 * gjavah.c (decompile_method): Don't decompile a static field
2351 2006-06-06 Tom Tromey <tromey@redhat.com>
2353 * lang-specs.h <jc1>: Add .jar file to command line if
2354 -fsaw-java-file. Also, remove -ffilelist-file in this case.
2356 2006-06-05 Tom Tromey <tromey@redhat.com>
2358 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2359 synthetic, enum, annotation.
2360 * jcf.h (ACC_BRIDGE): New macro.
2361 (ACC_VARARGS): Likewise.
2362 (ACC_SYNTHETIC): Likewise.
2363 (ACC_ENUM): Likewise.
2364 (ACC_ANNOTATION): Likewise.
2366 2006-06-04 Tom Tromey <tromey@redhat.com>
2368 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2369 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2371 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
2372 when needed. Handle classpath-setting.
2373 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2374 * lang-specs.h: Rewrote.
2376 2006-06-04 Tom Tromey <tromey@redhat.com>
2378 * jcf-io.c (find_class): Set source_ok to 0.
2379 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2380 (parse_class_file): Don't call java_mark_class_local.
2381 (java_parse_file): Skip .java files. Call java_mark_class_local
2382 before lowering any code.
2383 (parse_zip_file_entries): Don't call duplicate_class_warning
2385 (process_zip_dir): ... call it here.
2386 * class.c (add_field): Don't mark field external if it is being
2387 compiled into this object.
2388 (make_class_data): Handle situation where class_dtable_decl is
2389 created before Class is compiled.
2390 (is_compiled_class): Don't assume files in zip are compiled into
2392 (layout_class_method): Don't mark method external if it is being
2393 compiled into this object.
2395 2006-06-04 Tom Tromey <tromey@redhat.com>
2397 * jcf-path.c (jcf_path_compute): New function.
2398 * jcf.h (jcf_path_compute): Declare.
2400 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2402 * decl.c: Include langhooks.h.
2403 (builtin_function): Remove.
2404 (java_init_decl_processing): Replace calls to builtin_function
2405 with add_builtin_function.
2406 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2407 (java/decl.o): Depend on langhooks.h.
2408 * java-tree.h (builtin_function): Remove.
2410 2006-10-10 Brooks Moses <bmoses@stanford.edu>
2412 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2414 2006-09-12 Tom Tromey <tromey@redhat.com>
2416 * expr.c (push_value): Always flush quick stack.
2418 2006-09-12 Tom Tromey <tromey@redhat.com>
2421 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2422 the push of the called method's return result.
2424 2006-09-12 Tom Tromey <tromey@redhat.com>
2426 * jvspec.c (lang_specific_driver): Read spec file even if
2429 2006-09-12 Tom Tromey <tromey@redhat.com>
2432 * expr.c (expand_java_field_op): Initialize field's declaring
2433 interface if necessary.
2435 2006-09-12 Tom Tromey <tromey@redhat.com>
2438 * expr.c (expand_java_field_op): No error for assignments not in
2439 class initializer or constructor.
2441 2006-08-22 Andrew Haley <aph@redhat.com>
2443 * decl.c (java_add_stmt): Give the statement list a type.
2445 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2446 Bryce McKinlay <bryce@mckinlay.net.nz>
2448 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2450 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
2453 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2454 or '--' is used with a constant operand.
2455 (java_complete_lhs): When processing a '++' or '--' expression,
2456 don't call java_complete_tree but java_complete_lhs, so that a
2457 static final variable operand is never replaced by its value. This
2458 avoids an ICE later on.
2459 (patch_unaryop): Fixed typo in comment.
2461 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2463 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2465 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2467 * builtins.c (check_for_builtin): If a builtin could result in a
2468 direct call being generated, don't use it if flag_indirect_dispatch
2471 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2473 * gcj.texi (Invocation): Corrections for Invocation API example.
2475 2006-07-04 Andrew Haley <aph@redhat.com>
2477 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2480 2006-06-21 Andrew Haley <aph@redhat.com>
2482 * java-tree.h (update_aliases): Remove
2483 * expr.c (expand_iinc): Remove call to update_aliases().
2484 (STORE_INTERNAL): Likewise.
2485 * decl.c (update_aliases, initialize_local_variable)
2486 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2488 2006-06-19 Andrew Haley <aph@redhat.com>
2492 * expr.c (java_modify_addr_for_volatile): New function.
2493 (expand_java_field_op): Handle volatile fields.
2494 * java-gimplify.c (java_gimplify_component_ref): Call
2495 java_modify_addr_for_volatile to give the field_ref the correct
2497 (java_gimplify_modify_expr): Likewise.
2498 * java-tree.h (java_modify_addr_for_volatile): New decl.
2500 2006-06-17 Karl Berry <karl@gnu.org>
2502 * gcj.texi (@dircategory): Use "Software development" instead
2503 of "Programming", following the Free Software Directory.
2505 2006-06-16 Andrew Haley <aph@redhat.com>
2507 * class.c (make_class_data): When using flag_indirect_classes,
2508 don't initialize the vtable of Class instances.
2510 2006-06-09 Andrew Haley <aph@redhat.com>
2514 * builtins.c (initialize_builtins): Add __sync_synchronize().
2515 * class.c (add_field): Mark volatile fields.
2516 * java-gimplify.c (java_gimplify_expr): Call new functions to
2517 handle self-modifying exprs and COMPONENT_REFs.
2518 (java_gimplify_component_ref): New.
2519 (java_gimplify_modify_expr): Add handling for volatiles.
2521 2006-06-08 Tom Tromey <tromey@redhat.com>
2523 * gcj.texi (libgcj Runtime Properties): Document
2524 gnu.gcj.user.realname.
2526 2006-06-08 Andrew Haley <aph@redhat.com>
2528 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2529 get_symbol_table_index().
2530 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2532 (build_known_method_ref): New arg: special. Pass it to
2533 get_symbol_table_index.
2534 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2536 (build_invokevirtual): New arg: special. Pass it to
2537 get_symbol_table_index.
2538 (expand_invoke): New variable: special.
2539 Pass it to maybe_rewrite_invocation().
2540 Pass it to build_known_method_ref().
2541 * class.c (build_symbol_entry): Add new arg: special. Use it to
2542 build the symbol table conbstructor.
2543 (emit_symbol_table): Extract SPECIAL from the method list and pass
2544 it to build_symbol_entry().
2545 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2546 special accordingly.
2548 2006-06-06 David Daney <ddaney@avtrex.com>
2550 * gcj.texi (libgcj Runtime Properties): Document
2551 gnu.gcj.runtime.NameFinder.show_raw and
2552 gnu.gcj.runtime.NameFinder.remove_unknown.
2554 2006-06-06 Tom Tromey <tromey@redhat.com>
2556 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2557 synthetic, enum, annotation.
2558 * jcf.h (ACC_BRIDGE): New macro.
2559 (ACC_VARARGS): Likewise.
2560 (ACC_SYNTHETIC): Likewise.
2561 (ACC_ENUM): Likewise.
2562 (ACC_ANNOTATION): Likewise.
2564 2006-06-06 Mike Stump <mrs@apple.com>
2566 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
2567 installing during build.
2569 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
2571 * gcj.texi (Extensions): Document the new gcj-dbtool-based
2572 classname-to-library resolution mechanism.
2573 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
2574 mechanism deprecated.
2575 (libgcj Runtime Properties): Document
2576 gnu.gcj.runtime.VMClassLoader.library_control's new default.
2578 2006-05-29 Jakub Jelinek <jakub@redhat.com>
2580 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
2582 (jword): Define to uint64 on 64-bit arches.
2583 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
2585 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
2587 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
2590 2006-05-26 Tom Tromey <tromey@redhat.com>
2592 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
2593 * verify-glue.c (vfy_class_type): New function.
2594 * verify-impl.c (check_constant): Allow 'ldc class'.
2595 * verify.h (vfy_class_type): Declare.
2597 2006-05-25 Andrew Haley <aph@redhat.com>
2600 * decl.c (maybe_pushlevels): When variable ranges are non-nested
2601 update all lifetimes, not just the first one.
2603 2006-05-24 Tom Tromey <tromey@redhat.com>
2605 * java-tree.h: Fixed flag documentation.
2607 2006-05-24 Tom Tromey <tromey@redhat.com>
2610 * jcf.h (ACC_INVISIBLE): Changed value.
2612 2006-05-24 Andrew Haley <aph@redhat.com>
2615 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
2618 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2620 * lang.opt (femit-class-file): Remove VarExists.
2622 2006-05-16 Tom Tromey <tromey@redhat.com>
2624 * verify-impl.c (verify_instructions_0) <op_return>: Special case
2627 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2630 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
2633 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
2635 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
2636 (java/expr.o): Replace target.h with $(TARGET_H).
2637 (java/parse.o): Likewise.
2639 2006-05-10 Andrew Haley <aph@redhat.com>
2641 * class.c (emit_indirect_register_classes): Fix comment.
2643 2006-05-04 Tom Tromey <tromey@redhat.com>
2645 * java-tree.h (uses_jv_markobj_p): Declare.
2646 * class.c (uses_jv_markobj_p): Removed.
2647 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
2648 (get_boehm_type_descriptor): Use it.
2649 (uses_jv_markobj_p): Moved from class.c. Return bool.
2651 2006-05-04 Tom Tromey <tromey@redhat.com>
2653 * java-tree.def (THIS_EXPR): Now a tcc_expression.
2655 2006-05-04 Andrew Haley <aph@redhat.com>
2657 * class.c (make_field_value): Always build_address_of fdecl if
2658 there is an initializer.
2660 2006-05-03 Andrew Haley <aph@redhat.com>
2663 * expr.c (maybe_rewrite_invocation): New function.
2664 (rewrite_arglist_getclass): Likewise.
2666 (expand_invoke): Call maybe_rewrite_invocation.
2667 * parse.y (patch_invoke): Likewise.
2668 * java-tree.h: (maybe_rewrite_invocation): New function.
2670 2006-04-21 Andrew Haley <aph@redhat.com>
2672 * lang.c (java_init): Handle flag_indirect_classes.
2673 * jvgenmain.c: Use "class$$" instead of "class$".
2674 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
2676 (mangle_class_field): Special case "class$$" as well as "class$".
2677 * constants.c (build_ref_from_constant_pool): If
2678 flag_indirect_classes, generate a ref into the heap.
2679 * decl.c (constants_field_decl_node,
2680 constants_data_field_decl_node): New.
2681 * class.c (build_static_class_ref): New.
2682 (build_classdollar_field): Factor out from build_class_ref().
2683 (make_field_value): Handle static fields in heap.
2684 (make_class_data): Make sure we get a static ref to class.
2685 Make class initializer const if flag_indirect_classes.
2686 (register_class): Build a class_ref for initialization if
2687 flag_indirect_classes.
2688 (emit_indirect_register_classes): New.
2690 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
2692 * expr.c, gjavah.c: Fix comment typos.
2694 2006-04-03 Andrew Haley <aph@redhat.com>
2697 * expr.c (build_field_ref): Don't check the field offset if
2700 2006-03-30 Andrew Haley <aph@redhat.com>
2703 * lang.c (java_attribute_table): New.
2704 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
2705 * expr.c (build_field_ref): Add a null pointer check for all
2706 fields of offset > 4k. Don't do so for accesses via the this
2707 pointer, which we know can never be null.
2708 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
2711 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
2713 * Make-lang.in: Rename docdir to gcc_docdir.
2715 2006-03-30 Tom Tromey <tromey@redhat.com>
2718 * parse.y (java_reorder_fields): Reset superclass field's size as
2721 2006-03-28 Tom Tromey <tromey@redhat.com>
2724 * parse.y (find_most_specific_methods_list): Added 'class'
2726 (lookup_method_invoke): Updated.
2728 2006-03-15 Tom Tromey <tromey@redhat.com>
2730 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
2731 non-static method calls.
2733 2006-03-15 David Daney <ddaney@avtrex.com>
2735 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
2738 2006-03-15 David Daney <ddaney@avtrex.com>
2740 * lang.opt (-freduced-reflection): New option.
2741 * lang.c (java_post_options): Generate an error if
2742 -freduced-reflection used with -fjni or -findirect-dispatch.
2743 * java-tree.h (flag_reduced_reflection): Declare new variable.
2744 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
2745 if bitmap overflows and flag_reduced_reflection set.
2746 * class.c (uses_jv_markobj_p): New function.
2747 (make_class_data): Moved generation of vtable to before
2748 reflection data, generate less reflection data if
2749 flag_reduced_reflection set.
2750 * gcj.texi: Document -freduced-reflection.
2752 2006-03-15 Tom Tromey <tromey@redhat.com>
2755 * class.c (get_interface_method_index): Don't put <clinit> into
2758 2006-03-15 Tom Tromey <tromey@redhat.com>
2760 * parse.y (analyze_clinit_body): Ignore empty statements.
2762 2006-03-08 David Daney <ddaney@avtrex.com>
2764 * gcj.texi: Document -static-libgcj option.
2766 2006-02-20 Andrew Haley <aph@redhat.com>
2768 * jcf-parse.c (parse_class_file): Set input_location from
2771 2006-02-15 Andrew Haley <aph@redhat.com>
2773 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
2774 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
2775 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
2777 2006-02-09 Andrew Haley <aph@redhat.com>
2780 * expr.c (expand_invoke): Allow methods in arrays to be resolved
2781 in their superclass.
2783 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
2786 2006-02-08 Tom Tromey <tromey@redhat.com>
2789 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
2790 * builtins.c (convert_real): New function.
2791 (java_builtins): Handle Float.intBitsToFloat,
2792 Float.floatToRawIntBits, Double.longBitsToDouble,
2793 Double.doubleToRawLongBits.
2795 2006-02-07 Andrew Haley <aph@redhat.com>
2797 * expr.c (expand_invoke): (BC mode.) If we find a method in a
2798 class other than the one in which we expected to find it, ignore
2802 * constants.c (build_constants_constructor): move initializer into
2803 first halfword on a 64-bit big-endian machine.
2805 2006-02-04 Tom Tromey <tromey@redhat.com>
2808 * builtins.c (max_builtin): Skip floating point 'max'.
2809 (min_builtin): Skip floating point 'min'.
2810 (check_for_builtin): Never return NULL_TREE.
2812 2006-02-04 Tom Tromey <tromey@redhat.com>
2815 * expr.c (push_type): Avoid side effect in gcc_assert.
2817 2006-02-04 Roger Sayle <roger@eyesopen.com>
2819 * decl.c (java_init_decl_processing): Create char_type_node as a
2820 regular INTEGER_TYPE node.
2821 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
2822 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
2823 test for char_type_node and promoted_char_type_node as special
2824 instances of INTEGER_TYPE tree codes.
2825 (promote_type,build_java_signature): Likewise.
2826 * jcf-write.c (adjust_typed_op): Likewise.
2827 * mangle.c (mangle_type): Likewise.
2828 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
2829 * parse.h (JINTEGRAL_TYPE_P): Likewise.
2831 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
2833 * expr.c (java_stack_swap): Revert gcc_assert patch.
2835 2006-02-03 Ben Elliston <bje@au.ibm.com>
2837 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
2838 * typeck.c: Likewise.
2839 * verify-impl.c: Likewise.
2840 * class.c: Likewise.
2842 * jcf-parse.c: Likewise.
2843 * constants.c: Likewise.
2844 * check-init.c: Likewise.
2845 * jcf-write.c: Likewise.
2846 * verify-glue.c: Likewise.
2847 * mangle.c: Likewise.
2850 * boehm.c: Likewise.
2852 2006-02-01 Jan Hubicka <jh@suse.cz>
2854 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
2855 * lang.c (java_init_options): Set no_unit_at_a_time_default.
2857 2006-01-30 Andrew Haley <aph@redhat.com>
2860 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
2862 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
2864 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
2865 Update copyright notice dates.
2867 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2869 * jvspec.c (lang_specific_spec_functions): Remove.
2871 2006-01-06 Tom Tromey <tromey@redhat.com>
2873 * gcj.texi (Arrays): Added more documentation for
2875 (Primitive types): Correct information about primitive classes.
2876 (Reference types): New node.
2879 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
2881 * jcf-parse.c (set_source_filename): Set the decl source location
2882 even when returning early.
2884 2005-12-15 Tom Tromey <tromey@redhat.com>
2885 Andrew Haley <aph@redhat.com>
2888 * parse.y (resolve_expression_name): Don't generate accessor
2889 methods for constant fields.
2891 2005-12-13 Andrew Haley <aph@redhat.com>
2895 * class.c (maybe_layout_super_class): Update current_class before
2896 calling do_resolve_class.
2898 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
2901 * jcf-write.c (write_classfile): Use PID in temporary class
2902 file. Save/restore errno when reporting error.
2904 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
2907 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
2908 to bare_function_type and including the return type
2909 * builtins.c (initialize_builtins) : Change builtin mangled name
2910 constants to conform to new mangling scheme
2912 2005-12-08 Andrew Haley <aph@redhat.com>
2915 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
2916 (soft_abstractmethod_node): New.
2917 * expr.c (build_field_ref): Add in-line check for missing field.
2918 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
2920 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2922 * Make-lang.in (java.all.build, java.install-normal): Remove.
2924 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2926 * Make-lang.in: Remove all dependencies on s-gtype, except for
2929 2005-12-07 Richard Sandiford <richard@codesourcery.com>
2931 * class.c (build_utf8_ref, emit_register_classes): Use
2932 switch_to_section and get_section.
2934 2005-12-06 Tom Tromey <tromey@redhat.com>
2937 * parse.y (patch_new_array_init): Revert previous patch.
2938 (lookup_method_invoke): Use size-less array type when creating an
2939 anonymous constructor.
2941 2005-12-05 Tom Tromey <tromey@redhat.com>
2943 * parse.y (patch_new_array_init): Don't set length on array.
2945 2005-12-02 Richard Guenther <rguenther@suse.de>
2947 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
2948 buildN instead of build.
2949 * class.c (finish_class): Likewise.
2950 * expr.c (java_create_object): Likewise.
2952 2005-11-28 Tom Tromey <tromey@redhat.com>
2955 * expr.c (build_jni_stub): Unwrap the return value.
2956 * java-tree.h (soft_unwrapjni_node): New define.
2957 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
2958 * decl.c (java_init_decl_processing): Initialize
2959 soft_unwrapjni_node.
2961 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
2963 * gcj.texi (gij options): Add -Xss documentation.
2965 2005-11-08 Wil Mahan <wmahan@gmail.com>
2968 * zextract.c (read_zip_archive): Fix out of memory error when
2969 reading jar files with zip-style comments.
2971 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
2973 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
2975 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
2977 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
2978 Wil Mahan <wmahan@gmail.com>
2981 * class.c (make_class): Create empty binfo here.
2982 (set_super_info): Only create binfo if we have superclasses.
2984 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
2987 * parse.y (method_header): Make the result of the rule a NULL_TREE
2988 when a parsing error occurs.
2990 2005-09-29 Tom Tromey <tromey@redhat.com>
2993 * jcf-io.c (memoized_dirlist_hash): New function.
2994 (caching_stat): Use it.
2996 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
2999 * class.c (inherits_from_p): Try to lay out super class
3000 if it is not already laid out.
3001 (maybe_layout_super_class): Handle the case where SUPER_CLASS
3004 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
3006 * builtins.c (max_builtin, min_builtin, abs_builtin,
3007 java_build_function_call_expr): Use fold_buildN.
3008 * class.c (layout_class_method): Likewise.
3009 * expr.c (java_truthvalue_conversion, build_java_jsr,
3010 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3011 build_java_binop, build_field_ref, expand_compare,
3012 build_known_method_ref, build_invokevirtual,
3013 process_jvm_instruction): Likewise.
3014 * parse.y (patch_binop, patch_exit_expr): Likewise.
3015 * typeck.c (convert_ieee_real_to_integer): Likewise.
3016 (convert): Don't call fold after convert_ieee_real_to_integer.
3018 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
3021 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3022 the newly created type. Set import lists here, not in create_class.
3023 (jdep_resolve_class): Set current_class.
3024 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
3025 the current package context, not ctxp->package.
3026 (cicp_cache): Removed.
3027 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3028 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3029 * java-tree.h (TYPE_PACKAGE): New macro.
3030 (struct lang_type): New member 'package'.
3032 2005-09-09 Andrew Haley <aph@redhat.com>
3035 * expr.c (pop_type_0): If the expected type is object or ptr
3036 (i.e. void*), return the type of the object we just popped from
3039 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
3041 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3042 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3044 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
3046 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3047 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3048 typos. Follow spelling conventions.
3050 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
3053 * typeck.c (lookup_do): Look up interfaces for the original class,
3055 * parse.y (java_check_regular_methods): Fix diagnostic message for
3056 more restrictive overriding of a method from an interface.
3058 2005-08-16 Tom Tromey <tromey@redhat.com>
3060 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3061 class' initial state.
3063 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3066 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3067 `literal_token' for large numeric input tokens.
3069 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3072 * parse.y (nested_field_access_p): Rename to nested_member_access_p
3073 and expand to handle method accesses across nested classes.
3074 (build_outer_method_access_method): Rename to
3075 build_nested_method_access_method. Minor adjustments to comments.
3076 (resolve_expression_name): Use the newly-renamed
3077 nested_member_access_p method.
3078 (resolve_qualified_expression_name): Likewise.
3079 (patch_method_invocation): Also consider static methods for access
3080 method generation. Minor adjustments to comments.
3081 (maybe_use_access_method): Use the more general
3082 nested_memeber_access_p to determine access across nested class
3083 boundaries. Allow THIS_ARG to be NULL (for static methods).
3085 2005-08-15 Tom Tromey <tromey@redhat.com>
3088 * expr.c (build_field_ref): Don't generate otable reference when
3089 DECL_FIELD_OFFSET is 0.
3090 * class.c (maybe_layout_super_class): Pass outer class to
3093 2005-08-15 Tom Tromey <tromey@redhat.com>
3095 * java-tree.h (LABEL_IN_SUBR): Removed.
3096 (LABEL_IN_SUBR): Likewise.
3097 (LABEL_IS_SUBR_START): Likewise.
3098 (LABEL_SUBR_START): Likewise.
3099 (LABEL_SUBR_CONTEXT): Likewise.
3100 (LABEL_CHANGED): Likewise.
3101 (LABEL_RETURN_LABEL): Likewise.
3102 (LABEL_RETURN_TYPE_STATE): Likewise.
3103 (LABEL_RETURN_LABELS): Likewise.
3104 (RETURN_MAP_ADJUSTED): Likewise.
3105 (LABEL_PENDING_CHAIN): Likewise.
3107 2005-08-15 Tom Tromey <tromey@redhat.com>
3109 * Make-lang.in (JAVA_OBJS): Removed verify.o
3110 (java/verify.o): Removed.
3111 * verify.c: Removed.
3112 * lang.c (flag_new_verifier): Removed.
3113 (java_post_options): Updated.
3114 * java-tree.h (flag_new_verifier): Removed.
3115 (verify_jvm_instructions): Removed.
3116 * expr.c (pop_type_0): Assume flag_new_verifier is true.
3117 (build_java_check_indexed_type): Likewise.
3118 (expand_java_arraystore): Likewise.
3119 (expand_java_arrayload): Likewise.
3120 (pop_arguments): Likewise.
3121 (expand_byte_code): Likewise.
3122 (process_jvm_instruction): Likewise.
3124 2005-08-10 Andrew Haley <aph@redhat.com>
3126 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3127 type mismatches to make legal GIMPLE.
3129 2005-08-10 Robin Green <greenrd@greenrd.org>
3132 * parse.y (maybe_use_access_method): Generalize check from
3133 java.lang.Object to any superclass of current_class
3135 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
3137 * class.c (build_class_ref): Wrap the primary class type in a
3139 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3140 primary class type from the NOP_EXPR in which it was placed.
3142 2005-07-28 Diego Novillo <dnovillo@redhat.com>
3144 * expr.c (expand_load_internal): Fix missing parens in
3147 2005-07-28 Andrew Haley <aph@redhat.com>
3149 * expr.c (expand_load_internal): Convert to destination type.
3151 2005-07-22 Manfred Hollstein <mh@suse.com>
3153 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3154 (check_constant): Likewise.
3155 (check_wide_constant): Likewise.
3157 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
3159 Make CONSTRUCTOR use VEC to store initializers.
3160 * check-init.c (check_init): Update to cope with VEC in
3162 * class.c (make_field_value, make_method_value, get_dispatch_table,
3163 make_class_data, emit_symbol_table, emit_catch_table,
3164 emit_assertion_table): Use build_constructor_from_list instead of
3166 * constants.c (build_constants_constructor): Likewise.
3167 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3168 VEC in CONSTRUCTOR_ELTS.
3169 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3170 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3172 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3174 * parse.y (build_new_array_init): Use build_constructor_from_list
3175 instead of build_constructor.
3176 (patch_new_array_init): Update to cope with VEC in
3178 (array_constructor_check_entry): Likewise.
3180 2005-07-12 Tom Tromey <tromey@redhat.com>
3182 * jvspec.c (lang_specific_driver): Put filelist_filename first on
3185 2005-07-12 Tom Tromey <tromey@redhat.com>
3188 * parse-scan.y (interface_member_declaration): Added
3191 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
3193 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3194 (LABEL_PENDING_CHAIN): Ditto.
3196 (DECL_BIT_INDEX): Ditto.
3198 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3201 * parse.y (inner_class_accessible): New function. Logic moved from
3202 check_inner_class_access.
3203 (check_inner_class_access): Use inner_class_accessible.
3204 (resolve_inner_class): Simplify arguments. Create circularity hash
3205 here. Keep looking for classes if we found one that was inaccessible.
3206 Return the inaccessible class only if there is no other match.
3207 (do_resolve_class): Update for new resolve_inner_class arguments.
3208 Don't create circularity_hash here.
3210 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3213 * parse.y (add_exception_to_throws): New function.
3214 (purge_unchecked_exceptions): Removed.
3215 (get_constructor_super): Renamed from verify_constructor_super. Now
3216 returns the super constructor after verification.
3217 (java_complete_expand_method): Don't use purge_unchecked_exceptions
3218 or save/restore the exception list.
3219 (check_thrown_exceptions): Add uncaught exceptions in anonymous
3220 class initializers and constructors to the throws clause of the method.
3222 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
3225 * parse.y (interface_member_declaration): Allow empty statements in
3226 interface declarations.
3228 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
3230 * Makefile.in (parse.o): Adjust dependencies.
3231 * parse.y: Include tree-dump.h.
3233 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
3235 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
3238 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
3240 * parse.y (issue_warning_error_from_context): Call
3241 pp_output_formatted_text to be able to get the buffer.
3243 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
3245 * parse.y (issue_warning_error_from_context): Update for the
3246 renaming of pp_format_text to pp_format.
3248 2005-06-28 Paul Brook <paul@codesourcery.com>
3250 * decl.c (java_init_decl_processing): Call
3251 default_init_unwind_resume_libfunc.
3253 2005-06-27 Tom Tromey <tromey@redhat.com>
3255 PR java/21540, PR java/13788:
3256 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3257 fold_constant_for_init.
3258 (patch_binop): Added 'folding' argument. Updated all callers.
3259 (patch_unaryop) <NOP_EXPR>: New case.
3260 (fold_constant_for_init) <NOP_EXPR>: Likewise.
3261 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3263 2005-06-25 Jan Hubicka <jh@suse.cz>
3265 * builtins.c (define_builtin): Accept new flags parameter.
3266 (initialize_builtins): Mark the builtins const and nothrow accordingly.
3268 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
3270 * all files: Update FSF address in copyright headers.
3272 2005-06-24 Tom Tromey <tromey@redhat.com>
3274 * verify-impl.c (verify_instructions_0): Correctly handle
3275 situation where PC falls off end.
3277 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
3280 * parse.y (find_most_specific_methods_list): Remove special case for
3283 2005-06-15 Tom Tromey <tromey@redhat.com>
3286 * class.c (make_method_value): Use soft_abstractmethod_node for
3288 * java-tree.h (soft_abstractmethod_node): New define.
3289 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3290 * decl.c (java_init_decl_processing): Initialize
3291 soft_abstractmethod_node.
3293 2005-06-13 Geoffrey Keating <geoffk@apple.com>
3295 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3297 2005-06-13 Per Bothner <per@bothner.com>
3299 * expr.c (int highest_label_pc_this_method,
3300 start_label_pc_this_method): New globals.
3301 (lookup_label): Add start_label_pc_this_method to pc for label, and
3302 update highest_label_pc_this_method. This prevents conflicts between
3303 labels from different methods.
3304 * java-tree.h: Declare new globals.
3305 * jcf-parse.c (parse_class_file): If needed bump
3306 start_label_pc_this_method and reset highest_label_pc_this_method.
3308 2005-06-13 Tom Tromey <tromey@redhat.com>
3311 * parse.y (nested_field_access_p): Handle case where outer field
3312 is inherited by enclosing class.
3314 2005-06-12 Per Bothner <per@bothner.com>
3316 * class.c (inherits_from_p): Do load_class if needed.
3318 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3320 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3321 * java-tree.h (parse_error_context): Move...
3322 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3323 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3324 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3326 2005-06-08 Roger Sayle <roger@eyesopen.com>
3328 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3330 2005-06-06 Jakub Jelinek <jakub@redhat.com>
3332 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3333 msgid for argument name.
3334 * gjavah.c (error): Likewise.
3335 * java-tree.h (parse_error_context): Likewise.
3336 * parse.y (parse_error_context, parse_warning_context,
3337 issue_warning_error_from_context): Likewise.
3339 2005-06-01 Tom Tromey <tromey@redhat.com>
3342 * class.c (build_static_field_ref): Don't fold constant fields if
3343 current class is from a .class file and we're using indirect
3346 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3348 * java/verify-glue.c: Don't include errors.h and include toplev.h.
3349 * java/Make-lang.in: Updates dependencies.
3351 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
3354 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3355 NESTED_FIELD_ACCESS_IDENTIFIER_P.
3356 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3357 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3358 * jcf-write.c (generate_classfile): Use
3359 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3360 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3361 * parse.y (build_outer_field_access): Rename to
3362 build_nested_field_access. Support static fields and outer-to-inner
3364 (outer_field_access_p): Rename to nested_field_access_p. Support
3365 static fields and generalise to outer-to-inner class and sibling
3366 inner class accesses.
3367 (outer_field_expanded_access_p): Rename to
3368 nested_field_expanded_access_p and support static fields.
3369 (outer_field_access_fix): Rename to nested_field_access_fix and
3370 support static fields.
3371 (build_outer_field_access_expr): Rename to
3372 build_nested_field_access_expr and support static fields.
3373 (build_outer_field_access_methods): Rename to
3374 build_nested_field_access_methods and support static fields. For
3375 static fields, generate accessors without class instance parameters.
3376 (build_outer_field_access_method): Rename to
3377 build_nested_field_access_method and support static fields.
3378 (build_outer_method_access_method): Use
3379 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3380 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3381 (resolve_expression_name): Consider static field accesses across
3383 (resolve_qualified_expression_name): Likewise.
3384 (java_complete_lhs): Use nested_field_access_fix instead of
3385 outer_field_access_fix.
3386 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3387 Use nested_field_expanded_access_p instead of
3388 outer_field_expanded_access_p. Use nested_field_access_fix instead
3389 of outer_field_access_fix.
3390 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3391 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3393 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
3395 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
3396 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3397 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3398 MINOR_BINARYCOMPAT_ABI_VERSION): New.
3399 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3400 (parse_version): Calculate version ID using new method. Use bit-flags
3401 for flag_indirect_dispatch and flag_bootstrap_classes.
3403 2005-05-25 Richard Henderson <rth@redhat.com>
3406 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3407 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3408 DECL_CONTEXT; avoid pushdecl_top_level.
3409 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3410 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3411 (layout_class_method): Likewise.
3412 * decl.c (java_mark_cni_decl_local): New.
3413 (java_mark_class_local): Use it.
3414 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3415 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3416 (struct lang_decl_func): Add local_cni;
3417 (struct lang_decl_var): Add class_field, vtable.
3418 (java_mangle_decl): Declare.
3419 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3420 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3421 (mangle_obstack_1): New.
3422 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
3423 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
3424 lhd_set_decl_assembler_name for things that don't need mangling.
3425 (mangle_class_field): Rename from java_mangle_class_field, make
3426 static, don't call init_mangling or finish_mangling.
3427 (mangle_vtable): Similarly.
3428 (mangle_local_cni_method_decl): New.
3429 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
3430 gcc_assert, and MANGLE_RAW_STRING.
3431 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3433 2005-05-25 DJ Delorie <dj@redhat.com>
3435 * class.c (set_constant_value): Move warning control from if() to
3438 2005-05-24 Richard Henderson <rth@redhat.com>
3440 * builtins.c (define_builtin): Don't call make_decl_rtl.
3441 * constants.c (build_constant_data_ref): Likewise.
3442 * class.c (build_utf8_ref): Likewise.
3443 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3444 (get_dispatch_table, layout_class_method): Likewise.
3445 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3447 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3448 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3449 to determine if we need a non-zero address.
3450 * decl.c (builtin_function): Don't call make_decl_rtl.
3451 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3452 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3453 * resource.c (compile_resource_data): Likewise.
3454 * parse.y (resolve_field_access): Re-word comment to avoid
3457 2005-05-24 Richard Henderson <rth@redhat.com>
3459 * class.c (registered_class): Take it out of class_roots; turn into
3461 (register_class): Make static. Don't duplicate decl node. Use
3463 (emit_register_classes): Use VEC_iterate. Use output_constant
3464 instead of assemble_integer. Don't call mark_decl_referenced
3466 * java-tree.h (register_class): Remove decl.
3468 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
3472 * parse.y (register_package, package_list): Remove.
3473 (package_declaration): Do not call register_package.
3474 (do_resolve_class): Do not use package_list.
3476 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
3478 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3481 2005-05-15 Tom Tromey <tromey@redhat.com>
3484 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3487 2005-05-12 Aaron Luchko <aluchko@redhat.com>
3489 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
3491 2005-05-11 Tom Tromey <tromey@redhat.com>
3493 * gcj.texi (Code Generation): Document -fbootstrap-classes.
3494 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3495 (parse_version): Use it.
3496 * lang.opt (-fbootstrap-classes): New option.
3498 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
3501 * class.c (maybe_layout_super_class): Look for imports in this_class.
3502 * parse.h (ctxp_for_generation_last): New.
3503 (do_resolve_class): Add a parameter.
3504 * parse.y (ctxp_for_generation_last): New.
3505 (java_pop_parser_context): Add at end of list.
3506 (find_in_imports, find_in_imports_on_demand): Look in ctxp
3507 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
3508 the given type are NULL.
3509 (do_resolve_class): Look into the imports of the new second parameter.
3510 Adjust recursive calls.
3511 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3512 calls to do_resolve_class.
3513 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3514 (java_complete_class): Do not do that here.
3516 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
3519 * Make-lang.in (java): Add gjnih.
3520 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3521 (GJNIH_OBJS): New variable.
3522 (gjnih$(exeext)): New target.
3523 (JAVA_MANFILES): Add gjnih.1.
3524 (java.uninstall): Add gjnih.1.
3525 (java.mostlyclean): Add gjnih.
3526 (java.maintainer-clean): Add gjnih.1.
3527 (java/gjavah-jni.o): New target.
3528 (.INTERMEDIATE): Add gjnih.pod.
3529 (gjnih.pod): New target.
3530 * config-lang.in (stagestuff): Add gjnih.
3531 * gcj.texi (Top): Add gjnih node.
3532 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3533 -bootclasspath options.
3534 (Invoking gjnih): New node.
3535 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3536 (TOOLNAME): New macro.
3537 (error): Replace hard-coded gcjh with TOOLNAME.
3538 (process_file): Likewise.
3540 (version): Likewise.
3541 (help): Likewise. Add help output for -force, -old, -trace and -J
3543 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3544 (options): Add force, old, trace and J fields.
3545 (main): Handle -force, -old, -trace and -J options.
3547 2005-05-03 Tom Tromey <tromey@redhat.com>
3550 * gjavah.c (main): Unlink output file on error.
3552 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
3554 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3557 2005-04-29 Tom Tromey <tromey@redhat.com>
3559 * expr.c (build_jni_stub): Updated for change to build_block.
3561 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
3563 * expr.c (force_evaluation_order): Declare 'saved' earlier.
3565 2005-04-28 Andrew Haley <aph@redhat.com>
3568 * java-tree.h (soft_resolvepoolentry_node): New.
3569 (alloc_constant_fieldref): Declare.
3570 * expr.c (expand_java_field_op): Don't call class_init for
3571 accesses to static fields with indirect dispatch.
3572 * builtins.c (initialize_builtins): Add "__builtin_expect".
3573 * decl.c (soft_resolvepoolentry_node): New variable.
3574 (java_init_decl_processing): Create a decl for
3575 "_Jv_ResolvePoolEntry".
3576 * class.c (build_fieldref_cache_entry): New function.
3577 (build_static_field_ref): Rewrite for indirect dispatch.
3578 * constants.c (find_name_and_type_constant_tree): New function.
3579 (alloc_constant_fieldref): Likewise.
3580 (build_constants_constructor): Handle CONSTANT_Fieldref and
3581 CONSTANT_NameAndType.
3584 * expr.c (force_evaluation_order): Convert outgoing args smaller
3587 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
3589 * gcj.texi (libgcj Runtime Properties): Remove obsolete
3590 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
3591 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
3593 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3595 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
3596 to `unlock_stream' with `unlock_std_streams'.
3598 2005-04-25 Jakub Jelinek <jakub@redhat.com>
3600 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
3601 instead of just expr.h.
3603 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3605 * gjavah.c (main): Unlock the stdio streams.
3606 * jcf-dump.c (main): Likewise.
3607 * jv-scan.c (main): Likewise.
3608 * jvgenmain.c (main): Likewise.
3610 2005-04-23 DJ Delorie <dj@redhat.com>
3612 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
3613 parse.y: Adjust warning() callers.
3615 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
3617 * gcj.texi (Object fields): Change "Integer" to "Int" in example
3620 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
3622 * gcj.texi: Fix typos and bogus example.
3624 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
3626 * except.c: Fix a comment typo.
3628 2005-04-19 Julian Brown <julian@codesourcery.com>
3630 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
3631 indirect dispatch with PIC.
3633 2005-04-18 Andrew Haley <aph@redhat.com>
3635 * java-except.h (struct eh_range.handler): Remove unused field.
3636 (handle_nested_ranges): Remove function declaration.
3637 (sanity_check_exception_range): Add function declaration.
3638 * verify.c (verify_jvm_instructions): Remove call to
3639 handle_nested_ranges.
3640 * verify-glue.c (verify_jvm_instructions_new): Call
3641 sanity_check_exception_range.
3642 * except.c (link_handler, eh_range_freelist, link_handler,
3643 handle_nested_ranges): Remove.
3644 (add_handler): Rewrite.
3645 (sanity_check_exception_range): New function.
3646 (print_ranges): New function.
3648 2005-04-13 Julian Brown <julian@codesourcery.com>
3650 * decl.c (finish_method): Give methods once-only linkage.
3652 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
3654 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
3656 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3658 * java-tree.h: Don't use PARAMS().
3660 2005-04-07 Per Bothner <per@bothner.com>
3662 * class.c (push_class): By default, suppress debug output.
3663 (finish_class): Enable debug output for classes we're emitting.
3665 2005-04-07 Andrew Haley <aph@redhat.com>
3667 * gcj.texi: Correct gcj-dbtool instructions.
3669 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
3671 * gcj.texi: Fix a typo.
3672 * lang.c: Fix a comment typo.
3674 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
3676 * gcj.texi (Invoking gij): Add descriptions of new -X options.
3677 Mention recognized-and-ignored compatibility options.
3678 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
3680 (About CNI): Add Memory allocation section.
3682 2005-04-01 Tom Tromey <tromey@redhat.com>
3684 * decl.c (java_init_decl_processing): Fix types of
3685 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
3686 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
3687 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
3689 2005-03-31 Jan Hubicka <jh@suse.cz>
3691 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
3692 * class.c: Include cgraph.h
3693 (make_local_functoin_alias): Mark aslias as needed.
3694 * resource.c: Include cgraph.h
3695 (compile_resource_data): Go via cgraph interface.
3697 2005-03-30 Ian Lance Taylor <ian@airs.com>
3699 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
3701 2005-03-30 Tom Tromey <tromey@redhat.com>
3703 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
3704 inner_class_info_index==0 or outer_class_info_index==0.
3706 2005-03-29 Tom Tromey <tromey@redhat.com>
3708 * gcj.texi (libgcj Runtime Properties): Document
3709 gnu.gcj.runtime.endorsed.dirs.
3711 2005-03-24 Anthony Green <green@redhat.com>
3713 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
3716 2005-03-23 Tom Tromey <tromey@redhat.com>
3718 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
3719 (parse_version): Use it.
3721 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
3723 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
3725 2005-03-18 Andrew Haley <aph@redhat.com>
3728 * decl.c (update_aliases): Don't update variables that are about
3730 (maybe_poplevels): Add comment.
3732 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
3735 * jcf-parse.c (duplicate_class_warning): New function.
3736 (java_parse_file): Call duplicate_class_warning if
3737 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
3738 (parse_zip_file_entries): Likewise. Also set
3739 CLASS_FROM_CURRENTLY_COMPILED_P.
3741 2005-03-16 Andrew Haley <aph@redhat.com>
3743 * expr.c (expand_java_arrayload): Don't generate a
3744 NullPointerException based on the type of the node.
3745 (build_java_array_length_access): Likewise.
3747 2005-03-15 Zack Weinberg <zack@codesourcery.com>
3749 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
3751 2005-03-11 Tom Tromey <tromey@redhat.com>
3753 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
3754 (libgcj Runtime Properties): Document the default .db.
3756 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
3759 * parse.y (checks_throws_clauses): Check exceptions list even when
3760 the base class does not come from a source file being compiled.
3761 (java_complete_lhs): Remove unused variable 'wfl'.
3763 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
3766 * decl.c (finish_method): Emit _Jv_InitClass for private static
3767 methods inside inner classes as well.
3769 2005-03-08 Julian Brown <julian@codesourcery.com>
3770 * Revert patch from 2005-03-08 for causing bootstrap failure on
3773 2005-03-08 Julian Brown <julian@codesourcery.com>
3775 * decl.c (finish_method): Give methods once-only linkage.
3777 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
3779 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
3781 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
3783 * verify-glue.c (vfy_is_assignable_from): Perform static check using
3784 can_widen_reference_to if the C++ ABI is in use.
3785 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
3786 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
3787 type_isresolved, init_state, set_pc, state_get_pc,
3788 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
3789 (verify_fail): Report the current PC from the verifier context.
3790 (free_state): Remove #if 0 block to enable this function.
3791 (free_verifier_context): Call free_state on state_list iterator
3792 values before freeing them.
3793 * expr.c (pop_type_0): Pop correct type for error message when stack
3794 contains a multi-word type.
3796 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
3798 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
3799 for known NULL array length access.
3801 2005-03-07 Tom Tromey <tromey@redhat.com>
3803 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
3805 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
3807 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
3808 typeck.c: Update copyright.
3810 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
3813 * xref.c, xref.h: Remove file.
3814 * Make-lang.in (java/xref.o): Remove.
3815 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
3816 * lang.c (flag_emit_xref): Remove definition.
3817 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
3818 * typeck.c (convert): Remove use of do_not_fold.
3819 * parse.y (do_not_fold): Remove definition.
3820 (parser grammar): Remove xref code.
3821 (maybe_create_class_interface_decl, create_class): Likewise.
3822 (register_fields, method_header, finish_method_declaration): Likewise.
3823 (declare_local_variables, source_end_java_method): Likewise.
3824 (java_complete_expand_classes): Do not set do_not_fold.
3825 (java_complete_expand_method): Remove xref code.
3826 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
3827 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
3828 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
3829 (patch_synchronized_statement, patch_throw_statement): Likewise.
3830 (maybe_build_class_init_for_field): Likewise.
3832 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
3834 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
3835 instead of IS_NON_TYPE_CODE_CLASS.
3837 2005-03-04 Andrew Haley <aph@redhat.com>
3840 * class.c (set_method_index): Don't set method_index if it is
3842 (layout_class_method): Don't complain about "non-static method foo
3843 overrides static method" in the case of indirect dispatch.
3845 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3847 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
3849 * Make-lang.in: Don't elide warnings in jcf-io.c.
3851 2005-03-01 Per Bothner <per@bothner.com>
3854 * check-init.c (wfl): Remove static.
3855 (final_assign_error, check_init): Replace calls to parse_error_context
3857 (check_init): Save, set, and restore input_location for each exp.
3859 2005-03-01 Per Bothner <per@bothner.com>
3861 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
3862 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
3863 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
3865 2005-03-01 Per Bothner <per@bothner.com>
3867 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
3869 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
3872 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
3875 2005-02-22 Tom Tromey <tromey@redhat.com>
3878 * verify-impl.c (EITHER): New define.
3879 (types_compatible): Handle it.
3880 (check_field_constant): Use it.
3882 2005-02-18 Tom Tromey <tromey@redhat.com>
3885 * verify-impl.c (types_equal): Fixed test.
3888 * verify-glue.c (vfy_class_has_field): New function.
3889 * verify.h (vfy_class_has_field): Declare.
3890 * verify-impl.c (check_field_constant): Added 'putfield'
3892 (verify_instructions_0): Updated.
3893 (types_equal): New function.
3895 2005-02-14 Tom Tromey <tromey@redhat.com>
3898 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
3899 stack effect of multianewarray.
3901 2005-02-14 Andrew Haley <aph@redhat.com>
3904 * expr.c (expand_byte_code): Call promote_arguments().
3905 (promote_arguments): New function.
3906 * decl.c (check_local_unnamed_variable): Remove special case for
3908 (find_local_variable): Promote all boolean types to int
3909 when searching for local variable decls.
3911 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
3913 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
3914 parse-scan.y: Update copyright.
3916 2005-02-11 Per Bothner <per@bothner.com>
3919 * parse-scan.y (input_location): Remove variable.
3920 (main_input_filename): New - replaces input_filename, which isn't
3921 settable if USE_MAPPED_LOCATION.
3922 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
3923 so we don't reference input_location or wfl_operator in that case.
3924 * jv-scan.c (expand_location): Remove - no longer used.
3925 (main): Set main_input_filename rather than input_filename.
3927 2005-02-09 Richard Henderson <rth@redhat.com>
3929 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
3930 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
3932 2005-02-08 Marcin Dalecki <martin@dalecki.de>
3934 * expr.c (add_type_assertion): Use the proper enumeration type,
3935 since this is what htab_find_slot() is expecting.
3937 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
3939 * gcj.texi: Update copyright dates.
3941 2005-02-02 Tom Tromey <tromey@redhat.com>
3943 * gcj.texi (libgcj Runtime Properties): Default library_control
3946 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
3949 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
3950 (modifiers) when square brackets are present in a declaration for
3952 * jv-scan.c (main): Set input_filename and input_line.
3954 2005-02-01 Tom Tromey <tromey@redhat.com>
3957 * gjavah.c (get_field_name): Don't override name for JNI header.
3959 2005-02-01 Roger Sayle <roger@eyesopen.com>
3961 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
3962 of unsigned types using iushr and lushr JVM bytecodes.
3964 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
3967 * gjavah.c (jni_print_float): Do not emit floating-point
3968 initialiser for a static final field.
3969 (jni_print_double): Likewise.
3971 2005-02-01 Mark Mitchell <mark@codesourcery.com>
3974 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3975 * gjavah.c (print_field_info): Mark static data members of
3976 floating-point type with "__extension__".
3978 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3980 * gjavah.c (print_field_info): Mark static data members of
3981 floating-point type with "__extension__".
3983 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
3986 * parse.y (build_string_concatenation): Remove redundant if.
3987 (patch_conditional_expr): Attempt to patch_string() the condition
3988 of a ?: as well, in addition to its other operands.
3990 2005-01-25 Tom Tromey <tromey@redhat.com>
3992 * Make-lang.in (java/java-tree-inline.o): Removed.
3994 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
3997 * parse.y (patch_binop): Allow comparisons against NULL only
3998 if the other operand is of a reference type.
4000 2005-01-24 Tom Tromey <tromey@redhat.com>
4002 * java-tree.h (gcj_abi_version): Declare.
4003 * class.c (make_class_data): Push gcj_abi_version into "next"
4004 field. Renamed field.
4005 * decl.c (gcj_abi_version): New global.
4006 (parse_version): New function.
4007 (java_init_decl_processing): Call it. Renamed 'next' field.
4009 (GCJ_BINARYCOMPAT_ADDITION): New define.
4011 2005-01-24 Roger Sayle <roger@eyesopen.com>
4014 * jcf-write.c (generate_bytecode_insns): Conversions between
4015 integer types of the same precision shouldn't generate widening
4016 or narrowing conversion bytecodes.
4018 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
4020 * java-except.h, java-tree.h: Remove unused prototypes.
4022 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
4025 * jcf-write.c (perform_relocations): Don't call memcpy if source
4026 and destination are the same.
4028 2005-01-17 Tom Tromey <tromey@redhat.com>
4030 * verify-impl.c (get_short): Sign extend.
4031 (get_int): Likewise.
4033 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
4035 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4038 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4040 * verify.c: Revert to the version before the BC-ABI merge.
4042 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4045 * check-init.c (check_init): Take care of references that do not
4046 have an explicit final variable declaration (e.g. array length
4047 access) for pre/post in/de-crement operators.
4049 2005-01-08 Mark Wielaard <mark@klomp.org>
4051 * parse.y (process_imports): Allocate (and free) original_name only
4052 when not already defined.
4053 * jcf-parse.c (read_class): Free results of find_class() and
4055 (java_parse_file): Keep pointer to head of file_list and free when
4056 done. Free result of lrealpath().
4058 2005-01-05 Tom Tromey <tromey@redhat.com>
4060 * gcj.texi (Standard Properties): java.ext.dirs is now used.
4062 2004-12-20 Andrew Haley <aph@redhat.com>
4064 * typeck.c: Use fold_convert for ints and booleans.
4066 2004-12-17 Andrew Haley <aph@redhat.com>
4069 * typeck.c (convert): Use a CONVERT_EXPR when converting to
4070 BOOLEAN_TYPE or CHAR_TYPE.
4071 (convert_to_boolean, convert_to_char) : Remove.
4072 * convert.h (convert_to_boolean, convert_to_char) : Remove.
4073 * expr.c (expand_load_internal): Do type conversion if type is not
4076 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
4079 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4082 2004-12-07 Andrew Haley <aph@redhat.com>
4085 * jcf-parse.c (load_class): Remove sanity test for missing inner
4088 2004-12-06 Tom Tromey <tromey@redhat.com>
4090 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4091 (java.uninstall): Likewise.
4092 (java.maintainer-clean): Likewise.
4093 (.INTERMEDIATE): Likewise.
4094 (java.install-man): Likewise.
4095 (gcj-dbtool.pod): New target.
4096 * gcj.texi (Code Generation): Document -findirect-dispatch.
4097 (libgcj Runtime Properties): Document
4098 gnu.gcj.precompiled.db.path.
4099 (Top): Link to "Invoking gcj-dbtool".
4101 2004-12-06 Tom Tromey <tromey@redhat.com>
4104 * java-tree.h (extract_field_decl): Declare.
4105 * parse.y (extract_field_decl): Renamed from
4106 strip_out_static_field_access_decl. No longer static.
4107 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4109 2004-12-03 Tom Tromey <tromey@redhat.com>
4111 * lang.c (flag_new_verifier): Define.
4112 (java_post_options): Set flag_new_verifier if indirect dispatch
4114 * lang.opt (fnew-verifier): Removed.
4116 2004-12-03 Tom Tromey <tromey@redhat.com>
4119 * Make-lang.in (java.install-common): Only install transformed
4120 gcjh if gcj-cross exists.
4122 2004-12-03 Andrew Haley <aph@redhat.com>
4125 * except.c (link_handler): Patch 'outer' field of siblings of the
4126 range we're demoting.
4128 2004-12-03 Andrew Haley <aph@redhat.com>
4131 * class.c (layout_class_method): Don't fail to override a method
4132 simply because it has DECL_ARTIFICIAL set.
4134 2004-12-02 Tom Tromey <tromey@redhat.com>
4137 * parse.y (craft_constructor): Special case null_pointer_node.
4139 2004-12-02 Tom Tromey <tromey@redhat.com>
4142 * java-gimplify.c (java_gimplify_expr): Don't call
4143 SET_EXPR_LOCATION unless wrapped tree is an expression.
4145 2004-11-27 Per Bothner <per@bothner.com>
4147 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
4148 Fix fencepost error in 'i', which got executed one too many times.
4149 Also, fold memcpy into explicit loop, as originally intended.
4150 Also, free temporary 'buf' which otherwise leaks.
4152 2004-11-27 Per Bothner <per@bothner.com>
4154 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4155 local static variables if not USE_MAPPED_LOCATION.
4157 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
4159 * class.c, decl.c, expr.c: Fix comment typos.
4161 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
4164 * decl.c (end_java_method): Call
4165 attach_init_test_initialization_flags on all the init_decls.
4166 * parse.y (attach_init_test_initialization_flags): Move to ...
4167 * expr.c (attach_init_test_initialization_flags): here and
4168 support BIND_EXPR also.
4169 * java-tree.h (attach_init_test_initialization_flags): Prototype.
4170 * jcf-parse.c (parse_class_file): Don't disable class init
4173 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
4175 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4178 2004-11-24 Richard Henderson <rth@redhat.com>
4180 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4181 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4183 2004-11-24 Tom Tromey <tromey@redhat.com>
4185 * verify.c (defer_merging): Don't use C++-style comment.
4186 * verify.h (java_opcode): Added java_opcode_end.
4187 * class.c (build_class_ref): Remove C++ comment and old FIXME.
4189 * verify-impl.c (vfy_push_type): Removed bogus "return".
4190 (initialize_stack): Use vfy_alloc and vfy_free.
4191 (verify_instructions_0): Likewise.
4193 * Merged gcj-abi-2-dev-branch to trunk.
4195 2004-11-24 Andrew Haley <aph@redhat.com>
4197 * jcf-parse.c (parse_class_file): Set file_start_location.
4199 2004-11-10 Tom Tromey <tromey@redhat.com>
4201 * class.c (make_field_value): Don't call build_static_field_ref.
4202 (build_static_field_ref): Don't emit direct references when using
4205 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
4206 -verbose:class into man page synopsis.
4208 2004-11-09 Tom Tromey <tromey@redhat.com>
4210 * expr.c (build_java_arraystore_check): Still generate check if
4211 element type is itself an array.
4213 2004-11-08 Tom Tromey <tromey@redhat.com>
4215 * java-tree.h (soft_check_assignment_node): Removed.
4216 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4217 * decl.c (java_init_decl_processing): Don't initialize
4218 soft_check_assignment_node.
4220 2004-11-05 Tom Tromey <tromey@redhat.com>
4222 * class.c (layout_class_methods): Don't add Miranda methods when
4223 using indirect dispatch.
4225 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
4227 * class.c (make_class_data): Call emit_assertion_table to set the
4228 'assertion_table' field.
4229 (build_signature_for_libgcj): Move here from expr.c.
4230 (add_assertion_table_entry): New function. Callback for assertion
4231 hashtable traversal.
4232 (emit_assertion_table): New. Take class argument, and generate
4233 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4234 * decl.c (init_decl_processing): Define assertion_entry_type record.
4235 Push 'assertion_table' class field instead of 'verify'.
4236 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4237 (type_assertion_hash): Include 'assertion_code' in hash.
4238 (add_type_assertion): Rewritten. Take class and assertion_code
4239 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4240 (can_widen_reference_to): Use new add_type_assertion() arguments.
4241 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4242 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4243 (verify_identifier_node): Removed.
4244 (assertion_entry_type, assertion_table_type): New.
4245 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4246 assertion code definitions.
4247 (struct type_assertion): Add assertion_code. Rename 'source_type' and
4248 'target_type' to 'op1' and 'op2'.
4249 (add_type_assertion): Declare.
4250 (lang_printable_name_wls): Remove unused definition.
4251 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4252 to emit runtime assertion.
4253 (vfy_note_stack_type): Clean up non-C90 declarations.
4254 (vfy_note_local_type): Likewise.
4255 * verify.h (vfy_is_assignable_from): Declare.
4256 * verify-impl.c (is_assignable_from_slow): Remove unused function.
4257 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4258 instead of is_assignable_from_slow().
4259 (types_compatible): Reinstate ref_compatible() call.
4261 2004-11-04 Tom Tromey <tromey@redhat.com>
4263 * class.c (build_static_field_ref): Reverted previous patch.
4265 * class.c (build_static_field_ref): Don't emit direct references
4266 when using indirect dispatch.
4268 2004-11-03 Tom Tromey <tromey@redhat.com>
4270 * expr.c (expand_java_arrayload): Set lhs_type_node.
4271 (expand_java_arraystore): Set rhs_type_node.
4273 2004-11-02 Tom Tromey <tromey@redhat.com>
4275 * jcf-parse.c (compute_class_name): Use filename length from zip
4276 directory, not strlen.
4278 * expr.c (expand_invoke): Mark new interface methods as abstract.
4280 2004-11-01 Tom Tromey <tromey@redhat.com>
4282 * verify-impl.c (push_jump): Removed check for uninitialized
4284 (push_exception_jump): Likewise.
4285 (handle_ret_insn): Likewise.
4286 (handle_jsr_insn): Likewise.
4287 (state_check_no_uninitialized_objects): Removed.
4289 * decl.c (check_local_unnamed_variable): Recognize
4290 promoted-to-int parameters when using the new verifier.
4291 * expr.c (expand_java_arraystore): Explicitly request array type
4292 when using new verifier.
4293 (expand_java_arrayload): Likewise.
4294 (invoke_build_dtable): Don't pass object_type_node as
4295 expression argument to build_java_indirect_ref.
4296 (build_java_check_indexed_type): Do nothing.
4297 (build_java_arraystore_check): Handle case where array doesn't
4299 (build_java_array_length_access): Likewise.
4300 (expand_invoke): Handle case where interface overrides a method
4302 (pop_type_0): Always succeed for reference types.
4303 (process_jvm_instruction): Don't pop a value in a dead
4305 (pop_arguments): Convert arguments to correct types.
4307 2004-10-29 Andrew Haley <aph@redhat.com>
4309 * jcf-parse.c (give_name_to_class): Remove line that was
4312 2004-10-29 Andrew Haley <aph@redhat.com>
4314 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4316 2004-10-20 Andrew Haley <aph@redhat.com>
4318 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4320 2004-10-26 Tom Tromey <tromey@redhat.com>
4322 * verify.h (vfy_notify_verified): Removed.
4323 * verify-glue.c (vfy_notify_verified): Removed.
4325 2004-10-26 Tom Tromey <tromey@redhat.com>
4327 * verify-impl.c (debug_print_state): Declare `i' before code.
4328 (merge_types): Modify `t' when it is null_type.
4330 2004-10-26 Tom Tromey <tromey@redhat.com>
4332 * verify-impl.c (type_print): Renamed from print. Now static and
4334 (debug_print_state): Use type_print.
4336 2004-10-25 Tom Tromey <tromey@redhat.com>
4338 * expr.c (build_invokeinterface): Compute correct offset for
4339 index into interface methods.
4341 2004-10-20 Tom Tromey <tromey@redhat.com>
4343 * java-tree.h (verify_jvm_instructions_new): Declare.
4345 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4348 * verify-impl.c (verify_instructions): Correctly handle wide
4350 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4351 (vfy_get_component_type): Strip pointer types.
4352 (vfy_find_class): Use get_type_from_signature. Strip pointer
4354 Include java-except.h.
4356 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
4358 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4359 vfy_push_type_t, set_variable, add_new_state, merge_into,
4360 handle_jsr_insn, branch_prepass, check_class_constant,
4361 check_wide_constant, get_one_type, compute_static_types,
4362 verify_instructions_0): Clean up C99 declarations after statements.
4364 2004-10-20 Tom Tromey <tromey@redhat.com>
4366 * verify-impl.c (merge_refs): Compare reference against iterator,
4369 * verify-glue.c (vfy_tag): Mask off resolved flag.
4371 2004-10-19 Tom Tromey <tromey@redhat.com>
4373 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4374 (init_state_with_stack): Initialize `this_type' in state.
4375 (verify_method): Use debug_print.
4376 * verify-glue.c (vfy_is_primitive): Removed debugging print.
4377 (vfy_note_stack_depth): Reverted last patch.
4378 (vfy_note_stack_type): Note pointer to Object, not Object.
4379 (vfy_note_local_type): Likewise.
4381 * verify.h (vfy_note_instruction_seen): Declare.
4382 * verify-glue.c (verify_jvm_instructions_new): Set
4383 BCODE_EXCEPTION_TARGET on target instruction.
4384 (vfy_note_instruction_seen): New function.
4385 * verify-impl.c (FLAG_INSN_SEEN): New define.
4386 (verify_instructions_0): Set flag on instruction. Save state for
4388 (verify_instructions): Call vfy_note_instruction_seen.
4390 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4391 (verify_jvm_instructions_new): Call method_init_exceptions,
4392 add_handler, and handle_nested_ranges.
4393 * verify-impl.c (verify_method): Return 1 on success.
4394 (verify_instructions_0): Save the state at PC=0.
4396 * verify-impl.c (init_type_from_class): Set is_resolved and
4397 ref_next on new ref_intersection.
4398 (init_type_from_string): Likewise.
4400 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
4402 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4403 if flag_new_verifier is set.
4404 * java-tree.h (flag_new_verifier): Declare.
4405 * lang.opt (fnew-verifier): New option.
4406 * verify-impl.c: Work around namespace pollution by undef'ing
4408 (struct verifier_context): Make 'bytecode' const.
4409 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4410 (types_compatible): For the BC-ABI, always consider reference types
4412 (check_class_constant): Use vfr->current_class.
4413 (check_constant): Likewise.
4414 (check_wide_constant): Likewise.
4415 (check_field_constant): Check for 'L' at start of type name.
4416 (get_one_type): Return pointer instead of type. Set type result in
4417 caller via passed type pointer.
4418 (compute_argument_types): Update to use new get_one_type arguments.
4419 (compute_return_type): Likewise.
4420 (make_verifier_context): New. Allocate and initialize 'vfr'.
4421 (free_verifier_context): New. Free 'vfr' and its contents.
4422 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4423 and free_verifier_context.
4425 2004-10-15 Tom Tromey <tromey@redhat.com>
4427 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4428 * verify.h (vfy_fail): Fixed formatting.
4430 * verify-impl.c (vfr): Fixed comment formatting.
4431 (collapse_type): New function.
4432 (verify_instructions): Notify compiler about type map.
4433 * verify.h (vfy_note_stack_depth): Updated.
4434 (vfy_note_stack_type): Likewise.
4435 (vfy_note_local_type): Likewise.
4436 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4438 * verify-glue.c (vfy_note_stack_depth): Correctly size type
4439 state. Added `method' argument.
4440 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
4442 (vfy_note_local_type): New function.
4443 (vfy_unsuitable_type): Likewise.
4444 (vfy_return_address_type): Likewise.
4445 (vfy_null_type): Likewise.
4447 * verify.h (VFY_IN_GCC): Removed.
4448 (VFY_WANT_TYPEMAP): Removed.
4449 * verify-impl.c (verify_instructions_0): Removed useless "\".
4450 (struct state) <next>: Uncomment.
4452 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
4454 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
4457 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4459 * Make-lang.in (verify.o): Re-enabled this target.
4460 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4461 (vfy_get_interface): Likewise.
4462 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4463 * verify.h (verify_jvm_instructions_new): Declare.
4464 * verify-impl.c (free_state): Temporarily comment out unused
4467 2004-10-06 Tom Tromey <tromey@redhat.com>
4469 * java-tree.h (JV_STATE_READ): New enum value.
4471 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4473 * verify.h: New file.
4475 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
4477 * verify-impl.c, verify-glue.c, verify.h: New files.
4478 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4480 2004-09-24 Andrew Haley <aph@redhat.com>
4482 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4483 for a slot if it's of pointer type.
4485 2004-09-14 Tom Tromey <tromey@redhat.com>
4487 * class.c (make_class_data): Correctly initialize "state" field.
4488 Initialize "engine" field.
4489 * decl.c (java_init_decl_processing): Add "engine" field.
4491 2004-09-10 Andrew Haley <aph@redhat.com>
4494 * expr.c (build_invokeinterface): Use fast method for interface
4496 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4497 JTI_ITABLE_PTR_TYPE.
4498 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
4499 (emit_symbol_table): Add new arg, element_size.
4500 * decl.c (java_init_decl_processing): Initialize Class.itable.
4501 * class.c (GEN_TABLE): New macro.
4502 (gen_indirect_dispatch_tables): Use it. Add itable.
4503 (make_class_data): Add new arg for emit_symbol_table().
4505 (add_miranda_methods): Make sure search_class has been parsed.
4506 (emit_symbol_table): Add new arg, element_size.
4508 2004-09-06 Andrew Haley <aph@redhat.com>
4510 * verify.c (merge_types): Return Object for all merges of
4512 * expr.c (add_type_assertion): Don't generate assertions when
4513 source type is array of Object.
4515 2004-09-03 Andrew Haley <aph@redhat.com>
4517 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4519 * lang.c (java_post_options): Force flag_verify_invocations if
4520 we're not using indirect dispatch.
4522 * expr.c (pop_type_0): Move test for interfaces before call to
4523 can_widen_reference_to().
4524 (build_signature_for_libgcj): Remove generation of canonical array
4526 (add_type_assertion): Canonicalize both arrays.
4527 Don't assert that type X can be assigned to Object.
4528 Don't assert that type X an be assigned to type X.
4529 Don't assert that Object can be assigned to type X.
4530 (can_widen_reference_to): Warn whenever we generate an assertion.
4531 (process_jvm_instruction): Use throwable_type_node for the type of
4534 2004-09-01 Andrew Haley <aph@redhat.com>
4536 * decl.c (java_init_decl_processing): Change
4537 verify_identifier_node to "__verify".
4538 * expr.c (add_type_assertion): Use verify_identifier_node for name.
4539 * java-tree.h (verify_identifier_node): Change to "__verify".
4541 * expr.c (build_signature_for_libgcj): New function.
4542 (add_type_assertion): Use it to construct signatures for
4543 source_type and target_type.
4545 2004-08-27 Andrew Haley <aph@redhat.com>
4547 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4548 (verify_identifier_node): New.
4549 (TYPE_VERIFY_METHOD): New.
4550 (struct type_assertion): New type.
4551 * expr.c (type_assertion_eq): New function.
4552 (type_assertion_hash): New function.
4553 (add_type_assertion): New function.
4554 (can_widen_reference_to): Call add_type_assertion().
4555 * decl.c (java_init_decl_processing): Add verify_identifier_node.
4556 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4557 (finish_class): Output TYPE_VERIFY_METHOD (type).
4559 * decl.c (end_java_method): Nullify unused fields.
4561 2004-08-17 Andrew Haley <aph@redhat.com>
4563 * verify.c (defer_merging): Quieten.
4564 * jcf-parse.c (load_class): Only try to open a class file if it's
4565 java.lang.Object or if it's part of the current compilation.
4566 Check that the class we just tried to load is the class we just
4568 (java_parse_file): Set flag_verify_invocations off if we're
4569 compiling from .class.
4570 (parse_zip_file_entries): Abort if we try to read a dummy class.
4571 * expr.c (can_widen_reference_to): Quieten.
4572 (build_invokevirtual): Abort if we try to invokevirtual an
4574 (expand_invoke): Don't build a non-interface call to an interface.
4575 (build_instanceof): Don't do premature optimization if
4576 flag_verify_invocations is not set.
4577 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
4579 (build_static_field_ref): Add correct type conversion for
4581 (add_miranda_methods): Disable generation of Miranda methods for
4583 (layout_class_method): Don't complain about non-static method
4584 overrides static method with dummy classes.
4586 2004-08-13 Tom Tromey <tromey@redhat.com>
4588 * class.c (build_static_field_ref): Re-enable atable lookups for
4591 * parse.y (strip_out_static_field_access_decl): Indentation fix.
4593 2004-08-11 Tom Tromey <tromey@redhat.com>
4595 * gcj.texi (libgcj Runtime Properties): Document new properties.
4597 2004-08-06 Andrew Haley <aph@redhat.com>
4599 * jcf-parse.c (load_class): Check that we really have loaded the
4600 class we're looking for.
4602 2004-07-19 Andrew Haley <aph@redhat.com>
4604 * verify.c (verify_jvm_instructions): Comment change only.
4606 * typeck.c (build_java_array_type): Add size field to array name.
4608 * java-tree.h (LOCAL_SLOT_P): New.
4609 (update_aliases): Add PC argument.
4610 (pushdecl_function_level): New function.
4612 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4613 MODIFY_EXPR, and SAVE_EXPR.
4614 (java_gimplify_modify_expr): New function.
4616 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4617 (expand_iinc): Pass PC to update_aliases().
4618 (STORE_INTERNAL): Likewise.
4619 (process_jvm_instruction): Likewise.
4621 * decl.c (base_decl_map): New variable.
4622 (uniq): New variable.
4623 (update_aliases): Rewrite with more thorough checking.
4624 (debug_variable_p): New function.
4625 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
4626 (check_local_named_variable): Delete whole function.
4627 (initialize_local_variable): New function.
4628 (check_local_unnamed_variable): Add checks and comments.
4629 (find_local_variable): Rewrite.
4630 (java_replace_reference): New function.
4631 (function_binding_level): New variable.
4632 (pushdecl_function_level): New function.
4633 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4634 (maybe_pushlevels): Call pushdecl() on each of the new decls.
4635 (start_java_method): Reset uniq. Create base_decl_map. Set
4636 function_binding_level.
4637 (end_java_method): Null unused fields to save memory.
4639 2004-06-29 Andrew Haley <aph@redhat.com>
4641 * except.c (expand_start_java_handler): Push a new binding level.
4642 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
4643 register_exception_range() to register where we'll do it.
4644 (expand_end_java_handler): Remove old bogus code. Replace with
4645 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4646 the top of the expression we're curently building.
4647 (maybe_end_try): Delete.
4648 * decl.c (binding_level.exception_range): New field.
4649 (clear_binding_level): Add field exception_range. Reformat.
4650 (poplevel): Call expand_end_java_handler().
4651 (poplevel): Call java_add_stmt only if functionbody is false.
4652 (maybe_poplevels): Don't call maybe_end_try() from here.
4653 (end_java_method): Clear no longer used trees in function decl.
4654 (register_exception_range): New function.
4655 * java-tree.h (register_exception_range, struct eh_range): Declare.
4657 2004-06-22 Andrew Haley <aph@redhat.com>
4659 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
4661 * check-init.c (get_variable_decl): Teach check-init about
4662 FIELD_DECLs addressed via the otable.
4663 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
4666 2004-05-28 Andrew Haley <aph@redhat.com>
4668 * jcf-parse.c (load_class): Don't try to read a class that we've
4671 * expr.c (build_invokeinterface): Use the old-fashioned way of
4672 doing indirect dispatch: look up interfaces by name.
4673 * java-tree.h (enum java_tree_index): Add
4674 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
4675 * decl.c (java_init_decl_processing): Add
4676 soft_lookupinterfacemethodbyname_node.
4678 * gjavah.c (print_method_info): Final methods have vtable entries,
4679 so gjavah needs to output them.
4680 * class.c (layout_class_method): Generate vtable entries for final
4682 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
4683 dispatch, even if a method is final.
4685 2004-05-25 Andrew Haley <aph@redhat.com>
4687 * class.c (build_symbol_entry): Convert the names of constructors
4688 to init_identifier_node when generating an entry for the indirect
4691 * expr.c (build_known_method_ref): Generate indirect calls for
4692 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
4694 2004-05-24 Andrew Haley <aph@redhat.com>
4696 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
4697 atable element is of the right type.
4699 * class.c (build_static_field_ref): Cast pointer to correct type
4702 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
4704 * Merged with HEAD as of 20040514. Diff against
4705 gcj-abi-2-merge-20040514.
4707 2004-04-16 Andrew Haley <aph@redhat.com>
4709 * verify.c (check_pending_block): Disable subroutine checks.
4710 (defer_merging): New function.
4711 (merge_types): If types are dummy, use defer_merging to combine them.
4712 (verify_jvm_instructions): If invocation is invokeinterface and
4713 target is dummy, assume target really is an interface.
4715 * parse.y (patch_invoke): Break out call to java_create_object.
4717 * lang.c (flag_verify_invocations): New.
4719 * jcf-parse.c (load_class): If we've already failed to load a
4720 class, don't try again.
4721 (load_class): If we can't find a .class file, don't fail, but emit
4723 (parse_class_file): Don't act on dummy methods.
4725 * java-tree.h (flag_verify_invocations): New.
4727 (lang_type.dummy_class): New field.
4728 (java_create_object): New function.
4729 (METHOD_DUMMY): New.
4731 * expr.c (build_field_ref): Widen field offset.
4732 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
4733 that each of its elements is compatible with the one we're
4735 (pop_type_0): Issue a warning to say that we need to generate a
4737 (java_create_object): New function.
4738 (build_field_ref): Only generate hard refs if we're not using
4740 (expand_java_field_op): If we're using !verify_invocations and we
4741 see a missing field, generate a decl for it.
4743 (expand_invoke): If a class doesn't have the method we seek and
4744 we're using !flag_verify_invocations, generate a decl for the
4747 (build_known_method_ref): Always use indirect dispatch via the
4748 atable for static methods.
4750 (expand_java_NEW): Break out object creation into new function,
4753 (can_widen_reference_to): Issue a warning to say that we need to
4754 generate a runtime check.
4756 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
4757 (make_method_value): Also use index for interfaces.
4758 (make_class_data): Skip dummy field for inherited data.
4759 Don't build method array for dummy methods.
4760 Set size_in_byte to -1 when using inirect dispatch
4761 Don't build a hard class ref if we don't have a hard ref to our
4762 superclass, or if we're using inirect dispatch.
4763 Null out dispatch tables.
4765 (layout_class_method): Don't complain about non-static method
4766 overrides static method is method is artificial.
4768 (build_static_field_ref): Disable atable references to static
4769 fields for the time being.
4771 (layout_class_methods): Check for CLASS_INTERFACE as
4772 well as CLASS_ABSTRACT.
4774 2004-11-24 Steven Bosscher <stevenb@suse.de>
4776 * class.c (make_class_data): Don't check flag_inline_functions.
4777 * lang.c (flag_really_inline): Remove unused flag.
4778 (java_handle_option): Don't set it here. Remove special handling
4779 of flag_inline_functions for Java.
4780 (java_init): Don't set flag_inline_trees here. Already done...
4781 (java_post_options): ...here. Don't clear flag_inline_functions.
4783 2004-11-24 Steven Bosscher <stevenb@suse.de>
4785 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
4786 (java_gimplify_exit_block_expr): New function.
4787 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
4789 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
4790 (EXIT_BLOCK_EXPR): Likewise.
4791 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
4792 (LABELED_BLOCK_BODY): Likewise.
4793 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
4794 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
4795 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
4797 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
4798 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
4799 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
4800 second operand of EXIT_BLOCK_EXPR.
4801 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
4803 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
4805 2004-11-23 Ben Elliston <bje@au.ibm.com>
4807 * xref.h (xref_flag_value): Remove.
4808 (xref_set_data, xref_get_data): Likewise.
4809 (xref_set_current_fp): Likewise.
4810 (XREF_NONE): Likewise.
4811 (XREF_GET_DATA): Likewise.
4812 * xref.c (xref_flag_value): Remove.
4813 (xref_set_data, xref_get_data): Likewise.
4814 (xref_set_current_fp): Likewise.
4816 2004-11-23 Ben Elliston <bje@au.ibm.com>
4818 * gjavah.c (output_directory): Make static.
4819 (temp_directory): Likewise.
4821 2004-11-15 Tom Tromey <tromey@redhat.com>
4823 * decl.c (instn_ptr_type_node): Removed.
4824 (lineNumbers_ptr_type_node): Removed.
4825 (jint_type): Removed.
4826 (jint_ptr_type): Removed.
4828 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
4831 * check-init.c (check_init): Ignore DECL_EXPR.
4832 * expr.c (always_initialize_class_p): Reenable.
4833 (build_class_init): Use a variable to store the decl. Also use
4834 boolean_false_node instead of integer_zero_node.
4835 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
4838 2004-11-08 Tom Tromey <tromey@redhat.com>
4841 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
4842 generating a JNI header.
4843 (print_field_info): Handle JNI headers.
4844 (jni_print_float): Likewise.
4845 (jni_print_double): Likewise.
4847 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
4849 * decl.c (end_java_method): Remove duplicated code.
4851 2004-11-06 Zack Weinberg <zack@codesourcery.com>
4852 Gerald Pfeifer <gerald@pfeifer.com>
4854 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4857 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
4860 * class.c: Reinstate 2004-08-18 patch.
4861 (make_local_function_alias): Don't create an alias for extern (native)
4864 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
4867 * class.c (make_local_function_alias): Revert 2004-08-18 change.
4868 (make_method_value): Likewise.
4870 2004-10-21 Andrew Haley <aph@redhat.com>
4873 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4875 2004-10-20 Andrew Haley <aph@redhat.com>
4877 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4878 Remove duplicated code block.
4880 2004-10-18 Steven Bosscher <stevenb@suse.de>
4882 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
4883 New rules to work around old Bison warnings.
4885 2004-10-17 Steven Bosscher <stevenb@suse.de>
4887 * class.c (ident_subst): Always alloca buffer.
4888 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
4889 opcode after including javaop.def.
4890 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
4891 conditional expression that exits, to avoid warnings.
4892 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
4893 a user of an extension.
4894 * win32-host.c: Move check down to have non-empty file when
4895 WIN32 is not defined.
4897 * Make-lang.in (java-warn): Add STRICT_WARN.
4898 (java/jcf-io.o-warn): Don't have Werror for this file.
4899 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
4901 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
4903 * expr.c (expr_add_location): Move declaration to before all
4905 * parse.y (java_expand_classes): Ditto.
4906 * lex.c (java_peek_unicode): Ditto.
4908 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
4910 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
4911 if possible, else convert `foo' to 'foo'.
4912 * class.c: Likewise.
4915 * jcf-io.c: Likewise.
4916 * jcf-parse.c: Likewise.
4919 * parse.h: Likewise.
4921 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
4923 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
4924 rename parameter 'msg' to 'msgid' in function declaration.
4925 (issue_warning_error_from_context): Likewise.
4926 (yyerror): Rename parameter 'msg' to 'msgid'.
4927 (all over): Use new quoting style for diagnostics.
4929 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
4931 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
4932 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
4935 2004-10-14 Matt Austern <austern@apple.com>
4937 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
4940 2004-10-13 Tom Tromey <tromey@redhat.com>
4943 * lang.opt (--extdirs): Document.
4944 * jvspec.c (lang_specific_driver): Recognize -encoding and
4947 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
4949 * parse.y (issue_warning_error_from_context): Use va_list *
4950 instead of va_list parameter.
4951 (parse_error_context): Update call.
4952 (parse_warning_context): Likewise.
4954 2004-10-05 Zack Weinberg <zack@codesourcery.com>
4956 * parse.y, parse-scan.y: Add list of diagnostic messages to
4957 insulate translation template from version of yacc/bison used
4958 to compile the grammar.
4960 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
4962 Prepare for %q, %< and %> in diagnostic message strings.
4963 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
4964 Name second parameter 'msgid'.
4965 * parse.y: Additionally include pretty-print.h and diagnostic.h.
4966 (issue_warning_error_from_context): Use pretty-printer functions
4967 instead of vsprintf for constructing formatted messages. Rename
4968 parameter 'msg' to 'msgid'.
4969 (parse_error_context): Rename parameter 'msg' to 'msgid'.
4970 (parse_warning_context): Likewise.
4972 2004-10-05 Andrew Haley <aph@redhat.com>
4975 * jcf-parse.c (parse_zip_file_entries): If a class has a
4976 superclass and a TYPE_SIZE of zero, lay it out.
4978 2004-09-30 Andrew Haley <aph@redhat.com>
4981 * jcf-parse.c (compute_class_name): Rewrite.
4983 2004-10-01 Jan Hubicka <jh@suse.cz>
4985 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
4987 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
4989 * lex.c: Fix a comment typo.
4991 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
4993 * java-tree.h: Fix a comment typo.
4995 2004-09-30 Per Bothner <per@bothner.com>
4997 Simplify lexer. Implement --enable-mapped-location support.
4998 * jcf-parse.c (parse_class_file): Use linemap_line_start.
4999 (parse_source_file_1): Pass filename as extra parameter, so we can call
5000 linemap_add and set input_location here, rather than in both callers.
5001 (read_class): Pass copied filename to parse_source_file_1.
5002 Don't initialize wfl_operator - only needed for source compilation.
5003 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
5004 * lex.h: Remove a bunch of debugging macros.
5005 * lex.h (struct_java_line, struct java_error): Remove types.
5006 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
5007 (struct java_lc_s): Remove prev_col field.
5008 (struct java_lexer): New fields next_unicode, next_columns, and
5009 avail_unicode. New position field, and maybe token_start field.
5010 Don't need hit_eof field - use next_unicode == -1 instead.
5011 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
5012 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
5013 * parse.h: Various changes for USE_MAPPED_LOCATION.
5014 (EXPR_WFL_EMIT_LINE_NOTE): XXX
5015 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5016 (struct parser_ctxt): New file_start_location field.
5017 Remove p_line, c_line fields since we no longer save lines.
5018 Remove elc, lineno, and current_jcf fields - no longer used.
5019 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
5020 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5021 source_location and is probably not needed anymore anyway.
5022 Use new expr_add_Location function.
5023 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
5024 (java_pop_parser_context): Minor cleanup.
5025 (java_parser_context_save_global, java_parser_context_restore_global,
5026 java_pop_parser_context): Save/restore input_location as a unit.
5027 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
5028 a source_location instead of a wfl context node.
5029 (check_class_interface_creation): input_filename is not addressable.
5030 (create_artificial_method): Calling java_parser_context_save_global
5031 and java_parser_context_restore_global is overkill. Instead,
5032 temporarily set input_location from class decl.
5033 (java_layout_seen_class_methods): Set input_location from method decl.
5034 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5035 (finish_loop_body): Likewise.
5036 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
5037 (java_sprint_unicode): Take a character, not index in line.
5038 (java_sneak_uncode): Replaced by java_peek_unicode.
5039 (java_unget_unicode): No longer used.
5040 (java_allocate_new_line. java_store_unicode): Removed, since we
5041 no longer remember "lines".
5042 (java_new_lexer): Update for new data structures.
5043 (java_read_char): Move unget_value checking to java_read_unicode.
5044 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5045 efficient functions that are used directly when lexing.
5046 (java_read_unicode_collapsing_terminators): No longer needed.
5047 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5048 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5049 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
5050 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
5051 combine switch branches, and test for common token kinds earlier.
5052 (java_lex_error): Rewrite.
5053 * jv-scan.c (expand_location): New function, copied from tree.c.
5054 (main): Set ctxp->filename instead of setting input_filename directly.
5056 2004-09-30 Per Bothner <per@bothner.com>
5058 More cleanup for --enable-mapped-location.
5059 * class.c (push_class): If USE_MAPPED_LOCATION don't set
5060 input_location here. Instead do it in give_name_to_class.
5061 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5062 * expr.c (expand_byte_code): Call linemap_line_start.
5063 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
5064 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
5065 (expr_add_location): New function, if USE_MAPPED_LOCATION.
5066 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
5067 to USE_MAPPED_LOCATION case.
5069 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
5070 * jcf-parse.c (java_parse_file): Don't set input_filename.
5071 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5072 Create a list of TRANSLATION_UNIT_DECL.
5073 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
5074 reason is so we can set a DECL_SOURCE_LOCATION for each file.
5075 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5076 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5077 (file_start_location): New static.
5078 (set_source_filename): Avoid extra access to input_filename macro.
5079 Concatenate new name with class's package prefix.
5080 (set_source_filename, give_name_to_class): Update.
5081 (give_name_to_class): Set class's "line 0" input_location here.
5082 (parse_class_file): Set input_location as a unit.
5084 * jcf-parse.c (load_class): Sanity test if missing inner class file.
5086 2004-09-29 Per Bothner <per@bothner.com>
5088 * java-tree.h: Redefine some macros and add some declaration
5089 to handle the USE_MAPPED_LOCATION case.
5090 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
5091 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
5092 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5093 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5095 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5096 * decl.c (finish_method, java_add_stmt): Likewise.
5097 * java-gimplify.c (java-gimplify.c): Likewise.
5098 * jcf-write.c (generate_bytecode_insns): Likewise.
5099 * lang.c (java_post_options): Likewise - call linemap_add.
5101 2004-09-29 Andrew Haley <aph@redhat.com>
5104 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5105 result of TRUNC_MOD_EXPR.
5106 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5107 * decl.c (java_init_decl_processing): Mark
5108 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5110 2004-09-28 Tom Tromey <tromey@redhat.com>
5113 * class.c (add_miranda_methods): Load superinterface if not
5116 2004-09-28 Andrew Haley <aph@redhat.com>
5119 * jcf-parse.c (load_class): Don't try to read a class that we've
5122 2004-09-28 Andrew Haley <aph@redhat.com>
5124 * jcf-parse.c (load_class): Back out previous broken patch.
5126 2004-09-28 Andrew Haley <aph@redhat.com>
5129 * jcf-parse.c (load_class): Don't try to read a class that we've
5131 Check that we really did read the right class.
5133 2004-09-25 Tom Tromey <tromey@redhat.com>
5136 * parse.y (create_artificial_method): Use add_method_1.
5138 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
5140 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5142 * gcj.texi: Fix typos.
5144 2004-09-24 Tom Tromey <tromey@redhat.com>
5147 * parse.y (class_instance_creation_expression): Set `$$' to NULL
5148 in error parts of rule.
5149 (unary_expression): Don't call error_if_numeric_overflow when $1
5152 2004-09-24 Tom Tromey <tromey@redhat.com>
5155 * parse.y (resolve_qualified_expression_name): Set
5156 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5157 * expr.c (force_evaluation_order): Check for empty argument list
5158 after stripping COMPOUND_EXPR.
5160 2004-09-23 Andrew Haley <aph@redhat.com>
5163 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5166 2004-09-23 Tom Tromey <tromey@redhat.com>
5169 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5170 where operand is null.
5172 2004-09-23 Tom Tromey <tromey@redhat.com>
5175 * parse.y (not_accessible_p): Allow access to protected members
5176 even when class is not static.
5178 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
5180 * Make-lang.in: Revert the gcc-none.o change.
5182 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
5184 * parse.y (patch_anonymous_class): VEC_space returns true if there
5187 2004-09-21 Matt Austern <austern@apple.com>
5190 * gjavah.c (free_method_name_list): Fix function definition so
5191 it's a proper C prototype.
5193 2004-09-21 Tom Tromey <tromey@redhat.com>
5196 * gjavah.c (free_method_name_list): New method.
5199 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
5200 Zack Weinberg <zack@codesourcery.com>
5202 * java-tree.def: Use tree_code_class enumeration constants
5203 instead of code letters.
5204 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5205 new tree-class enumeration constants.
5207 2004-09-13 Tom Tromey <tromey@redhat.com>
5210 * class.c (layout_class_method): Put synthetic methods into the
5213 2004-09-11 Andrew Pinski <apinski@apple.com>
5215 * Make-lang.in (java/ggc-none.c): Change dependency
5216 for ggc.h into $(GGC_H).
5218 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5220 * Make-lang.in (java/win32-host.o): Add dependency on
5222 * win32-host.c: Add includes for coretypes.h, jcf.h
5224 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5226 * Make-lang.in (GCJH_OBJS): Change dependency from
5227 ggc-none.o to java/ggc-none.o
5228 (JCFDUMP_OBJS): Likewise.
5229 (java/ggc-none.o): New target.
5231 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
5233 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
5234 * class.c (build_utf8_ref, build_static_field_ref,
5235 make_field_value, make_method_value, get_dispatch_table,
5236 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5237 * constants.c (get_tag_node, build_ref_from_constant_pool,
5238 build_constants_constructor): Likewise.
5239 * decl.c (java_init_decl_processing): Likewise.
5240 * expr.c (build_java_array_length_access, build_newarray,
5241 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5242 build_java_binop, build_field_ref, expand_java_add_case,
5243 expand_java_call, build_known_method_ref, build_invokevirtual,
5244 build_invokeinterface, build_jni_stub): Likewise.
5245 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5246 * jcf-parse.c (get_constant): Likewise.
5247 * lex.c (do_java_lex): Likewise.
5248 * parse.y (patch_binop, patch_unaryop, patch_cast,
5249 build_newarray_node, patch_newarray): Likewise.
5250 * resource.c (compile_resource_data): Likewise.
5251 * typeck.c (build_prim_array_type): Likewise.
5253 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
5255 * decl.c (java_init_decl_processing): Adjust
5256 initialize_sizetypes call.
5258 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
5260 * jv-scan.c (fancy_abort): Add.
5262 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
5264 * expr.c (build_java_arrayaccess): Use convert to change
5267 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
5269 * class.c (make_local_function_alias): Allocate extra space for 'L'
5270 in name buffer. Reported by Thomas Neumann.
5272 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
5274 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5275 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
5276 * lex.c (do_java_lex): Adjust.
5277 (error_if_numeric_overflow): Likewise.
5279 2004-08-18 Andrew Pinski <apinski@apple.com>
5281 * class.c (make_local_function_alias): Only make a new decl if we
5282 support alias attribute on all decls.
5284 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
5286 * class.c (make_local_function_alias): New function. Create local
5287 alias for public method DECL.
5288 (make_method_value): Use make_local_function_alias.
5289 * parse.y (craft_constructor): Don't special-case anonymous classes.
5290 Always set ctor_name to init_identifier_node.
5291 (lookup_method_invoke): Call layout_class_method when creating
5292 anonymous class constructor.
5294 2004-08-18 Richard Henderson <rth@redhat.com>
5296 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5297 default case. Treat '<' similarly. Update for
5298 is_gimple_formal_tmp_var name change.
5300 2004-08-17 Andrew Haley <aph@redhat.com>
5302 * lang.c (lang_printable_name): Obey verbose flag.
5303 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5304 lang_printable_name().
5305 (verify_constructor_circularity, get_printable_method_name,
5306 check_abstract_method_definitions, java_check_regular_methods,
5307 java_check_abstract_methods, check_inner_class_access,
5308 fix_constructors, patch_method_invocation, patch_return):
5310 * expr.c (pop_type_0): Likewise.
5312 * java-tree.h (lang_printable_name_wls): Delete.
5314 2004-08-16 Tom Tromey <tromey@redhat.com>
5317 * parse.y (primary): Changed for initialized and uninitialized
5319 (array_access): Handle array_creation_initialized.
5320 (array_creation_expression): Split into
5321 array_creation_initialized and array_creation_uninitialized.
5323 2004-08-16 Andrew Haley <aph@redhat.com>
5325 * jcf-write.c (find_constant_index): Canonicalize NaNs when
5326 generating bytecode.
5328 2004-08-16 Elliot Lee <sopwith@redhat.com>
5331 * jcf-parse.c (java_parse_file): Handle filenames with embedded
5332 spaces, and quoted filelists.
5334 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
5336 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5337 * class.c (build_utf8_ref, build_static_field_ref,
5338 make_field_value, make_method_value, get_dispatch_table,
5339 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5340 * constants.c (get_tag_node, build_ref_from_constant_pool,
5341 build_constants_constructor): Likewise.
5342 * decl.c (java_init_decl_processing): Likewise.
5343 * expr.c (build_java_array_length_access, build_newarray,
5344 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5345 build_java_binop, build_field_ref, expand_java_add_case,
5346 expand_java_call, build_known_method_ref, build_invokevirtual,
5347 build_invokeinterface, build_jni_stub): Likewise.
5348 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5349 * jcf-parse.c (get_constant): Likewise.
5350 * lex.c (do_java_lex): Likewise.
5351 * parse.y (patch_binop, patch_unaryop, patch_cast,
5352 build_null_of_type, patch_newarray): Likewise.
5353 * resource.c (compile_resource_data): Likewise.
5354 * typeck.c (build_prim_array_type): Likewise.
5356 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
5358 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5359 Don't create BLOCK here or call java_gimplify_block.
5361 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
5363 * java-tree.h (flag_deprecated): Removed.
5364 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5365 * parse.y (check_deprecation): Check warn_deprecated instead of
5368 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
5370 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5371 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5372 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5373 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5374 flag_force_classes_archive_check, flag_optimize_sci,
5375 flag_indirect_dispatch): Remove explicit declarations.
5376 * lang.opt: Add implicit declare/define/assign. Remove obsolete
5379 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
5382 * Make-lang.in (java.install-man): Install from either build
5383 tree or source tree, whichever has the file first.
5385 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
5387 * jcf-parse.c (get_constant): Adjust force_fit_type call.
5388 * lex.h (SET_LVAL_NODE_TYPE): Remove.
5389 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5390 (do_java_lex): Likewise. Adjust force_fit_type call.
5392 2004-08-04 Roger Sayle <roger@eyesopen.com>
5393 Andrew Haley <aph@redhat.com>
5395 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5396 checking trees as they're being built.
5397 (convert): Call convert_ieee_real_to_integer if we're
5398 converting a constant, even if we're writing a class file.
5400 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
5403 * parse.y (fold_constant_for_init): Call resolve_field_access with
5404 correct current_class context.
5406 2004-08-01 Roger Sayle <roger@eyesopen.com>
5408 * decl.c (update_aliases, initialize_local_variable): Replace calls
5409 to build with calls to buildN.
5410 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5411 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5412 * parse.h (BUILD_THROW): Likewise.
5413 * parse.y (switch_expression, synchronized_statement,
5414 catch_clause_parameter, array_creation_expression,
5415 conditional_expression, make_qualified_name,
5416 resolve_qualified_expression_name, patch_method_invocation,
5417 patch_invoke, build_method_invocation, build_new_invocation,
5418 build_assignment, patch_assignment, build_binop, patch_binop,
5419 build_string_concatenation, build_incdec, patch_unaryop,
5420 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5421 patch_return, build_if_else_statement, build_labeled_block,
5422 build_new_loop, build_loop_body, build_bc_statement,
5423 build_assertion, encapsulate_with_try_catch, build_try_statement,
5424 build_try_finally_statement, patch_synchronized_statement,
5425 emit_test_initialization): Likewise, replace build with buildN.
5427 2004-07-28 Eric Christopher <echristo@redhat.com>
5429 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5430 (java_unsafe_for_reeval): Ditto.
5432 2004-07-26 <hp@bitrange.com>
5434 * parse.y (build_super_invocation): Adjust declaration order to
5435 avoid declaration after statement.
5437 2004-07-25 Bernardo Innocenti <bernie@develer.com>
5439 * decl.c: Rename all identifiers named `class' to `cl'.
5441 2004-07-25 Richard Henderson <rth@redhat.com>
5443 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5445 2004-07-23 Mike Stump <mrs@apple.com>
5447 * boehm.c (set_bit): Improve type safety wrt unsignedness.
5448 * gjavah.c (throwable_p, decode_signature_piece,
5449 print_full_cxx_name, print_include, add_namelet, add_class_decl,
5450 process_file): Likewise.
5451 * jcf-dump.c (main): Likewise.
5452 * jcf-io.c (read_zip_member): Likewise.
5453 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5454 give_name_to_class, get_class_constant): Likewise.
5455 * jcf-write.c (find_constant_wide, push_long_const,
5456 generate_classfile): Likewise.
5457 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5458 * parse.y (read_import_dir): Likewise.
5459 * typeck.c (parse_signature_type): Likewise.
5460 * verify.c (verify_jvm_instructions): Likewise.
5461 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5463 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
5465 * Make-lang.in: Replace rmic and rmiregistry references with
5466 grmic and grmiregistry.
5467 * gcj.texi: Likewise.
5469 2004-07-20 Andrew Haley <aph@redhat.com>
5472 * verify.c (verify_jvm_instructions): Comment change only.
5474 * typeck.c (build_java_array_type): Add size field to array name.
5476 * java-tree.h (LOCAL_SLOT_P): New.
5477 (update_aliases): Add PC argument.
5478 (pushdecl_function_level): New function.
5480 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5481 MODIFY_EXPR, and SAVE_EXPR.
5482 (java_gimplify_modify_expr): New function.
5484 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5485 (expand_iinc): Pass PC to update_aliases().
5486 (STORE_INTERNAL): Likewise.
5487 (process_jvm_instruction): Likewise.
5489 * decl.c (base_decl_map): New variable.
5490 (uniq): New variable.
5491 (update_aliases): Rewrite with more thorough checking.
5492 (debug_variable_p): New function.
5493 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5494 (check_local_named_variable): Delete whole function.
5495 (initialize_local_variable): New function.
5496 (check_local_unnamed_variable): Add checks and comments.
5497 (find_local_variable): Rewrite.
5498 (java_replace_reference): New function.
5499 (function_binding_level): New variable.
5500 (pushdecl_function_level): New function.
5501 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5502 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5503 (start_java_method): Reset uniq. Create base_decl_map. Set
5504 function_binding_level.
5505 (end_java_method): Null unused fields to save memory.
5507 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
5509 * class.c (add_interface_do): Remove.
5510 (set_super_info, interface_of_p, maybe_add_interface,
5511 add_interface, make_class_data, layout_class,
5512 add_miranda_methods): Adjust BINFO accessors and addition.
5513 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5515 * jcf-write.c (generate_classfile): Likewise.
5516 * parse.y (patch_anonymous_class, check_inner_circular_reference,
5517 check_circular_reference, java_complete_class,
5518 check_abstract_method_definitions,
5519 java_check_abstract_method_definitions,
5520 check_interface_throws_clauses, java_check_abstract_methods,
5521 lookup_java_interface_method2,
5522 find_applicable_accessible_methods_list): Adjust BINFO accessors
5524 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5526 2004-07-18 Roger Sayle <roger@eyesopen.com>
5528 * builtins.c (max_builtin, min_builtin,
5529 java_build_function_call_expr): Replace calls to build with buildN.
5530 * class.c (build_class_ref, build_static_field_ref,
5531 get_dispatch_table, make_class_data, layout_class_method): Likewise.
5532 * constants.c (build_ref_from_constant_pool): Likewise.
5533 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5534 add_stmt_to_compound): Likewise.
5535 * except.c (build_exception_object_ref, expand_end_java_handler):
5537 * java-gimplify.c (java_gimplify_case_expr,
5538 java_gimplify_default_expr, java_gimplify_block,
5539 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5540 * jcf-write.c (generate_bytecode_insns): Likewise.
5541 * typeck.c (convert_ieee_real_to_integer): Likewise.
5543 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
5545 * java-tree.h (builtin_function): Declare.
5547 2004-07-16 Steven Bosscher <stevenb@suse.de>
5549 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5550 abuse restore_line_number_status.
5552 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
5555 * jcf-parse.c (java_emit_static_constructor): Specify default
5558 2004-07-13 Per Bothner <per@bothner.com>
5560 * java-tree.h (all_class_filename): Remove useless macro.
5561 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
5562 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
5563 * parse.y (java_parser_context_restore_global): Replace
5564 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
5565 * jcf-parse.c (read_class, java_parse_file): Likewise.
5567 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
5570 gjavah.c (print_field_info): Emit constant only if field is static.
5572 2004-07-11 Roger Sayle <roger@eyesopen.com>
5574 * expr.c (java_truthvalue_conversion, flush_quick_stack,
5575 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
5576 build_java_ret, build_java_throw_out_of_bounds_exception,
5577 build_java_array_length_access, java_check_reference,
5578 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
5579 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
5580 expand_java_arrayload, build_java_monitor, expand_java_return,
5581 expand_load_internal, expand_java_NEW, build_get_class,
5582 build_instanceof, expand_java_CHECKCAST, expand_iinc,
5583 build_java_soft_divmod, build_java_binop, build_field_ref,
5584 expand_compare, expand_java_goto, expand_java_switch,
5585 expand_java_add_case, build_class_init, build_known_method_ref,
5586 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
5587 expand_invoke, build_jni_stub, expand_java_field_op,
5588 java_expand_expr, expand_byte_code, STORE_INTERNAL,
5589 force_evaluation_order, emit_init_test_initialization): Convert
5590 calls to "build" into calls to the prefered "buildN" functions.
5592 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
5594 * java-tree.h (set_block): Remove.
5595 * lang.c (java_clear_binding_stack): New.
5596 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5597 * decl.c (struct binding_level): Remove this_block.
5598 (clear_binding_level): Likewise.
5599 (poplevel): Don't handle this_block.
5600 (set_block): Remove.
5602 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
5604 * class.c (common_enclosing_context_p): Remove statement with no
5607 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
5610 * parse.y (create_anonymous_class): Remove 'location' argument. Use
5611 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
5612 (craft_constructor): Inherit access flags for implicit constructor
5613 from the enclosing class.
5614 (create_class): Fix comment typo.
5615 (resolve_qualified_expression_name): Pass type of qualifier to
5616 not_accessible_p, not the type in which target field was found.
5617 (not_accessible_p): Handle inner classes. Expand protected
5618 qualifier-subtype check to enclosing instances, but don't apply this
5619 check to static members. Allow protected access to inner classes
5620 of a subtype. Allow private access within common enclosing context.
5621 (build_super_invocation): Get WFL line number info from current
5623 (build_incomplete_class_ref): Update for new create_anonymous_class
5625 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
5626 common_enclosing_instance_p.
5627 * class.c (common_enclosing_context_p): New. Determine if types
5628 share a common enclosing context, even across static contexts.
5629 (common_enclosing_instance_p): Renamed from
5630 common_enclosing_context_p. Determines if types share a common
5631 non-static enclosing instance.
5632 * java-tree.h (common_enclosing_instance_p): Declare.
5633 * jcf-write.c (get_method_access_flags): New. Surpress private flag
5634 for inner class constructors.
5635 (generate_classfile): Use get_method_access_flags.
5637 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
5639 * class.c (interface_of_p): Check for null TYPE_BINFO.
5641 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
5643 * class.c (make_class): Do not create binfo here.
5644 (set_super_info): Create it here.
5645 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
5647 2004-07-08 Richard Henderson <rth@redhat.com>
5649 * expr.c (case_identity, get_primitive_array_vtable,
5650 java_expand_expr, emit_init_test_initialization): Remove.
5651 * java-tree.h (java_expand_expr): Remove.
5652 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
5654 2004-07-07 Per Bothner <per@bothner.com>
5656 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
5657 get internal error due to mismatched types.
5659 * gcj.texi (Invoking gij): Document new -verbose:class flag.
5661 * gcj.texi (Linking): New node. Document -lgij usage.
5663 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
5665 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
5666 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
5667 * java/class.c (set_super_info, class_depth, interface_of_p,
5668 maybe_add_interface, add_interface, make_class_data,
5669 layout_class, add_miranda_methods): Adjust BINFO macros.
5670 * expr.c (can_widen_reference_to, lookup_field): Likewise.
5671 * jcf-write.c (generate_classfile): Likewise.
5672 * parse.y (patch_anonymous_class,
5673 check_inner_circular_reference, check_circular_reference,
5674 java_complete_class, check_abstract_method_definitions,
5675 java_check_abstract_method_definitions,
5676 check_interface_throws_clauses, java_check_abstract_methods,
5677 lookup_java_interface_method2,
5678 find_applicable_accessible_methods_list): Likewise.
5679 * typeck.c (find_method_in_interface): Likewise.
5680 * verify.c (merge_types): Likewise.
5682 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
5684 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
5685 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
5687 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
5689 * class.c (make_class): Use make_tree_binfo.
5690 (set_super_info, add_interface_do): Likewise.
5691 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
5693 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
5695 * verify.c: Correct array element access formatting thinko.
5697 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
5699 * verify.c: Insert a short blurb at the start referring to the JVMS.
5700 (merge_type_state): Remove redundant nested if statement.
5701 (verify_jvm_instructions): Ensure current_subr is initialised to
5703 Minor formatting fixes all over the place.
5705 2004-07-02 Richard Henderson <rth@redhat.com>
5707 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
5709 2004-07-01 Richard Henderson <rth@redhat.com>
5711 * class.c (registerClass_libfunc): Remove.
5712 (init_class_processing): Don't set it.
5713 (emit_register_classes): Take list_p parameter. Fill it in
5714 with _Jv_RegisterClass calls.
5715 * decl.c (java_init_decl_processing): Don't call
5716 init_resource_processing.
5717 * jcf-parse.c (java_emit_static_constructor): New.
5718 (java_parse_file): Call it.
5719 * resource.c (registerResource_libfunc): Remove.
5720 (init_resource_processing): Remove.
5721 (write_resource_constructor): Take list_p parameter. Fill it in
5722 with _Jv_RegisterResource calls.
5723 * java-tree.h: Update prototypes.
5725 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
5728 * class.c (layout_class_method): Do not override package-private
5729 method if its in a different package.
5730 (split_qualified_name): Move here from parse.y. Rename from
5731 breakdown_qualified. Add comment.
5732 (in_same_package): Move here from parse.y. Add comment.
5733 * java-tree.h (break_down_qualified, in_same_package): Declare.
5734 (in_same_package): Likewise.
5735 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
5738 2004-06-29 Andrew Haley <aph@redhat.com>
5740 * except.c (expand_start_java_handler): Push a new binding level.
5741 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
5742 register_exception_range() to register where we'll do it.
5743 (expand_end_java_handler): Remove old bogus code. Replace with
5744 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5745 the top of the expression we're curently building.
5746 (maybe_end_try): Delete.
5747 * decl.c (binding_level.exception_range): New field.
5748 (clear_binding_level): Add field exception_range. Reformat.
5749 (poplevel): Call expand_end_java_handler().
5750 (poplevel): Call java_add_stmt only if functionbody is false.
5751 (maybe_poplevels): Don't call maybe_end_try() from here.
5752 (end_java_method): Clear no longer used trees in function decl.
5753 (register_exception_range): New function.
5754 * java-tree.h (register_exception_range, struct eh_range): Declare.
5756 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
5758 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
5760 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
5763 * expr.c (class_has_finalize_method): Fix method name indentation.
5764 (expand_java_call): Remove K&R style parameter declaration.
5765 (expand_invoke): Fix statement indentation.
5766 (expand_java_field_op): Likewise.
5767 * parse-scan.y: Fix typo.
5768 (reset_report): Fix method name indentation.
5769 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
5771 * verify.c (verify_jvm_instructions): Document parameters, insert
5773 * lang.c (lang_init_source): Fix method name indentation.
5774 * class.c (common_enclosing_context_p): Likewise.
5775 (emit_symbol_table): Fix parameter list indentation.
5776 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
5777 parameter declaration.
5778 * constants.c: Fix copyright notice indentation.
5779 * typeck.c (find_method_in_superclasses): Fix parameter list
5781 (find_method_in_interfaces): Likewise.
5782 * zextract.c (makelong): Fix method name indentation.
5784 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5787 * parse.y (create_interface): Set correct access modifiers for
5789 * jcf-write.c (get_classfile_modifiers): New function.
5790 (generate_classfile): Use get_classfile_modifiers, not
5793 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5795 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
5796 dependency to current parser context, not NULL_TREE, for top-level
5798 (jdep_resolve_class): Enable member access check for all inner
5801 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5803 * parse.y (qualify_and_find): Pass type decl, not identifier, to
5806 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5809 * expr.c (expand_java_field_op): Ensure that target class for static
5810 field access has been loaded.
5812 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5813 Ranjit Mathew <rmathew@hotmail.com>
5815 PR java/1207, java/16178
5816 * jcf-parse.c (load_class): Return immediately if passed a type decl
5817 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
5818 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
5819 before calling load_class.
5820 (qualify_and_find): Likewise.
5821 (find_in_imports_on_demand): Likewise.
5822 (find_applicable_accessible_methods_list): Likewise.
5824 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
5826 * parse.y (java_layout_seen_class_methods): Don't call load_class
5827 on class defined by source parser.
5829 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
5831 * parse.y (set_nested_class_simple_name_value): Removed.
5832 (java_complete_expand_class): Remove calls to
5833 set_nested_class_simple_name_value.
5835 2004-06-22 Andrew Haley <aph@redhat.com>
5836 Ranjit Mathew <rmathew@hotmail.com>
5838 Fixes PR java/16113.
5839 * decl.c (force_poplevels): Remove call to expand_end_bindings.
5841 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
5843 * parse.y (create_class): Correct diagnostic message about
5844 java.lang.Object extending anything else.
5846 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5848 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
5849 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
5850 * constants.c (build_ref_from_constant_pool): Likewise.
5851 * expr.c (build_java_array_length_access): Likewise.
5852 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
5853 (invoke_build_dtable, build_invokevirtual): Likewise.
5854 (build_invokeinterface, java_expand_expr): Likewise.
5855 (emit_init_test_initialization): Likewise.
5856 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5857 * parse.y (make_qualifed_name, build_array_ref): Likewise.
5859 2004-06-21 Andrew Haley <aph@redhat.com>
5861 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
5864 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
5866 * jcf.h (struct JCF): Change java_source, right_zip and finished
5868 * lex.h (struct java_lexer): Change hit_eof, read_anything,
5869 byte_swap and use_fallback to unsigned int.
5870 * parse.h (struct _jdep): Change flag0 to unsigned int.
5872 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
5875 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
5876 before trying to lay out its methods.
5877 * jcf-parse.c (read_class): Track parsed files using canonical paths
5878 obtained via lrealpath from libiberty.
5879 (java_parse_file): Likewise.
5880 (parse_source_file_1): Rename formal parameter to reflect its
5881 modified purpose. Minor formatting fix.
5883 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
5885 * class.c (emit_register_classes): Make the function uninlinable,
5886 do not set current_function_cannot_inline.
5887 * resource.c (write_resource_constructor): Do not reset
5888 flag_inline_functions around rest_of_compilation.
5890 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
5893 * expr.c (java_truthvalue_conversion): Handle
5894 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
5895 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
5896 i.e. return the expression.
5898 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
5900 * gjavah.c: Include version.h
5902 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
5904 * jcf-write.c (generate_bytecode_conditional): Correct handling
5905 of unordered conditionals. Add comment.
5907 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
5908 Per Bothner <per@bothner.com>
5910 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
5911 local variable was initialised upon declaration.
5912 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
5913 variable was final and initialised upon declaration.
5914 * check-init.c (check_final_reassigned): Give error only if a blank
5915 final is not definitely unassigned or if an initialised final is
5917 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
5918 assignment expressions. Remove case MODIFY_EXPR, label do_default.
5919 (check_init): Perform initialised-variable-removing-optimisation
5920 only on non-final local variables.
5922 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5924 * jcf-write.c (generate_bytecode_conditional): Handle binops
5925 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
5927 (generate_bytecode_insns): Likewise.
5929 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5931 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
5932 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
5934 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5936 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
5937 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
5939 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
5941 * decl.c (struct binding_level): Add GTY marker. Compile
5942 binding_depth unconditionally.
5943 (current_binding_level, free_binding_level, global_binding_level):
5945 (clear_binding_level): Unconditionally set binding_depth.
5946 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
5948 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
5950 * lex.c (java_new_lexer): Set 'encoding'.
5951 (java_read_char): Improve error message for unrecognized characters.
5952 * lex.h (struct java_lexer): New field 'encoding'.
5954 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
5956 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
5958 2004-05-21 Mark Wielaard <mark@klomp.org>
5960 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
5963 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
5965 * typeck.c: Remove non-printable character 160.
5967 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
5969 * check-init.c: Correct minor typos.
5971 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5973 * Make-lang.in, expr.c, java-gimplify.c: Rename
5974 tree-simple.[ch] to tree-gimple.[ch].
5976 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
5978 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
5980 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5982 Merge from tree-ssa-20020619-branch. See
5983 ChangeLog.tree-ssa for details.
5985 * Make-lang.in, builtins.c, check-init.c, class.c,
5986 constants.c, decl.c, except.c, expr.c, java-except.h,
5987 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
5988 lang.c, lang.opt, parse.y, resource.c: Merged.
5989 * java-gimplify.c: New file.
5991 2004-05-10 Andrew Haley <aph@redhat.com>
5993 * parse.y (create_class): Set TYPE_VFIELD.
5994 * decl.c (java_init_decl_processing): Likewise.
5996 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
5997 * class.c (make_method_value): Replace DECL_VINDEX with call to
5999 (get_dispatch_vector): Likewise.
6000 (layout_class_method): Likewise.
6001 Replace set of DECL_VINDEX with call to set_method_index().
6002 (set_method_index): New function.
6003 (get_method_index): New function.
6004 * java-tree.h (set_method_index): New function decl.
6005 (get_method_index): New function decl.
6007 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
6009 * parse.y (check_pkg_class_access): Add new argument
6010 and use it when cl is NULL to call lookup_cl on it.
6011 (parser_check_super_interface): Do not call lookup_cl.
6012 Pass this_decl to check_pkg_class_access and NULL
6013 instead of lookup_cl.
6014 (parser_check_super): Update for change in
6015 check_pkg_class_access.
6016 (do_resolve_class): Likewise.
6017 (process_imports): Likewise.
6018 (find_in_imports_on_demand): Likewise.
6019 (resolve_qualified_expression_name): Likewise.
6021 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
6023 Fixes PR java/9685, PR java/15073
6024 * parse.y (accessibility_string): New method.
6025 (not_accessible_field_error): Use accessibility_string()
6026 instead of java_accstring_lookup().
6027 (resolve_qualified_expression_name): Check with
6028 check_pkg_class_access() before allowing access using
6031 Use check_pkg_class_access() instead of not_accessible_p()
6032 for unqualified types.
6033 (not_accessible_p): Use DECL_CONTEXT (member) instead of
6034 REFERENCE for package-private access checking.
6035 (patch_method_invocation): Use accessibility_string() instead
6036 of java_accstring_lookup().
6038 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
6041 * gjavah.c (struct method_name): Add member is_native.
6042 (overloaded_jni_method_exists_p): Match candidate method only if
6044 (print_method_info): Initialise is_native flag from the method's
6047 2004-04-30 Roger Sayle <roger@eyesopen.com>
6049 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6050 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6052 2004-04-22 Roger Sayle <roger@eyesopen.com>
6054 * resource.c (write_resource_constructor): Guard call to possibly
6055 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6057 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
6059 * class.c (make_class_data): Add new field aux_info.
6060 * decl.c (java_init_decl_processing): Push type and decl for
6063 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6065 * expr.c (expand_java_NEW): Don't use size argument for
6066 _Jv_AllocObject calls.
6067 * parse.y (patch_invoke): Likewise.
6069 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6071 * expr.c (build_invokeinterface): Remove unused variables to
6074 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6076 * class.c (get_interface_method_index): New function. Return dispatch
6077 index for interface method.
6078 (make_method_value): For interface methods, set index field to
6079 iface dispatch index, not DECL_VINDEX.
6080 * expr.c (build_invokeinterface): Use get_interface_method_index.
6082 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6084 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6086 2004-03-31 Andrew Haley <aph@redhat.com>
6089 * jcf-io.c (opendir_in_zip): Tidy up error handling.
6091 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6093 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6094 form of GTY markers.
6096 2004-03-25 Marcus Meissner <meissner@suse.de>
6099 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6101 2004-03-23 Tom Tromey <tromey@redhat.com>
6104 * jcf-write.c (make_class_file_name): Don't report if mkdir
6107 2004-03-23 Tom Tromey <tromey@redhat.com>
6109 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6111 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
6113 * class.c, gjavah.c, lang.c: Fix comment typos.
6114 * gcj.texi: Fix typos.
6116 2004-03-19 Per Bothner <per@bothner.com>
6118 * gcj.texi (Code Generation): Document new flags and assert defaults.
6120 * class.c (assume_compiled_node_struct): Rename type to
6121 class_flag_node_struct, as it is now also used for enable_assertions.
6122 Rename assume_compiled_node typedef. Rename excludep field to value.
6123 (find_assume_compiled_node): Rename function to find_class_flag_node.
6124 Minor optimization - avoid needless strlen.
6125 (add_assume_compiled): Some tweaking and optimization.
6126 Rename and generalize to add_class_flag takem an extra parameter.
6127 (add_assume_compled): New just calls add_class_flag.
6128 (add_enable_assert, enable_assertions): New functions.
6129 (enable_assert_tree): New static.
6130 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6131 * lang.opt (fenable-assertions, fenable-assertions=,
6132 fdisable-assertions, fdisable-assertions=): New options.
6133 * lang.c (java_handle_option): Handle new options.
6134 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
6135 class in an interface - create helper class nested in outer interface.
6136 (build_assertion): Short-circuit if enable_assertions is false.
6138 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6140 * java-tree.h: Changes throughout to add checking to macros
6141 and numerous whitespace changes.
6142 (VAR_OR_FIELD_CHECK): New macro.
6143 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6144 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6146 2004-03-16 Per Bothner <per@bothner.com>
6148 * jcf-jump.c (options): New --print-constants option.
6149 * gcj.texi (Invoking jcf-dump): Document --print-constants.
6151 * jcf-dump.c (flag_print_constant_pool): Default to off.
6152 (print_constant_terse_with_index): New helper function.
6153 (various places): Check flag_print_constant_pool where missing.
6154 (main): If verbose set flag_print_constant_pool.
6155 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
6157 2004-03-15 Andrew Haley <aph@redhat.com>
6160 * parse.y (java_complete_lhs): Check that final variable has an
6163 2004-03-12 Andrew Haley <aph@redhat.com>
6166 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6169 2004-02-29 Roger Sayle <roger@eyesopen.com>
6171 * jcf-parse.c (java_parse_file): Handle the case that input_filename
6174 2004-02-27 Per Bothner <per@bothner.com>
6176 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
6177 suggestion: Use build_incomplete_class_ref.
6178 This fixes PR java/13508, java/11714.
6180 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
6182 * java/parse.h: Update copyright.
6184 2004-02-26 Andrew Haley <aph@redhat.com>
6187 * parse.y (check_interface_throws_clauses): Check for
6188 !METHOD_INVISIBLE (iface_method).
6189 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6190 well as CLASS_ABSTRACT.
6192 2004-02-25 Per Bothner <per@bothner.com>
6194 * parse.y (build_assertion): If we're in an inner class, create the
6195 class$ helper routine in the outer class.
6197 2004-02-19 Richard Henderson <rth@redhat.com>
6199 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6201 2004-02-16 Geoffrey Keating <geoffk@apple.com>
6203 * Make-lang.in (java.install-man): Add extra dependencies.
6205 2004-02-13 Geoffrey Keating <geoffk@apple.com>
6207 * Make-lang.in: Install man pages under the same names
6208 (possibly transformed) as the program they document.
6210 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
6212 * gjavah.c: Include "intl.h".
6213 (error): New function.
6214 (main): Call gcc_init_libintl.
6215 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6216 print_stub_or_jni, process_file, main): Use error rather than
6218 (print_method_info, usage, help, version, main): Mark strings for
6219 translation with _. Avoid splitting up sentences. Send
6220 information messages to stdout.
6221 * jcf-dump.c: Include "intl.h".
6222 (main): Call gcc_init_libintl.
6223 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6224 Mark error, usage and version messages for translation with _.
6225 Avoid splitting up sentences.
6226 * jv-scan.c: Include "intl.h".
6227 (fatal_error, warning): Change parameter s to msgid. Translate
6229 (main): Call gcc_init_libintl.
6230 (usage, help, version): Mark error, usage and version messages for
6231 translation with _. Avoid splitting up sentences.
6232 * jvgenmain.c: Include "intl.h".
6233 (main): Call gcc_init_libintl.
6234 (usage, main): Mark error messages for translation with _.
6235 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6236 JVGENMAIN_OBJS): Add intl.o.
6237 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6238 java/jvgenmain.o): Update dependencies.
6240 2004-02-08 Per Bothner <per@bothner.com>
6242 * parse.y (resolve_qualified_expression_name): In case of inaccessible
6243 class don't use not_accessible_field_error, which can get confused.
6245 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6247 Make-lang.in (po-generated): Delete.
6249 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6251 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6253 * decl.c: Include target.h.
6254 (start_java_method): Replace PROMOTE_PROTOTYPES with
6255 targetm.calls.promote_prototypes.
6256 * expr.c: Include target.h.
6257 (pop_arguments): Replace PROMOTE_PROTOTYPES with
6258 targetm.calls.promote_prototypes.
6259 * parse.y: Include target.h.
6260 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6261 with targetm.calls.promote_prototypes.
6263 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6265 * typeck.c: Update copyright.
6267 2004-02-02 Tom Tromey <tromey@redhat.com>
6269 * decl.c (java_init_decl_processing): Remove duplicate
6272 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
6274 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6276 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
6278 * expr.c (build_field_ref): Move variable
6281 2004-01-28 Andrew Haley <aph@redhat.com>
6283 * expr.c (build_field_ref): Widen field offset.
6285 2004-01-27 Andrew Haley <aph@redhat.com>
6288 * parse.y (check_interface_throws_clauses): Make sure class_decl
6291 2004-01-22 Jeff Sturm <jsturm@one-point.com>
6294 * parse.y (patch_assignment): Don't modify lhs_type for
6295 reference assignments.
6297 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6299 * Make-lang.in: Replace $(docdir) with doc.
6300 (java.info, java.srcinfo, java.man, java.srcman): New rules.
6301 (java.install-man): Revamp rule.
6303 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6305 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6306 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6307 instead of deferred backquote.
6309 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
6311 * typeck.c (find_method_in_interfaces): Move variable
6314 2004-01-16 Andrew Haley <aph@redhat.com>
6317 * typeck.c (shallow_find_method): New.
6318 (find_method_in_superclasses): New.
6319 (find_method_in_interfaces): New.
6320 (lookup_do): Rewrite.
6321 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6323 * jcf-parse.c (read_class): Save and restore output_class.
6324 * decl.c (java_expand_body): Set output_class from fndecl.
6326 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
6328 * class.c (gen_indirect_dispatch_tables): Fix string length
6331 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6333 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6334 (java.srcextra): Copy above back to source directory if requested.
6335 (po-generated): Delete reference to $(parsedir).
6336 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6339 2004-01-14 Jan Hubicka <jh@suse.cz>
6341 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6344 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6346 * java-tree.h (java_expand_expr): Change prototype.
6347 * expr.c (java_expand_expr): Add alt_rtl parameter.
6349 2004-01-09 Andrew Haley <aph@redhat.com>
6352 * parse.y (java_fix_constructors): Set output_class.
6353 (java_reorder_fields): Likewise.
6354 (java_layout_classes): Likewise.
6355 (java_expand_classes): Generate indirect dispatch tables.
6356 (java_expand_classes): Set output_class.
6357 (java_finish_classes): Likewise.
6358 * lang.c (java_init): Turn on always_initialize_class_p if we're
6359 using indirect dis[atch.
6360 (java_decl_ok_for_sibcall): Use output_class, not current_class.
6361 (java_get_callee_fndecl): Use class local atable.
6363 (always_initialize_class_p): Decl moved to java-tree.h.
6364 (HANDLE_CLASS_INFO): Set output_class.
6365 (read_class): Likewise.
6366 (parse_class_file): Call gen_indirect_dispatch_tables.
6367 (parse_zip_file_entries): Set output_class.
6368 (java_parse_file): Set output_class. Don't emit symbol tables.
6369 * java-tree.h (output_class): New.
6370 Remove global declarations for otable, atable, and ctable.
6371 (always_initialize_class_p): moved here from decl.c.
6373 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6374 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6375 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6376 (struct lang_type): Add otable_methods, otable_decl,
6377 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6378 ctable_decl, catch_classes, type_to_runtime_map.
6379 * expr.c (build_field_ref): Make otable, atable, and ctable class
6380 local rather than global.
6381 (build_known_method_ref): Likewise.
6382 (build_invokeinterface): Likewise.
6383 (java_expand_expr): Pass runtime type (rather than actual type) to
6385 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6386 this class. Look up each class in that map to delete duplicates.
6387 (expand_end_java_handler): Pass runtime type (rather than actual
6388 type) to expand_start_catch.
6389 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6391 (java_init_decl_processing): Rearrange things. Remove global
6392 declarations of otable, atable, and ctable.
6393 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6394 (java_expand_body): Set output_class.
6395 * constants.c (build_constant_data_ref): Use output_class, not
6397 (alloc_name_constant): Likewise.
6398 * class.c (gen_indirect_dispatch_tables): New.
6399 (build_class_ref): Generate hard reference to superclass, even if
6400 using indirect dispatch.
6401 (build_static_field_ref): Use class local atable.
6402 (make_class_data): Generate hard reference to superclass, even if
6403 using indirect dispatch.
6404 Generate symbolic references to interfaces when using indirect
6406 (make_class_data): Emit otable, atable, and ctable.
6407 Make otable, atable, and ctable class local rather than global.
6408 (emit_catch_table): Make otable, atable, and ctable class local
6411 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
6413 * parse.y (catch_clause_parameter): Fix typo.
6416 * parse.y: (catch_clause_parameter): Return early if $3, aka
6417 formal_parameter, is null.
6419 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
6421 * class.c: Remove uses of "register" specifier in
6422 declarations of arguments and local variables.
6425 * gjavah.c: Likewise.
6426 * jcf-dump.c: Likewise.
6427 * jcf-io.c: Likewise.
6428 * jcf-parse.c: Likewise.
6429 * jcf-write.c: Likewise.
6430 * keyword.h: Likewise.
6431 * parse.y: Likewise.
6432 * typeck.c: Likewise.
6433 * verify.c: Likewise.
6435 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
6437 * Make-lang.in (GCJ_CROSS_NAME): Delete.
6438 (java.install_common, java.install-man): Adjust for above.
6439 (java.uninstall): Likewise.
6441 2003-12-03 Michael Koch <konqueror@gmx.de>
6443 * class.c (make_class_data):
6444 Push field value to 'hack_signers' instead of 'signers'.
6445 * decl.c (java_init_decl_processing):
6446 Push field 'hack_signers' instead of 'signers'.
6448 2003-12-03 Zack Weinberg <zack@codesourcery.com>
6450 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6453 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
6456 * parse.y (qualify_ambiguous_name): Remove lots of broken
6457 field access processing - there's no need to do that here,
6458 because we have resolve_field_access. Remove
6459 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6460 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6463 2003-12-01 Jeff Sturm <jsturm@one-point.com>
6466 * parse.y (java_complete_lhs): Save location prior to patching
6469 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
6472 * resource.c (write_resource_constructor): Append
6473 "_resource" to constructor identifier name.
6475 2003-11-25 Jeff Sturm <jsturm@one-point.com>
6478 * constants.c (cpool_for_class): New function.
6479 (outgoing_cpool): Remove global variable.
6480 (alloc_name_constant): Use cpool_for_class.
6481 (build_constants_constructor): Likewise.
6482 * decl.c (java_expand_body): Set current_class.
6483 * java-tree.h (outgoing_cpool) Remove declaration.
6484 (init_outgoing_cpool): Likewise.
6485 * jcf-parse.c (init_outgoing_cpool): Remove function.
6486 (parse_class_file): Don't call init_outgoing_cpool.
6487 * parse.y (java_complete_expand_methods): Don't call
6488 init_outgoing_cpool. Don't save outgoing_cpool.
6489 (java_expand_classes): Don't restore outgoing_cpool.
6490 (java_finish_classes): Likewise.
6492 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
6494 * Make-lang.in: (java.install-common) Add
6495 symlink for $(target_noncanonical)-gcjh for
6498 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6500 * Make-lang.in (java.extraclean): Delete.
6502 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6504 * Make-lang.in (check-java): Add.
6506 2003-11-19 Jeff Sturm <jsturm@one-point.com>
6509 * except.c (prepare_eh_table_type): Allocate variable-sized
6510 buffer `buf' with alloca.
6512 2003-11-17 Jeff Sturm <jsturm@one-point.com>
6516 decl.c (java_init_decl_processing): Don't initialize
6517 class_not_found_type_node, no_class_def_found_type_node.
6519 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6520 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6521 (class_not_found_type_node, no_class_def_found_type_node):
6524 parse.y (build_dot_class_method_invocation): Add this_class
6525 argument. Qualify method invocations to a different class.
6526 (create_new_parser_context): Initialize saved_data_ctx to 0.
6527 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6528 (build_dot_class_method): Don't load classes. Register
6530 (build_incomplete_class_ref): Special cases for interfaces
6531 and inner classes. Move build_dot_class_method call to here...
6532 (patch_incomplete_class_ref): ...from here. Pass current_class
6533 to build_dot_class_method_invocation.
6534 (build_assertion): Pass class_type to
6535 build_dot_class_method_invocation.
6536 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6538 2003-11-17 Jeff Sturm <jsturm@one-point.com>
6541 * java-tree.h (BLOCK_EMPTY_P): Define.
6542 * parse.y (java_complete_lhs): Check for empty blocks
6543 in TRY_FINALLY_EXPR case.
6545 2003-11-17 Andrew Haley <aph@redhat.com>
6547 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
6548 (struct lang_decl_var:freed): New variable.
6549 * decl.c (poplevel): Mark local vars that have gone out of scope.
6550 (push_jvm_slot): Don't use the RTL of a var that has gone out of
6553 2003-11-16 Jason Merrill <jason@redhat.com>
6555 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6556 and TAGS files that include them for each front end.
6558 2003-11-15 Tom Tromey <tromey@redhat.com>
6560 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
6562 2003-11-12 Jason Merrill <jason@redhat.com>
6564 PR optimization/12547
6565 * lang.c (java_tree_inlining_walk_subtrees): Just walk
6566 BLOCK_EXPR_BODY directly.
6568 2003-11-12 Andrew Haley <aph@redhat.com>
6571 * parse.y (fold_constant_for_init): Check that we really do have a
6575 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
6576 init_test_decls being inlined.
6579 * parse.y (do_resolve_class): Check return value from
6580 breakdown_qualified().
6582 2003-11-11 Tom Tromey <tromey@redhat.com>
6585 * parse.y (merge_string_cste): Handle case where we have a
6586 pointer that happens to be zero, not null_pointer_node.
6588 2003-11-10 Tom Tromey <tromey@redhat.com>
6590 * jcf-parse.c (classify_zip_file): Correctly compare
6591 filename_length against length of manifest file's name.
6593 2003-11-08 Tom Tromey <tromey@redhat.com>
6596 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
6598 2003-11-06 Andrew Haley <aph@redhat.com>
6600 * expr.c (java_stack_swap): Make sure destination stack slots are
6601 of the correct type.
6603 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
6605 * Make-lang.in (dvi): Move targets to $(docobjdir).
6606 (gcj.dvi): Simplify rule and adjust target.
6607 (gcj.info): Simplify rule.
6608 (gcj.pod): New intermediate rule.
6609 (gcjh.pod): Likewise.
6610 (jv-scan.pod): Likewise.
6611 (jcf-dump.pod): Likewise.
6612 (gij.pod): Likewise.
6613 (jv-convert.pod): Likewise.
6614 (rmic.pod): Likewise.
6615 (rmiregistry.pod): Likewise.
6618 (jv-scan.1): Delete.
6619 (jcf-dump.1): Delete.
6621 (jv-convert.1): Delete.
6623 (rmiregistry.1): Delete.
6625 2003-11-02 Jeff Sturm <jsturm@one-point.com>
6627 Fixes PR java/12866.
6628 * parse.y (resolve_qualified_expression_name): Move test
6629 for outer field access methods from here...
6630 (check_thrown_exceptions) ...to here.
6632 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
6634 * .cvsignore: Delete.
6636 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
6638 * verify.c (verify_jvm_instructions): Don't warn about legal
6639 eh binding regions generated for example by jdk 1.4.1.
6641 2003-10-24 David S. Miller <davem@redhat.com>
6643 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
6645 2003-10-22 Andrew Haley <aph@redhat.com>
6647 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
6648 (java_get_callee_fndecl): New.
6650 * jcf-parse.c (java_parse_file): Call emit_catch_table().
6652 * java-tree.h (ctable_decl): New.
6653 (catch_classes): New.
6654 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
6656 * decl.c (java_init_decl_processing): Add catch_class_type.
6658 Add catch_classes field.
6660 * class.c (build_indirect_class_ref): Break out from
6662 (make_field_value): Check flag_indirect_dispatch.
6663 (make_class_data): Ditto.
6664 Tidy uses of PUSH_FIELD_VALUE.
6665 Add field catch_classes.
6666 (make_catch_class_record): New.
6668 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
6670 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
6672 * jcf-write.c: Follow spelling conventions.
6673 * parse.y: Likewise.
6675 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
6677 * ChangeLog: Fix typos.
6678 * expr.c: Fix comment typos.
6679 * jcf-write.c: Likewise.
6682 * mangle.c: Likewise.
6683 * parse-scan.y: Likewise.
6684 * parse.y: Likewise.
6686 2003-10-22 Tom Tromey <tromey@redhat.com>
6688 * expr.c (expand_byte_code): Only warn about dead bytecode when
6689 extra_warnings is set.
6691 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
6693 Fix for PR java/12586.
6694 * mangle.c (find_compression_record_match): Don't iterate through
6695 package namespace elements unless they all match compression_table
6698 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
6700 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
6701 (generate-manpages): Likewise.
6702 (java.maintainer-clean): Likewise.
6703 (gcj.info): Likewise.
6706 (jv-scan.1): Likewise.
6707 (jcf-dump.1): Likewise.
6709 (jv-convert.1): Likewise.
6711 (rmiregistry.1): Likewise.
6712 (java.install-man): Likewise.
6713 (parse-scan.o): Move and define complete compile line.
6714 (parse.o): Likewise.
6715 (jcf-tree-inline.o): Move.
6717 2003-10-20 Mark Mitchell <mark@codesourcery.com>
6719 * Make-lang.in (info): Update dependencies.
6720 (java.install-info): Remove.
6721 ($(srcdir)/java/gcj.info): Replace with ...
6722 ($(docobjdir)/gcj.info): ... this.
6724 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
6726 * Make-lang.in: Replace uses of $(target_alias) with
6727 $(target_noncanonical).
6729 2003-10-09 Tom Tromey <tromey@redhat.com>
6731 * decl.c (java_init_decl_processing): Declare signers field.
6732 * class.c (make_class_data): Set signers field.
6734 2003-10-09 Jason Merrill <jason@redhat.com>
6736 * parse.y (patch_assignment): Use make_node to create a BLOCK.
6737 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
6740 2003-10-06 Mark Mitchell <mark@codesourcery.com>
6742 * Make-lang.in (java.info): Replace with ...
6744 (java.dvi): Replace with ...
6746 (java.generated-manpages): Replace with ...
6748 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
6750 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
6752 2003-10-01 Andrew Haley <aph@redhat.com>
6754 * jcf-parse.c (java_parse_file): Write otable and atable.
6755 * java-tree.h (atable_methods): New.
6757 (atable_syms_decl): New.
6758 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
6759 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
6760 (symbol_*type): Rename method_symbol* to symbol*type.
6761 (emit_offset_symbol_table): Delete.
6762 (emit_symbol_table): New.
6763 (get_symbol_table_index): New.
6765 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
6766 (build_known_method_ref): Likewise.
6767 (get_symbol_table_index): Rename from get_offset_table_index.
6768 Parameterize to allow re-use by differing types of symbol table.
6769 (build_invokevirtual): Pass table to get_offset_table_index.
6770 * decl.c (java_init_decl_processing): Push types and decls for
6771 atable and atable_syyms.
6772 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
6773 (make_class_data): Add new fields atable and atable_syms.
6774 (emit_symbol_table): Rename from emit_offset_symbol_table.
6775 Parameterize to allow re-use by different types of symbol table.
6776 (build_symbol_entry): Renamed from build_method_symbols_entry.
6778 2003-09-30 Roger Sayle <roger@eyesopen.com>
6780 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
6781 semantics for SAVE_EXPR, by caching the result in a temporary.
6783 2003-09-28 Richard Henderson <rth@redhat.com>
6785 * check-init.c (check_init): Save and restore input_location
6786 instead of file and line separately.
6787 * decl.c (java_expand_body): Likewise.
6788 * jcf-write.c (generate_bytecode_insns): Likewise.
6789 * parse.y (safe_layout_class): Likewise.
6790 * jcf-parse.c (read_class, parse_class_file): Likewise.
6791 (java_parse_file): Use %H for warning locator.
6793 2003-09-28 Roger Sayle <roger@eyesopen.com>
6795 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
6796 with void-type branches instead of using a COMPOUND_EXPR.
6798 2003-09-28 Jeff Sturm <jsturm@one-point.com>
6800 * decl.c (java_optimize_inline, dump_function): Remove.
6801 * java-tree.h (java_optimize_inline): Remove declaration.
6802 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
6803 * parse.y (source_end_java_method, java_expand_classes):
6804 Likewise. Remove dead code.
6806 2003-09-27 Roger Sayle <roger@eyesopen.com>
6808 * lang.c (java_init_options): Set flag_evaluation_order.
6809 * expr.c (force_evaluation_order): Don't attempt to force
6810 evaluation order of binary operations using save_expr.
6811 * parse.y (java_complete_lhs): No longer need to call
6812 force_evaluation_order when constructing binary operators.
6814 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6815 Bryce McKinlay <bryce@mckinlay.net.nz>
6818 * parse.y (not_accessible_field_error): New function.
6819 (resolve_expression_name): Check field access permissions.
6820 (resolve_qualified_expression_name): Use
6821 not_accessible_field_error.
6822 (resolve_qualified_expression_name): Likewise.
6824 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6826 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
6828 2003-09-23 Roger Sayle <roger@eyesopen.com>
6830 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
6831 with equal operands without side-effects.
6833 2003-09-22 Jeff Sturm <jsturm@one-point.com>
6835 * decl.c (java_init_decl_processing): Don't emit otable decls
6836 if flag_indirect_dispatch is not set.
6838 2003-09-21 Richard Henderson <rth@redhat.com>
6840 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6843 2003-09-21 Richard Henderson <rth@redhat.com>
6845 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6846 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
6848 2003-09-20 Richard Henderson <rth@redhat.com>
6850 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
6852 2003-09-18 Roger Sayle <roger@eyesopen.com>
6854 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
6855 * check-init.c (check_init): Likewise.
6857 2003-09-18 Roger Sayle <roger@eyesopen.com>
6859 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
6861 2003-09-16 Andrew Haley <aph@redhat.com>
6863 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
6865 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
6868 * mangle.c (find_compression_record_match): Skip
6869 over a "6JArray" (the array template mangled string)
6871 (mangle_array_type): Correct minor typo.
6872 (atms): Move definition to the beginning.
6874 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
6876 * class.c (add_miranda_methods): Ensure super-interfaces are laid
6877 out. Fix for PR java/12254.
6879 2003-09-11 Richard Henderson <rth@redhat.com>
6881 * parse.y (source_end_java_method): Update for new
6882 cgraph_finalize_function argument.
6884 2003-09-09 Richard Henderson <rth@redhat.com>
6886 * parse.y (source_end_java_method): Update call to
6887 cgraph_finalize_function.
6889 2003-09-03 Jeff Sturm <jsturm@one-point.com>
6891 * decl.c (java_expand_body): New function.
6892 * expr.c (build_class_init): Set DECL_IGNORED_P.
6893 * java-tree.h (start_complete_expand_method,
6894 java_expand_body): Declare.
6895 * jcf-parse.c (cgraph.h): Include.
6896 (java_parse_file): Handle flag_unit_at_a_time.
6897 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
6898 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
6899 (java_estimate_num_insns): Use walk_tree_without_duplicates.
6900 (java_start_inlining): New function.
6901 * parse.h (java_finish_classes): Declare.
6902 * parse.y: Include cgraph.h.
6903 (block): Don't special-case empty block production.
6904 (craft_constructor): Set DECL_INLINE.
6905 (source_end_java_method): Handle flag_unit_at_a_time.
6906 Replace inline code with call to java_expand_body.
6907 (start_complete_expand_method): Remove static modifier.
6908 (java_expand_method_bodies): Patch function tree for
6909 class initialization and/or synchronization as needed.
6910 Don't begin RTL expansion yet.
6911 (java_expand_classes): Check flag_unit_at_a_time before
6912 calling finish_class.
6913 (java_finish_classes): New function.
6914 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
6915 (patch_assignment): Set DECL_CONTEXT on temporary variable.
6916 (emit_test_initialization): Set DECL_IGNORED_P.
6918 2003-09-03 Roger Sayle <roger@eyesopen.com>
6920 * builtins.c (enum builtin_type): Delete unused enumeration.
6921 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
6923 2003-08-28 Tom Tromey <tromey@redhat.com>
6925 * gcj.texi (Extensions): Document gcjlib URLs.
6927 2003-08-20 Tom Tromey <tromey@redhat.com>
6929 * gcj.texi (Extensions): Added xref.
6930 (libgcj Runtime Properties): Document
6931 gnu.gcj.runtime.VMClassLoader.library_control.
6933 2003-08-20 Andrew Haley <aph@redhat.com>
6935 * except.c (prepare_eh_table_type): Use new encoding for exception
6936 handlers when using -fno-assume-compiled.
6938 2003-08-13 Tom Tromey <tromey@redhat.com>
6940 * gcj.texi (Invoking gij): Document -X and -?.
6942 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
6944 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
6945 GCJH_OBJS, JCFDUMP_OBJS
6946 * win32-host.c: Removed the unnecessary and broken dependency
6949 2003-08-11 Tom Tromey <tromey@redhat.com>
6951 * parse.y (java_check_regular_methods): Typo fixes. Call
6952 check_interface_throws_clauses. Use
6953 check_concrete_throws_clauses.
6954 (check_interface_throws_clauses): New function.
6955 (check_concrete_throws_clauses): New function.
6956 (hack_is_accessible_p): New function.
6957 (find_most_specific_methods_list): Added FIXME.
6958 * typeck.c (lookup_do): Use `flags' argument to decide what to
6960 (lookup_argument_method_generic): New function.
6961 (lookup_argument_method2): Removed.
6962 * jcf.h (ACC_INVISIBLE): New define.
6963 * jcf-write.c (generate_classfile): Skip invisible methods.
6964 * class.c (add_miranda_methods): New function.
6965 (layout_class_methods): Use it.
6966 (get_access_flags_from_decl): Use ACC_INVISIBLE.
6967 * java-tree.h (METHOD_INVISIBLE): New define.
6968 (lang_decl_func) [invisible]: New field.
6969 (lookup_argument_method_generic): Declare.
6970 (SEARCH_INTERFACE): New define.
6971 (SEARCH_SUPER): Likewise.
6972 (SEARCH_ONLY_INTERFACE): Likewise.
6973 (SEARCH_VISIBLE): Likewise.
6974 (lookup_argument_method2): Removed declaration.
6976 2003-08-05 Tom Tromey <tromey@redhat.com>
6978 Fix for PR java/11600:
6979 * parse.y (java_complete_lhs): See whether we're calling a method
6981 (check_thrown_exceptions): Added `is_array_call' argument;
6982 fixed `clone' checking; updated all callers.
6984 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
6986 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
6988 2003-08-03 Tom Tromey <tromey@redhat.com>
6990 * java-tree.h (METHOD_TRANSIENT): Removed.
6991 * decl.c (pushdecl): Removed some dead code.
6992 * class.c (get_access_flags_from_decl): Can't have transient
6994 (add_method_1): Can't have a transient method.
6996 2003-07-28 Andreas Jaeger <aj@suse.de>
6998 * jvspec.c: Convert to ISO C90 prototypes.
7000 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
7002 * decl.c (force_poplevels): Fix warning call.
7004 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7006 * expr.c (expand_java_field_op): Don't use xxx_with_decl
7007 (expand_java_field_op): Likewise.
7008 * class.c (layout_class_method): Likewise
7009 (emit_register_classes): Likewise.
7010 * decl.c (pushdecl): Likewise.
7011 (poplevel): Likewise.
7012 (force_poplevels): Likewise.
7013 (give_name_to_locals): Likewise.
7014 * check-init.c (check_for_initialization): Likewise.
7016 2003-07-24 Jason Merrill <jason@redhat.com>
7018 * java-tree.h: Move boolean_type_node et al to the back end.
7020 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7022 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7025 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
7027 * lang.opt: Don't show -MD_ and -MDD_.
7029 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
7031 * lang-options.h: Remove.
7032 * lang.opt: Add help text.
7034 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
7036 * expr.c: Remove the last argument to expand_assignment().
7038 2003-07-09 Jan Hubicka <jh@suse.cz>
7040 * java-tree.h (DECL_NUM_STMTS): Rename to...
7041 (DECL_ESTIMATED_INSNS): ... this.
7042 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7043 New static functions.
7044 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7045 * parser.y (add_stmt_to_compound): Do not account statements.
7047 2003-07-08 Mark Wielaard <mark@klomp.org>
7049 * gcj.texi: CNI now expands to Compiled Native Interface.
7051 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7053 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7055 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
7057 * expr.c (expand_byte_code): Adjist emit_line_note call.
7059 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
7061 * lang.c (java_handle_option): Don't handle filenames.
7063 2003-07-02 Zack Weinberg <zack@codesourcery.com>
7065 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7068 * jcf-write.c: Don't default-define DIR_SEPARATOR.
7069 * jcf.h: Delete COMPARE_FILENAMES definition.
7071 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
7073 * lang.c (java_init_options): Update prototype.
7075 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
7077 * decl.c (poplevel): Adjust define_label call.
7079 2003-06-27 Zack Weinberg <zack@codesourcery.com>
7081 * gjavah.c (flag_jni): Make non-static.
7082 * parse-scan.y (ctxp): Make non-static.
7084 * class.c (build_method_symbols_entry)
7085 * expr.c (get_offset_table_index)
7086 * jcf-parse.c (jcf_parse):
7087 Mark the definition static, matching the forward declaration.
7089 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
7091 * lang.c (java_handle_option): Don't check for missing arguments.
7093 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
7095 * class.c (push_class): Use a location_t to save place.
7096 (emit_register_classes): Set input_location. Adjust
7097 expand_function_end call.
7098 * resource.c (write_resource_constructor): Likewise.
7099 * decl.c (end_java_method): Adjust expand_function_end call.
7100 * parse.y (source_end_java_method): Likewise.
7102 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
7104 * lang.c (java_handle_option): Likewise.
7106 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
7108 * lang.c (java_handle_option): Special-casing of optional
7109 joined arguments no longer needed.
7110 * lang.opt: Update switches that take optional argument.
7112 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7114 * lang.opt: Declare Java.
7115 * lang.c (java_init_options): Update.
7117 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7119 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7121 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7123 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7124 * lang.c (java_handle_option): -MD and -MMD have an underscore.
7125 * lang.opt: -MD and -MMD have an underscore.
7127 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
7129 * class.c (emit_register_classes): Adjust init_function_start
7131 * decl.c (complete_start_java_method): Likewise.
7132 * resource.c (write_resource_constructor): Likewise.
7134 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7136 * Make-lang.in: Update to use options.c and options.h.
7137 * lang.c: Include options.h not j-options.h.
7138 (java_handle_option): Abort on unrecognized option.
7139 (java_init_options): Request Java switches.
7141 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
7143 * Make-lang.in: Handle mostlyclean.
7145 2003-06-11 Tom Tromey <tromey@redhat.com>
7147 * lang.c (java_handle_option): Update dependency_tracking for
7150 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7153 2003-06-10 Andrew Haley <aph@redhat.com>
7155 * resource.c (write_resource_constructor): Use expand_expr to
7156 generate the address of the label attached to a resource.
7157 * Make-lang.in (java/resource.o): Add expr.h
7159 2003-06-10 Andrew Haley <aph@redhat.com>
7161 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7162 (java_decl_ok_for_sibcall): New.
7164 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
7166 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7167 (java/j-options.c, java/j-options.h): New.
7168 * java-tree.h (resource_name, compile_resource_file,
7169 compile_resource_data): Constify.
7170 * jcf-write.c (jcf_write_base_directory): Similarly.
7171 * jcf.h (jcf_write_base_directory): Similarly.
7172 * lang.c: Include j-options.h.
7173 (cl_options_count, cl_options, string_option, java_decode_option,
7174 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7175 process_option_with_no): Remove.
7176 (resource_name): Constify.
7177 (LANG_HOOKS_HANDLE_OPTION): Override.
7178 (java_handle_option): New.
7179 (java_init): Don't call jcf_path_init.
7180 (java_init_options): Call jcf_path_init.
7182 * resource.c (compile_resource_data, compile_resource_file): Constify.
7184 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
7186 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7187 (struct lang_decl_func): Add last_line field.
7188 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7189 DECL_SOURCE_LINE_LAST): Remove.
7190 * parse.y (missing_return_error, finish_method_declaration,
7191 lookup_cl, start_artificial_method_body, source_end_java_method,
7192 start_complete_expand_method): Adjust.
7194 2003-06-08 Tom Tromey <tromey@redhat.com>
7196 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7197 fno-assume-compiled.
7199 2003-06-08 Roger Sayle <roger@eyesopen.com>
7201 * builtins.c (define_builtin_type, builtin_types): Delete.
7202 (define_builtin): Rewritten to take just the built-in code,
7203 the function's name, type and fallback library function name.
7204 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7205 (initialize_builtins): Overhaul to define the GCC builtins
7206 used by gcj manually, providing the Java run-time's
7207 implementations as the fallback library function.
7209 2003-06-08 Anthony Green <green@redhat.com>
7211 * parse.y (patch_cast): Fix conversions from floating-point to
7214 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
7216 * Make-lang.in: Update.
7217 * lang.c: Include opts.h. Define cl_options_count and cl_options.
7219 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
7221 * lang.c (java_init_options): Update.
7223 2003-06-05 Jan Hubicka <jh@suse.cz>
7225 * Make-lang.in: Add support for stageprofile and stagefeedback
7227 2003-05-31 Roger Sayle <roger@eyesopen.com>
7229 * lang.c (java_init_options): Prescribe wrap-around two's
7230 complement arithmetic overflow by setting flag_wrapv.
7232 2003-05-29 Roger Sayle <roger@eyesopen.com>
7234 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7235 (builtin_record): Add an additional builtin_code field to
7236 record which GCC built-in corresponds to the Java function.
7237 (java_builtins): Add new entries for atan, atan2, exp, log,
7239 (max_builtin, min_builtin, abs_builtin): Perform constant
7240 folding on the resulting tree.
7241 (java_build_function_call_expr): Likewise, perform constant
7242 folding on the resulting tree.
7243 (initialize_builtins): The NULL creators are now allowed in
7244 the java_builtins table, which is now terminated by an entry
7245 with builtin_code == END_BUILTINS.
7246 (check_for_builtin): Likewise. If the matching creator is
7247 NULL, construct the call using java_build_function_call_expr
7248 directly with the decl for the corresponding builtin_code.
7250 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
7252 * win32-host.c: Normalize copyright boilerplate.
7254 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7256 * parse.y (print_int_node): Use string concatentation on
7257 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7258 function calls into one.
7260 2003-05-13 Zack Weinberg <zack@codesourcery.com>
7262 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7263 fatal_io_error with calls to fatal_error; add ": %m" to the end of
7264 all the affected error messages.
7266 2003-05-13 Richard Henderson <rth@redhat.com>
7268 * class.c (layout_class_method): Set DECL_EXTERNAL.
7269 * decl.c (java_mark_decl_local, java_mark_class_local): New.
7270 * java-tree.h (java_mark_class_local): Declare.
7271 * jcf-parse.c (parse_class_file): Use it.
7272 * parse.y (java_expand_classes): Likewise.
7274 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
7276 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7277 * lex.h: #include input.h.
7278 * jv-scan.c (input_filename): Remove.
7280 2003-05-02 Tom Tromey <tromey@redhat.com>
7283 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7284 (handle_inner_classes): New function.
7286 2003-05-01 Tom Tromey <tromey@redhat.com>
7289 * parse.y (finish_for_loop): Do nothing if update expression is a
7290 EXPR_WFL_NODE wrapping nothing.
7291 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7293 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
7295 * lex.h (input_lineno): Remove declaration.
7296 * parse-scan.y: #include input.h.
7297 (input_filename): Remove declaration.
7298 (input_location): Add definition.
7299 (input_line): Remove definition.
7301 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
7303 * lex.h (lineno): Rename to ...
7304 (input_line): ... here
7305 * parse-scan.y (lineno): Rename to ...
7306 (input_line): ... here.
7307 (reset_report): Rename lineno to input_line.
7308 * check-init.c (check_init): Likewise.
7309 * class.c (push_class): Likewise.
7310 * decl.c (complete_start_java_method, end_java_method): Likewise.
7311 * expr.c (expand_byte_code): Likewise.
7312 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7313 * jcf-write.c (generate_bytecode_insns): Likewise.
7314 * lex.c (java_init_lex, java_allocate_new_line,
7315 do_java_lex): Likewise.
7316 * parse.h (YYNOT_TWICE): Likewise.
7317 * parse.y (empty_statement, expression_statement,
7318 java_pop_parser_context, java_parser_context_save_global,
7319 yyerror, register_fields, method_header, safe_layout_class,
7320 find_in_imports_on_demand, create_artificial_method,
7321 source_end_java_method, start_complete_expand_method,
7322 build_thisn_assign, java_complete_lhs,
7323 maybe_absorb_scoping_block): Likewise.
7325 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
7327 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7328 '/' when computing java source filename
7330 2003-04-13 Tom Tromey <tromey@redhat.com>
7332 * gjavah.c (print_c_decl): Indentation fix.
7334 2003-04-12 Zack Weinberg <zack@codesourcery.com>
7336 * class.c (make_field_value, make_method_value, get_dispatch_table)
7337 (make_class_data, emit_offset_symbol_table)
7338 * constants.c (build_constants_constructor)
7339 * java-tree.h (START_RECORD_CONSTRUCTOR)
7340 * parse.y (maybe_build_array_element_wfl):
7341 Use build_constructor.
7343 2003-04-10 Eric Blake <ebb9@email.byu.edu>
7346 * parse.y (string_convert_int_cst): Always use at least one digit
7347 in string conversion. Remove ASCII dependence.
7348 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7350 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
7352 * Make-lang.in: added win32-host.c
7353 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7354 resolves to open() on non-Win32 platforms and
7355 Win32-specific jcf_open_exact_case() on Win32
7356 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7357 when trying .java and .class files
7358 * win32-host.c: added to repository. Defines
7359 Win32-specific jcf_open_exact_case()
7361 2003-04-10 Andrew Haley <aph@redhat.com>
7363 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7364 (maybe_free_localvar): Renamed from localvar_free.
7365 Add new arg, really.
7366 (generate_bytecode_insns): Set new variable, jsrs.
7367 Only free local vars if no jsr insns have been emittted.
7368 Call maybe_free_localvar, not localvar_free.
7370 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
7372 * gcj.texi: Remove @ at start of file.
7374 2003-03-25 Tom Tromey <tromey@redhat.com>
7376 * parse.y (create_interface): Call CHECK_DEPRECATED.
7378 2003-03-23 Zack Weinberg <zack@codesourcery.com>
7380 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7382 2003-03-21 Zack Weinberg <zack@codesourcery.com>
7384 * javaop.h (jfloat, jdouble): Make them structures mirroring
7385 the bit fields of IEEE float and double respectively.
7386 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7387 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7388 (union Word, union DWord): Delete.
7389 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7391 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7392 D_NAN_MASK): Delete.
7393 (jni_print_float, jni_print_double): New. Generate
7394 hexadecimal floating constants.
7395 (print_field_info): Use jni_print_float/double.
7397 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
7398 finite floating point numbers for output; special case
7401 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
7403 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7404 Replace 0 and 1 with true and false in return statements.
7406 2003-03-19 Tom Tromey <tromey@redhat.com>
7408 * lex.c (do_java_lex): Renamed from java_lex.
7409 (java_lex): New function.
7412 2003-03-13 Tom Tromey <tromey@redhat.com>
7414 * parse.y (resolve_inner_class): Error if qualifier is a primitive
7417 2003-03-04 Andrew Haley <aph@redhat.com>
7419 * gjavah.c (is_first_data_member): New global variable.
7420 (print_c_decl): If it's the first data member, align it as the
7422 (process_file): Set is_first_data_member.
7424 2003-03-11 Tom Tromey <tromey@redhat.com>
7426 * parse.y (resolve_field_access): Initialize class if field is
7427 found in another static field.
7428 * expr.c (build_class_init): Don't optimize out initialization of
7429 implemented interface.
7431 2003-03-11 Andrew Haley <aph@redhat.com>
7433 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7436 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
7438 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7439 and DIR_SEPARATOR_2 for a target.
7440 Correct minor typos.
7442 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7443 and DIR_SEPARATOR_2 for a target into account.
7445 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
7447 * lang.c (java_init): Update prototype, move code to java_post_options.
7448 (java_post_options): Similarly.
7450 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
7452 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7453 compare file name components depending on the case-sensitivity
7454 or otherwise of the host file system.
7456 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7457 "strcmp" to compare file name components.
7458 Use IS_DIR_SEPARATOR instead of comparing directly against
7460 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
7461 comparing directly against DIR_SEPARATOR.
7463 2003-03-04 Tom Tromey <tromey@redhat.com>
7465 * Make-lang.in (java.tags): New target.
7467 2003-03-01 Roger Sayle <roger@eyesopen.com>
7469 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7470 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7472 2003-03-01 Tom Tromey <tromey@redhat.com>
7474 * parse.y (jdep_resolve_class): Only check deprecation if we found
7477 2003-02-28 Tom Tromey <tromey@redhat.com>
7480 * class.c (maybe_layout_super_class): Always pass a WFL to
7482 * parse.y (do_resolve_class): Updated comment to explain
7485 2003-02-26 Tom Tromey <tromey@redhat.com>
7487 * jcf-write.c (generate_classfile): Check whether class is
7488 deprecated before writing attribute count.
7490 2003-02-25 Roger Sayle <roger@eyesopen.com>
7492 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7493 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
7495 2003-02-23 Tom Tromey <tromey@redhat.com>
7497 * lang-options.h: Added -Wdeprecated.
7498 * gcj.texi (Warnings): Document -Wdeprecated.
7499 * java-tree.h (flag_deprecated): Declare.
7500 * lang.c (lang_W_options): Added deprecated.
7501 (flag_deprecated): New global.
7502 * chartables.h: Rebuilt.
7503 * gen-table.pl (process_one): Look at whitespace.
7504 (print_tables): Define LETTER_SPACE, LETTER_MASK.
7505 * parse.h (CLEAR_DEPRECATED): New macro.
7506 (CHECK_DEPRECATED_NO_RESET): New macro.
7507 * jcf-parse.c (handle_deprecated): New function.
7508 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
7509 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7510 * parse.y (resolve_type_during_patch): Check deprecation.
7511 (jdep_resolve_class): Likewise.
7512 (process_imports): Likewise.
7513 (resolve_expression_name): Likewise.
7514 (check_deprecation): Strip arrays from decl. Check
7516 (patch_method_invocation): Also check the particular constructor
7518 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7519 * jcf-write.c (append_deprecated_attribute): New function.
7520 (generate_classfile): Generate deprecated attribute when
7522 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
7523 (java_lex) [case '*']: Simplify logic.
7524 (java_start_char_p): Use LETTER_MASK.
7525 (java_part_char_p): Likewise.
7526 (java_space_char_p): New function.
7528 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
7530 Change base class access representation.
7531 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7532 (add_interface_do): Likewise.
7534 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
7536 * decl.c (java_init_decl_processing): Change
7537 soft_lookupjnimethod_node to reflect the change in
7538 signature of _Jv_LookupJNIMethod in libjava/jni.cc
7539 * expr.c (build_jni_stub): Calculate and pass the size
7540 on the stack of the arguments to a JNI function. Use
7541 new target macro MODIFY_JNI_METHOD_CALL to allow a
7542 target to modify the call to a JNI method.
7544 2003-02-08 Roger Sayle <roger@eyesopen.com>
7546 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7547 instead of basename to avoid compiler warnings on Tru64.
7549 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
7551 * gcj.texi: Update to GFDL 1.2.
7553 2003-01-31 Andrew Haley <aph@redhat.com>
7555 * parse.y (java_expand_classes): Scan the whole class list looking
7556 for access methods that haven't yet been expanded.
7558 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
7562 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
7563 to fix bootstrap on sparc-unknown-netbsdelf1.5.
7564 * jcf-parse.c: Likewise.
7566 2003-01-31 Mark Wielaard <mark@klomp.org>
7568 * gjavah.c (throwable_p): Allocate 1 more byte for string.
7570 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
7572 * class.c (make_class): Use BINFO_ELTS.
7573 (set_super_info): Likewse.
7574 (add_interface_do): Likewise.
7576 2003-01-30 Tom Tromey <tromey@redhat.com>
7578 * jcf-parse.c (read_class): Update identifier's class value if it
7579 changed during parsing.
7581 2003-01-30 Loren James Rittle <ljrittle@acm.org>
7583 * Make-lang.in (po-generated): Find the targets in $(parsedir).
7584 Propagate change to all other rules as required.
7585 (java/parse-scan.o): Add explicit dependency on
7586 $(parsedir)/java/parse-scan.c .
7588 2003-01-29 Tom Tromey <tromey@redhat.com>
7590 * parse.y (patch_assignment): Only transform the rhs of an
7591 assignment when compiling to native.
7593 2003-01-28 Tom Tromey <tromey@redhat.com>
7595 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
7597 2003-01-28 Tom Tromey <tromey@redhat.com>
7599 * lex.c (java_lex): Don't include UEOF as part of token.
7600 (java_read_unicode): Error if \u sequence prematurely terminated.
7602 2003-01-27 Tom Tromey <tromey@redhat.com>
7604 * parse.y (java_check_regular_methods): Check for construct after
7605 checking types in throws clause.
7607 2003-01-24 Tom Tromey <tromey@redhat.com>
7609 * class.c (build_static_field_ref): Only a String or numeric field
7610 can fold to a constant.
7612 2003-01-23 Tom Tromey <tromey@redhat.com>
7614 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
7615 file name in resource buffer.
7617 2003-01-23 Tom Tromey <tromey@redhat.com>
7619 * expr.c (build_known_method_ref): Use method's context to find
7622 2003-01-23 Tom Tromey <tromey@redhat.com>
7624 * constants.c (set_constant_entry): Allocated cleared memory.
7626 2003-01-22 Tom Tromey <tromey@redhat.com>
7628 * java-tree.h: Don't use PARAMS.
7629 * resource.c: Add prototypes for all functions.
7630 (write_resource_constructor): Use `const char *' to avoid
7633 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
7635 * jcf-parse.c (process_zip_dir): Remove unused variable.
7637 2003-01-22 Tom Tromey <tromey@redhat.com>
7639 * expr.c (build_invokeinterface): Abort if method's context is not
7642 2003-01-22 Tom Tromey <tromey@redhat.com>
7644 * gcj.texi (Input and output files): Mention non-class entries.
7645 * decl.c (java_init_decl_processing): Call
7646 init_resource_processing.
7647 * java-tree.h (compile_resource_data, write_resource_constructor,
7648 compile_resource_file, init_resource_processing): Declare.
7649 * config-lang.in (gtfiles): Added resource.c.
7650 * Make-lang.in (gt-java-resource.h): New target.
7651 (JAVA_OBJS): Added resource.o.
7652 (java/resource.o): New target.
7653 * resource.c: New file.
7654 * class.c (compile_resource_file): Moved to resource.c.
7655 (registerResource_libfunc): Likewise.
7656 (utf8_decl_list): Mark with GTY; now static.
7657 * jcf-parse.c (classify_zip_file): New function.
7658 (parse_zip_file_entries): Use it; compile .properties files.
7659 (process_zip_dir): Use classify_zip_file and compute_class_name.
7660 Don't write class name into zip directory.
7661 (java_parse_file): Call write_resource_constructor.
7662 (compute_class_name): New function.
7663 * jcf-io.c (read_zip_member): Reindented.
7665 2003-01-21 Tom Tromey <tromey@redhat.com>
7667 * class.c (supers_all_compiled): New function.
7668 (make_class_data): Use it.
7670 2003-01-21 Tom Tromey <tromey@redhat.com>
7672 * parse.y (method_header): Native method can't be strictfp.
7673 No method can be transient or volatile.
7675 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7677 Make-lang.in (jvspec.o-warn): Add -Wno-error.
7679 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
7681 * check-init.c: Fix comment typos.
7682 * class.c: Likewise.
7683 * constants.c: Likewise.
7685 * except.c: Likewise.
7687 * java-except.h: Likewise.
7688 * java-tree.h: Likewise.
7689 * javaop.h: Likewise.
7690 * jcf-dump.c: Likewise.
7691 * jcf-io.c: Likewise.
7692 * jcf-parse.c: Likewise.
7693 * jcf-write.c: Likewise.
7695 * mangle.c: Likewise.
7696 * typeck.c: Likewise.
7697 * verify.c: Likewise.
7699 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7701 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
7702 * jcf-write.c: Include "tm_p.h".
7704 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7706 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
7708 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7710 * builtins.c (java_build_function_call_expr): Renamed from
7711 build_function_call_expr. All callers changed.
7713 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
7714 * jcf-parse.c: Include tm_p.h.
7716 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
7719 2003-01-14 Tom Tromey <tromey@redhat.com>
7721 * class.c (make_class_data): Check that super is compiled before
7722 building class reference to it.
7724 2003-01-14 Andrew Haley <aph@redhat.com>
7726 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7727 varargs function -- correct.
7729 2003-01-14 Andrew Haley <aph@redhat.com>
7731 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
7733 2003-01-14 Andrew Haley <aph@redhat.com>
7735 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7736 varargs function -- correct.
7738 * parse.y (patch_assignment): Copy the rhs of an assignment into a
7739 temporary if the RHS is a reference.
7741 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7743 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
7744 * keyword.h: Regenerated.
7746 * All Files: Convert to ISO C style function definitions.
7748 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
7750 * parse.y (check_pkg_class_access): ANSIfy definition.
7752 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7754 * decl.c, parse-scan.y, parse.y: Don't cast return value of
7757 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
7759 2003-01-09 Geoffrey Keating <geoffk@apple.com>
7761 Merge from pch-branch:
7763 2002-12-02 Geoffrey Keating <geoffk@apple.com>
7765 * Make-lang.in (java/gjavah.o): Update dependencies.
7766 * gjavah.c: Include ggc.h.
7768 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
7770 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
7771 (JCFDUMP_OBJS): Add ggc-none.o.
7772 (java/jcf-dump.o): Depend on GGC_H.
7773 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
7774 CPool substructures.
7775 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
7776 * jcf-dump.c: Include ggc.h.
7778 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
7780 * jcf.h (union cpool_entry): New.
7781 (struct CPool): Use gengtype to mark. Change field 'data' to be
7783 (struct JCF): Use gengtype to mark.
7784 (CPOOL_UINT): Update for new cpool_entry type.
7785 (CPOOL_USHORT1): Likewise.
7786 (CPOOL_USHORT2): Likewise.
7787 (CPOOL_FINISH): Use GC to free cpool subfields.
7788 * parse.h (struct parser_ctxt): Mark field current_jcf.
7789 * lex.c (java_init_lex): Use GC to allocate struct JCF.
7790 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
7791 (main_jcf): Use gengtype to mark.
7792 (ggc_mark_jcf): Delete.
7793 (get_constant): Update for new cpool_entry type.
7794 (give_name_to_class): Likewise.
7795 (get_class_constant): Likewise.
7796 (init_outgoing_cpool): Use GGC to allocate struct CPool.
7797 (java_parse_file): Use GGC to allocate struct JCF.
7798 (init_jcf_parse): Don't call ggc_add_root.
7799 * jcf-reader.c (jcf_parse_constant_pool): Update for new
7801 * java-tree.h (current_jcf): Use gengtype to mark.
7802 (CPOOL_UTF): Update for new cpool_entry type.
7803 (outgoing_cpool): Use gengtype to mark.
7804 (struct lang_type): GC struct JCF and struct CPool.
7805 * config-lang.in (gtfiles): Add jcf.h.
7806 * constants.c (find_tree_constant): New.
7807 (set_constant_entry): Allocate cpool subfields using GGC. Update
7808 for new cpool_entry type.
7809 (find_constant1): Update for new cpool_entry type.
7810 (find_constant2): Likewise.
7811 (find_utf8_constant): Use find_tree_constant.
7812 (find_class_or_string_constant): Remove unnecessary cast to jword.
7813 Update for new cpool_entry type.
7814 (count_constant_pool_bytes): Update for new cpool_entry type.
7815 (write_constant_pool): Likewise.
7816 (alloc_name_constant): Use find_tree_constant.
7817 (build_constants_constructor): Update for new cpool_entry type.
7819 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
7821 * parse.y (mark_parser_ctxt): Delete.
7822 (goal): Don't use ggc_add_root.
7823 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
7824 (java_pop_parser_context): Let GC free parser_ctxt.
7825 (java_parser_context_resume): Likewise.
7826 * parse.h (struct parser_ctxt): Use gengtype to mark.
7828 (ctxp_for_generation): Likewise.
7829 * lex.h (struct java_lc_s): Mark for gengtype.
7830 (java_lexer): Rearrange for gengtype.
7831 * config-lang.in (gtfiles): Add lex.h, parse.h.
7833 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7835 * All Files: Remove PARAMS macro.
7837 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
7838 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
7841 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
7844 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
7846 * Make-lang.in (java.install-common, java.uninstall,
7847 java.install-info, java.install-man): Prepend $(DESTDIR)
7848 to destination paths in all (un)installation commands.
7849 (java.install-common): Rewrite $(LN) command to support
7850 DESTDIR with "ln" as well as with "ln -s".
7852 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
7854 * java-tree.h: Protect against multiple inclusion.
7856 2003-01-07 Tom Tromey <tromey@redhat.com>
7858 * class.c (add_assume_compiled): Don't adjust parent if we're
7859 already at the root of tree.
7861 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7863 * lang.c (dump_compound_expr): Prototype.
7865 2003-01-03 Tom Tromey <tromey@redhat.com>
7867 Fix for PR java/8712:
7868 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
7869 when simply checking against `null'.
7871 2003-01-03 Tom Tromey <tromey@redhat.com>
7873 * gcj.texi (Standard Properties): Document http.proxyHost and
7876 * gcj.texi (GNU Classpath Properties): Document new properties.
7878 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7880 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
7881 java/lang-options.h, java/mangle.c, java/mangle_name.c,
7882 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
7884 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7886 * Make-lang.in, boehm.c, buffer.c,
7887 buffer.h, builtins.c, class.c,
7888 config-lang.in, constants.c,
7889 convert.h, decl.c, except.c,
7890 expr.c, java-except.h,
7891 java-tree.h, javaop.def,
7892 jcf-parse.c, jcf-write.c,
7893 jv-scan.c, jvgenmain.c,
7894 jvspec.c, keyword.gperf,
7895 keyword.h, lang-options.h,
7896 lang-specs.h, lang.c, lex.c,
7897 lex.h, mangle.c, mangle_name.c,
7898 parse-scan.y, parse.h, parse.y,
7899 typeck.c, verify.c, xref.c,
7900 xref.h: Replace "GNU CC" with
7901 "GCC" in the copyright header.
7903 * check-init.c, gjavah.c, javaop.h,
7904 jcf-depend.c, jcf-dump.c, jcf-io.c,
7905 jcf-path.c, jcf-reader.c, jcf.h,
7906 zextract.c, zipfile.h: These files are
7907 "part of GCC". Also say "GCC" not "GNU CC".
7909 2002-12-30 DJ Delorie <dj@redhat.com>
7911 * Make-lang.in: Protect against texi2pod/pod2man failing.
7913 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
7915 * gcj.texi: Use @copying.
7917 2002-12-27 Mark Mitchell <mark@codesourcery.com>
7919 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
7920 print_cxx_classname.
7921 (print_cxx_classname): Add add_scope parameter.
7922 (print_class_decls): Do not emit a semicolon after the extern
7924 (process_file): Adjust calls to print_cxx_classname.
7926 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
7928 * gcj.texi: Include Cover Texts in man page.
7930 2002-12-23 Jeff Sturm <jsturm@one-point.com>
7932 * class.c (build_static_field_ref): Check FIELD_FINAL.
7934 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
7935 instead of current_constant_pool_data_ref.
7936 * java-tree.h (current_constant_pool_data_ref): Undefine.
7937 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
7938 * jcf-parse.c (init_outgoing_cpool): Don't initialize
7939 current_constant_pool_data_ref.
7941 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
7942 not build_internal_class_name.
7944 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
7945 Use it when class ref isn't certain to be compiled.
7947 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
7949 * gcj.texi: Include gcc-common.texi.
7950 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
7951 $(srcdir)/doc/include/gcc-common.texi.
7953 2002-12-22 Anthony Green <green@redhat.com>
7955 * gcj.texi (Limitations): Add note about org.xml.sax and
7958 2002-12-20 Tom Tromey <tromey@redhat.com>
7960 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
7961 where minimum case value is Integer.MIN_VALUE.
7964 2002-12-18 Andrew Haley <aph@redhat.com>
7966 * parse.y (patch_invoke): Force evaluation order when `check' is
7967 set. For PR libgcj/8945.
7969 2002-12-16 Mark Mitchell <mark@codesourcery.com>
7971 * gcj.texi: Change version number to 3.4.
7973 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
7974 Andrew Haley <aph@redhat.com>
7976 * parse.y (source_end_java_method): Remove custom encoding of line
7977 numbers for a function decl before passing it to the back end.
7979 2002-12-03 Andrew Haley <aph@redhat.com>
7981 * class.c (make_class_data): New field, "chain".
7982 * decl.c (java_init_decl_processing): Likewise.
7984 2002-12-02 Tom Tromey <tromey@redhat.com>
7987 * parse.y (do_resolve_class): Handle qualified name via
7990 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7992 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
7993 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
7994 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
7995 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
7996 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
7997 Include coretypes.h and tm.h.
7998 * Make-lang.in: Update dependencies.
8000 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8002 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8004 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8006 * jcf-reader.c: Don't expand JCF_readu4 inside the
8007 expansion of JCF_SKIP.
8009 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8011 * jcf-reader.c: Don't expand JCF_readu4 inside the
8012 expansion of JCF_SKIP.
8014 2002-11-22 Tom Tromey <tromey@redhat.com>
8016 * parse.y (patch_binop): Cast right hand side of shift expression
8017 to `int'. Fixes PR java/8676.
8019 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
8020 Andrew Haley <aph@redhat.com>
8022 * gcc/java/jcf-write.c (write_classfile): Remove target
8023 class file, if it exists, before renaming the temporary
8026 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
8028 * jvspec.c (lang_specific_spec_functions): New.
8030 2002-11-18 Tom Tromey <tromey@redhat.com>
8032 Fix for PR java/7912:
8033 * expr.c (can_widen_reference_to): Allow cast of array to
8034 Cloneable or Serializable.
8035 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8036 (java_io_serializable_identifier_node): Likewise.
8037 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8038 (valid_ref_assignconv_cast_p): Use new identifier nodes.
8039 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8040 java_io_serializable.
8041 * decl.c (java_init_decl_processing): Initialize
8042 java_lang_cloneable_identifier_node and
8043 java_io_serializable_identifier_node.
8044 (java_lang_cloneable_identifier_node): New global.
8045 (java_io_serializable_identifier_node): Likewise.
8047 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
8049 * buffer.c: Remove unnecessary casts.
8050 * check-init.c: Likewise.
8051 * class.c: Likewise.
8052 * constants.c: Likewise.
8054 * except.c: Likewise.
8055 * gjavah.c: Likewise.
8056 * jcf-io.c: Likewise.
8057 * jcf-parse.c: Likewise.
8058 * jcf-path.c: Likewise.
8059 * jvspec.c: Likewise.
8062 * verify.c: Likewise.
8064 2002-11-06 Tom Tromey <tromey@redhat.com>
8066 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8069 2002-11-05 Tom Tromey <tromey@redhat.com>
8071 Fix for PR java/6388.
8072 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8073 * java-tree.h (enum java_tree_index): New values
8074 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8075 (decimal_int_max, decimal_long_max): New defines.
8076 * lex.c (yylex): Rewrote range checking. Sign extend literals.
8077 (error_if_numeric_overflow): Rewrote range checking.
8078 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8081 2002-11-02 Tom Tromey <tromey@redhat.com>
8083 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8085 * class.c (make_method_value): Put class name, not signature, into
8086 `throws' field. For PR java/8415.
8088 2002-10-24 Tom Tromey <tromey@redhat.com>
8090 * gcj.texi (Invoking gij): Document --showversion.
8091 (Standard Properties): java.library.path now set.
8093 2002-10-23 Tom Tromey <tromey@redhat.com>
8095 * gjavah.c (decode_signature_piece): In JNI mode, print
8096 `jobjectArray' when array depth is nonzero.
8099 2002-10-15 Andrew Haley <aph@redhat.com>
8101 * parse.y (patch_invoke): Call force_evaluation_order on a static
8103 (resolve_qualified_expression_name): Call force_evaluation_order
8104 on a arg list that is part of a Qualified Expression Name.
8106 * lang.c (dump_compound_expr): New.
8107 (java_dump_tree): New.
8109 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
8111 * gcj.texi: Added item describing the GCJ runtime property
8114 2002-10-15 Richard Henderson <rth@redhat.com>
8116 * jcf-parse.c (get_constant): Fix type warning.
8118 2002-10-15 Andrew Haley <aph@redhat.com>
8120 * java-tree.h (java_inlining_merge_static_initializers): Declare.
8121 (java_inlining_map_static_initializers): Declare.
8123 2002-10-14 Andrew Haley <aph@redhat.com>
8125 * tree-inline.c (remap_block): All local class initialization
8126 flags go in the outermost scope.
8127 (expand_call_inline): Call java_inlining_map_static_initializers.
8128 (expand_call_inline): Call java_inlining_merge_static_initializers.
8129 * java/lang.c (merge_init_test_initialization): New.
8130 (java_inlining_merge_static_initializers): New.
8131 (inline_init_test_initialization): New.
8132 (java_inlining_map_static_initializers): New.
8134 2002-10-11 Mark Wielaard <mark@klomp.org>
8136 * gcj.texi (Compatibility): Add Limitations and Extensions section.
8138 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8140 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8142 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8144 * parse.y (merge_string_cste): Add parentheses around & within |.
8146 2002-10-08 Tom Tromey <tromey@redhat.com>
8148 * parse.y (variable_declarator_id): Simplify error path for
8149 array declarator error. For PR java/8003.
8151 2002-10-08 Zack Weinberg <zack@codesourcery.com>
8153 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8156 2002-10-08 Andrew Haley <aph@redhat.com>
8158 * parse.y (attach_init_test_initialization_flags): Check for
8161 2002-10-07 Anthony Green <green@redhat.com>
8163 * parse.y (merge_string_cste): Fix bug in string concatenation.
8165 2002-10-03 Michael Koch <konqueror@gmx.de>
8167 * gcj.texi (Standard properties):
8168 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8170 2002-10-02 Roger Sayle <roger@eyesopen.com>
8172 PR optimization/6627
8173 * lang.c (java_init): If storing the vbit in function
8174 pointers, ensure that force_align_functions_log is atleast
8175 one to aid compatability with g++ vtables.
8177 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
8179 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8180 foul of type-based aliasing.
8182 2002-09-30 Anthony Green <green@redhat.com>
8184 * gcj.texi (Invoking jv-scan): Fix texinfo.
8186 2002-09-28 Anthony Green <green@redhat.com>
8188 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8189 (Code Generation): Add -fno-assert documentation.
8190 * jv-scan.c (flag_assert): New global.
8191 (options): Add assert option.
8192 (help): Add --no-assert documentation.
8193 * parse-scan.y (flag_assert): New global.
8194 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8195 (flag_assert): New global.
8196 * java-tree.h (flag_assert): New global.
8197 * lex.c (java_lex): Obey flag_assert.
8198 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8201 2002-09-26 Andrew Haley <aph@redhat.com>
8203 * expr.c (build_java_array_length_access): Check for null pointer.
8204 * expr.c (expand_java_arrayload): Likewise.
8206 2002-09-21 Richard Henderson <rth@redhat.com>
8208 * jcf-parse.c (get_constant): Decode from IEEE no matter
8209 what the target format.
8211 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
8213 * ChangeLog: Follow spelling conventions.
8214 * class.c: Likewise.
8217 * gjavah.c: Likewise.
8218 * java-tree.h: Likewise.
8219 * jcf-dump.c: Likewise.
8220 * jcf-parse.c: Likewise.
8221 * jvspec.c: Likewise.
8223 * mangle.c: Likewise.
8224 * parse.y: Likewise.
8226 2002-09-17 Tom Tromey <tromey@redhat.com>
8228 * lex.c (java_read_unicode_collapsing_terminators): Handle case
8229 where \r appears at EOF. Fixes PR java/7950.
8231 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
8233 * jvspec.c (lang_specific_driver): Remove unused variable.
8235 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8237 * java-tree.h (union lang_tree_node): Add chain_next option.
8239 2002-09-16 Richard Henderson <rth@redhat.com>
8241 * jcf-parse.c (get_constant): Runtime check for IEEE format;
8242 use new real.h interface.
8243 * jcf-write.c (find_constant_index): Use new real.h interface.
8244 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8246 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8248 * lang.c: Follow spelling conventions.
8250 2002-09-11 Per Bothner <per@bothner.com>
8252 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
8253 constant to the type of the field.
8254 (java_complete_tree): Remove now-redundant code.
8256 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
8258 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
8261 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8262 return label if a ret instruction for the jsr has been reached.
8264 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
8266 * parse.y (DIR_SEPARATOR): Don't define.
8267 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8269 2002-08-28 Andrew Haley <aph@redhat.com>
8271 * verify.c (verify_jvm_instructions): Allow exception handler
8272 inside code that is being protected, but generate a warning.
8273 * except.c (link_handler): Initialize `expanded' in new eh_range.
8274 (binding_depth, is_class_level, current_pc): Declare extern.
8276 2002-09-01 Mark Wielaard <mark@klomp.org>
8278 * gcj.texi: Add chapter about system properties.
8281 2002-08-26 Tom Tromey <tromey@redhat.com>
8283 * parse.y (try_builtin_assignconv): Allow narrowing primitive
8284 conversion if RHS_TYPE is byte, short, or char.
8286 2002-08-22 Tom Tromey <tromey@redhat.com>
8288 * gcj.texi (Invoking gij): Document -cp and -classpath.
8290 2002-08-21 Tom Tromey <tromey@redhat.com>
8292 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8293 $(prefix)/share. For PR libgcj/7633.
8295 For PR java/6005 and PR java/7611:
8296 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8297 (java_can_use_bit_fields_p): New function.
8299 2002-08-16 Tom Tromey <tromey@redhat.com>
8301 * gcj.texi (Class Initialization): Mention class initialization of
8304 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
8306 * Make-lang.in (java-tree-inline.o): New.
8307 (JAVA_OBJS): Add java-tree-inline.o.
8308 * parse.y (source_end_java_method): Call java_optimize_inline.
8309 (java_expand_method_bodies): Save method's tree in
8311 (add_stmt_to_compound): Keep track of the number of statments.
8312 * lang.c (java_init): Enable flag_inline_trees.
8313 (java_post_options): If flag_inline_functions is on, enable
8314 flag_inline_trees instread.
8315 (decl_constant_value): New.
8316 (java_tree_inlining_walk_subtrees): New.
8317 * java-tree.h (DECL_NUM_STMTS): New macro.
8318 (java_optimize_inline): Declare.
8319 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8320 Handle a LABEL_EXPR.
8321 * decl.c (build_result_decl): If we already have a DECL_RESULT
8323 (dump_function): New.
8324 (java_optimize_inline): New.
8325 (dump_function): New.
8327 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
8330 * parse.y (build_assertion): Invert return from
8331 desiredAssertionStatus.
8333 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8335 * jcf-write.c (get_access_flags): Return correct access flags for
8336 private and protected inner classes.
8338 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8340 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8342 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8344 * mangle_name.c: Don't include obstack.h twice.
8345 * xref.c: Don't include obstack.h.
8347 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8349 * class.c: (permanent_obstack): Delete declaration.
8350 * constants.c: (permanent_obstack): Delete declaration.
8351 * except.c: (permanent_obstack): Delete declaration.
8352 * expr.c: (permanent_obstack): Delete declaration.
8353 * jcf-parse.c: (permanent_obstack): Delete declaration.
8354 (saveable_obstack): Delete declaration.
8355 * parse.h: (permanent_obstack): Delete declaration.
8356 * typeck.c: (permanent_obstack): Delete declaration.
8358 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
8360 * gcj.texi (version-gcc): Increase to 3.3.
8362 2002-07-22 Tom Tromey <tromey@redhat.com>
8364 * lex.c (java_lex): Check for `e' or `E' after 0.
8366 2002-07-21 Richard Henderson <rth@redhat.com>
8368 * lang.c (java_unsafe_for_reeval): New.
8369 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8371 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
8373 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8374 (jcf_path_init): Use GET_ENVIRONMENT.
8376 2002-07-10 Roger Sayle <roger@eyesopen.com>
8377 Zack Weinberg <zack@codesourcery.com>
8379 * builtins.c (initialize_builtins): Remove defines that
8380 handled C/C++ specific junk hereby removed from builtins.def.
8382 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
8384 * lang.c (java_post_options): Update prototype.
8386 2002-07-05 Roger Sayle <roger@eyesopen.com>
8388 * builtins.c (initialize_builtins): Ignore the additional
8389 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
8390 the builtins.def file.
8392 2002-07-01 Tom Tromey <tromey@redhat.com>
8395 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8398 2002-07-01 Roger Sayle <roger@eyesopen.com>
8400 * java/decl.c (builtin_function): Accept additional parameter.
8401 (java_init_decl_processing): Pass an additional NULL_TREE
8402 argument to builtin_function.
8404 2002-06-29 T.J. Mather <tjmather@maxmind.com>
8406 * gcj.texi: Fixed gcj invocation example so that it compiles.
8408 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8410 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8411 * parse.y (mark_parser_ctxt): Likewise.
8412 (check_modifiers, declare_local_variables): Avoid incorrect
8413 hardcoded constant 10.
8415 * lex.c (java_read_char): Avoid "comparison is always true"
8418 2002-06-25 Andreas Schwab <schwab@suse.de>
8420 * expr.c (JSR): Avoid undefined operation on PC.
8422 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8424 * decl.c (clear_binding_level): Const-ify.
8426 2002-06-13 Akim Demaille <akim@epita.fr>
8428 * parse.y (class_declaration, interface_declaration): Make sure
8429 all their rules have an action, in order to avoid meaningless `$$
8430 = $1' and their type clashes.
8432 2002-06-11 Tom Tromey <tromey@redhat.com>
8434 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8435 * parse-scan.y (statement_without_trailing_substatement): Added
8437 (assert_statement): New rule.
8438 * java-tree.h (struct lang_type) [assertions]: New field.
8439 (TYPE_USES_ASSERTIONS): New macro.
8440 (CLASS_USES_ASSERTIONS): Likewise.
8441 (FIELD_SYNTHETIC): New define.
8442 * lex.c (java_lval;): Added ASSERT_TK.
8443 * parse.y (ASSERT_TK): Added.
8444 (statement_without_trailing_substatement): Added assert_statement.
8445 (assert_statement): New rule.
8446 (build_assertion): New function.
8447 (maybe_generate_pre_expand_clinit): Create and initialize
8448 $assertionsDisabled.
8449 (lookup_package_type): Removed decl.
8450 * keyword.h: Rebuilt.
8451 * keyword.gperf (assert): New token.
8453 2002-06-10 Akim Demaille <akim@epita.fr>
8455 * parse.y (interface_type_list, class_member_declaration)
8456 (unary_expression_not_plus_minus): Remove duplicate %type.
8459 2002-06-09 Tom Tromey <tromey@redhat.com>
8461 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8463 * parse.y (method_header): Give error message in all cases.
8466 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8468 Don't use RTL inlining. Fix for PR java/6820.
8469 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8470 (flag_really_inline): New.
8471 (java_decode_option): Set flag_really_inline if -finline-functions
8473 (java_post_options): New function. Turn off inlining unless
8474 flag_really_inline is set.
8476 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8478 * gjavah.c (throwable_p): Accept argument as either a classname or
8479 signature fragment. Create null-terminated classname string for super
8480 when calling itself recursively.
8481 (decode_signature_piece): Skip first character from class name
8482 signature when calling throwable_p.
8484 2002-06-08 H.J. Lu (hjl@gnu.org)
8486 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8488 2002-06-04 Tom Tromey <tromey@redhat.com>
8490 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8492 2002-06-04 Michael Koch <konqueror@gmx.de>
8494 * gcj.texi (Input Options): Fixed typo.
8496 2002-06-04 Zack Weinberg <zack@codesourcery.com>
8498 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8499 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8500 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8501 and all now-pointless local variables. Rename other local
8502 variables to reflect their not being handles.
8504 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
8505 #if JCF_USE_STDIO blocks.
8507 * parse.y: Add missing semicolon at end of rule.
8509 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
8511 * check-init.c (attach_initialized_static_class): Delete, unused.
8512 * parse.y: Use htab_t instead of struct hashtable, update
8514 * java-tree.h: Include hashtab.h instead of hash.h.
8515 (struct lang_decl_func): Use htab_t, set up for gengtype.
8516 (struct init_test_hash_entry): Delete.
8517 (struct treetreehash_entry): New.
8518 (java_treetreehash_find): New
8519 (java_treetreehash_new): New prototype.
8520 (java_treetreehash_create): New prototype.
8521 (java_mark_tree): Delete prototype.
8522 (java_hash_hash_tree_node): Delete prototype.
8523 (java_hash_compare_tree_node): Delete prototype.
8524 (attach_initialized_static_class): Delete prototype.
8525 * expr.c (build_class_init): Update to use java_treetreehash
8527 (java_expand_expr): Update to use htab_t.
8528 (emit_init_test_initialization): Likewise.
8529 * decl.c (java_mark_tree): Delete.
8530 * class.c (init_test_hash_newfunc): Delete.
8531 (java_hash_hash_tree_node): Delete.
8532 (java_hash_compare_tree_node): Delete.
8533 (add_method_1): Update to use java_treetreehash functions.
8534 (JAVA_TREEHASHHASH_H): New macro.
8535 (java_treetreehash_hash): New function.
8536 (java_treetreehash_compare): New function.
8537 (java_treetreehash_find): New function.
8538 (java_treetreehash_new): New function.
8539 (java_treetreehash_create): New function.
8540 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8542 * Make-lang.in (java/parse.o): Depend on debug.h.
8543 * java-tree.h (struct lang_identifier): Use gengtype.
8544 (union lang_tree_node): New.
8545 (struct lang_decl_func): Use gengtype.
8546 (struct lang_decl_var): Likewise.
8547 (struct lang_decl): Likewise.
8548 * parse.y: Include debug.h.
8549 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8551 * lang.c (struct language_function): New dummy structure.
8553 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8554 descriminator for DECL_LANG_SPECIFIC.
8555 (struct lang_decl_func): Rename from struct lang_decl.
8556 (enum lang_decl_desc): New.
8557 (struct lang_decl): Make it a union. Update all the accessor macros.
8558 (struct lang_type): Use gengtype.
8559 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
8560 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
8561 are now the same size.
8562 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
8563 use discriminator to mark DECL_LANG_SPECIFIC.
8565 * Make-lang.in (gt-java-builtins.h): New rule.
8566 (java/builtins.o): Add dependency on gt-<filename>.h.
8567 * builtins.c: Use gengtype for roots.
8568 (union string_or_tree): Use gengtype.
8569 (struct builtin_record): Use gengtype.
8570 * config-lang.in (gtfiles): Add builtins.c.
8572 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
8573 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
8574 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
8575 gt-java-parse.h, gtype-java.h): Add rules to generate.
8576 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
8577 (class.o): Add dependency on gt-*.h.
8578 (constants.o): Likewise.
8581 (jcf-parse.o): Likewise.
8582 (jcf-write.o): Likewise.
8584 * config-lang.in (gtfiles): New.
8585 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8586 * constants.c: Replace uses of ggc_add_* with GTY markers.
8588 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8589 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8590 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
8591 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
8593 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
8595 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8596 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
8598 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8599 Include gtype-java.h.
8601 2002-06-02 Tom Tromey <tromey@redhat.com>
8603 Fix for PR java/5913:
8604 * parse.y (patch_binop): Call patch_string on op1.
8606 2002-06-02 Tom Tromey <tromey@redhat.com>
8608 Fix for PR java/1343, PR java/6336:
8609 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
8610 formatting. Changed return type.
8611 (anonymous_class_counter): Moved to top of file.
8612 (maybe_make_nested_class_name): Append number to class name for
8613 function-local classes.
8615 2002-05-28 Zack Weinberg <zack@codesourcery.com>
8617 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
8618 * Make-lang.in: Update dependency lists.
8620 2002-05-18 Mark Mitchell <mark@codesourcery.com>
8622 * gjavah.c (throwable_p): Do not free the name of the class after
8623 passing it to find_class.
8624 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
8625 * jcf-io.c (dirent.h): Include it.
8626 (fnmatch.h): Likewise.
8627 (compare_path): New function.
8628 (java_or_class_file): Likewise.
8629 (memoized_dirlist_entry): New type.
8630 (memoized_dirlist_lookup_eq): New function.
8631 (memoized_dirlists): New variable.
8632 (caching_stat): New function.
8633 (memoized_class_lookup_eq): New function.
8634 (memoized_class_lookups): Likewise.
8635 (find_class): Use memoized_class_lookups and caching_stat.
8636 * jcf.h (JCF_USE_SCANDIR): Define.
8637 * parse.y (java_expand_classes): Write the class files in reverse
8640 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8642 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
8644 2002-05-13 Mark Mitchell <mark@codesourcery.com>
8646 * jcf-write.c (write_classfile): Unlink the temporary file if it
8647 cannot be renamed. Use concat to build up the name of the
8650 2002-05-08 Mark Mitchell <mark@codesourcery.com>
8652 * jcf-write.c (write_classfile): Write the file to a
8653 temporary file and then rename it.
8655 2002-05-07 Tom Tromey <tromey@redhat.com>
8657 * gjavah.c (throwable_p): Use xstrdup, not strdup.
8659 Fix for PR java/1200:
8660 * gjavah.c (throwable_p): New function.
8661 (decode_signature_piece): Use it. A `WeakReference' isn't the
8664 (gcjh_streq): New function.
8666 2002-05-07 Andreas Jaeger <aj@suse.de>
8668 * parse.y (finish_for_loop): Fix if statement.
8670 2002-05-06 Tom Tromey <tromey@redhat.com>
8672 Fix for PR java/5941:
8673 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
8674 loop update expression.
8675 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
8676 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
8678 2002-05-04 Mark Wielaard <mark@klomp.org>
8681 * parse.y (build_string_concatenation): Return just op1 only when op2
8682 is null and op1 is a STRING_CST, otherwise always construct a
8685 2002-04-27 Tom Tromey <tromey@redhat.com>
8688 * parse.y (string_convert_int_cst): New function.
8689 (merge_string_cste): Use it.
8691 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
8693 * java-tree.h (java_parse_file): Update.
8694 (java_set_yydebug): Remove.
8695 * jcf-parse.c (yydebug): Remove.
8696 (java_set_yydebug): Die.
8697 (java_parse_file): Update.
8698 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8700 2002-04-24 Tom Tromey <tromey@redhat.com>
8703 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
8704 EXPR_WFL_QUALIFICATION of qual_wfl.
8706 2002-04-23 Per Bothner <per@bothner.com>
8708 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
8709 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
8710 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
8712 2002-04-23 Tom Tromey <tromey@redhat.com>
8715 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
8716 recognize `-fcompile-resource='.
8717 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
8720 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
8722 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
8723 paths. Fixes PR java/2791.
8725 2002-04-19 Andrew Haley <aph@redhat.com>
8727 * jcf-write.c (push_long_const): lo, hi: New variables.
8728 Use rshift_double to extract the high part of a 64-bit long.
8729 Use WORD_TO_INT to extract the low part.
8731 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
8732 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
8733 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
8735 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
8737 * typeck.c (incomplete_type_error): Remove.
8739 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8741 * class.c (make_class_data): Set DECL_ALIGN on static class data,
8742 for hash synchronization.
8743 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
8744 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
8747 2002-04-16 Mark Wielaard <mark@klomp.org>
8749 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
8752 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8754 Fix for PR java/6294:
8755 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
8758 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8760 Fix for PR java/6085:
8761 * parse.y (patch_method_invocation): Always use build_access_to_thisn
8762 to get enclosing "this" argument for inner-class constructor
8763 invocation. Pass correct arguments to build_access_to_thisn.
8765 2002-04-10 Andreas Jaeger <aj@suse.de>
8767 * gcj.texi (Input Options): Fix extdirs patch.
8769 2002-04-10 Anthony Green <green@redhat.com>
8771 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
8773 2002-04-09 Anthony Green <green@redhat.com>
8775 * gcj.texi (Input Options): Add --extdirs documentation.
8776 * jcf-dump.c (OPT_extdirs): New macro.
8777 (options): Add extdirs option.
8778 (help): Describe --extdirs.
8779 (main): Handle OPT_extdirs.
8780 * gjavah.c (OPT_extdirs): New macro.
8781 (options): Add extdirs option.
8782 (help): Describe --extdirs.
8783 (main): Handle OPT_extdirs.
8784 * jcf-path.c (jcf_path_init): Add extdirs support.
8785 (jcf_path_extdirs_arg): New function.
8786 (extensions): New variable to hold extensions path entries.
8787 * jvspec.c: Remove -fextdirs= when compiling main().
8788 * lang.c (java_decode_option): Handle -fextdirs=.
8789 * jcf.h (jcf_path_extdirs_arg): Declare new function.
8790 * Make-lang.in: Compile jcf-path with version info for use in
8791 identifying the appropriate libgcj.jar.
8793 2002-04-08 Tom Tromey <tromey@redhat.com>
8796 * .cvsignore: Added rmic.1 and rmiregistry.1.
8797 * gcj.texi (Top): Link to new nodes.
8798 (Invoking rmic): New node.
8799 (Invoking rmiregistry): Likewise.
8800 * Make-lang.in (java.generated-manpages): Added rmic.1 and
8802 (java.maintainer-clean): Likewise.
8803 ($(srcdir)/java/rmic.1): New target.
8804 ($(srcdir)/java/rmiregistry.1): Likewise.
8805 (java.install-man): Handle rmic.1 and rmiregistry.1.
8807 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8809 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
8810 Add note about handling uncaught exceptions. Add an exception handler
8813 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8815 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
8816 after using it to patch CALL_EXPR.
8818 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8820 * gcj.texi (Invocation): Document CNI invocation API.
8822 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
8824 * expr.c (truthvalue_conversion): Rename. Update.
8825 (expand_compare): Update.
8826 * java-tree.h (java_truthvalue_conversion): New.
8827 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8829 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8831 * java-tree.h (java_mark_addressable): New.
8832 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8833 * typeck.c (mark_addressable): Rename, update.
8835 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8837 * expr.c (build_java_binop): Update.
8838 * java-tree.h (java_signed_type, java_unsigned_type,
8839 java_signed_or_unsigned_type): Update.
8840 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8841 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8842 * parse.y (patch_binop): Update.
8843 * typeck.c (signed_or_unsigned_type, unsigned_type,
8844 signed_type): Update.
8846 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8848 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8849 (java_dummy_print): Remove.
8850 (lang_print_error): Rename. Exit early if inhibiting output.
8851 (inhibit_error_printing_function): New.
8852 (java_init): Don't set hook.
8853 (lang_init_source): Use new boolean.
8855 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
8857 * parse.y (do_resolve_class): Fix infinite recursion.
8859 2002-03-29 Tom Tromey <tromey@redhat.com>
8861 * parse.y (check_inner_circular_reference): Ignore incomplete
8864 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8866 * Make-lang.in (builtins.o): Update.
8867 * boehm.c (get_boehm_type_descriptor): Update.
8868 * builtins.c: Include langhooks.h.
8869 * decl.c (java_init_decl_processing): Update.
8870 * java-tree.h (java_type_for_mode, java_type_for_size): New.
8871 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
8873 * typeck.c (type_for_mode, type_for_size): Update.
8875 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
8877 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
8879 2002-03-28 Tom Tromey <tromey@redhat.com>
8881 * except.c (expand_end_java_handler): If the handler type is NULL,
8882 use java.lang.Throwable. Fixes PR java/5986.
8884 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
8886 Fix for PR java/4715:
8887 * jcf-parse.c (parse_source_file_3): New function.
8888 (read_class): Call it.
8889 (java_parse_file): Likewise.
8891 2002-03-28 Jan Hubicka <jh@suse.cz>
8893 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
8895 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8897 * parse.y (resolve_package): Initialize "decl".
8898 (lookup_package_type): Remove unused function.
8900 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8902 Fix for PR java/5993:
8903 * parse.y (resolve_package): Return the decl if resolution was
8904 successful. Don't special case "java.lang" and "java.lang.reflect"
8905 packages. Set type_name to the merged identifier.
8906 (resolved_qualified_expression_name): Print error using "name" if
8907 resolve_package returns NULL_TREE.
8909 2002-03-27 Tom Tromey <tromey@redhat.com>
8911 * expr.c (expand_invoke): Don't generate null pointer check if
8912 we're calling <init>.
8914 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8916 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
8918 * java-tree.h (java_lang_expand_expr): Similarly.
8919 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8920 (java_init): Don't set hook.
8922 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8924 Fix for PR java/5850:
8925 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
8926 context if field was not found in the current scope.
8927 * expr.c (lookup_field): Don't look in enclosing contexts.
8929 2002-03-26 Tom Tromey <tromey@redhat.com>
8931 Fix for PR java/5942:
8932 * parse.y (init_src_parse): Added sanity check.
8933 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
8936 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
8938 * decl.c (lang_mark_tree): Rename java_mark_tree.
8939 * java-tree.h (java_mark_tree): New.
8940 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8942 2002-03-25 Zack Weinberg <zack@codesourcery.com>
8944 * lex.c: Change java_perform_atof to take normal parameters
8945 instead of a pointer to a parameter block. Call it directly
8948 2002-03-22 Mark Wielaard <mark@klomp.org>
8950 Fix for PR java/5368:
8951 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
8952 when printing error message.
8954 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
8956 * decl.c (maybe_build_cleanup): Remove.
8958 2002-03-22 Tom Tromey <tromey@redhat.com>
8960 Andrew Haley <aph@cambridge.redhat.com>
8962 * expr.c (build_field_ref): Don't build a check if the field is a
8965 2002-03-21 Eric Blake <ebb9@email.byu.edu>
8967 Fix for PR java/6026:
8968 * lex.c (java_lex): Fix parsing of consecutive floats.
8970 2002-03-21 Tom Tromey <tromey@redhat.com>
8972 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
8975 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
8977 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8978 insert_block, getdecls, kept_level_p, global_bindings_p): New.
8980 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
8982 * gcj.texi: @code{gcj} becomes @command{gcj}.
8983 @code{gcc} becomes @command{gcc}.
8984 GcjRaw changed to gnu.gcc.RawData.
8986 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
8988 * decl.c (start_java_method): Use new hook.
8989 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8990 (java_init): Remove old hook.
8992 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
8994 * builtins.c (define_builtin): Do nothing if `type' is null.
8997 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8999 * parse.y (parser_check_super_interface): Fix error message
9002 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9004 * jcf-parse.c (get_constant): Delete unused variables.
9006 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9008 * java-tree.h (java_parse_file): New.
9009 * jcf-parse.c (yyparse): Rename java_parse_file.
9010 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9012 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9014 * parse.y (craft_constructor): Return the constructor decl.
9015 (java_expand_classes): Update comments.
9016 (lookup_method_invoke): Call fix_constructors immediately for
9017 anonymous class. Fixes PR java/5935.
9019 2002-03-15 Anthony Green <green@redhat.com>
9021 * jcf-parse.c (yyparse): Don't emit class registration
9022 constructor when compiling resource files.
9024 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9026 * lang.c (java_tree_code_type, java_tree_code_length,
9027 tree_code_name): Delete.
9028 (tree_code_type, tree_code_length, tree_code_name): Define.
9029 (java_init): Don't try to copy into the various tree_code
9032 2002-03-12 Tom Tromey <tromey@redhat.com>
9034 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9035 UTF-8, not UCS-2. Fixes PR java/5923.
9037 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9038 a call_expr wrapped in a convert. Fixes PR java/5848.
9040 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9042 * jcf-write.c (write_classfile): Improve error strings.
9044 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9046 * lex.c: Adjust comments to GNU standards.
9048 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9050 Fix for PR java/5902:
9051 * lex.c (java_lex): Fix parsing of literals.
9053 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9055 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9056 to prevent it getting evaluated twice in the store checking case.
9057 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9060 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9062 * decl.c (java_init_decl_processing): Make sure class_type_node
9063 alignment is not less than 64 bits if hash synchronization is enabled.
9065 2002-03-08 Per Bothner <per@bothner.com>
9067 * parse.y (java_complete_lhs): Check if patch_assignment
9068 returned an error-mark.
9070 * parse.y (try_builtin_assignconv): Don't special-case zero.
9072 2002-03-08 Per Bothner <per@bothner.com>
9074 Fix for PR java/5812.
9075 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
9076 here instead of in JSR macro. Likewise with load_type_state call.
9077 Do the latter on if the return_pc has been verified (the jsr returns).
9078 (JSR): Now just call build_java_jsr.
9080 2002-03-07 Jeff Sturm <jsturm@one-point.com>
9082 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9083 (java.install-common): Link native driver to
9084 JAVA_TARGET_INSTALL_NAME.
9086 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
9088 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9089 * builtins.c(sin_builtin): Likewise
9090 * builtins.c(sqrt_builtin): Likewise
9092 2002-03-03 Zack Weinberg <zack@codesourcery.com>
9094 * java/expr.c, java/jcf-parse.c, java/lex.c:
9095 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9096 REAL_ARITHMETIC blocks unconditional. Delete some further
9097 #ifdef blocks predicated on REAL_ARITHMETIC.
9099 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9101 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9102 explicit sizeof/sizeof.
9103 * decl.c (java_init_decl_processing): Likewise.
9104 * jcf-parse.c (init_jcf_parse): Likewise.
9105 * parse.y (init_src_parse): Likewise.
9107 2002-03-02 Per Bothner <per@bothner.com>
9109 Make --CLASSPATH by a synonym for --classpath and -classpath.
9110 Implement --bootclasspath.
9111 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
9112 (classpath_l): Remove.
9113 (jcf_path_CLASSPATH_arg): Remove.
9114 (jcf_path_bootclasspath_arg): New function.
9115 (jcf_path_seal): Simplify accordingly.
9117 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
9118 (jcf_path_CLASSPATH): Remove declaration.
9119 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
9120 (lang_specific_driver): Translate -bootclasspath.
9121 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
9122 * lang.c (decode_lang_options): Do jcf_path_init first.
9123 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
9124 * gjavah.c: Also handle --bootclasspath.
9125 Handle --CLASSPATH as a synonum for --classpath.
9126 * jcf-dump.c: Likewise.
9128 "." is not part of system path, but is the default for --classpath.
9129 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
9130 (jcf_path_seal): Add "." if no CLASSPATH specified.
9132 * gcj.texi: Document changes.
9134 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9136 * expr.c (build_java_arraystore_check): Fix formatting.
9138 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9140 Fix for PR java/5758, java/5632:
9141 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9142 inner-class separator too.
9143 * parse.y (do_resolve_class): New local `decl_result.'
9144 Progressively build a name for what can have been loaded.
9146 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9148 * expr.c (java_array_data_offset): Removed function.
9149 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9150 (build_java_array_length_access): Obtain "length" value using a
9151 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9152 (build_java_arrayaccess): Correct comment. Access "data" using a
9153 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9154 (build_java_arraystore_check): New function.
9155 (expand_java_arraystore): Use build_java_arraystore_check.
9156 * parse.y (patch_assignment): Simplify code to insert a store check
9157 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9158 * check-init.c (check_init): Update to reflect that an array length
9159 access is now a COMPONENT_REF.
9160 * gcj.texi (Code Generation): Improve documentation of
9161 -fno-bounds-check. Add documentation for -fno-store-check.
9162 * java-tree.h (flag_store_check): Declare.
9163 (build_java_arraystore_check): Declare.
9164 * lang.c (flag_store_check): Initialize to 1.
9165 (lang_f_options): Add store-check option.
9166 * jvspec.c: Don't pass store-check option to jvgenmain.
9167 * lang-options.h: Add help string for -fno-store-check.
9169 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9171 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9172 * java-tree.h (java_dup_lang_specific_decl): New.
9173 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9175 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9177 * builtins.c, decl.c: Delete traditional-mode-related code
9178 copied from the C front end but not used, or used only to
9179 permit the compiler to link.
9181 2002-02-22 Tom Tromey <tromey@redhat.com>
9183 Fix for PR java/2369:
9184 * jvspec.c (verify_class_name): New function.
9185 (lang_specific_driver): Call it.
9186 (JAVA_START_CHAR_P): New macro.
9187 (JAVA_PART_CHAR_P): Likewise.
9189 2002-02-22 Per Bothner <per@bothner.com>
9191 * class.c: Change vtable to be more compatible with g++ v3 abi.
9192 (get_dispatch_table): Prepend offset-to-top (always 0) and
9193 type_info pointer (currently unimplemented hence NULL) to vtable.
9194 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9195 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
9196 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9197 (build_dtable_decl): Add declarations for new fields.
9199 2002-02-20 Per Bothner <per@bothner.com>
9201 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9202 to finit$ (otherwise generate_bytecode_insns drops it). However, we
9203 don't need to set it on the COMPOUND_EXPR - the caller does that.
9205 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9207 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9208 `--CLASSPATH' becomes `--classpath.'
9209 * gjavah.c: Likewise.
9210 * jcf-dump.c: Likewise.
9211 * lang-options.h: Likewise.
9213 * jcf-path.c: Updated comment.
9214 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9215 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9216 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9217 (jcf_path_CLASSPATH_arg): Ditto.
9218 (classpath_u): Updated leading comment.
9220 2002-02-20 Per Bothner <per@bothner.com>
9222 * builtins.c (check_for_builtin): New function.
9223 (build_call_or_builtin): Remove.
9224 * java-tree.h: Update accordingly.
9225 * expr.c (expand_invoke): Use build + check_for_builtin instead
9226 of build_call_or_builtin.
9227 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
9228 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9229 flag (which had caused jcf-write to incorrectly emit invokevirtual).
9231 2002-02-17 Tom Tromey <tromey@redhat.com>
9233 * java-tree.h (TYPE_STRICTFP): New macro.
9234 (struct lang_type) [strictfp]: New field.
9235 (CLASS_STRICTFP): New macro.
9236 (METHOD_STRICTFP): New macro.
9237 (struct lang_decl) [strictfp]: New field.
9238 * parse.y (method_header): Disallow strictfp constructor or
9240 (STRICT_TK): Move before MODIFIER_TK.
9241 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9242 (METHOD_MODIFIERS): Likewise.
9243 (INTERFACE_MODIFIERS): Likewise.
9244 * jcf-write.c (get_access_flags): Likewise.
9245 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9246 (add_method_1): Likewise.
9247 (get_access_flags_from_decl): Likewise.
9248 * jcf-dump.c (print_access_flags): Print in standard order. Also,
9249 recognize strictfp flag.
9250 * jcf.h (ACC_STRICT): New define.
9252 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
9254 * class.c(build_utf8_ref): Move declaration of decl_size
9256 2002-02-07 Tom Tromey <tromey@redhat.com>
9258 * gcj.texi (Input Options): --CLASSPATH does not suppress system
9261 2002-02-04 Anthony Green <green@redhat.com>
9263 * class.c (build_utf8_ref): Put UTF-8 constants into merged
9264 sections if available.
9266 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9268 * parse.y (java_expand_classes): Fix typo in static field loop.
9270 2002-02-02 Richard Henderson <rth@redhat.com>
9272 * class.c (add_field): Mark static fields external.
9273 (build_class_ref): Remove redundant set.
9274 * parse.y (java_expand_classes): Mark static fields of classes
9275 to be compiled as local.
9276 * jcf-parse.c (parse_class_file): Likewise.
9278 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9280 * gcj.texi (About CNI): New node.
9282 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
9285 * jcf-parse.c : Check for HAVE_LOCALE_H before using
9286 setlocale() with LC_CTYPE as a parameter.
9289 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
9291 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9292 Follow GNU Coding Standards for --version.
9294 2002-01-28 Tom Tromey <tromey@redhat.com>
9296 * expr.c (build_jni_stub): Ensure storage for `meth' is
9298 * parse.y (java_complete_expand_methods): Set
9299 current_function_decl before building JNI stub.
9301 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9303 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9306 2002-01-22 Tom Tromey <tromey@redhat.com>
9308 * decl.c (java_init_decl_processing): Use add_predefined_file.
9309 Predefine RawData.java.
9310 (predef_filenames): Removed.
9311 (java_init_decl_processing): Don't register predef_filenames.
9312 * jcf-parse.c (add_predefined_file): New function.
9313 (predefined_filename_p): Rewrote.
9314 (predefined_filename_p): No longer static.
9315 * decl.c (java_init_decl_processing): Call initialize_builtins.
9316 * Make-lang.in (JAVA_OBJS): Added builtins.o.
9317 (java/builtins.o): New target.
9318 * builtins.c: New file.
9319 * parse.y (patch_invoke): Use build_call_or_builtin.
9320 * java-tree.h (build_call_or_builtin): Declare.
9321 (initialize_builtins): Declare.
9322 (java_set_exception_lang_code): Removed unused declaration.
9323 (PREDEF_FILENAMES_SIZE): Removed.
9324 (java_tree_index): Added JTI_PREDEF_FILENAMES.
9325 (predef_filenames): New define.
9326 (add_predefined_file): Declare.
9327 (predefined_filename_p): Declare.
9328 * expr.c (expand_invoke): Use build_call_or_builtin.
9330 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9332 * parse.y (patch_switch_statement): Fix format specifier.
9334 2002-01-16 Tom Tromey <tromey@redhat.com>
9336 More for PR java/5365:
9337 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9339 (process_file): Generate include for
9340 java.lang.UnsupportedOperationExceptions.
9342 2002-01-15 Andreas Jaeger <aj@suse.de>
9344 * .cvsignore: Add man pages.
9346 2002-01-15 Tom Tromey <tromey@redhat.com>
9348 Fix for PR java/5365:
9349 * gjavah.c (process_file): Turn class name into a file name.
9351 2002-01-14 Matthias Klose <doko@debian.org>
9353 * gcj.texi: Fix whitespace and formatting errors in the
9354 synopsis of the man pages. Update copyright.
9356 2002-01-14 Tom Tromey <tromey@redhat.com>
9359 * Make-lang.in (java.install-man): Handle jv-convert man page.
9360 (java.generated-manpages): Added jv-convert.1.
9361 (java.uninstall): Remove jv-convert.1.
9362 (java.maintainer-clean): Likewise.
9363 ($(srcdir)/java/jv-convert.1): New target.
9364 * gcj.texi (Top): Link to jv-convert node.
9365 (Individual utilities): Likewise.
9366 (Invoking jv-convert): New node.
9368 2001-01-10 Jeff Sturm <jsturm@one-point.com>
9369 Martin Kahlert <martin.kahlert@infineon.com>
9371 * jcf-parse.c (get_constant): Don't swap lo/hi for big
9372 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9374 2002-01-03 Graham Stott <grahams@redhat.com>
9376 * class.c (compile_resource_file): Update copyright date.
9377 Constify filename parameter.
9378 (java-tree.h): Update copyright date.
9379 (compile_resource_file): Constify filename parameter.
9381 2002-01-03 Graham Stott <grahams@redhat.com>
9383 * gcc/jcf-parse.c: Update copyright date.
9384 (yyparse): Constify resource_filename.
9386 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9388 * parse.y (src_parse_roots): Don't needlessly zero init.
9390 2001-12-31 Tom Tromey <tromey@redhat.com>
9392 * parse.y (dump_java_tree): New function.
9393 (source_end_java_method): Call it.
9394 (end_class_declaration): Likewise.
9395 * lang.c (java_decode_option): Call dump_switch_p.
9397 2001-12-28 Tom Tromey <tromey@redhat.com>
9399 * gen-table.pl: Don't process characters after \uffff. Added
9400 comment pointing to input file.
9402 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9404 * gen-table.pl: Const-ify output. Document the location of a
9405 suitable unicode input file.
9407 * chartables.h: Regenerate.
9409 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9411 * chartables.h: Const-ify.
9412 * gjavah.c (options): Likewise.
9413 * jcf-dump.c (options): Likewise.
9414 * jv-scan.c (options): Likewise.
9415 * lex.c (java_start_char_p, java_part_char_p): Likewise.
9416 * parse.y (binop_lookup): Likewise.
9418 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9420 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9421 the static arrays that are output.
9422 * jvspec.c (jvgenmain_spec): Make static.
9423 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9424 * keyword.h: Regenerate.
9425 * lang.c (string_option, process_option_with_no, lang_f_options,
9426 lang_W_options): Const-ify.
9427 * lex.c (java_lex): Likewise.
9429 2001-12-21 Richard Henderson <rth@redhat.com>
9431 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9432 (get_boehm_type_descriptor): ... here. Arrange for the
9433 TREE_TYPE to get set properly.
9435 2001-12-21 Richard Henderson <rth@redhat.com>
9437 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9438 only if the target requires collect2.
9440 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9442 2001-12-20 Tom Tromey <tromey@redhat.com>
9445 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9446 CAN_COMPLETE_NORMALLY for the node.
9447 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9448 generate code for second branch if first branch can't complete
9450 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9451 the loop head if the loop body can't complete normally.
9453 2001-12-20 Tom Tromey <tromey@redhat.com>
9456 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9457 case where `finally' clause can't complete normally.
9459 2001-12-20 Tom Tromey <tromey@redhat.com>
9462 * parse.y (analyze_clinit_body): Added this_class parameter.
9463 Check for more cases where we must keep <clinit>.
9464 (maybe_yank_clinit): Cleaned up flow control.
9466 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9468 * decl.c (java_init_decl_processing): Don't initialize
9469 finit_leg_identifier_node.
9470 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9471 (finit_leg_identifier_node): Remove.
9472 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9474 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9476 * mangle.c (mangle_member_name): Don't special-case for
9478 * mangle_name.c (unicode_mangling_length): Likewise.
9479 (append_unicode_mangled_name): Likewise.
9480 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9483 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9485 * expr.c (build_java_array_length_access): Don't force null pointer
9486 check unless flag_check_references is set.
9488 2001-12-20 Tom Tromey <tromey@redhat.com>
9490 Fix for PR java/3417:
9491 * parse.y (patch_assignment): Added special processing for
9493 (patch_return): Don't convert booleans to integers, and don't
9494 special-case `null'.
9496 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
9498 * config-lang.in (diff_excludes): Remove.
9500 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
9502 * gcj.texi: Update link to GCC manual.
9504 2001-12-17 Tom Tromey <tromey@redhat.com>
9506 * parse.y (link_nested_class_to_enclosing): Removed useless
9509 2001-12-16 Tom Tromey <tromey@redhat.com>
9511 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9514 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
9516 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9517 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9520 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9522 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9524 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9526 * decl.c (java_init_decl_processing): Build otable_type correctly.
9527 otable_decl is an otable_type.
9529 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9531 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
9532 otable_type, otable_ptr_type, method_symbol_type,
9533 method_symbols_array_type, method_symbols_array_ptr_type): New
9534 field/global tree definitions.
9535 (flag_indirect_dispatch): New flag.
9536 * decl.c (java_init_decl_processing): Initialize new otable and
9537 otable_syms type nodes and decls. Add new field "index" to
9539 * class.c (build_method_symbols_entry): New function.
9540 (make_method_value): Set "index" to to method's vtable index for
9541 virtual methods when indirect-dispatch is not used.
9542 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
9543 and set vtable_method_count to -1. Set otable and otable_syms field
9544 if indirect-dispatch is used and there was something to put in them.
9545 (build_method_symbols_entry): New function.
9546 (emit_offset_symbol_table): New function.
9547 * expr.c (get_offset_table_index): New function.
9548 (build_invokevirtual): Build array reference to otable at the index
9549 returned by get_offset_table_index, and use the result as the vtable
9551 (build_invokeinterface): Similar.
9552 * jcf-parse.c (yyparse): If indirect-dispatch, call
9553 emit_offset_symbol_table at the end of compilation, after all classes
9554 have been generated.
9555 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9556 * lang.c (flag_indirect_dispatch): Define.
9557 (lang_f_options): Add indirect-dispatch flag.
9559 2001-12-14 Matthias Klose <doko@debian.org>
9561 * gcj.texi: Markup for man page generation. Document missing
9562 options printed by <tool> --help.
9563 Terminate description of gij's -ms option with a dot.
9564 * Make-lang.in ($(srcdir)/java/*.1): New targets.
9565 (java.generated-manpages java.install-man, java.uninstall,
9566 java-maintainer-clean) Updated.
9568 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
9570 * class.c (get_dispatch_table): Fix java vtable layout
9571 for TARGET_VTABLE_USES_DESCRIPTORS.
9572 * decl.c (java_init_decl_processing): Initialize
9573 alloc_no_finalizer_node, finalize_identifier_node.
9574 * expr.c (class_has_finalize_method): New function.
9575 (expand_java_NEW): Generate calls for finalizer-free allocation.
9576 (build_invokevirtual): Fix java vtable layout for
9577 TARGET_VTABLE_USES_DESCRIPTORS.
9578 * java-tree.h (enum java_tree_index): New entries:
9579 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
9580 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
9581 (class_has_finalize_method): declare.
9582 (HAS_FINALIZER_P): New macro.
9583 * parse.y (patch_invoke): Generate calls for finalizer-free
9586 2001-12-12 Matthias Klose <doko@debian.org>
9588 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
9589 whitespace at end of line.
9591 2001-12-11 Tom Tromey <tromey@redhat.com>
9593 * lex.c (java_init_lex): Define wfl_to_string as
9594 gnu.gcj.runtime.StringBuffer unless generating bytecode.
9596 2001-12-11 Jeff Sturm <jsturm@one-point.com>
9598 * class.c (make_method_value): Use null_pointer_node to
9599 represent empty exception table.
9601 2001-12-10 Tom Tromey <tromey@redhat.com>
9603 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
9605 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
9607 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
9609 2001-12-09 Per Bothner <per@bothner.com>
9611 * check-init.c (current_switch_has_default): New static field.
9612 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
9613 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
9614 DEFAULT_EXPR seen, simulate a default alternative that copies state.
9616 2001-12-09 Tom Tromey <tromey@redhat.com>
9618 * check-init.c (check_init): Don't allow pre- or post- increment
9619 or decrement of final variable.
9620 (final_assign_error): Minor error message rewording.
9622 2001-12-08 Tom Tromey <tromey@redhat.com>
9624 * java-tree.h: Fixed typo.
9626 * gjavah.c (decompile_method): Don't decompile to `return this'
9629 * gjavah.c (cxx_keywords): Re-sorted.
9630 * lex.c (cxx_keywords): Re-sorted.
9632 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
9635 * gjavah.c (print_namelet): Clear subnamelets.
9636 (HANDLE_METHOD): Set `method_printed' earlier.
9638 2001-12-07 Tom Tromey <tromey@redhat.com>
9640 * lang.c (lang_f_options): Added
9641 optimize-static-class-initialization.
9642 (java_decode_option): Removed special case.
9644 2001-12-07 Per Bothner <per@bothner.com>
9646 * check-init.c (check_init): Fix typo freeing memory twice.
9648 2001-12-05 Per Bothner <per@bothner.com>
9650 Restore support for static class initialization optimization.
9651 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
9652 * check-init.c (check_int): At end of BLOCK handle initialization
9653 blocks, which used to be done in java_complete_expand_method but did
9654 not handle the case where check_for_initialization might allocate
9655 more than a word of bits.
9656 * decl.c (lang_make_tree): The smic field is now a tree.
9657 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
9658 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
9660 * parse.y (emit_test_initialization): Combine hash_lookup calls.
9662 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
9663 Change from a hash table to a list.
9664 (struct_lang_decl): Change field 'smic' to match.
9665 * class.c (add_method_1): Initialize
9666 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
9667 * parse.y (adjust_init_test_initialization): Removed - inlined into -
9668 (java_expand_method_bodies): -here, since 'smic' is now a list.
9669 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
9671 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
9673 * class.c (java_hash_compare_tree_node): Fix casts.
9675 2001-12-04 Per Bothner <per@bothner.com>
9677 * check-init.c: Handle definite unassignment to finals in addition
9678 to definite assignment.
9679 (loop_current_locals): New field.
9680 (num_current_locals, int start_current_locals, num_current_words):
9682 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
9683 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
9684 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
9685 (get_variable_decl, check_final_reassigned): New functions.
9686 (check_init, check_bool_init): Modify as needed for checking finals.
9687 (check_for_initialization): Take extra parameter and return void.
9688 Do extra start-up logic to check final fields for assignment.
9689 * parse.y (check_static_final_variable_assignment_flag,
9690 reset_static_final_variable_assignment_flag, check_final_assignment,
9691 check_final_variable_local_assignment_flag,
9692 reset_final_variable_indirect_assignment_flag,
9693 reset_final_variable_global_assignment_flag): Remove functions.
9694 (java_complete_expand_methods, outer_field_access_fix,
9695 patch_assignment): Remove no-longer used logic.
9696 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
9697 * parse.y (register_fields, java_complete_tree): Update accordingly.
9699 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
9700 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
9701 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
9703 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
9705 * java-tree.h (DECL FINAL): New bit-field.
9706 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
9707 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
9708 (DECL_INIT_CALLS_THIS): New macro.
9709 (struct lang_decl): New bit-field init_calls_this.
9710 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
9711 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
9712 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
9713 use it for both local variables and final fields.
9714 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
9716 (struct lang_type): Remove hfv bit-field.
9717 (check_for_initialization): Change to return void.
9719 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
9720 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
9721 * check-init.c (final_assign_error): New helper function.
9722 (check_final_reassigned, check_init): Use it.
9723 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
9725 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
9726 bit-fields to unsigned.
9728 2001-12-03 Per Bothner <per@bothner.com>
9730 * parse.y (patch_binop): Minor constant folding.
9732 * parse.y (build_current_thisn): Shorter 'buffer'.
9734 2001-12-03 Per Bothner <per@bothner.com>
9736 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
9737 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
9738 * jcf-write.c (generate_bytecode_insns): Remove support for
9739 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
9740 * check-init.c (check_init): Likewise.
9742 2001-12-03 Per Bothner <per@bothner.com>
9744 * verify.c (subroutine_nesting): New function.
9745 (verify_jvm_instructions): Use it to fix logic for checking that
9746 we're done with the current subroutine.
9748 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
9749 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
9751 2001-12-03 Per Bothner <per@bothner.com>
9753 * jcf.h: Fix obvious typo in comment.
9754 * typeck.c (build_null_signature): Add comment.
9756 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
9758 * expr.c: Remove leading capital from diagnostic messages, as
9759 per GNU coding standards.
9760 * jcf-io.c: Similarly.
9761 * jcf-parse.c: Similarly.
9762 * jv-scan.c: Similarly.
9763 * jvspec.c: Similarly.
9764 * mangle.c: Similarly.
9766 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
9767 Alexandre Petit-Bianco <apbianco@redhat.com>
9769 * expr.c (build_java_arrayaccess): Call save_expr on array for
9770 correct evaluation order, modified comment, fixed indentation.
9771 * parse.y: (patch_assignment): Correctly extract the array base
9772 from the tree generate by build_java_arrayaccess, added comments.
9773 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
9774 Fixes PR java/3096, PR java/3803, PR java/3965.
9776 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
9778 * expr.c (expand_byte_code): Remove trailing periods from messages.
9779 * jcf-parse.c (load_class, jcf_parse): Similarly.
9780 * jcf-write.c (generate_classfile): Similarly.
9781 * lex.c (java_lex): Similarly.
9783 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9785 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
9787 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
9789 * Make-lang.in (java.generated-manpages): New dummy target.
9791 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9793 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9795 (lang_specific_pre_link): Use set_input to set input_filename.
9797 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9798 (main): Fix definition.
9799 Strip `main' from classname.
9802 2001-11-18 Roger Sayle <roger@eyesopen.com>
9804 * parse.h (java_expand_switch): Remove old prototype.
9806 2001-11-18 Tom Tromey <tromey@redhat.com>
9808 Fix for PR java/1401:
9809 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
9811 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
9814 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
9816 * lang.c (finish_parse): Rename to java_finish.
9817 (LANG_HOOKS_FINISH, java_finish): New.
9819 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
9821 * decl.c (init_decl_processing): Rename java_init_decl_processing.
9822 * java-tree.h: New prototype.
9823 * lang.c (java_init): Update prototype. Combine with old init_parse.
9825 2001-11-13 Tom Tromey <tromey@redhat.com>
9827 * gjavah.c (method_signature): New global.
9828 (HANDLE_METHOD): Set it.
9829 (decompile_return_statement): New function.
9830 (decompile_method): Use it.
9831 (print_method_info): Removed `synth' argument.
9833 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9835 * java-tree.h (java_set_yydebug): New.
9836 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
9837 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
9838 (print_lang_decl, print_lang_type, print_lang_identifier,
9839 print_lang_statistics, lang_print_xnode): Remove.
9841 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9843 * jcf-parse.c (init_lex): Remove.
9844 * lang.c (language_string, lang_identify): Remove.
9845 (struct lang_hooks): Constify.
9846 (LANG_HOOKS_NAME): Override.
9847 (init_parse): Update.
9849 2001-11-08 Andreas Franck <afranck@gmx.de>
9851 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
9852 program_transform_name the way suggested by autoconf.
9853 (java.install-common): Also transform auxiliary program names with
9854 program_transform_name.
9856 2001-11-08 Tom Tromey <tromey@cygnus.com>
9858 * parse.y (trap_overflow_corner_case): New rule.
9859 (unary_expression): Use it.
9860 * lex.c (java_init_lex): Don't set minus_seen.
9861 (yylex): Don't use minus_seen. Communicate overflow to parser for
9863 (error_if_numeric_overflow): New function.
9864 * parse.h (minus_seen): Removed field.
9865 (JAVA_RADIX10_FLAG): New define.
9867 2001-11-07 Tom Tromey <tromey@redhat.com>
9869 Patch for PR java/1414:
9870 * parse.y (case_label_list): New global.
9871 (goal): Register case_label_list with GC.
9872 (java_complete_lhs): Save new case on case_label_list.
9873 (patch_switch_statement): Check for duplicate case labels.
9875 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9877 * parse.y (patch_assignment): Removed unused third argument.
9878 (java_complete_lhs): Removed unused third argument to patch_assignment.
9880 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9882 * lang.c: Include langhooks-def.h.
9883 * Make-lang.in: Update.
9885 2001-10-31 Zack Weinberg <zack@codesourcery.com>
9887 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9889 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9891 * mangle.c (find_compression_record_match): Don't match compression
9892 records for package name elements unless they occur at the start of
9893 the name. Fix for PR java/4717.
9895 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9897 * expr.c (expand_java_field_op): Don't special-case references to
9898 java.lang.PRIMTYPE.TYPE.
9899 (build_primtype_type_ref): Removed.
9900 * java-tree.h (build_primtype_type_ref): Remove prototype.
9901 * parse.y (maybe_build_primttype_type_ref): Removed.
9902 (complete_function_arguments): Don't special-case references to
9903 java.lang.PRIMTYPE.TYPE.
9904 (patch_assignment): Likewise.
9905 (array_constructor_check_entry): Likewise.
9907 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
9909 * mangle.c (static tree compression_table): Fixed leading comment.
9910 * parse.h (struct parser_ctxt): Fixed field comment.
9911 * parse.y (check_pkg_class_access): New prototype, fixed leading
9912 comment, new parameter used to emit error only if passed as true.
9913 (parse_check_super): Pass extra argument to check_pkg_class_access.
9914 (do_resolve_class): Likewise.
9915 (process_imports): Likewise.
9916 (read_import_dir): Fixed indentation.
9917 (find_in_imports_on_demand): New local class_type_name. Local
9918 node_to_use deleted. while loop changed into for loop. Report
9919 multiple definition only for accessible classes. Improved error
9921 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
9922 assigned to parameter list, fixed indentation. while loop changed
9923 into for loop, restore TREE_CHAIN on local `tem' before the next
9926 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9928 * lang.c (lang_get_alias_set): Deleted.
9930 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9932 * gjavah.c (jni_print_char): Fix thinko in last change.
9934 * gjavah.c (jni_print_char, decode_signature_piece): Use
9935 safe-ctype macros and/or fold extra calls into fewer ones.
9936 * lex.c (java_read_unicode, java_lex): Likewise.
9937 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
9938 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
9939 * mangle_name.c (append_unicode_mangled_name,
9940 unicode_mangling_length): Likewise.
9942 2001-10-17 Richard Henderson <rth@redhat.com>
9944 * Make-lang.in (java/lang.o): Depend on langhooks.h.
9946 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
9948 * lang.c (langhooks.h): Included.
9949 (LANG_HOOKS_INIT): Redefined.
9950 (LANG_HOOKS_INIT_OPTIONS): Likewise.
9951 (LANG_HOOKS_DECODE_OPTION): Likewise.
9952 (struct lang_hooks lang_hooks): New initialization.
9954 2001-10-11 Per Bothner <per@bothner.com>
9956 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
9957 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
9958 The former is simpler, and jcf-write.c handles it better.
9959 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
9960 or WITH_CLEANUP_EXPR.
9961 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
9962 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
9964 * parse.y (patch_if_else_statement): If the condition is constant,
9965 optimize away the test.
9967 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9969 * parse.y (patch_cast): Call patch_string on the first operand of
9970 the incoming node, update it if necessary. Fixes PR java/4510.
9972 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9974 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
9975 when name qualifier matches a package name.
9977 2001-10-08 Tom Tromey <tromey@redhat.com>
9979 Fix for PR java/4489:
9980 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
9981 force a new label when computing `body_block'.
9983 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9985 * jcf-io.c (format_uint): Const-ify.
9986 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
9987 * lex.c (java_get_line_col): Likewise.
9988 * parse.y (build_incdec): Likewise.
9990 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
9992 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
9993 a NULL enclosing context if appropriate. Fixes PR java/4466.
9995 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
9997 * parse.y (patch_assignment): Use lvalue's original TYPE when
9998 building the final COMPOUND_EXPR.
9999 (try_reference_assignconv): Fixed leading comment.
10001 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
10003 * parse.y (check_final_variable_indirect_assignment): For
10004 COMPOUND_EXPR, return only if finals were found initialized
10005 properly, if not, keep on checking.
10006 (check_final_variable_global_assignment_flag): New local
10007 error_found, set when appropriate and used to decide whether to
10008 report uninitialized finals. Fixed typo in comment.
10010 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10012 * decl.c (init_decl_processing): Fixed typo in predef_filenames
10013 last three initializations. Fixes PR java/4360.
10015 2001-09-21 Richard Henderson <rth@redhat.com>
10017 * class.c (get_dispatch_table): Handle function descriptors.
10018 (build_dtable_decl): Likewise.
10019 * expr.c (build_invokevirtual): Likewise.
10021 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10023 * parse.y (patch_method_invocation): Build class initialization
10024 when static finals are used to qualify method invocation.
10025 Fixes PR java/4366.
10027 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
10029 * parse.h: (WFL_STRIP_BRACKET): Re-written using
10030 build_type_name_from_array_name.
10031 (STRING_STRIP_BRACKETS): New macro.
10032 * parse.y (build_type_name_from_array_name): New function.
10033 (array_creation_expression:): Accumulate []s instead of [s.
10034 (cast_expression:): Accumulate []s instead of [s after cast type
10036 (build_array_from_name): Local string deleted, use
10037 build_type_name_from_array_name.
10038 (build_unresolved_array_type): Accumulate []s instead of [s after
10040 (register_fields): Fixed comment.
10041 (resolve_class): Local name, base deleted, new locals tname and
10042 array_dims. Use build_type_name_from_array_name. Use array_dims to
10044 (purify_type_name): Use STRING_STRIP_BRACKETS.
10046 2001-09-18 Andreas Jaeger <aj@suse.de>
10048 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10049 * jv-scan.c: Likewise.
10051 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10053 * parse.y (patch_method_invocation): Inner class creation context
10054 check not enforced within constructors. Fixes PR java/1873.
10056 2001-09-16 Tom Tromey <tromey@redhat.com>
10058 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10059 NOTE_PUSH for single-case push. Fixes PR java/4189.
10061 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10063 * java-tree.h (TYPE_IMPORT_LIST): New macro.
10064 (TYPE_IMPORT_DEMAND_LIST): Likewise.
10065 (struct lang_type): New fields import_list and import_demand_list.
10066 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10067 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10068 (do_resolve_class): New local saved_enclosing_type, initialized,
10069 passed as parameter to find_in_imports and find_in_imports_on_demand.
10070 (find_in_imports): Added paramater enclosing_type, use its
10071 TYPE_IMPORT_LIST when applicable.
10072 (find_in_imports_on_demand): Added parameter enclosing_type, use
10073 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10074 declaration and initialization.
10075 (fold_constant_for_init): Switch/restore current_class to the
10076 appropriate context.
10078 2001-09-13 Mark Mitchell <mark@codesourcery.com>
10080 * verify.c (verify_jvm_instructions): Fix typo.
10082 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10084 * expr.c (expand_invoke): Const-ification.
10085 * parse.y (patch_method_invocation): Likewise.
10087 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10089 * gjavah.c (cxx_keywords): Const-ification.
10090 * keyword.gperf (java_keyword): Likewise.
10091 * lang.c (java_tree_code_name): Likewise.
10092 * lex.c (cxx_keywords): Likewise.
10093 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10095 2001-09-11 Richard Henderson <rth@redhat.com>
10097 * parse.h (ctxp_for_generation): Mark extern.
10099 2001-09-10 Richard Henderson <rth@redhat.com>
10101 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10103 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10105 * typeck.c (java_array_type_length, build_prim_array_type):
10106 Represent empty arrays by NULL index.
10108 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
10110 * java-tree.h (compile_resource_file): Grouped with other prototypes.
10111 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10113 2001-09-06 Anthony Green <green@redhat.com>
10115 * class.c (O_BINARY): Define if necessary.
10116 (registerResource_libfunc): Declare.
10117 (init_class_processing): Initilize registerResource_libfunc.
10118 (compile_resource_file): New function.
10119 * java-tree.h (resource_name): Declare.
10120 (compile_resource_file): Declare.
10121 * jcf-parse.c (yyparse): Handle compiling java resource files.
10122 * lang.c (java_decode_option): Handle -fcompile-resource option.
10123 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10125 * gcj.texi (Code Generation): Add documentation for -R flag.
10127 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10129 * jcf-write.c (generate_classfile): Issue an error in case of
10130 field/initial value mismatch.
10131 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10132 being initialized and we're generating bytecode.
10133 (java_complete_lhs): In MODIFY_EXPR section: added comments,
10134 set DECL_INITIAL properly when appropriate.
10138 2001-09-01 Per Bothner <per@bothner.com>
10140 * parse.y (maybe_yank_clinit): A field without an initializer is not
10141 relevant. All initializers except static final and constant require
10142 <clinit>, regardless of flag_emit_class_files.
10144 2001-08-31 Per Bothner <per@bothner.com>
10146 * class.c (set_constant_value): When not emitting class files, then a
10147 String ConstantValue is a utf8const_ptr_type.
10149 2001-08-30 Per Bothner <per@bothner.com>
10151 * jcf-write.c (generate_classfile): Check that field is primitive
10152 or string before emitting ConstantValue attribute.
10154 2001-08-30 Per Bothner <per@bothner.com>
10156 * parse.y (resolve_qualified_expression_name): If creating a
10157 COMPOUND_EXPR, set it's type correctly.
10159 2001-08-30 Per Bothner <per@bothner.com>
10161 * jcf-io.c (open_class): Set filename field.
10163 * jcf-parse,c (parse_class_file): Set current_function_decl
10164 for better error message when Code attribute is missing.
10166 * lang.c (put_decl_node, lang_print_error): Re-arrange for
10167 better diagnostics, especially for constructors.
10169 2001-08-30 Per Bothner <per@bothner.com>
10171 * jcf-write.c (generate_classfile): Don't write ConstantValue
10172 attribute if field is not final, for compatibility with jdk.
10174 * jcf-write.c (generate_classfile): Convert ConstantValue values
10175 to correct type. Work-around for front-end bug.
10176 * class.c (set_constant_value): Error if constant has wrong type.
10178 2001-08-30 Per Bothner <per@bothner.com>
10180 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
10181 "Double" are printed at verbosity 1.
10183 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
10185 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
10187 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10189 * parse.y (patch_assignment): Don't verify final re-assignment here.
10190 (java_complete_lhs): Verify assignments to finals calling
10191 patch_assignment. Verify re-assignments to finals before calling
10194 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
10196 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10199 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
10201 * lex.c (java_lex): new local found_hex_digits. Set and then used
10202 in test to reject invalid hexadecimal numbers.
10203 * parse.y (java_complete_tree): Prevent unwanted cast with
10204 initialized floating point finals.
10205 (patch_binop): Emit a warning when detecting a division by zero,
10206 mark result not constant, don't simplify non integer division.
10208 2001-08-28 Per Bothner <per@bothner.com>
10210 * jcf-write.c (generate_bytecode_insns): For increments and
10211 decrements just recurse to push constant. Improvement on Mark's patch.
10213 2001-08-28 Mark Mitchell <mark@codesourcery.com>
10215 * jcf-write.c (generate_bytecode_insns): Generate an integer to
10216 real conversion for increments and decrements of reals.
10218 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10220 * parse.y (resolve_qualified_expression_name): Handle unresolved
10221 qualified expressions, prevent numerical qualifiers, fixed typo.
10224 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10226 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10227 don't report anything but deprecated class when marked so. Handle
10229 (patch_method_invocation): Check deprecation on methods and types.
10230 (patch_binop): code becomes an enum tree_code, added default: to
10231 switch to handle that. Detect division by zero, try to fold and
10232 return before using a subroutine.
10234 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10236 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10237 file smaller than 4 bytes.
10238 * parse.y (check_inner_circular_reference): New function.
10239 (check_circular_reference): Likewise.
10240 (array_initializer:): Accept {,}.
10241 (java_check_circular_reference): Rewritten using
10242 check_circular_reference and check_inner_circular_reference.
10243 (java_complete_expand_method): Unconditionally save and restore
10244 the unpurged exception list.
10245 (build_dot_class_method_invocation): Unmangle signature parameter.
10247 2001-08-21 Tom Tromey <tromey@redhat.com>
10249 * decl.c (init_decl_processing): Add `throws' field to method
10251 * class.c (make_method_value): Compute `throws' field for method.
10253 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10255 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10256 circularity is detected.
10257 (ctors_unchecked_throws_clause_p): Fixed leading comment.
10259 2001-08-17 Richard Henderson <rth@redhat.com>
10261 * class.c (emit_register_classes): Add align parameter to
10262 call to assemble_integer.
10264 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
10266 * jcf-parse.c (load_class): New locals saved and class_loaded. If
10267 loading a class_or_name fails, try considering an innerclass name
10268 and load the enclosing context.
10269 * parse.y (resolve_inner_class): New function.
10270 (find_as_inner_class): Added leading comment.
10271 (register_incomplete_type): Keep the current context as enclosing
10272 context for JDEP_FIELD dependencies.
10273 (do_resolve_class): Locals new_class_decl and super initialized to
10274 NULL. Call resolve_inner_class, explore the enclosing context
10275 superclass if necessary.
10278 2001-08-16 Tom Tromey <tromey@redhat.com>
10280 * jcf-dump.c (main): Updated for change to jcf_path_seal.
10281 * gjavah.c (main): Updated for change to jcf_path_seal.
10282 * lang.c (version_flag): New global.
10283 (java_decode_option): Recognize `-version'.
10284 (java_init): Update for change to jcf_path_seal.
10285 * jcf.h (jcf_path_seal): Added `print' argument.
10286 * jcf-path.c (jcf_path_seal): Added `print' argument.
10288 2001-08-13 Zack Weinberg <zackw@panix.com>
10290 * Make-lang.in (java/decl.o): Update dependencies.
10291 * decl.c: Include libfuncs.h, don't include toplev.h.
10293 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10295 * decl.c (init_decl_processing): exception_type_node,
10296 class_not_found_type_node, and no_class_def_found_type_node
10297 initialized. predef_filenames augmented accordingly.
10298 instinit_identifier_node initialized.
10299 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10300 * java-tree.h (enum java_tree_index): New entries
10301 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10302 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10303 (exception_type_node): New macro.
10304 (class_not_found_type_node): Likewise.
10305 (no_class_def_found_type_node): Likewise.
10306 (instinit_identifier_node): Likewise.
10307 (PREDEF_FILENAMES_SIZE): Adjusted.
10308 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10309 (struct lang_type): Fixed typo in bitfield name.
10310 (DECL_INSTINIT_P): New macro.
10311 (ID_INSTINIT_P): Likewise.
10312 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10314 * parse.y (encapsulate_with_try_catch): New function.
10315 (generate_instinit): Likewise.
10316 (build_instinit_invocation): Likewise.
10317 (ctors_unchecked_throws_clause_p): Likewise.
10318 (add_instance_initializer): Deleted.
10319 (build_instance_initializer): Likewise.
10320 (in_instance_initializer): Likewise.
10321 (check_method_redefinition): instinit$ not to be verified.
10322 (java_complete_expand_methods): Generate instinit$, simplified code.
10323 (build_dot_class_method): Eliminated unnecessary locals. Use
10324 encapsulate_with_try_catch, removed unnecessary code.
10325 (fix_constructors): New local iii. Use build_instinit_invocation.
10326 (patch_method_invocation): Added comment.
10327 (maybe_use_access_method): Don't consider instinit$.
10328 (find_applicable_accessible_methods_list): Shorten the search for
10330 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10331 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10332 (patch_throw_statement): Likewise. Fixed typo.
10334 2001-08-12 David Edelsohn <edelsohn@gnu.org>
10337 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10338 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10340 (lang_specific_pre_link): Use set_input to set input_filename.
10341 Append `main' here.
10342 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10343 (main): Fix definition.
10344 Strip `main' from classname.
10347 2001-08-11 Zack Weinberg <zackw@panix.com>
10349 * lex.h: Don't include setjmp.h. Don't define
10350 SET_FLOAT_HANDLER or prototype set_float_handler.
10352 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10354 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10355 `poplevel' in the right order.
10357 2001-08-09 Richard Henderson <rth@redhat.com>
10359 * Make-lang.in (class.o): Depend on TARGET_H.
10360 * class.c (emit_register_classes): Use target hooks instead of
10361 assemble_constructor and assemble_destructor.
10363 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
10365 * check-init.c (flags.h): Include
10366 (check_init): Don't report uninitialized static class
10367 initialization flags, don't free bit index when doing static class
10368 initialization optimization.
10369 (check_for_initialization): Return type changed to `unsigned int.'
10370 (attach_initialized_static_class): New function.
10371 * class.c (add_method_1): Create the initialized static class
10372 table if necessary.
10373 (finish_class): Always emit deferred inline methods.
10374 * decl.c (emit_init_test_initialization): Moved to expr.c
10375 (complete_start_java_method): Don't traverse
10376 DECL_FUNCTION_INIT_TEST_TABLE.
10377 (lang_mark_tree): Mark hash tables in function decls.
10378 * expr.c (emit_init_test_initialization): Moved from decl.c.
10379 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10380 initialization flag, set DECL_CONTEXT and
10381 LOCAL_CLASS_INITIALIZATION_FLAG.
10382 (java_lang_expand_expr): Emit initialization code for static class
10383 initialized flags when entering block, if necessary.
10384 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10385 * java-tree.h (flag_optimize_sci): New global variable declaration.
10386 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10387 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10388 (LOCAL_FINAL_P): Fixed typo in comment.
10389 (FINAL_VARIABLE_P): Likewise.
10390 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10391 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10392 (struct lang_decl): New fields `ict', `smic' and `cif.'
10393 (check_for_initialization): New returned value for global.
10394 (attach_initialized_static_class): New global function.
10395 (STATIC_CLASS_INIT_OPT_P): New macro.
10396 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10397 * lang.c (java_decode_option): Handle
10398 `-fno-optimize-static-class-initialization'
10399 * parse.y (start_complete_expand_method): New function.
10400 (java_expand_method_bodies): Likewise.
10401 (attach_init_test_initialization_flags): Likewise.
10402 (adjust_init_test_initialization): Likewise.
10403 (emit_test_initialization): Likewise.
10404 (java_complete_expand_methods): Nullify abstract and native method
10406 (java_complete_expand_method): New locals `fbody', `block_body'
10407 and `exception_copy.' Reorganized: directly return on empty method
10408 bodies, call `start_complete_expand_method', remember definitely
10409 initialized static class in function, don't expand method bodies.
10410 (java_expand_classes): Call `java_expand_method_bodies' before
10411 `finish_class' when compiling to native.
10412 (resolve_expression_name): Use `orig' after building outer class
10414 (patch_invoke): Remember static method invocations.
10416 2001-08-06 Richard Henderson <rth@redhat.com>
10418 * class.c (emit_register_classes): Pass a symbol_ref and priority
10419 to assemble_constructor.
10421 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
10423 * java-tree.h (all_class_filename): New macro.
10424 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10425 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10426 newly created IDENTIFIER_NODE to `all_class_filename.'
10428 2001-08-01 Jeff Sturm <jsturm@one-point.com>
10430 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10431 Use ggc_add_tree_root to register roots.
10433 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10435 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10436 second operand calling check_init.
10437 * decl.c (complete_start_java_method): Swaped second and third
10438 arguments while creating WITH_CLEANUP_EXPR node.
10439 * jcf-write.c (generate_bytecode_insns): Use second operand
10440 instead of third when handling WITH_CLEANUP_EXPR.
10441 * parse.y (java_complete_lhs): Expand second operand of
10442 WITH_CLEANUP_EXPR nodes.
10443 (patch_synchronized_statement): Swaped second and third arguments
10444 while creating WITH_CLEANUP_EXPR node.
10446 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
10448 * parse.y (create_interface): Avoid cyclic inheritance report when
10449 syntax error encountered during class definition.
10452 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10454 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10456 (lang_specific_pre_link): Use set_input to set input_filename.
10457 Append `main' here.
10458 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10459 (main): Fix definition.
10460 Strip `main' from classname.
10463 2001-07-18 Tom Tromey <tromey@redhat.com>
10466 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10467 * lex.c (java_new_lexer): Use ICONV_CONST.
10468 (java_read_char): Likewise.
10469 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10470 (jv-scan$(exeext)): Likewise.
10472 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10474 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10475 * parse.y (check_class_interface_creation): Allow `private' if the
10476 enclosing is not an interface.
10477 (create_interface): Interface tagged public if the enclosing
10478 context is an interface.
10479 (create_class): Class tagged public if the enclosing context
10483 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10485 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10488 2001-07-14 Tim Josling <tej@melbpc.org.au>
10490 * check-init.c (check_init): Remove references to EXPON_EXPR.
10492 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10494 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10495 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
10498 2001-07-13 Tom Tromey <tromey@redhat.com>
10500 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10503 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10505 * parse.y (patch_method_invocation): Don't override primary if one
10506 is already provided, but let this$<n> be built. Fixed comment.
10508 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10510 * parse.y (empty_statement:): Report empty statement error only
10511 when found at class declaration level.
10514 2001-07-12 Tom Tromey <tromey@redhat.com>
10516 * expr.c (expand_load_internal): New function.
10517 (LOAD_INTERNAL): Use it.
10519 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
10521 * parse.y (verify_constructor_super): Compare anonymous class ctor
10522 args with `valid_method_invocation_conversion_p.'
10525 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10527 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10528 `-fsyntax-only.' Fixes PR java/3248
10530 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10532 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10534 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10536 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10537 current function is static. Fixes PR java/1970
10539 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10541 * parse.y (patch_method_invocation): Add enclosing context to ctor
10542 calls if necessary. Fixes PR java/2953
10544 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10546 * parse.y (resolve_package): Abort if qualified expression member
10548 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10551 2001-07-07 Zack Weinberg <zackw@stanford.edu>
10553 * verify.c: Don't use // comments.
10555 2001-07-05 Tom Tromey <tromey@redhat.com>
10557 * lang.c (flag_assume_compiled): Removed.
10558 * java-tree.h (flag_assume_compiled): Removed.
10559 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
10560 -fhash-synchronization, -fuse-divide-subroutine,
10561 -fcheck-references, -femit-class-file, -femit-class-files,
10562 -fassume-compiled. Updated --encoding information. Changed
10563 -foutput-class-dir to `-d'.
10565 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
10567 * jcf-parse.c (parse_class_file): Add lineno parameter to
10568 debug_start_source_file call.
10570 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
10572 * gcj.texi: Use gpl.texi.
10573 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
10574 dependencies and use doc/include in search path.
10576 2001-07-03 Jeff Sturm <jsturm@one-point.com>
10578 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
10579 `this'. If so, don't build instance initializers.
10581 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
10583 * parse.y (resolve_expression_name): Improved error message for
10584 inner class cases. Fixes PR java/1958
10586 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
10588 * lang.c: #include diagnostic.h
10589 (lang_print_error): Add a `diagnostic_context *' parameter.
10590 (java_dummy_print): Likewise.
10591 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
10593 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10595 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
10596 * jcf.h (typedef struct JCF): New bitfield `finished.'
10597 (JCF_FINISH): Set `finished.'
10598 (JCF_ZERO): Reset `finished.'
10601 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10603 * parse.y (class_body_declaration:): Don't install empty instance
10607 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10609 * class.c (set_super_info): Call `set_class_decl_access_flags.'
10610 (set_class_decl_access_flags): New function.
10611 * java-tree.h (set_class_decl_access_flags): New prototype.
10612 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
10613 (parse_class_file): New local `decl_max_locals.' Take wide types
10614 into account to compute DECL_MAX_LOCALS.
10615 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
10618 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
10620 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
10622 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10624 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
10625 * parse.y (do_resolve_class): Moved comments out to leading comment
10626 section. Removed local `start', New local `_ht' and
10627 `circularity_hash.' Record `enclosing' in hash table and search
10628 it to detect circularity. Use `enclosing' as an argument to
10629 `lookup_cl.' Free the hash table when done.
10631 2001-06-19 Tom Tromey <tromey@redhat.com>
10633 * lex.c (java_read_char): Disallow invalid and overlong
10634 sequences. Fixes PR java/2319.
10636 2001-06-05 Jeff Sturm <jsturm@one-point.com>
10638 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
10640 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10642 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
10643 arguments accordingly.
10645 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
10647 * gcj.texi: Move contents to just after title page.
10649 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
10651 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
10653 (patch_incomplete_class_ref): Build the class ref, build the class
10654 init if necessary, complete the tree.
10657 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10659 * parse.y (lookup_field_wrapper): Test `name' code.
10660 (resolve_qualified_expression_name): Test `qual_wfl' code.
10661 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
10662 handle `qual_wfl' by code.
10663 (maybe_build_primttype_type_ref): Test `wfl' code.
10665 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10667 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
10669 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
10670 the dvi file in the java directory.
10672 2001-05-25 Sam TH <sam@uchicago.edu>
10674 * gen-table.pl javaop.h jcf.h lex.h,
10675 parse.h: Fix header include guards.
10677 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
10679 * jv-scan.c (version): Update copyright year.
10681 2001-05-21 Per Bothner <per@bothner.com>
10683 * jcf-parse.c (read_class): If class is from .class or .zip file
10684 and it's already been read, don't push/pop parser context.
10686 2001-05-18 Per Bothner <per@bothner.com>
10688 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
10689 command line so the jvgenmain-generated main program comes first.
10691 2001-05-15 Tom Tromey <tromey@redhat.com>
10693 * class.c (build_utf8_ref): Don't generate identifier based on
10694 utf8const contents.
10696 2001-05-12 Richard Henderson <rth@redhat.com>
10698 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
10699 * expr.c (java_lang_expand_expr): Expand it.
10700 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
10701 calling build_exception_object_ref.
10702 * parse.y (catch_clause_parameter): Likewise.
10703 (build_dot_class_method): Likewise.
10704 (try_reference_assignconv): Likewise.
10705 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
10706 * jcf-write.c (generate_bytecode_insns): Likewise.
10708 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10710 * parse.y (build_unresolved_array_type): Set
10711 EXPR_WFL_QUALIFICATION on the newly created wfl.
10712 Fixes PR java/2538. Fixes PR java/2535.
10714 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10716 * parse.y (fix_constructors): Removed unnecessary assignment to
10717 local. Moved assignment to `this$<n>', fixed comments and
10719 (build_wfl_wrap): Fixed indentation.
10720 Fixes PR java/2598, java/2579 and java/2658.
10722 2001-05-03 Mo DeJong <mdejong@redhat.com>
10724 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
10725 check for byte swap.
10727 2000-05-02 Jeff Sturm <jsturm@one-point.com>
10729 * expr.c (build_class_init): Move MODIFY_EXPR
10730 outside of COND_EXPR. Remove variable `call'.
10732 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10734 * decl.c: NULL_PTR -> NULL.
10735 * jcf-write.c: Likewise.
10737 2001-05-01 Tom Tromey <tromey@redhat.com>
10739 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
10740 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
10741 * gcj.texi: Updated copyright text. Include fdl.texi.
10742 (Top): Link to new node.
10744 2001-05-01 Per Bothner <per@bothner.com>
10746 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
10748 2001-05-01 Per Bothner <per@bothner.com>
10750 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
10751 import_list contains the name, not the TREE_PURPOSE.
10753 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10755 * jcf-io.c (read_zip_member): Cast to long in comparison with
10758 * jvspec.c (lang_specific_driver): Initialize variables.
10760 * mangle.c (find_compression_record_match): Likewise.
10762 * typeck.c (build_null_signature): Provide static prototype. Mark
10763 parameter with ATTRIBUTE_UNUSED.
10765 * verify.c (verify_jvm_instructions): Initialize variable.
10767 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10769 * parse.y (do_resolve_class): Check for cyclic inheritance during
10770 inner class resolution.
10772 2001-04-27 Per Bothner <per@bothner.com>
10774 * parse.y (java_expand_classes): Don't change ctxp_for_generation
10775 while iterating, since that could cause gc to lose stuff.
10777 2001-04-26 Per Bothner <per@bothner.com>
10779 Fix method search wrt scope of inner classes to match JLS2.
10780 * typeck.c (build_null_signature): New static function.
10781 (has_method): New function. Uses build_null_signature and lookup_do.
10782 * java-tree.h (has_method): New declaration.
10783 * parse.y (find_applicable_accessible_methods_list): Do not search
10784 context of inner classes here.
10785 (patch_method_invocation): Search scope, ie. current and outer clases,
10786 for method matching simple name, to find class.
10788 2001-04-26 Per Bothner <per@bothner.com>
10790 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
10791 Fix thinko: If a single case, use if_icmpeq, not ifeq.
10793 * constants.c (find_methodref_with_class_index): New function.
10794 (find_methodref_index): Use find_methodref_with_class_index.
10795 * java-tree.h (find_methodref_with_class_index): New declaration.
10796 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
10797 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
10798 If context changed from interface to class, don't use invokeinterface.
10800 2001-04-25 Per Bothner <per@bothner.com>
10802 * verify.c (verify_jvm_instructions): For field instructions,
10803 check that field index is valid. For invoke instructions, check that
10804 method index is valid.
10806 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
10808 * config-lang.in (target_libs): Copy from $libgcj_saved.
10810 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10812 * decl.c (init_decl_processing): Add new class "protectionDomain"
10814 * class.c (make_class_data): Set initial value for "protectionDomain".
10816 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10818 * jvspec.c (lang_specific_driver): Fix memory allocation
10819 deficit, by using concat in lieu of xmalloc/sprintf.
10821 2001-04-20 Per Bothner <per@bothner.com>
10823 Fixes to compile multiple .class files at once.
10824 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
10825 * java-tree.h (CLASS_PARSED_P): New macro.
10826 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
10827 * jcf-parse.c (jcf_parse_source): Inline into read_class.
10828 (read_class): Avoid some code duplication.
10829 Don't call JCF_FINISH for a .class file - might be needed later.
10830 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
10831 rather than CLASS_LOADED_P, since latter implies class laid out.
10832 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
10833 * parse.y: Don't need to set CLASS_LOADED_P for array types.
10835 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10837 * Make-lang.in (java/boehm.o): Depend on toplev.h.
10839 * boehm.c: Include toplev.h.
10841 2001-04-06 Tom Tromey <tromey@redhat.com>
10842 Alexandre Petit-Bianco <apbianco@redhat.com>
10844 Fix for PR gcj/1404 and PR gcj/2332:
10845 * parse.y (build_array_from_name): If we use the type_wfl then
10846 accumulate dimensions from the original type as well.
10847 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
10849 2001-04-06 Tom Tromey <tromey@redhat.com>
10851 * parse.y (analyze_clinit_body): Return true if the second operand
10852 of a METHOD_EXPR is nonzero.
10854 2001-04-06 Tom Tromey <tromey@redhat.com>
10856 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
10858 ($(srcdir)/java/parse.c): Likewise.
10860 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10862 * gcj.texi: Use `which-gcj' instead of `which-g77.'
10863 (version-gcc): Initialized.
10864 (which-gcj): Likewise.
10866 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10868 * java-tree.h (struct lang_decl): New macro
10869 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
10870 * parse.y (build_instance_initializer): New function.
10871 (add_instance_initializer): Use it.
10872 (java_fix_constructors): Set `current_class' before fix pass.
10873 (fix_constructors): Just return if already fixed. Move `super()'
10874 invocation ahead. Use `build_instance_initializer.'
10875 Fixes PR java/1315.
10877 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10879 * parse.y (resolve_qualified_expression_name): Pass field's
10880 DECL_CONTEXT to `not_accessible_p.'
10881 (not_accessible_p): Changed parameters order in `inherits_from_p'
10884 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
10886 * lang-options.h: Add flag_check_references.
10888 2001-04-04 Per Bothner <per@bothner.com>
10890 * java-tree.h (CONSTANT_VALUE_P): New macro.
10891 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
10892 * parse.y (maybe_build_class_init_for_field): New static function.
10893 (resolve_expression_name, resolve_field_access): Use
10894 maybe_build_class_init_for_field instead of build_class_init
10895 This does not do the init if the field is compile-time-constant.
10896 (resolve_field_access): Simplify.
10898 * parse.y (fold_constant_for_init): Merge test into switch.
10900 2001-04-03 Zack Weinberg <zackw@stanford.edu>
10902 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
10904 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
10906 2001-04-02 Zack Weinberg <zackw@stanford.edu>
10908 * expr.c (pop_type_0): Save the result of the first
10909 lang_printable_name call in a scratch buffer, so it
10910 won't be clobbered by the second call.
10912 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10914 * parse-scan.y (array_type:): Rewritten.
10915 (type_declaration:): `empty_statement' replaces `SC_TK.'
10916 (class_member_declaration:): `empty statement' added.
10917 (method_body:): Simplified.
10918 (static_initializer:): Likewise.
10919 (primary_no_new_array:): Use `type_literals.'
10920 (type_literals:): New rule.
10921 (dims:): Set and update `bracket_count.'
10922 Fixes PR java/1074. Fixes PR java/2412.
10924 2001-03-28 Hans Boehm <boehm@acm.org>
10926 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
10927 (get_boehm_type_descriptor): Set type on returned value to be a
10928 pointer length integer.
10930 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10932 * expr.c (pop_type_0): Call `concat' rather than building the
10934 (pop_type): Add format specifier in call to `error'.
10936 * parse.y (patch_method_invocation): Avoid casting away
10939 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
10941 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
10943 2001-03-28 Richard Henderson <rth@redhat.com>
10945 IA-64 ABI Exception Handling:
10946 * Make-lang.in (except.o): Don't depend on eh-common.h.
10947 * check-init.c (check_init): Handle EXC_PTR_EXPR.
10948 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
10949 [soft_exceptioninfo_call_node]: Remove.
10950 [eh_personality_libfunc, lang_eh_runtime_type]: New.
10951 (end_java_method): No emit_handlers.
10952 * except.c (java_set_exception_lang_code): Remove.
10953 (method_init_exceptions): Don't call it.
10954 (prepare_eh_table_type): No CATCH_ALL_TYPE.
10955 (build_exception_object_ref): New.
10956 (expand_end_java_handler): Update for except.h name changes.
10957 (emit_handlers, expand_resume_after_catch): Remove.
10958 * expr.c (java_lang_expand_expr): Update for except.h name changes.
10959 (process_jvm_instruction): Use build_exception_object_ref.
10960 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
10961 (soft_exceptioninfo_call_node): Remove.
10962 (build_exception_object_ref): Declare.
10963 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
10964 soft_exceptioninfo_call_node. Move processing ...
10965 [EXC_PTR_EXPR]: ... here.
10966 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
10967 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
10968 (source_end_java_method): No java_set_exception_lang_code or
10970 (build_dot_class_method): Use build_exception_object_ref.
10971 (try_reference_assignconv): Check EXC_PTR_EXPR not
10972 soft_exceptioninfo_call_node.
10974 2001-03-28 Richard Henderson <rth@redhat.com>
10976 * java-tree.h (throw_node): Define as a single member of
10977 java_global_trees instead of a separate array.
10978 (JTI_THROW_NODE): New.
10979 * decl.c (throw_node): Don't declare.
10980 (init_decl_processing): Init a scalar throw_node.
10981 Don't register it for gc.
10982 * check-init.c (check_init): Reference scalar throw_node.
10983 * expr.c (build_java_athrow): Likewise.
10984 * jcf-write.c (generate_bytecode_insns): Likewise.
10985 * parse.h (BUILD_THROW): Likewise.
10987 2001-03-28 Richard Henderson <rth@redhat.com>
10989 * decl.c (end_java_method): Do not save and restore
10990 flag_non_call_exceptions.
10991 * parse.y (source_end_java_method): Likewise.
10992 * lang.c (flag_exceptions): Don't declare.
10993 (java_init_options): Set flag_non_call_exceptions. Set
10994 flag_exceptions here ...
10995 (java_init): ... not here.
10997 2001-03-27 Richard Henderson <rth@redhat.com>
10999 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11000 exceptions_via_longjmp.
11002 * lang.c (flag_new_exceptions): Don't declare it.
11003 (java_init_options): Or set it.
11005 2001-03-27 Richard Henderson <rth@redhat.com>
11007 * decl.c (end_java_method): Rename asynchronous_exceptions to
11008 flag_non_call_exceptions.
11009 * parse.y (source_end_java_method): Likewise.
11011 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11013 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11015 2001-03-26 Mark Mitchell <mark@codesourcery.com>
11017 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11019 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
11021 * parse.y (find_as_inner_class): Follow current package
11022 indications not to mistakingly load an unrelated class.
11024 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11026 * constants.c (PUTN): Use memcpy, not bcopy.
11028 * lex.c (java_read_char): Use memmove, not bcopy.
11030 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11032 2001-03-23 Per Bothner <per@bothner.com>
11034 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
11035 macro for better error pin-pointing.
11036 * java-tree.h: Fix typo in comment.
11038 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
11039 Don't include jsr/goto in exception range.
11040 Check if start and end of exception range are the same (also TRY_EXPR).
11041 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11042 However, do emit the following goto even if try_block is empty.
11043 Defer freeing exception_decl until after the finalizer, to make
11044 sure the local isn't reused in the finalizer. Fixes PR java/1208.
11046 * parse.y (java_complete_lhs): If the try-clause is empty, just
11047 return the finally-clause and vice versa.
11049 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
11051 * gcj.texi (Input Options): documented the check for attribute
11052 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11053 * java-tree.h (flag_force_classes_archive_check): Declared extern.
11054 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11055 (jcf_parse): Check for the right classes archive if necessary.
11056 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11057 (jcf_parse_fields): Fixed indentation.
11058 * jcf-write.c (append_gcj_attribute): New function.
11059 (generate_classfile): Compute the attribute count, invoke
11060 `append_gcj_attribute'.
11061 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11062 turned into bit-fields. New bit-field `right_zip.'
11063 (JCF_ZERO): Set `right_zip' to zero.
11064 * lang-options.h (-fforce-classes-archive-check): Added flag.
11065 * lang.c (flag_force_classes_archive_check): New flag.
11066 (lang_f_options): New entry `force-classes-archive-check.'
11067 Fixes PR java/1213.
11069 2001-02-07 Andrew Haley <aph@redhat.com>
11071 * gcj.texi (Configure-time Options): Add -fcheck-references.
11072 * expr.c (build_java_indirect_ref): New function.
11073 (java_check_reference): New function.
11074 (build_java_array_length_access): Use build_java_indirect_ref to
11075 check for null references.
11076 (build_java_arrayaccess): Likewise.
11077 (build_get_class): Likewise.
11078 (build_field_ref): Likewise.
11079 (invoke_build_dtable): Likewise.
11080 (build_invokeinterface): Likewise.
11081 * lang.c (lang_f_options): Add flag_check_references.
11082 * jvspec.c (jvgenmain_spec): Add flag_check_references.
11083 * java-tree.h (flag_check_references): New variable.
11084 * lang.c (flag_check_references): Likewise.
11085 * parse.y (patch_invoke): Use java_check_reference.
11086 (patch_assignment): Allow for extra nesting in
11087 _Jv_CheckArrayStore.
11089 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
11091 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11092 * lex.c (cxx_keywords): Likewise.
11094 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11096 * parse.y (qualify_ambiguous_name): Broaden `length'
11097 recognition. Help MODIFY_EXPR be resolved as expression names.
11098 Fixes PR java/2066. Fixes PR java/2400.
11100 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
11102 * gjavah.c (process_file): Mark interface definitions with
11103 "__attribute__ ((java_interface))".
11105 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11107 * class.c (layout_class): Fixed push_super_field's second
11108 argument. Fixes PR java/2333.
11109 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11110 too early to lay innerclasses out.
11112 2001-03-20 Tom Tromey <tromey@redhat.com>
11113 Alexandre Petit-Bianco <apbianco@redhat.com>
11115 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11116 inside an array reference. Insertion of the array store check
11117 rewritten. Fixes PR java/2299.
11119 2001-03-20 Tom Tromey <tromey@redhat.com>
11121 * lex.c (java_read_unicode): Only accept leading `u's.
11123 2001-03-20 Tom Tromey <tromey@redhat.com>
11125 * jcf-parse.c (read_class): Initialize `class'.
11127 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11129 * jcf_parse.c (jcf_parse): Eliminate unused variable.
11131 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11133 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11134 (layout_class): Likewise.
11135 (layout_class_method): Likewise.
11136 (emit_register_classes): Likewise.
11137 * decl.c (builtin_function): Likewise.
11138 (give_name_to_locals): Likewise.
11140 2001-03-19 Per Bothner <per@bothner.com>
11142 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
11143 before trying to load an inner class.
11145 Fixes to process to command-line .class files in two passes.
11146 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
11147 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
11148 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
11149 * class.c (is_compiled_class): Fix for renamed flag.
11150 * parse.y (maybe_create_class_interface_decl): Likewise.
11151 * jcf-parse.c (yyparse): Also set if compiling .class files.
11152 * jcf-parse.c (read_class); Read current_class.
11153 (jcf_parse): Make static.
11154 (load_inner_classes): New function, with code moved from jcf_parse,
11155 because we need to inner classes after the command-line files are read.
11156 (yyparse): Set finput to NULL when it doesn't need to be closed.
11157 Reduce use of main_jcf (basically only for archive) and
11158 use finput instead of main_jcf->read_state.
11159 Inline jcf_figure_file_type into yyparse.
11160 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11161 Defer load_inner_classes and parse_class_file to a second pass,
11162 after we've correctly mapped command-line .clas fiels to classes.
11163 (jcf_figure_file_type): Removed.
11164 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
11165 (JCF_ZERO): Also clear zipd field.
11166 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
11168 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11170 * jcf-parse.c (yyparse): Change ch from char * to char.
11172 2001-03-19 Per Bothner <per@bothner.com>
11174 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
11175 Add constructed filelist-file at end, following -xjava. Thus any .o
11176 and library files are not affected by the -xjava. Also wrap
11177 explicit @FILE with -xjava and -xnone.
11179 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
11181 * class.c (build_static_field_ref): Call make_decl_rtl() after
11182 setting the DECL_EXTERNAL flag.
11184 2001-03-17 Per Bothner <per@bothner.com>
11186 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
11188 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
11189 when result is is needed (target is STACK_TARGET).
11191 * parse.h (JDEP_SOLV): Removed.
11192 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
11194 * parse.y (incomplete_class_list): Removed.
11195 (obtain_incomplete_type): Don't use or set incomplete_class_list.
11196 It doesn't work if resolve_class changes the name of an array type
11197 that is on the list and then someone else looks for the modified name.
11198 Also, seems liable to break when compiling multiple source files at
11199 once. So the simplest is to just remove incomplete_class_list -
11200 it is only a minor space win and it is not even clear it saves time.
11202 * parse.y (resolve_class): Remove unneeded promote_type.
11204 2001-03-15 Per Bothner <per@bothner.com>
11206 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
11207 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
11208 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11209 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11211 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
11212 * parse.y (java_expand_classes): Likewise.
11214 * parse.y (expand_start_java_method): Was only called once and had a
11215 misleading name, so inline in caller java_complete_expand_method.
11216 (enter_a_block): Likewise inline in enter_block and remove.
11218 Remove junk from when gcc/java was created (by copying from C/C++).
11219 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
11220 (struct binding_level): Remove fields keep, keep_if_subblocks,
11221 more_cleanups_ok, have_cleanups (which have never been used).
11222 (pushlevel, poplevel): Remove related useless code.
11224 * class.c (make_class_data): The class_dtable_decl (i.e. the
11225 vtable for Class) should be external, except when compiling Class.
11227 * jvspec.c (lang_specific_driver): Fix -C handling.
11228 Check -save-temps to see if temp @FILE should be deleted.
11229 Follow-up to/fix for February 16 patch.
11231 * verify.c (verify_jvm_instructions): Better error msgs for dup.
11232 (type_stack_dup): Remove no-longer neded error check.
11234 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
11236 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11237 to 'for_pointer'. If this type is for a pointer (argument) mangling,
11238 don't surround the element with 'N..E' if the type name is
11241 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11243 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11244 DECL_RTL_SET_P, etc.
11245 (make_method_value): Likewise.
11246 (get_dispatch_table): Likewise.
11248 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11250 2001-03-07 Tom Tromey <tromey@redhat.com>
11252 * config-lang.in (lang_requires): Define.
11254 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
11256 * typeck.c (convert): Check flag_unsafe_math_optimizations,
11257 not flag_fast_math.
11259 2001-03-05 Per Bothner <per@bothner.com>
11261 Fix a problem where rest_of_decl_compilation applied to
11262 class_dtable_decl causes problems because it was done too early,
11263 before output file was opened.
11264 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
11265 * class.c (class_dtable_decl): Add macro - element of class_roots.
11266 (make_class_data): Define class_dtable_decl.
11267 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
11269 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11271 * java/class.c, java/decl.c, java/java-tree.h: Replace all
11272 uses of 'boolean' with 'bool'.
11274 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11276 * lang-specs.h: Add zero initializer for cpp_spec field to all
11279 2001-02-16 Per Bothner <per@bothner.com>
11281 Handle compiling multiple input files at once, and @FILE syntax.
11282 * gcj.texi: Updated documentation to match.
11283 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
11284 * jcf-parse.c (parse_source_file): Split into ...
11285 (parse_source_file_1): New function - and:
11286 (parse_source_file_2): New function.
11287 (yyparse): On -ffilelist-file, open and scan named file.
11288 On first pass over files, only do parse_source_file_1.
11289 A new second pass calls parse_source_file_2 for each file to compile.
11290 (init_jcf_parse): Call init_src_parse.
11291 * jvspec.c (INDIRECT_FILE_ARG): New flag.
11292 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
11293 as multiple input file combined in one compilation.
11294 * lang-options.h: Add -ffilelist-file
11295 * lang.c (flag_filelist_file): New flag variable.
11296 (lang_f_options): Handle -ffilelist-file.
11297 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11298 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
11299 gclass_list - use global fields of src_parse_roots instead.
11300 * parse.y (src_parse_roots): New array.
11301 (incomplete_class_list, gclass_list): New macros.
11302 (push_parser_context, java_pop_parser_context,
11303 java_parser_context_resume): Don't fiddle with deleted fields.
11304 (various): Use incomplete_class gclass_list and global macros
11305 instead of parse_ctxt fields - the lists are global.
11306 (init_src_parse): New function.
11308 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11310 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11312 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11314 * parse.y (check_inner_class_access): Moved declaration of local
11315 `enclosing_decl_type' to the right location.
11317 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
11319 * parse.y (parser_check_super_interface): Don't call
11320 check_pkg_class_access for an inner interface.
11321 (parser_check_super): Don't call check_pkg_class_access for inner
11323 (do_resolve_class): Simplify enclosing type loop. Don't call
11324 check_pkg_class_access if CL and DECL are not set.
11325 (find_in_imports_on_demand): Set DECL if class_type needed to be
11326 loaded. Don't call check_pkg_class_access for an inner class.
11327 (check_inner_class_access): Rewritten to implement member access
11328 rules as per spec 6.6.1.
11329 (check_pkg_class_access): Handle the empty package correctly.
11330 (in_same_package): New function. Determine if two classes are in the
11333 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
11335 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11336 method into array types.
11337 * parse.y (patch_method_invocation): Bypass access check on clone call
11340 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
11342 * expr.c (build_instanceof): Check for arrays when trying fold to
11345 2001-02-15 Jim Meyering <meyering@lucent.com>
11347 * Make-lang.in (java.install-common): Depend on `installdirs'.
11348 (java.install-info): Likewise.
11350 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
11352 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11354 2001-02-14 Tom Tromey <tromey@redhat.com>
11355 Alexandre Petit-Bianco <apbianco@cygnus.com>
11357 Fix for PR java/1261.
11358 * typeck.c (build_java_array_type): Add public `clone' method to
11360 * parse.y (resolve_qualified_expression_name): Use current_class
11361 when checking for inaccessibility.
11362 (patch_method_invocation): Fixed error message when accessibility
11363 denied. Added `from_super' argument.
11365 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11367 * parse.y (resolve_class): Don't build a fake decl. Use the one
11369 * typeck.c (build_java_array_type): Build and assign decl to array
11372 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11374 * parse.y (not_accessible_p): Changed leading comment. Added extra
11375 `where' argument. Use it to enforce protected access rules.
11376 (resolve_qualified_expression_name): Added extra argument to
11378 (patch_method_invocation): Use argument `primary' to provide
11379 not_accessible_p with an extra argument.
11380 (lookup_method_invoke): Added extra argument to not_accessible_p.
11381 (search_applicable_method_list): Likewise.
11383 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
11385 * parse.y (resolve_qualified_expression_name): Try to resolve as
11386 an inner class access only if `decl' is a TYPE_DECL.
11388 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11390 * decl.c (classdollar_identifier_node): Initialize.
11391 * java-tree.h (enum java_tree_index): New entry
11392 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11393 (classdollar_identifier_node): New macro.
11394 (ID_CLASSDOLLAR_P): Likewise.
11395 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11396 (build_dot_class_method_invocation): Likewise.
11397 (find_applicable_accessible_methods_list): `class$' can't be
11400 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
11402 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11404 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11406 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11407 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11410 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11412 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11413 outside of the `__U' sequence too.
11414 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11417 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11419 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11421 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11423 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11424 (JVGENMAIN_OBJS): Likewise.
11425 * java-tree.h (append_gpp_mangled_name): New prototype.
11426 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11427 Removed cast calling `gcc_add_root.'
11428 * jvgenmain.c (mangle_obstack): New global, initialized.
11430 (do_mangle_class): Constify local `ptr.'
11431 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11432 append_gpp_mangle_name and update `count' if necessary.
11433 Use `mangle_obstack.'
11434 * mangle.c (append_unicode_mangled_name): Removed.
11435 (append_gpp_mangled_name): Likewise.
11436 (unicode_mangling_length): Likewise.
11437 (mangle_member_name): Return type set to `void.'
11438 (mangle_field_decl): Don't append `U' in escaped names.
11439 (mangle_method_decl): Likewise.
11440 (mangle_member_name): Just use `append_gpp_mangled_name.'
11441 * mangle_name.c: New file.
11443 2001-02-07 Per Bothner <per@bothner.com>
11445 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
11447 * check-init.c (check_init): Don't call done_alternative after
11448 processing loop code, as a LOOP_EXPR never terminates normally.
11450 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
11452 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11454 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11456 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11459 2001-02-06 Tom Tromey <tromey@redhat.com>
11461 * lex.c (java_new_lexer): Longer error message.
11463 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
11464 Alexandre Petit-Bianco <apbianco@cygnus.com>
11466 * typeck.c (build_prim_array_type): Added leading comment.
11467 (build_java_array_type): Moved locals out of
11468 block. Always create the `data' field, fixed alignment to match
11471 2001-02-04 Tom Tromey <tromey@redhat.com>
11473 * expr.c (java_lang_expand_expr): Don't bother recomputing
11474 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
11475 Fixes PR java/1866.
11477 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11479 * parse.y (process_imports): Save the original name of the import
11480 for better error report.
11482 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
11484 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11485 of macros used when compiling jvspec.c.
11486 * jvspec.c (lang_specific_driver): Link with the shared
11489 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11491 * check-init.c (check_init): Call internal_error instead of fatal.
11492 * expr.c (java_lang_expand_expr): Likewise.
11493 * jcf-parse.c (get_constant): Likewise.
11494 * mangle.c (java_mangle_decl): Likewise.
11495 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11496 (operator_string): Likewise.
11497 * check-init.c (check_init): Call abort instead of fatal.
11498 * class.c (build_class_ref): Likewise.
11499 * constants.c (write_constant_pool): Likewise.
11500 * decl.c (start_java_method): Likewise.
11501 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11502 (java_stack_dup, encode_newarray_type): Likewise.
11503 (build_java_array_length_access): Likewise.
11504 (build_java_check_indexed_type, expand_java_pushc): Likewise.
11505 (build_java_soft_divmod, build_invokeinterface): Likewise.
11506 * java-tree.h (INNER_CLASS_P): Likewise.
11507 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
11508 (give_name_to_class, get_class_constant): Likewise.
11509 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11510 (find_constant_index, generate_bytecode_conditional): Likewise.
11511 (generate_bytecode_insns, perform_relocations): Likewise.
11512 * lex.c (java_unget_unicode, java_lex): Likewise.
11513 * mangle.c (mangle_type, mangle_record_type): Likewise.
11514 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11515 (finish_mangling): Likewise.
11516 * parse.h (MARK_FINAL_PARMS): Likewise.
11517 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11518 (obtain_incomplete_type, java_complete_class): Likewise.
11519 (java_check_regular_methods, java_complete_expand_method): Likewise.
11520 (cut_identifier_in_qualified, check_deprecation): Likewise.
11521 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11522 (java_complete_lhs, lookup_name_in_blocks): Likewise.
11523 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11524 * typeck.c (set_local_type, parse_signature_type): Likewise.
11525 (parse_signature_string, build_java_signature): Likewise;
11526 (set_java_signature): Likewise.
11527 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11528 * class.c (add_method): Call fatal_error instead of fatal.
11529 (build_static_field_ref): Likewise.
11530 * expr.c (build_known_method_ref, expand_invoke): Likewise.
11531 * jcf-parse.c (get_constant, jcf_parse): Likewise.
11532 * lex.c (java_new_new_lexer): Likewise.
11533 * jv-scan.c (main): Likewise.
11534 (fatal_error): Renamed from fatal.
11535 * jcf-parse.c (yyparse): Call fatal_io_error instead of
11537 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11538 (yyparse): Likewise.
11539 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11540 * lex.c (java_get_line_col): Likewise.
11541 * jcf-parse.c (load_class): Make errors non-fatal.
11542 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
11544 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
11546 * jvgenmain.c (class_mangling_suffix): Remove unused string.
11547 (error): Remove unused function.
11548 (main): Don't use "__attribute__ alias" on generated class symbol.
11550 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11552 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11554 * parse.y (finish_method_declaration): Code accounting for WFLed
11555 method DECL_NAMEs deleted.
11556 (check_abstract_method_definitions): Likewise.
11557 (resolve_type_during_patch): Layout resolved type.
11558 * typeck.c (lookup_do): Removed unused local.
11560 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
11562 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
11563 * decl.c (init_decl_processing): Use integer_minus_one_node, not
11564 integer_negative_one_node.
11565 * expr.c (build_java_binop): Likewise.
11567 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
11569 * zextract.c (read_zip_archive): Read file_offset before writing
11570 zipd and consequently clobbering the header contents.
11572 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11574 * Make-lang.in: Remove all dependencies on defaults.h.
11575 * decl.c: Don't include defaults.h.
11576 * expr.c: Likewise.
11577 * parse.y: Likewise.
11579 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11581 * ChangeLog (2001-01-21): Fixed typo.
11582 * class.c (layout_class_method): Code accounting for WFLed
11583 method DECL_NAMEs deleted.
11584 * constant.c (find_methodref_index): Likewise.
11585 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
11586 * java-tree.h (DECL_FUNCTION_WFL): New macro.
11587 (struct lang_decl): New field `wfl'.
11588 (java_get_real_method_name): Prototype deleted.
11589 * mangle.c (mangle_method_decl): Code accounting for WFLed
11590 method DECL_NAMEs deleted.
11591 * parse.h (GET_METHOD_NAME): Macro deleted.
11592 * parse.y (reset_method_name): Deleted.
11593 (method_header): Set DECL_FUNCTION_WFL.
11594 (check_abstract_method_header): Code accounting for WFLed method
11595 DECL_NAMEs deleted.
11596 (java_get_real_method_name): Deleted.
11597 (check_method_redefinition): Code accounting for WFLed method
11598 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
11599 (java_check_regular_methods): Likewise.
11600 (java_check_abstract_methods): Likewise.
11601 (java_expand_classes): Don't call `reset_method_name.'
11602 (search_applicable_method_list): Use DECL_NAMEs instead of
11604 * typeck.c (lookup_do): Code accounting for WFLed method
11605 DECL_NAMEs deleted.
11607 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
11609 * lex.c (java_read_char): Check for EOF from getc first.
11611 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11613 * class.c (layout_class): Don't lay the superclass out if it's
11614 already being laid out.
11615 * jcf-parse.c (handle_innerclass_attribute): New function.
11616 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
11617 handle_innerclasses_attribute.
11618 (jcf_parse): Don't load an innerclasses if it's already being
11620 * jcf-write.c (append_innerclass_attribute_entry): Static
11621 `anonymous_name' and its initialization deleted. `ocii' and `ini'
11622 to be zero for anonymous classes.
11624 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11626 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
11628 * jcf-parse.c (set_source_filename): Use
11629 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
11631 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11633 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
11634 gets a unique asm name.
11636 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11638 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
11639 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11641 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
11642 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
11643 * parse.y (lookup_package_type_and_set_next): Deleted.
11644 (resolve_package): Removed unnecessary code.
11645 (find_applicable_accessible_methods_list): `finit$' can't be
11647 * verify.c (pop_argument_types): Added missing prototype.
11649 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
11651 * config-lang.in: Disable java by default.
11653 2001-01-23 Tom Tromey <tromey@redhat.com>
11655 * gcj.texi (Copying): New node.
11656 Added copyright information.
11658 2001-01-21 Per Bothner <per@bothner.com>
11660 Various fixes to allow compiling a compressed .jar/.zip archive.
11661 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
11662 (struct ZipFile): Add fields name and next (from ZipFileCache).
11663 (struct ZipDirectory): New field zipf points to owning ZipFile.
11664 * jcf.h (struct ZipDirectory): Add forward declaration.
11665 (struct JCF): Declare zipd field to have type struct ZipDirectory.
11666 Remove seen_in_zip and zip_offset fields.
11667 (JCF_SEEN_IN_ZIP): New macro.
11668 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
11669 * jcf-io.c: Change all ZipFileCache to ZipFile.
11670 (read_zip_member): New function.
11671 (open_in_zip): Call read_zip_member.
11672 * jcf-parse.c (find_in_current_zip): Remove function.
11673 (read_class): Merge in find_in_current_zip functionality.
11674 Call read_zip_member if needed.
11675 (parse_zip_file_entries): Use read_zip_member.
11676 (process_zip_dir): Update for removed and added JCF fields.
11677 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
11679 2001-01-21 Per Bothner <per@bothner.com>
11681 Minor optimization of static ggc roots.
11682 * jcf-parse.c (parse_roots): New static field.
11683 (current_field, current_method, current_file_list): Replace by macros
11684 naming fields of parse_roots.
11685 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
11686 * class.c (class_roots): New static field.
11687 (registered_class, fields_ident, info_ident, class_list):
11688 New macros naming fields of parse_roots.
11689 (build_static_field_ref): Don't register roots here.
11690 (layout_class): Static field list replaced by macro class_list.
11691 (init_class_processing): Call ggc_add_tree_root for 4 roots.
11692 Initialize fields_ident and info_ident here.
11694 2001-01-21 Per Bothner <per@bothner.com>
11696 * jcf-parse.c (ggc_mark_jcf): New function.
11697 (init_jcf_parse): Register current_jcf as ggc root.
11699 2001-01-21 Per Bothner <per@bothner.com>
11701 * lang.c (put_decl_node): Print method's name.
11703 2001-01-21 Per Bothner <per@bothner.com>
11705 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
11706 (verify_jvm_instructions): Use it, for better error messages on loads.
11708 2001-01-21 Per Bothner <per@bothner.com>
11710 * verify.c (merge_type_state): Still may have to merge even if
11711 LABEL_VERIFIED (label).
11713 2001-01-21 Per Bothner <per@bothner.com>
11715 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
11716 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
11718 2001-01-19 Per Bothner <per@bothner.com>
11720 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
11721 if expeting an interface type. Refines Tom's change of 2000-09-12.
11723 2001-01-18 Per Bothner <per@bothner.com>
11725 * gcj.texi (Input Options): Mention .java files.
11727 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11729 * lang-options.h (-Wunsupported-jdk11): Removed.
11730 * lang.c (flag_not_overriding): Deleted.
11731 (flag_static_local_jdk1_1): Likewise.
11732 (lang_W_options): Removed "unsupported-jdk11" entry.
11733 * parse.y (java_check_methods): Removed dead code.
11735 2001-01-17 Tom Tromey <tromey@redhat.com>
11737 Changes suggested by Per Bothner:
11738 * gcj.texi (Input Options): Don't mention input files.
11739 (Code Generation): Updated --main information.
11740 (Invoking jcf-dump): Mention that --javap is incomplete.
11741 From Alexandre Petit-Bianco:
11742 (Warnings): Don't mention -Wunsupported-jdk11.
11744 (Compatibility): Mention JDK 1.2-ness of libraries.
11745 (Resources): Mention resources used when writing gcj.
11747 2001-01-17 Tom Tromey <tromey@redhat.com>
11749 * gcj.texi: New file.
11750 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
11751 (java.info): Depend on gcj.info.
11752 (java/gcj.dvi): New target.
11753 (java.dvi): Depend on gcj.dvi.
11754 (java.install-info): Wrote.
11756 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
11758 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
11759 having called make_decl_rtl.
11761 2001-01-14 Per Bothner <per@bothner.com>
11763 Various patches to emit better messages on verification errors.
11764 * expr.c (push_type_0): Return error indication on stack overflow,
11765 instead of callinfg fatal.
11766 (push_type): Now just call push_type_0 (nd fatal on overflow).
11767 (pop_type_0): Return detailed error message (in a char** argument).
11768 (pop_type): If pop_type_0 fails, print error message.
11769 (pop_argument_types): Moved to verify.c.
11770 * verify.c (pop_argument_types): Moved from expr.c.
11771 Return a (possible) error message, rather than void.
11772 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
11773 (verify_jvm_instruction): Use new macros, improving error messages.
11774 For case OPCODE_astore use object_ptr_type_node.
11775 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
11776 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
11778 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
11779 constant, return body without wrapper. (Improves constant folding.)
11780 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
11782 2001-01-13 Per Bothner <per@bothner.com>
11784 * expr.c (expand_java_field_op): Assigning to a final field outside
11785 an initializer does not violate JVM spec, so should be warning, not
11786 error. (Sun's verifier does not complain - though MicroSoft's does.)
11788 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
11790 * gjavah.c (version), jcf-dump.c (version): Update copyright year
11793 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
11795 * parse.y (resolve_expression_name): Permit instance variables from
11796 enclosing context in super constructor call.
11797 (resolve_qualified_expression_name): Permit enclosing class's qualified
11798 "this" in super constructor call.
11800 2001-01-10 Mark Mitchell <mark@codesourcery.com>
11802 * class.c (build_utf8_ref): Remove last argument in call to
11803 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11804 (build_class_ref): Likewise.
11805 (build_static_field_ref): Likewise.
11806 (get_dispatch_table): Likewise.
11807 (layout_class_method): Likewise.
11808 (emit_register_classes): Likewise.
11809 * constants.c (build_constant_data_ref): Likewise.
11810 * decl.c (builtin_function): Likewise.
11811 (create_primitive_vtable): Likewise.
11812 * expr.c (build_known_method_def): Likewise.
11813 (build_jni_stub): Likewise.
11814 (java_lang_expand_expr): Likewise.
11816 2001-01-10 Tom Tromey <tromey@redhat.com>
11818 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
11820 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11822 * java-tree.h (lang_printable_name_wls): New prototype.
11823 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
11824 rather than `current_class' to print type name. Don't prepend type
11825 names when printing constructor names.
11826 (lang_printable_name_wls): New function.
11827 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
11828 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
11829 * parse.y (patch_method_invocation): Message tuned for constructors.
11830 (not_accessible_p): Grant `private' access from within
11831 enclosing contexts.
11833 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11835 All files with updated copyright when applicable.
11836 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
11837 * class.c (mangle_class_field): Function removed.
11838 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
11839 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
11840 (build_class_ref): Call `java_mangle_class_field' instead of
11841 `mangle_class_field.'
11842 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
11843 (layout_class): Call `java_mangle_decl' instead of
11844 `mangle_static_field.'
11845 (cxx_keywords): Initialized static array moved to `lex.c.'
11846 (layout_class_method): Changed leading comment. Simplified to
11847 call `java_mangle_decl.' Local `ptr' moved in for loop body.
11848 * decl.c (lang_mark_tree): Mark field `package_list.'
11849 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
11850 (struct lang_type): New field `package_list.'
11851 (unicode_mangling_length): Prototype removed.
11852 (append_gpp_mangled_name, append_gpp_mangled_classtype,
11853 emit_unicode_mangled_name): Likewise.
11854 (cxx_keyword_p): New prototype.
11855 (java_mangle_decl, java_mangle_class_field,
11856 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
11857 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
11859 * jvgenmain.c (main_method_prefix): Global variable removed.
11860 (main_method_suffix): Likewise.
11861 (do_mangle_classname): New function.
11862 (main): Call it. Format changed to accommodate new mangling scheme.
11863 * lex.c: (utf8_cmp): Conditionally prototyped.
11864 (cxx_keywords): Moved from class.c, conditionally defined.
11865 (utf8_cmp, cxx_keyword_p): Likewise.
11866 * mangle.c (obstack.h, ggc.h): Included.
11867 (mangle_field_decl): New function.
11868 (mangle_method_decl, mangle_type, mangle_pointer_type,
11869 mangle_array_type, mangle_record_type,
11870 find_compression_pointer_match, find_compression_array_match,
11871 find_compression_record_match,
11872 find_compression_array_template_match, set_type_package_list,
11873 entry_match_pointer_p, emit_compression_string, init_mangling,
11874 finish_mangling, compression_table_add, mangle_member_name): Likewise.
11875 (mangle_obstack): New global.
11876 (MANGLE_RAW_STRING): New macro.
11877 (unicode_mangling_length): Turned static.
11878 (append_unicode_mangled_name): Renamed from
11879 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
11880 replaces `obstack', removed from the parameter list.
11881 (append_gpp_mangled_name): Turned static. `mangle_obstack'
11882 replaces parameter `obstack', removed from the parameter list. Call
11883 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
11884 (append_gpp_mangled_classtype): Removed.
11885 (compression_table, compression_next): New static variables.
11886 * parse.y (temporary_obstack): Extern declaration removed.
11888 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11890 * parse.y (patch_binop): Compute missing type in error situations.
11892 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
11894 * class.c (make_class_data): Push initial value for "arrayclass".
11895 * decl.c (init_decl_processing): Add new class field "arrayclass".
11897 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
11899 From patha@softlab.ericsson.se:
11900 * parse.y (switch_label): Use build, not build1, to construct
11903 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
11905 * lang.c (lang_decode_option): Change -MA to -MP.
11906 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
11907 Update to new prototype; do quote targets.
11908 (jcf_dependency_write): Update.
11910 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
11912 Shorten primitive array allocation path:
11913 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
11914 to create new primitive arrays.
11915 * expr.c (build_newarray): If generating native code, call
11916 soft_newarray_node with a reference to the primitive TYPE identifier
11917 instead of type_value.
11919 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
11921 Fix for PRs gcj/312 and gcj/253:
11922 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
11923 dest if they arn't already.
11924 * class.c (layout_class): Call maybe_layout_super_class on
11925 superinterfaces also, but only if compiling from bytecode.
11927 Fix for PR gcj/373:
11928 * parse.y (create_class): Set ACC_STATIC if class is declared in an
11931 2000-12-15 Tom Tromey <tromey@redhat.com>
11933 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
11936 2000-12-14 Andrew Haley <aph@redhat.com>
11938 * boehm.c (mark_reference_fields): Change test to correctly detect
11941 2000-12-15 Andreas Jaeger <aj@suse.de>
11943 * config-lang.in (lang_dirs): Added.
11945 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
11947 * parse.y (end_artificial_method_body): Fixed undefined behavior.
11948 Credits go to rth for finding it.
11950 2000-12-13 Mike Stump <mrs@wrs.com>
11952 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
11954 2000-11-07 Tom Tromey <tromey@cygnus.com>
11956 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
11957 * lex.c (java_ignorable_control_p): Removed.
11958 (java_letter_or_digit_p): Removed.
11959 (java_start_char_p): New function.
11960 (java_read_char): Return `int', not `unicode_t'. Changed
11962 (java_read_unicode): Likewise.
11963 (java_read_unicode_collapsing_terminators): Likewise.
11964 (java_get_unicode): Likewise.
11965 (java_new_lexer): Initialize hit_eof.
11966 (java_parse_end_comment): Take `int' argument.
11967 (java_parse_doc_section): Likewise.
11968 (java_parse_escape_sequence): Don't allow backlash-newline.
11970 * lex.h (JAVA_DIGIT_P): Removed.
11971 (_JAVA_LETTER_OR_DIGIT_P): Removed.
11972 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
11973 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
11974 (JAVA_PART_CHAR_P): New macro.
11976 (JAVA_CHAR_ERROR): Now -2.
11977 (java_lexer): New field `hit_eof'.
11978 * chartables.h: New file.
11979 * gen-table.pl: new file.
11981 2000-11-20 Tom Tromey <tromey@cygnus.com>
11982 Alexandre Petit-Bianco <apbianco@cygnus.com>
11984 * parse.y (java_complete_lhs): Only allow compound assignment of
11985 reference type if type is String.
11987 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11989 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
11990 jcf-path.c: Likewise.
11992 2000-12-09 Anthony Green <green@redhat.com>
11994 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
11995 filestart and filename_length as int values.
11997 2000-12-07 Mo DeJong <mdejong@redhat.com>
11999 * jcf-io.c (find_class): Correct the logic that tests to see if a
12000 .java file is newer than its .class file. The compiler was
12001 incorrectly printing a warning when file mod times were equal.
12003 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
12005 * jvgenmain.c: Use ISPRINT not isascii.
12007 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12009 * parse.y (end_artificial_method_body): Fixed typo.
12011 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
12013 * parse.y (patch_method_invocation): Pick the correct enclosing
12014 context when creating inner class instances.
12017 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
12019 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12020 Update copyright year to 2000.
12022 2000-11-23 Anthony Green <green@redhat.com>
12024 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12025 Move current_file_list out of yyparse and make it static.
12027 * expr.c: Declare quick_stack and tree_list_free_list as static
12028 (init_expr_processing): Register quick_stack and
12029 tree_list_free_list roots.
12031 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12033 * parse.y (build_outer_field_access): New local `decl_ctx', use
12034 it. Check for field's context and current class immediate outer
12035 context inheritance.
12036 (outer_field_access_p): Consider fields inherited from the last
12038 (build_access_to_thisn): Stop at the last enclosing context if
12042 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
12044 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12046 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
12048 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12051 2000-11-20 Tom Tromey <tromey@cygnus.com>
12053 * jv-scan.c (help): Document --complexity.
12054 (options): Added --complexity.
12055 (flag_complexity): New global.
12056 (main): Call `report'.
12057 * parse-scan.y (complexity): New global.
12058 (if_then_statement, if_then_else_statement,
12059 if_then_else_statement_nsi, switch_block_statement_group,
12060 while_expression, do_statement, for_begin, continue_statement,
12061 throw_statement, catch_clause, finally, method_invocation,
12062 conditional_and_expression, conditional_or_expression,
12063 conditional_expression): Update complexity.
12064 (reset_report): Reset complexity.
12065 (report): New function.
12067 2000-11-20 Tom Tromey <tromey@cygnus.com>
12069 * lex.c (yylex): Added STRICT_TK case.
12070 * parse.y (STRICT_TK): Added.
12071 * parse-scan.y (STRICT_TK): Added.
12072 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12073 `;'. Use 4, not 3, with -k option. Correctly rename resulting
12075 * keyword.h: Rebuilt.
12076 * keyword.gperf (strictfp): Added.
12078 2000-11-20 Tom Tromey <tromey@cygnus.com>
12080 * lex.c (yylex): Recognize floating point constants with leading
12083 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12085 * java-tree.h (cyclic_inheritance_report): Constify.
12086 * parse.y (cyclic_inheritance_report): Likewise.
12088 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
12090 * parse.y (goal): Remove call to ggc_add_string_root.
12092 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
12094 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12095 Create string in scratch buffer, then pass to build_string.
12097 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
12099 * parse.y (issue_warning_error_from_context): Add
12102 2000-11-11 Anthony Green <green@redhat.com>
12104 * jcf-parse.c (process_zip_dir): Add finput parameter.
12105 (jcf_figure_file_type): Call process_zip_dir with appropriate
12108 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12110 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12111 * jcf-parse.c (jcf_figure_file_type): Likewise.
12113 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
12115 * parse.y (create_new_parser_context): Use memset () instead of
12118 2000-11-08 Tom Tromey <tromey@cygnus.com>
12120 * gjavah.c (process_file): Only include gcj/cni.h when generating
12123 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
12125 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12126 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12127 instead of bzero ().
12129 2000-11-05 Tom Tromey <tromey@cygnus.com>
12131 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12132 * lex.c (IS_ZERO): New define.
12133 (java_perform_atof): Error on floating point underflow.
12135 2000-11-04 Tom Tromey <tromey@cygnus.com>
12137 * lex.c (java_parse_escape_sequence): Only read two octal
12138 characters if the first one is greater than 3. Don't allow
12139 "octal" numbers to include the digits 8 or 9.
12141 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
12143 * Make-lang.in (java.distdir): Remove.
12145 2000-11-03 Tom Tromey <tromey@cygnus.com>
12147 * Make-lang.in (java.dvi): New target.
12148 Partial fix for PR other/567.
12150 * lang-options.h: Mention -Wout-of-date.
12151 * jcf-dump.c (flag_newer): New global.
12152 * gjavah.c (flag_newer): New global.
12153 * jcf-io.c (find_class): Only warn when flag_newer set.
12154 * lang.c (flag_newer): New global.
12155 (struct string_option): New declaration.
12156 (lang_W_options): New global.
12157 (process_option_with_no): New function.
12158 (lang_decode_option): Use it.
12160 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12161 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12164 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12165 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12166 * lex.c (java_read_unicode): Removed `term_context' argument.
12167 Recognize any number of `u' in `\u'.
12168 (java_read_unicode_collapsing_terminators): New function.
12169 (java_get_unicode): Use it.
12170 (java_lineterminator): Removed.
12171 (yylex): Produce error if character literal is newline or single
12172 quote. Return if eof found in middle of `//' comment. EOF in
12173 `//' comment is only an error if pedantic.
12174 (java_ignorable_control_p): New function.
12175 (java_parse_end_comment): Return if eof found in middle of
12178 * jv-scan.c (pedantic): New global.
12180 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12182 * parse.y (outer_field_access_p): Inherited fields aren't
12183 consider outer fields.
12184 (maybe_build_thisn_access_method): Use
12185 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12186 (resolve_expression_name): Trigger an error if a static field
12187 is being accessed as an outer field.
12189 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12191 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12194 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12196 * Make-lang.in: Move all build rules here from Makefile.in,
12197 adapt to new context. Wrap all rules that change the current
12198 directory in parentheses. Expunge all references to $(P).
12199 When one command depends on another and they're run all at
12200 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12201 all object-file generation rules. Delete obsolete variables.
12203 * Makefile.in: Delete.
12204 * config-lang.in: Delete outputs= line.
12206 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12208 * parse.y (patch_method_invocation): NULLify this_arg when already
12210 (maybe_use_access_method): Handle call to methods unrelated to the
12211 current class. Fixed comment.
12214 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12216 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12219 2000-10-24 Tom Tromey <tromey@cygnus.com>
12221 * lex.c (java_new_lexer): Initialize new fields. Work around
12222 broken iconv() implementations.
12223 (java_read_char): Swap bytes if required. Use fallback decoder if
12225 (byteswap_init, need_byteswap): New globals.
12226 (java_destroy_lexer): Only close iconv handle if it is in use.
12227 * lex.h (java_lexer): New fields read_anything, byte_swap,
12229 Made out_buffer unsigned.
12231 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12233 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12234 where an enclosing context can be set on the jdep.
12235 (do_resolve_class): Fixed identation.
12237 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12239 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12241 * jcf-reader.c (peek_attribute, skip_attribute): Only define
12244 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12246 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12248 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12250 * jcf-write.c (OP1): Update `last_bc'.
12251 (struct jcf_block): Fixed indentation and typo in comments. New
12253 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12254 follows `monitorenter'.
12255 * parse.y (patch_synchronized_statement): New local `tmp'. Call
12259 2000-10-16 Tom Tromey <tromey@cygnus.com>
12261 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12262 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12263 * lang-options.h: Added -MA, -MT, -MF..
12264 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12265 (DEPEND_TARGET_SET): New macro.
12266 (DEPEND_FILE_ALREADY_SET): Likewise.
12267 (init_parse): Handle new flags.
12268 * jcf.h (jcf_dependency_print_dummies): Declare.
12269 * Make-lang.in (s-java): Added mkdeps.o.
12270 * Makefile.in (BACKEND): Added mkdeps.o.
12271 (../gcjh$(exeext)): Added mkdeps.o.
12272 (../jcf-dump$(exeext)): Added mkdeps.o.
12273 * jcf-depend.c: Include mkdeps.h.
12274 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12275 add_entry): Removed.
12276 (jcf_dependency_reset): Rewrote.
12277 (dependencies): New global.
12278 (jcf_dependency_set_target): Rewrote.
12279 (jcf_dependency_add_target): Likewise.
12280 (jcf_dependency_add_file): Likewise.
12282 (print_ents): Removed.
12283 (jcf_dependency_write): Rewrote.
12284 (print_dummies): New global.
12285 (jcf_dependency_print_dummies): New function
12286 (jcf_dependency_write): Call deps_dummy_targets if required.
12288 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12290 * gjavah.c (add_class_decl): Removed unused variables `tname',
12291 `tlen' and `name_index'.
12292 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12293 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12294 in `wfl_operator' with value.
12295 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12296 (jcf_figure_file_type): Fixed identation.
12297 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12298 * parse.y (analyze_clinit_body): New function.
12299 (static_initializer:): Reset `current_static_block'.
12300 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12301 `wfl_operator' with new value.
12302 (lookup_cl): Use EXPR_WFL_FILENAME.
12303 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12304 analyze_clinit_body.
12305 (build_outer_field_access): Access to this$<n> built from
12306 current_class, not its outer context.
12307 (build_access_to_thisn): Fixed leading comment. Tidied things up.
12308 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12309 (patch_method_invocation): Use `is_static_flag' when already
12311 (patch_newarray): Removed assignment in ternary operator.
12313 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12315 * except.c (free_eh_ranges): Don't free `whole_range'.
12317 2000-10-15 Anthony Green <green@redhat.com>
12319 * decl.c (init_decl_processing): Call init_class_processing before
12322 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12324 * check-init.c (check_init): Fixed leading comment. Use
12326 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12327 (give_name_to_locals): Likewise.
12328 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12329 fields in lang_decl_var.
12330 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12331 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12332 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12333 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12334 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12335 (LOCAL_FINAL): Rewritten.
12336 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12337 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12338 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12339 `init_final' fields.
12340 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12341 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12342 (TYPE_HAS_FINAL_VARIABLE): New macro.
12343 (struct lang_type): Added `afv' field.
12344 * parse.y (check_static_final_variable_assignment_flag): New function.
12345 (reset_static_final_variable_assignment_flag): Likewise.
12346 (check_final_variable_local_assignment_flag): Likewise.
12347 (reset_final_variable_local_assignment_flag): Likewise.
12348 (check_final_variable_indirect_assignment): Likewise.
12349 (check_final_variable_global_assignment_flag): Likewise.
12350 (add_inner_class_fields): Use LOCAL_FINAL_P.
12351 (register_fields): Handle local finals and final variables.
12352 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12353 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12354 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12356 (java_complete_expand_methods): Loop to set
12357 TYPE_HAS_FINAL_VARIABLE. Call
12358 `reset_final_variable_local_assignment_flag' and
12359 `check_final_variable_local_assignment_flag' accordingly before
12360 and after constructor expansion. Call
12361 `reset_static_final_variable_assignment_flag'
12362 before expanding <clinit> and after call
12363 `check_static_final_variable_assignment_flag' if the
12364 current_class isn't an interface. After all methods have been
12365 expanded, call `check_final_variable_global_assignment_flag' and
12366 `check_static_final_variable_assignment_flag' if the current class
12368 (maybe_yank_clinit): Fixed typo in comment.
12369 (build_outer_field_access_methods): Removed old sanity check. Use
12370 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12371 Don't create access methods for finals.
12372 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12373 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12374 existing DECL_INIT has been processed.
12375 (java_complete_lhs): Likewise.
12376 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12377 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12379 (patch_assignment): Use LOCAL_FINAL_P.
12380 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12381 DECL_INITIAL is nullified.
12384 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12386 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12388 * Makefile.in (parse.c, parse-scan.c): Likewise.
12390 2000-10-12 Mark Mitchell <mark@codesourcery.com>
12392 * class.c (temporary_obstack): Remove.
12393 (make_class): Don't mess with obstascks.
12394 (push_class): Likewise.
12395 (set_super_info): Likewise.
12396 (add_method_1): Likewise.
12397 (add_method): Likewise.
12398 (add_field): Likewise.
12399 (build_utf8_ref): Likewise.
12400 (build_class_ref): Likewise.
12401 (build_static_field_ref): Likewise.
12402 (finish_class): Likewise.
12403 (push_super_field): Likewise.
12404 (layout_class): Likewise.
12405 (layout_class_methods): Likewise.
12406 (init_class_processing): Likewise.
12407 * constants.c (get_tag_node): Likewise.
12408 (build_constant_data_ref): Likewise.
12409 * decl.c (ggc_p): Remove.
12410 (copy_lang_decl): Use ggc_alloc.
12411 (complete_start_java_method): Don't mess with obstacks.
12412 (start_java_method): Likewise.
12413 (end_java_method): Likewise.
12414 * except.c (link_handler): Use xmalloc.
12415 (free_eh_ranges): New function.
12416 (method_init_exceptions): Use it.
12417 (add_handler): Use xmalloc.
12418 (expand_start_java_handler): Don't mess with obstacks.
12419 (prepare_eh_table_type): Likewise.
12420 (expand_end_java_handler): Likewise.
12421 * expr.c (push_value): Likewise.
12422 (create_label_decl): Likewise.
12423 (build_jni_stub): Likewise.
12424 (java_lang_expand_expr): Likewise.
12425 (note_instructions): Use xrealloc.
12426 (java_push_constant_from_pool): Don't mess with obstacks.
12427 (process_jvm_instruction): Likewise.
12428 * java-tree.h (cyclic_inheritance_report): Remove duplicate
12430 * jcf-parse.c (get_constant): Don't mess with obstacks.
12431 (read_class): Likewise.
12432 (jcf_parse): Likewise.
12433 * lex.c (expression_obstack): Remove.
12434 (java_lex): Don't use obstack_free.
12435 * parse.h (exit_java_complete_class): Don't mess with obstacks.
12436 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12437 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12438 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12439 * parse.y (gaol): Add more GC roots.
12440 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12441 (lookup_field_wrapper): Likewise.
12442 (obtain_incomplete_type): Don't mess with obstacks.
12443 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
12445 (craft_constructor): Don't mess with obstacks.
12446 (safe_layout_class): Likewise.
12447 (java_complete_class): Likewise.
12448 (source_end_java_method): Likewise.
12449 (build_outer_field_access_methods): Likewise.
12450 (build_outer_method_access_method): Likewise.
12451 (maybe_build_thisn_access_method): Likewise.
12452 (build_dot_class_method_invocation): Likewise.
12453 (java_complete_tree): Likewise.
12454 (java_complete_lhs): Likewise.
12455 (do_merge_string_cste): Likewise.
12456 (patch_string_cst): Likewise.
12457 (array_constructor_check_entry): Likewise.
12458 * typeck.c (build_java_array_type): Likewise.
12459 (parse_signature_string): Likewise.
12460 (build_java_signature): Likewise.
12462 2000-10-12 Tom Tromey <tromey@cygnus.com>
12464 Fix for PR gcj/356:
12465 * gjavah.c (add_class_decl): Don't special-case inner classes.
12466 (add_namelet): Likewise.
12468 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
12470 * java-tree.h: Constify current_encoding.
12471 * lang.c: Constify current_encoding.
12473 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
12475 * jvgenmain.c (class_mangling_suffix): Omit `.'.
12476 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12478 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12480 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12481 patch. Fixes gcj/340.
12483 2000-10-10 Tom Tromey <tromey@cygnus.com>
12485 * lex.c (java_new_lexer): Initialize out_first and out_last
12487 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12489 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12491 * parse.y (pop_current_osb): New function.
12492 (array_type:): Use `dims:', changed actions
12493 accordingly. Suggested by Anthony Green.
12494 (array_creation_expression:): Used pop_current_osb.
12495 (cast_expression:): Likewise.
12496 (search_applicable_method_list): Fixed indentation.
12498 2000-10-08 Anthony Green <green@redhat.com>
12500 * parse.y (array_type_literal): Remove production.
12501 (type_literals): Refer to array_type, not array_type_literal.
12503 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12505 Patch contributed by Corey Minyard.
12506 * decl.c (check_local_named_variable): New function.
12507 (tree check_local_unnamed_variable): Likewise.
12508 (find_local_variable): Splitted. Call check_local_{un}named_variable.
12510 2000-10-07 Anthony Green <green@redhat.com>
12512 * class.c (layout_class): Handle case where superclass can't be
12515 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
12517 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12520 2000-10-05 Tom Tromey <tromey@cygnus.com>
12522 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12523 * jvgenmain.c (class_mangling_prefix): Removed.
12524 (class_mangling_suffix): New global.
12526 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12528 (print_method_info): Handle overrides for static and final
12530 (process_file): Generate declaration for class object field.
12531 * class.c (cxx_keywords): New array.
12532 (utf8_cmp): New function.
12533 (cxx_keyword_p): New function.
12534 (layout_class_method): Mangle C++ keywords by appending `$'.
12535 (mangle_field): New function.
12536 (mangle_class_field): Use mangle_field. Mangle class name as
12538 (mangle_static_field): Use mangle_field.
12540 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12542 * decl.c (find_local_variable): Removed uncessary type check and
12543 fixed range check typo. From Corey Minyard.
12545 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12547 * decl.c (give_name_to_locals): New local `code_offset'. Call
12548 `maybe_adjust_start_pc'.
12549 * expr.c (note_instructions): New function.
12550 (expand_byte_code): Don't collect insn starts here.
12551 (peek_opcode_at_pc): New function.
12552 (maybe_adjust_start_pc): Likewise.
12553 * java-tree.h (maybe_adjust_start_pc): Declare.
12554 (note_instructions): Likewise.
12555 * jcf-parse.c (parse_class_file): Call `note_instructions'.
12557 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12559 * parse.y (field_access:): Fixed indentation.
12560 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
12562 2000-09-07 Tom Tromey <tromey@cygnus.com>
12564 Fix for PR gcj/307:
12565 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
12566 JPRIMITIVE_TYPE_P, for arithmetic operators.
12567 (patch_method_invocation): Indentation fix.
12568 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
12569 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
12570 (do_unary_numeric_promotion): Cleaned up code.
12571 (valid_cast_to_p): Handle boolean correctly.
12573 2000-09-27 Tom Tromey <tromey@cygnus.com>
12575 * lex.c (java_read_unicode): Reset bs_count when finished with
12578 2000-10-01 Mark Mitchell <mark@codesourcery.com>
12581 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
12582 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
12583 (typeck.o): Depend on ggc.h.
12584 * class.c (add_method_1): Use GC functions for allocation.
12585 (init_class_processing): Register roots.
12586 * decl.c (ggc_p): Set to 1.
12587 (pending_local_decls): Make it static.
12588 (push_jvm_slot): Use GC functions for allocation.
12589 (init_decl_processing): Register roots.
12590 (give_name_to_locals): Use GC functions for allocation.
12591 (lang_mark_tree): New function.
12592 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
12593 functions for allocation.
12594 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
12595 * lex.c (java_lex): Use build_string, rather than replicating it
12597 * parse.y (goal): Add more roots.
12598 (mark_parser_ctxt): New function.
12599 * typeck.c: Include ggc.h.
12601 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12603 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
12604 contains something else than MODIFY_EXPR.
12606 2000-09-23 Mark Mitchell <mark@codesourcery.com>
12608 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
12609 * Makefile.in (parse.o): Depend on ggc.h.
12610 (class.o): Likewise.
12611 (constants.o): Likewise.
12612 (decl.o): Likewise.
12613 (expr.o): Likewise.
12614 (jcf-parse.o): Likewise.
12615 (jcf-write.o): Likewise.
12616 (mangle.o): Likewise.
12617 * class.c: Include ggc.h.
12618 (build_static_field_ref): Register GC roots.
12619 (layout_class): Likewise.
12620 (init_class_processing): Likewise.
12621 * constants.c: Include ggc.h.
12622 (current_constant_pool_data_ref): Remove.
12623 (tag_nodes): Move it to ...
12624 (get_tag_node): ... here. Register GC roots.
12625 * decl.c: Include ggc.h. Remove many global tree definitions.
12626 (throw_node): Define.
12627 (java_global_trees): Likewise.
12628 (predef_filenames): Make the size a constant.
12629 (init_decl_processing): Adjust accordingly.
12630 (init_decl_processing): Call init_jcf_parse. Register GC roots.
12631 * expr.c: Include ggc.h.
12632 (init_expr_processing): Register GC roots.
12633 (build_invokeinterface): Likewise.
12634 * java-tree.h: Replace extern tree declarations with macros.
12635 (java_global_trees): New variable.
12636 (java_tree_index): New enumeration.
12637 (init_jcf_parse): Declare.
12638 * jcf-parse.c: Include ggc.h.
12639 (current_class): Remove declaration.
12640 (main_class): Likewise.
12641 (all_class_list): Likewise.
12642 (predefined_filename_p): Adjust for constant size of
12644 (init_jcf_parse): New function.
12645 * jcf-write.c: Include ggc.h.
12646 (generate_classfile): Register GC roots.
12647 (append_synthetic_attribute): Likewise.
12648 (append_innerclass_attribute_entry): Likewise.
12649 * lang.c: Include ggc.h.
12650 (lang_print_error): Register GC roots.
12651 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
12653 * parse.y: Include ggc.h.
12654 (wfl_operator): Remove.
12655 (goal): Register GC roots.
12656 (java_pop_parser_context): Adjust for new field names.
12657 (java_parser_context_save_global): Likewse.
12658 (java_parser_context_restore_global): Likewise.
12659 (java_parser_context_suspend): Likewise.
12660 (java_parser_context_resume): Likewise.
12661 (verify_constructor_circularity): Register GC roots.
12662 (lookup_cl): Likewise.
12663 (java_reorder_fields): Likewise.
12664 (build_current_this): Likewise.
12665 (class_in_current_package): Likewise.
12666 (argument_types_convertible): Likewise.
12667 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
12669 2000-09-14 Tom Tromey <tromey@cygnus.com>
12671 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
12673 2000-09-13 Tom Tromey <tromey@cygnus.com>
12675 * jcf-parse.c: Include <locale.h>.
12676 * jv-scan.c: Include <locale.h>.
12678 2000-09-12 Tom Tromey <tromey@cygnus.com>
12680 * expr.c (pop_type_0): Return `Object' if trying to merge two
12682 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
12683 interface types; `Object' is always a valid supertype.
12685 2000-09-12 Tom Tromey <tromey@cygnus.com>
12688 * jv-scan.c (help): Document --encoding.
12689 (options): Added `encoding' entry.
12690 (OPT_ENCODING): New define.
12691 (main): Handle --encoding.
12692 Include <langinfo.h> if nl_langinfo exists.
12693 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
12695 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
12696 (parse_source_file): Correctly call java_init_lex. Added `finput'
12697 argument. Use nl_langinfo to determine default encoding.
12698 * java-tree.h (current_encoding): Declare.
12699 * parse.y (java_parser_context_restore_global): Don't restore
12701 (java_parser_context_save_global): Don't set `finput' field.
12702 (java_pop_parser_context): Don't restore `finput'. Free old lexer
12704 * lang.c (current_encoding): New global.
12705 (lang_decode_option): Recognize `-fencoding='.
12706 (finish_parse): Don't close finput.
12707 * parse.h (struct parser_ctxt): Removed `finput' and
12708 `unget_utf8_value' fields. Added `lexer' field.
12709 (java_init_lex): Fixed declaration.
12710 * lex.c (java_new_lexer): New function.
12711 (java_destroy_lexer): Likewise.
12712 (java_read_char): Added `lex' argument. Handle iconv case.
12713 (java_read_unicode): Added `lex' argument. Count backslashes in
12715 (java_init_lex): Added `finput' and `encoding' arguments. Set
12716 `lexer' field in ctxp.
12717 (BAD_UTF8_VALUE): Removed.
12718 (java_lex): Handle seeing UEOF in the middle of a string literal.
12719 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
12720 (java_lexer): New structure.
12723 (DEFAULT_ENCODING): New define.
12724 (java_destroy_lexer): Declare.
12726 2000-09-12 Tom Tromey <tromey@cygnus.com>
12728 Fix for PR gcj/343:
12729 * lex.c (java_init_lex): Initialize java_io_serializable.
12730 * parse.y (java_io_serializable): New global.
12731 (valid_ref_assignconv_cast_p): An array can be cast to
12734 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
12736 * decl.c, expr.c: Include defaults.h if not already included.
12737 Don't define the *_TYPE_SIZE macros.
12739 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
12741 * typeck.c (build_java_array_type): Correct first parameter
12742 in ADJUST_FIELD_ALIGN invocation.
12744 2000-09-06 Tom Tromey <tromey@cygnus.com>
12746 * lang-specs.h: Also recognize `-femit-class-files'.
12748 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12750 * verify.c (merge_types): Load the types to merge if necessary.
12752 2000-09-02 Anthony Green <green@redhat.com>
12754 * jcf-io.c: Include zlib.h.
12755 (open_in_zip): Read compressed class file archives.
12756 * zipfile.h (ZipDirectory): Add uncompressed_size and
12757 compression_method fields.
12758 * zextract.c (read_zip_archive): Collect file compression info.
12760 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
12762 * parse.y (do_resolve_class): Also explore superclasses of
12763 intermediate enclosing contexts when searching for inner classes.
12765 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12767 * parse.y (variable_declarator_id:): Better error message.
12768 (expression_statement:): Use YYNOT_TWICE.
12769 (cast_expression:): Likewise.
12770 (assignment:): Likewise.
12772 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12774 * parse.y (do_merge_string_cste): New locals. Create new
12775 STRING_CSTs each time, use memcpy. Fixes gcj/311.
12777 2000-08-07 Hans Boehm <boehm@acm.org>
12779 * boehm.c (mark_reference_fields): Set marking bits for all words in
12780 a multiple-word record.
12781 (get_boehm_type_descriptor): Use the procedure marking descriptor for
12784 2000-08-31 Mike Stump <mrs@wrs.com>
12786 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
12787 jcf-dump$(exeext)): Make parallel safe.
12789 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12791 * jcf-parse.c (set_source_filename): Constify a char *.
12792 * jcf-write.c (append_innerclasses_attribute,
12793 make_class_file_name): Constify a char *. Don't recycle a
12794 variable for an unrelated purpose.
12795 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
12796 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
12798 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12800 * expr.c (can_widen_reference_to): Fixed indentation.
12801 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
12802 * parse.y: `finit$' replaces `$finit$' in comments.
12803 (try_builtin_assignconv): Fixed leading comment.
12805 2000-08-25 Greg McGary <greg@mcgary.org>
12807 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
12809 2000-08-24 Greg McGary <greg@mcgary.org>
12811 * lang.c (lang_decode_option): Use ARRAY_SIZE.
12812 * parse.y (BINOP_LOOKUP): Likewise.
12814 2000-08-22 Andrew Haley <aph@cygnus.com>
12816 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
12817 sign extending. Fixes gcj/321.
12818 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
12819 combining to make a jlong. Fixes gcj/321.
12821 2000-08-21 Nix <nix@esperi.demon.co.uk>
12823 * lang-specs.h: Do not process -o or run the assembler if
12826 2000-08-16 Andrew Haley <aph@cygnus.com>
12828 * typeck.c (build_java_array_type): Rewrite code to do array
12829 alignment. Take into account back-end macros when aligning array
12830 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
12831 user to set alignment. Fixes gcj/252 and 160.
12833 2000-08-09 Tom Tromey <tromey@cygnus.com>
12835 * parse.y (check_abstract_method_definitions): Now return `int'.
12836 Check implemented interfaces. Fixes PR gcj/305.
12838 * parse.y (patch_switch_statement): Disallow `long' in switch
12839 expressions. Fixes PR gcj/310.
12841 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12843 * decl.c (finit_leg_identifier_node): New global.
12844 (init_decl_processing): Use `finit$' to initialize
12845 finit_identifier_node. Use `$finit$' to initialize
12846 finit_leg_identifier_node.
12847 * expr.c (expand_java_field_op): Use ID_FINIT_P.
12848 * java-tree.h (finit_identifier_node): Changed attached comment.
12849 (finit_leg_identifier_node): New declaration.
12850 (ID_FINIT_P): Take finit_identifier_node and
12851 finit_leg_identifier_node into account. This is a backward
12852 compatibility hack.
12854 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12856 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
12858 (generate_bytecode_insns): Check `nargs' before emitting it.
12859 * verify.c (merge_type_state): Fixed typo.
12860 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
12861 generate_bytecode_{conditional,insns}.
12863 2000-08-13 Anthony Green <green@redhat.com>
12865 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
12868 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12870 * class.c (maybe_layout_super_class): Fixed indentation.
12871 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
12872 (java_check_methods): New function declaration.
12873 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
12874 instead of `str_ptr'.
12875 * jcf-write.c (generate_bytecode_insns): Emit number the of args
12876 of a `invokeinterface' at the right time.
12877 * parse.h (WFL_STRIP_BRACKET): New macro.
12878 (SET_TYPE_FOR_RESOLUTION): Use it.
12879 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
12880 (check_class_interface_creation): Don't check for cross package
12881 innerclass name clashes.
12882 (method_header): Behave properly if MDECL is `error_mark_node'.
12883 (method_declarator): Return `error_mark_node' if bogus current
12885 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
12886 (resolve_and_layout): New local `decl_type', set and used. Call
12887 java_check_methods.
12888 (java_check_methods): New method.
12889 (java_layout_classes): Use it.
12890 (resolve_qualified_expression_name): No EH check necessary in
12892 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
12894 (patch_assignment): Set DECL_INITIAL on integral final local.
12896 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12898 * java-tree.h (flag_extraneous_semicolon): New extern.
12899 * lang-options.h: (-Wextraneous-semicolon): New option.
12900 * lang.c (flag_redundant): Fixed typo in leading comment.
12901 (flag_extraneous_semicolon): New global.
12902 (lang_decode_option): Set `flag_extraneous_semicolon' when
12903 -Wall. Decode `-Wextraneous-semicolon'.
12904 * parse.y (type_declaration:): Removed `SC_TK' hack, added
12905 `empty_statement' rule.
12906 (class_body_declaration): Likewise.
12907 (method_body:): Accept `;' as a method body.
12908 (static_initializer:): Removed `SC_TK' hack.
12909 (constructor_block_end:): Likewise.
12910 (empty_statement:): Report deprecated empty declaration. Fixes
12913 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12915 * parse.y (build_dot_class_method_invocation): Changed parameter
12916 name to `type'. Build signature from `type' and convert it to a
12917 STRING_CST if it's an array.
12918 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
12919 to use `ref_type' directly.
12921 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
12923 * lang-options.h: Added a comma after the last element to avoid
12924 syntax errors when other languages define additional options.
12926 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
12928 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
12929 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
12930 (jc1): Link with $(BACKEND).
12931 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
12933 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
12935 * jvspec.c: Adjust type of second argument to
12936 lang_specific_driver, and update code as necessary.
12938 * class.c (build_dtable_decl): Initialize dummy.
12940 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12942 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
12943 method bodies not to rule out discarding `<clinit>'; don't use
12944 <clinit> to initialize static fields with constant initializers.
12946 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12948 * gjavah.c (print_method_info): Added `synth' parameter. Skip
12950 (method_synthetic): New global.
12951 (HANDLE_METHOD): Recognize synthetic method and tell
12952 `print_method_info' about it.
12953 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
12954 processing a synthetic method.
12955 * jcf-reader.c (skip_attribute): New function.
12956 ( skip_attribute): Likewise.
12958 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12960 * parse.y (build_outer_field_access): Fixed comments.
12961 (fix_constructors): Emit the initialization of this$<n> before
12963 (resolve_qualified_expression_name): Build an access to `decl' if
12966 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12968 * parse-scan.y (curent_class): Non longer const.
12969 (inner_qualifier, inner_qualifier_length): Deleted.
12970 (current_class_length): New global.
12971 (bracket_count): Fixed typo in leading comment.
12972 (anonymous_count): New global.
12973 (class_instance_creation_expression:): Handle anonymous classes.
12974 (anonymous_class_creation:): New rule.
12975 (push_class_context): Rewritten.
12976 (pop_class_context): Likewise.
12977 (INNER_QUALIFIER): Macro deleted.
12978 (report_class_declaration): call `push_class_context' when
12979 entering the function. `fprintf' format modified not to use
12981 (report_class_declaration): Assign `package_name' and
12982 `current_class' to NULL separately.
12984 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12986 * expr.c (build_invokeinterface): Call layout_class_methods on
12989 2000-07-27 Tom Tromey <tromey@cygnus.com>
12990 Anthony Green <green@cygnus.com>
12991 Alexandre Petit-Bianco <apbianco@cygnus.com>
12993 * class.c (make_class_data): Create vtable for abstract classes.
12994 (get_dispatch_table): Changed to cope with abstract classes.
12996 2000-07-27 Tom Tromey <tromey@cygnus.com>
12998 * parse.y (patch_method_invocation): Don't reverse the argument
12999 list when dealing with anonymous class constructors. Fixed typo in
13002 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13004 * parse.y (build_alias_initializer_parameter_list): Reverse
13005 crafted list when building aliases for anonymous class
13008 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13010 * parse.y (jdep_resolve_class): Don't bother checking potential
13011 innerclass access if `decl' is NULL.
13012 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13015 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13017 * parse.c: Remove (again.)
13019 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13021 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13022 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13023 outside the `if' statement, alias to innerclass removed, `decl'
13024 used to mark the class complete.
13026 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13028 * parse.y (simple_name:): Fixed typo in error message.
13030 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13032 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13033 or its first operand can be error marks.
13035 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13037 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13038 * parse.y (method_header): Likewise.
13040 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13042 * parse.y (process_imports): Consider that one might be trying to
13043 import an innerclass. Fixes gcj/254
13045 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13047 * parse.y (find_as_inner_class): Handle the case where the
13048 enclosing context of an innerclass has been loaded as bytecode.
13050 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13052 * parse.y (simple_name:): Reject `$' in type names.
13053 (resolve_type_during_patch): Use `type' as a second
13054 argument to resolve_no_layout. Fixes gcj/257.
13056 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
13058 * parse.y (find_most_specific_methods_list): Select the only
13059 non-abstract method even if max has been set.
13060 Fixes gcj/285, gcj/298.
13062 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
13064 * lang-specs.h: Added %(jc1) to java compiler options.
13066 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
13068 * .cvsignore: New file.
13070 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13072 * parse.y (not_accessible_p): Access granted to innerclasses
13073 (indirectly) extending the reference type. Fixes gcj/249.
13075 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13077 * parse.y (patch_method_invocation): Fixed comment.
13078 (maybe_use_access_method): Build this$<n>s to the context of the
13079 target method, or a type that extends it. Fixes gcj/242.
13081 2000-07-13 Mark Mitchell <mark@codesourcery.com>
13085 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13087 * parse.y (fold_constant_for_init): Avoid bullish conversion.
13089 2000-07-13 Tom Tromey <tromey@cygnus.com>
13091 * lang-specs.h: Added %{I*}.
13093 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13095 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13097 2000-07-12 Mark Mitchell <mark@codesourcery.com>
13099 * parse-scan.c: Remove.
13101 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13103 * class.c (set_super_info): Handled protected inner classes.
13104 (common_enclosing_context_p): Bail early if arguments aren't both
13106 (get_access_flags_from_decl): Handle private and protected inner
13108 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13109 (CLASS_PROTECTED): Likewise.
13110 (struct lang_type): New bitfield `poic'.
13111 * parse.y (jdep_resolve_class): Call check_inner_class_access on
13112 inner classes only.
13113 (check_inner_class_access): Renamed arguments, added
13114 comments. Handles protected inner classes (fixes gcj/225)
13115 (not_accessible_p): Fixed comments. Avoid handling inner classes.
13117 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13119 * parse.y (resolve_qualified_expression_name): Verify qualified
13120 access to `this'. Fixes gcj/239.
13122 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13124 * jcf-write.c (generate_classfile): Don't install ConstantValue
13127 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13129 * parse.y (resolve_qualified_expression_name): Handle inner class
13130 access. Fixes gcj/256.
13132 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13134 * jcf-write.c (generate_classfile): Properly install the
13135 ConstantValue attribute and the initial value constant pool index
13136 on string constants.
13137 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13140 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13142 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13144 * parse.y (find_as_inner_class): Fixed typo.
13145 (do_resolve_class): Explore enclosing contexts when searching for
13146 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13147 (check_inner_class_access): Check `decl' which can be null in case
13148 of previous errors.
13150 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13152 * java-tree.h (java_debug_context): Declared `extern'.
13153 (safe_layout_class): Likewise.
13154 * parse.y (resolve_field_access): Field must be `static' in order
13155 to be replaced by its initial value. Added comments.
13156 (find_applicable_accessible_methods_list): Fixed typo.
13157 (find_most_specific_methods_list): Methods found in innerclasses
13158 take over methods founds in the enclosing contexts.
13159 (java_complete_tree): Loosen restrictions on the type of DECLs
13160 that can be replaced by their initialization values.
13161 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13163 2000-07-05 Tom Tromey <tromey@cygnus.com>
13165 * Make-lang.in (PARSE_DIR): New macro.
13166 (PARSE_RELDIR): Likewise.
13167 (PARSE_C): Likewise.
13168 (PARSE_SCAN_C): Likewise.
13169 ($(PARSE_C)): New target.
13170 ($(PARSE_SCAN_C)): Likewise.
13171 (SET_BISON): New macro.
13172 (BISONFLAGS): Likewise.
13173 (JAVABISONFLAGS): Likewise.
13175 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
13177 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13178 argument on the first pass for CNI as well as JNI.
13179 (print_method_info): Set up method name on the first pass only.
13181 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13183 * parse.y (parser_qualified_classname): Removed parameter
13185 (create_interface): Removed first passed parameter to
13186 parser_qualified_classname.
13187 (create_class): Likewise. Don't install alias on static
13188 innerclasses. Fixes gcj/275.
13190 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13192 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13193 debugable statement with empty_stmt_node. Fixes gcj/272
13195 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13197 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13200 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13202 * jcf-write.c (push_long_const): Appropriately cast short negative
13205 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13207 * parse.y (verify_constructor_super): Use loop variable
13208 `m_arg_type' initialized with `mdecl_arg_type'.
13210 2000-06-29 Tom Tromey <tromey@cygnus.com>
13212 * parse.y (resolve_field_access): Handle case where `type_found'
13215 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13217 * expr.c (lookup_field): The same field can be found through two
13218 different interface. Don't declare it ambiguous in that case.
13220 2000-06-27 Tom Tromey <tromey@cygnus.com>
13222 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
13223 follows \r, then unget it at a lower level.
13225 2000-06-26 Tom Tromey <tromey@cygnus.com>
13227 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13228 java_complete_tree.
13230 2000-06-25 Tom Tromey <tromey@cygnus.com>
13232 * parse.y (for_statement): Wrap expression in a WFL if it is a
13233 constant. For PR gcj/268.
13235 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13237 * parse.y (do_resolve_class): Minor optimiztion in the package
13238 list search. Removed unnecessary test and return statement.
13239 (valid_ref_assignconv_cast_p): Order of arguments to
13240 enclosing_context_p fixed.
13242 2000-06-24 Tom Tromey <tromey@cygnus.com>
13244 * expr.c (lookup_field): Print error and return error_mark_node if
13245 field reference is ambiguous.
13247 * parse.y (check_abstract_method_definitions): Also check if
13248 `other_method' is abstract.
13250 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13252 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13254 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13255 (struct lang_type): New field `pic'.
13256 (CLASS_PRIVATE): New macro.
13257 * parse.y (check_inner_class_access): New function.
13258 (jdep_resolve_class): Call it.
13260 2000-06-23 Tom Tromey <tromey@cygnus.com>
13262 * parse.y (patch_incomplete_class_ref): Initialize the returned
13263 class. For PR gcj/260.
13265 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13267 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13269 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13271 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13272 Java specific checks.
13273 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13274 screened by DECL_P.
13275 * java-tree.def (CASE_EXPR): Marked 'e'.
13276 (DEFAULT_EXPR): Likewise.
13277 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13278 screened by DECL_P.
13279 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13280 Java specific checks.
13281 (generate_bytecode_insns): Test try_block for BLOCK before using
13283 * parse.y (build_wfl_wrap): Added `location' argument. Set
13284 EXPR_WFL_LINECOL accordingly.
13285 (dim_expr:): Wrap constants with WFLs.
13286 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13287 (resolve_package): Check for `stmt' not being a BLOCK before
13288 building a debuggable statement with it.
13289 (make_qualified_primary): Added extra parameter to build_wfl_wrap
13291 (resolve_field_access): Make sure `decl' is a DECL before treating
13293 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13294 IDENTIFIER_NODE before treating it as such.
13295 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13296 treating it as such.
13297 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13298 to be applied only on non array types.
13300 2000-06-16 Per Bothner <per@bothner.com>
13302 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
13303 define in terms of DECL_RESULT, as that fails when --enable-checking.
13305 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13307 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
13308 types the same in comparison.
13309 (CHECK_OP): Add static prototype.
13311 2000-06-13 Jakub Jelinek <jakub@redhat.com>
13313 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13314 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13315 * parse.c: Rebuilt.
13317 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13319 * decl.c (create_primitive_vtable): Prototype.
13321 * jcf-write.c (generate_bytecode_insns): Initialize variable
13324 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13326 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13328 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13329 to track searched classes, and do not search the same class more than
13330 once. Call find_applicable_accessible_methods_list on immediate
13331 superclass, instead of search_applicable_method_list on all ancestors.
13332 Fix for PR gcj/238.
13334 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13336 * parse.y (register_fields): Permit static fields in inner classes
13337 if they are final. Fix for PR gcj/255.
13339 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13341 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13342 * parse.y (find_in_imports): Returned type changed to void,
13343 leading comment fixed.
13344 (register_package): New function.
13345 (qualify_and_find): Likewise.
13346 (package_declaration:): Use `register_package'.
13347 (single_type_import_declaration:): Removed local variable
13348 `node'. Added missing `;' for consistency.
13349 (type_import_on_demand_declaration:): Use `chainon' to link new
13351 (lookup_field_wrapper): Lookup local variables defined in outer
13353 (java_complete_class): Don't reverse the list of imported on demand.
13354 (do_resolve_class): Reorganized. Removed local variable
13355 `original_name'. Call `qualify_and_find' with the current package
13356 name, invoke `find_in_imports_on_demand' right after. Call
13357 `qualify_and_find' with the packages we've seen so far. Fixed
13358 operations numbering in comments.
13359 (java_expand_class): Don't reverse `package_list'.
13360 (find_most_specific_methods_list): New local variables `abstract'
13361 and `candidates'. Use them to pick the right method.
13363 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
13365 * parse.y (check_modifiers_consistency): Don't subtract out
13366 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13368 2000-06-04 Philipp Thomas <pthomas@suse.de>
13370 * Makefile.in (INTLLIBS): New.
13374 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13376 * class.c (get_dispatch_table): Build the vtable dummy entry list
13377 element with a null purpose. Fixed leading comment.
13378 (build_dtable_decl): Build an accurate dtable type when appropriate
13381 2000-06-02 Richard Henderson <rth@cygnus.com>
13383 * lang.c (lang_get_alias_set): New.
13385 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13387 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13388 before using it as the accessed field.
13390 2000-05-31 Tom Tromey <tromey@cygnus.com>
13392 * java-tree.h (boolean_array_vtable, byte_array_vtable,
13393 char_array_vtable, short_array_vtable, int_array_vtable,
13394 long_array_vtable, float_array_vtable, double_array_vtable):
13396 * expr.c (get_primitive_array_vtable): New function.
13397 (create_primitive_vtable): New function.
13398 (java_lang_expand_expr): Enable code to statically generate
13400 * decl.c (init_decl_processing): Create primitive vtables.
13401 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13402 short_array_vtable, int_array_vtable, long_array_vtable,
13403 float_array_vtable, double_array_vtable): Define.
13405 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
13407 * java/parse.y (find_applicable_accessible_methods_list):
13408 Don't add an uninitialized value to the list.
13410 2000-05-25 Tom Tromey <tromey@cygnus.com>
13412 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13413 when trying to see if field's class should be initialized. Always
13414 initialize field's declaring class, not qualified class.
13417 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13418 `wfl_operator', to maybe_build_primttype_type_ref.
13421 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
13423 * parse.y (patch_method_invocation): Don't try to lookup methods
13424 in primitive types.
13426 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13428 * parse.y (resolve_field_access): Call the appropriate <clinit>
13429 before accessing the length of a static array. Craft a decl for
13430 the field while its time. Fixes PR gcj/129.
13432 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13434 * parse.y (resolve_package): Correctly set `*next' (was off by
13436 (resolve_qualified_expression_name): Fixed comment.
13438 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13440 * jcf-parse.c (jcf_parse_source): Reset current_class and
13441 current_function_decl to NULL before parsing a new file.
13443 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13445 * parse.y (block_end:): If the collected block doesn't feature a
13446 statement, insert an empty statement.
13448 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13450 * parse.y (maybe_yank_clinit): New function.
13451 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13452 end of the list of methods belonging to a class.
13453 (java_complete_expand_method): Check whether <clinit> is really
13454 necessary and expand it accordingly.
13456 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13458 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13459 processed by the method's switch statement.
13461 2000-05-19 Tom Tromey <tromey@cygnus.com>
13463 * java-tree.h: Added init state enum.
13464 * decl.c (emit_init_test_initialization): Initialize class
13465 initialization check variable by looking at class' state.
13467 2000-05-19 Tom Tromey <tromey@cygnus.com>
13469 * java-tree.h (build_instanceof): Declare.
13470 (build_get_class): Declare.
13471 * parse.y (patch_binop): Use build_instanceof.
13472 * expr.c (build_instanceof): New function. If class is final,
13473 don't make a function call.
13474 (expand_java_INSTANCEOF): Use it.
13475 (build_get_class): New function.
13477 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
13479 * jcf-write.c (generate_classfile): Scan the source_file for
13480 slashes with the right pointer variable.
13482 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
13484 * lang.c (lang_decode_option): Update -Wunused flags by calling
13486 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13488 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
13490 * check_init.c (check_init): Constify local char *.
13491 * class.c (push_class): Constify local char *.
13492 * java_tree.h: Update prototypes.
13493 * jcf-io.c (open_class): Constify filename parameter and
13495 (find_class): Remove redundant string copy. Cast return from
13497 * jcf-parse.c (read_class, parse_class_file, yyparse):
13498 Constify local char *.
13499 * jcf-write.c (generate_bytecode_insns, generate_classfile):
13500 Constify local char *.
13501 * jcf.h (JCF): Constify filename and classname.
13502 (JCF_FINISH): Cast args to FREE to char * when appropriate.
13503 * lang.c (init_parse): Constify parameter and return value.
13504 * lex.c (java_get_line_col): Constify filename parameter.
13505 * parse.h: Constify parser_ctxt.filename. Update prototypes.
13506 * parse.y (java_parser_context_suspend,
13507 issue_warning_error_from_context, safe_layout_class): Constify
13509 * parse.c: Regenerate.
13511 2000-05-08 Tom Tromey <tromey@cygnus.com>
13513 * expr.c (build_jni_stub): Cache the result of
13514 _Jv_LookupJNIMethod.
13516 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13518 * decl.c (predef_filenames_size): Now 7.
13519 (predef_filenames): New seventh entry.
13521 2000-05-04 Tom Tromey <tromey@cygnus.com>
13523 * boehm.c (mark_reference_fields): Don't mark RawData fields.
13524 Keep track of when we've seen a reference field after a
13525 non-reference field.
13526 (get_boehm_type_descriptor): Handle case where we see
13527 non-reference fields but no trailing reference field.
13528 * decl.c (rawdata_ptr_type_node): Define.
13529 (init_decl_processing): Initialize rawdata_ptr_type_node.
13530 * java-tree.h (rawdata_ptr_type_node): Declare.
13532 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13534 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13535 specifiers in calls to fprintf.
13537 2000-05-03 Andrew Haley <aph@cygnus.com>
13539 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13541 * javaop.h (WORD_TO_INT): New function.
13542 (IMMEDIATE_s4): Use WORD_TO_INT.
13543 * jcf.h (JPOOL_INT): Ditto.
13545 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13548 2000-04-19 Tom Tromey <tromey@cygnus.com>
13550 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13551 on native function.
13552 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13554 * expr.c (build_jni_stub): New function.
13555 * lang-specs.h: -fjni and -femit-class-file are incompatible.
13556 * parse.c: Rebuilt.
13557 * parse.y (java_complete_expand_methods): Expand a native method
13558 and call build_jni_stub if -fjni given.
13559 * lang-options.h: Document -fjni.
13560 * lang.c (flag_jni): New global.
13561 (lang_f_options): Added `jni' entry.
13562 * java-tree.h (soft_lookupjnimethod_node,
13563 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
13565 (flag_jni): Declare.
13566 (build_jni_stub): Declare.
13567 (struct lang_decl): Added `native' flag.
13568 (METHOD_NATIVE): Redefined to use `native' field of lang specific
13570 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
13571 soft_jnipopsystemframe_node): New globals.
13572 (init_decl_processing): Set them. _Jv_InitClass only takes one
13575 * java-tree.def: Put into `C' mode.
13577 2000-04-27 Tom Tromey <tromey@cygnus.com>
13580 * expr.c (expand_invoke): Generate check to see if object pointer
13581 is null in nonvirtual invocation case.
13582 * java-tree.h (soft_nullpointer_node): Declare.
13583 * decl.c (soft_nullpointer_node): New global.
13584 (init_decl_processing): Initialize soft_nullpointer_node.
13585 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13586 or `private' methods.
13587 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13589 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
13591 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13594 2000-04-26 Tom Tromey <tromey@cygnus.com>
13596 * zextract.c (find_zip_file_start): New function.
13597 (read_zip_archive): Use it.
13599 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13601 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
13603 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13605 * class.c (common_enclosing_context_p): New function.
13606 * java-tree.h (common_enclosing_context_p): Added prototype.
13607 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
13608 classes sharing an outer context with the current instance.
13609 * parse.y (build_access_to_thisn): Fixed leading comment.
13610 (verify_constructor_super): New local `supper_inner'. Skip
13611 enclosing context argument in the case of inner class constructors.
13612 (patch_method_invocation): Insert proper context as second
13613 parameter to pure inner class constructor super invocations.
13615 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13617 * parse.y (end_class_declaration): Reset the interface number
13620 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13622 * parse.y (source_start_java_method): Deleted unnecessary code.
13623 (patch_method_invocation): Fixed comment.
13625 2000-04-24 Robert Lipe <robertlipe@usa.net>
13627 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
13629 2000-04-23 Tom Tromey <tromey@cygnus.com>
13631 * boehm.c (mark_reference_fields): Use int_byte_position.
13633 2000-04-22 Tom Tromey <tromey@cygnus.com>
13635 * boehm.c (mark_reference_fields): Only call byte_position on
13638 2000-04-22 Tom Tromey <tromey@cygnus.com>
13640 * boehm.c (mark_reference_fields): Added `last_view_index'
13641 argument. Use DECL_FIELD_OFFSET to determine field's offset.
13643 2000-04-20 Mo DeJong <mdejong@cygnus.com>
13645 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
13646 * parse.y (check_class_interface_creation): Fixed comments. Select
13647 permitted modifiers for (inner) interfaces. Changed error message
13648 to report rejected modifiers used with local classes.
13650 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13652 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
13653 of directly inherited type considered in scope.
13654 * parse.y (do_resolve_class): Search inherited classes for inner
13657 2000-04-20 Tom Tromey <tromey@cygnus.com>
13659 * parse.y (not_accessible_p): Use member's class, not current
13660 class, when doing inheritance check for protected reference.
13663 2000-04-20 Jason Schroeder <shrode@subnature.com>
13665 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
13667 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13669 * parse.y (lookup_field_wrapper): Search for final local aliases.
13670 (resolve_expression_name): Let lookup_field_wrapper search for
13671 final local aliases. Force the value of `name' if one is found.
13672 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
13673 an expression name. Fixed comments.
13675 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13677 * parse.y (yyerror): `msg' can be null, don't use it in that case.
13679 2000-04-19 Tom Tromey <tromey@cygnus.com>
13681 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
13683 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13685 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
13687 2000-04-18 Tom Tromey <tromey@cygnus.com>
13690 * gjavah.c (utf8_cmp): Changed return value.
13691 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
13693 (cxx_keywords): New global.
13694 (get_field_name): Handle new result of cxx_keyword_subst.
13695 (print_method_info): Likewise.
13697 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
13699 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
13700 with a newline, for CNI.
13701 (print_stub_or_jni): Print a space or newline before method name for
13702 CNI as well as JNI.
13703 (print_cxx_classname): Don't write leading "::" in CNI stub method.
13704 (process_file): Include gcj/cni.h if generating CNI stubs.
13706 2000-04-16 Tom Tromey <tromey@cygnus.com>
13708 * gjavah.c (decompile_method): Use print_field_name.
13711 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13713 * parse.y (java_expand_classes): Reverse the package list once.
13714 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
13716 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
13717 the `==' and `!=' operators.
13719 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13721 * jcf-write.c (generate_bytecode_insns): At invocation time,
13722 always relate an interface method to the type of its selector.
13724 2000-04-05 Tom Tromey <tromey@cygnus.com>
13727 * expr.c (expand_invoke): Generate check to see if object pointer
13728 is null in nonvirtual invocation case.
13729 * java-tree.h (soft_nullpointer_node): Declare.
13730 * decl.c (soft_nullpointer_node): New global.
13731 (init_decl_processing): Initialize soft_nullpointer_node.
13732 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13733 or `private' methods.
13734 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13736 2000-04-05 Tom Tromey <tromey@cygnus.com>
13738 Fix for PR gcj/140:
13739 * parse.y (check_final_assignment): Recognize assignments to the
13740 `length' field of an array when generating class files.
13742 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13744 * class.c (decl_hash): Prototype removed.
13745 (decl_compare): Likewise.
13747 2000-04-05 Tom Tromey <tromey@cygnus.com>
13749 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
13750 * parse.y (check_modifiers_consistency): Check for final/volatile
13751 clash. Fixes PR gcj/164.
13753 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13755 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
13757 (java_hash_compare_tree_node): Renamed from `decl_compare, made
13759 (add_method_1): Use `java_hash_hash_tree_node' and
13760 `java_hash_compare_tree_node'.
13761 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
13762 (java_hash_compare_tree_node): Likewise.
13763 * parse.y (find_applicable_accessible_methods_list): Create,
13764 delete and use a hash table to remember already searched interfaces.
13766 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
13768 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
13771 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13773 * boehm.c (mark_reference_fields, set_bit): Prototype.
13774 (set_bit): Un-ANSI-fy definition.
13776 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
13779 * decl.c (emit_init_test_initialization): Likewise.
13781 * gjavah.c (jni_print_char): Likewise.
13783 * parse.y (create_new_parser_context): Likewise.
13785 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
13787 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
13788 patch missing hunk. Fixed indentation.
13790 2000-03-30 Tom Tromey <tromey@cygnus.com>
13792 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
13793 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
13795 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13797 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13798 when negative *before* using it as an array index.
13799 * ChangeLog: Fixed typo.
13801 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13803 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13804 to 0 when it reaches -1.
13806 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13808 * jcf-parse.c (get_constant): Properly cast `num' during the
13809 invocation of `add_double'.
13810 * jcf-write.c (push_long_const): Properly cast `lo' before
13811 comparing it to short bounds.
13812 * parse-scan.y (interface_declaration:): Rule re-arrange so that
13813 `interface_body:' is reduced after the current interface is
13816 2000-03-26 Tom Tromey <tromey@cygnus.com>
13818 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
13819 Java-specific `-f' option.
13821 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13823 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
13824 Adjust order of making types.
13825 Make bitsize_*_node values.
13827 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13829 * class.c (make_field_value): Use byte_position.
13830 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
13831 (java_array_data_offset): Likewise.
13832 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
13835 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13837 * parse.y (check_abstract_method_definitions): New local
13838 `end_type_reached'. Make sure we also consider `end_type'.
13839 (java_check_abstract_method_definitions): Make sure we eventually
13840 consider `java.lang.Object'.
13841 (maybe_use_access_method): Don't use access method if not in the
13842 context of a pure inner class or if the method's context is right.
13843 (find_applicable_accessible_methods_list): New static flag
13844 `object_done'. Don't search abstract classes as interfaces. Fixed
13845 indentation. Fixed the `java.lang.Object' only search. Search
13846 class interface(s) first, then fully search enclosing contexts.
13847 (find_most_specific_methods_list): Pick the closest candidate when
13848 they're all abstract.
13850 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13852 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13853 properly initialize `finished_label'. Don't emit gotos for empty
13856 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13858 * except.c (emit_handlers): Clear catch_clauses_last.
13860 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13862 * parse.y (check_method_types_complete): New function.
13863 (create_class): Reset anonymous class counter only when seeing an
13865 (java_complete_class): JDEP_METHOD: Don't recompute signature
13868 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13870 * class.c (build_static_ref): Fixed indentation in comment.
13871 * java-tree.def (TRY_EXPR): Fixed typo in name.
13872 (CLASS_LITERAL): Likewise.
13873 * java-tree.h: (TYPE_DOT_CLASS): New macro.
13874 (struct lang_type): New field `dot_class'.
13875 * jcf-write.c (generate_bytecode_insns): Fixed error message.
13876 (generate_classfile): Method `class$' is synthetic.
13877 * parse.y (build_do_class_method): New function.
13878 (build_dot_class_method_invocation): Likewise.
13879 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
13880 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
13881 (qualify_ambiguous_name): Likewise.
13882 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
13883 (build_try_statement): Fixed leading comment.
13885 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13887 * class.c (make_field_value): Properly handle sizes.
13888 (get_dispatch_vector): Use tree_low_cst and host_integerp.
13889 (layout_class_method): Count using trees.
13890 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
13891 * expr.c (java_array_data_offset): Use int_bit_position.
13892 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
13893 (build_invokevirtual): Use tree_low_cst and do computations with trees.
13895 2000-03-16 Tom Tromey <tromey@cygnus.com>
13897 * lang.c (flag_hash_synchronization): New global.
13898 (lang_f_options): Added `hash-synchronization'.
13899 * lang-options.h: Mention -fhash-synchronization.
13900 * java-tree.h (flag_hash_synchronization): Declare.
13901 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
13902 hash table synchronization is disabled.
13903 * decl.c (init_decl_processing): Only push `sync_info' value when
13904 hash table synchronization is disabled.
13905 * class.c (make_class_data): Only push `sync_info' field when hash
13906 table synchronization is disabled. Removed dead code.
13908 2000-03-16 Tom Tromey <tromey@cygnus.com>
13910 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
13912 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13914 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
13916 * parse.y (patch_method_invocation): Handle anonymous classes
13917 creation in static context.
13919 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13921 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
13922 * parse.y (resolve_qualified_expression_name): Use it.
13923 (patch_method_invocation): Likewise.
13925 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13927 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
13928 depending on the type of dependency which dictates what the
13930 (unresolved_type_p): Resolved types limited to the current class.
13932 2000-03-15 Tom Tromey <tromey@cygnus.com>
13934 * decl.c (init_decl_processing): Set type of `sync_info' to be
13937 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
13938 Correctly compute bit number for current slot. Zero `high' and
13939 `low' in DS_LENGTH case. Don't skip inherited fields. Use
13940 mark_reference_fields.
13941 (mark_reference_fields): New function.
13943 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13945 * parse.y (register_incomplete_type): Fixed initialization of
13948 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13950 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
13952 (push_class_context, pop_class_context): New function.
13953 (class_body:): Call pop_class_context.
13954 (interface_body:): Likewise.
13955 (INNER_QUALIFIER): New macro.
13956 (report_class_declaration): Changed output format and use
13957 INNER_QUALIFIER. Call push_class_context.
13959 2000-02-14 Andrew Haley <aph@cygnus.com>
13961 * check-init.c (check_init): Add new cases for unary and binary
13964 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13966 * parse.y (resolve_package): Set `next' once a type name has been
13967 progressively discovered.
13968 (resolve_qualified_expression_name): Propagate resolution only if
13969 there are remaining qualifiers. Take into account `q' might have
13970 been cleared after re-qualification.
13971 * parse.y (patch_method_invocation): New local `resolved'.
13972 Section dealing with qualified expression rewritten to use
13973 resolve_field_access.
13975 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13977 * parse.h (PUSH_CPC): Fixed indentation.
13978 (DEBUG_CPC): New macro.
13979 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
13980 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
13981 * parse.y (class_body_declaration:): Use
13982 SET_CPC_INSTANCE_INITIALIZER_STMT.
13983 (method_declaration:): Check for null current_function_decl.
13984 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
13985 (java_parser_context_pop_initialized_field): Better handling of
13987 (maybe_make_nested_class_name): Mark nested class name as
13988 qualified when necessary.
13989 (end_class_declaration): Don't call java_parse_context_resume when
13990 one or more error occurred.
13991 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
13992 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
13993 SET_CPC_INITIALIZER_STMT.
13994 (method_header): Check for inner classes declaring static methods.
13995 (resolve_qualified_expression_name): Handle situation where `this'
13998 2000-03-13 Hans Boehm <boehm@acm.org>
14000 * typeck.c (build_prim_array_type): Correctly set the high word too.
14002 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14004 * parse.y (java_complete_expand_methods): Leave <clinit> out of
14006 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14007 list of methods for interfaces.
14009 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14011 * parse.y (qualify_ambiguous_name): Properly handle expressions
14014 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14016 * parse.y (check_final_assignment): Extended to process
14018 (patch_assignment): Have check_final_assignment called only once.
14020 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14022 * java-tree.h (IS_INIT_CHECKED): New flag.
14023 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14024 * parse.y (patch_string): Call force_evaluation_order on the
14025 completed string concatenation tree.
14026 * expr.c (force_evaluation_order): Call force_evaluation_order on
14027 function's arguments too.
14029 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14031 * decl.c (emit_init_test_initialization): Mark KEY as unused.
14032 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14033 (build_anewarray): Likewise.
14034 * parse.y (patch_newarray): Likewise.
14035 * parse.c: Regenerated.
14037 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14039 * decl.c (init_decl_processing): Added new class fields `depth',
14040 `ancestors', and `idt' to class_type_node. Use
14041 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14042 * class.c (make_class_data): Push initial values for new fields.
14043 * java-tree.h: Updated prototype for `build_invokeinterface'.
14044 * expr.c (build_invokeinterface): Changed parameters to accept
14045 `method' tree. Calculate index of `method' in its declaring
14046 interface. Build call to _Jv_LookupInterfaceMethodIdx.
14047 (expand_invoke): Call `build_invokeinterface' with new parameters.
14048 * parse.y (patch_invoke): Call `build_invokeinterface' with new
14051 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14053 * typeck.c (lookup_do): Search superinterfaces first
14054 when looking up an interface method. From Godmar Back
14055 <gback@cs.utah.edu>
14057 2000-03-06 Tom Tromey <tromey@cygnus.com>
14059 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14061 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14063 * java-tree.h (lookup_argument_method2): Declared.
14064 (safe_layout_class): Prototype moved from parse.h.
14065 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14066 * parse.y (java_check_regular_methods): Local `super_class' gone.
14067 Call lookup_argument_method2 instead of lookup_argument_method.
14068 Perform modifier match for methods found declared in implemented
14069 interfaces. Fixed indentation problem. Overriding/hiding error
14070 report to take place only for methods found in classes.
14071 * typeck.c (lookup_argument_method): Changed leading
14072 comment. Re-written by calling lookup_do.
14073 (lookup_argument_method2): New function.
14074 (lookup_java_method): Re-written by calling lookup_do.
14075 (lookup_do): New function.
14077 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14079 * check-init.c (check_init): Removed dead code. Handle (blank)
14081 * parse.y (declare_local_variables): New local `final_p', set it
14082 and use it to initialize LOCAL_FINAL.
14083 (check_final_assignment): Only check FIELD_DECLs.
14085 2000-02-17 Tom Tromey <tromey@cygnus.com>
14087 * Makefile.in (JAVA_OBJS): Added boehm.o.
14088 (boehm.o): New target.
14089 * Make-lang.in (JAVA_SRCS): Added boehm.c.
14090 * java-tree.h (flag_use_boehm_gc): Declare.
14091 (get_boehm_type_descriptor): Declare.
14092 * lang.c (lang_f_options): Added `use-boehm-gc'.
14093 (flag_use_boehm_gc): New global.
14094 * lang-options.h: Added -fuse-boehm-gc.
14095 * boehm.c: New file.
14096 * class.c (get_dispatch_table): If class uses a Boehm type
14097 descriptor, put it in the vtable.
14098 (make_class_data): Removed dead code.
14100 2000-03-03 Per Bothner <per@bothner.com>
14102 * decl.c (init_decl_processing): Initialize sizetype properly.
14104 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14106 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14107 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14108 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14109 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14110 (jcf_parse): New local `current'. Load innerclasses seen in outer
14111 context being processed.
14112 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14113 * jcf-write.c (append_innerclasses_attribute): New function.
14114 (append_innerclasses_attribute_entry): Likewise.
14115 (get_access_flags): Handle static classes. Set anonymous and local
14116 classes to be private.
14117 (generate_classfile): Attribute count adjusted. Call
14118 append_innerclasses_attribute.
14119 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14120 PURE_INNER_CLASS_TYPE_P.
14121 * parse.y (parser_qualified_classname): New parameter `is_static',
14122 produce non qualified name accordingly.
14123 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14124 (create_interface): Added argument to parser_qualified_classname.
14125 (create_class): Added argument to parser_qualified_classname. Setup
14126 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14127 (add_inner_class_fields): Fixed indentation.
14128 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14129 (method_declarator): Fixed typo in comment.
14130 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14131 (build_current_thisn): Likewise.
14132 (patch_method_invocation): Likewise.
14134 2000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
14136 * decl.c (current_function_decl): Move to toplev.c.
14138 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14140 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14141 (DECL_BIT_INDEX): Use underlying representation.
14142 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14144 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14146 * expr.c (build_java_ret): Pass proper type to size_binop.
14148 2000-02-25 Anthony Green <green@cygnus.com>
14150 * expr.c (build_class_init): Mark the decl to be ignored by
14152 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14153 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14154 * class.c (init_test_hash_newfunc): New function.
14155 (decl_hash): New function.
14156 (decl_compare): New function.
14157 * decl.c (emit_init_test_initialization): New function.
14158 (complete_start_java_method): Traverse the init test hashtable,
14159 calling emit_init_test_initialization.
14160 (always_initialize_class_p): Define.
14161 * expr.c (build_class_init): Use initialization tests when
14162 emitting class initialization code.
14163 (always_initialize_class_p): Declare.
14164 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14166 * java-tree.h: Include hash.h.
14167 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14168 (struct lang_decl): Add init_test_table field.
14169 (init_test_hash_entry): Define.
14171 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14173 * gjavah.c (main): Avoid using `argi' to report unimplemented
14176 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14178 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14179 initialize locals to avoid warnings. Local `exception_type' moved
14182 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14184 * parse.y (resolve_expression_name): Use `orig' as a second
14185 argument to resolve_field_access.
14186 (resolve_field_access): Removed unnecessary code when dealing with
14189 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14191 * class.c (push_super_field): Don't push the field twice.
14192 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14193 * parse.h (java_reorder_fields): Prototyped.
14194 * parse.y (java_reorder_fields): New function.
14195 (java_layout_class): Simplified not to worry about re-ordering.
14197 2000-02-23 Tom Tromey <tromey@cygnus.com>
14199 * gjavah.c (print_name): In JNI case, correctly quote string.
14200 (print_method_info): Don't handle overrides in JNI mode.
14202 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14204 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14205 value type set to `boolean_type_node'.
14207 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14209 * jcf-dump.c (main): Test for correct condition after
14210 output file creation.
14212 2000-02-19 Anthony Green <green@cygnus.com>
14214 * jcf-depend.c (add_entry): Fix test for first list entry.
14216 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14218 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14219 * constants.c (build_constants_constructor): Likewise.
14221 2000-02-19 Anthony Green <green@cygnus.com>
14223 * jcf-depend.c (add_entry): Add entries to the end of the list.
14225 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
14227 * decl.c (INT_TYPE_SIZE): Define if necessary.
14228 (expand_java_return): Handle the case of a native integer smaller
14229 than a JVM integer.
14231 2000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
14233 * gjavah.c (help): Use GCCBUGURL.
14234 * jv-scan.c (help): Likewise.
14235 * jcf-dump.c (help): Likewise.
14237 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14239 * jcf-write.c (generate_bytecode_insns): Don't generate empty
14242 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14244 * jcf-parse.c (load_class): Call `fatal' if no file containing
14245 the target class are found.
14247 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
14249 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14250 lex.c, lex.h, and PARSE_H to...
14251 (parse.o, parse-scan.o): ...here, respectively.
14253 * lex.c: Split out code that may trigger SIGFPE from yylex()
14254 to its own function.
14255 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14257 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14259 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14261 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14263 * parse.y (outer_field_access_p): Stop in time when outer contexts
14265 (resolve_qualified_expression_name): Properly qualify *everything*
14266 after a package.type to be resoled as expression names.
14267 (find_applicable_accessible_methods_list): Save/restore `class' to
14268 isolate it from a possible outer context search.
14270 2000-02-15 Tom Tromey <tromey@cygnus.com>
14272 * gjavah.c (jni_print_char): New function.
14273 (print_full_cxx_name): Use it.
14274 (decode_signature_piece): Likewise.
14275 (print_cxx_classname): Likewise.
14277 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14279 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14281 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14283 * gjavah.c: Include version.h.
14285 * jcf-dump.c: Likewise.
14287 * jv-scan.c: Likewise.
14289 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14291 * parse.y (outer_field_access_fix): First parameter now a tree
14292 node. Check for assignment to final. First argument to
14293 build_outer_field_access_fix modified to accommodate prototype.
14294 (build_outer_field_access): Don't check for assignment to final
14296 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14297 possibly returned by outer_field_access_fix. Changed
14298 outer_field_access_fix's first argument.
14299 (check_final_assignment): $finit$'s context is OK.
14300 (patch_unaryop): Use node instead of its line/column value when
14301 calling outer_field_access_fix.
14303 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14305 * parse.y (interface_declaration:): No longer tagged
14306 <node>. Re-installed default action.
14307 (class_member_declaration:): Handle inner interfaces.
14308 (interface_member_declaration): Handle inner interfaces and
14310 (create_interface): Push error if one seen. Suspend parsing
14311 context when processing an inner interface.
14312 (register_fields): Inner class static field limitations not to
14313 apply to inner interfaces.
14315 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14317 * jcf-parse.c (load_class): Update `java_error_count' when a
14318 class' file can't be found.
14319 (parse.y): Avoid (byte)code generation when errors seen.
14321 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14323 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14324 decodes a valid node.
14325 (patch_binop): Handle TRUNC_DIV_EXPR.
14327 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14329 * parse.y (resolve_package): New local `acc'. Try to progressively
14330 build and guess a package and type name.
14332 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14334 * parse.y (find_applicable_accessible_methods_list): Load and
14335 layout the search class if necessary.
14336 (java_complete_tree): Keep to original type of the folded initial
14339 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14341 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14342 Generate error message if circularity is detected. New static
14344 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
14345 * jcf-write.c (generate_bytecode_insns): Very simply handle
14347 * parse.y (java_check_circular_reference): Use
14348 `cyclic_inheritance_report' during report, if necessary.
14349 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14350 walking NEW_ARRAY_INIT twice.
14352 2000-02-09 Tom Tromey <tromey@cygnus.com>
14354 * parse.y (check_class_interface_creation): Allow inner classes to
14355 be `private' or `protected', check modifiers' consistency. Prevent
14356 block local classes from bearing any modifiers.
14358 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14360 * except.c (check_start_handlers): Re-add prototype lost in last
14362 (maybe_start_try): Remove excess argument to `check_start_handlers'.
14364 2000-02-09 Andrew Haley <aph@cygnus.com>
14366 * decl.c (clear_binding_level): Remove excess initializer.
14367 (maybe_poplevels): Remove unused variable.
14368 (force_poplevels): Ditto.
14369 (struct binding_level): Add comment.
14371 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14373 * jcf-write.c (generate_classfile): Don't consider
14374 pre-initialization with reference value (use <clinit> instead.)
14375 * parse.y (java_fix_constructors): No generated constructor for
14377 (build_outer_field_access): Removed debug message.
14378 (outer_field_expanded_access_p): Adapted to bytecode generation.
14379 (build_outer_field_access_method): Use fix_method_argument_names.
14380 (build_outer_method_access_method): Fixed indentation. Added
14381 comment. Handle access method generation for static and also void
14383 (build_access_to_thisn): Inserted debug message.
14384 (maybe_build_thisn_access_method): Use fix_method_argument_names.
14385 (resolve_qualified_expression_name): Fixed comment.
14386 (not_accessible_p): Adapted to bytecode generation. Added comment.
14387 (patch_method_invocation): Added comment.
14388 (maybe_use_access_method): Fixed leading comment. Handle static
14390 (java_complete_lhs): Don't shortcut handling of initialized upon
14391 declaration String type static fields when generating bytecode.
14392 (patch_unaryop): Handle outer field access when generating
14395 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14397 * java-tree.h (FIELD_THISN): New macro.
14398 * jcf-write.c (append_synthetic_attribute): New function.
14399 (generate_classfile): Set "Synthetic" attribute on this$<n>,
14400 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14401 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14403 (build_outer_field_access): Turned on access functions usage and
14404 generation when compiling to bytecode.
14405 (maybe_use_access_method): Likewise.
14407 2000-01-25 Andrew Haley <aph@cygnus.com>
14409 * java-except.h (struct eh_range): Add `expanded' field.
14410 (maybe_start_try): Add end_pc arg.
14411 (maybe_end_try): Ditto.
14412 * java-tree.h (force_poplevels): new function.
14413 * expr.c (expand_byte_code): Don't call maybe_start_try or
14415 * except.c (add_handler): Reset expanded.
14416 (expand_start_java_handler): Set expanded.
14417 (check_start_handlers): Don't expand a start handler that's
14418 already been expanded.
14419 (maybe_start_try): Add end_pc arg. Only expand a handler which
14421 (expand_end_java_handler): call force_poplevels.
14422 (force_poplevels): new function.
14423 * decl.c (binding_level): Add start_pc of binding level.
14424 (maybe_pushlevels): Call maybe_start_try when pushing binding
14426 (maybe_poplevels): Call maybe_end_try when popping binding levels.
14427 (LARGEST_PC): Define.
14428 (clear_binding_level): Use LARGEST_PC.
14430 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14431 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14432 (binding_depth, is_class_level, current_pc): new variables.
14433 (struct binding_level): ditto.
14434 (indent): new function.
14435 (push_jvm_slot): add debugging info.
14436 (maybe_pushlevels): ditto.
14437 (maybe_poplevels): ditto.
14438 (pushlevel): ditto.
14440 (start_java_method): ditto.
14441 (give_name_to_locals): comment only.
14442 * except.c (binding_depth, is_class_level, current_pc):
14444 (expand_start_java_handler): add debugging info.
14445 (expand_end_java_handler): ditto.
14447 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14449 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14450 (print_name_for_stub_or_jni, process_file): Constify a char*.
14452 2000-02-03 Tom Tromey <tromey@cygnus.com>
14454 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14456 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14458 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14459 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14462 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14464 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14465 * java-tree.h (TYPE_II_STMT_LIST): New macro.
14466 (struct lang_type): New field `ii_block'.
14467 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14468 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14469 * parse.h (struct parser_ctxt): New field `instance_initializers'.
14470 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14471 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14472 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14474 * parse.y (add_instance_initializer): New function.
14475 (in_instance_initializer): New static global.
14476 (class_body_declaration:): Link instance initializer block.
14477 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14478 (array_creation_expression:): Remove unused local.
14479 (java_parser_context_push_initialized_field): Fixed leading
14480 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14481 CPC_INSTANCE_INITIALIZER_LIST.
14482 (java_parser_context_pop_initialized_field): Likewise.
14483 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14484 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14485 CPC_INITIALIZER_STMT.
14486 (fix_constructors): New local `class_type'. Use it. Call
14487 add_instance_initializer.
14488 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14489 (patch_return): Forbid return in instance initializers.
14490 (patch_throw_statement): Enforce exception handling in the context
14491 of instance initializers.
14493 2000-02-03 Tom Tromey <tromey@cygnus.com>
14495 * Make-lang.in (java.mostlyclean): Remove executables in
14498 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14500 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14501 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14502 (java_float_finite): Convert to use union Word from javaop.h.
14503 (java_double_finite): Convert to use union DWord from javaop.h.
14505 2000-02-02 Tom Tromey <tromey@cygnus.com>
14507 * gjavah.c (options): Added `jni' entry.
14508 (help): Document -jni.
14509 (flag_jni): New global.
14510 (process_file): Handle JNI output. Don't print text from
14511 -prepend, -add, etc, when generating stubs. Only remove `.class'
14512 suffix if it actually exists.
14513 (main): Create a `.c' file when run with `--jni --stubs'. Create
14514 correct output file name with `--jni'.
14515 (print_include): Mangle header name differently in JNI case.
14516 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14518 (print_method_info): Handle JNI case. Put signature info into
14519 method name. Handle case when STREAM is NULL.
14520 (print_name_for_stub_or_jni): New function.
14521 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
14522 (print_cxx_classname): Handle JNI.
14523 (print_full_cxx_name): Likewise.
14524 (decode_signature_piece): Likewise.
14525 (overloaded_jni_method_exists_p): New function.
14526 (struct method_name): Added `signature' and `sig_length' fields.
14527 (HANDLE_END_FIELD): Do nothing in JNI mode.
14529 2000-02-02 Tom Tromey <tromey@cygnus.com>
14531 * jv-scan.c: Include version.c, <getopt.h>.
14532 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14533 (options): New array.
14534 (usage): New function.
14535 (version): New function.
14536 (main): Use getopt_long to parse command line.
14537 * jcf-dump.c: Include version.c, <getopt.h>.
14538 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14539 OPT_JAVAP): New macros.
14540 (options): New array.
14541 (usage): Return `void'. Changed message.
14542 (help): New function.
14543 (version): New function.
14544 (main): Use getopt_long_only to parse command line.
14545 * gjavah.c: Include <getopt.h>.
14546 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14547 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14548 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14549 (options): New array.
14550 (java_no_argument): Removed.
14551 (help): Updated with missing options.
14552 (main): Use getopt_long_only to parse command line.
14553 (usage): Changed message.
14555 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14557 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14558 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
14559 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
14560 * parse.y (array_creation_expression:): Handle anonymous arrays.
14561 (build_array_from_name): Don't set `ret_name' if null.
14562 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
14563 (qualify_ambiguous_name): Likewise.
14564 (java_complete_expand_class): Likewise.
14566 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14568 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
14569 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
14570 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
14571 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
14572 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
14573 AIPL_FUNCTION_COMPLETED_INVOCATION.
14574 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
14575 AIPL_FUNCTION_INVOCATION_READY.
14576 (AIPL_FUNCTION_DECLARATION): New enum entry.
14577 * parse.y (reorder_static_initialized): New function.
14578 (java_parser_context_pop_initialized_field): Use it.
14579 (add_inner_class_fields): Use
14580 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
14581 augmented. Install marker after last alias initializer, if any.
14582 (generate_finit): Fixed typo. Don't try to retain only the used
14584 (method_header): Compute and set DECL_FUNCTION_NAP.
14585 (method_declarator): Fixed comment. Insert alias initializer in
14587 (build_alias_initializer_parameter_list): Fixed leading
14588 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
14589 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
14590 (java_complete_expand_class): Code to retain only used aliases
14592 (java_complete_expand_methods): New local `first_decl'. Generate
14593 $finit$ first, then expand the constructors, regular methods and
14595 (java_complete_expand_method): Don't report error on missing
14596 return statement if previously detected bogus.
14597 (fix_constructors): Don't patch constructor parameters list.
14598 (patch_method_invocation): Use new AIPL enum values. Reverse
14599 alias initializer list for anonymous classes.
14601 2000-01-30 Anthony Green <green@redhat.com>
14603 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
14604 determine how many stack slots to pop.
14606 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
14608 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
14609 error handling/recovery.
14610 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
14612 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14614 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
14615 FIELD_LOCAL_ALIAS_USED): New macros.
14616 (DECL_FUNCTION_NAP): New macro.
14617 (struct lang_decl): New field `nap'.
14618 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
14619 (struct lang_type): New fields `finit_stmt_list' and
14620 `clinit_stmt_list'.
14621 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
14622 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
14623 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
14624 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
14625 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
14626 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
14627 (BUILD_THROW): Macro line separator re-indented.
14628 * parse.y (end_class_declaration): New function.
14629 (maybe_generate_pre_expand_clinit): New name for
14630 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
14631 pre-expand static fields.
14632 (maybe_generate_clinit): Function deleted.
14633 (check_for_static_method_reference): Prototype's parameter list
14635 (generate_finit): New name for maybe_generate_finit. Changed
14636 leading comment. Function rewritten to use
14637 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
14638 (build_alias_initializer_parameter_list): New function.
14639 (java_parser_context_pop_initialized_field): Likewise.
14640 (add_inner_class_fields): Likewise.
14641 (type_declaration:): Call end_class_declaration.
14642 (class_member_declaration:): Likewise.
14643 (formal_parameter_list:): Fixed typos.
14644 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
14645 element. Improved error handling.
14646 (block_statement:): Call end_class_declaration.
14647 (anonymous_class_creation:): Likewise.
14648 (create_anonymous_class): Fixed comments.
14649 (create_class): Call add_inner_class_fields.
14650 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
14651 (method_header): Use MARK_FINAL_PARMS.
14652 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
14653 (method_declarator): Propagate final argument flag.
14654 (craft_constructor): New local `artificial'. Call
14655 build_alias_initializer_parameter_list. Use
14656 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
14657 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
14659 (complete_expand_class): Get rid of unused outer context local
14661 (java_complete_expand_methods): Fixed leading
14662 comment. Generate/pre-expand <clinit> first. Changed method
14663 expansion order to regular, $finit$, constructors, <clinit>.
14664 (java_complete_expand_method): Set current_function_decl.
14665 (fix_constructors): Fix constructor parameter list to account for
14666 outer context local alias initializers.
14667 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14668 (resolve_expression_name): Lookup outer context local aliases. New
14669 local `access', use it.
14670 (patch_method_invocation): Patch inner class ctor invocation with
14671 outer context local aliases initialization values. $finit$
14672 invocation patching now includes things generated with
14673 build_alias_initializer_parameter_list.
14674 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14675 (build_super_invocation): Likewise.
14676 (patch_assignment): Changed comment.
14678 2000-01-27 Andrew Haley <aph@cygnus.com>
14680 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
14684 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14686 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
14688 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
14690 * parse.y (register_fields): Don't pass a format specifier to
14691 OBSOLETE_MODIFIER_WARNING.
14692 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
14693 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
14695 (check_modifiers): Change function into a macro.
14696 (check_class_interface_creation): Pass a literal format string.
14698 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14700 * buffer.h: PROTO -> PARAMS.
14701 * check-init.c: Likewise.
14702 * class.c: Likewise.
14703 * constants.c: Likewise.
14704 * convert.h: Likewise.
14705 * decl.c: Likewise.
14706 * except.c: Likewise.
14707 * expr.c: Likewise.
14708 * gjavah.c: Likewise.
14709 * java-except.h: Likewise.
14710 * java-tree.h: Likewise.
14711 * jcf-depend.c: Likewise.
14712 * jcf-dump.c: Likewise.
14713 * jcf-parse.c: Likewise.
14714 * jcf-path.c: Likewise.
14715 * jcf-reader.c: Likewise.
14716 * jcf-write.c: Likewise.
14718 * jv-scan.c: Likewise.
14719 * jvgenmain.c: Likewise.
14720 * jvspec.c: Likewise.
14721 * lang.c: Likewise.
14724 * parse-scan.y: Likewise.
14725 * parse.h: Likewise.
14726 * parse.y: Likewise.
14727 * typeck.c: Likewise.
14728 * verify.c: Likewise.
14729 * xref.c: Likewise.
14730 * xref.h: Likewise.
14731 * zextract.c: Likewise.
14732 * zipfile.h: Likewise.
14734 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14736 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14737 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
14738 * constants.c (build_constant_data_ref): Check for cached
14739 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
14740 in TYPE_CPOOL_DATE_REF.
14741 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
14742 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
14743 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
14744 (LOCAL_FINAL): New macro.
14745 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
14746 constant pool -- don't try to reuse.
14747 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
14748 TYPE_LANG_SPECIFIC.
14749 (find_in_current_zip): Use TYPE_JCF.
14750 * parse.h (java_check_final): Prototype removed.
14751 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
14752 (maybe_create_class_interface_decl,
14753 check_class_interface_creation): Likewise.
14754 (java_expand_finals): Function removed.
14755 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
14756 (block_statement:): Fixed comment.
14757 (anonymous_class_creation:): Likewise.
14758 (check_class_interface_creation): Reversed Jan 12, 2000 extra
14760 (check_class_interface_creation): Loosened error report on (inner)
14761 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
14762 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
14763 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
14765 (create_interface): Likewise.
14766 (anonymous_class_counter): New static global.
14767 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
14768 patch. Fixed comments.
14769 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
14770 anonymous_class_counter when declaring a toplevel class.
14771 (craft_constructor): Fixed constructor name when handling
14772 anonymous classes. Anonymous class constructors to feature hidden
14773 this$<n> parameter.
14774 (java_fix_constructors): Added comment.
14775 (java_check_final): Function removed.
14776 (java_complete_expand_methods): Fixed comment. Don't generate
14777 class data, save its outgoing constant pool instead.
14778 (verify_constructor_super): Skip anonymous class constructor
14779 hidden this$<n> parameter.
14780 (java_expand_classes): New local `saved_ctxp'. Removed call to
14781 java_expand_finals and java_check_final. Expand anonymous class
14782 constructors. Generate class data.
14783 (build_super_invocation): Skip anonymous class hidden this$<n>
14785 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
14786 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14787 (set_java_signature): Likewise.
14789 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14791 * gjavah.c: Delete ACC_VISIBILITY define.
14792 * jcf.h: Add ACC_VISIBILITY define.
14793 * parse.y: final: rule tagged <value>.
14794 (java_check_regular_methods): Use ACC_VISIBILITY define for
14795 default package access check.
14796 (local_variable_declaration_statement): Use final: rule.
14798 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14800 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
14801 (final:): New rule.
14803 2000-01-17 Tom Tromey <tromey@cygnus.com>
14805 * gjavah.c (print_field_info): Allow non-static final fields.
14807 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14809 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
14810 * parse.y (patch_anonymous_class): New function.
14811 (create_anonymous_class): Register incomplete type when the
14812 class/interface to extends/implement isn't known yet.
14813 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
14814 (verify_constructor_super): Tuned error message.
14816 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14818 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
14819 (ANONYMOUS_CLASS_P): New macro.
14820 (TYPE_SIGNATURE, TYPE_JCF): New macros.
14821 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
14822 * parse.y (create_class): Added leading argument.
14823 (maybe_create_class_interface_decl,
14824 check_class_interface_creation): Likewise.
14825 (craft_constructor): New function.
14826 (verify_constructor_super): Added argument in prototype.
14827 (class_declaration:): Inserted leading argument.
14828 (for_begin:): Use FOR_LOOP_P.
14829 (anonymous_class_creation): Create WFL of the anonymous class to
14830 instantiate. Call build_new_invocation. Added comments.
14831 (check_class_interface_creation): Handle parameter `anonymous' in
14832 verbose mode class creation announce.
14833 (link_nested_class_to_enclosing): Exclude anonymous classes.
14834 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
14835 anonymous class, even though they appear to have an enclosing
14837 (create_interface): Pass extra argument to
14838 check_class_interface_creation.
14839 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
14840 (create_class): Call check_class_interface_creation and
14841 maybe_create_class_interface_decl with extra new argument. Don't
14842 add private this$<n> to anonymous classes.
14843 (method_declarator): Insert hidden this$<n> to anonymous class
14845 (java_fix_constructors): Deleted code creating default
14846 constructor. Call craft_constructor instead.
14847 (java_check_regular_methods): Set `saw_constructor' to 1 for
14849 (fix_constructors): Pass extra argument to verify_constructor_super.
14850 (verify_constructor_super): New local `sdecl', use it. Search for
14851 matching constructor (possibly featuring arguments) in super
14853 (lookup_method_invoke): Craft constructor according to arguments
14854 list when dealing with anonymous class constructors.
14855 (build_super_invocation): Pass arguments to anonymous class super
14857 (search_loop): Use FOR_LOOP_P.
14858 (labeled_block_contains_loop_p): Likewise.
14860 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14862 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
14863 (enclosing_context_p): New function.
14864 (get_access_flags_from_decl): Handle CLASS_STATIC.
14865 (maybe_layout_super_class): Extra first argument passed to
14867 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
14869 * decl.c (access0_identifier_node): New global.
14870 (init_decl_processing): access0_identifier_node initialized.
14871 (pushdecl): Set DECL_CONTEXT only on non type decls.
14872 * expr.c (lookup_field): Lookup inner class fields in enclosing
14874 (expand_invoke): Use ID_INIT_P.
14875 (expand_java_field_op): Use DECL_CLINIT_P.
14876 * java-tree.def (CLASS_LITERAL): New tree code.
14877 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
14878 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
14879 (struct lang_decl): New field `inner_access'.
14880 (enclosing_context_p): Prototyped.
14881 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
14882 ID_CLINIT_P): New macros.
14883 (CLASS_STATIC): New macro.
14884 (CLASS_ACCESS0_GENERATED_P): New macro.
14885 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
14886 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
14887 INNER_CLASS_P): New macros.
14888 (DECL_INNER_CLASS_LIST): New macro.
14889 * jcf-parse.c (yyparse): Avoid the use of ANSI string
14891 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14892 the shift value to int. Fixed typo in comment.
14893 * lex.c (inst_id, wpv_id): Initialize.
14894 * mangle.c (unicode_mangling_length): Take `$' into account.
14895 * parse.h (DRECOVER, RECOVER): Terminate properly.
14896 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
14897 (typedef struct _jdep): New field `enclosing'.
14898 (JDEP_ENCLOSING): New macro.
14899 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
14900 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
14901 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
14902 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
14903 GET_ENCLOSING_CPC_CONTEXT): New macros.
14904 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
14905 (do_resolve_class): Added extra argument in prototype.
14906 * parse.y (resolve_class): Added extra argument in prototype.
14907 (maybe_create_class_interface_decl): Likewise.
14908 (maybe_use_access_method, build_wfl_wrap): New functions.
14909 (java_complete_expand_classes, java_complete_expand_class):
14911 (java_parser_context_push_initialized_field,
14912 java_parser_context_suspend, java_parser_context_resume):
14914 (maybe_make_nested_class_name, make_nested_class_name,
14915 set_nested_class_simple_name_value,
14916 link_nested_class_to_enclosing, find_as_inner_class,
14917 find_as_inner_class_do, check_inner_class_redefinition,
14918 build_thisn_assign, build_current_thisn, build_access_to_thisn,
14919 maybe_build_thisn_access_method, build_outer_field_access,
14920 build_outer_field_access_methods, build_outer_field_access_expr,
14921 build_outer_method_access_method, build_new_access_id,
14922 build_outer_field_access_method, outer_field_access_p,
14923 outer_field_expanded_access_p, outer_field_access_fix,
14924 build_incomplete_class_ref, patch_incomplete_class_ref,
14925 create_anonymous_class): Likewise.
14926 (inst_id, wpv_id): New static global variables.
14927 (synchronized:): New rule, tagged <node>.
14928 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
14930 (anonymous_class_creation:): New rule, tagged <node>.
14931 (NEW_TK): Tagged <node>.
14932 (type_literals, array_type_literal): New rules, tagged <node>.
14933 (class_declaration:): Removed action when reducing by class_body:
14934 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
14935 using GET_CPC in sub-rules.
14936 (class_member_declaration): Handle inner classes.
14937 (method_declaration): When reducing method_header:, reset
14938 current_function_decl when appropriate.
14939 (method_declarator:): Set the number of formal parameter to 0 for
14940 method declared without arguments.
14941 (constructor_declarator:): Likewise.
14942 (static_initializer:): List of elements kept in a list.
14943 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
14944 use of the keyword `static' for type declarations.
14945 (block_statement:): Handle inner class declarations.
14946 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
14947 type qualified `this'.
14948 (class_instance_creation_expression): Use anonymous_class_creation:
14949 to handle inner class instances creation. Handle qualified `new'.
14950 (something_dot_new): Added appropriate actions.
14951 (create_new_parser_context): New function.
14952 (java_push_parser_context, java_parser_context_save_global,
14953 java_parser_context_suspend): Use create_new_parser_context.
14954 (check_modifiers): Changed leading comment.
14955 (check_class_interface_creation): Handle interclasses.
14956 (add_superinterfaces): Fixed comment.
14957 (create_interface): Build qualified name from the raw_name instead
14958 of its matching WFL. Push the initialized fields list. raw_name added
14959 as an extra argument to maybe_create_class_interface_decl.
14960 (create_class): Build qualified name from the raw_name instead of
14961 its matching WFL. Removed assignment to current_parsed_class_un.
14962 Call PUSH_ERROR before returning an error. Suspend the current
14963 parser context when processing an inner class. Push the
14964 initialized fields list. raw_name added as an extra argument to
14965 maybe_create_class_interface_decl. Add the private this$<n>
14967 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
14968 (register_fields): Get the class type from GET_CPC and handle
14969 previous errors. Added code to handle the creation of static
14970 fields in inner classes. Initialized fields initialization
14971 statements kept in a list of lists.
14972 (maybe_generate_finit): Initialized fields initialization
14973 statements kept in a list of lists. Use GET_CPC.
14974 (maybe_generate_clinit): Likewise.
14975 (method_header): Use GET_CPC and GET_CPC_UN.
14976 (parser_qualified_classname): Handle inner classes.
14977 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
14978 (java_fix_constructors): Hide pointer to enclosing context
14979 instance in constructor list when dealing with inner classes.
14980 (jdep_resolve_class): Call resolve_class with extra first argument
14982 (resolve_class): Add enclosing context as a first extra argument
14983 to do_resolve_class.
14984 (do_resolve_class): Call find_as_inner_class. Handle WFLs
14986 (resolve_no_layout): Extra argument added to resolve_class
14988 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
14989 (java_get_real_method_name): Use GET_CPC_UN.
14990 (check_abstract_method_definitions): Use DECL_CLINIT_P.
14991 (java_check_abstract_methods): Handle static method declared in
14992 inner classes by an error.
14993 (java_check_regular_methods): Use DECL_CLINIT_P.
14994 (source_start_java_method): Also set DECL_MAX_LOCALS.
14995 (create_artificial_method): Call java_parser_context_save_global
14996 and java_parser_context_restore_global instead of saving/restoring
14997 the context by hand.
14998 (expand_start_java_method): Improved verbose mode message.
14999 (java_complete_expand_methods): Fixed leading comment. Use
15001 (fix_constructors): Added assignment to this$<n> if necessary.
15002 (java_expand_classes): Call java_complete_expand_classes instead
15003 of java_complete_expand_methods.
15004 (make_qualified_primary): Simplified.
15005 (merge_qualified_name): Optimized for missing left or right parts.
15006 (resolve_expression_name): Handle access to outer class fields from
15008 (resolve_qualified_expression_name): New macro
15009 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15010 classes. Report error on non appropriate qualification of
15011 `new'. Handle qualified `this'.
15012 (not_accessible_p): Allow access to outer class private fields from
15014 (patch_method_invocation): Handle method invocations through
15015 access methods and inner class constructor invocations.
15016 (find_applicable_accessible_methods_list): Search enclosing
15017 contexts of an inner class.
15018 (search_applicable_methods_list): Fixed typo.
15019 (argument_types_convertible): Handle inner class constructors'
15020 hidden outer context reference argument.
15021 (qualify_ambiguous_name): Handle qualified `this'.
15022 (java_complete_lhs): Handle use of field accessed through
15023 artificial access methods in various cases of assignments. Handle
15024 CLASS_LITERAL node.
15025 (check_final_assignment): Use DECL_CLINIT_P.
15026 (valid_ref_assignconv_cast_p): Handle the destination being an
15027 enclosing context of the source.
15028 (patch_unaryop): Handle use of field accessed through artificial
15030 (patch_return): Use DECL_CLINIT_P.
15031 (patch_throw_statement): Use DECL_CLINIT_P.
15032 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15033 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15036 2000-01-16 Anthony Green <green@cygnus.com>
15038 * parse.y (build_string_concatenation): Only use
15039 StringBuffer(String) shortcut if String arg is constant.
15041 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15043 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15044 the shift value to int. Fixed typo in comment.
15046 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
15048 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15049 * jcf-write.c: Likewise.
15050 * parse.y: Likewise.
15051 * parse.c: Regenerate.
15053 2000-01-09 Anthony Green <green@cygnus.com>
15055 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15056 bytecodes in the correct order.
15058 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15060 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15062 2000-01-06 Anthony Green <green@cygnus.com>
15064 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15065 before building constant array decl.
15067 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
15069 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15070 method invocation and typo in conditional expression.
15071 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15072 the appropriate NOTE_POP.
15073 * parse.y (patch_binop): Shift value mask to feature the right
15076 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15078 * class.c (assume_compiled, assume_compiled_node): Add static
15080 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15082 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15084 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15086 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15087 to `__modifier' to avoid stringifying it.
15089 * parse.y (verify_constructor_circularity): Don't call a variadic
15090 function with a non-literal format string.
15091 (java_check_abstract_methods): Move unreachable code inside
15092 `continue' statement.
15093 (lookup_method_invoke): Call xstrdup, not strdup.
15095 * expr.c (expand_java_field_op): Avoid the use of ANSI string
15098 * jcf-parse.c (yyparse): Likewise.
15100 * jv-scan.c (main): Likewise.
15102 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15104 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15105 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15106 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15109 * parse.y (synchronized, variable_redefinition_error,
15110 check_class_interface_creation, create_interface, create_class,
15111 method_header, finish_method_declaration,
15112 check_modifiers_consistency, method_declarator,
15113 complete_class_report_errors, check_abstract_method_definitions,
15114 java_check_regular_methods, check_throws_clauses,
15115 java_check_abstract_methods, read_import_dir,
15116 check_pkg_class_access, declare_local_variables, fix_constructors,
15117 cut_identifier_in_qualified, resolve_expression_name,
15118 resolve_qualified_expression_name, patch_method_invocation,
15119 java_complete_lhs, patch_assignment, try_builtin_assignconv,
15120 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15121 patch_exit_expr, patch_exit_expr, patch_switch_statement,
15122 patch_try_statement, patch_synchronized_statement,
15123 patch_throw_statement, check_thrown_exceptions,
15124 patch_conditional_expr): Likewise.
15126 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15128 * Makefile.in (LIBDEPS): Added gcc's errors.o
15129 (../jcf-dump$(exeext):): Link with gcc's errors.o
15130 (../gcjh$(exeext):): Likewise.
15131 * expr.c (expand_java_NEW): Layout the entire target type instead of
15132 laying out its methods only.
15133 (lookup_field): Layout the class after having loaded it.
15134 * java-tree.h (java_debug_context): Declared.
15135 * jcf-io.c (toplev.h): Included.
15136 (find_class): Removed assignment to jcf's outofsynch
15137 field. Force source file to be read if newer than its matching
15138 class file. Tweaked debug messages.
15139 * jcf-parse.c (jcf_out_of_synch): Deleted.
15140 (read_class): Call to jcf_out_of_synch removed.
15141 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15142 (jcf_out_of_synch): Prototype deleted.
15143 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15144 `deprecated' and `class_err': integer turned into bit-fields.
15145 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15146 * parse.y (package_list): New global.
15147 (package_declaration:): Record newly parsed package name.
15148 (extra_ctxp_pushed_p): Static global deleted.
15149 (java_parser_context_save_global): Create buffer context for the
15150 purpose of saving globals, if necessary.
15151 (java_parser_context_restore_global): Pop context pushed for the
15152 purpose of saving globals, if necessary.
15153 (java_debug_context_do): New prototype and function.
15154 (java_debug_context): Likewise.
15155 (do_resolve_class): Use already parsed package names to qualify
15156 and lookup class candidate.
15157 (java_pre_expand_clinit): Removed unnecessary local variable.
15159 1999-12-17 Tom Tromey <tromey@cygnus.com>
15161 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
15163 (process_file): Use `\n\' at end of each line in string.
15165 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15167 * expr.c (expand_invoke): Layout the loaded class before
15168 attempting to use it.
15169 (expand_java_field_op): Allow final field assignments to take
15171 * typeck.c (convert): Return error_mark_node if expr is null.
15173 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15175 * class.c (class_depth): Return -1 if the class doesn't load
15177 * expr.c (can_widen_reference_to): Check for errors during depth
15178 computation and return 0 accordingly.
15179 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15180 create default constructors and add an other error check.
15181 * parse.h (java_fix_constructors): Prototyped.
15182 * parse.y (java_pre_expand_clinit): Likewise.
15183 (build_super_invocation): Re-prototyped to feature one argument.
15184 (java_check_circular_reference): Directly use `current'.
15185 (java_fix_constructors): New function.
15186 (java_check_regular_methods): Don't create default constructors
15187 here, but abort if none were found.
15188 (java_complete_expand_methods): Pre-process <clinit> calling
15189 java_pre_expand_clinit.
15190 (java_pre_expand_clinit): New function.
15191 (fix_constructors): build_super_invocation invoked with the
15192 current method declaration as an argument.
15193 (build_super_invocation): Use the context of the processed method
15194 decl argument instead of current_class.
15195 * typeck.c (lookup_java_method): Take WFLs in method names into
15198 1999-12-14 Per Bothner <per@bothner.com>
15200 * class.c (make_class_data): flag_keep_inline_functions to keep
15201 private methods in the method array.
15203 1999-12-15 Anthony Green <green@cygnus.com>
15205 * check-init.c (check_init): Take into account both types of
15206 `throw's when checking for uninitialized variables.
15208 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15210 * parse.y (java_complete_lhs): Force conversion of array
15211 dimensions to int_type_node, that's what runtime's ABI expects.
15213 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15215 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15216 operand of a WFL, until the Java front-end gets fixed with regard
15217 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15219 1999-12-10 Andrew Haley <aph@cygnus.com>
15221 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15222 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15223 expr.c (build_java_athrow): Add support for sjlj-exceptions.
15224 java-tree.h: Ditto.
15225 jcf-write.c: Ditto.
15227 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
15229 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15230 before calling expand_eh_region_start and expand_start_all_catch.
15231 * except.c (expand_start_java_handler): Switch to permanent
15232 obstack before calling expand_eh_region_start.
15233 (expand_end_java_handler): Switch to permanent obstack before
15234 calling expand_start_all_catch.
15236 1999-12-5 Anthony Green <green@cygnus.com>
15238 * decl.c (init_decl_processing): Mark throw_node as a noreturn
15239 function with side effects.
15240 (init_decl_processing): Mark all memory allocating DECLs with
15243 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15245 * except.c (expand_end_java_handler): Call
15246 expand_resume_after_catch and end_catch_handler.
15248 1999-11-30 Anthony Green <green@cygnus.com>
15250 * verify.c (verify_jvm_instructions): Create new return label
15251 chain if non existent (don't rely on the verified state of the jsr
15254 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15256 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15257 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15259 * parse.y (patch_assignment): Removed bogus final class test on
15260 lhs when checking on whether to emit an ArrayStoreException runtime
15262 * expr.c (expand_java_arraystore): Likewise.
15264 1999-11-28 Anthony Green <green@cygnus.com>
15266 * decl.c (find_local_variable): Reuse single slot decls when
15269 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15271 * jcf-parse.c (saw_java_source): Global variable removed.
15272 (read_class): Don't use `saw_java_source'. Added extra braces.
15273 (yyparse): Code setting `saw_java_source' removed.
15275 1999-11-24 Mark Mitchell <mark@codesourcery.com>
15277 * except.c (emit_handlers): Zero catch_clauses after emitting them.
15279 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15281 * verify.c (merge_type_state): Non verified subroutines being
15282 considered more than once to trigger passive type merge.
15284 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15286 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15287 in case of error. Error message tuned.
15289 1999-11-21 Anthony Green <green@cygnus.com>
15291 * constants.c (find_methodref_index): Unwrap method names before
15292 inserting them in the constant pool.
15294 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15296 * class.c (assume_compiled_node): New typedef.
15297 (assume_compiled_tree): New static data.
15298 (find_assume_compiled_node): New function.
15299 (add_assume_compiled): New function.
15300 (assume_compiled): New function.
15301 * class.c (make_class_data): Use assume_compiled.
15302 (is_compiled_class): Use assume_compiled.
15304 * java-tree.h (add_assume_compiled): Declare.
15306 * lang.c (lang_decode_option): Parse new options.
15308 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15310 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15311 int_type_node: that's what `_Jv_AllocObject' expects.
15313 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15315 * parse.y (lookup_method_invoke): Use lang_printable_name to
15316 reliably build the type name during error report. Fixes PR gcj/97.
15318 1999-11-09 Tom Tromey <tromey@cygnus.com>
15320 * jcf-path.c: Include <sys/stat.h>.
15321 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
15322 (DIR_UP): New macro.
15324 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15326 * parse.y (source_end_java_method): Resume permanent allocation,
15327 reversing Apr 27 1998 patch.
15328 (patch_string_cst): Pop obstacks after having pushed the permanent
15331 1999-11-05 Tom Tromey <tromey@cygnus.com>
15333 * class.c (finish_class): Emit inlined methods if any native
15334 methods exist in the class. Fixes PR gcj/85.
15336 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
15338 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15339 (qualify_ambiguous_name): Likewise.
15341 1999-11-03 Godmar Back <gback@cs.utah.edu>
15343 * typeck.c: (lookup_java_method): search all inherited
15344 interfaces when looking up interface method.
15346 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15348 * parse.y (method_header:): Issue error message for rule `type
15350 (synchronized:): Error report when not using synchronized.
15352 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15354 * parse.y (resolve_qualified_expression_name): Prevent `this' from
15355 being used before the superclass constructor has been called.
15356 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15357 instead of `CALL_THIS_CONSTRUCTOR_P'.
15359 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
15361 * check-init.c: Fix typo in comment.
15363 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15365 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15368 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15370 * parse.y (expression_statement:): Call function to report
15371 improper invocation of a constructor.
15372 (parse_ctor_invocation_error): New function.
15374 1999-10-26 Mark Mitchell <mark@codesourcery.com>
15376 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15379 1999-10-21 Tom Tromey <tromey@cygnus.com>
15381 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15382 in generated `main'.
15384 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15386 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15387 (qualify_ambiguous_name): Likewise.
15389 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15391 * parse.y (java_complete_tree): fold_constant_for_init to work on
15393 (java_complete_lhs): Likewise.
15394 (array_constructor_check_entry): Complete an initializer element
15395 on permanent_obstack.
15397 1999-10-19 Tom Tromey <tromey@cygnus.com>
15399 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15400 From Mike Moreton <mike@pillim.demon.co.uk>.
15402 1999-10-15 Greg McGary <gkm@gnu.org>
15404 * java-tree.h (flag_bounds_check): Remove extern decl.
15405 * lang.c (flag_bounds_check): Remove global variable.
15406 (lang_f_options): Remove "bounds-check" entry.
15407 (lang_init_options): Default flag_bounds_check to "on".
15409 1999-10-14 Tom Tromey <tromey@cygnus.com>
15411 * jvgenmain.c (usage): New function.
15412 (main): Use it. Also, handle `-D' options.
15413 * jvspec.c (lang_specific_driver): Recognize -D.
15414 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15416 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15418 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15420 * jcf-dump.c (print_constant, disassemble_method): Don't call a
15421 variadic function with a non-literal format string.
15423 * parse-scan.y (report_main_declaration): Likewise.
15425 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15427 * parse.y (read_import_dir, patch_assignment, patch_binop,
15428 patch_array_ref): Likewise.
15430 * typeck.c (build_java_array_type): Likewise.
15432 * verify.c (verify_jvm_instructions): Likewise.
15434 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15436 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
15438 1999-10-07 Anthony Green <green@cygnus.com>
15440 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15441 where CHECK_PUT may fail for valid reasons.
15443 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
15444 UNSAFE_PUTN): New macros.
15446 1999-10-04 Tom Tromey <tromey@cygnus.com>
15448 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15449 well. Fixes Java PR gcj/59.
15450 * parse-scan.y (yyerror): Report errors.
15452 1999-09-24 Glenn Chambers <GChambers@provsol.com>
15454 * decl.c (insert_block): Remove unconditional `abort'.
15456 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
15458 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
15459 FUNCTION_CODE now of type int. All callers changed.
15460 Set the builtin's DECL_BUILT_IN_CLASS.
15462 1999-09-23 Tom Tromey <tromey@cygnus.com>
15464 * jvspec.c (lang_specific_driver): Don't read spec file if
15465 -fsyntax-only given.
15467 1999-09-22 Tom Tromey <tromey@cygnus.com>
15469 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15471 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15472 (WORDS_TO_LONG): Likewise.
15473 (WORDS_TO_DOUBLE): Likewise.
15475 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15477 * jcf-write.c (RELOCATION_VALUE_0): New macro.
15478 (RELOCATION_VALUE_1): Likewise.
15479 (emit_iinc, emit_reloc, push_constant1, push_constant2,
15480 push_in_const, push_long_const): Prototyped.
15481 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15482 (push_constant2): Likewise.
15483 (push_int_const): Cast find_constant1's integer arguments to `jword'.
15484 (find_constant_wide): Cast find_constant2's integer arguments to
15486 (find_constant_index): Cast find_constant2's and find_constant2's
15487 integer arguments to `jword'.
15488 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15489 (emit_switch_reloc): Use RELOCATION_VALUE_0.
15490 (emit_if): Use RELOCATION_VALUE_1.
15491 (emit_goto): Likewise.
15492 (emit_jsr): Likewise.
15493 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
15494 argument to push_long_const to HOST_WIDE_INT.
15496 1999-09-15 Andreas Schwab <schwab@suse.de>
15498 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15500 1999-09-20 Nick Clifton <nickc@cygnus.com>
15502 * lang.c (lang_decode_option): Extend comment.
15504 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15506 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
15509 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15511 * gjavah.c (get_field_name, print_method_info, print_include,
15512 add_namelet): Use xmalloc, not malloc.
15514 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
15515 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15518 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15520 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
15522 * jcf-path.c (add_entry): Likewise.
15524 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15526 * jv-scan.c (xmalloc): Remove definition.
15528 * jvgenmain.c (xmalloc): Likewise.
15530 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15532 * lex.c (java_store_unicode): Use xrealloc, not realloc.
15534 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
15535 concat, not xmalloc/sprintf.
15536 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15537 (xstrdup): Remove definition.
15539 * parse.y (duplicate_declaration_error_p,
15540 constructor_circularity_msg, verify_constructor_circularity,
15541 check_abstract_method_definitions, java_check_regular_methods,
15542 java_check_abstract_methods, patch_method_invocation,
15543 check_for_static_method_reference, patch_assignment, patch_binop,
15544 patch_cast, array_constructor_check_entry, patch_return,
15545 patch_conditional_expr): Use xstrdup, not strdup.
15547 * zextract.c (ALLOC): Use xmalloc, not malloc.
15549 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15551 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15553 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
15554 (do_spec, lang_specific_pre_link, lang_specific_driver,
15555 input_filename, input_filename_length): Don't declare.
15556 (main_class_name, jvgenmain_spec, lang_specific_driver):
15558 (lang_specific_driver): All calls to the function pointer
15559 parameter now explicitly call `fatal'.
15561 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15563 * parse.y (find_applicable_accessible_methods_list): Search
15564 abstract classes as interfaces.
15566 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15568 * class.c (finish_class): We're now outside a valid method
15569 declaration. Tell the rest of gcc so.
15571 1999-09-08 Bruce Korb autogen@linuxbox.com
15573 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
15575 1999-09-07 Tom Tromey <tromey@cygnus.com>
15577 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
15579 (decode_signature_piece): Don't emit "::" in JArray<>.
15580 (print_namelet): Only print trailing `;' when printing a class.
15582 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
15584 * java-tree.h: Delete declarations for all tree nodes now moved to
15586 * decl.c: Delete their definitions.
15588 1999-09-04 Mark Mitchell <mark@codesourcery.com>
15590 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
15591 * Makefile.in (OBJS): Add ggc-callbacks.o.
15592 (OBJDEPS): Likewise.
15594 1999-09-03 Tom Tromey <tromey@cygnus.com>
15596 * parse.y (strip_out_static_field_access_decl): Return operand if
15597 it satisfies JDECL_P.
15599 1999-09-02 Tom Tromey <tromey@cygnus.com>
15601 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
15602 Handle nested arrays, like `[[I'.
15604 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15606 * class.c (finish_class): Remove unused parameter, all callers
15609 * expr.c (build_java_athrow): Change return type to void.
15610 (java_lang_expand_expr): Make sure each case in switch returns a
15613 * java-tree.h (finish_class): Fix prototype to take void args.
15615 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
15616 (main): Issue return from main, not exit.
15618 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
15620 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
15622 * jv-scan.c (main): Issue return from main, not exit.
15624 * parse.y (check_abstract_method_definitions,
15625 java_check_abstract_method_definitions): Add static prototypes.
15626 (java_complete_expand_methods): Fix call to `finish_class'.
15628 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
15631 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15633 * lang.c (language_string): Constify.
15635 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15637 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
15638 Remove hacks for stuff which comes from libiberty.
15640 * Make-lang.in: Likewise.
15642 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
15644 * Makefile.in (xref.o): Depend on xref.c explicitly.
15646 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15648 * java-tree.h (lang_printable_name): Constify a char*.
15650 * lang.c (lang_printable_name): Likewise.
15652 1999-08-27 Jeffrey A Law (law@cygnus.com)
15654 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
15655 comments in C code.
15657 1999-08-26 Tom Tromey <tromey@cygnus.com>
15659 * gjavah.c (print_cxx_classname): Print "::" before qualified
15662 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
15664 * parse.y (lookup_cl): Changed leading comment. Now does its best
15665 to set the column number.
15666 (qualify_ambiguous_name): Take WFL wrappers into account.
15668 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
15670 * verify.c (verify_jvm_instructions): Don't check instruction
15671 validity beyond end of method.
15673 1999-08-25 Tom Tromey <tromey@cygnus.com>
15675 * jvspec.c (lang_specific_driver): Correctly handle --help again.
15677 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15679 * gjavah.c (print_name, print_base_classname, utf8_cmp,
15680 cxx_keyword_subst, generate_access, name_is_method_p,
15681 get_field_name, print_field_name, super_class_name, print_include,
15682 decode_signature_piece, print_class_decls, usage, help,
15683 java_no_argument, version, add_namelet, print_namelet): Add static
15685 (print_base_classname, utf8_cmp, cxx_keyword_subst,
15686 name_is_method_p): Constify a char*.
15687 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
15688 Provide a final else clause in an if-else-if.
15689 (print_field_info): Add missing final arg in function call to
15690 `print_field_name'.
15691 (print_method_info, decompile_method, decode_signature_piece,
15692 print_c_decl, print_full_cxx_name, print_stub,
15693 print_mangled_classname, super_class_name, print_include,
15694 add_namelet, add_class_decl, print_class_decls, process_file,
15695 help): Constify a char*.
15697 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
15698 push_int_const, find_constant_wide, find_constant_index,
15699 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
15700 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
15701 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
15702 emit_if, emit_goto, emit_jsr, call_cleanups,
15703 make_class_file_name): Add static prototypes.
15704 (generate_bytecode_return, generate_bytecode_insns): Pass a
15705 NULL_PTR, not a NULL_TREE.
15707 * jv-scan.c: Include "jcf.h".
15708 (main): Declare using DEFUN macro.
15710 * jvspec.c (find_spec_file, lang_specific_pre_link,
15711 lang_specific_driver): Add prototypes.
15712 (find_spec_file): Constify a char*.
15714 * keyword.gperf (hash, java_keyword): Add prototypes.
15716 * lang.c (lang_print_error): Add static prototype.
15717 (lang_init): Prefer memcpy over bcopy to avoid casts.
15719 * lex.c (yylex): Add static prototype.
15721 * parse-scan.y: Include "lex.c" earlier.
15723 * parse.h: Remove redundant declaration for `yylex'.
15725 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
15726 labeled_block_contains_loop_p): Add static prototypes.
15727 (not_accessible_p): Make static to match prototype.
15729 * verify.c (start_pc_cmp): Don't needlessly cast away const.
15731 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15733 * parse.y (check_method_redefinition): Changed leading comment.
15734 (check_abstract_method_definitions): New function.
15735 (java_check_abstract_method_definitions): New function.
15736 (java_check_regular_methods): Call it.
15737 (verify_constructor_super): Fixed indentation.
15738 (lookup_method_invoke): Likewise.
15740 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15742 * parse.y (method_header): Return a null pointer if the current
15743 class node is null.
15744 (finish_method_declaration): Return if the current function decl
15746 (source_start_java_method): Likewise.
15747 (java_method_add_stmt): Likewise.
15749 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15751 * class.c (emit_register_class): Removed unnecessary call to
15753 * parse.y (labeled_block_contains_loop_p): Removed unused local
15756 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15758 * parse.y (java_refold): Added prototype.
15760 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15762 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
15763 (java_stabilize_reference): Removed unnecessary `else'.
15764 (java_complete_lhs): Set flag to remember boolean. Call
15765 java_refold. Added comments.
15766 (java_decl_equiv): New function.
15767 (binop_compound_p): Likewise.
15768 (java_refold): Likewise.
15769 (patch_unaryop): Striped static field access assigned to decl and
15770 op. Changed promotion scheme for ++/-- operators.
15771 (search_loop): New function.
15772 (labeled_block_contains_loop_p): Likewise.
15773 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
15775 (patch_bc_statement): Call search_loop. Fixed comment.
15777 1999-08-14 Anthony Green <green@cygnus.com>
15779 * expr.c (java_lang_expand_expr): Mark static array data as
15782 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
15784 * jvgenmain.c (main): NUL-terminate name_obstack.
15786 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15788 * check-init.c (check_bool2_init, done_alternative): Add static
15791 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
15792 (add_method, build_utf8_ref, build_class_ref,
15793 append_gpp_mangled_type, layout_class_method): Constify a char*.
15795 * decl.c (push_promoted_type, make_binding_level): Add static
15797 (push_promoted_type, pushdecl): Constify a char*.
15799 * except.c (find_handler_in_range, link_handler,
15800 check_start_handlers): Add static prototypes.
15802 * expr.c (process_jvm_instruction): Constify a char*.
15804 * gjavah.c (main): Constify a char*.
15806 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
15809 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
15811 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
15812 munge, print_ents): Constify a char*.
15814 * jcf-dump.c (disassemble_method): Constify a char*.
15815 (print_constant_pool, print_exception_table): Add static prototypes.
15816 (print_constant, print_exception_table, main, disassemble_method):
15819 * jcf-io.c (find_classfile, find_class): Likewise.
15821 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
15822 (set_source_filename, predefined_filename_p): Add static prototypes.
15823 (set_source_filename, get_constant, get_class_constant,
15824 find_in_current_zip): Constify a char*.
15826 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
15828 (add_entry, add_path, jcf_path_classpath_arg,
15829 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15831 * jcf-reader.c (get_attribute, jcf_parse_preamble,
15832 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
15833 jcf_parse_one_method, jcf_parse_methods,
15834 jcf_parse_final_attributes): Add static prototypes.
15835 (get_attribute): Constify a char*.
15837 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
15838 jcf_dependency_add_target, jcf_path_classpath_arg,
15839 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15841 * jv-scan.c (main): Constify a char*.
15842 (gcc_obstack_init): Add prototype arguments.
15844 * jvgenmain.c (gcc_obstack_init): Likewise.
15845 (main): Constify a char*.
15847 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
15849 (put_decl_string, lang_print_error): Constify a char*.
15850 (lang_init): Remove redundant extern prototype.
15852 * mangle.c (emit_unicode_mangled_name): Constify a char*.
15854 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
15855 Add static prototypes.
15856 (get_type_from_signature): Constify a char*.
15858 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
15859 Add static prototypes.
15860 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
15861 (verify_jvm_instructions): Constify a char*.
15863 * xref.c (xref_flag_value): Likewise.
15865 * xref.h (xref_flag_value): Likewise.
15867 * zextract.c (makeword, makelong): Add static prototypes.
15868 (makeword, makelong): Constify a uch*.
15870 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15872 * lang.c (java_dummy_print): Constify a char*.
15873 (lang_print_error): Likewise.
15874 (lang_init): Remove redundant prototype for `print_error_function'.
15875 (lang_init_source): Likewise.
15876 (lang_identify): Constify a char*.
15878 1999-08-09 Tom Tromey <tromey@cygnus.com>
15880 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
15881 (WORDS_TO_LONG): Likewise.
15882 (WORDS_TO_DOUBLE): Likewise.
15884 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15886 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
15888 * expr.c (java_stack_pop, java_array_data_offset,
15889 build_java_throw_out_of_bounds_exception, case_identity,
15890 build_java_check_indexed_type): Add static prototypes.
15891 (linenumber_table, expand_invoke, expand_java_field_op,
15892 build_primtype_type_ref, expand_byte_code): Constify a char*.
15894 * java-tree.h (build_primtype_type_ref, linenumber_table):
15896 (java_lang_expand_expr): Add prototype.
15898 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
15899 `java_lang_expand_expr'.
15901 * lex.c (java_lex_error): Constify a char*.
15902 (java_get_unicode, java_read_char, java_allocate_new_line,
15903 java_unget_unicode, java_sneak_unicode): Prototype.
15905 * parse-scan.y (current_class, package_name, method_declarator,
15906 report_class_declaration, yyerror): Constify a char*.
15908 * parse.h (java_report_errors): Prototype.
15909 (yyerror): Constify a char*.
15911 * parse.y (classitf_redefinition_error, check_modifiers,
15912 parse_jdk1_1_error, lookup_package_type,
15913 lookup_package_type_and_set_next, get_printable_method_name,
15914 purify_type_name): Constify a char*.
15915 (build_super_invocation, maybe_generate_finit,
15916 verify_constructor_super, parser_add_interface,
15917 add_superinterfaces, jdep_resolve_class, note_possible_classname,
15918 java_complete_expand_methods, java_expand_finals,
15919 cut_identifier_in_qualified, java_stabilize_reference,
15920 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
15921 merge_string_cste): Prototype.
15922 (single_type_import_declaration, yyerror,
15923 variable_redefinition_error, build_array_from_name,
15924 build_unresolved_array_type, check_class_interface_creation,
15925 resolve_class, complete_class_report_errors,
15926 note_possible_classname, read_import_dir,
15927 find_in_imports_on_demand, resolve_package, fix_constructors,
15928 check_deprecation, lookup_method_invoke,
15929 maybe_build_primttype_type_ref, array_constructor_check_entry):
15931 (java_complete_expand_methods, java_expand_finals): Make static.
15932 (convert_narrow): Remove static prototype.
15934 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
15936 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
15938 1999-08-02 Richard Henderson <rth@cygnus.com>
15940 * decl.c: Include defaults.h instead of expr.h.
15941 * parse.y: Likewise.
15943 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
15945 * java/decl.c (start_java_method): Change all uses of
15946 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
15947 Ensure expr.h is included.
15948 * java/expr.c (pop_arguments): Ditto.
15949 * java/parse.y (expand_start_java_method): Ditto.
15951 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15953 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
15955 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
15957 * decl.c: Include "function.h".
15958 * except.c: Likewise.
15959 * parse.y: Likewise.
15960 * Makefile.in: Update dependencies.
15962 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15964 * expr.c (build_java_soft_divmod): Provide a default case in switch.
15965 (java_lang_expand_expr): Mark parameters `target', `tmode' and
15966 `modifier' with ATTRIBUTE_UNUSED.
15968 * gjavah.c (process_file): Add braces around ambiguous `else'.
15970 * jcf-dump.c (print_access_flags, localvar_free): Change return
15973 * parse.y (java_complete_expand_method): Initialize variable
15975 (resolve_qualified_expression_name): Likewise for `field_decl'.
15976 (patch_method_invocation): Likewise for `class_to_search'.
15977 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
15978 (patch_assignment): Likewise for `lhs_type'.
15980 * verify.c (verify_jvm_instructions): Remove unused variable
15983 1999-07-25 Richard Henderson <rth@cygnus.com>
15985 * decl.c (va_list_type_node): New.
15987 1999-07-25 Anthony Green <green@cygnus.com>
15989 * gjavah.c (print_stub): New function.
15990 (METHOD_IS_NATIVE): New macro.
15991 (print_mangled_classname): Make static.
15992 (HANDLE_END_FIELD): Don't emit fields during stub generation.
15993 (process_file): Perform stub generation.
15994 (HANDLE_METHOD): Don't emit class decls during stub
15996 (HANDLE_END_METHOD): Take into account stub generation.
15997 (print_method_info): Handle stub generation.
15998 (print_stub): New function.
15999 (print_cxx_classname): Make signature consistant with others.
16000 (help): Describe -stubs option.
16001 (main): Create stub file.
16002 (version): Use version.c.
16003 (print_full_cxx_name): New function.
16004 (print_c_decl): Use print_full_cxx_name.
16006 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16008 * check-init.c (check_init): Handle MAX_EXPR.
16010 1999-07-15 Andrew Haley <aph@cygnus.com>
16012 * lang.c (flag_use_divide_subroutine): New variable.
16013 * typeck.c: (convert_ieee_real_to_integer): Bounds check
16014 fp-to-integer conversion.
16015 (convert): Call convert_ieee_real_to_integer when flag_fast_math
16018 * expr.c (build_java_soft_divmod): New function.
16019 (build_java_binop): Call build_java_soft_divmod if
16020 flag_use_divide_subroutine is set.
16021 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16022 soft_lrem_node: new builtin functions.
16023 (init_decl_processing) Initialize the new builtins.
16024 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16025 soft_lrem_node: new builtin functions.
16026 (build_java_soft_divmod): New function.
16027 * parse.y: Call build_java_soft_divmod if
16028 flag_use_divide_subroutine is set.
16029 * parse.c: Rebuilt.
16031 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16032 a --specs= arg) even if not linking.
16033 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16034 -fuse-divide-subroutine
16036 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16038 * parse.y (resolve_and_layout): Check methods only once.
16039 (resolve_qualified_expression_name): Verify thrown exceptions
16041 (check_thrown_exceptions): Reject exceptions thrown in
16042 initializer. Error message tuned.
16044 1999-07-14 Andrew Haley <aph@cygnus.com>
16046 * expr.c (expand_expr): Do not return the last statement in a
16047 block as the block's value.
16049 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16051 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16052 CALL_EXPR, to avoid order of evaluation changes.
16054 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16056 * parse.y (qualify_ambiguous_name): Do not use
16057 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16059 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16061 * check-init.c (check_init): Handle MAX_EXPR.
16062 * expr.c (force_evaluation_order): Force method call arguments to
16063 be evaluated in left-to-right order.
16064 * parse.y (qualify_ambiguous_name): Loop again to qualify
16065 NEW_ARRAY_EXPR properly.
16067 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16069 * parse.y (patch_invoke): Resolve unresolved invoked method
16071 (qualify_ambiguous_name): STRING_CST to qualify expression for
16072 type name resolution.
16074 1999-06-24 Andrew Haley <aph@cygnus.com>
16076 * class.c (finish_class): Whenever a deferred method is
16077 output, rescan the list of methods to see if a new candidate for
16078 output can be found.
16080 1999-06-28 Tom Tromey <tromey@cygnus.com>
16082 * jvspec.c (lang_specific_driver): Recognize --help.
16084 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16086 * parse.y (resolve_package): Fixed bogus return statement.
16087 (patch_method_invocation): Resolve method invocation beginning with
16088 a package name qualifier.
16090 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16092 * Make-lang.in (java.stage1): Depend on stage1-start.
16093 (java.stage2): Likewise for stage2-start.
16094 (java.stage3): Likewise for stage3-start.
16095 (java.stage4): Likewise for stage4-start.
16097 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16099 * parse.y (java_complete_lhs): When doing cross referencing, don't
16100 try to keep file location on a WFL expanded as a CALL_EXPR.
16102 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16104 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16105 compiling to class file a void method with an empty method body.
16106 As a side effect, the bytecode backend will generate the
16107 appropriate `return' instruction.
16109 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16111 * parse.y (lookup_package_type_and_set_next): New function prototype.
16112 (resolve_package): Search current and imported packages.
16113 (lookup_package_type_and_set_next): New function.
16115 1999-06-22 Andrew Haley <aph@cygnus.com>
16117 * verify.c (verify_jvm_instructions): Check for pending blocks
16118 before invalid PC test and opcode switch, not after.
16120 1999-06-21 Andrew Haley <aph@cygnus.com>
16122 * except.c (find_handler_in_range): The upper limit for exception
16123 ranges is exclusive, not inclusive: (start <= pc < end).
16124 (link_handler): find child pointer which points to outer by
16125 searching sibling list: previous code incorrectly assumed that
16126 outer->outer->first_child must point to outer.
16127 * verify.c (verify_jvm_instructions): FIXME added to code for
16129 (verify_jvm_instructions): Do not assume that the last block
16130 processed in a subroutine is a block which ends with a `ret'
16131 instruction. With some control flows it is possible that the last
16132 block ends with an `athrow'.
16134 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16136 * parse.y (qualify_ambiguous_name): Reorganized the post
16137 evaluation of non WFL leading expression nodes.
16139 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16141 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16144 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16146 * parse.y (qualify_ambiguous_name): Handle qualified expression
16147 beginning with a STRING_CST.
16149 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16151 * parse.y (register_fields): Set DECL_INITIAL on both
16152 pre-initialized static and public fields.
16153 (resolve_field_access): Static field access expressions to always
16155 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16156 qualification. CONVERT_EXPR to be resolved as an expression name.
16157 (java_complete_lhs): Identify and access qualified final
16158 initialized field in switch statement case expression.
16159 (fold_constant_for_init): Pre-initialized field decl constant to
16162 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16164 * parse.y (note_possible_classname): Mark returned node with
16165 QUALIFIED_P only if the original class name contained a '/'.
16167 1999-06-05 Anthony Green <green@cygnus.com>
16169 * Make-lang.in (gcjh): More parallel build fixes.
16171 1999-06-03 Mike Stump <mrs@wrs.com>
16173 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16175 1999-06-02 Anthony Green <green@cygnus.com>
16177 * except.c (link_handler): Chain exception handlers in order.
16179 1999-06-02 Anthony Green <green@cygnus.com>
16181 * expr.c (expand_byte_code): Fill unreachable bytecode regions
16182 with nops and process as usual in order to always set correct EH
16183 ranges. Emit detailed warnings about unreachable bytecodes.
16185 1999-06-02 Anthony Green <green@cygnus.com>
16187 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16190 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16192 * parse.y (lookup_field_wrapper): Unified returned value to NULL
16193 or the searched field decl.
16195 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16197 * parse.y (fold_constant_for_init): Convert numerical constant
16198 values to the type of the assigned field.
16200 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16202 * expr.c (lookup_field): Relaxed the test on class loading error
16204 * parse.y (fold_constant_for_init): Enabeled old code.
16206 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16208 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16209 decide the validity of the cast of a java.lang.Cloneable reference
16211 (patch_conditional_expr): Fixed first argument passed to
16212 binary_numeric_promotion.
16214 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16216 * parse.y (qualify_ambiguous_name): Take into account that a
16217 CONVERT_EXPR might specify a type as a WFL.
16219 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16221 * parse.y (patch_assignment): Save the rhs before using it as an
16222 argument to _Jv_CheckArrayStore.
16224 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16226 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16228 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16230 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16231 floating point literal only when the exponent indicator has been
16234 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16236 * parse.y (formal_parameter:): Construct argument tree list
16237 element even if a yet unsupported final parameter was encountered.
16239 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16241 * parse.y (finish_method_declaration): Issue errors for native or
16242 abstract methods declared with a method body, as well as for non
16243 native or non abstract methods with no method body.
16245 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16247 * class.c (build_utf8_ref): Initialize variable `field'.
16249 * decl.c (init_decl_processing): Initialize variable `field'.
16251 * expr.c (build_known_method_ref): Mark parameters `method_type',
16252 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16253 (process_jvm_instruction): Likewise for parameter `length'.
16255 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16256 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16259 * parse.y (maybe_generate_clinit): Remove unused variable
16260 `has_non_primitive_fields'.
16261 (find_in_imports_on_demand): Initialize variables `node_to_use'
16263 (patch_binop): Likewise for variable `prom_type'.
16264 (patch_unaryop): Likewise for variable `prom_type'.
16266 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16268 * xref.c (xref_table): Add missing initializer.
16270 1999-05-14 Tom Tromey <tromey@cygnus.com>
16272 * java-except.h (struct eh_range): Removed unused `next' member.
16273 * verify.c (verify_jvm_instructions): Call check_nested_ranges
16274 after adding all exception handlers. Sort exception ranges in
16276 (struct pc_index): New structure.
16277 (start_pc_cmp): New function.
16278 * except.c (add_handler): Return `void'. Don't call link_handler;
16279 instead construct an ordinary linked list and do range
16281 (check_nested_ranges): New function.
16282 (link_handler): Changed interface to allow merging of eh_ranges.
16283 Split overlapping ranges. Return `void'.
16285 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16287 * parse.y (constructor_block_end:): New rule, tagged <node>.
16288 (constructor_body:): Use `constructor_block_end' instead of
16291 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16293 * parse.y (statement_nsi:): Pop `for' statement block.
16294 (java_complete_lhs): Labeled blocks containing no statement are
16295 marked as completing normally.
16297 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16299 * xref.c (xref_set_current_fp): New function, defined.
16300 * xref.h (xref_set_current_fp): New function, prototyped.
16302 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16304 * check-init.c (check_init): Take into account that
16305 LABELED_BLOCK_STMT can be empty.
16307 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16309 * parse.y (java_check_regular_methods): Warning check on not
16310 overriding methods with default access in other packages does not
16311 apply to `<clinit>'.
16312 (java_complete_lhs): If block body is an empty_stmt_node, replace
16313 it by NULL_TREE. This prevents gcc from generating an irrelevant
16316 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16318 * check-init.c (check_init): Removed code accepting to see things
16319 falling through default:, when doing xrefs.
16320 * java-tree.h (do_not_fold): New global variable, declared.
16321 * parse.y (do_not_fold): New global variable, defined.
16322 (java_complete_expand_method): Set `do_not_fold' to the value of
16323 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16324 and reinstall them after them have been purged; do not check for
16325 initializations; do not issue missing return errors.
16326 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16328 (patch_binop): Skip the fold part when doing xrefs.
16329 (build_string_concatenation): Skip the concatenation part when
16331 (patch_synchronized_statement): Do not generate a try-finally when
16333 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16334 and keep the location where the throw was seen.
16335 * typeck.c (convert): When `do_not_fold' is set, do not attempt
16336 any treatment on the converted node an simply return a NOP_EXPR of
16338 * xref.c (xref_get_data): New function, defined.
16339 * xref.h (xref_get_data): New function, declared.
16340 (XREF_GET_DATA): Use xref_get_data.
16342 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16344 * gjavah.c (print_include): Cast the result of `strlen' to int
16345 when comparing against a signed value.
16346 (add_namelet): Likewise.
16348 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16350 * expr.c (expand_invoke): Mark parameter `nargs' with
16352 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16354 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16357 * jcf-reader.c (get_attribute): Cast a value to long
16358 when comparing against a signed expression. Likewise.
16360 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16361 HOST_BITS_PER_CHAR.
16363 1999-05-11 Andrew Haley <aph@cygnus.com>
16365 * parse.y (source_end_java_method): If the current method contains
16366 any exception handlers, force asynchronous_exceptions: this is
16367 necessary because signal handlers in libjava may throw exceptions.
16368 * decl.c (end_java_method): Ditto.
16370 1999-05-11 Tom Tromey <tromey@cygnus.com>
16372 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16374 * jvspec.c (THREAD_NAME): Removed.
16375 (GC_NAME): Likewise.
16376 (MATHLIB): Likewise.
16377 (WITHLIBC): Likewise.
16379 (THREADLIB): Likewise.
16380 (MATH_LIBRARY): Likewise.
16381 (lang_specific_driver): Don't add `-l' options to command line.
16382 Instead, add a single --specs option. Recognize `-L' options and
16383 use them to search for spec file.
16384 (find_spec_file): New function.
16385 (SPEC_FILE): New define.
16387 1999-05-11 Dave Brolley <brolley@cygnus.com>
16389 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16390 cpplib-enabled build.
16392 1999-05-05 Per Bothner <bothner@cygnus.com>
16394 * class.c (make_field_value): DECL_INITIAL may be a string literal;
16395 temporarily zero it while calling rest_of_decl_compilation.
16397 * java-tree.h (string_ptr_type_node): Add declaration.
16398 * decl.c: Define and initialize string_ptr_type_node.
16399 * parse.y (patch_string_cst): Use string_ptr_type_node.
16401 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
16402 * parse.y (for_statement): Now unconditionally exit_block.
16403 (finish_labeled_statement): No longer exit_block if for-loop.
16404 (patch_loop_statement): Check harder if the loop is already labeled.
16406 * parse.y (patch_initialized_static_field): Removed function.
16407 (maybe_generate_clinit): Removed special handling for interfaces.
16408 (java_complete_expand_methods): Do a preliminary java_complete_tree
16409 on <clinit> to determine if it can be removed.
16410 (java_complete_expand_method): Remove special handling for <clinit>.
16411 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
16412 optimize if we get back empty_stmt_node.
16413 For MODIFY_EXPR, re-do checking of static initializers.
16414 (fold_constant_for_init): Don't return immediate if VAR_DECL.
16415 For VAR_DECL, pass correct context.
16417 * verify.c (verify_jvm_instructions): Better error messages.
16419 1999-05-03 Tom Tromey <tromey@cygnus.com>
16421 * parse-scan.y (interface_declaration): Call
16422 report_class_declaration for interfaces.
16424 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
16426 * Makefile.in: Remove -v from bison command lines.
16428 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16430 * check-init.c (check_init): Exclude a case of error when doing
16432 * class.c (layout_class_method): Don't generate the error message
16433 twice when compiling from source.
16434 * lang-options.h: Added `-Wredundant-modifers' and
16435 `-Wunusupported-jdk11' flags and help text.
16436 * lang.c (lang_decode_option): Added support for
16437 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
16438 flag_static_local_jdk11 and flag_redundant set accordingly.
16439 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16440 * parse.h (EXPR_WFL_ADD_COL): New macro.
16441 (DECL_END_SOURCE_LINE): Likewise.
16442 (DECL_INHERITED_SOURCE_LINE): Likewise.
16443 * parse.y (static_ref_err): New function, prototyped.
16444 (CCB_TK): Now tagged <operator>.
16445 (class_body:): Remember the location of the closing '}' of a class
16446 definition when doing xrefs.
16447 (block:): Likewise.
16448 (block_end:): Likewise.
16449 (create_class): Remember the location of the inherited class
16450 identifier when doing xrefs.
16451 (register_fields): Added test on first operand of `init' before
16452 testing it TREE_CODE.
16453 (method_header): Store the location of the class identifier in the
16454 class decl when doing xrefs.
16455 (finish_method_declaration): Don't combine first/last method line
16457 (java_check_regular_methods): Warning check on not overriding
16458 methods with default access on other packages move before check on
16459 static methods. Initialization of `aflags' also moved up.
16460 (resolve_expression_name): Call static_ref_err to report the error.
16461 (static_ref_err): New function, implemented.
16462 (resolve_field_access): Returned simplified static field access
16464 (resolve_qualified_expression_name): Check for illegal use of
16465 static fields in a non static context. Call static_ref_err to
16466 report error in various places.
16467 (java_complete_tree): Do not fold initialized static fields when
16469 (java_complete_lhs): Likewise.
16471 1999-04-29 Anthony Green <green@cygnus.com>
16473 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16474 create internal labels.
16475 (lookup_label): Ditto.
16477 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16479 * class.c (layout_class_method): Generate <clinit>'s rtl for
16481 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
16482 for interfaces' <clinit>.
16483 * expr.c (lookup_field): Search for fields in interfaces.
16484 (expand_invoke): Fixed indentation.
16485 (expand_java_field_op): Likewise. Use IS_CLINIT.
16486 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16487 (IS_CLINIT): New macro.
16488 * parse.y (type_declaration:): Call maybe_generate_clinit after an
16489 interface was parsed.
16490 (maybe_generate_clinit): Don't generate if the current class is an
16491 interface with only fields of primitive types.
16492 (reset_method_name): Use IS_CLINIT.
16493 (java_complete_expand_method): Expand <clinit> when it exists for
16494 interfaces. Use IS_CLINIT.
16495 (resolve_expression_name): Use DECL_CONTEXT instead of
16496 current_class to build static field references.
16497 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
16498 ARRAY_REF when doing xreferencing.
16499 (check_final_assignment): Fixed typo in leading comment. Use
16501 (patch_array_ref): Don't fully expand array references when
16503 (patch_return): Use IS_CLINIT.
16504 (patch_throw_statement): Likewise.
16506 1999-04-22 Tom Tromey <tromey@cygnus.com>
16508 * Make-lang.in (JAVA_SRCS): Added check-init.c.
16510 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
16512 * decl.c (predef_filenames, predef_filenames_size): New globals
16513 (init_decl_processing): predef_filenames and predef_filenames_size
16515 * java-tree.h (predef_filenames, predef_filenames_size): Declared
16517 * jcf-parse.c (predefined_filename_p): New function.
16518 (yyparse): Check that files on the command line are specified only
16519 once and issue a warning otherwise.
16520 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16521 * parse.y (source_end_java_method): Nullify NOP method bodies, to
16522 avoid a gcc warning with -W -Wall turned on.
16523 (java_expand_classes): Abort if errors were encountered.
16524 (java_complete_lhs): If the cross reference flag is set, wrap
16525 field DECL node around a WFL when resolving expression name.
16527 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16529 * lang.c (lang_decode_option): Fixed returned value when parsing
16530 `-fxref=...' and `-Wall'.
16531 * parse.y (source_end_java_method): Do not generate code when
16532 flag_emit_xref is set.
16533 (resolve_expression_name): Do not build static field access when
16534 flag_emit_xref is set.
16535 (resolve_field_access): No special treatment on `length' when
16536 flag_emit_xref is set. Do not build qualified static field access
16537 when flag_emit_xref is set.
16538 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
16539 when flag_emit_xref is set.
16540 (patch_assignment): Do not generate array store runtime check when
16541 flag_emit_xref is set.
16542 * xref.c (xref_flag_value): Fixed function declaration
16544 (xset_set_data): New function.
16545 * xref.h (xref_set_data): Added prototype for new function.
16546 (typedef struct xref_flag_table): New field data.
16547 (XREF_GET_DATA): New macro.
16549 1999-04-19 Tom Tromey <tromey@cygnus.com>
16551 * xref.h (enum): Removed trailing comma.
16553 * parse.y (resolve_qualified_expression_name): Added missing
16556 1999-04-15 Anthony Green <green@cygnus.com>
16558 * gjavah.c: New prototypes for java_float_finite and
16559 java_double_finite.
16561 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16563 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
16566 1999-04-06 Jeffrey A Law (law@cygnus.com)
16568 * Makefile.in (TREE_H): Add tree-check.h.
16569 (RTL_H): Add genrtl.h.
16571 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
16573 * parse.y (patch_assignment): Added ArrayStoreException runtime
16576 1999-04-06 Per Bothner <bothner@cygnus.com>
16578 * expr.c (pop_type_0): New function.
16579 (pop_type): Use pop_type_0.
16580 * java-tree.h (pop_type_0): New declaration.
16581 * verify.c (verify_jvm_instructions): Check return instructions.
16583 * parse.y (patch_binop): Don't fold if non-constant and emiting
16586 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16588 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
16590 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
16591 (main_jcf): Don't define.
16592 (process_file): Don't set `main_jcf'.
16594 * java-tree.h (main_jcf): Don't declare.
16596 * jcf-parse.c (main_jcf): Add static definition.
16598 * lang.c (main_jcf): Don't define.
16600 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16602 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
16604 * decl.c (copy_lang_decl): Likewise for `bcopy'.
16606 * jcf-depend.c: Include "config.h", not <config.h>.
16608 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
16611 * jcf-path.c: Include "config.h", not <config.h>.
16613 * lex.c: Don't include various system header files.
16614 (java_init_lex): Cast the argument of `bzero' to PTR
16616 * parse-scan.y (java_push_parser_context): Likewise.
16618 * parse.y (java_push_parser_context): Likewise.
16619 (patch_bc_statement): Match format specifier to variable argument.
16621 * xref.c: Don't include <stdio.h>.
16623 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
16625 * parse.y (struct parser_ctxt *ctxp): Now global.
16626 (declare_local_variables): Use WFL compound value for the
16627 declaration source line value, when doing cross-referencing.
16629 1999-03-31 Tom Tromey <tromey@cygnus.com>
16631 * gjavah.c (print_field_info): Allow constants of other types.
16632 (print_include): Generate include when new name is proper prefix
16633 of already printed name.
16634 (add_namelet): Likewise.
16635 (cxx_keyword_subst): New function.
16636 (print_method_info): Use it.
16637 (print_field_name): New function.
16638 (get_field_name): New function.
16639 (print_field_info): Use get_field_name and print_field_name.
16641 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16643 * Makefile.in (keyword.h): Generate using gperf language 'C', not
16644 'KR-C', so gperf uses the `const' keyword on strings.
16646 * keyword.gperf (java_keyword): Const-ify a char*.
16648 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16650 * parse.y (patch_bc_statement): Fixed identation and a bogus
16653 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16655 * parse.y (patch_assignment): Allow static variables in other
16656 classes to be assigned.
16658 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16660 * class.c (maybe_add_interface): Remove unused variable
16662 (make_class_data): Use = for assignment, not ==. Likewise.
16663 (emit_register_classes): Remove unused variable `decl'.
16665 * lex.c: Fix comment so as not to contain an embedded `/*'.
16667 * verify.c (verify_jvm_instructions): Remove unused variable
16670 1999-03-27 Per Bothner <bothner@cygnus.com>
16672 * parse.y (complete_loop_body): Rename to finish_loop_body.
16673 (complete_labeled_statement): Rename to finish_labeled_statement.
16674 (complete_for_loop): Rename to finish_for_loop.
16675 (complete_method_declaration): Rename to finish_method_declaration.
16677 * java-tree.h (continue_identifier_node): New global node.
16678 * decl.c: Define and initialize continue_identifier_node.
16679 * parse.y (generate_labeled_block): Remove - no longer needed.
16680 (build_loop_body): Use continue_identifier_node for continue block.
16681 (finish_labeled_statement): Also do pop_labeled_block actions.
16682 (java_complete_lhs): POP_LOOP even if error.
16683 (build_labeled_block): Special handling for continue_identifier_node.
16684 (patch_loop_statement): Re-organize.
16685 (patch_bc_statement): Re-write.
16687 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16689 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
16690 using a WFL compound value.
16691 * parse.y (xref.h): Include.
16692 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
16693 WFL compound value.
16694 (register_fields): Set WFL compound value to lineno if doing
16696 (java_complete_expand_method): Call expand_xref if flag_emit_xref
16698 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
16699 * xref.h (expand_xref): Prototype renamed from xref_generate.
16701 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16703 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
16704 (GET_CURRENT_BLOCK): New macro.
16705 * parse.y (current_static_block): New global variable.
16706 (method_body:): Define action.
16707 (complete_method_declaration): Set current_function_decl to NULL
16708 when work on the current method is done.
16709 (declare_local_variables): Use GET_CURRENT_BLOCK.
16710 (java_method_add_stmt): Likewise.
16711 (java_complete_expand_method): Disable the use of `this' when
16712 expanding <clinit>.
16713 (enter_a_block): If no current method exist, use
16714 current_static_block to link static initializer blocks.
16715 (exit_block): Rewritten to use current_static_block when no current
16716 method decl exists.
16717 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
16718 (patch_return): Forbid the use of `return' in static initializers.
16719 (patch_throw_statement): Fixed indentation. Issue specific error
16720 for uncaught thrown checked exception in static initializer
16721 blocks. Removed FIXME.
16723 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
16725 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
16726 Link gcj from gcc.o.
16728 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16730 * parse.y (find_applicable_accessible_methods_list): When dealing
16731 with interface: ensure that a given interface or java.lang.Object
16732 are searched only once.
16734 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16736 * gjavah.c (print_c_decl): Remove unused argument `flags'.
16738 * jcf-dump.c (print_access_flags): Add braces around if-else.
16740 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
16743 * lex.c (build_wfl_node): Add static prototype.
16745 * lex.h (build_wfl_node): Remove static prototype.
16747 * parse.y: Include lex.c early enough to declare everything needed.
16748 Ensure calls to `build_wfl_node' pass the proper arguments.
16749 (create_class): Remove unused variable `super_decl'.
16750 (get_printable_method_name): Initialize variable `name'.
16752 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16754 * Changelog: Fixed 1999-03-22 typos.
16755 * lang.c (lang_decode_option): Fixed typo in error string in the
16758 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16760 * Makefile.in (JAVA_OBJS): Added entry xref.o.
16761 (xref.o): New rule.
16762 * java-tree.h (flag_emit_xref): Declared extern.
16763 * lang.c (xref.h): Included.
16764 (flag_emit_xref): New global variable.
16765 (lang_decode_option): Added support for -fxref.
16767 * xref.h: Likewise.
16769 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
16771 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
16774 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16776 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
16777 $(srcdir)/../system.h and $(JAVA_TREE_H).
16778 (jcf-io.o): Depend on $(JAVA_TREE_H).
16779 (mangle.o): Likewise.
16781 * check-init.c (check_cond_init): Add static prototype.
16783 * class.c (build_java_method_type, hashUtf8String,
16784 make_field_value, get_dispatch_vector, get_dispatch_table,
16785 append_gpp_mangled_type, mangle_static_field): Likewise.
16786 (strLengthUtf8): Hide unused definition.
16787 (hashUtf8String): Const-ify.
16788 (make_field_value): Un-ANSI-fy.
16790 * constants.c: Move inclusion of jcf.h above java-tree.h.
16791 (set_constant_entry, find_class_or_string_constant,
16792 find_name_and_type_constant, get_tag_node,
16793 build_constant_data_ref): Add static prototype.
16795 * decl.c (push_jvm_slot, builtin_function,
16796 lookup_name_current_level): Likewise.
16797 (builtin_function): Const-ify.
16799 * except.c (expand_start_java_handler, expand_end_java_handler):
16800 Add static prototype.
16802 * expr.c (flush_quick_stack, push_value, pop_value,
16803 java_stack_swap, java_stack_dup, build_java_athrow,
16804 build_java_jsr, build_java_ret, expand_java_multianewarray,
16805 expand_java_arraystore, expand_java_arrayload,
16806 expand_java_array_length, build_java_monitor, expand_java_pushc,
16807 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
16808 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
16809 expand_compare, expand_test, expand_cond, expand_java_goto,
16810 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
16811 expand_java_field_op, java_push_constant_from_pool): Likewise.
16813 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
16814 (build_java_arraynull_check): Mark parameters `node' and `type'
16815 with ATTRIBUTE_UNUSED.
16816 (note_label): Likewise for parameter `current_pc'.
16817 (expand_java_call, expand_java_ret): Hide unused definition.
16819 * java-tree.h (make_class, build_constants_constructor,
16820 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
16821 init_outgoing_cpool, register_class, emit_register_classes,
16822 java_layout_seen_class_methods): Prototype.
16823 (unicode_mangling_length): Const-ify.
16824 (append_gpp_mangled_name, append_gpp_mangled_classtype,
16825 emit_unicode_mangled_name, format_int, format_uint,
16826 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
16827 jcf_print_utf8_replace, open_class): Prototype.
16829 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
16830 <stdio.h>. Include tree.h/java-tree.h.
16831 (utf8_equal_string usage, process_class): Add static prototype.
16832 (open_class): Don't prototype this here.
16833 (utf8_equal_string): Match arguments to format specifiers.
16834 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
16835 TABLE_SWITCH, disassemble_method): Likewise.
16837 * jcf-io.c: Include tree.h/java-tree.h.
16838 (open_class, find_classfile, jcf_print_utf8,
16839 jcf_print_utf8_replace): Const-ify.
16841 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
16842 parse_class_file): Add static prototype.
16843 (find_in_current_zip): Match definition to existing static
16846 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
16847 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
16848 finish_jcf_block, define_jcf_label, get_jcf_label_here,
16849 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
16850 write_chunks, adjust_typed_op, generate_bytecode_conditional,
16851 generate_bytecode_return, perform_relocations, init_jcf_state,
16852 init_jcf_method, release_jcf_state, generate_classfile):
16853 Add static prototype.
16854 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
16855 (make_class_file_name): Const-ify.
16857 * jcf.h (find_classfile): Const-ify.
16859 * jv-scan.c (reset_report): Remove prototype.
16861 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
16862 (error): Rewrite to allow varargs.
16864 * lang.c (lang_f_options): Const-ify.
16866 * lex.c (java_parse_escape_sequence): Add static prototype.
16867 (java_allocate_new_line): Match definition to existing static
16870 * mangle.c Include tree.h/java-tree.h.
16871 (unicode_mangling_length, emit_unicode_mangled_name,
16872 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
16874 * parse.h (jdep_code): Remove trailing comma in enumeration.
16875 (java_get_line_col): Move prototype outside of !JC1_LITE test.
16876 (reset_report): Add prototype.
16878 * verify.c (push_pending_label, merge_types): Add static
16881 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
16883 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16885 * parse.y (find_applicable_accessible_methods_list): Extend the
16886 search to superinterfaces when relevant.
16887 (search_applicable_methods_list): New function.
16889 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16891 * class.c (unmangle_classname): Implemented stricter testing
16892 before setting the QUALIFIED_P flag on an identifier.
16894 1999-03-16 Per Bothner <bothner@cygnus.com>
16896 * parse.y (java_complete_lhs): Call force_evaluation_order
16897 after patch_newarray.
16898 (patch_binop): Don't call fold if there are side effects.
16900 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16902 * parse.y (java_stabilize_reference): Use save_expr instead of
16903 building a SAVE_EXPR node.
16904 (java_complete_lhs): Patch the resulting string of the `+='
16905 operator (if necessary) and complete the RHS after having built
16908 1999-03-15 Per Bothner <bothner@cygnus.com>
16910 * class.c (make_class): Don't set CLASS_P here (because
16911 this function is also called by build_java_array_type).
16912 (push_class): Set CLASS_P here instead.
16913 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
16915 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
16916 context. If the context is class, perfer "super" over "synchronized".
16917 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
16919 * parse.y (create_class): Don't call parser_check_super here;
16920 it is not robust. Always wait until later.
16922 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
16923 match what JDK 1.2 does), but don't set ACC_PUBLIC.
16925 1999-03-13 Per Bothner <bothner@cygnus.com>
16927 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
16928 * lex.h (UNGETC): Change misleading macro.
16930 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16932 * parse.y (java_stabilize_reference): Return NODE when patching a
16934 (java_complete_lhs): Put parenthesis around truth values.
16936 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16938 * class.c (layout_class_method): Don't make rtl for interface
16940 * parse.h (GET_TYPE_NAME): New macro.
16941 * parse.y (if_then_statement:): Fixed indentation.
16942 (if_then_else_statement:): Likewise.
16943 (for_statement:): Fixed spacing.
16944 (try_statement:): Fixed indentation.
16945 (create_interface): Don't force interfaces to be abstract.
16946 (method_header): Abstract methods are OK in interfaces.
16947 (declare_local_variables): Fixed typo in comment.
16948 (java_complete_expand_method): Fixed indentation.
16949 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
16950 non accessible fields.
16951 (java_stabilize_reference): New function.
16952 (java_complete_lhs): Fixed indentation. Use
16953 java_stabilize_reference in compound assignment. Insert the
16954 cast. If not processing `+' fix string constants before processing
16957 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16959 * constants.c (find_class_or_string_constant): Cast variable `j'
16960 to a `jword' when comparing against one.
16962 * expr.c (java_lang_expand_expr): Remove unused variables
16963 `has_finally_p' and `op0'.
16965 * gjavah.c (print_field_info): Cast a value to jint when comparing
16966 against one. Likewise for a jlong.
16967 (add_namelet): Likewise cast a `sizeof' to an int when comparing
16968 against a signed quantity.
16970 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
16971 (print_signature): Don't needlessly dereference variable `str'
16973 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
16974 `max_locals' with ATTRIBUTE_UNUSED.
16975 (jcf_parse_class): Likewise for variable `index'.
16977 * parse.h (reverse_jdep_list): Remove static prototype.
16979 * parse.y (build_jump_to_finally): Remove prototype and definition.
16980 (reverse_jdep_list): Add static prototype.
16982 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
16983 `assignment' and `expr_decl'.
16985 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
16987 1999-03-12 Andrew Haley <aph@cygnus.com>
16989 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
16990 we'll need a directory separator and a null character.
16992 1999-03-10 Per Bothner <bothner@cygnus.com>
16994 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
16996 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
16998 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17001 1999-03-05 Per Bothner <bothner@cygnus.com>
17003 * lex.c (java_parse_end_comment): Take extra parameter (next char).
17005 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
17007 * class.c (layout_class_method): A static method in a base class
17008 is never overridden, so treat it like it doesn't exist.
17009 However, do complain about private non-static method overriding
17010 public static method.
17012 * parse.y: Don't set unused INITIALIZED_P flag.
17013 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
17015 * parse.y (find_expr_with_wfl): Optimize tail-calls.
17016 (build_array_from_name): Re-order &index[string] to &string[index].
17018 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
17019 error_mark (it might catch more errors, but it is more likely to lose).
17021 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17023 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17024 (parse-scan.o): Depend on toplev.h.
17026 * class.c (make_method_value): Add prototype. Make it static.
17027 Remove unused second argument, caller changed.
17029 * expr.c (java_lang_expand_expr): Remove unused variable
17032 * java-tree.h: Don't prototype find_in_current_zip.
17033 Add prototypes for verify_constant_pool, start_java_method,
17034 end_java_method, give_name_to_locals, expand_byte_code,
17035 open_in_zip, set_constant_value, find_constant1, find_constant2,
17036 find_utf8_constant, find_string_constant, find_class_constant,
17037 find_fieldref_index, find_methodref_index, write_constant_pool,
17038 count_constant_pool_bytes and encode_newarray_type.
17040 * jcf-dump.c: Remove unused variable `LONG_temp'.
17042 * jcf-parse.c: Include parse.h.
17043 (jcf_parse_source): Remove unused parameter, all callers changed.
17044 (jcf_figure_file_type): Add static prototype.
17045 (find_in_current_zip): Likewise. Also remove unused parameter,
17046 all callers changed.
17047 (read_class): Initialize variable `saved_pos'.
17049 * jcf-reader.c (jcf_parse_preamble): Mark variables
17050 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17052 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17053 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17054 (java_parse_doc_section): Initialize variable `seen_star'.
17055 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17056 (java_lex_error): Mark parameters `msg' and `forward' with
17058 (java_get_line_col): Mark parameters `filename' and `line' with
17061 * parse-scan.y: Include toplev.h.
17062 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17064 * parse.h: use `struct JCF', not plain `JCF'.
17065 (java_parser_context_save_global, java_expand_classes
17066 java_parser_context_restore_global, java_parse): Add prototypes.
17068 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17071 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
17073 * check-init.c (check_init): COPYN takes word count, not bit count.
17075 1999-02-26 Per Bothner <bothner@cygnus.com>
17077 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
17078 explicit build_decl. (Avoids crash in reload when optimizing.)
17080 1999-02-25 Per Bothner <bothner@cygnus.com>
17082 * decl.c (complete_start_java_method): Handle synchronized method
17083 even when compiling from bytecode.
17085 1999-02-26 Tom Tromey <tromey@cygnus.com>
17087 * gjavah.c (add_class_decl): Only generate `#include' if outer
17088 class is not the name of the class we are processing. Correctly
17089 append `.h' in #include.
17090 (process_file): Clean up newlines around generated `#include's.
17091 (decode_signature_piece): Correctly handle inner classes.
17092 (struct include): New structure.
17093 (all_includes): New global.
17094 (print_include): New function.
17095 (add_class_decl): Use it.
17096 (process_file): Likewise.
17097 (add_class_decl): Generate include for java-array.h if array
17099 (process_file): Don't generate java-array.h include.
17101 * gjavah.c (add_namelet): Check for standard package names here.
17102 (add_class_decl): Don't check for standard package names here.
17104 1999-02-25 Tom Tromey <tromey@cygnus.com>
17106 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17107 When reading a zip file, only use strncmp if both strings are
17108 bigger than the buffer length. Initialize `k' when looping
17111 1999-02-24 Tom Tromey <tromey@cygnus.com>
17113 * gjavah.c (struct namelet): New structure.
17114 (add_namelet): New function.
17115 (print_namelet): New function.
17116 (print_class_decls): Use add_namelet and print_namelet to generate
17117 namespaces and not classes.
17118 (method_printed): New global.
17119 (HANDLE_END_METHOD): Examine method_printed.
17120 (print_method_info): Set method_printed when required. Print
17121 error if function to be ignored is marked virtual. Handle $finit$
17123 (METHOD_IS_FINAL): New macro.
17124 (print_field_info): Use it.
17125 (HANDLE_METHOD): Clear method_printed.
17126 (method_pass): New global.
17127 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17128 (process_file): Do two passes over both fields and methods.
17129 (HANDLE_METHOD): Examine method_pass.
17130 (root): New global.
17131 (add_class_decl): New function.
17132 (print_class_decls): Don't scan over entire constant pool.
17134 1999-02-23 Tom Tromey <tromey@cygnus.com>
17136 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17137 disable linking in that case.
17139 1999-02-20 Tom Tromey <tromey@cygnus.com>
17141 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17144 1999-02-21 Per Bothner <bothner@cygnus.com>
17146 * decl.c (build_result_decl), java-tree.h: New method.
17147 (complete_start_java_method): Handle synchronized methods.
17148 Don't build DECL_RESULT here. (Ordering dependency problem.)
17149 (start_java_method): Call build_result_decl here instead ...
17150 * parse.y (java_complete_expand_method): ... and here.
17151 (expand_start_java_method): Don't call complete_start_java_method here.
17152 (java_complete_expand_method): Call it here instead.
17153 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
17154 * java-tree.h: ... here.
17156 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
17157 * parse.y (java_complete_lhs): Don't call force_evaluation_order
17158 for ARRAY_REF - it doesn't work when array bounds are checked.
17159 (patch_array_ref): Handle it here instead.
17161 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
17163 1999-02-19 Per Bothner <bothner@cygnus.com>
17165 Force left-to-right evaluation of binary operations etc.
17166 * expr.c (force_evaluation_order), java-tree.h: New function.
17167 * parse.y (java_complete_lhs): Pass binary operations, procedure
17168 calls, and ARRAY_REFs to force_evaluation_order.
17169 (various): Set TREE_SIDE_EFFECTS more carefully.
17171 Tolerate random (non-UTF8) encoding in comments without complaining.
17172 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
17173 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
17175 * parse.y (resolve_qualified_expression_name): Handle error_mark.
17176 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
17178 * parse.y (java_complete_lhs): Ignore an empty statement in a
17179 COMPOUND_EXPR. Don't complain about empty statement after return.
17181 1999-02-19 Per Bothner <bothner@cygnus.com>
17183 * parse.y (obtain_incomplete_type): Don't wrap unknown types
17184 in TREE_LIST - just chain the POINTER_TYPEs together.
17185 (resolve_class): If type already resolved, return decl.
17186 After resolving, update TREE_TYPE(class_type), and name (if array).
17187 * parse.h (do_resolve_class), parse.y: Make non-static.
17188 * class.c (maybe_layout_super_class): Take this_class argument.
17189 Do do_resolve_class if necessary.
17190 (layout_class, layout_class_methods): Adjust calls appropriately.
17191 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17192 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
17193 * typeck.c (build_java_array_type): Don't call layout_class.
17195 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17197 * parse.y (check_pkg_class_access): Allow private class access
17198 within the same package.
17199 (strip_out_static_field_access_decl): New function.
17200 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17201 operator argument before testing its nature.
17203 1999-02-03 Per Bothner <bothner@cygnus.com>
17205 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
17206 (TRY_EXPR): Simplify - it no longer has a finally clause.
17207 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
17208 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17209 * expr.c (java_lang_expand_expr): Likewise.
17210 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
17211 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
17212 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
17213 (build_try_statement): Remove finally parameter and handling.
17214 (build_try_finally_statement): New function.
17215 (patch_try_statement): No longer need to support finally clause.
17216 (try_statement): Update grammar action rules.
17217 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
17218 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17220 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
17222 * jcf-parse.c (get_constant): Add braces around computation of 'd'
17223 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
17225 1999-02-17 Andrew Haley <aph@cygnus.com>
17227 * class.c (build_utf8_ref): Back out broken patch which was
17228 intended to to output signatures using '.' as a separator.
17230 * class.c (make_class_data): Output signatures using '.' as a
17231 separator, rather than '/'.
17232 (mangled_classname): Likewise.
17233 (make_field_value): Likewise.
17234 (make_method_value): Likewise.
17235 * constants.c (alloc_class_constant): Likewise.
17236 * expr.c (build_invokeinterface): Likewise.
17238 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17240 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17241 of an ancient workaround.
17243 1999-02-10 Jeffrey A Law (law@cygnus.com)
17245 * jvspec.c (xmalloc): Kill the prototype. It does not belong
17248 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17250 * lex.c (yylex): Encode \0 as UTF8.
17252 1999-02-10 Tom Tromey <tromey@cygnus.com>
17254 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17255 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17256 (libgcj_zip): Renamed.
17257 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17259 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17261 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17262 (GC_NAME): Renamed -lgc to -lgcjgc.
17264 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17266 * lex.c (java_lang_cloneable): Initialize.
17267 * parse.y (java_lang_cloneable): New static variable.
17268 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17269 doing one more qualification round.
17270 (valid_ref_assignconv_cast_p): Reject null source or
17271 destination. Allow an array to be cast into java.lang.Cloneable.
17272 (patch_cast): Swapped two first arguments to first call to
17273 valid_ref_assignconv_cast_p.
17275 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
17277 * parse.h: DECL_P renamed JDECL_P.
17278 * parse.y: DECL_P replaced by JDECL_P.
17279 (build_array_from_name): Always use pointer's type.
17280 (patch_bc_statement): Extra code to search continue target in a
17281 for loop. Fixed comments. Continue target is current loop when
17284 1999-02-05 Andrew Haley <aph@cygnus.com>
17286 * class.c (make_class_data): The superclass of an interface should
17287 be null, not class Object.
17289 * lex.c (java_lex): Sign extend hex literals.
17291 1999-02-04 Andrew Haley <aph@cygnus.com>
17293 * class.c (build_utf8_ref): Output signatures using '.' as a
17294 separator, rather than '/'.
17295 (make_class_data): Likewise.
17297 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
17299 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17300 mkstemp.o. Get them from libiberty now.
17302 1999-02-02 Jeffrey A Law (law@cygnus.com)
17304 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17306 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17308 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17311 1999-02-02 Per Bothner <bothner@cygnus.com>
17313 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17314 * jcf-write.c (generate_bytecode_return): New function.
17315 (generate_bytecode_insns): Use it, for RETURN_EXPR.
17317 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
17318 generate special [fd]const_[01] instructions.
17320 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
17322 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
17323 handling OPCODE_lookupswitch or OPCODE_tableswitch.
17325 1999-02-01 Per Bothner <bothner@cygnus.com>
17327 * parse.y (patch_method_invocation): Handle calling static methods,
17328 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17330 * parse.y (java_complete_lhs): Don't complain about unreachable
17331 exit condition in a do-while statement.
17333 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
17335 * lex.c (java_read_char): Fixed utf8 decoding.
17336 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17338 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17339 comments. Local variable `all_primitive' is gone. Broadened
17340 acceptance of `0' to floating point targets. `long' can now be
17341 widened to `double' or `float'.
17342 (valid_method_invocation_conversion_p): Added leading
17343 comment. Fixed tabulation.
17344 (build_string_concatenation): Optimize out left or right empty
17347 1999-01-28 Per Bothner <bothner@cygnus.com>
17349 * jcf-write.c (localvar_alloc): Only emit entry for
17350 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17351 (generate_bytecode_insns): Only call put_linenumber if
17352 debug_info_level > DINFO_LEVEL_NONE.
17353 * jvspec.c (lang_specific_driver): If no -O* or -g* option
17354 is specified, add -g1 (for compatibility wih javac).
17356 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
17358 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17359 gjavah.o, check-init.o, jv-scan.o
17361 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17363 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17365 * gjavah.c: Include config.h and system.h.
17367 * javaop.h (inline): Don't define, its handled by system.h.
17368 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17369 from `inline' to `static inline'.
17371 * jcf.h (inline): Don't define, its handled by system.h.
17373 * lex.c (inline): Likewise.
17375 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
17377 * lang-specs.h: Map -Qn to -fno-ident.
17379 1999-01-29 Richard Henderson <rth@cygnus.com>
17381 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17383 1999-01-29 Tom Tromey <tromey@cygnus.com>
17385 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17386 then cast it to Object before calling `append' method.
17388 1999-01-28 Per Bothner <bothner@cygnus.com>
17390 * check-init.c (check_bool2_init, check_bool_init, check_init):
17391 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17392 * jcf-write.c (generate_bytecode_insns): Likewise.
17394 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
17396 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17397 * parse.y (patch_cast): Allow a boolean to be cast into a
17400 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17402 * parse.y: (class_declaration:): Fixed indentation.
17403 (class_member_declaration:): Extra `;' after field declaration now
17405 (interface_declaration:): Removed debug messages in error reports.
17406 (patch_binop): Nodes created and returned inherit the orignal
17407 node's COMPOUND_ASSIGN_P flag value.
17408 (patch_cast): Fix cast from char to floating point.
17410 1999-01-25 Andrew Haley <aph@cygnus.com>
17412 * except.c, java-except.h (expand_resume_after_catch): new
17414 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17415 to branch back to main flow of control after a catch block.
17417 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17419 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17420 $(srcdir)/../system.h.
17421 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17422 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17423 (jcf-write.o): Likewise.
17424 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17425 (mangle.o): Depend on $(srcdir)/../toplev.h.
17426 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17427 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17429 * class.c: Include output.h and parse.h.
17430 (mangled_classname): Add the `const' keyword to a char*.
17431 (find_named_method): Hide unused function definition.
17432 (build_utf8_ref): Change type of variable `c' to unsigned char.
17433 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17434 (build_class_ref): Add the `const' keyword to a char*.
17435 (layout_class_method): Remove unused variable `buf'.
17437 * decl.c (find_local_variable): Remove unused variable `rtl'.
17438 (pushdecl): Likewise for variables `different_binding_level' and
17440 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17441 (maybe_build_cleanup): Likewise for parameter `decl'.
17443 * except.c (expand_start_java_handler): Mark parameter `range'
17444 with ATTRIBUTE_UNUSED.
17446 * expr.c: Include except.h.
17447 (pop_type): Remove unused variable `i'.
17448 (pop_value): Likewise for variables `n_words' and `i'.
17449 (expand_java_arrayload): Likewise for variable `convert'.
17450 (java_lang_expand_expr): Likewise for variables `op0', `type',
17451 `mode', `unsignedp', `node' and `elements'.
17452 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17454 (process_jvm_instruction): Add a `const' qualifier to a char*.
17456 * gjavah.c (output_directory): Add the `const' keyword to a char*.
17457 (temp_directory): Likewise.
17458 (print_c_decl): Likewise.
17459 (print_method_info): Likewise.
17460 (decode_signature_piece): Likewise.
17461 (print_mangled_classname): Likewise.
17463 * java-except.h: Provide prototypes for maybe_start_try,
17464 maybe_end_try and add_handler.
17466 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17467 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
17468 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17469 init_expr_processing, push_super_field, init_class_processing,
17470 can_widen_reference_to, class_depth, verify_jvm_instructions,
17471 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17472 set_local_type, merge_type_state, push_type, load_type_state,
17473 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17474 emit_unicode_mangled_name): Add prototypes.
17476 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17477 (print_signature_type): Use ISDIGIT, not isdigit.
17478 (print_signature): Remove unused variable `j'.
17480 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17481 int when comparing against one.
17483 * jcf-parse.c: Include toplev.h.
17485 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
17486 (localvar_free): Remove unused variable `i'.
17487 (generate_bytecode_conditional): Likewise for variable `kind'.
17489 * jv-scan.c: Include config.h and system.h. Remove redundant
17490 OS header and gansidecl.h includes.
17491 (warning): Add the `const' keyword to a char*. Also add
17492 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
17493 __STDC__, when determining whether to use ANSI-isms.
17494 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
17495 (xmalloc): Don't redundantly prototype here.
17496 (main): Remove unused parameter `envp'. Also fix the arguments
17497 passed to function `fatal' to match the format specifier.
17499 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17501 * mangle.c: Include toplev.h.
17502 (emit_unicode_mangled_name): Declare parameter `len'.
17504 * parse.y (parse_warning_context): Add the `const' keyword to a
17505 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
17506 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
17507 (issue_warning_error_from_context): Add the `const' keyword to
17509 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
17510 not `__STDC__' for whether to use ANSI-isms.
17512 * typeck.c (incomplete_type_error): Mark parameters `value' and
17513 `type' with ATTRIBUTE_UNUSED.
17514 (parse_signature_type): Use ISDIGIT, not isdigit.
17516 * verify.c (check_pending_block): Add the `const' keyword to a char*.
17517 (verify_jvm_instructions): Likewise. Remove unused variables
17518 `field_name' and `default_val'.
17520 * zextract.c: Include config.h and system.h. Remove redundant
17521 OS header includes.
17523 * zipfile.h: Prototype `read_zip_archive'.
17525 1999-01-21 Andrew Haley <aph@cygnus.com>
17527 * typeck.c (convert): Allow conversions to void type: some
17528 optimizations in gcc do this.
17530 1999-01-21 Andrew Haley <aph@cygnus.com>
17532 * typeck.c (convert_ieee_real_to_integer): New function.
17533 (convert): When not using fast-math and using hardware fp, convert
17534 an IEEE NaN to zero.
17536 1999-01-18 Andrew Haley <aph@cygnus.com>
17538 * parse.y (patch_binop): Do a type conversion from signed to
17539 unsigned and then back to signed when a ">>>" is found.
17541 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17543 * java-tree.h: (check_for_initialization): Added prototype.
17544 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17545 * parse.y (do_resolve_class): Removed unused locals.
17546 (read_import_dir): Likewise.
17547 (resolve_qualified_expression_name): Array creation
17548 expressions are valid primary expressions.
17549 (qualify_ambiguous_name): Likewise.
17550 (patch_synchronized_statement): Removed unused local.
17552 1999-01-17 Jeffrey A Law (law@cygnus.com)
17554 * Makefile.in (zextract.o): Add dependencies.
17556 * Makefile.in: Do not put ^Ls at the start of a line.
17558 1999-01-15 Per Bothner <bothner@cygnus.com>
17560 * expr.c (process_jvm_instruction): Coerce to correct Throwable
17561 sub-type the result of the call that gets the exception value.
17563 * parse.y (java_complete_expand_methods): If flags_syntax_only,
17564 don't call finish_class.
17566 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
17567 clear found before continuing.
17569 * verify.c (verify_jvm_instructions): On an array load, allow
17570 and handle top of stack to be TYPE_NULL.
17572 * gjavah.c (generate_access): Translate Java package private or
17573 protected access to C++ public, but with a comment.
17575 1999-01-13 Andrew Haley <aph@cygnus.com>
17577 * expr.c (generate_name): Name prefix changed to avoid clashes
17578 with assembler temp labels.
17580 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
17581 MODIFY_EXPR. Without this, code for the assignment may not be
17582 generated at all and the synchronized statement will read an
17583 uninitialized variable.
17585 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
17587 * class.c (maybe_layout_super_class): Fixed returned value.
17588 * lex.c: Added 1999 to the copyright.
17589 (java_init_lex): Initialize java_lang_imported.
17590 * lex.h: Added 1999 to the copyright.
17591 * parse.h: Added 1999 to the copyright.
17592 (REGISTER_IMPORT): Fixed typo in trailing macro.
17593 (CURRENT_OSB): New macro.
17594 (struct parser_ctxt): New fields osb_depth, osb_limit.
17595 * parse.y (java_lang_id): New global variable.
17596 (type_import_on_demand_declaration): Don't import java.lang.* twice.
17597 (array_creation_expression:): Use CURRENT_OSB.
17598 (dims:): Uses a stack to keep track of array dimensions.
17599 (cast_expression:): Use CURRENT_OSB.
17600 (find_expr_with_wfl): Return NULL if node found doesn't meet the
17602 (register_fields): Fixed typos in comment.
17603 (check_method_redefinition): Fixed comment indentation.
17604 (java_check_regular_methods): Set saved found wfl to NULL after
17605 having reinstalled it in the previously found DECL_NAME.
17607 1999-01-10 Richard Henderson <rth@cygnus.com>
17609 * gjavah.c (java_float_finite): Use a union to do type punning.
17610 (java_double_finite): Likewise.
17612 1999-01-09 Per Bothner <bothner@cygnus.com>
17614 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
17615 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
17616 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
17617 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
17618 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
17619 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
17621 1999-01-08 Per Bothner <bothner@cygnus.com>
17623 * check-init.c (check_init): If compiling to native, we don't
17624 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
17626 1999-01-08 Tom Tromey <tromey@cygnus.com>
17628 * parse-scan.y (variable_declarator_id): Set or increment
17630 (bracket_count): New global.
17631 (formal_parameter): Handle case where bracket pairs trail variable
17634 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
17636 * jcf-parse.c (yyparse): variable len changed from a char to an
17637 int to prevent overflow.
17639 1999-01-06 Per Bothner <bothner@cygnus.com>
17641 * java-tree.h: Declare read_class.
17642 * jcf-parse.c (read_class): New function.
17643 (load_class): Now just call read_class.
17645 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
17646 * jcf-parse.c (parse_source_file): Declare save_error_count,
17647 which is needed by java_parse_abort_on_error macro,
17648 * parse.y (java_layout_classes, java_expand_classes): Likewise.
17650 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
17651 constructor, if initializing a static field.
17652 (patch_new_array_init): Set TREE_CONSTANT if it is.
17653 * expr.c (java_lang_expand_expr): For a static array constructor
17654 of primitive elements, allocate the array itself statically.
17655 Disabled until we can set the vtable field statically.
17657 * check-init.c: New file. Checks for definite assignment.
17658 * Makefile.in (JAVA_OBJS): Add check-init.o.
17659 * parse.y (java_complete_expand_method): Call check_for_initialization.
17660 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
17662 1999-01-06 Graham <grahams@rcp.co.uk>
17664 * parse.y : include system.h instead of including
17665 standard headers directly with the exception of <dirent.h>.
17667 1999-01-06 Per Bothner <bothner@cygnus.com>
17669 * lex.h: Moved static function declarations to lex.c,
17670 to shut up some -Wall warnings.
17671 * lex.c: Static function declarations moved here.
17672 * jcf-dump.c: Small fixes to shut up -Wall warnings.
17674 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17676 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
17678 1998-12-22 Per Bothner <bothner@cygnus.com>
17680 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
17681 * verify.c (verify_jvm_instructions): Fix off-by-one error.
17683 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
17684 (localvar_alloc): Change return type to void,
17685 (emit_unop): Remove unused variable size.
17687 * jcf-write.c (struct jcf_block): Add new union.
17688 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
17689 (call_cleanups): New functions.
17690 (struct jcf_partial): New fields num_finalizers and return_value_decl.
17691 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
17692 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
17693 * lang.c (lang_init): Call using_eh_for_cleanups.
17694 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
17695 completing operands to patch_synchronized_statement.
17696 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
17697 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
17698 WITH_CLEANUP_EXPR instead of TRY_EXPR.
17700 1998-12-20 John F. Carr <jfc@mit.edu>
17702 * Make-lang.in: Comment out control-Ls; they upset some makes.
17704 1998-12-18 Tom Tromey <tromey@cygnus.com>
17706 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
17709 1998-12-17 Tom Tromey <tromey@cygnus.com>
17711 * parse.y (DIR_SEPARATOR): New define.
17712 (check_class_interface_creation): Use it.
17714 * parse-scan.y (report_main_declaration): Recognize
17715 `java.lang.String' in argument to main.
17717 1998-12-16 Per Bothner <bothner@cygnus.com>
17719 * parse.y (create_interface): Remove bogus test.
17721 1998-12-16 Per Bothner <bothner@cygnus.com>
17723 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
17724 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
17726 1998-12-16 Tom Tromey <tromey@cygnus.com>
17728 * parse-scan.y (qualified_name): Use correct sprintf format.
17730 1998-12-15 Tom Tromey <tromey@cygnus.com>
17732 * gjavah.c (print_field_info): Changed how most negative number is
17735 1998-12-14 Per Bothner <bothner@cygnus.com>
17737 * parse.y (fold_constant_for_init): New function.
17738 (resolve_expression_name): Don't replace static final
17739 constant-initialized fields by its value.
17740 (java_complete_lhs): New. Same as java_complete_tree, except does
17741 not replace static final constant-initialized fields by their values.
17742 (register_fields): If there is an initializer, set DECL_INITIAL and
17743 MODIFY_EXPR_FROM_INITIALIZATION_P.
17744 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
17745 Only call patch_initialized_static_field if
17746 MODIFY_EXPR_FROM_INITIALIZATION_P.
17747 (patch_initialized_static_field): If not valid constant, clear
17750 * parse.y (lookup_field_wrapper): Fix thinko.
17752 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
17753 set and restore global lineno.
17755 1998-12-14 Tom Tromey <tromey@cygnus.com>
17757 * gjavah.c (print_field_info): If value to print is the smallest
17758 value of its size, then print as hex to avoid later warnings from
17761 1998-12-14 Tom Tromey <tromey@cygnus.com>
17763 * gjavah.c (decompile_method): Decompile `return null'.
17764 (process_file): Generate `#pragma interface'.
17765 (method_declared): New global.
17766 (print_method_info): Set it.
17767 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
17768 (print_method_info): Handle abstract methods.
17770 1998-12-13 Per Bothner <bothner@cygnus.com>
17772 * parse.y (patch_method_invocation): If class_decl is null
17773 (e.g. an array type), use original type.
17775 * parse.y (check_thrown_exceptions): Temporary hack to suppress
17776 errors about uncaught exception from clone (of array, specifically).
17778 1998-12-13 Tom Tromey <tromey@cygnus.com>
17780 * gjavah.c (decompile_method): Handle all types of `return'
17781 opcode. Decompile `return this' and `return'.
17782 (method_access): New global.
17783 (print_method_info): Set it.
17784 (decompile_method): Don't decompile a synchronized method.
17786 1998-12-13 Tom Tromey <tromey@cygnus.com>
17788 * jcf-reader.c (jcf_parse_one_method): Recognize
17790 * gjavah.c (HANDLE_END_METHOD): New macro.
17791 (HANDLE_CODE_ATTRIBUTE): New macro.
17792 (decompile_method): New function.
17793 (print_method_info): Don't print `;\n' at end of function decl.
17794 Include java-opcodes.h.
17795 (decompiled): New global.
17797 1998-12-12 Per Bothner <bothner@cygnus.com>
17799 * class.c (build_class_ref): Handle PRIMTYPE.class if
17800 flag_emit_class_files.
17801 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
17802 if flag_emit_class_files.
17803 * parse.y (java_complete_tree): Pre-liminary support for
17804 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
17806 * parse.y (patch_synchronized_statement): Don't call monitorexit
17807 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
17809 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
17811 * zipfile.h (opendir_in_zip): New declaration.
17812 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
17813 (opendir_in_zip): New function, using code from open_in_zip.
17814 (open_in_zip): Call opendir_in_zip.
17815 (find_class): Remove no-longer-used do_class_file parameter,
17816 but add source_ok parameter. Change logic so if we find a .java file,
17817 we don't look for .class in later classpath emtries.
17818 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
17819 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
17820 * gjavah.c: Update call to find_class.
17821 * jcf-dump.c: Likewise.
17823 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
17824 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
17825 nothing if body is empty_stmt_node.
17826 Various little fixes so SP gets correctly adjusted.
17827 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
17828 For CALL_EXPR, test if static first.
17829 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
17830 such as the ones we create for Object and Class.
17831 Set and restore current_function_decl.
17832 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
17833 (note_possible_classname): New function.
17834 (read_import_entry): Removed. Merged with read_import_dir.
17835 (read_import_dir): Don't call find_class - that only gives us
17836 the first classpath entry having the needed package.
17837 Use the struct buffer data structure from buffer.h.
17838 (read_import_dir, find_in_imports_on_demand): The remembered
17839 class names now use '.' (not '/') as package separator.
17841 * parse.y (java_complete_expand_methods): Call write_classfile
17842 here, and not in java_expand_classes (which only gets first class).
17844 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17846 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
17847 (register_fields): If a static fields has an initializer, just
17848 chain it on ctxp->static_initialized, and handle later.
17849 (java_complete_expand_methods): Force <clinit> first.
17850 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
17851 - it's already been completed.
17852 (patch_initialized_static_field): New function.
17853 (java_complete_field): Call it.
17855 1998-12-12 Per Bothner <bothner@cygnus.com>
17857 * expr.c (encode_newarray_type, build_new_array): New functions.
17858 * java-tree.h: Declare build_new_array.
17859 * jcf-write.c (patch_newarray): Use build_new_array.
17861 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
17862 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
17864 * parse.y (patch_new_array_init): Re-organize.
17865 Now is passed the actual array (pointer) type of the value.
17866 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
17867 (patch_array_constructor): Removed - merged into patch_new_array_init.
17868 (java_complete_tree): Update patch_new_array_init.
17870 * jcf-write.c (find_constant_index): New function.
17871 (generate_bytecode_insns): Use find_constant_index.
17872 (generate_classfile): Use find_constant_index for ConstantValue.
17874 1998-12-11 Tom Tromey <tromey@cygnus.com>
17876 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
17877 * decl.c (init_decl_processing): Renamed dtable -> vtable.
17878 * class.c (make_class_data): Renamed dtable -> vtable, and
17879 dtable_method_count -> vtable_method_count.
17881 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17883 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
17884 global variables, initialized.
17885 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
17886 Declared new global variables.
17887 * lex.c (java_lex): Return long_zero_node, float_zero_node,
17888 double_zero_node, integer_zero_node upon direct matching.
17889 * parse.y (purify_type_name): Added function prototype.
17890 (duplicate_declaration_error_p): Consider new_type as potentially
17891 being a incomplete type. Use purify_type_name on type string.
17892 (method_header): saved_type: unused variable removed. Don't figure
17893 return type if method name is invalid.
17894 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
17895 processed by patch_unaryop.
17896 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
17897 increment/decrement node into its original type after binary
17898 numeric promotion on its operands.
17900 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17902 * parse.y (array_initializer:): Array init operand is NULL_TREE
17903 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
17904 now an error. Fixed indentation problems.
17905 (patch_string): Handle error_mark_node as an argument.
17906 (patch_new_array_init): Fixed indentation problems.
17907 (array_constructor_check_entry): Removed check on null wfl_value.
17908 Return an error if wfl_value's walk returns an error.
17910 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17912 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
17913 * lex.c (java_lex): Remember column position before advancing one
17914 token. Retain location information on OCB_TK.
17915 * lex.h (typedef struct java_lc): Added new field.
17916 * parse.h (GET_SKIP_TYPE): New macro.
17917 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
17918 * parse.y (build_new_array_init, patch_new_array_init,
17919 patch_array_constructor, maybe_build_array_element_wfl,
17920 array_constructor_check_entry): New function prototypes.
17921 (switch_block:): Tagged <node>.
17922 (OCB_TK): Tagged <operator>.
17923 (array_initializer:): Installed actions.
17924 (variable_initializer): Build location information on element if
17926 (switch_statement:): Fixed indentation typo.
17927 (switch_block:): Redefined default action.
17928 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
17929 (patch_assignment): Removed duplicate code.
17930 (maybe_build_array_element_wfl, build_new_array_init,
17931 patch_new_array_init, patch_array_constructor,
17932 array_constructor_check_entry): New functions.
17934 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
17936 * parse.y (array_initializer): Tagged <node>.
17937 (variable_initializer:): Use default rule.
17938 (array_initializer:): Defined actions.
17939 (variable_initializers:): Likewise.
17940 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
17941 non-static field accesses.
17942 (patch_invoke): Fixed indentation typo.
17943 (java_complete_tree): Likewise.
17944 (build_labeled_block): Changed leading comment. Generate an error
17945 in case of duplicate loop labels.
17946 (patch_conditional_expr): Patch results of string concatenation
17949 1998-12-06 Per Bothner <bothner@cygnus.com>
17951 * constants.c (find_methodref_index): When the class is an interface,
17952 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
17954 * decl.c (finit_identifier_node): Use "$finit$", rather than
17955 "<finit>" (which Sun's verifier rejects).
17956 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
17957 (generate_field_initialization_code): Removed.
17958 (fix_constructors) Don't add call to $finit$ here (wrong order).
17959 (patch_method_invocation): Add $finit$ call here.
17961 * java-tree.h (CALL_USING_SUPER): New macro.
17962 * parse.y (patch_invoke): Remove im local variable.
17963 (patch_method_invocation, patch_invoke): Don't pass super parameter.
17964 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
17965 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
17967 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
17969 * parse.y (java_complete_tree): Don't complain about unreachable
17970 statement if it is empty_stmt_node.
17972 * jcf-write.c (find_constant_wide): New function.
17973 (push_long_const): Use find_constant_wide.
17975 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
17976 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
17977 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
17978 Emit invokeinterface when calling an interface method.
17979 Emit invokespecial also when calling super or private methods.
17981 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
17983 1998-12-06 Per Bothner <bothner@cygnus.com>
17985 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
17987 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
17989 * java-tree.h (java_layout_seen_class_methods): New function
17991 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
17992 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
17993 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
17994 * parse.y (method_declarator:): Defined action.
17995 (issue_warning_error_from_context): input_filename saved, set to
17996 the appropriate value and restored after java_error is called.
17997 (build_unresolved_array_type): Fixed comment.
17998 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
17999 (method_header): Deal with return type the same way type are
18000 handled for fields and method's parameters and local variables
18002 (check_method_redefinition): Removed extra CR.
18003 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18004 (java_layout_seen_class_methods): New function.
18005 (java_layout_classes): Call java_layout_seen_class_methods.
18007 1998-12-03 Per Bothner <bothner@cygnus.com>
18009 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
18011 1998-12-03 Per Bothner <bothner@cygnus.com>
18013 * jcf-dump.c (main): Fix error message.
18014 * jcf-path.c (add_entry): Style fix.
18016 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18018 * class.c (layout_class_method): Call build_java_argument_signature
18019 on constructors too.
18020 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18021 (patch_method_invocation): Define a primary when resolving an
18022 expression name. Augmented comment on code checking illegal `this'
18023 usage. Loosened it test by accepting NEW_CLASS_EXPR.
18025 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
18027 * class.c (layout_class_method): Don't report error on non-static
18028 overriding static if the method is private.
18029 * java-tree.h (finish_class): Prototype added.
18030 * lex.c (java_get_line_col): Handle col argument -2 value.
18031 * parse.h: All static method declarations moved to parse.y.
18032 * parse.y: Now contains all static method declarations previously
18034 (find_expr_with_wfl, missing_return_error,
18035 unreachable_stmt_error): New functions.
18036 (java_get_real_method_name): Identify constructors bearing class
18037 names in source code compiled classes only.
18038 (java_complete_expand_methods): Call missing_return_error.
18039 (invocation_mode): Private methods invoked as static methods.
18040 (java_complete_tree): Call unreachable_stmt_error.
18042 1998-12-01 Tom Tromey <tromey@cygnus.com>
18044 * Makefile.in (+target): Removed.
18045 (+xmake_file): Likewise.
18046 (+tmake_file): Likewise.
18047 (.NOEXPORT): Removed duplicate.
18049 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18051 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18053 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
18055 * jvgenmain.c: Remove the xmalloc prototype, we get it from
18056 libiberty.h. Provide an xmalloc definition.
18058 * jvspec.c: Remove the xmalloc prototype.
18060 * parse-scan.y: Include config.h and system.h. Don't include
18061 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
18062 Provide an xstrdup definition.
18064 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
18066 * jcf-path.c (add_entry): Recognize ".jar" too.
18067 * lang-specs.h: Likewise.
18069 1998-11-26 Per Bothner <bothner@cygnus.com>
18071 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
18072 soft_monitorenter_node, soft_monitorexit_node, throw_node.
18074 * jcf-write.c (generate_bytecode_insns):
18075 Handle pre/post-increment/decrement of long.
18077 * jcf-write.c (generate_bytecode_insns):
18078 Handle missing exception handler (finally for synchronized).
18080 1998-11-25 Per Bothner <bothner@cygnus.com>
18082 * java-tree.h (end_params_node): Declare global.
18083 * decl.c (end_params_node): New global.
18084 (init_decl_processing, start_java_method): Use end_params_node for
18085 end of list of parameter types. Follows correct gcc conventions.
18086 * expr.c (pop_argument_types, pop_arguments): Likewise.
18087 * lang.c (put_decl_node): Likewise.
18088 * typeck.c (various places): Likewise.
18089 * class.y (various places): Likewise.
18090 * parse.y (various places): Likewise.
18092 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
18093 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
18095 * class.c: Add #include flags.h, remove no-longer needed declaration.
18097 * class.c (layout_class_method): Remove commented-out code, re-format.
18098 Don't add vtable entry (or index) for private methods.
18099 * expr.c (expand_invoke): A private method is implicitly final.
18100 * class.c (make_class_data): If inlining or optimizing,
18101 skip private methods.
18103 * class.c (finish_class): New function. Calls existing methods,
18104 but alls emits deferred inline functions.
18105 * jcf-parse.c (parse_class_file): Call finish_class.
18106 * parse.y (java_complete_expand_methods): Likewise.
18108 * expr.c (build_java_binop): Explicit default, to silence -Wall.
18110 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
18112 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
18114 * jcf-write.c (generate_bytecode_conditional): Fix typo.
18116 1998-11-24 Per Bothner <bothner@cygnus.com>
18118 * (generate_classfile): Always write class access flag with
18121 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
18123 * class.c (maybe_layout_super_class): New function.
18124 (layout_class): Reorganized. Loop on class methods dispatched into
18125 a new function. Call maybe_layout_super_class.
18126 (layout_class_methods, layout_class_method): New functions.
18127 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18129 (expand_invoke): Likewise.
18130 * java-tree.h (all_class_list): New global variable declared.
18131 (layout_class_methods, layout_class_method): New function
18133 (LAYOUT_SEEN_CLASS_METHODS): New macro.
18134 * jcf-parse.c (all_class_list): New global variable.
18135 (load_class): Extended what class_or_name can be. Use parser
18136 context mechanism to save globals before calling jcf_parse.
18137 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18138 is set on the file name.
18139 (jcf_parse): Layout class methods when Object is loaded, otherwise
18140 record class in all_class_list for delayed method layout.
18141 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18142 * lang.c (put_decl_node): Decode <init> into the decl context
18144 * lex.c (java_allocate_new_line): Use xmalloc.
18145 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18146 pointers, not TREE_LIST elements.
18147 (struct parser_ctxt): Fixed comment indentations, added comments
18148 and reordered some fields.
18149 (java_check_methods): Function prototype removed.
18150 * parse.y (java_push_parser_context): Use xmalloc.
18151 (java_parser_context_restore_global): Pop extra pushed ctxp only
18152 when there's nothing next.
18153 (maybe_create_class_interface_decl): Fixed comment, add new
18154 created class decl to all_class_list.
18155 (method_header): Use GET_REAL_TYPE on argument's types.
18156 (method_declarator): Use GET_REAL_TYPE, change type to the real
18157 type in TREE_LIST dependency node. Build argument list with the
18159 (create_jdep_list): Use xmalloc. Removed allocation error message.
18160 (obtain_incomplete_type): Fixed leading comment. Broadened
18161 incoming argument meaning.
18162 (register_incomplete_type): Use xmalloc. Removed allocation error
18164 (safe_layout_class): Fixed leading comment.
18165 (jdep_resolve_class): Reversed if statement condition and switch
18166 if and else bodies.
18167 (resolve_and_layout): Fixed leading comment. Broadened incoming
18169 (complete_class_report_errors): New local variable name, for
18170 clarity. purify_type_name used for all error cases.
18171 (java_get_real_method_name): Stricter check on constructors.
18172 (java_check_regular_methods): Reverse methods list only if not
18173 already laid out. Layout artificial constructor.
18174 (java_check_methods): Deleted.
18175 (source_start_java_method): Obtain incomplete type for patchable
18177 (java_layout_classes): Fixed leading comment. Use
18178 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18179 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18180 before returning. Fixed comments.
18181 (java_expand_classes): Check for errors up front.
18182 (patch_method_invocation): Class to search is resolved and laid
18185 1998-11-24 Per Bothner <bothner@cygnus.com>
18187 * expr.c (java_lang_expand_expr): Add missing emit_queue.
18189 * javaop.h (int8): Removed - not used.
18190 (jbyte): Redefine portably with correct signedness.
18192 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
18194 * jcf-write.c (generate_bytecode_insns): Fix typo
18195 OPCODE_getstatic to OPCODE_getfield.
18197 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
18198 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
18199 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18201 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
18203 * jcf-parse.c (jcf_parse_source): Function returned type is
18204 void. Added prototype.
18205 (jcf_parse): Function returned type is void.
18206 (yyparse): Remove call to fclose on the last parsed file.
18208 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18210 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
18212 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18213 (layout_class): Cope with methods featuring WFL in decl names.
18214 * decl.c (unqualified_object_id_node): New global variable,
18216 (build_decl_no_layout): Removed.
18217 * expr.c (build_primtype_type_ref): Handle Double.
18218 (java_lang_expand_expr): Fixed indentations.
18219 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18220 (flag_wall, flag_redundant, flag_not_overriding,
18221 flag_static_local_jdk1_1, unqualified_object_id_node): Global
18222 variable declarations.
18223 (build_decl_no_layout): Removed prototype.
18224 (java_get_real_method_name): Added prototype.
18225 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18226 (java_parse_abort_on_error): Macro now just returns.
18227 * jcf-parse.c (jcf_parse_source): Check fclose returned
18228 value. Call emit_register_classes if java_report_errors returns
18230 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18231 flag_static_local_jdk1_1): New integer flags.
18232 (lang_decode_option): New flags set here.
18233 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18234 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18235 the flag_redundant variable.
18236 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18237 when parsing java.lang.Object class.
18238 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18239 NULL_TREE to build.
18240 (resolve_qualified_expression_name): Fixed indentation.
18241 (patch_array_ref): Changed prototype.
18242 (not_initialized_as_it_should_p): Prototype removed.
18243 (java_report_errors): Added function prototype.
18244 * parse.y (formal_parameter:): Changed error message for not yet
18245 supported final parameters.
18246 (class_type_list:): Set both PURPOSE and VALUE of created
18247 TREE_LIST to be class_type.
18248 (primary_no_new_array:): Handle class literals on primitive types.
18249 (parse_warning_context): Reinstalled correct force_error and
18250 do_warning flags setups.
18251 (java_report_errors): Changed prototype. Return java_error_count
18253 (variable_redefinition_error): Consider treating variable type as
18255 (create_interface): Warn about redundant abstract modifier if
18256 flag_redundant is set. Changed error message.
18257 (lookup_field_wrapper): Save/restore globals before/after looking
18259 (duplicate_declaration_error_p): Consider treating declaration
18260 type as a fake pointer.
18261 (register_fields): Extract real type from dependency node. Check
18262 for duplicate field declaration after type adjustment. Use
18263 DECL_INITIAL to store static final initialized values.
18264 (method_header): Extract real function type from dependency node.
18265 (check_abstract_method_header): Use GET_METHOD_NAME.
18266 (obtain_incomplete_type): Layout fake pointer type.
18267 (safe_layout_class): Don't try to check for methods before layout.
18268 (java_complete_class): Don't check for correct throws clause
18269 elements inheritance here.
18270 (resolve_and_layout): Broadened name parameter meaning.
18271 (reset_method_name): Use GET_METHOD_NAME.
18272 (java_get_real_method_name): New function.
18273 (java_check_regular_methods): Don't check methods in
18274 java.lang.Object. Verify lineage of throws clause elements. Use
18275 flag_no_overriding in warning report.
18276 (check_throws_clauses): Don't check if class was from
18277 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18278 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18279 (declare_local_variables): Use flag_static_local_jdk1_1 to report
18280 warning on unsupported final local variables. Use build_decl
18281 instead of build_decl_no_layout. Get real local variable type from
18283 (source_start_java_method): Get real parameter type from
18284 dependency node. Call build_decl instead of build_decl_no_layout.
18285 (java_layout_classes): Reverse tree and layout type and class as
18286 required. Mark class as loaded when done.
18287 (resolve_field_access): Fixed indentation. Restricted condition
18288 leading to static field access code generation. Set field_type
18289 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18290 (resolve_qualified_expression_name): Initialize type_found to
18291 null. Handle static field resolved during qualification. Fixed
18292 layout on non primitive field decl types.
18293 (not_accessible_p): Fixed typo in comment.
18294 (patch_method_invocation): Resolve and layout class to search from
18296 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18297 layout non primitive type, if necessary. Make method node only to
18299 (find_applicable_accessible_methods_list): Consider WFL'ed method
18300 decl names. Fixed indentation.
18301 (argument_types_convertible): Resolve and layout target type if
18303 (java_complete_tree): Fixed indentation problems. Rewrote
18304 CALL_EXPR thrown exceptions check. Re-installed further processing
18305 of the assignment in certain cases.
18306 (patch_assignment): Call maybe_build_primttype_type_ref to perform
18307 inlining on class literals.
18308 (valid_builtin_assignconv_identity_widening_p): Cope with constant
18310 (valid_method_invocation_conversion_p): Likewise.
18311 (patch_string): Temporary disable forbidden use of `this' in
18312 explicit constructor invocations when doing string concatenation
18313 within their scope.
18314 (patch_unaryop): Added comment. Reinstalled code to disable
18315 further check on assignment operation with cast expression RHS.
18316 (patch_switch_statement): Fixed indentation.
18317 (build_try_statement): Call build_decl instead of
18318 build_decl_no_layout.
18319 (patch_synchronized_statement): Likewise.
18320 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18321 IS_UNCHECKED_EXPRESSION_P.
18322 (check_thrown_exceptions_do): Changed leading comment. Resolve and
18323 layout argument exception type.
18324 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18325 of IS_UNCHECKED_EXPRESSION_P.
18327 1998-11-18 Anthony Green <green@cygnus.com>
18329 * jcf-parse.c (yyparse): Open class file in binary mode.
18331 1998-11-15 Per Bothner <bothner@cygnus.com>
18333 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
18335 * jcf-write.c (perform_relocations): Move check out one loop.
18337 1998-11-15 Anthony Green <green@hoser.cygnus.com>
18339 * Make-lang.in: Fix reference to srcdir.
18340 * jv-scan.c: Add missing xmalloc prototype.
18341 * jvgenmain.c: Ditto.
18343 1998-11-15 Per Bothner <bothner@cygnus.com>
18345 * decl.c (error_mark_node), java-tree.h: New global.
18346 * parse.y: Use empty_stmt_node instead of size_zero_node.
18347 (build_if_else_statement): If missing else, use empty_stmt_node.
18349 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
18350 (java_complete_expand_method): Complain if return is missing.
18351 (java_check_regular_methods): Comment out incorrect error check.
18352 (not_accessible_p): Fix incorrect handling of protected methods.
18353 (patch_method_invocation): Pass correct context to not_accessible_p.
18354 (find_applicable_accessible_methods_list): Likewise.
18355 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
18356 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
18357 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
18358 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
18360 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
18361 (push_int_const): Remove reundant NOTE_PUSH.
18362 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
18363 (- case SWITCH_EXPR): Fix code generation bug.
18364 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
18365 (generate_classfile): More robust for abstract methods.
18367 1998-11-15 Anthony Green <green@cygnus.com>
18369 * Makefile.in: jv-scan and jvgenmain all require libiberty.
18370 * Make-lang.in: Ditto.
18372 * jv-scan.c: Remove xmalloc and xstrdup definitions.
18373 * jvgenmain: Ditto.
18375 1998-11-15 Per Bothner <bothner@cygnus.com>
18377 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
18379 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
18381 1998-11-14 Per Bothner <bothner@cygnus.com>
18383 Allow uses of interface types to verify. This is not really
18384 type-safe, but it matches what Sun does, and is OK as long as
18385 there are appropriate run-time checks.
18386 * verify.c (merge_types): If merging two interface types,
18387 just set the result to java.lang.Object.
18388 * expr.c (pop_type): Any interface is matches by java.lang.Object.
18390 1998-11-13 Tom Tromey <tromey@cygnus.com>
18392 * gjavah.c (main): Handle --output-class-directory argument.
18393 * jvspec.c (lang_specific_driver): Translate `-d' into
18394 -foutput-class-dir.
18395 * jcf.h (jcf_write_base_directory): Declare.
18396 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18397 * lang-options.h: Mention -foutput-class-dir.
18398 * jcf-write.c (jcf_write_base_directory): New global.
18399 (make_class_file_name): Put generated .class file into `-d'
18400 directory, or into source directory if -d not given. Function now
18402 (write_classfile): Free class file name. Handle case where class
18404 (DIR_SEPARATOR): New macro.
18405 Include <sys/stat.h>
18407 * Makefile.in (prefix): New macro.
18409 1998-11-12 Per Bothner <bothner@cygnus.com>
18411 * parse.y (patch_invoke): Do less if flag_emit_class_files.
18412 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
18413 here (done in patch_invoke instead).
18414 (case_identity): Moved here from parse.y.
18416 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
18417 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
18418 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
18419 so they can be efficiently scanned without recursion.
18420 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18421 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
18422 in BLOCK iteratively, rather than recursively.
18424 * parse.y (do_unary_numeric_promotion): New function.
18425 (patch_unaryop, patch_binop, patch_array_ref): Use it.
18427 * parse.y (patch_newarray): Various fixes.
18429 Re-do handling of switch statements (for proper block scoping).
18430 * parse.y: Add just a single block for the enture switch block,
18431 but don't create any "case blocks".
18432 (group_of_labels): Rmeoved unneeded non-terminal.
18433 CASE_EXPR and DEFAULT_EXPR are added to current block.
18434 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
18435 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18436 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
18437 * parse.y (wfl_operator, print_int_node): Make non-static.
18438 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
18439 as part of recursive scan of block.
18440 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
18441 (patch_switch_statement): Most tests move dinto java_complete_tree.
18443 * parse.y: Make various production be non-typed (void).
18444 * parse.y (parse_error): Merged into issue_warning_error_from_context.
18445 * parse.y (add_stmt_to_compound): Don't create/change extra node.
18446 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
18448 * jcf-write.c (struct jcf_handler): New type.
18449 (struct jcf_switch_state): New type.
18450 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
18451 (alloc_handler, emit_unop, emit_reloc): New functions.
18452 (adjust_typed_op): Add extra parameter ("max type" offset).
18453 (emit_switch_reloc, emit_case-reloc): New function.
18454 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
18455 (generate_bytecode_insns): Support REAL_CST, switch statements,
18456 exception handling, method calls, object/array creation, and more.
18458 * class.c: Remove some unused variables.
18459 * constants.c (find_string_constant): New function.
18460 (count_constant_pool_bytes): Fix to correctly handle wide constants.
18461 * decl.c (complete_start_java_method): Don't _Jv_InitClass
18462 if flag_emit_class_files.
18464 1998-11-12 Tom Tromey <tromey@cygnus.com>
18466 * jcf-io.c (find_class): Added explanatory comment.
18468 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
18469 trailing slash to `.zip' entries.
18471 * jvspec.c (lang_specific_driver): Correctly handle case where
18472 GC_NAME not defined.
18474 1998-11-11 Tom Tromey <tromey@cygnus.com>
18476 * jvspec.c (GC_NAME): New define.
18477 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
18479 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18481 1998-11-11 Per Bothner <bothner@cygnus.com>
18483 * jcf-dump.c (TABLE_SWITCH): Fix typos.
18485 1998-11-11 Tom Tromey <tromey@cygnus.com>
18487 * jcf-dump.c (main): Correctly recognize `--'-style long options.
18489 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18491 * class.c (is_compiled_class): Call safe_layout_class for class
18492 compiled from source.
18493 * conver.h (convert_to_integer, convert_to_real,
18494 convert_to_pointer): Added prototypes.
18495 * decl.c (init_decl_processing): Non longer push the decls of
18496 `methodtable', `constants', `Class', `Field', `dispatchTable'
18497 `jexception' and `Method'.
18498 * expr.c (build_invokeinterface): New function.
18499 (expand_invoke): static variable CLASS_IDENT now in
18500 build_invokeinterface. Use build_invokeinterface.
18501 (expand_java_field_op): Moved code to inline
18502 java.lang.PRIMTYPE.TYPE into a function.
18503 (build_primtype_type_ref): New function.
18504 * java-tree.def (INSTANCEOF_EXPR): New tree code.
18505 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
18506 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
18507 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
18508 (DECL_LOCAL_STATIC_VALUE): New macro.
18509 (build_invokeinterface, build_primtype_type_ref): New function
18511 (java_parse_abort_on_error): Macro rewritten.
18512 * jcf-parse.c (current_method): Add comment to declaration.
18513 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
18514 Function prototypes fixed.
18515 (jcf_parse_source): push/pop parser context. save/restore global.
18516 (parse_source_file): Fixed leading comment. Now take a
18517 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18518 classes and pop the parser context anymore.
18519 (yyparse): Push parser context, save globals, parse the source
18520 file, restore globals and pop the parser context when processing a
18522 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18523 * lex.c (java_parse_doc_section): New function.
18524 (java_lex): Call java_parse_doc_section when appropriate. Build an
18525 operator around INSTANCEOF_TK.
18526 * lex.h (java_lineterminator, java_sprint_unicode,
18527 java_unicode_2_utf8, java_lex_error, java_store_unicode):
18528 Prototypes rewritten.
18529 (java_parse_escape_sequence, java_letter_or_digit_p,
18530 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18531 java_read_unicode, java_store_unicode, java_read_char,
18532 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18533 Added function prototypes.
18534 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
18536 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
18538 (struct parser_ctxt): New fields: deprecated,
18539 current_parsed_class_un, gclass_list.
18540 (fix_method_argument_names, issue_warning_error_from_context,
18541 resolve_package, lookup_package_type): New function prototypes.
18542 (resolve_expression_name): Fixed function prototype.
18543 (find_applicable_accessible_methods_list): Fixed indentation, added
18544 extra argument in prototype.
18545 (check_final_assignment, build_null_of_type, check_deprecation,
18546 check_method_redefinition, reset_method_name,
18547 java_check_regular_methods, java_check_abstract_methods,
18548 maybe_build_primttype_type_ref): New function prototype.
18549 * parse.y (conver.h): Include.
18550 (INSTANCEOF_TK): Tagged <operator>.
18551 (single_type_import_declaration): Use REGISTER_IMPORT macro.
18552 (relational_expression:): Build binop for instanceof.
18553 (java_push_parser_context): Remember ctxp->gclass_list across
18555 (java_pop_parser_context): Simply return if no context
18556 exists. Remember gclass_list across contexts.
18557 (issue_warning_error_from_context): New function.
18558 (parse_error_context): Don't setup ctxp->elc here. Call
18559 issue_warning_error_from_context instead.
18560 (parse_warning_context): Likewise.
18561 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
18562 setup. Link new class/interface to ctxp->gclass_list.
18563 (add_superinterfaces): Register interface as incomplete if not
18565 (create_class): Remember class unqualified name in
18566 ctxp->current_parsed_class_un. Check class deprecation.
18567 (register_fields): Check field deprecation. Remember static final
18568 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
18570 (method_header): New local variable ORIG_ARG. Use unqualified
18571 current class name for check on constructor errors. Promote return
18572 type if of record type. Argument list fix moved in
18573 fix_method_argument_names, called here. Check method deprecation.
18574 (fix_method_argument_names): New function.
18575 (method_declarator): Promote record typed arguments.
18576 (safe_layout_class): Check class methods before layout.
18577 (java_complete_class): Compute field layout when patched.
18578 (do_resolve_class): Try to load class after having it renamed
18579 after the package name.
18580 (get_printable_method_name): Use DECL_CONTEXT.
18581 (reset_method_name): New function.
18582 (check_method_redefinition): Use reset_method_name.
18583 (java_check_regular_methods): New local variable
18584 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
18585 names for error report. Check for compile-time error when method
18586 found has default (package) access.
18587 (java_check_abstract_methods): Now takes an interface DECL node as
18588 an argument. Also reinstall real name on unchecked
18589 overriding/hiding methods for error report.
18590 (java_check_methods): Fixed leading comment. Get classes to verify
18591 from ctxp->gclass_list. Use CHECK_METHODS macro and set
18592 CLASS_METHOD_CHECKED_P on class verification.
18593 (lookup_java_method2): Get real method name if necessary.
18594 (find_in_imports): Don't check package class access here.
18595 (resolve_package, lookup_package_type): New functions.
18596 (java_layout_classes): Fixed leading comment. Take classes to be
18597 laid out from ctxp->gclass_list.
18598 (java_complete_expand_methods): Don't expand native and abstract
18600 (java_expand_classes): New function.
18601 (resolve_expression_name): Use additional argument ORIG. Retrieve
18602 values of static final field of primitive types.
18603 (resolve_field_access): Handles static final field of promotive
18605 (resolve_qualified_expression_name): Handle STRING_CST as
18606 primaries and package name resolution. Check deprecation on found
18607 decls. Set where_found and type_found on non static field resolved
18608 during qualification. Layout non primitive field decl types.
18609 (check_deprecation): New function.
18610 (maybe_access_field): Simplified.
18611 (patch_method_invocation_stmt): Local variable CLASS_TYPE
18612 removed. Reverse method's argument when primary is a type. Don't
18613 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
18614 instead. Include abstract class in the list of class searchable
18615 for constructors. Use DECL_CONTEXT of found method for access
18616 checks. Check method deprecation.
18617 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
18618 converting arguments. Handle INVOKE_INTERFACE.
18619 (lookup_method_invoke): Search constructor using existing
18620 infrastructure (don't rely on lookup_java_constructor anymore).
18621 (find_applicable_accessible_methods_list): Extra argument flag
18622 LC. Now include constructor in the search.
18623 (qualify_ambiguous_name): Conditional expression are primaries.
18624 (not_initialized_as_it_should_p): static final are always
18626 (java_complete_tree): Pass extra NULL argument to
18627 resolve_expression_name. Stricter test to carry on patching
18628 assignments. New case for INSTANCEOF_EXPR.
18629 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
18630 (check_final_assignment, maybe_build_primttype_type_ref): New
18632 (patch_assignment): Detect resolved static finals and carry normal
18633 assignment error check on them. Inline PRIMTYPE.TYPE read access.
18634 (try_builtin_assignconv): Access constant 0 on all primitive
18636 (valid_builtin_assignconv_identity_widening_p): Accept identical
18637 types. Accept all promoted type on int type.
18638 (valid_ref_assignconv_cast_p): Accept a null pointer to be
18639 assigned to a reference.
18640 (valid_method_invocation_conversion_p): Accept to check null
18642 (build_binop): Merge declaration and initialization of local
18644 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
18645 numeric types. Improved validity test for qualify operators on
18647 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
18648 and PREINCREMENT_EXPR. Also detect resolved static finals of a
18649 primitive type and issue the appropriate error message.
18650 (resolve_type_during_patch): Mark class loaded when resolved.
18651 (patch_cast): Allow null to be cased to reference types.
18652 (build_null_of_type): New function.
18653 (patch_array_ref): Handle array on references correctly.
18654 (patch_return): Removed unused local variable MODIFY. Force
18655 boolean to be returned as integers. Allows null to be returned by
18656 a function returning a reference.
18657 * typeck.c (convert_to_integer, convert_to_real,
18658 convert_to_pointer): Prototypes moved to convert.h
18659 (lookup_argument_method): Use method real name, if necessary.
18661 1998-10-30 Tom Tromey <tromey@cygnus.com>
18663 * class.c (build_class_ref): Changed name of primitive classes to
18666 * class.c (make_class_data): Renamed fields: nmethods to
18667 method_count, method_count to dtable_method_count. Always set
18668 `state' field to 0.
18669 * decl.c (init_decl_processing): Likewise.
18671 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
18673 * class.c (layout_class): Don't mangle <finit>, produce
18674 __finit<class> instead. Don't verify artificial methods.
18675 * decl.c (finit_identifier_node): New declared global.
18676 (init_decl_processing): finit_identifier_node initialized.
18677 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
18678 * java-tree.h (finit_identifier_node): Declared as extern.
18679 (struct lang_decl): New field called_constructor.
18680 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
18681 (CLASS_HAS_FINIT_P): New macro.
18682 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
18683 explicit constructor invocation.
18684 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
18685 CALL_SUPER_CONSTRUCTOR_P): New macros.
18686 (write_classfile): Added prototype.
18687 * jcf-parse.c (jcf_parse_source): Parse and remember for
18688 generation if the file was seen on the command line.
18689 (parse_source_file): Don't write the class file here.
18690 (yyparse): Loop on files rewritten. Set current_jcf.
18691 (parse_zip_file_entries): Parse class file only if it was found.
18692 * lang.c (init_parse): Don't open command line provided filename
18694 (lang_parse): Don't set main_jcf anymore.
18695 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
18696 (JCONSTRUCTOR_CHECK): New macro.
18697 (JBSC_TYPE_P): New macro.
18698 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
18699 (COMPLETE_CHECK_OP_2): New macro.
18700 (struct parse_ctxt): New field explicit_constructor_p.
18701 (check_class_interface_creation): Fixed prototype indentation.
18702 (patch_method_invocation_stmt): Prototype reflects added argument.
18703 (patch_invoke): Likewise.
18704 (complete_method_declaration, build_super_invocation,
18705 verify_constructor_circularity,
18706 build_this_super_qualified_invocation, get_printable_method_name,
18707 patch_conditional_expr, maybe_generate_finit, fix_constructors,
18708 verify_constructor_super, create_artificial_method,
18709 start_artificial_method_body, end_artificial_method_body,
18710 generate_field_initialization_code): New function prototypes.
18711 * parse.y: Fixed leading comment
18712 (constructor_header:, constructor_body:, block_end:): Rules tagged
18714 (type_declaration:): Call maybe_generate_finit.
18715 (method_declaration:): Action for method_body: placed in new
18716 function complete_method_declaration, called here.
18717 (constructor_declaration:): Defined actions. Removed leading
18719 (constructor_header:): New rule with action.
18720 (constructor_body:): Rule rewritten using block_begin: and
18721 block_end:. Defined actions.
18722 (constructor_declarator:, explicit_constructor_invocation:):
18724 (block:): Use new rules block_begin: block_end:.
18725 (block_begin:, block_end:): New rules and actions.
18726 (block_statements:): Fixed error message for explicit
18728 (method_invocation:): Call build_this_super_qualified_invocation
18729 if primary is `this' or `super' was seen.
18730 (conditional_expression:): Action defined.
18731 (extra_ctxp_pushed_p): New static global flag.
18732 (java_parser_context_save_global): Create parser context if
18733 necessary. Use extra_ctxp_pushed_p to remember it.
18734 (java_parser_context_restore_global): Pop extra parser context if
18736 (build_array_from_name): Array on primitive types are marked
18738 (register_fields): Restore new name in field initializer
18739 expression if type was altered. Non static fields initialized upon
18740 declaration marked initialized.
18741 (maybe_generate_finit): New function.
18742 (maybe_generate_clinit): Use create_artificial_method,
18743 start_artificial_method_body, end_artificial_method_body. Generate
18744 debug info for enclosed initialization statements.
18745 (method_header): Fixed leading comment. Check constructor
18746 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
18748 (complete_method_declaration, constructor_circularity_msg,
18749 verify_constructor_circularity): New functions.
18750 (get_printable_method_name): New function.
18751 (check_method_redefinition): Don't rename <finit> methods. Fix
18752 declared constructor names. Error message for
18753 constructors modified.
18754 (java_check_regular_methods): Local variable seen_constructor
18755 renamed saw_constructor. Skip verification on constructors. Create
18756 default constructor with create_artificial_method.
18757 (java_check_methods): Removed unnecessary empty line.
18758 (create_artificial_method, start_artificial_method_body,
18759 end_artificial_method_body): New functions.
18760 (java_layout_classes): Changed leading comment. Reverse fields
18761 list if necessary. Always layout java.lang.Object if being
18763 (java_complete_expand_methods): Verify constructor circularity.
18764 (java_complete_expand_method): Call fix_constructor on
18765 constructors. Local variable no_ac_found removed. Restore
18766 bindings if method body expansion failed.
18767 (fix_constructors, verify_constructor_super,
18768 generate_field_initialization_code): New function.
18769 (java_expand_classes): Fixed leading comment. Write class file
18771 (resolve_expression_name): Check for illegal instance variable
18772 usage within the argument scope of an explicit constructor
18774 (resolve_qualified_expression_name): Pass extra from_super flag
18775 when invoking patch_method_invocation_stmt. New case for
18776 conditional expression when used as a primary. Check for error
18777 when acquiring super.
18778 (patch_method_invocation_stmt): Added extra argument super. New
18779 local variable is_static_flag. Set class_to_search according to
18780 the nature of the constructor invocation. Don't add `this'
18781 argument when expanding NEW_CLASS_EXPR. Check for illegal method
18782 invocation within the argument scope of explicit constructor
18783 invocation. Set is_static according to is_static_flag. Provide
18784 extra `super' argument to patch_invoke invocation.
18785 (patch_invoke): New argument from_super. Loop on arguments
18786 indentation fixed. Pass from_super to invocation_mode. New switch
18787 case INVOKE_SUPER. Fixed error message in switch default case.
18788 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
18790 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
18791 (lookup_method_invoke): Fixed prototypes in candidates list. Error
18792 message takes constructors into account.
18793 (find_applicable_accessible_methods_list): Fixed indentation.
18794 (qualify_ambiguous_name): Take explicit constructor invocation
18795 into account. Deal with a conditional expression as a primary to
18797 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
18798 case. Added extra argument to patch_method_invocation_stmt.
18799 Register calls made to explicit constructor `this'. Don't call
18800 save_expr in ARRAY_REF case when emitting class files. Check for
18801 illegal use of this when expanding explicit constructor invocation
18803 (complete_function_arguments): Set and reset parser context
18804 explicit_constructor_p field value when appropriate.
18805 (build_super_invocation, build_this_super_qualified_invocation):
18807 (patch_assignment): Fixed typo.
18808 (patch_unaryop): Check on final fields occurs only when a decl
18810 (patch_return): Take constructors into account.
18811 (patch_conditional_expr): New function.
18812 * typeck.c (build_java_signature): Removed unnecessary empty line.
18814 1998-10-28 Jeffrey A Law (law@cygnus.com)
18816 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
18818 1998-10-28 Tom Tromey <tromey@cygnus.com>
18820 * decl.c (init_decl_processing): Renamed fields.
18821 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
18822 interface_len, msize fields.
18824 * class.c (make_class_data): Removed subclass_head and
18825 subclass_next fields.
18826 * decl.c (init_decl_processing): Removed subclass_head and
18827 subclass_next fields.
18829 1998-10-28 Jeffrey A Law (law@cygnus.com)
18831 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
18832 * mangle.c (emit_unicode_mangled_name): Similarly.
18834 1998-10-26 Nick Clifton <nickc@cygnus.com>
18836 * jcf-parse.c (get_constant): Place braces around code to compute
18837 'd' when REAL_ARITHMETIC is not defined.
18839 1998-10-25 H.J. Lu (hjl@gnu.org)
18841 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
18844 1998-10-23 Tom Tromey <tromey@cygnus.com>
18846 * lang-specs.h: `.zip' files are input to jc1.
18848 1998-10-22 Per Bothner <bothner@cygnus.com>
18850 * jvspecs.c: Add (but don't enable) support for combining multiple
18851 .class and .java input filenames to a single jc1 invocation.
18852 Add support for -C flag (copile to .class files).
18853 Translate -classpath and -CLASSPATH arguments.
18854 * lang-specs.h: Don't set %2 spec.
18856 1998-10-22 Tom Tromey <tromey@cygnus.com>
18858 * jcf-path.c (add_entry): Don't add trailing separator if entry is
18860 (add_path): Don't add trailing separator to non-empty path
18863 * lang.c (lang_decode_option): Check for -fclasspath and
18864 -fCLASSPATH before examining other `-f' options.
18866 * java-tree.h (finalize_identifier_node): Don't declare.
18867 * class.c (make_class_data): Don't push "final" field.
18868 * decl.c (init_decl_processing): Don't push "final" field.
18869 (finalize_identifier_node): Removed.
18870 (init_decl_processing): Don't set finalize_identifier_node.
18872 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
18874 1998-10-11 Anthony Green <green@cygnus.com>
18876 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
18877 (JV_SCAN_SOURCES): New macro.
18878 (JCF_DUMP_SOURCES): Likewise.
18879 (jcf-dump$(exeext)): New target.
18880 (jv-scan$(exeext)): New target.
18882 1998-10-22 Tom Tromey <tromey@cygnus.com>
18884 * Makefile.in (LEX): Removed.
18885 (LEXFLAGS): Likewise.
18886 (SET_BISON): New macro.
18888 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
18889 spurious diffs in parse.c.
18890 ($(PARSE_SCAN_C)): Likewise.
18891 (PARSE_DIR): New macro.
18893 (PARSE_SCAN_C): Likewise.
18894 (PARSE_RELDIR): New macro.
18896 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
18898 * jcf-io.c (find_class): Use saw_java_source to determine when to
18899 look for `.java' file.
18900 * jcf-parse.c (saw_java_source): New global.
18901 (yyparse): Set it if `.java' file seen.
18903 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
18904 (GCJH_SOURCES): Likewise.
18905 * Makefile.in (datadir): New macro.
18906 (libjava_zip): Likewise.
18907 (JAVA_OBJS): Added jcf-path.o.
18908 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18909 (../gcjh$(exeext)): Likewise.
18910 (jcf-path.o): New target.
18911 * java-tree.h (fix_classpath): Removed decl.
18912 * jcf-parse.c (fix_classpath): Removed.
18913 (load_class): Don't call fix_classpath.
18914 * parse.y (read_import_dir): Don't call fix_classpath.
18915 * lex.h: Don't mention classpath.
18916 * lex.c (java_init_lex): Don't initialize classpath.
18917 * jcf-io.c (classpath): Removed global.
18918 (find_class): Use jcf_path iteration functions. Correctly search
18919 class path for .java file.
18920 (open_in_zip): New argument `is_system'.
18921 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
18922 classpath-related options.
18923 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
18925 (lang_init): Call jcf_path_init.
18926 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
18927 * lang-specs.h: Handle -I. Minor cleanup to -M options.
18928 Correctly put braces around second string in each entry.
18929 * gjavah.c (main): Call jcf_path_init. Recognize all the new
18930 classpath-related options.
18931 (help): Updated for new options.
18932 * jcf.h: Declare functions from jcf-path.c. Don't mention
18933 `classpath' global.
18934 * jcf-path.c: New file.
18936 * jcf-depend.c: Include jcf.h.
18938 * jcf-write.c (localvar_alloc): Returns `void'.
18939 (localvar_free): Removed unused variable.
18941 * lang.c (OBJECT_SUFFIX): Define if not already defined.
18942 (init_parse): Use OBJECT_SUFFIX, not ".o".
18944 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
18946 * class.c (emit_register_classes): Renamed from
18947 emit_register_class.
18948 * java-tree.h (emit_register_classes): Prototype renamed from
18949 emit_register_class.
18950 * jcf-parse.c (yyparse): Call emit_register_classes once before
18952 * parse.y (java_expand_classes): No longer register classes.
18954 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
18956 * class.c (is_compiled_class): New local variable
18957 seen_in_zip. Identify classes found in currently compiled source
18959 * decl.c (complete_start_java_method): Fixed typo.
18960 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
18961 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
18962 (CLASS_P): Moved around.
18963 (java_parse_abort_on_error): Macro moved from jcf-parse.c
18964 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
18966 (jcf_parse_source): Changed leading comment. Removed unnecessary
18967 fclose and CLASS_FROM_SOURCE_P marking.
18968 (parse_source_file): New local variables remember_for_generation
18969 and filename. Mark parsed file name identifier node. Removed block
18970 executed when parse_only was null. Set remember_for_generation.
18971 Use it as an argument to java_pop_parser_context.
18972 (yyparse): New local variables several_files, list, next node and
18973 current_file_list. Split ampersand separated file names into
18974 current_file_list. Iterate through the list and parse accordingly.
18975 * parse.h (java_pop_parser_context): New function prototype.
18976 * parse.y (ctxp_for_generation): New static global variable.
18977 (java_pop_parser_context): New argument generate. Link popped ctxp
18978 to ctxp_for_generation list accordingly.
18979 (java_complete_expand_methods): Fixed indentation.
18980 (java_expand_classes): New function.
18982 1998-10-17 Per Bothner <bothner@cygnus.com>
18984 * Makefile.in: Link with libiberty.a instead of memmove.o.
18986 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
18988 * lex.c (setjmp.h): No longer included.
18989 * lex.h (setjmp.h): Included.
18990 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
18991 (duplicate_declaration_error_p): Renamed from
18992 duplicate_declaration_error.
18993 (build_array_from_name): New function prototype.
18994 * parse.y (setjmp.h): No longer included.
18995 (variable_declarator_id): Define action.
18996 (build_array_from_name): New function.
18997 (duplicate_declaration_error_p): Renamed from
18998 duplicate_declaration_error. Fixed leading comment.
18999 (register_fields): Main `for' loop reorganized. Uses
19000 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19001 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19002 build_array_from_name.
19003 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19005 (read_import_dir): Don't try to skip `.' and `..'.
19006 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19007 build_array_from_name. Main `for' loop reorganized.
19008 (resolve_qualified_expression_name): When building access to a
19009 field, use the type where the field was found, not its own type.
19010 (maybe_access_field): Use field DECL_CONTEXT if the type where the
19011 field was found is null.
19012 (qualify_ambiguous_name): Sweep through all successive array
19015 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
19017 * java-tree.h (pop_labeled_block, lang_printable_name,
19018 maybe_add_interface, set_super_info, get_access_flags_from_decl,
19019 interface_of_p, inherits_from_p, fix_classpath,
19020 complete_start_java_method, emit_handlers, init_outgoing_cpool,
19021 make_class_data, register_class, alloc_name_constant): New
19022 function prototypes.
19023 * lang.c (lang_decode_option): Set argc argument unused. Fixed
19024 indentation. Added cast to remove warning.
19025 (lang_printable_name): Set v argument unused.
19026 (lang_print_error): Added argument to lang_printable_name call.
19027 (java_dummy_print, print_lang_decl, print_lang_type,
19028 print_lang_identifier, lang_print_xnode): All argument marked
19030 * lex.c (java_unget_unicode): Removed unnecessary argument.
19031 (java_allocate_new_line): Unused local variable is gone.
19032 (java_read_char): Added parenthesis in expressions to remove
19033 warnings. Added final return statement.
19034 (java_read_unicode): Added parenthesis in expression to remove
19036 (java_parse_end_comment): Fixed java_unget_unicode invocation.
19037 (java_parse_escape_sequence): Likewise.
19038 (java_lex): Unused local variables are gone. Fixed
19039 java_unget_unicode invocation.
19040 * lex.h (set_float_handler): Prototype added when JC1_LITE not
19042 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19043 lang_printable_name invocation in macro.
19044 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19046 (duplicate_declaration_error): Suppressed unused argument in
19048 (identical_subpath_p): Function declaration is gone.
19049 (patch_invoke): Suppressed unused argument in prototype.
19050 (patch_cast, build_labeled_block, check_thrown_exceptions):
19052 * parse.y (setjmp.h): Included
19053 (toplev.h): Likewise.
19054 (field_declaration:): Suppressed unused local
19055 (label_decl:): Fixed build_labeled_block invocation.
19056 (java_pop_parser_context): Put extra parenthesis around assignment
19058 (yyerror): Suppressed unused local variables.
19059 (variable_redefinition_error): Fixed lang_printable_name
19061 (create_interface): Suppressed unused local variables.
19062 (create_class): Likewise.
19063 (duplicate_declaration_error): Suppressed unused argument. Fixed
19064 lang_printable_name invocation.
19065 (register_fields): Suppressed unused local variable. Fixed
19066 duplicate_declaration_error invocation.
19067 (method_header): Suppressed unused local variable.
19068 (method_declarator, parser_check_super): Likewise.
19069 (java_complete_class): Suppressed unused local variable. Fixed
19070 fatal error message.
19071 (complete_class_report_errors): Added default: in switch.
19072 (java_check_regular_methods): Fixed lang_printable_name
19074 (check_throws_clauses): Likewise.
19075 (java_check_abstract_methods): Suppressed unused local
19076 variable. Fixed lang_printable_name invocation.
19077 (read_import_entry): Added supplemental return statement.
19078 (read_import_dir): Suppressed unused local variables.
19079 (check_pkg_class_access, declare_local_variables): Likewise.
19080 (source_start_java_method): Suppressed unused extern variable
19082 (expand_start_java_method): Suppressed unused extern and local
19083 variable declarations.
19084 (java_complete_expand_methods): Likewise.
19085 (java_complete_expand_method): Suppressed unused local variables.
19086 (make_qualified_name): Likewise.
19087 (resolve_qualified_expression_name): Added default: in
19088 switch. Fixed lang_printable_name invocation.
19089 (class_instance_creation_expression): Added parenthesis around
19091 (patch_method_invocation_stmt): Fixed lang_printable_name and
19092 patch_invoke invocations.
19093 (check_for_static_method_reference): Fixed lang_printable_name
19095 (patch_invoke): Suppressed unused arguments and local variables.
19096 (lookup_method_invoke): Suppressed unused local variables.
19097 (qualify_ambiguous_name): Added default: in switch.
19098 (identical_subpath_p): Function removed.
19099 (patch_assignment): Suppressed unused local variables. Suppressed
19100 unnecessary if statement. Fixed lang_printable_name invocations.
19101 (try_builtin_assignconv): Fixed lang_printable_name invocations.
19102 (valid_ref_assignconv_cast_p): Parenthesis around
19103 expression. Suppressed unused local variables.
19104 (build_binop): Suppressed unused local variables. fixed
19105 lang_printable_name invocations.
19106 (string_constant_concatenation): Suppressed unused local
19108 (patch_unaryop): Fixed lang_printable_name invocation.
19109 (patch_cast): Suppressed unnecessary argument. Fixed
19110 lang_printable_name invocation.
19111 (patch_array_ref): Fixed lang_printable_name invocation.
19112 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19113 (build_labeled_block): Suppressed unused argument.
19114 (generate_labeled_block): Fixed build_labeled_block invocation.
19115 (build_loop_body): Suppressed unused local variables.
19116 (patch_loop_statement): Likewise.
19117 (patch_exit): Fixed lang_printable_name invocation.
19118 (patch_switch_statement): Likewise.
19119 (case_identity): First argument marked unused.
19120 (patch_try_statement): Fixed lang_printable_name invocations.
19121 (patch_synchronized_statement, patch_throw_statement): Likewise.
19122 (check_thrown_exceptions): Fixed check_thrown_exceptions and
19123 lang_printable_name invocations.
19124 (check_thrown_exceptions_do): Suppressed unused argument.
19126 1998-10-14 Tom Tromey <tromey@cygnus.com>
19128 * jcf-write.c (write_classfile): Add output class file as target.
19129 * lang-options.h: Added -MD, -MMD, -M, and -MM.
19130 * jcf.h: Added declarations for dependency-tracking functions.
19131 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19132 * lang.c (lang_decode_option): Recognize -MD and -MMD.
19133 (finish_parse): Call jcf_dependency_write.
19134 (dependency_tracking): New global.
19135 (DEPEND_SET_FILE): New define.
19136 (DEPEND_ENABLE): New define.
19137 (init_parse): Enable dependency tracking if required.
19139 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19140 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19141 (../gcjh$(exeext)): Likewise.
19142 (jcf-depend.o): New target.
19143 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19144 (GCJH_SOURCES): Likewise.
19145 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
19147 (find_classfile): Added dep_name argument.
19148 (find_class): Compute name of dependency.
19149 (open_in_zip): Call jcf_dependency_add_file.
19150 * gjavah.c (output_file): No longer global.
19151 (usage): Don't mention "gjavah".
19153 (java_no_argument): Likewise.
19154 (version): Likewise.
19155 (main): Recognize and handle -M family of options.
19156 (print_mangled_classname): Return is void.
19157 (process_file): Handle case where output is suppressed.
19158 (HANDLE_END_FIELD): Likewise.
19159 (HANDLE_METHOD): Likewise.
19160 * jcf-depend.c: New file.
19162 1998-10-13 Jeffrey A Law (law@cygnus.com)
19164 * java-tree.def: Add missing newline at EOF.
19166 1998-10-13 Tom Tromey <tromey@cygnus.com>
19168 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19169 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
19171 Include <config.h> and "system.h".
19172 (disassemble_method): Undefine RET to avoid clash with
19173 config/i386/i386.h.
19175 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
19177 * decl.c (runtime_exception_type_node, error_exception_type_node):
19178 New global variables.
19179 (init_decl_processing): Initialized.
19180 * expr.c (java_lang_expand_expr): Set caught exception type to
19181 null if catch handler argument doesn't exit.
19182 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19184 * java-tree.h (runtime_exception_type_node,
19185 error_exception_type_node): Global variables declared.
19186 (DECL_FUNCTION_THROWS): New macro.
19187 (DECL_FUNCTION_BODY): Modified comment.
19188 (DECL_SPECIFIC_COUNT): Likewise.
19189 (struct lang_decl): New field throws_list.
19190 (IS_UNCHECKED_EXPRESSION_P): New macro.
19191 * lex.c (java_lex): Generate location information for THROW_TK.
19192 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19193 EXCEPTIONS_P): New macros.
19194 (enum jdep_code): New value JDEP_EXCEPTION.
19195 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19196 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19197 PATCH_METHOD_RETURN_ERROR): New macros.
19198 (patch_method_invocation_stmt): Added new argument to prototype.
19199 (patch_synchronized_statement, patch_throw_statement,
19200 check_thrown_exceptions, check_thrown_exceptions_do,
19201 purge_unchecked_exceptions, check_throws_clauses): New function
19203 * parse.y Fixed typo in keyword section.
19204 (throw:): Rule tagged <node>.
19205 (THROW_TK): Keyword tagged <operator>.
19206 (method_header:): Last argument to call to method_header passed
19208 (throws:, class_type_list:, throw_statement:,
19209 synchronized_statement:, synchronized:): Defined actions.
19210 (method_header): New local variable current. Register exceptions
19211 from throws clause.
19212 (java_complete_tree): Complete and verify exceptions from throws
19214 (complete_class_report_errors): Error message on exceptions not
19216 (java_check_regular_methods): Fixed typo. Shortcut on private
19217 overriding methods. Changed error message on method
19218 redefinition. Check for throws clause compatibility.
19219 (check_throws_clauses): New function.
19220 (java_check_abstract_methods): Use DECL_NAME for wfl or current
19221 method. Changed error message on method redefinition.
19222 (currently_caught_type_list): New static variable.
19223 (java_complete_expand_methods): Purge unchecked exceptions from
19224 throws clause list. Call PUSH_EXCEPTIONS before walk and
19225 POP_EXCEPTIONS after.
19226 (resolve_qualified_expression_name): Pass new argument as NULL to
19227 patch_method_invocation_stmt.
19228 (patch_method_invocation_stmt): New argument ref_decl. Invoke
19229 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19230 argument list when appropriate. Use new argument if non null to
19231 store selected method decl.
19232 (patch_invoke): Convert if necessary args of builtin types before
19233 forming CALL_EXPR. Argument list no longer reversed here.
19234 (invocation_mode): Treat final methods as static methods.
19235 (java_complete_tree): New cases for THROW_EXPR: and
19236 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19238 (complete_function_arguments): No more RECORD_TYPE
19239 conversion. Function parameter nodes no longer saved.
19240 (valid_ref_assignconv_cast_p): Avoid handling null type.
19241 (patch_binop): Fixed null constant reference handling.
19242 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19243 BUILD_THROW macros.
19244 (patch_try_statement): Fixed comments. Record caught types in
19245 list, push the list, expand try block and pop the list.
19246 (patch_synchronized_statement, patch_throw_statement,
19247 check_thrown_exceptions, check_thrown_exceptions_do,
19248 purge_unchecked_exceptions): New functions.
19249 * typeck.c (lookup_argument_method): Allow WFL in place of method
19250 DECL_NAME during method definition check
19252 1998-10-09 Tom Tromey <tromey@cygnus.com>
19254 * gjavah.c (decode_signature_piece): New function.
19255 (print_c_decl): Use it. Added `name_override' argument.
19256 (print_method_info): Use name_override argument to print_c_decl.
19257 (seen_fields): Removed.
19258 (print_field_info): Don't update seen_fields.
19259 (struct method_name): New structure.
19260 (method_name_list): New global.
19261 (print_method_info): Add new method to list of methods.
19262 (name_is_method_p): New function.
19263 (print_field_info): If field name has same name as method, then
19265 (process_file): Parse methods before fields.
19266 (field_pass): New global.
19267 (HANDLE_END_FIELD): Take field_pass into account.
19269 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19271 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19272 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19274 1998-10-03 Anthony Green <green@cygnus.com>
19276 * jvspec.c: Fix bug in jvgenmain_spec patch.
19278 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19280 * Makefile.in (lang.o:): Install dependency on java-tree.def.
19281 * decl.c (soft_exceptioninfo_call_node): New global variable.
19282 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19283 takes extra integer argument. soft_exceptioninfo_call_node
19285 * except.c (java_set_exception_lang_code): New function
19286 (method_init_exceptions): Called here.
19287 (prepare_eh_table_type): New function.
19288 (expand_end_java_handler): Called here.
19289 * expr.c (build_java_throw_out_of_bounds_exception): Now features
19290 one argument. Modified generation of call to
19291 soft_badarrayindex_node to use new argument.
19292 (build_java_arrayaccess): Pass faulty index value to
19293 build_java_throw_out_of_bounds_exception.
19294 (generate_name): New function.
19295 (java_lang_expand_expr): New local variables node, current,
19296 has_finally_p. Expand TRY_EXPR node.
19297 (process_jvm_instruction): Replace top of the stack with thrown
19298 object reference when entering exception handler.
19299 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19300 specific tree codes.
19301 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19303 (DECL_SPECIFIC_COUNT): New macro.
19304 (prepare_eh_table_type, java_set_exception_lang_code,
19305 generate_name): New function declarations.
19306 (match_java_method): Declaration deleted.
19307 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19309 * lex.c (TRY_TK, CATCH_TK): Generate location information.
19310 * parse.h (redefinition_error, refine_accessible_methods_list,
19311 can_cast_to_p): Function declaration removed.
19312 (classitf_redefinition_error, variable_redefinition_error,
19313 parse_jdk1_1_error, find_applicable_accessible_methods_list,
19314 find_most_specific_methods_list, argument_types_convertible,
19315 enter_a_block, valid_builtin_assignconv_identity_widening_p,
19316 valid_cast_to_p, valid_method_invocation_conversion_p,
19317 try_reference_assignconv, add_stmt_to_compound,
19318 build_jump_to_finally, build_tree_list, patch_try_statement,
19319 java_get_catch_block): New function declarations.
19320 * parse.y (string_buffer_type): Global variable deleted.
19321 (group_of_labels, catches, catch_clause, catch_clause_parameter,
19322 finally): Rules tagged <node>.
19323 (TRY_TK, CATCH_TK): Token tagged <operator>.
19324 (class_body_declaration:, class_member_declaration:,
19325 formal_parameter:, explicit_constructor_invocation:,
19326 interface_member_declaration:, constant_declaration:,
19327 primary_no_new_array:, class_instance_creation_expression:,
19328 array_creation_expression:): Issue error on unsuported JDK1.1
19330 (try_statement:, catches:, finally:): Define actions.
19331 (catch_clause_parameter): New rule.
19332 (catch_clause:): Use new rule catch_clause_parameter.
19333 (parse_jdk1_1_error): New function.
19334 (redefinition_error): Renamed classitf_redefinition_error.
19335 (variable_redefinition_error): New function.
19336 (check_class_interface_creation): Call
19337 classitf_redefinition_error.
19338 (java_complete_tree): Added error message on JDEP_TYPE: case.
19339 (complete_class_report_errors): Fixed indentation.
19340 (declare_local_variables): Call variable_redefinition_error.
19341 (source_end_java_method): Call java_set_exception_lang_code and
19342 emit_handlers where appropriate.
19343 (java_method_add_stmt): Call add_stmt_to_block.
19344 (add_stmt_to_block): New function.
19345 (lookup_method_invoke): Fixed outside comment. new local variable
19346 candicates. Call find_applicable_accessible_methods_list and
19347 find_most_specific_methods_list when searching for a
19348 method. Modified error report to list possible candidates when
19350 (find_applicable_accessible_methods_list,
19351 find_most_specific_methods_list, argument_types_convertible): New
19353 (refine_accessible_methods_list): Function deleted.
19354 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19355 expr (if applicable) before calling patch_array_ref.
19356 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19357 (enter_block): Fixed comment.
19358 (enter_a_block): New function.
19359 (patch_assignment): Reorganized. Call try_reference_assignconv for
19360 references. Call valid_cast_to_p instead of can_cast_to_p.
19361 (try_reference_assignconv,
19362 valid_builtin_assignconv_identity_widening_p): New functions.
19363 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19364 (valid_cast_to_p, valid_method_invocation_conversion_p): New
19366 (build_string_concatenation): Don't resolve StringBuffer.
19367 (patch_cast): Fixed inverted arguments.
19368 (patch_array_ref): Code to save array expr deleted. Call
19369 valid_cast_to_p instead of can_cast_to_p.
19370 (generate_labeled_block): Call generate_name.
19371 (build_jump_to_finally, build_try_statement, java_get_catch_block,
19372 patch_try_statement): New functions.
19373 * typeck.c (match_java_method): Function deleted.
19375 1998-10-02 Anthony Green <green@cygnus.com>
19377 * jvspec.c: jvgenmain_spec uses different temporary file names.
19379 1998-10-02 Anthony Green <green@cygnus.com>
19381 * jvspec.c (lang_specific_driver): Fail if user specifies
19382 --main= when not linking.
19384 1998-09-28 Tom Tromey <tromey@cygnus.com>
19386 * class.c (make_class_data): Push value for `thread' field.
19387 * decl.c (init_decl_processing): Added `thread' field to class.
19389 * class.c (add_field): Always make static fields externally
19392 1998-09-26 Anthony Green <green@cygnus.com>
19394 * expr.c (build_java_athrow,
19395 build_java_throw_out_of_bounds_exception, expand_invoke,
19396 build_newarray, expand_java_multianewarray, build_java_monitor):
19397 Update comments to reflect _Jv_* function names.
19399 1998-09-25 Per Bothner <bothner@cygnus.com>
19401 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
19402 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
19403 * parse.y (expand_start_java_method): Likewise.
19405 1998-09-24 Per Bothner <bothner@cygnus.com>
19407 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
19409 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19410 (add_field): No longer need to convert from RECORD_TYPE to pointer,
19411 * expr.c: Remove no-longer-needed calls to promote_type.
19412 * decl.c (give_name_to_locals): Liekwise.
19413 * jcf-parse.c (get_class_constant): Compensate for new signatures.
19414 * parse.y: Add/remove promote_type calls as appropriate.
19415 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
19416 (parse_signature_string): Likewise.
19417 (build_java_array_type): Fix for now signature convenions.
19419 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
19421 1998-09-23 Tom Tromey <tromey@cygnus.com>
19423 * class.c (init_class_processing): libjava function renamed to
19426 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
19428 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19429 * java-tree.def: Fixed DEFTREECODE third argument.
19430 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
19431 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
19432 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19433 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19434 JAVA_THIS_EXPR): Now replaced by tree code definitions.
19435 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19436 * lang.c (java_tree_code_type, java_tree_code_length,
19437 java_tree_code_name): New arrays.
19438 (lang_init): Append Java tree node definitions to Gcc ones.
19439 * lex.c (expression_obstack): Declared as extern when JC1_LITE
19441 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
19443 (java_lex): Allow declaration of empty string constants. Retain
19444 location information on CASE_TK and DEFAULT_TK.
19445 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
19446 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19447 Modified to be more robust.
19448 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19449 (build_new_invocation, try_builtin_assignconv,
19450 patch_switch_statement, string_constant_concatenation,
19451 build_string_concatenation, patch_string_cst, patch_string,
19452 java_expand_switch): New function declarations.
19453 * parse.y: Rules related to switch and EH tagged <node>.
19454 (label_id): Set to NULL_TREE
19455 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
19457 (this_or_super:): Fixed indentation.
19458 (statement:, statement_nsi:, statement_without_trailing_substatement:,
19459 statement_expression:): Removed call to RULE on all sub-rules.
19460 (switch_expression:, switch_labels:): New rules.
19461 (switch_statement:, switch_block:, switch_block_statement_groups:,
19462 switch_block_statement_group:, switch_labels:, switch_label:):
19464 (throw_statement:, synchronized_statement:, try_statement:):
19465 Defined temporary actions.
19466 (class_instance_creation_expression:): Call
19467 build_new_invocation. Fixed indentation.
19468 (field_access): Fixed indentation.
19469 (method_invocation): Likewise.
19470 (make_qualified_primary): Use THIS_EXPR.
19471 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
19472 resolving from SUPER, set *type_found.
19473 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19474 (java_complete_tree): Removed unused local variable `location'. Case
19475 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19476 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19477 on MODIFY_EXPR: and all binary operator tree code cases. Removed
19478 STRING_CST: case. default: checks for patchable strings.
19479 (complete_function_arguments): Transform string constant or
19480 crafted StringBuffer if necessary.
19481 (build_method_invocation): Fixed comments.
19482 (build_new_invocation): New function.
19483 (patch_assignment): Call try_builtin_assignconv to figure a valid
19484 assignment conversion between builtin types.
19485 (try_builtin_assignconv): New function.
19486 (build_binop): Use URSHIFT_EXPR directly to call build.
19487 (operator_string): Use UNARY_PLUS_EXPR.
19488 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
19490 (do_merge_string_cste, merge_string_cste,
19491 string_constant_concatenation, build_string_concatenation,
19492 patch_string, patch_string_cst): New function.
19493 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19494 (patch_unaryop): Likewise. New test of valid ++/-- operands.
19495 (build_newarray_node): Use NEW_ARRAY_EXPR.
19496 (build_this): Use THIS_EXPR.
19497 (build_return): Enable debug information on return statement.
19498 (build_if_else_statement): Likewise.
19499 (complete_labeled_statement): Fixed related comment.
19500 (build_loop_body): Fixed comment.
19501 (build_bc_statement): Enable debug information on break/continue
19503 (patch_bc_statement): Fixed typos. Handle SWITCH statement
19505 (patch_switch_statement, case_identity, java_expand_switch): New
19508 1998-09-21 Per Bothner <bothner@cygnus.com>
19510 * buffer.h (BUFFER_INIT): New macro.
19511 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
19512 Pass (struct jcf_partial *state) to most functions.
19513 (jcf_block, jcf_relocation): New types.
19514 Support labels, branches, conditionals, loops.
19516 1998-09-21 Tom Tromey <tromey@cygnus.com>
19518 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19520 1998-09-21 Per Bothner <bothner@cygnus.com>
19522 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
19523 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
19524 not integer_type_node (INT_TYPE_SIZ bits).
19526 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
19528 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
19529 * jcf-dump.c (print_exception_table): New function.
19530 (disassemble_method): Better handling of wide instructions.
19531 Make more robust for bad input.
19533 1998-09-30 Jeffrey A Law (law@cygnus.com)
19535 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19538 1998-09-17 Jeffrey A Law (law@cygnus.com)
19540 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19542 1998-09-17 Tom Tromey <tromey@cygnus.com>
19544 * Makefile.in ($(PARSE_H)): Removed target.
19546 1998-09-17 Jeffrey A Law (law@cygnus.com)
19548 * Makefile.in (JAVA_OBJS): Add memmove.o
19549 (memmove.o): New target & rules.
19551 1998-09-15 Tom Tromey <tromey@cygnus.com>
19553 * expr.c (expand_invoke): Don't generate a call to the class init
19556 1998-09-14 Jeffrey A Law (law@cygnus.com)
19558 * Makefile.in: Add many missing dependencies.
19559 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
19561 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
19562 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
19564 1998-09-11 Per Bothner <bothner@cygnus.com>
19566 * decl.c (complete_start_java_method): If method is static (and
19567 not private) call _Jv_InitClass.
19568 * expr.c (expand_invoke): Don't call build_class_init.
19570 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
19572 1998-09-10 Jeffrey A Law (law@cygnus.com)
19574 * Make-lang.in (GCJ): Define before using.
19576 1998-09-09 Jeffrey A Law (law@cygnus.com)
19578 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
19579 losing due to namespace pollution in GNU getopt.h
19581 1998-09-09 Tom Tromey <tromey@cygnus.com>
19583 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
19584 (java.all.cross): Likewise.
19585 (java.rest.encap): Likewise.
19587 1998-09-08 Jeffrey A Law (law@cygnus.com)
19589 * gjavah.c (print_class_decls): Fix thinko in arglist
19590 * jcv-io.c (find_classfile): Similarly.
19592 1998-09-07 Jeffrey A Law (law@cygnus.com)
19594 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
19596 1998-09-05 Tom Tromey <tromey@cygnus.com>
19598 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
19599 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
19600 * Makefile.in (PARSE_C): New macro.
19601 (PARSE_H): Likewise.
19602 (PARSE_SCAN_C): Likewise.
19603 ($(PARSE_C)): Target renamed from parse.c.
19604 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
19605 (clean): Remove parse-scan.c as well.
19606 (parse.o): Depend on $(PARSE_C).
19608 1998-09-05 Anthony Green <green@cygnus.com>
19610 * README, license.terms: Removed.
19612 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
19613 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
19614 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
19615 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
19616 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
19617 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
19618 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
19619 and Java trademark attribution.
19621 1998-09-04 Tom Tromey <tromey@cygnus.com>
19623 * Makefile.in: Use gcjh, not gjavah.
19624 * config-lang.in (stagestuff): Use gcjh, not gjavah.
19625 * Make-lang.in: Changed gjavah to gcjh everywhere.
19627 1998-09-03 Per Bothner <bothner@cygnus.com>
19629 * gjavah.c: Support new -prepend -add -append flags.
19630 (print_method_info): Method is not virtual if class is final.
19632 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
19634 * jv-scan.c: Fixed copyright assignment.
19635 * keyword.gperf: Likewise.
19636 * keyword.h: Likewise.
19637 * lex.c: Fixed copyright assignment.
19638 (java_lex): Push unicode back when parsing '<'.
19639 * lex.h: Fixed copyright assignment.
19640 * parse-scan.y: Likewise.
19641 * parse.h: Fixed copyright assignment.
19642 (build_debugable_stmt, complete_for_loop): New function prototypes.
19643 * parse.y: Fixed copyright assignment.
19644 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
19645 size_zero_node when completing a loop with no exit condition.
19646 (for_statement_nsi:): Define action.
19647 (for_init:, for_update:): Return size_zero_node when empty.
19648 (declare_local_variables): Call build_debugable_stmt.
19649 (build_debugable_stmt): New function.
19650 (build_loop_body): Build debugable statement around loop
19652 (complete_loop_body): Take into account the debugable statement
19653 around the EXIT_EXPR.
19654 (complete_loop_body): New function.
19655 (patch_exit_expr): Fixed condition inversion.
19657 1998-09-02 Tom Tromey <tromey@cygnus.com>
19659 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
19660 name of thread define.
19661 * jvspec.c (THREAD_NAME): New macro.
19663 (THREADLIB): Likewise.
19664 (lang_specific_driver): Recognize attempt to link with thread
19665 library or gc library. Recognize -ljava on command line so it
19666 isn't linked against more than once.
19668 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19670 * parse-scan.y (report_main_declaration): Name of the class
19671 containing `main' can be a qualified name.
19673 1998-08-31 Tom Tromey <tromey@cygnus.com>
19675 * config-lang.in: Changed gjavac to gjc everywhere.
19676 * Make-lang.in: Changed gjavac to gjc everywhere.
19678 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
19680 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
19681 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
19682 and install the files.
19683 * Makefile.in (JAVA_OBJS_LITE): New variable.
19684 (compiler:): Now include jv-scan as a dependency.
19685 (../jv-scan$(exeext), parse-scan.c): New targets.
19686 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
19687 * config-lang.in (compilers): Removed gcj, gjavah from the list.
19688 * jcf-parse.c (parse_source_file): Call java_layout_classes and
19689 check for errors even if parse_only.
19690 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
19692 (yylex): New function. Uses java_lex body.
19693 (java_lex): Removed commented out statement. Remove local variable
19694 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
19695 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
19696 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
19697 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
19698 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
19699 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
19701 (java_lex_error): Empty if JC1_LITE is defined.
19702 (java_get_line_col): Return 0 if JC1_LITE is defined.
19703 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
19704 SET_MODIFIER_CTX): Moved into the section containing the macros
19705 conditionally defined by JC1_LITE.
19706 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
19707 argument if JC1_LITE is defined.
19708 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
19709 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
19711 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
19712 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
19713 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
19714 to different values according to JC1_LITE.
19715 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
19716 declared if JC1_LITE set.
19717 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
19718 defined if JC1_LITE not set.
19719 (struct parser_ctx): Reorganized and skip the jc1 front end part
19721 (java_layout_classes): New function definition.
19722 (java_push_parser_context, java_init_lex, yyparse, yylex,
19723 yyerror): Prototype always declared. All other static function
19724 prototypes declared only if JC1_LITE is not set.
19725 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
19726 declared in parse.h.
19727 (java_layout_classes): New function.
19728 (java_complete_expand_methods): No longer layout the class here.
19729 * parse-scan.y: New file.
19730 * jv-scan.c: New file.
19732 1998-08-25 Tom Tromey <tromey@cygnus.com>
19734 * gjavah.c (main): Handle -friend option.
19735 (friend_specs): New global.
19736 (generate_access): Handle friend_specs.
19737 (process_file): Likewise.
19738 (MAX_FRIENDS): New macro.
19739 (friend_count): New global.
19740 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
19741 Changed all callers.
19743 1998-08-24 Per Bothner <bothner@cygnus.com>
19745 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
19746 (main): Handle processing all the entries of a named .zip archive.
19747 * jcf-io.c (jcf_trim_old_input): New function.
19748 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
19750 1998-08-24 Per Bothner <bothner@cygnus.com>
19752 * lang.c (flag_assume_compiled): Make default be on.
19754 1998-08-21 Per Bothner <bothner@cygnus.com>
19756 * jcf-dump.c: Add bunches of flags to control output more.
19757 (process_class): New function; support printing more than one class.
19758 (main): Support new --print-main and --javap flags.
19759 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
19760 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
19762 1998-08-20 Per Bothner <bothner@cygnus.com>
19764 Change mangling of dispatch table to match C++ vtable (w/thunks).
19765 * class.c (build_dtable_decl), java-tree.h: New function.
19766 (make_class_data): Call it.
19767 * decl.c (init_decl_processing): Likewise.
19769 1998-08-19 Warren Levy <warrenl@cygnus.com>
19771 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
19772 soft_anewarray; adjust args passed.
19773 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
19774 match _Jv_NewObjectArray.
19776 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
19778 * decl.c (push_labeled_block, pop_labeled_block): New functions.
19779 * expr.c (loopup_label): Call create_label_decl.
19780 (create_label_decl): New function.
19781 (java_lang_expand_expr): Call expand_start_bindings with argument
19783 * java-tree.h Added space after PROTO in function declarations
19785 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
19786 (create_label_decl, push_labeled_block): New function
19788 * lex.c (label_id): Initialize.
19789 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
19791 * parse.h Added space after PROTO in function declarations when
19793 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
19794 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
19795 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
19796 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
19798 (struct parser_ctxt): New fields current_loop,
19799 current_labeled_block.
19800 (build_if_else_statement, patch_if_else_statement,
19801 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
19802 generate_labeled_block, complete_labeled_statement,
19803 build_bc_statement, patch_bc_statement, patch_loop_statement,
19804 build_new_loop, build_loop_body, complete_loop_body): New function
19806 * parse.y (java_warning_count): New global variable.
19807 (label_id): New static variable.
19808 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
19809 (block:): Return size_zero_node when block is empty.
19810 (empty_statement:): Return size_zero_node.
19811 (statement:): Implement supplemental action when for_statement: is
19813 (label_decl:): New rule.
19814 (labeled_statement:): Rewritten using label_decl. Actions
19816 (labeled_statement_nsi:): Likewise.
19817 (if_then_statement): Actions implemented.
19818 (while_expression): New rule.
19819 (while_statement:): Rewritten using while_expression. Actions
19821 (while_statement_nsi:): Likewise.
19822 (do_statement_begin:): New rule.
19823 (do_statement:): Rewritten using do_statement_begin. Actions
19825 (for_statement:): Rewritten using for_begin. Actions implemented.
19826 (for_statement_nsi:): Likewise.
19827 (for_header:, for_begin:): New rules.
19828 (for_init:): Actions implemented.
19829 (statement_expression_list:, break_statement:,
19830 continue_statement:): Likewise.
19831 (yyerror): Count number of issued warning(s).
19832 (java_report_errors): Report error(s) and/or warning(s).
19833 (java_complete_class): Use build_java_argument_signature to
19834 recompute completed method signature.
19835 (java_check_regular_methods): New locals method_wfl and aflags.
19836 Use method_wfl instead of lookup_cl during error reports. Fixed
19837 indentation and modified some error messages. Use
19838 lang_printable_name in method instead of the DECL_NAME. New code
19839 to issue warnings on methods not overriding corresponding methods
19840 private to a different package.
19841 (java_method_add_stmt): Call add_stmt_to_compound.
19842 (add_stmt_to_compound): New function.
19843 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
19844 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
19845 (build_if_else_statement, patch_if_else_statement,
19846 build_labeled_block, generate_labeled_block,
19847 complete_labeled_statement, build_new_loop, build_loop_body,
19848 complete_loop_body, patch_loop_statement, build_bc_statement,
19849 patch_bc_statement, patch_exit_expr): New functions.
19850 * typeck.c (build_java_signature): Build argument signature before
19851 enclosing it in between parenthesis.
19853 1998-08-17 Warren Levy <warrenl@cygnus.com>
19855 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
19856 (JAVA_OBJS): Added reminder comment
19858 1998-08-13 Nick Clifton <nickc@cygnus.com>
19860 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
19861 be interpreted as a long long.
19863 1998-08-13 Warren Levy <warrenl@cygnus.com>
19865 * decl.c (init_decl_processing): Use _Jv_InitClass, not
19866 soft_initialise_class. Use _Jv_NewMultiArray, not
19867 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
19868 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
19869 _Jv_CheckArrayStore, not soft_checkarraystore. Use
19870 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
19872 1998-08-12 Per Bothner <bothner@cygnus.com>
19874 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
19875 length_identifier_node): New global tree node constants.
19876 * parse.y (kw_super, kw_this, kw_length): Removed globals.
19877 Replace uses by super_identifier_node etc.
19878 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
19880 * parse.y (resolve_field_access): Don't special-case ".length" if
19881 flag_emit_class_files.
19882 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
19883 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
19886 1998-08-11 Per Bothner <bothner@cygnus.com>
19888 * decl.c (init_decl_processing): Remove unused method_type_node fields.
19889 * class.c (make_method_value): Remove init for removed fields.
19891 * class.c (layout_class): Use build_java_argument_signature.
19892 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
19894 * typeck.c (push_java_argument_signature): Removed. Merged into ...
19895 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
19896 (build_java_signature): Don't use push_java_argument_signature.
19898 * typeck.c (lookup_argument_method): New function.
19899 * parse.y (java_check_regular_methods): Use lookup_argument_method
19900 instead of lookup_java_method2 followed by lookup_java_method.
19902 * parse.y (check_method_redefinition): Minor optimization.
19904 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
19905 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
19907 1998-08-10 Tom Tromey <tromey@cygnus.com>
19909 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
19912 * gjavah.c (java_float_finite): Use K&R-style definition.
19913 (java_double_finite): Likewise.
19914 (generate_access): Now returns void. Changed all callers.
19915 (last_access_generated): Removed.
19916 (process_file): Only make a single pass over the .class file.
19918 1998-07-29 Per Bothner <bothner@cygnus.com>
19920 * class.c (get_dispatch_table): Add extra dummy vtable entry,
19921 for compatibility for G++ (with -fvtable-thunks).
19922 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
19924 * gjavah.c (process_file): Use public inheritance for super-class.
19926 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
19928 * lex.c (java_init_lex): Initialize ctxp->package.
19929 * parse.h (struct parser_ctxt): package and package_len replaced
19930 by tree package, an identifier node. Field method_decl_list is
19931 gone. Fixed comments.
19932 (lookup_field_wrapper, merge_qualified_name, not_accessible,
19933 class_in_current_package): New function prototypes.
19934 * parse.y (array_type:): Set class loaded flag on primitive type
19936 (package_declaration:): Assign ctxp->package to the
19938 (method_invocation:): Handle invocation of method qualified by
19940 (single_type_import_declaration:): Removed ambiguity check.
19941 (java_pop_parser_context): New local variable `next'. Reset and
19942 set IMPORT_CLASSFILE_NAME flags on current and previous import
19944 (java_accstring_lookup): Use new local macro COPY_RETURN.
19945 (lookup_field_wrapper): New function.
19946 (parser_qualified_classname): Use merge_qualified_name.
19947 (parser_check_super_interface): Broaden error message.
19948 (do_resolve_class): Check for qualified class name in the current
19949 compilation unit if appropriate.
19950 (process_imports): Check for already defined classes.
19951 (check_pkg_class_access): Got rid of call to
19952 get_access_flags_from_decl.
19953 (java_complete_expand_methods): Call safe_layout_class based on
19954 the current class size.
19955 (make_qualified_primary): Build a WFL qualification on primary if
19957 (merge_qualified_name): New function.
19958 (make_qualified_name): Use merge_qualified_name.
19959 (resolve_expression_name): Use safe_lookup_field.
19960 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
19961 (resolve_qualified_expression_name): Likewise. Check on resolved
19962 element accessibility.
19963 (not_accessible_p, class_in_current_package): New functions.
19964 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
19965 (patch_method_invocation_stmt): Merged common pieces. Check
19966 accessibility of invoked method.
19967 (check_for_static_method_reference): Add returned type in error
19969 (invocation_mode): Get rid of bogus check on PRIVATE methods.
19970 (refine_accessible_methods_list): Merged two conditions in test.
19971 (java_complete_class): Sanity check on stabilize_ref gone.
19972 * zextract.c (read_zip_archive): Cast lseek second argument to long.
19974 1998-07-28 Per Bothner <bothner@cygnus.com>
19976 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
19978 1998-07-24 Tom Tromey <tromey@cygnus.com>
19980 * gjavah.c (F_NAN): Removed.
19981 (F_NAN_MASK): New macro.
19982 (F_POSITIVE_INFINITY): Removed.
19983 (F_NEGATIVE_INFINITY): Likewise.
19984 (java_float_finite): Rewrote.
19985 (D_NAN_MASK): Renamed.
19986 (java_double_finite): Rewrote.
19987 (D_POSITIVE_INFINITY): Removed.
19988 (D_NEGATIVE_INFINITY): Likewise.
19990 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
19991 If verbose, print underlying representation of value in hex.
19993 1998-07-24 Per Bothner <bothner@cygnus.com>
19995 * buffer.h, buffer.c: New files.
19996 * Makefile.in (JAVA_OBJS): Add buffer.o.
19998 Support locals variables and writing their debug entries to .class.
19999 * jcf-write.c: Simplify some by user new buffer type.
20000 (vode_buffer_grow): Removed.
20001 (struct localvar_info): New type.
20002 (localsvars, localvartable): New buffers.
20003 (localvar_alloc, localvar_free): New functions.
20004 (generate_bytecode_insns): Handle local variables.
20005 (generate_classfile): Write LocalVariableTable attribute.
20007 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
20009 * jcf-io.c (open_in_zip): Check the zipfile magic number.
20010 * zipfile.h (ZIPMAGIC): New macro.
20012 1998-07-24 Tom Tromey <tromey@cygnus.com>
20014 * Makefile.in (gjavah.o): Updated dependencies.
20015 (jcf-dump.o): Likewise.
20016 (all.indirect): Use ../gjavah.
20017 (../gjavah$(exeext)): Likewise.
20018 (clean): Don't remove gjavah.
20019 (clean): Remove parse.c, not java/parse.c.
20020 * Make-lang.in (java): Added gjavah.
20021 (gjavah$(exeext)): New target.
20022 (GJAVAH_SOURCES): New macro.
20023 (java.all.build): Added gjavah.
20024 (java.all.cross): Likewise.
20025 (java.rest.encap): Likewise.
20026 * config-lang.in (compilers, stagestuff): Added gjavah.
20028 1998-07-23 Tom Tromey <tromey@cygnus.com>
20030 * gjavah.c (java_float_finite): New function.
20031 (java_double_finite): Likewise.
20032 (F_POSITIVE_INFINITY): New macro.
20033 (F_NEGATIVE_INFINITY): Likewise.
20035 (D_POSITIVE_INFINITY): Likewise.
20036 (D_NEGATIVE_INFINITY): Likewise.
20038 (print_field_info): Use java_float_finite and java_double_finite.
20040 1998-07-23 Per Bothner <bothner@cygnus.com>
20042 * parse.y (method_header): Name "this" implicit argument.
20044 1998-07-22 Per Bothner <bothner@cygnus.com>
20046 * jcf-write.c: Write out LineNumberTable attribute in .class file.
20047 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
20048 (put_linenumber): New function.
20049 (generate_bytecode_insns, generate_classfile): Write line numbers.
20051 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
20053 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20054 (lookup_name, build_known_method_ref, build_class_init,
20055 build_invokevirtual, invoke_build_dtable, match_java_method,
20056 build_field_ref, pushdecl_force_head, build_java_binop,
20057 binary_numeric_promotion, build_decl_no_layout,
20058 build_java_arrayaccess, build_newarray, build_anewarray,
20059 build_java_array_length_access, build_java_arraynull_check): New
20060 extern function prototypes.
20061 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20062 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20064 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20066 * jcf.h (jcf_out_of_synch): New extern function prototype.
20067 * parse.h: Static/global function implemented in parse.y
20068 prototyped and declarations moved at the end of the file.
20069 (DECL_P): Check that the argument isn't null.
20070 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20071 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20072 (QUAL_DECL_TYPE): New macro.
20073 (PARAMS): Macro definition removed.
20074 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20075 (return_statement:): Call build_return.
20076 (field_access:): Call make_qualified_primary in sub rule.
20077 (method_invocation:): Build method invocation and call
20078 make_qualified_primary when processing primaries.
20079 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20080 get_type_from_signature.
20081 (java_check_regular_method): Extra integer 0 argument when calling
20082 lookup_java_method2.
20083 (lookup_java_interface_method2): Extra method DECL argument when
20084 calling lookup_java_interface_method2.
20085 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20086 COMPOUND_EXPR node.
20087 (java_complete_expand_method): Layout current class iff not
20088 already done. Don't process interface's methods.
20089 (java_complete_expand_method): Use super class only if it
20090 exists. Use current class otherwise.
20091 (make_qualified_primary): New function.
20092 (resolve_expression_name): Process qualified expression or
20093 expression from primary the same way.
20094 (resolve_expression_name): Two last arguments to
20095 resolve_field_access are now NULL_TREEs.
20096 (resolve_field_access): New variable is_static. Local field must
20097 be DECLs. is_static computed on field DECLs only. Append code in
20098 where_found to the field access if necessary. Use QUAL_DECL_TYPE
20099 to initialize field_type.
20100 (resolve_qualified_expression_name): New local variable,
20101 previous_call_static and is_static. Handle primaries with function
20102 calls, casts, array references and `this'. `super' now handled as
20103 `(super_class)this'. Use is_static to clarify boolean expressions.
20104 Added code to handle case where a proper handle is required to
20105 access a field. Use QUAL_DECL_TYPE where applicable.
20106 (maybe_access_field): New function.
20107 (patch_method_invocation_stmt): New arguments primary, where,
20108 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20109 deleted. Use `where' as a type to search from if specified. Check
20110 for static method reference where forbidden. Append primary or
20111 current_this to the argument list if not calling constructor nor
20113 (check_for_static_method_reference): New function.
20114 (patch_invoke): Layout the class on which new is done if
20116 (lookup_method_invoke): Changed format to report errors on
20118 (qualify_ambiguous_name): New local variable this_found. Now
20119 handle things from primaries. Method call are considered
20121 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20122 changed into NULLs.
20123 (not_initialized_as_it_should_p): Comply with the new DECL_P.
20124 (java_complete_tree): New case fo RETURN_EXPR. Process function
20125 call arguments in separate function.
20126 (complete_function_arguments): New function.
20127 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20129 (patch_assignment): Take the return function slot into account as
20130 a RHS. Distinguish assignment from a return.
20131 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20132 when checking methods in interfaces.
20133 (resolve_type_during_patch): NULL argument to unresolve_type_p
20134 instead of NULL_TREE.
20135 (patch_newarray): Fixed typo in comment.
20136 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20137 (build_return, patch_return): New functions.
20138 * typeck.c (lookup_java_constructor): Fixed typo in comment.
20140 1998-07-21 Per Bothner <bothner@cygnus.com>
20142 * constants.c (find_name_and_type_constant, find_fieldref_index,
20143 find_methodref_index): New methods.
20144 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
20145 just return given method. Also, rename to build_known_method_ref.
20146 (expand_invoke): Rename call to build_invoke_non_interface.
20147 * java-tree.h, parse.h: Update prototype.
20148 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
20149 (such as expand_expr_stmt) if flag_emit_class_files.
20150 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20151 STACK_TARGET, IGNORE_TARGET): New macros.
20152 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
20153 (generate_bytecode_insn): New function to generate method's bytecode.
20154 (generate_classfile): Node generate Code attribute for a method.
20155 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20156 push_long_const, field_op, adjust_typed_op, maybe_wide):
20157 New functions used by generate_bytecode_insn.
20159 * typeck.c (signature_include_return): Remove variable.
20160 (push_java_argument_signature, build_java_argument_signature): New.
20161 (build_java_signature): Use push_java_argument_signature.
20162 * parse.y: Use build_java_argument_signature instead of fiddling
20163 with signature_include_return.
20165 1998-07-17 Tom Tromey <tromey@cygnus.com>
20167 * gjavah.c (print_c_decl): Always generate JArray<>* for array
20170 * Makefile.in (all.indirect): Added gjavah$(exeext).
20171 (gjavah$(exeext)): Added $(exeext).
20174 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
20176 * class.c (layout_class): Call to java_layout_parsed_class replace
20177 by safe_layout_class.
20178 * expr.c (build_java_array_length_access): Removed static storage
20179 class in the function definition.
20180 (build_java_arraynull_check): Likewise.
20181 Also fixed typos in two comments.
20182 * lex.c (java_init_lex): Initialize static global kw_length.
20183 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20184 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20186 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20187 * parse.h (resolve_no_layout): New static function declaration.
20188 (get_identifier_in_static): Declaration removed.
20189 (java_layout_parsed_class): Function name declaration changed to
20191 (build_newarray_node, patch_newarray, resolve_type_during_patch,
20192 not_initialized_as_it_should_p, build_this): New static function
20194 (pushdecl_force_head, build_java_binop, int_fits_type_p,
20195 binary_numeric_promotion, stabilize_reference,
20196 build_decl_no_layout, build_java_arrayaccess): Extern function
20197 declarations moved into their own section.
20198 (build_newarray, build_anewarray, build_java_array_length_access,
20199 build_java_arraynull_check): New extern function declarations.
20200 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20201 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20203 (CALL_CONSTRUCTOR_P): New macro.
20204 * parse.y (kw_length): New static global tree node.
20205 (return_statement): Tagged <node>.
20206 (RETURN_TK): Tagged <operator>.
20207 (variable_declarator_id:): Build variable declaration with an
20208 empty initialization value if a syntax error was found in the
20209 initialization part of the variable declaration.
20210 (statement_without_trailing_substatement:): return_statement: now
20211 uses the default rule.
20212 (return_statement:): Temporarily fixed to return NULL_TREE.
20213 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20214 (class_instance_creation_expression:): Class creation rules now
20215 call build_method_invocation upon reduction.
20216 (array_creation_expression:): Rules call build_newarray_node upon
20218 (dim_exprs:): Build a list of dimension expressions.
20219 (dim_expr:): Store location of the OSB_TK in the dimension
20221 (method_invocation:): Added a new error rule.
20222 (build_unresolved_array_type): WFL argument may also be an array
20223 on a primitive type. Name of the argument changed to reflect this.
20224 (method_declarator): Insert argument type at the beginning of the
20225 argument type list and later reverse the list.
20226 (unresolved_type_p): Argument 'returned' may be optionally
20228 (java_layout_class_from_source): Function renamed
20230 (resolve_and_layout): Now call resolve_no_layout and
20232 (resolve_no_layout): New function.
20233 (purify_type_name): New function.
20234 (complete_class_report_errors): Call purify_type_name during error
20235 report on a type not found.
20236 (process_imports): error_found local variable doesn't need to be
20237 initialized to zero.
20238 (declare_local_variables): New local type_wfl. Fixed typo in error
20239 message. type_wfl assigned to unresolved type and used to register
20240 incomplete type. Build a WFL around the variable initialization
20241 statement so that debug info can be generated on it.
20242 (source_start_java_method): Reverse argument list after they've
20244 (current_this): New static global variable.
20245 (java_complete_expand_methods): Set current_this when appropriate.
20246 (resolve_expression_name): Build correct static and non static
20247 field access bearing a simple name.
20248 (resolve_field_access): Resolve the length field of arrays. Handle
20250 (patch_method_invocation_stmt): Set the type of the method
20251 invocation to error_mark_node. This value is later overridden by a
20252 valid type, if any. Don't handle qualified constructor invocation
20253 as qualified method invocation. Call lookup_method_invoke with its
20254 new flag. It's no longer necessary to access the selected method
20255 as the value of a tree list. Handle constructor invocation.
20256 (patch_invoke): Reverse argument list when invoking non interface
20257 methods. Insert call to new as the first argument of the
20259 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20260 defined within a final class. Return INVOKE_STATIC if the invoked
20261 method is a constructor.
20262 (lookup_method_invoke): New lc argument is a flag to indicate a
20263 constructor lookup. Now handle constructor lookup. Choose the most
20264 specific method in case several were matching the invocation
20265 requirements. Return a method decl instead of a tree list featuring
20266 one single method decl element.
20267 (refine_accessible_methods_list): New lc flag argument to
20268 indicate that a constructor is being looked up.
20269 (not_initialized_as_it_should_p): New function.
20270 (java_complete_tree): Now process fake tree codes
20271 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20272 save_expr on resolved function call arguments. Case on
20273 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20274 (patch_assignment): LHS can be a field access expression. When
20275 dealing with reference, lhs_type is the promoted type of the
20276 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20278 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20279 (patch_binop): Use not_initialized_as_it_should_p where
20281 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20282 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20284 (resolve_type_during_patch): New function.
20285 (patch_cast): Call resolve_type_during_patch to resolve type and
20286 report error accordingly.
20287 (patch_array_ref): Use not_initialized_as_it_should_p where
20288 applicable. Array base expression is saved before being
20289 used. Promote the type of an array elements if it contains non
20291 (build_newarray_node, patch_newarray, build_this): New functions.
20293 1998-07-16 Tom Tromey <tromey@cygnus.com>
20295 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20296 increment it in `for' statement.
20297 (print_field_info): If number is inf or nan, don't print it.
20298 (print_method_info): If method name is `delete', just ignore it.
20299 (print_c_decl): Special-case jstringArray.
20301 * gjavah.c (help): New function.
20302 (no_argument): New function.
20303 (usage): Changed text.
20304 (main): Rewrote argument handling. Now handles -v, --help,
20306 (version): New function.
20307 (found_error): New global.
20308 (main): Return found_error.
20309 (generate_access): Set found_error.
20310 (print_c_decl): Likewise.
20312 1998-07-15 Tom Tromey <tromey@cygnus.com>
20314 * gjavah.c (print_c_decl): Don't print "," when examining field.
20315 Skip type name when looking at "[L" types.
20316 (process_file): Now static.
20317 (generate_access): Now returns int.
20318 (last_access_generated): New global.
20319 (process_file): Clear last_access_generated; make multiple passes
20321 (print_field_info): Just return if generate_access returns true.
20322 (print_method_info): Likewise. Also, allow <init> functions to
20324 (print_c_decl): Added is_init argument. Print constructors
20326 (print_cxx_classname): Use UTF8_GET to extract characters from
20328 (print_base_classname): New function.
20329 (print_class_decls): New function.
20330 (process_file): Use it.
20331 (utf8_cmp): New function.
20333 1998-07-13 Nick Clifton <nickc@cygnus.com>
20335 * lang-options.h: Format changed to match changes in gcc/toplev.c
20336 to implement a --help option.
20338 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
20340 * decl.c (init_decl_processing): Revert change to dtable_type.
20342 1998-07-09 Per Bothner <bothner@cygnus.com>
20344 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20346 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
20348 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20350 * lang.c (lang_init): Default flag_exceptions to 1, without
20351 checking to see if it's 2 first.
20353 1998-07-08 Jeffrey A Law (law@cygnus.com)
20355 * constants.c: Include "system.h".
20356 * decl.c: Likewise.
20357 * lang.c (flag_new_exceptions): Get via extern now.
20358 (lang_init_options): New functions. Turn on flag_new_exceptions.
20360 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
20362 * lex.c (java_lex): Return 0 when we see an invalid character in
20365 * lex.c (java_read_char): Specify extra argument when calling
20367 (java_read_unicode, java_parse_end_comment,
20368 java_parse_escape_sequence): Likewise,
20369 (java_lex): Specify extra argument when calling
20370 java_lex_error. Test that IDs are beginning with a legal character
20371 for IDs. Handle invalid characters with an error message and a
20372 call to java_lex_error.
20373 (java_lex_error): Adjust column position by new argument
20374 `forward'. Issue an error even if in the middle of reporting an
20377 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
20379 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20380 we don't explicitly put a null pointer when we're copying it.
20382 1998-07-07 Tom Tromey <tromey@cygnus.com>
20384 * gjavah.c (print_cxx_classname): New function.
20385 (super_class_name): Likewise.
20386 (print_super_fields): Removed.
20387 (in_super): Removed.
20388 (print_field_info): Never generate #defines.
20389 (print_c_decl): Changed generated types to match JNI. No longer
20390 print class name before method name.
20391 (print_method_info): Print "static" before static methods.
20392 Print "virtual" before non-final methods.
20393 (usage): Use exit(1), not exit(-1).
20395 (print_field_info): Use %.17g to print a double.
20396 (last_access): New globals.
20397 (process_file): Initialize last_access.
20398 (usage): Now static.
20399 (ACC_VISIBILITY): New define.
20400 (generate_access): New function.
20401 (print_field_info): Call it.
20402 (print_method_info): Likewise. Also, generate information for all
20403 methods, not just native methods. Return void.
20404 (print_c_decl): Return void.
20405 (print_field_info): Return void.
20407 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20409 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20410 processing the jc1 grammar file. Prefix bison functions and
20411 variables with java_.
20412 (parse.c): Dependencies on parse.h and lex.h
20413 * expr.c (build_java_arrayaccess): Function now global.
20414 * java-tree.h: Comment reorganized to carry on previous
20415 classification effort.
20416 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20417 RESOLVE_TYPE_NAME_P): New flags on WFLs.
20418 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20419 java_parse (new prefix java_ generated by bison).
20420 (java_layout_parsed_class, java_register_parsed_class): Function
20422 (yyparse): Removed unnecessary call to init_outgoing_cpool.
20423 * lex.c (static tree wfl_op): Variable deleted.
20424 (java_init_lex): Initialize kw_super and kw_this. Initialize more
20425 ctxp fields to NULL_TREE.
20426 (java_lex): No longer create WFL for operators. Filename caching
20427 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20428 created as STRING_CST and later expanded. Removed extra argument
20429 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20431 (build_wfl_node): Removed code in comments.
20432 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
20433 store token and location data in the current bison token.
20434 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
20435 static/extern function declaration at the beginning of the file.
20436 (struct qualification): Data structure definition deleted.
20437 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20438 (qualify_ambiguous_name): Function declaration modified. Function
20439 now returns nothing.
20440 (build_array_ref, patch_array_ref, make_qualified_name,
20441 resolve_qualified_expression_name, maybe_generate_clinit,
20442 resolve_field_access): New static function declarations.
20443 (build_java_arrayaccess): New extern function declaration.
20444 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20445 (CALL_EXPR_PRIMARY): Macro deleted.
20446 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20447 (struct parser_ctxt): Field initialized_final
20448 removed. non_static_initialized, static_initialized: New fields.
20449 * parse.y (static tree kw_super, static tree kw_this): New global
20451 (%union): tree wfl field of operator member replaced by int
20452 location. WFLs are non longer created for operators.
20453 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20454 (qualified_name:): Now calls make_qualified_name to build the
20456 (type_declaration:): Consider generating <clinit> when class
20458 (variable_declarator:): Directly build an assignment node when the
20459 variable is initialized when declared.
20460 (this_or_super:): Build a WFL and set current location when THIS
20461 or SUPER are parsed.
20462 (expression_statement:): Wrap statement around a WFL.
20463 (primary_no_new_array:): Fixed typo. Changed value returned by
20464 THIS_TK because of its new type (temporary).
20465 (dim_exprs:): Temporary fix because of OSB_TK's new type.
20466 (field_access:): Build qualified name with SUPER.
20467 (method_invocation:): Fixed returned value because of SUPER's new
20469 (array_access:): Use OSB_TK location information.
20470 (post_increment_expression:, post_decrement_expression:,
20471 unary_expression:, pre_increment_expression:,
20472 pre_decrement_expression:, unary_expression_not_plus_minus:,
20473 cast_expression:, multiplicative_expression:,
20474 additive_expression:, shift_expression:, relational_expression:,
20475 equality_expression:, and_expression:, exclusive_or_expression:,
20476 inclusive_or_expression:, conditional_and_expression:,
20477 conditional_or_expression:, assignment:): Use new location/token
20478 information available on operators.
20479 (create_class): Set super_decl_type to NULL_TREE when processing
20481 (register_fields): Field initialization is now a MODIFY_EXPR
20482 node. Chain initialization code to the matching lists (according
20483 to the field declaration modifiers).
20484 (maybe_generate_clinit): New function.
20485 (method_header): Don't set method's DECL_NAME to a WFL when adding
20486 methods to java.lang.Object.
20487 (resolve_and_layout): Now can return NULL_TREE if the type
20488 resolution fails. Otherwise, return the class DECL instead of its
20490 (check_method_redefinition): Don't patch method DECL_NAME if it
20491 belongs to java.lang.Object.
20492 (process_imports): Simply assign error_found to the value returned
20493 by check_pkg_class_access.
20494 (declare_local_variables): Don't use their init statements (if
20495 any) when parsing error were previously found. Reuse MODIFY_EXPR
20496 build during parsing as an init statement.
20497 (java_method_add_stmt): Now return the current method body.
20498 (java_layout_parsed_class, java_register_parsed_class): Functions
20500 (java_complete_expand_methods): Initialize the constant pool on a
20501 per class basis. Layout the classes before expanding their method
20502 bodies. Don't try expand artificial constructor code if error were
20503 found. Make the classes data and register them if no error were
20505 (java_complete_expand_method): Retrieve an artificial constructor
20506 argument list before entering its body. Assign the top block to
20507 the artificial constructor function body and set types of declared
20508 blocks and compound statements to void. Walk method body if not an
20509 artificial constructor.
20510 (make_qualified_name, cut_identifier_in_qualified): New functions.
20511 (resolve_expression_name): Fixed comments. Save/restore the
20512 current class CLASS_LOADED_P flag value. Build non qualified
20513 static field access and handle qualified expression names.
20514 (resolve_field_access, resolve_qualified_expression_name): New
20516 (patch_method_invocation_stmt): Use the new expression resolution
20517 scheme, calling resolve_field_access when the function call is
20518 resolved as an expression.
20519 (qualify_ambiguous_name): Function rewritten to work on qualified
20520 expression produced by make_qualified_name.
20521 (java_complete_tree): Promote type when function's argument are
20522 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20523 the assignment to discover further errors if RHS is a expression
20524 name that fails to evaluate. Declare LHS initialized even though
20525 the assignment failed. Don't use the location variable and removed
20526 extra argument in patch function calls. Now handle the ARRAY_REF
20527 case and build internal string representation when STRING_CSTs are
20529 (build_method_invocation): Don't wrap function call around a WFL.
20530 (build_assignment): Likewise. Use the operator location
20532 (patch_assignment): Handle array access LHSs. Handle error
20533 provenance, resulting in a better error report.
20534 (build_binop): Use op_location from operator as binop location
20536 (build_unaryop, build_incdec, build_cast): Likewise.
20537 (patch_binop): Extract location information from the node. Fixed
20538 typo in error message.
20539 (patch_unary_op): Extract location information from the node.
20540 (build_array_ref, patch_array_ref): New functions.
20542 1998-07-01 Tom Tromey <tromey@cygnus.com>
20544 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20545 match _Jv_IsInstanceOf.
20546 * decl.c (init_decl_processing): Use _Jv_NewArray, not
20547 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
20549 1998-06-30 Tom Tromey <tromey@cygnus.com>
20551 * decl.c (init_decl_processing): Functions are now named
20552 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20554 1998-06-29 Per Bothner <bothner@cygnus.com>
20556 * java-tree.h (load_class): Add prototype.
20557 * class.c (is_compiled_class): Add missing arg to load_class.
20558 * expr.c (expand_java_NEW): Call load_class.
20559 * parse.y (process_import): Removed bogus use of void return value.
20561 1998-06-25 Per Bothner <bothner@cygnus.com>
20563 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
20564 Function name is "_Jv_Throw" instead of "soft_athrow".
20565 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
20566 Function name is "_Jv_AllocObject" instead of "soft_new".
20567 Takes an extra parameter (object size).
20568 * expr.c: Update calls.
20570 1998-06-24 Per Bothner <bothner@cygnus.com>
20572 * lex.c (java_get_line_col): Handle end-of-file.
20573 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
20575 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
20577 * lang.c (lang_init): Make -fexceptions the default.
20578 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
20579 exception handling is not turned on.
20581 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
20583 * lang.c (flag_new_exceptions): Make this this default.
20584 * decl.c (end_java_method): Call emit_handlers.
20585 * except.c (method_init_exceptions): Set language code and version.
20586 (expand_start_java_handler): Enable exception, and call
20587 expand_eh_region_start.
20588 (expand_end_java_handler): Enable exception, and set up catch blocks.
20589 (emit_handlers): New routine to generate the saved handlers.
20590 * java-except.h (emit_handlers): Add prototype.
20592 1998-06-12 Per Bothner <bothner@cygnus.com>
20594 We used to have three different representations of the constant pool:
20595 the CPool structure, the tree_constant_pool, and the constructures
20596 used to build the Class object (which may need class and string
20597 constants) in compiled code. None were appropriate for compiling
20598 to .class files, so I did a major overhaul.
20600 First, the tree_constant_pool array was removed. Things were
20601 modified to the CPool structure in the JCF could be used.
20602 Second, a "capacity" field was added to the CPool, and functions
20603 written to search for a matching constant, adding one if not found.
20604 The code that generated the Class object was changed to use a CPool.
20605 The actual TREE_LISTs used to build the CONSTRUCTORs used for
20606 the static Class object are now only in build_constants_constructor.
20607 Finally, I wrote code which can generate a .class file (including its
20608 constant pool) from the RECORD_TYPE of a class. This is a big step
20609 on the way to compiling Java source into .class files.
20611 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
20612 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
20614 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
20615 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
20616 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
20617 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
20618 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
20619 (lang_type): Removed constant_pool field.
20620 * jcf.h (CPool): Renamed size to count. Added field capacity.
20621 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
20622 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
20623 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
20625 * constants.c (current_constant_pool_tags, current_constant_pool_data,
20626 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
20627 * constants.c (build_constants_constructor): Use new outgoing_cpool.
20628 (set_constant_entry, find_constant1, find_constant2,
20629 find_class_constant, count_constant_pool_bytes, write_constant_pool,
20630 find_utf8_constant, find_class_or_string_constant): New functions.
20632 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
20633 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
20634 (give_name_to_class, get_class_constant): Likewise.
20635 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
20636 (get_name_and_type_constant, get_ref_constant): Removed.
20637 * parse.h (parser_ctxt): Remove field tree_constant_pool.
20638 * parse.y: Don't save/restore tree_constant_pool.
20639 * verify.c (verify_jvm_instructions): Update for new approach.
20640 * expr.c (expand_invoke, expand_java_field_op): Likewise.
20642 * lang-options.h: Added -femit-class-file, -femit-class-files.
20643 * lang.c (flag_emit_class_files), java-tree.h: New flag.
20644 (lang_f_options): Added "emit-class-file(s)".
20646 * expr.c (build_java_arrayaccess): Generate more efficient array
20647 bounds checking, by using unsigned compare.
20649 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
20651 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
20653 * parse.h: New comment on the handling of unresolved type
20654 identifiers. JDEPs are now part of the jdep_code enum.
20655 (typedef struct jdep): Now use enum jdep_code or int, depending on
20656 availability. Both are narrowed down to an 8 bits bitfield.
20657 (CALL_EXPR_PRIMARY): Fixed comment.
20659 1998-06-10 Tom Tromey <tromey@cygnus.com>
20661 * Make-lang.in (java): Added gjavac and jvgenmain.
20662 (java.start.encap): Depend on gjavac.
20663 (java.rest.encap): Depend on jvgenmain.
20665 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
20666 (JAVA_CROSS_NAME): Likewise.
20667 (java.all.build): Depend on jvgenmain and gjavac.
20668 (java.all.cross): Depend on jvgenmain and gjavac-cross.
20669 (jvgenmain$(exeext)): New target.
20670 (java.install-common): Wrote.
20671 * config-lang.in (compilers, stagestuff): Added gjavac and
20674 1998-06-10 Dave Brolley <brolley@cygnus.com>
20676 * lang.c (lang_decode_option): New argc/argv interface.
20678 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
20680 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
20681 * decl.c (build_decl_no_layout): New function.
20682 * expr.c (java_lang_expand_expr): Layout declarations found in
20683 blocks before they're pushed.
20684 * jcf-parse.c (load_class): Save current line when parsing class
20686 (parse_source_file): Register class before expanding their
20688 * lang.c (put_decl_node): Produce `null' when `void *' is
20690 * lex.c (static tree wfl_op): New static global, for error report
20692 (java_init_lex): wfl_operator and wfl_op initialized
20693 here. Filename caching added for wfl_op. Return wfl_op when `(' is
20695 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
20696 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
20697 build_unresolved_array_type): New static function definitions.
20698 (build_decl_no_layout): New extern function declared.
20699 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
20700 faulty modifier exists.
20701 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
20702 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
20703 (UNARY_PLUS_EXPR): New fake operator.
20704 (struct parser_ctxt): New field osb_number.
20705 * parse.y (static tree wfl_operator): New static WFL for operator
20706 bound error messages.
20707 (DECR_TK, INCR_TK): Moved.
20708 (OP_TK): Tagged <operator>.
20709 (array_type:): Now call build_unresolved_array_type.
20710 (dim_expr:): Count the number of '[' seen.
20711 (post_increment_expression, post_decrement_expression,
20712 pre_increment_expression, pre_decrement_expression,
20713 unary_expression_not_plus_minus, unary_expression:): Actions are
20714 now building the corresponding unary expressions.
20715 (cast_expression:): Actions are now building cast expressions.
20716 (build_unresolved_array_type): New function.
20717 (create_interface): Reset the number of declared interfaces.
20718 (create_class): Likewise.
20719 (method_header): Methods declared within the scope of an interface
20720 are now implicitly set public and abstract.
20721 (java_complete_class): Variable's and parameter's type are patched
20722 with a promoted type.
20723 (declare_local_variables): Resolved non builtin types are promoted
20724 before being used to build a variable decl. Removed type patch
20725 posted on variable initialization statement.
20726 (source_start_java_method): Use build_decl_no_layout to build the
20727 decl of a parameter of incomplete type.
20728 (java_register_parsed_class): Process interfaces too. Call
20729 rest_of_decl_compilation on each processed class declarations.
20730 (java_complete_expand_methods): Don't attempt to expand things in
20732 (java_complete_tree): Process CONVERT_EXPR, even though it always
20733 has a type. Propagate error_mark_node to node's type too. Promote
20734 method's call argument type and return error_mark_node if
20735 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
20736 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
20737 handle unary operator nodes.
20738 (build_assignment): Added comment.
20739 (print_int_node): New function.
20740 (patch_assignment): New second argument. New error handling. Use
20741 print_int_node. Handle references. Use can_cast_to_p to issue
20742 different error message according to the context and check upon
20743 the initialization of the RHS.
20744 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
20745 (operator_string): Handle more operators.
20746 (patch_binop): No longer use a function static
20747 wfl_operator. Improved error message on shift distance.
20748 (build_unaryop, build_incdec, build_cast, patch_unaryop,
20749 patch_cast): New functions.
20751 1998-06-05 Per Bothner <bothner@cygnus.com>
20753 * jvspec.c: New file.
20754 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
20756 * java-tree.h (identifier_subst): Add declaration.
20758 1998-06-04 Tom Tromey <tromey@cygnus.com>
20760 * jvgenmain.c (main): Generate call to JvRunMain.
20762 * class.c (make_class_data): Push value for "sync_info" field.
20763 * decl.c (init_decl_processing): Push "sync_info" field.
20765 1998-06-03 Per Bothner <bothner@cygnus.com>
20767 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
20768 Java (source) name, not signature.
20769 Set TYPE_ALIGN to (at least) that of element_type.
20771 1998-06-02 Per Bothner <bothner@cygnus.com>
20773 * class.c: Moved classname-mangling-rekated code to ...
20774 * mangle.c: ... this new file.
20775 * jvgenmain.c: New program (needs mangle.c) to generate main program.
20776 * Makefile.in: Update for above changes.
20778 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
20780 * expr.c (truthvalue_conversion): Convert integer and floating
20781 point value to their truth value.
20782 * lex.c (java_lex): Handle the `null' literal.
20783 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
20784 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
20785 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
20788 * parse.y: Reorganization/documentation on token declaration.
20789 (binop_lookup[]): New added new tree codes.
20790 (relational_expression): Build corresponding binary operators.
20791 (equality_expression, conditional_and_expression,
20792 conditional_or_expression): Likewise.
20793 (java_complete_class): Fix crash in debug message.
20794 (java_complete_tree): Check initialization of method call
20795 arguments. Further bogus node evaluation to detect more error
20796 during assignments. Handles more binary operators.
20797 (patch_assignment): Use DECL_P.
20798 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
20800 (operator_string): Handle more case. Compacted source.
20801 (patch_binop): Changed function comment. Checking for
20802 uninitialized first operand takes the compound assignment into
20803 account and uses DECL_P. Checking for uninitialized second operand
20804 delayed to routine's end. Use macros to issue type bound error
20805 messages and issue messages on both operands if their types are
20806 different. Force fixed type into node. Handle all binary
20809 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20811 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
20812 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
20813 build operator node and return tokens.
20814 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
20815 * parse.h (java_complete_tree): Changed returned type in prototype.
20816 (build_method_invocation, build_assignment, patch_assignment,
20817 patch_binop): New static function declarations.
20818 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
20819 BUILD_EXPR_WFL): New macros.
20820 * parse.y (enum tree_code binop_lookup[]): New static for token to
20822 (%union): Parser union has new sub-structure `operator'.
20823 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
20824 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
20825 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
20826 ASSIGN_ANY_TK): Tokens tagged `operator'.
20827 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
20828 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
20829 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
20830 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
20831 (assignment_operator:): Rule tagged `operator'.
20832 (expression_statement:): Re-installed default rule.
20833 (method_invocation:): Sub rules call build_method_invocation.
20834 (postfix_expression:): Don't attempt to resolve name here. Just
20836 (multiplicative_expression:): Sub-rules build corresponding binop
20838 (additive_expression:, shift_expression:, and_expression:,
20839 exclusive_or_expression:, inclusive_or_expression:): Likewise.
20840 (assignment:): Sub rule invoke build_assignment.
20841 (assignment_operator:): Default rules on sub rules.
20842 (force_error): Added documentation on this variable.
20843 (declare_local_variables): Build initialization calling
20845 (expand_start_java_method): Removed unused rtx declaration. Mark
20846 arguments as already initialized.
20847 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
20848 (java_complete_expand_methods): Don't process next method if
20849 completion of the previous one triggered errors.
20850 (java_complete_expand_method): Call source_end_java_method if no
20851 error were found during completion.
20852 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
20853 locals declaratilon. Handle names found within a class. Return
20854 error_mark_node when things aren't found.
20855 (patch_method_invocation_stmt): Return error_mark_node on failures.
20856 (patch_invoke): Removed unused local. Return the correct node.
20857 (java_complete_tree): Now returns a value. The BLOCK section binds
20858 local identifiers and the type of a BLOCK is now void. Assign the
20859 result of operand completion on COMPOUND_EXPR. Assign the
20860 encapsulated node of a WFL to the result of its completion, except
20861 when the node is an identifier. Now handle MODIFY_EXPR and several
20862 binary operators. Return error_mark_node on errors.
20863 (build_method_invocation, build_assignment, patch_assignment,
20864 build_binop, operator_string, patch_binop): New functions.
20865 * typeck.c (binary_numeric_promotion): New function.
20867 1998-05-21 Per Bothner <bothner@cygnus.com>
20869 * class.c (identifier_subst): New convenience wrapper for ident_subst.
20870 Replace most uses of ident_subst by identifier_subst.
20872 * class.c (push_class_static_dummy_field): Removed function.
20873 (build_class_ref): Find Class object decl by looking up "CNAME.class",
20874 instead of looking got "class" static field. Create that decl here.
20875 (class_identifier_node): Removed; no longer needed.
20876 (init_class_processing): Don't init class_identifier_node.
20877 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
20878 Do nreverse 0 times (instead of twice) for Object and Class.
20879 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
20881 1998-05-20 Per Bothner <bothner@cygnus.com>
20883 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
20884 while initializing linenumber_count and linenumber_table.
20885 Do it before init_function_start (which calls emit_line_note).
20886 * expr.c (expand_byte_code): Don't need to clear lineno here.
20888 1998-05-18 Tom Tromey <tromey@cygnus.com>
20890 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
20891 then mangle number as _N_.
20893 * class.c (mangle_class_field): New function.
20894 (build_class_ref): Set assembler name of class reference using
20895 mangle_class_field.
20896 (push_class_static_dummy_field): Likewise.
20898 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
20900 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
20901 of assigning to TREE_CODE. The latter method exploits a feature
20902 of GCC that is not ANSI compliant.
20904 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
20906 * decl.c (pushdecl_force_head): New function.
20907 (pushlevel): Removed conditional printf.
20908 (complete_start_java_method): Don't enter local variable scope if
20909 function is compiled from source code.
20910 * expr.c: parse.h now included
20911 (java_lang_expand_expr): New function.
20912 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
20913 printf. Terminate buffer when doing directories.
20914 * jcf-parse.c (parse_source_file): Call lang_init_source before
20915 parsing and before code generation.
20916 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
20917 use printf if the macro is defined.
20918 * lang.c (lang_init): Install lang_expand_expr hook on
20919 java_lang_expand_expr.
20920 (java_dummy_print): New function.
20921 (lang_init_source): New function.
20922 * lex.c (java_lex): Remember location of an opening brace at the
20923 second nesting level.
20924 (java_is_eol): Unget character seen after a CR if it is EOF.
20925 * parse.h: Now includes lex.h
20926 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
20927 printf if the macro is defined.
20928 (expand_start_java_method, build_expr_block, enter_block,
20929 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
20930 New static function declarations.
20931 (pushdecl_force_head): New extern function declaration.
20932 (INCOMPLETE_TYPE_P): New macro.
20933 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
20934 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
20935 BLOCK_EXPR_ORIGIN): New macros.
20936 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
20937 DECL_SOURCE_LINE_LAST): New macros.
20938 (struct parser_ctxt): Removed field current_method_decl, redundant
20939 with the field current_function_decl. Added fields
20940 first_ccb_indent1 and pending_block.
20941 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
20942 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
20944 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
20945 (compilation_unit:): Cosmetic on sub rule.
20946 (type_declaration:): Cosmetic on sub rules. Added an error rule.
20947 (variable_initializer:): Installed default rule on expression:.
20948 (method_declaration:): method_header: starts a new
20949 method. method_body: installs the function body, absorbs blocks
20950 emitted for temporary variable scopings, pops function's body block
20951 and merges function's last statement lineno in DECL_SOURCE_LINE.
20952 (method_body:): Installed default rules.
20953 (block:): Call enter_block when an opening brace is seen. Absorb
20954 scoping blocks and call exit_block when a closing brace is seen.
20955 (block_statement:): Cosmetic changes.
20956 (method_invocation:): Create WFL around CALL_EXPR node.
20957 (patch_stage): Added comment around definition.
20958 (method_header): Try to use first_ccb_indent1 as the first line of
20959 the method, so BP debug info are emitted at the first opening
20960 brace of the function. If the function has no body, use the
20961 location of the function's name. Override currently defined method
20962 name with the matching WFL so we can point redefinition errors
20963 using the location where the function's name was declared.
20964 (check_abstract_method_header): Interprets DECL_NAME as an
20965 identifier or as a WFL, accordingly.
20966 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
20967 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
20968 location and name information out of it and reinstall DECL_NAME to
20969 its original identifier node value.
20970 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
20971 function's source code).
20972 (read_import_dir): Test the value returned by find_class and issue
20973 a fatal accordingly.
20974 (declare_local_variables): Push a new block for the scope of the
20975 new variable(s) if code has been already generated at that nesting
20976 level. Pinpoint redefinition errors using the variable id
20977 WFLs. Generate initialization code if necessary. If the variable
20978 type is incomplete, register a patch on its decl.
20979 (source_start_java_method): Rewritten. Define a new block for the
20980 function's parameters. Build parameter decl out of function's
20981 arguments and register them for a patch if their types are
20983 (expand_start_java_method): Includes the part of
20984 source_start_java_method that was pushing the parameter decls and
20985 completing the method start code.
20986 (source_end_java_method): Removed call the expand_end_bindings and
20987 poplevel (already taken care of). Reinstall function's arguments
20988 and get function's last line of code before calling
20989 expand_function_end.
20990 (java_method_add_stmt): New comment before the function's
20991 code. Complement the second operand of the current COMPOUND_EXPR
20993 (java_complete_expand_methods): Don't generate debug info on line
20994 zero when expanding a generated constructor.
20995 (java_complete_expand_method): Set start and end line numbers for
20996 a artificially generated constructor to one and manually call
20997 enter_block and exit_block when defining it. For all methods:
20998 expand function's start calling the new expand_start_java_method
20999 and invoke java_complete_tree on the effective method's body, if
21001 (resolve_expression_name): Now use lookup_name_in_blocks to search
21002 local variable decls and print out an error when variables are
21004 (patch_method_invocation_stmt): Inserted comment before the
21006 (lookup_method_invoke): Chain method's arguments using chainon
21007 with the current arg list as a second argument. Inserted missing
21008 IDENTIFIER_POINTER when reporting an error on methods not found.
21009 (refine_accessible_methods_list): Don't retain constructors.
21010 (patch_arguments): Function removed.
21011 (java_complete_tree): Inserted comment before the function's
21012 code. New case for BLOCKs. Moved the WFL case a bit
21013 further. Complete function's arguments.
21014 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21015 maybe_absorb_scoping_blocks): New functions.
21017 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21019 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21021 * jcf-parse.c (parse_source_file, java_error_count): New forward
21022 and extern declarations.
21023 (java_parse_abort_on_error): Macro moved.
21024 (jcf_parse_source): fatal called if fopen fails. Now calls
21026 (parse_source_file): New parse_only parameter. Reflects the
21027 elimination of the second pass.
21028 (yyparse): parse_source_file called with argument set to 0.
21029 * jcf.h (JCF_ZERO): Sets java_source to zero.
21030 * lex.c (java_init_lex): pass argument is gone. Function modified
21031 to be called once during the analysis of a file.
21032 (java_unget_unicode): Fixed typo in fatal message.
21033 (java_get_line_col): Likewise.
21034 (java_lval): Likewise. String literals no longer built during
21036 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21038 * parse.h (MODIFIER_WFL): New macro.
21039 (parse_check_super, parser_check_super_interface): Now return int.
21040 (parser_chain_incomplete_item, not_builtin_p,
21041 complete_method_decl): Declarations removed.
21042 (build_method_invocation_stmt, build_invoke): Renamed using the
21043 `patch' instead of `build'
21044 (register-incomplete_type, obtain_incomplete_type,
21045 java_complete_tree, java_complete_expand_method,
21046 unresolved_type_p, create_jdep_list): New function declarations.
21047 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21048 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21049 (jdep): New typedef on new struct _jdep.
21050 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21051 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21052 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21053 JDEP_RESOLVED_P): New macros.
21054 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21055 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21056 JDEP_VARIABLE): New enum values and jdep kinds.
21057 (jdeplist): New typedef on struct _jdeplist.
21058 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21060 (CALL_EXPR_PRIMARY): New macro.
21061 (struct parser_ctxt): Fields java_pass, current_method_decl,
21062 method_decl_list deleted. New field jdeplist.
21063 (INCOMPLETE_P): Macro deleted.
21064 * parse.y (single_type_import_declaration:): Removed pass switch.
21065 (type_import_on_demand_declaration): Likewise.
21066 (field_declaration:): Removed pass switch on all sub rules.
21067 (class_declaration:): Call the complete_class_decl removed on
21069 (method_declaration:): Removed second pass switch. No longer chain
21070 methods decl when method_header reduced.
21071 (method_header:): Sub rules no longer depend on pass switch.
21072 (method_declarator:): Likewise.
21073 (method_body:): Likewise.
21074 (abstract_method_declaration:): Likewise.
21075 (block_statement:): Likewise.
21076 (local_variable_declaration:): Likewise.
21077 (argument_list:): Likewise.
21078 (method_invocation:): Likewise. Call to build_method_invocation_stmt
21079 removed. Partial CLASS_EXPR tree node built instead.
21080 (postfix_expression:): Removed pass switch on all sub rules.
21081 (java_pop_parser_context): Free classd_list content.
21082 (yyerror): Call obstrack_grow0 to finalize error message.
21083 (check_class_interface_creation): Comment modified to reflect new
21084 returned value meaning. Removed second pass switch. Return 1 if an
21085 error was found, 0 otherwise. Adjust pointer on filename if a
21086 leading path separator was found.
21087 (maybe_create_class_interface_decl): Removed first pass switch
21088 when linking the class decl to the class_list. Install a new
21089 jdep_list for the class.
21090 (add_superinterfaces): List of unresolved interfaces is
21091 gone. Unresolved interfaces are directly added to the current
21093 (create_interface): Second pass shortcut removed.
21094 ctpx->modifier_ctx access through MODIFIER_WFL.
21095 (create_class): Second pass shortcut removed. Call to
21096 register_incomplete_type replaces the call to
21097 parser_chain_incomplete_item.
21098 (complete_class_decl): Function removed.
21099 (duplicate_declaration_error): New way of retrieving redeclared
21101 (register_fields): Call to lookup_modifier_cl replaced by
21102 MODIFIER_WFL. New way of handling unresolved type, using
21103 unresolved_type_p and obtain_incomplete_type.
21104 register_incomplete_type replaces call to parser_chain_incomplete_item.
21105 (patch_stage): New static global variable.
21106 (method_header): New way of handling unresolved type, using
21107 unresolved_type_p and obtain_incomplete_type. patch_stage used to
21108 indicates that the method decl needs to be patched.
21109 (check_abstract_method_header): Call to lookup_modifier_cl
21110 replaced by MODIFIER_WFL.
21111 (method_declarator): Incomplete argument type are registered
21112 calling register_incomplete_type. Patch on the declared method is
21113 issued in that case.
21114 (unresolved_type_p): New function.
21115 (parser_check_super_interface): New comment to reflect function's
21116 modified returned type (int). Function and has a new argument
21117 this_wfl. Call to parse_error_context uses this_wfl instead of
21118 relying on lookup_cl.
21119 (parser_check_super): Comment reflects function's new returned
21120 type (int). Function returns nonzero value on error.
21121 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21122 register_incomplete_type, jdep_resolve_class): New functions to
21123 handle incomplete types in declarations.
21124 (java_complete_class): Rewritten to work with the new incomplete
21125 type handling scheme.
21126 (complete_class_report_errors): Likewise.
21127 (complete_method_decl): Removed: it jobs is now handled by
21128 java_complete_class.
21129 (do_resolve_class): Class loaded in not already loaded and not
21130 found in Java source code.
21131 (java_check_regular_methods, java_check_abstract_methods): Don't
21132 call complete_method_decl anymore.
21133 (lookup_modifier_cl, not_builtin_p): Functions deleted.
21134 (read_import_dir): Got rid of the pass number dependency.
21135 (declare_local_variables): New handling of unresolved types (patch
21137 (source_start_java_method): New parameter level. Function called
21138 with level set to 1 when argument types are potentially
21139 unresolved. Called to complete the job with level set to 2 once
21140 types are complete.
21141 (source_end_java_method): Call to permanent_allocation
21142 removed. Waiting to be replaced by a more suitable obstack
21144 (java_complete_expand_methods, java_complete_expand_method,
21145 java_expand_finals): New functions.
21146 (build_method_invocation_stmt): Renamed
21147 patch_method_invocation_stmt. Extracts function call expression
21148 (wfl) and arguments (args) from CALL_EXPR tree operands.
21149 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21150 call. Patch the function and argument operand of the CALL_EXPR
21152 (patch_argument, java_complete_tree): New functions.
21154 1998-04-20 Per Bothner <bothner@cygnus.com>
21156 Recover from missing fields and methods (i.e. error instead of fatal).
21157 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
21158 * expr.c (expand_invoke): Recover from missing method.
21159 (expand_java_field_op): Recover from missing field.
21160 Inline references to java.lang.{Integer,Char,...}.TYPE.
21161 * typeck.c (get_type_from_signature), java-tree.h: New function.
21162 * class.c (add_method): Use get_type_from_signature.
21163 (build_class_ref): Handle a class that was not found.
21164 * typeck.c (convert): Handle conversion to pointers (for convenience).
21165 * verify.c (verify_jvm_instructions): Use get_type_from_signature
21166 instead of lookup_field to handle missing fields.
21168 * jcf-parse.c (process_zip_dir): Set java_source.
21170 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
21172 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21174 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
21176 * jcf-parse.c (load_class): Don't change input_filename before
21177 calling jcf_parse_source (but still do it before calling
21179 (jcf_parse_source): Assign input_filename after having saved the
21181 * lex.c (java_init_lex): Chain a WFL node to the import on demand
21182 list. ctxp->modifier_ctx zeroed according to its new
21183 definition. ctxp->filename initialized. Removed
21184 JAVA_MODIFIER_CTX_UNMARK.
21185 (java_unget_unicode): Update the character based column position.
21186 (java_allocate_new_line): ref_count not used anymore. Always free
21187 ctxp->p_line. Initialize c_line->char_col to 0.
21188 (java_get_unicode): Update the character based column position.
21189 (java_lex): Use ctxp->elc to store current position in source
21190 file, at the beginning of the parsed token. Set modifier_ctx entry
21191 corresponding to the parse modifier to a WFL node. Return a WFL
21192 node when an identifier is parsed.
21193 (java_lex_error): Now uses ctxp->elc to store current position in
21195 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21196 * lex.h (build_wfl_node): New function definitions.
21197 (struct java_line): ref_count and next fields are gone. New field
21199 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21200 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21201 (JAVA_COLUMN_DELTA): New macro.
21202 (java_lc): New typedef on new struct _java_lc.
21203 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21204 (parse_error_context, parse_warning_context): Changed prototypes.
21205 (java_get_line_col): Added as an available global function.
21206 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21207 (IC_DECL): Replaced by macro IC_TYPE
21208 (DEPEND_WFL): New macro.
21209 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21211 (exit_java_complete_class): Removed a commented out statement.
21212 (struct parser_ctxt): Added comments on fields. modifier_ctx is
21213 now an array of tree nodes. Deleted fields line_list and
21214 e_line. New field elc, to replace e_line.
21215 * parse.y (array_type:): Build WFL node.
21216 (qualified_name:): Build a single WFL node out of two. Retain
21217 the location information of the first node in the resulting node.
21218 (package_declaration:): Use package name as a WFL node
21219 (single_type_import_declaration:): Use imported name as a WFL node.
21220 (type_import_on_demand_declaration:): Use root of the imported
21221 packages as a WFL node.
21222 (field_declaration:): Removed unused local variable cl.
21223 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21224 (yyerror): New static elc. Removed static error_line, error_pos.
21225 New local code_from_source. Save ctxp->elc into elc at the first
21226 pass. Call java_get_line_col to get a string of the line where
21227 the error occurred.
21228 (debug_line): Removed static function.
21229 (parse_error_context, parse_warning_context): Parameter cl is now
21230 a WFL node. Use its value to initialize ctxp->elc.
21231 (redefinition_error): Parameter cl is now a WFL node.
21232 (parse_add_interface): New parameter wfl. No longer call
21233 lookup_cl, use wfl instead.
21234 (check_class_interface_creation): Parameter cl is now a WFL node.
21235 (maybe_create_class_interface_decl): Likewise.
21236 (add_superinterfaces): New function.
21237 (create_interface): Removed local cl, node, super_decl,
21238 super_decl_type. Function now uses id as a WFL node. Better
21239 warning/error report on obsolete or forbidden mix of
21240 modifiers. Now calls add_superinterfaces to register interfaces.
21241 (create_class): Removed local cl, node. Local variable id is used
21242 as a WFL node. Better error report on forbidden modifier
21243 mix. Uses add_superinterfaces to register interfaces.
21244 (find_field): Argument cl is now a WFL node. Now store the WFL
21245 node of a fields that needs to be checked for their
21247 (method_header): Local variable node non longer used. Local
21248 variable id replaces cl.
21249 (check_modifiers_consistency): Local variable cl is now a WFL
21251 (method_declarator): Local variable cl replaced by parameter id.
21252 (parser_qualified_name): Now uses parameter name as a WFL node.
21253 (parser_check_super_interface): New parameter wfl, for achieve
21254 greater accuracy during error reports.
21255 (parser_chain_incomplete_item): New parameter named location. Used,
21256 along the decl, to construct the incomplete item node.
21257 (java_complete_class): resolve_class now uses WFL node extracted
21258 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21260 (complete_method_decl): Unresolved function's argument types are WFL.
21261 (resolve_class): Parameter cl is now a WFL node.
21262 (resolve_and_layout): Likewise.
21263 (do_resolve_class): Likewise. Try first to use cl and then do the
21264 lookup on the decl when calling check_pkg_class_access.
21265 (complete_class_report_errors): Use IC_TYPE in place of
21266 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21267 instead of doing a lookup over the decl.
21268 (java_check_final): Use WFL info from field tree list.
21269 (lookup_cl): Rewritten and returns a statically defined WFL node.
21270 (lookup_modifier_cl): Now uses information from WFL nodes.
21271 (process_imports): Likewise.
21272 (read_import_dir): name and cl arguments replaced by a single WFL
21273 node. Function modified accordingly.
21274 (find_in_imports_on_demand): Now uses WFL node.
21275 (check_pkg_class_access): cl argument is now a WFL node.
21276 (declare_local_variables): Fixed to use WFL nodes.
21277 (resolve_expression_name): Likewise.
21278 (build_method_invocation_stmt): name_combo argument renamed
21279 wfl. Function modified to use WFL nodes.
21280 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21281 (lookup_method_invoke): cl is now a WFL node. Added missing
21282 IDENTIFIER_POINTER to class type decl name.
21284 1998-04-14 Dave Brolley <brolley@cygnus.com>
21286 * lang.c (init_parse): Now returns char* containing the filename.
21288 1998-04-10 Per Bothner <bothner@cygnus.com>
21290 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
21292 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
21293 * class.c (make_class_data): If flag_assume_compiled, initial class
21294 state is CSTATE_PREPARED; make superclass and interfaces direct
21295 references, rather than constant pool indexes.
21297 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21299 * parser.y: Include flags.h. Removed debug variable pl.
21300 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21301 (block:): Likewise.
21302 (labeled_statement_nsi:): Generate debug info when reducing
21303 expression_statement:.
21304 (check_pkg_class_access): get_access_flags_from_decl invocation
21305 fixed for new CLASS_* flags location.
21306 (source_end_java_method): Save/restore parser context when
21307 entering/leaving this routine. Restore lineno to its right value
21308 before calling expand_end_bindings.
21309 (build_method_invocation_stmt): build_invoke called with the
21310 current line information.
21311 (build_invoke): New argument cl. Wrap the function call around a
21313 (refine_accessible_methods_list): Changed comment, removed
21315 * parse.h: Fixed typo in comments.
21316 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21317 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21318 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21320 * lex.c (java_lex): Record the last closing curly bracket of a
21322 * jcf-parse.c (jcf_parse_source): Now calls
21323 java_check_methods. Clarified comment, fixed typo.
21325 1998-04-09 Dave Brolley <brolley@cygnus.com>
21327 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21328 (finish_parse): Expose for non USE_CPPLIB builds.
21330 1998-04-08 Jeffrey A Law (law@cygnus.com)
21332 * lang.c (lang_print_xnode): New function.
21334 1998-04-03 Per Bothner <bothner@cygnus.com>
21336 * decl.c (class_dtable_decl), java-tree.h: New tree node.
21337 * class.c (get_dispatch_vector, get_dispatch_table): New functions
21338 used to build a class's dispatch table.
21339 (make_class_data): Generate dispatch table if flag_assume_compiled.
21340 Set dtable of class object to address of class_dtable_decl.
21342 * decl.c (int_decl_processing): Make soft_badarrayindex_node
21343 be volatile and have side effects - generates better code.
21345 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
21346 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21348 * expr.c (expand_invoke): If class is final, method is
21349 effectively final, so can call it directly.
21351 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
21353 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
21355 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
21357 * parse.y (build_method_invocation_stmt): Removed extra argument
21360 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
21362 * expr.c (dtable_indent): Now static global.
21363 (expand_invoke): Now call invoke_build_dtable and
21364 build_invokevirtual.
21365 (invoke_build_dtable, build_invokevirtual): New functions.
21366 * jcf-io.c (find_class): Defer issuing a warning by setting
21367 jcf->outofsynch to 1.
21368 * jcf-parse.c (jcf_out_of_synch): New function.
21369 (load_class): Test this_jcf.outofsynch flag and call
21370 jcf_out_of_synch accordingly.
21371 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21372 comment indentation.
21373 * lex.c (java_get_unicode): Fixed code indentation.
21374 (java_lex): Create string literal. Fixed typo. Removed several
21375 premature obstack_free.
21376 * parse.h: New enums for name resolution and invocation mode.
21377 (struct qualification): New data structure.
21378 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21379 (do_resolve_class, build_method_invocation_stmt,
21380 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21381 debug_line, identical_subpath_p, invocation_mode,
21382 refine_accessible_methods_list, build_invoke,
21383 lookup_method_invoke): New functions declared.
21384 (build_invokevirtual, invoke_build_dtable, match_java_method,
21385 build_field_ref, jcf_out_of_synch): New references to external
21387 (struct parse_ctxt): Removed artificial_constructor field.
21388 * parse.y: (array_type:): Type defined for this rule.
21389 (class_type:): Installed default rule for interface_type:.
21390 (array_type:): Now build Java array type.
21391 (qualified_name:): Now use obstack_grow0.
21392 (method_declaration:): Skip the artificial constructor added to
21394 (abstract_method_declaration:): Execute the code only during pass 1.
21395 (block:): Installed default rule in block_statements:.
21396 (block_statement:): Add the statement to the method during pass 2.
21397 (statement_expression): Installed default rule for
21398 method_invocation:.
21399 (argument_list:): Added code to build the argument list.
21400 (method_invocation:): Added call to create the method invocation
21402 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21403 (debug_line): New function for debug.
21404 (complete_class_decl): No longer do something during pass 1.
21405 (method_header): Use BUILD_PTR_FROM_NAME.
21406 (parser_qualified_classname): Use obstack_grow0. Removed bogus
21408 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21409 function's main comment.
21410 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21412 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21413 (resolve_class): Now works with arrays.
21414 (do_resolve_class, resolve_and_layout): New functions.
21415 (java_check_regular_methods): Reverse method list before and after
21416 having processed it. No longer set ctxp->artificial_constructor.
21417 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21418 accordingly. Fixed typo in issued error message. Now use
21420 (find_in_imports_on_demand): Now use obstack_grow0.
21421 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21422 (source_end_java_method): Call expand_expr_stmt instead of
21423 expand_expr. Calls it before calling expand_function_end.
21424 (java_method_add_stmt): Do nothing if errors were found during
21426 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21427 (build_method_invocation_stmt, build_invoke, invocation_mode,
21428 lookup_method_invoke, refine_accessible_methods_list,
21429 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21431 * typeck.c (build_java_signature): Properly end method signature
21432 if return type skipped.
21433 (match_java_method): New function.
21435 1998-03-16 Per Bothner <bothner@cygnus.com>
21437 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
21439 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
21441 * expr.c (build_invoke_non_interface): New function.
21442 (methods_ident, ncode_ident): Now static globals.
21443 (expand_invoke): Use build_invoke_non_interface.
21444 * java-tree.h (struct lang_decl): New field function_decl_body.
21445 (DECL_FUNCTION_BODY): New macro.
21446 * jcf-parse.c (jcf_parse_source): Deeper check before setting
21447 CLASS_FROM_SOURCE_P.
21448 (parse_source_file): Fixed typos. Call java_layout_parsed_class
21449 before starting pass 2. Call to java_generate_parsed_class replaced
21450 by java_register_parsed_class.
21451 * lex.c: Fixed typo in header. Some line width related formating.
21452 * lex.h: Some line width related formating.
21453 * parse.h (source_end_java_method, resolve_expression_name,
21454 complete_class_decl, maybe_create_class_interface_decl,
21455 check_class_interface_creation): New static function declarations.
21456 (java_layout_parsed_class, java_method_add_stmt): New function
21458 (struct parser_ctxt): Field mark_class_generate removed. New
21459 fields class_list and artificial_constructor.
21460 * parse.y: Fixed typo in header.
21461 (class_declaration:): Call complete_class_decl when class body
21463 (method_declaration:): Call source_end_java_method in pass 2 when
21464 the method body is defined.
21465 (postfix_expression:): Do expression name resolution on sub-rule
21466 name during pass 2.
21467 (create_class, create_interface): Merged common pieces.
21468 (check_class_interface_creation, maybe_create_class_interface_decl):
21470 (complete_class_decl): New function.
21471 (register_fields): Fixed line width related typo.
21472 (method_header): Correctly skip first argument when fixing
21473 argument line. Changed the loop.
21474 (java_check_circular_reference): Now use ctxp->class_list.
21475 (java_complete_class): Removed start/stop marking.
21476 (java_check_regular_methods): Now takes a class decl as an
21477 argument. Add default constructor if none were encountered.
21478 (java_check_methods): Now use ctxp->class_list. Changed call to
21479 java_check_regular_methods.
21480 (source_start_java_method): Set DECL_ARG_TYPE for each function
21482 (source_end_java_method, java_method_add_stmt): New functions.
21483 (java_generate_parsed_class): No longer exists.
21484 (java_layout_parsed_class, java_register_parsed_class): New functions.
21485 (resolve_expression_name): New function.
21487 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21489 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21490 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
21491 until pass initializations are done. Call read_import_dir with
21493 * parse.h: (lookup_modifier_cl): New function declared.
21494 (INTERFACE_FIELD_MODIFIERS): New macro.
21495 (OBSOLETE_MODIFIER_WARNING): New macro.
21496 * parse.y: (register_fields): Class type and current field name in
21497 local variables. Check modifier(s) if adding field(s) to an interface.
21498 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
21499 and report errors using the faulty modifier line context.
21500 (lookup_modifier_cl): New function.
21501 (read_import_dir): Detect and report default import processing
21504 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
21506 Add a pair of -fassume-compiled/-fno-assume-compiled options.
21507 * class.c (is_compiled_class): Return 1 after making sure it
21508 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
21509 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21510 * java-tree.h (flag_assume_compiled): Add decl.
21511 * lang.c (lang_f_options): Add the flag.
21512 (flag_assume_compiled): Add decl, default to 0.
21514 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
21516 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21517 (is_compiled_class): Likewise.
21518 (layout_class): Likewise.
21519 (layout_class): Detect and lay out classes defined in source code.
21520 (interface_of_p, add_interface_do, may_add_interface): New
21522 (add_interface): Now use add_interface_do.
21523 (add_method_1): New function.
21524 (add_method): Now use add_method_1.
21525 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21526 (complete_start_java_method): New function.
21527 (start_java_mehod): Now call complete_start_java_method.
21528 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21529 (expand_invoke): Likewise and fixed typo.
21530 *gjava.c: (print_super_field): Use new argument to find_class
21533 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
21534 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21535 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21537 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
21538 (add_method_1, push_class): New prototypes.
21539 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21540 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
21541 directory where the class was found.
21542 (find_class): New argument DO_CLASS_FILE. Function find_class
21543 modified accordingly.
21544 *jcf-parse.c: (fix_class_path): New function.
21545 (load_class): Use new VERBOSE argument. load_class now finds and
21546 loads/parses .class/.java files. Save read_state of current_jcf
21548 (java_parser_abort_on_error): New macro.
21549 (jcf_parse_source, parse_source_file): New function.
21550 (jcf_parse): Fixed typo.
21551 (yyparse): Call parse_source_file () only.
21552 (process_zip_dir): Fixed typo, fix zdir->filename_length when
21553 writing the real class name back in the zip directory entry.
21554 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21555 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21556 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21557 (find_class): Prototype fixed.
21558 *lex.c: Added 1998 time stamp.
21559 Removed all static global variables, moved into the parser
21560 context data structure.. Now include unistd.h if SEEK_SET not
21562 (java_init_lex): Rewritten.
21563 (java_sneak_unicode): Modified current unicode access in current line.
21564 (java_unget_unicode): Likewise.
21565 (java_allocate_new_line): New allocation management.
21566 (java_read_char): Modified access and storage of unget_utf8_value.
21567 New way of processing current unicode.
21568 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
21569 (java_get_unicode): Now use the parser context.
21570 (java_lineterminator): Likewise.
21571 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
21572 of the reentrant parser implementation. Function now use the
21573 parser context data structure and java_lval. Fixed production of
21574 the float and double constant "out of range" error message. Fixed
21575 obstack use. Return integer value when hitting a modifier. Now
21576 return type for TRUE, FALSE and other predefined types. Return
21577 identifier as a TREE_LIST list containing the current line context
21578 as the TREE_VALUE sub-node.
21579 (java_unicode_2_utf8): Fixed typo in declaration.
21580 (java_lex_error): Now use the parser context data structure.
21581 *lex.h: Added 1998 time stamp.
21582 (struct java_line): New fields ref_count and next.
21583 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21584 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
21585 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
21586 *parse.h: Added 1998 time stamp.
21587 (java_parse_source_file): Renamed from parse_source_file.
21588 (YYERROR_NOW, YYNOT_TWICE): Fixed.
21589 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
21590 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
21591 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
21592 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
21593 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
21594 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
21595 (struct parser_ctxt): New data structure to keep the parser context.
21596 *parse.y: Added 1998 time stamp, got rid of static global variables.
21597 (java_error_count, ctxp): New global variables.
21598 (%union): New value field.
21599 (numeric_type, integral_type): Rules removed.
21600 (primitive_type): Rule defined to handle integral, float, double and
21602 (qualified_name, package_declaration,
21603 single_type_import_declaration, type_import_on_demand_declaration,
21604 modifiers, class_declaration, super, interfaces,
21605 interface_type_list, class_body, field_declaration,
21606 field_declaration, variable_declarators, variable_declarator,
21607 variable_declarator_id, method_declaration, method_header,
21608 formal_parameter_list, formal_parameter, method_body, block,
21609 static, interface_declaration, extends_interfaces,
21610 abstract_method_declaration, local_variable_declarators): Rules now
21612 (force_error, do_warning): New global statics.
21613 (push_parser_context, parser_context_save_global,
21614 parser_context_restore_global, pop_parser_context): New functions.
21615 (yyerror): Now uses the global parser context. Fixed use of obstack.
21616 (parse_error, parse_error_context, parse_warning_context,
21617 java_accstring_lookup, redefinition_error, check_modifiers,
21618 parser_add_interface, create_interface, create_class, find_field,
21619 duplicate_declaration_error, register_fields, method_header,
21620 check_modifiers_consistency, check_abstract_method_header,
21621 method_declarator, parser_qualified_classname,
21622 parser_check_super_interface, parser_check_super,
21623 parser_chain_incomplete_item, java_check_circular_reference,
21624 layout_class_from_source, java_complete_class,
21625 complete_method_decl, resolve_class, complete_class_report_errors,
21626 java_check_final, check_method_redefinition,
21627 java_check_regular_methods, java_check_abstract_methods,
21628 java_check_methods, lookup_java_interface_method2,
21629 lookup_java_method2, lookup_cl, find_name_in_single_imports,
21630 process_imports, find_in_imports, read_import_entry,
21631 read_import_dir, find_in_imports_on_demand,
21632 check_pkg_class_access, not_builtin_p, declare_local_variables,
21633 source_start_java_method, java_generate_parsed_class): New
21635 *typeck.c: (signature_include_return): New global variable.
21636 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
21637 to add the function returned type in the signature.
21639 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
21641 * jcf-io.c (open_in_zip): Use strncmp and LEN.
21643 1998-01-29 Dave Brolley <brolley@cygnus.com>
21645 * Make-lang.in (java.info): Added.
21646 (java.install-info): Added
21648 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
21650 * Makefile.in (clean): Also remove java/parse.c.
21652 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
21654 Add a pair of -fbounds-check/-fno-bounds-check options.
21655 * lang.c (lang_decode_option): Add code to grok arguments.
21656 (flag_bounds_check): Add decl.
21657 (lang_f_options): New array w/ the option in it.
21658 * java-tree.h (flag_bounds_check): Add decl.
21659 * lang-options.h: New file.
21660 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
21661 of a static macro value.
21662 (JAVA_ARRAY_EXCEPTION): Delete macro.
21664 1998-01-23 Per Bothner <bothner@cygnus.com>
21666 * typeck.c (build_java_array_type): Fix two bugs in previous change.
21667 * expr.c (build_anewarray): Add missing promote_type.
21669 1998-01-22 Per Bothner <bothner@cygnus.com>
21671 Add array types with known length to optimize bounds checking.
21672 * typeck.c (build_java_array_type): Take length parameter.
21673 (java_array_type_length, build_prim_array_type): New functions.
21674 * java-tree.h: Update for new functions.
21675 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
21676 * class.c: Use build_prim_array_type.
21677 * expr.c (can_widen_reference_to): Handle known-length array types.
21678 (verify_jvm_instructions): Keep track of integer push instructions
21679 followed by newarray/anewarray, so we can build known-length arrays.
21680 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
21681 (java_array_data_offset): New function.
21682 (build_java_array_length_access): New function. Optimize if constant.
21683 (build_java_arrayaccess): Constant fold bounds check.
21684 (expand_java_newarray, expand_java_anewarray): Replaced by ...
21685 (build_newarray, build_anewarray): New functions.
21686 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
21687 * verify.c (merge_types): Handle known-lengh array types.
21689 1998-01-19 Per Bothner <bothner@cygnus.com>
21691 * expr.c (expand_byte_code): Fix performace bug, which caused
21692 searching linenumber_table to be linear rather than constant.
21694 1997-12-12 Per Bothner <bothner@cygnus.com>
21696 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
21698 * decl.c, java-tree.h (soft_fmod_node): New global.
21699 * decl.c (init_decl_processing): Define __builtin_fmod.
21700 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
21701 using __builtin_fmod.
21703 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
21705 * keyword.h: New file, output of keyword.gperf as processed by
21707 * lex.c (java_lex_init): Initialize java_error_flag.
21708 * parse.c (YYERROR_NOW): Uses java_error_flag.
21709 * parse.y: New static java_error_flag. Useless definition of
21711 * parse.y (java_error): Portable error recovery using
21712 java_error_flag (not yet completely tuned).
21714 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
21716 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
21718 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
21720 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
21721 (parse.c, lex.c, keyword.h): New rules for Java source code
21723 * parse.c: Renamed into jcf-parse.c.
21724 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
21725 * keyword.gperf: New file, Java keywords.
21726 * parse.y: New file, Java language grammar.
21727 * parse.h: New file, Java language grammar definitions.
21728 * lex.c: New file, Java language lexer.
21729 * lex.h: New file, Java language lexer definitions.
21731 1997-12-03 Per Bothner <bothner@cygnus.com>
21733 * decl.c (clinit_identifier_node), java-tree.h: New global.
21734 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
21735 * verify.c (verify_jvm_instructions): Inline use of removed macros.
21736 * expr.c (expand_java_field_op): Check for invalid assignment
21739 * jcf-reader.c (get_attribute): Test for wrong attribute length.
21741 1997-10-27 Per Bothner <bothner@cygnus.com>
21743 * verify.c (verify_jvm_instructions): When processing a handler,
21744 attempt to set the current_subr to the right value.
21745 (More complicated code combines Sep 17 and Oct 22 versions.)
21747 1997-10-24 Per Bothner <bothner@cygnus.com>
21749 * class.c (push_class): Figure out (guess) name of source file.
21750 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
21751 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
21752 (parse_class_file): Change return type from int to void.
21753 Call debug_start_source_file/debug_end_source_file.
21755 * expr.c (build_java_binop): Fix masking 2nd operand.
21756 * decl.c (init_decl_processing): Set sizetype first.
21758 1997-10-22 Per Bothner <bothner@cygnus.com>
21760 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
21761 (Revert Sep 17 change.)
21763 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
21765 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
21766 .class extension in their name and fix thing so we don't process
21767 them parse_zip_file_entries().
21768 (parse_zip_file_entries): Cleaned unused local variables.
21770 1997-10-20 Per Bothner <bothner@cygnus.com>
21772 * expr.c (can_widen_reference_to): Allows equal array element types.
21773 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
21774 * jcf-dump.c (RET): Get (and print) index.
21776 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
21777 Promote element type to POINTER_TYPE.
21779 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
21781 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
21782 find_in_current_zip, jcf_figure_file_type): Moved from
21783 jcf-reader.c to parse.c.
21784 * zextract.c: (read_zip_archive): takes file_comment_length possible
21785 field into account.
21787 1997-10-20 Per Bothner <bothner@cygnus.com>
21789 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
21791 * verify.c (merge_types): Handle array types even better ...
21793 1997-10-17 Per Bothner <bothner@cygnus.com>
21795 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
21797 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
21798 * class.c (make_class_data): Don't build fields_decl if no fields.
21799 When building fields_decl, skip if DECL_ARTIFICIAL.
21801 * expr.c (java_stack_swap): Update stack_type_map.
21802 * verify.c (merge_types): Handle array types better.
21804 1997-10-15 Per Bothner <bothner@cygnus.com>
21806 * class.c (add_field): Don't promote short integral fields to
21807 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
21808 * expr.c (push_value): Promote and convert short integral values.
21810 * decl.c, java-tree.h (integer_two_node): New constant node.
21811 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
21813 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
21815 * class.c (append_gpp_mangled_type): Use function argument
21816 unpromoted type to generate mangled name.
21818 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
21820 * constants.c (build_constant_data_ref): Now uses current_class
21821 instead of main_class.
21822 (build_constants_constructor): Now uses current_class instead of
21824 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
21825 of the global variable SeepZipFiles done here.
21826 * zextract.c (read_zip_archive): extra_field optional field taken
21827 into account while computing the position of the class file in the
21829 * verify.c (verify_jvm_instructions): Use current_jcf to search
21831 * parse.c (load_class): First search for the class to load in the
21832 current zip file. Saves current_jcf (restored before returning
21833 from that function). Don't call JCF_FINISH in the class was found
21834 in the current ZIP file.
21835 (jcf_parse): If the class was found in the current ZIP file, save
21836 its tree_constant_pool (for later reuse).
21837 (parse_class_file): New function. Process each method defined in
21838 the current class and record the class as to be later registered.
21839 (yyparse): Rewritten. Figure the type of the current file and switch
21841 * lang.c: New global variable current_jcf.
21842 (lang_init): Removed compiling_from_source test (done later, in
21843 yyparse). Removed call the jcf_parse ().
21844 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
21845 (typedef struct JCF): New fields seen_in_zip (to mark a class found
21846 in the current ZIP file) and zip_offset (offset to the class data in
21847 the current zip file).
21848 * jcf-reader.c: zipfile.h included.
21849 localToFile: New ZipFileCache static global variable
21850 (parse_zip_file_entries): New function. Browse the current ZIP
21851 file directory and process each class found.
21852 (process_zip_dir): New function. Register each class found in the
21853 ZIP file directory. The class aren't parsed but a valid JCF is
21854 link to each of them.
21855 (find_in_current_zip): New function. Search for a class in the
21856 current ZIP file directory. If found, prepare the class so that it
21858 (jcf_figure_file_type): New function. Examine the file structure
21859 to figure a class file, a ZIP file. If none of these categories are
21860 matched, a source file is assumed.
21861 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
21862 SeenZipFile: New global variable.
21863 (open_in_zip): Use zipmember's length to accelerate the search for
21864 a member. If zipmember was NULL and zip file successfully read,
21866 * java-tree.h: New global variable current_jcf declared. Added
21867 declaration for current_constant_pool_tags, current_constant_pool_data,
21868 current_constant_pool_length, current_constant_pool_data_ref.
21869 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
21870 store the JCF of classes seen in a zip file) and tree *constant_pool
21871 (to save a loaded class constant pool). current_class declared here.
21872 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
21873 retrieve method_ref_constant.
21874 (PUSHC): java_push_constant_from_pool now uses current_jcf.
21875 (OBJECT): get_class_constant now uses current_jcf.
21876 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
21877 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
21878 (expand_invoke): Now uses current_class instead of main_class
21879 (build_class_init): Now uses current_class instead of main_class
21880 * class.c: New static global variable registered_class.
21881 (register_class): New function.
21882 (emit_register_class): Modified to use registered_class instead of
21884 (is_compiled_class): Now take into account class seen in the archive.
21886 1997-10-06 Per Bothner <bothner@cygnus.com>
21888 * except.h: Renamed to: java-except.h.
21889 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
21890 * except.c: Add semi-working (commented out) implementation.
21892 * expr.c (expand_iinc): Add needed flush_quick_stack.
21893 * parse.c (set_source_filename): New function.
21894 (give_name_to_class): Set input_filename from package.classname.java.
21896 * jcf-io.c (find_class): Don't look first in ".".
21898 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21900 * zextract.c (read_zip_archive): Now takes into account the
21902 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
21904 1997-09-20 Per Bothner <bothner@cygnus.com>
21906 * constants.c, java-tree.h (build_internal_class_name): New function.
21907 (alloc_class_constant): Re-implement using build_internal_class_name.
21908 * class.c (make_class_data): Likewise.
21909 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
21911 1997-09-17 Per Bothner <bothner@cygnus.com>
21913 * verify.c (verify_jvm_instructions): Temporarily set current_subr
21914 to NULL before pushing an exception handler target.
21916 * expr.c (flush_quick_stack): Save from low stack indexes to high.
21917 (java_stack_swap, java_stack_dup): Re-write to be safe from
21918 clobbering registers.
21919 (build_class_init): New function.
21921 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
21923 * typeck.c (build_java_array_type): Temporary use
21924 permanent_obstack to create the array 'length' field.
21925 * expr.c (lookup_label): Temporay use permanent_obstack to create
21926 label if not found.
21927 * class.c (push_super_field): Tempory use permanent_obstack.
21929 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
21931 * typeck.c (type_for_mode): Now handles double_type_node and
21933 * verify.c (verify_jvm_instructions): The instruction following
21934 the wide bytecode is checked. OPCODE_ret added to the list of
21937 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
21939 * class.c (make_class): Temporary use permanent_obstack. Set the
21940 class CLASS_P field to 1.
21941 (push_class): Temporary use permanent_obstack.
21942 (set_super_info): Temporary use permanent_obstack.
21943 (add_method): Temporary use permanent_obstack, set
21944 METHOD_TRANSIENT().
21945 (add_field): Temporary use permanent_obstack. Sets
21946 FIELD_VOLATILE() and FIELD_TRANSIENT().
21947 (build_class_ref): Temporary use permanent_obstack if the class
21949 (build_static_field_ref): Temporary use permanent_obstack when
21950 creating field's rtl.
21951 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
21952 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
21953 and fields. Function finalized, as far as flag handling.
21954 (push_class_static_dummy_field): Temporary use permanent_obstack.
21955 (emit_register_class): Force generation of class registration at
21957 * decl.c (end_java_method): Call permanent_allocation() before
21959 * expr.c (can_widen_reference_to): Added comment to interface
21960 handling, fixed typo.
21961 (lookup_field): Now uses CLASS_P() to correct FIXME
21962 (expand_invoke): Verification on public && !static &&
21963 !abstract moved into soft_lookupinterfacemethod (kaffe).
21964 Use Object class dtable if objectref is an array when expanding
21966 (java_push_constant_from_pool): Temporary use permanent_obstack
21967 for CONSTANT_string
21968 * parse.c (get_ref_constant): Temporary use permanent_obstack to
21969 create constant references.
21970 (get_constant): Temporary use permanent_obstack to create constant.
21971 (load_class): Temporary use permanent_obstack to load class.
21972 (jcf_parse): Temporary use permanent_obstack to perform class
21974 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
21975 (build_java_signature): Temporary use permanent_obstack.
21976 * verify.c: (verify_jvm_instruction): removed unnecessary verification
21978 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
21979 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
21982 1997-09-11 Per Bothner <bothner@cygnus.com>
21984 * class.c (append_gpp_mangled_type): Fix typo.
21985 (emit_register_class): Use main_class to get class object, rather
21986 than looking for no-longer-existing static decl starting with _CL.
21987 * typeck.c (parse_signature_type): Promote array element type
21988 if it is a RECORD_TYPE.
21990 1997-09-10 Per Bothner <bothner@cygnus.com>
21992 * class.c (push_class_static_dummy_field): New function.
21993 (mangle_static_field): New. Do G++-style mangling of static fields.
21994 (layout_class): Mandle static fields here, not in add_field.
21995 (build_class_ref): The class object is now a dummy static field.
21996 * decl.c (find_local_variable): Look for best, instead of first match.
21997 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
21998 (build_java_athrow): Don't check here if exception is Throwable.
21999 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
22000 (TYPE_USED): Removed. No longer used ...
22001 * parse.c (jcf_parse): Call push_class_static_dummy_field.
22002 * verify.c (push_pending_label): New function.
22003 (push_pending_block): Renamed to check_pending_block.
22004 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
22005 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
22006 re-checking possible handlers) after a store (less wasted work).
22007 Check for null handler (finally) before calling add_handler.
22008 Various changes to (finally?) correctly handle try/finally.
22010 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
22012 * class.c: Include stdio.h.
22014 1997-09-04 Per Bothner <bothner@cygnus.com>
22016 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22017 to make sure class is initialized before static/special invoke.
22019 * verify.c (verify_jvm_instructions): On a store instruction,
22020 call find_local_variable to force pre-allocation of decl and rtx.
22021 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
22023 1997-09-03 Per Bothner <bothner@cygnus.com>
22025 * class.c (build_class_ref): Strip off "promoted_" if need be.
22026 (make_field_value): Call build_java_signature when needed.
22027 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
22028 * expr.c (build_java_athrow): Don't push_value of exception.
22029 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22030 match specification of [fd]cmp[lg] for NaNs.
22031 (expand_byte_code): Add support for exception handler ranges.
22032 * except.c: Add skeleton for EH code-generation.
22033 * verify.c (merge_types): Treat all promoted integral types as equal.
22034 * constants.c (build_constants_constructor): To force creation of
22035 current_constant_pool_data_ref, call build_constant_data_ref.
22037 * javaop.def (lload): Fix typo.
22038 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
22040 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
22042 * parse.c: Don't include function.h.
22044 1997-08-27 Per Bothner <bothner@cygnus.com>
22046 * except.[ch]: New files.
22047 * Makefile.in (JAVA_OBJS): Add except.o
22048 * expr.c: Temporary warning about unimplemented exceptions.
22049 * verify.c: Verify exception handlers.
22051 * jcf-dump.c (disassemble_method): Print exception table.
22053 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
22055 * expr.c (verify_jvm_instructions): Started a thorough
22056 verification of invoke* bytecodes.
22057 (expand_byte_code): flush quick stack if PC is the target of a
22058 branch. and undef RET (conflicting with config/i386/i386.h).
22059 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22061 (expand_invoke): Now handles invokeinterface and do more
22062 verification according to the bytecode.
22063 (lookup_field): Don't try to load the class if processing
22065 (can_widen_reference_to): Now handles interfaces.
22066 * decl.c (init_decl_processing): New global variable
22067 soft_lookupinterfacemethod_node, declared in java-tree.h.
22068 Call set_super_info on string_type_node.
22069 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22071 * class.c (set_super_info): Fills the CLASS_* flags according to
22073 (get_access_flags_from_decl): Handles all class flags.
22075 1997-08-26 Per Bothner <bothner@cygnus.com>
22077 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
22078 * parse.c (yyparse): Check for abstract method, and missing code.
22079 * expr.c (expand_byte_code): Change interface.
22080 * lang.c (put_decl_node): Print promoted types prettier.
22081 * verify.c (verify_jvm_instruction): Change interface.
22082 Partial support for scanning exception table.
22083 For load instructions, handle promoted integral types.
22085 1997-08-21 Per Bothner <bothner@cygnus.com>
22087 * verify.c: New file, with contents moved from expr.c.
22088 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
22089 * typeck.c (is_array_type_p): Moved here from expr.c.
22090 * java-tree.h: Add some now-needed function declarations.
22091 * Makefile.in (JAVA_OBJS): Added verify.o.
22093 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22095 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22096 METHOD_ABSTRACT flag.
22098 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22099 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22100 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22102 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22104 (start_java_method): Hook for SYNCHRONIZED methods.
22106 * expr.c (build_java_jsr, build_java_ret): New functions
22107 (JSR,PRE): New macros
22108 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22109 (verify_jvm_instructions): tableswitch, lookupswitch,
22110 monitorenter, monitorexit, goto_w: verified.
22111 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22112 (build_java_monitor): New function.
22113 (MONITOR_OPERATION): Modified to call build_java_monitor()
22114 (verify_jvm_instructions): Started a thorough verification of
22117 1997-08-19 Per Bothner <bothner@cygnus.com>
22119 Support verification of jsr/ret subroutines (used for try/finally).
22120 * decl.c (return_address_type_node): New type node.
22121 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22122 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22123 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
22124 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22125 TYPE_USED): New macros for special types in type_map.
22127 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
22128 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
22130 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
22132 * expr.c (can_widen_reference_to): New function.
22133 (pop_type): Use it.
22134 (merge_type_state): Support handling start of subroutine.
22135 (push_pending_block): Return char* error message, instead of calling
22136 fatal on an error. Also handle subroutines.
22137 (verify_jvm_instructions): Handle errors from push_poending_block.
22138 Support jsr and ret instructions.
22140 1997-08-19 Per Bothner <bothner@cygnus.com>
22142 * jcf-io.c (find_classfile): Fix thinko.
22143 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
22145 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
22147 * Makefile.in (BISON): Remove.
22149 1997-08-07 Per Bothner <bothner@cygnus.com>
22151 * Makefile.in: Convert to autoconf.
22152 * config-lang.in (outputs): Added java/Makefile.
22154 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22155 Rename cc1java to jc1.
22157 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
22158 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
22160 * class.c (class_depth): Do load_class if needed.
22162 Mostly better verification.
22163 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
22164 (init_decl_processing): Change return type of soft_checkcast.
22165 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
22166 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22167 lang_print_error): New functions.
22168 (lang_init): Set global hook print_error_function to lang_print_error.
22169 * expr.c: In the type_map ptr_type_node is only used for null now.
22170 (pop_type, merge_types): Hence ptr_type_node matches any reference.
22171 (merge_types): Dererence pointer to record types before comparing.
22172 (decode_newarray_type, merge_types): On error just return NULL.
22173 (build_java_binop): Add preliminary implementation (with warning)
22174 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22175 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
22176 (expand_compare, expand_java_goto, expand_java_call): Don't
22177 push_pending_block, since that only makes sense when verifying.
22178 (merge_type_state): Different return codes.
22179 (push_pending_block): A block may need to be verified more than once.
22180 (expand_byte_code): Warn about unused code at code generation time.
22181 (verify_jvm_instruction): Changed logic, since code may need to be
22182 re-verified if type-state has changed. Also, better error handling.
22183 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22184 Improve newarray, anewarray, ?aload, athrow,
22185 * java-tree.h (LABEL_CHANGED): New macro.
22187 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
22189 * decl.c (soft_athrow_node): New global variable initialized.
22190 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22191 * typeck.c (convert): Added support for REAL_TYPE.
22192 (convert_to_char): New function.
22193 (convert): Handle CHAR_TYPE.
22194 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22195 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22196 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22198 (verify_jvm_instructions): Added break a the end of bogus unop: label.
22199 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22200 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22201 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22202 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22203 to Use The Right Things.
22204 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22205 compatible with INT. BOOLEAN is made equivalent to BYTE.
22206 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22207 OPCODE_ifnonnull): Now supported.
22208 (build_java_athrow): New function.
22210 1997-08-04 Per Bothner <bothner@cygnus.com>
22212 Rename method name <init> to match G++ (and fix mangling).
22213 * class.c (layout_class): Replace method name of <init> by class name.
22214 (make_method_value): Do inverse renaming of constructor from <init>.
22215 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
22216 * typeck.c (lookup_java_constructor): New function.
22217 * expr.c (expand_invoke): If method_name is <init>, call
22218 lookup_java_constructor to find constructor.
22220 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
22222 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22224 * parse.c (get_class_constant): Modified to handle array "classes"
22225 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22227 (convert): Modified to handle real type.
22228 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22229 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22230 variables declared.
22231 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22232 soft_multianewarray, soft_newarray_node, soft_throw_node): New
22233 global variables initialized.
22234 (find_local_variable): Handles the case of a pointer
22235 (end_java_method): Restore the use of one more scope
22236 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22237 build_java_array_length_access, expand_java_arrayload,
22238 expand_java_arraystore, expand_java_array_length,
22239 expand_java_multianewarray, expand_java_anewarray,
22240 build_java_check_indexed_type, is_array_type_p,
22241 build_java_throw_out_of_bound_exception): New functions.
22242 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22243 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22244 OPCODE_<t>aload): Implemented code for verification.
22245 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22246 ARRAY_NEW_MULTI): Macro defined.
22247 (CONVERT): Modified to invoke convert().
22248 (case OPCODE_aload2): Fixed index typo from 2 to 1.
22250 1997-07-31 Per Bothner <bothner@cygnus.com>
22252 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
22253 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
22254 (make_class_data): Field name needs '/' as package prefix.
22255 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
22257 1997-07-25 Per Bothner <bothner@cygnus.com>
22259 Implement debug information for local variables.
22260 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22261 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22262 DECL_LOCAL_SLOT_CHAIN): New macros.
22263 (struct lang_decl_var): New type.
22264 * parse.c (give_name_to_locals): Move to decl.c.
22265 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
22266 (start_java_method): Re-write parameter handling.
22267 (pending_local_decls): New global variable.
22268 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
22269 (find_local_variable): Accept pc so we can skips decls not in range.
22270 (struct binding_level): Add end_pc field.
22271 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22272 (various): Change so current pc gets passed to find_local_variable.
22274 * decl.c (init_decl_processing): Re-arrange fields in
22275 class_type_node and and method_type_node to match kaffe 0.9.1.
22276 * class.c (make_method_value, make_class_data): Update
22277 initializations to match.
22279 1997-07-16 Per Bothner <bothner@cygnus.com>
22281 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22282 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
22283 (push_super_field): New function.
22284 (make_class_data): Handle inheritance of class static initializer.
22285 (layout_class): New name mangling.
22286 * constants.c (build_constant_data_ref): Init type of data array
22287 to a one-element array.
22288 (build_constants_constructor): Set DECL_SIZE from complete array type.
22289 * decl.c: Rename class_type, object_type etc to class_type_node,
22290 object_type_node etc. Make former inherit from latter.
22291 * expr.c (expand_invoke): Add cast of function address.
22292 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
22293 * parse.c (yyparse): Don't call layout_class here.
22294 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
22296 1997-06-14 Per Bothner <bothner@cygnus.com>
22298 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
22299 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
22300 (alloc_class_constant): New.
22301 * expr.c (expand_invoke): Make sure method's class is initialized.
22302 * class.c (interits_from_p, emit_register_class): New functions.
22303 * parse.c (yyparse): Call emit_register_class.
22305 1997-06-09 Per Bothner <bothner@cygnus.com>
22307 * constants.c: New file, to handle constant pool.
22308 * Makefile.in (JAVA_OBJS): Add constants.o.
22309 * decl.c (init_decl_processing): Update, fix, finish various structs.
22310 (pushdecl_top_level): New.
22311 * parse.c (layout_class): Moved to class.c.
22312 * expr.c (java_push_constant_from_pool): New function.
22313 * class.c (build_class_ref): Make work fully
22314 (make_class_data): Emit super-class, constant pool, interface vector.
22316 1997-06-03 Per Bothner <bothner@cygnus.com>
22318 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
22319 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
22320 * class.c (class_depth): New function.
22321 (lookup_named_class): Replaced by new function lookup_class.
22322 * decl.c (object_type_node, string_type_node): New.
22323 Remove various types that we no longer need.
22324 * expr.c (verify_jvm_instructions): New separate verifier pass.
22325 (push_type, pop_type): New functions for verifier.
22326 (type_stack_dup, pop_argument_types, merge_types): Likewise.
22327 (expand_byte_code): Simplify, since we assume already verified.
22328 (expand_invoke): Now mostly works.
22329 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22330 * lang.c (main_class): Move to parse.c. Don't make_class yet.
22331 * parse.c: Wait to allocate class object until we know its name.
22332 (layout_class): Calculate DECL_VINDEX for each virtual method.
22333 * typeck.c (get_array_type): Rename to ...
22334 (build_java_array_type): ... and provide working implementation.
22335 (build_java_signature): New function - build Java signature of type.
22336 (set_java_signature): New function - cache signature with type.
22337 (lookup_java_method): New function.
22339 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
22341 * class.c (ident_subst): Take extra SUFFIX parameter.
22342 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
22343 (set_constant_value, build_static_field_ref, is_compiled_class): New.
22344 (build_class_ref): Actually implement.
22345 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
22346 * decl.c (builtin_function): New.
22347 (init_decl_processing): Update for current Kaffe. Declare some
22348 builtin Kaffe functions.
22349 * expr.c (build_address_of): New.
22350 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22351 Renamed (from expand_java_new etc), and added working implementations.
22352 (build_field_ref): Now also handle static fields.
22353 (expand_invoke): Implement invokestatic, and start implement rest.
22354 * java-opcodes.h: Use javaop.def to avoid duplicated list.
22355 * javaop.def: Rename invokevirt -> invokevirtual.
22356 * lang.c (use_handles): Removed.
22357 * parse.c: Add support for ConstantValue attribute.
22358 Handle nested loading of a class. (JPOOL_UTF): New.
22360 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
22362 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
22364 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
22366 * Make-lang.in (java.install-man): New empty rule.
22367 * typeck.c (set_local_type): New function.
22368 * expr.c (STORE_INTERNAL): Call find_local_variable,
22369 not find_stack_slot. Call set_local_type.
22371 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
22373 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
22374 and building RECORD_TYPE CONSTRUCTORs.
22375 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22377 * lang.c (use_handles): Change the default to 0.
22378 * decl.c: Define and build class_type, field_type, utf8const_type.
22379 * class.c (make_class_data, make_field_value,
22380 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22381 hashUtf8String, strLengthUtf8, mangled_classname:
22382 Functions to build reflective data structures.
22383 * parse.c (yyparse): Call make_class_data.
22385 * jcf-io.c (open_class, find_classfile): New functions.
22386 * jcf-dump.c: Support reading classfile from explicitly-named
22387 class file (without CLASSPATH searching).
22389 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22391 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
22392 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22393 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22394 (get_constant): Now trivial for CONSTANT_Utf8.
22396 * jcf.h: Make NEW_CPOOL the default.
22397 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
22399 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22404 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
22405 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
22407 Copying and distribution of this file, with or without modification,
22408 are permitted in any medium without royalty provided the copyright
22409 notice and this notice are preserved.