1 2010-10-13 Richard Henderson <rth@redhat.com>
3 * lang.c (java_eh_personality): Update call to
4 build_personality_function.
6 2010-10-12 Joseph Myers <joseph@codesourcery.com>
8 * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
11 2010-10-11 Nathan Froyd <froydnj@codesourcery.com>
13 * decl.c (java_init_decl_processing): Use build_function_type_list
14 instead of build_function_type.
15 * jcf-parse.c (java_emit_static_constructor): Likewise.
16 * builtins.c (initialize_builtins): Likewise.
18 2010-10-08 Joseph Myers <joseph@codesourcery.com>
20 * lang.c (java_init_options_struct): New. Split out from
22 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
24 2010-10-04 Andi Kleen <ak@linux.intel.com>
26 * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
29 2010-09-29 Joseph Myers <joseph@codesourcery.com>
31 * lang.opt: Don't use VarExists.
33 2010-09-29 Joseph Myers <joseph@codesourcery.com>
35 * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
36 flag_force_classes_archive_check, flag_redundant, flag_newer,
37 flag_use_divide_subroutine, flag_use_atomic_builtins,
38 flag_use_boehm_gc, flag_hash_synchronization,
39 flag_check_references, flag_optimize_sci, flag_indirect_classes,
40 flag_indirect_dispatch, flag_store_check,
41 flag_reduced_reflection): Remove.
42 * jcf-dump.c (flag_newer): Remove.
43 * jcf.h (quiet_flag): Remove.
44 * parse.h (quiet_flag): Remove.
46 2010-09-28 Richard Henderson <rth@redhat.com>
48 * lang.c: Include "target.h".
49 (java_eh_personality): Use targetm.except_unwind_info.
50 * Make-lang.in (lang.o): Update deps.
52 2010-09-27 Andrew Haley <aph@redhat.com>
55 * jvgenmain.c (main): Fix arg processing.
57 2010-09-22 Joseph Myers <joseph@codesourcery.com>
59 * jvspec.c (lang_specific_driver): Handle OPT__help instead of
61 * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
62 -dependencies, -encoding, -extdirs, -include-directory,
63 -include-directory=, -output-class-directory,
64 -output-class-directory=, -resource, -resource=,
65 -user-dependencies): New.
67 2010-09-16 Richard Guenther <rguenther@suse.de>
69 * jcf-parse.c (current_file_list): Remove.
70 (java_parse_file): Use build_translation_unit_decl. Adjust.
72 2010-09-03 Joseph Myers <joseph@codesourcery.com>
76 2010-09-03 H.J. Lu <hongjiu.lu@intel.com>
79 * jvgenmain.c (main): Check "-D XXX=YYY".
81 2010-09-02 Joseph Myers <joseph@codesourcery.com>
83 * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
85 2010-09-02 Joseph Myers <joseph@codesourcery.com>
87 * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
88 fCLASSPATH=): Mark as Java options and as aliases.
89 * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
90 (lang_specific_driver): Don't handle options marked as aliases.
91 * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
93 2010-08-22 Joseph Myers <joseph@codesourcery.com>
95 * Make-lang.in (jvspec.o): Update dependencies.
96 * jvspec.c: Include opts.h.
98 (find_spec_file): Do not add leading -specs=.
99 (lang_specific_driver): Use cl_decoded_option structures.
100 * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
101 extdirs, fmain=, s-bc-abi): New options.
103 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
105 * class.c: Use FOR_EACH_VEC_ELT.
107 * jcf-parse.c: Likewise.
108 * resource.c: Likewise.
110 2010-08-16 Joseph Myers <joseph@codesourcery.com>
112 * lang.opt (MD_, MMD_, version): Mark RejectDriver.
114 2010-08-05 David Daney <ddaney@caviumnetworks.com>
116 * class.c (build_utf8_ref): Fix code formatting from previous commit.
118 2010-08-05 David Daney <ddaney@caviumnetworks.com>
120 * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
122 2010-07-27 Joseph Myers <joseph@codesourcery.com>
124 * lang.c (java_handle_option): Update prototype and return value
127 2010-07-27 Joseph Myers <joseph@codesourcery.com>
129 * lang.c (java_option_lang_mask): New.
130 (java_init_options): Update prototype.
131 (LANG_HOOKS_OPTION_LANG_MASK): Define.
133 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
135 * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
140 * jcf-parse.c: Likewise.
141 * typeck.c: Likewise.
142 * verify-glue.c: Likewise.
144 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
146 * boehm.c: Include diagnostic-core.h in every file that includes
149 * constants.c: Likewise.
151 * except.c: Likewise.
153 * jcf-parse.c: Likewise.
154 * mangle.c: Likewise.
155 * mangle_name.c: Likewise.
156 * resource.c: Likewise.
157 * typeck.c: Likewise.
158 * verify-glue.c: Likewise.
160 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
163 * class.c (make_class_data): Cast result of VEC_length calls to int.
165 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
167 * constants.c (build_constants_constructor): Use build_constructor
168 instead of build_constructor_from_list.
169 * class.c (make_method_value): Likewise.
170 (get_dispatch_table): Likewise.
171 (make_class_data): Likewise.
172 (emit_indirect_register_classes): Likewise.
173 (emit_symbol_table): Likewise.
174 (add_assertion_table_entry): Likewise.
175 (emit_assertion_table): Likewise.
176 (make_field_value): Use build_constructor_single instead of
177 build_constructor_from_list.
179 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
181 * java-tree.h (struct lang_type) [catch_classes]: Change type to a
183 * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
184 instead of tree_cons.
185 * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
186 (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
188 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
190 * lang.c: Do not include except.h
191 * except.c: Likewise.
192 (doing_eh): New, moved from except.c (in gcc/) but removed the
194 (maybe_start_try): Update doing_eh call.
195 * Make-lang.in: Update dependencies.
197 2010-06-23 Anatoly Sokolov <aesok@post.ru>
199 * decl.c (java_init_decl_processing): Use double_int_to_tree instead
200 of build_int_cst_wide.
201 * boehm.c (set_bit): Remove.
202 (mark_reference_fields): Use double_int type for 'mask' argument.
203 Use double_int_setbit instead of set_bit.
204 (get_boehm_type_descriptor): Use double_int_setbit instead of
205 set_bit. Use double_int_to_tree instead of build_int_cst_wide.
207 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
209 * gcj.texi: Move to GFDL version 1.3. Fix copyright years.
211 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
213 * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
215 * jcf-parse.c (java_parse_file): Likewise.
216 (process_zip_dir): Likewise.
218 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
219 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
221 * expr.c (add_type_assertion): Likewise.
223 * decl.c (make_binding_level): Likewise.
224 (java_dup_lang_specific_decl): Likewise.
226 * constants.c (set_constant_entry): Likewise.
227 (cpool_for_class): Likewise.
229 * class.c (add_method_1): Likewise.
230 (java_treetreehash_new): Likewise.
232 * java-tree.h (struct lang_type): Add variable_size GTY option.
233 (struct lang_decl): Likewise.
235 * jch.h (struct cpool_entry): Likewise.
237 * java-tree.h (java_treetreehash_create): Remove parameter ggc.
239 * except.c (prepare_eh_table_type): Update
240 java_treetreehash_create call.
242 * class.c (add_method_1): Update java_treetreehash_create call.
243 (java_treetreehash_create): Remove parameter gc. Use
246 2010-06-04 Joseph Myers <joseph@codesourcery.com>
248 * jvspec.c (lang_specific_driver): Use GCC-specific formats in
251 2010-05-30 Steven Bosscher <steven@gcc.gnu.org>
253 * except.c: Include tm.h.
255 2010-05-28 Joseph Myers <joseph@codesourcery.com>
257 * jvspec.c (lang_specific_driver): Use fatal_error instead of
258 fatal. Use warning instead of error for warnings.
260 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
262 * expr.c (get_symbol_table_index): Add spaces in expression.
264 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
266 * java-tree.h (method_entry): Declare. Declare VECs containing it.
267 (struct lang_type): Change type of otable_methods, atable_methods, and
268 itable_methods to VECs. Fix comment for atable_methods.
269 (emit_symbol_table): Take a VEC instead of a tree.
270 (get_symbol_table_index): Take a VEC * instead of a tree *.
271 * class.c (add_table_and_syms): Take a VEC instead of a tree.
272 (emit_symbol_table): Update for changed parameter type.
273 * expr.c (get_symbol_table_index): Likewise.
275 2010-05-27 Steven Bosscher <steven@gcc.gnu.org>
277 * buildings.c: Pretend to be a backend file by undefining
278 IN_GCC_FRONTEND (still need rtl.h here).
280 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
282 * java-tree.h (struct lang_decl_func): Change type of throws_list
284 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
285 of DECL_FUNCTION_THROWS.
286 * class.c (make_method_value): Likewise.
288 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
290 * class.c (utf8_decl_list): Delete.
291 (build_utf8_ref): Remove references to it.
292 * java-tree.h (all_class_list): Delete.
293 (predef_filenames): Delete.
294 (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
296 * jcf-parse.c (parse_roots): Decrease size to 2.
297 (current_file_list): Convert to a VEC.
298 (all_class_list): Declare.
299 (jcf_parse): Adjust for new type of all_class_list.
300 (java_layout_seen_class_methods): Likewise.
301 (predefined_filenames): Declare.
302 (add_predefined_file): Use it.
303 (predefined_filename_p): Likewise.
304 (java_parse_file): Adjust for new type of current_file_list. *
306 2010-05-25 Jakub Jelinek <jakub@redhat.com>
308 * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
312 * java-tree.h (pending_static_fields): New extern declaration.
313 (java_write_globals): New prototype.
314 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
315 * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
316 of a static field push it into pending_static_fields vector.
317 * class.c (pending_static_fields): New variable.
318 (add_field): If static field is not DECL_EXTERNAL, push it into
319 pending_static_fields vector.
320 (java_write_globals): New function.
322 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
324 * expr.c (quick_stack): Change type to a VEC. Update comment.
325 (tree_list_free_list): Delete.
326 (flush_quick_stack): Update for quick_stack type change.
327 (push_value): Likewise.
328 (pop_value): Likewise.
330 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
332 * java-gimplify.c: Do not include tm.h, toplev.h.
333 * typeck.c: Do not include tm.h.
334 * mangle_name.c: Do not include tm.h.
335 * jcf-dump.c: Do not include tm.h, ggc.h.
336 * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
337 * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
339 * jcf-parse.c: Do not include tm.h and tm_p.h.
340 * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
341 target.h, and expr.h.
342 * except.c: Do not include tm.h, rtl.h, function.h.
343 * builtins.c: Do not include convert.h. Explain why RTL headers
344 have to be included here.
345 * verify-glue.c: Do not include tm.h.
346 * jcf-depend.c: Do not include tm.h.
347 * jcf-reader.c: Include ggc.h.
348 * jcf-io.c: Do not include tm.h, toplev.h.
349 * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
351 * lang.c: Do not include rtl.h, expr.h.
352 * Make-lang.in: Update dependencies.
354 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
356 * jcf-parse.c: Include bitmap.h.
357 * Make-lang.in: Update dependencies.
359 2010-05-20 Jakub Jelinek <jakub@redhat.com>
362 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
365 2010-05-19 Anatoly Sokolov <aesok@post.ru>
367 * jcf-parse.c (get_constant): Use double_int_to_tree instead of
368 build_int_cst_wide_type.
370 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
372 * expr.c (pop_arguments): Fix use of undeclared variable.
374 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
376 * expr.c (expand_java_multianewarray): Use build_call_vec instead of
378 (pop_arguments): Return a VEC instead of a tree. Take a method type
379 rather than a list of argument types.
380 (rewrite_rule): Change signature. of rewrite_arglist member.
381 (rewrite_arglist_getcaller): Update signature.
382 (rewrite_arglist_getclass): Likewise.
383 (maybe_rewrite_invocation): Update for rewrite_arglist change.
384 (build_known_method_ref): Take a VEC instead of a tree.
385 (invoke_build_dtable): Likewise.
386 (expand_invoke): Update calls to pop_arguments. Use build_call_vec
387 instead of build_call_list.
388 (build_jni_stub): Use build_call_vec instead of build_call_list.
389 * java-tree.h (maybe_rewrite_invocation): Update declaration.
390 (build_known_method_ref): Likewise.
391 (invoke_build_dtable): Likewise.
393 2010-05-14 Nathan Froyd <froydnj@codesourcery.com>
396 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
397 vector. Move call to build_constructor...
398 (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear
399 TREE_CONSTANT on the constructor.
400 (PUSH_SUPER_VALUE): Change first argument to a vector.
401 (PUSH_FIELD_VALUE): Likewise.
402 * resource.c (compile_resource_data): Update calls to above macros.
403 * constants.c (build_constants_constructor): Likewise.
404 * class.c (build_utf8_ref): Likewise.
405 (make_field_value): Likewise.
406 (make_method_value): Likewise.
407 (add_table_and_syms): New function.
408 (make_class_data): Call it. Update calls to above macros.
409 (build_symbol_table_entry): New function.
410 (build_symbol_entry): Call it. Update calls to above macros.
411 (emit_symbol_table): Likewise.
412 (make_catch_class_record): Update calls to above macros.
413 (build_assertion_table_entry): New function.
414 (add_assertion_table_entry): Call it.
415 (emit_assertion_table): Likewise.
417 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
420 * lang.c (java_handle_option): Add argument kind.
422 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
424 * decl.c (java_init_decl_processing): Remove argument in call to
427 2010-04-07 Jakub Jelinek <jakub@redhat.com>
429 * exception.cc (_Jv_Throw): Avoid set but not used warning.
430 * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
431 sizeof to avoid set but not used warnings.
433 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
435 * lang.c (java_post_options): Constify variable "dot".
437 * jcf-parse.c (set_source_filename): Constify variable "dot".
438 (load_class): Constify variable "separator".
439 Use get_identifier_with_length.
441 * jvspec.c (lang_specific_driver): Constify two variables named "p".
443 2010-01-09 Jakub Jelinek <jakub@redhat.com>
445 * jcf-dump.c (version): Update copyright notice dates.
447 2009-11-28 Jakub Jelinek <jakub@redhat.com>
449 * jvspec.c (lang_specific_driver): Remove unused
450 saw_verbose_flag variable.
451 * jcf-dump.c (main): Remove unused general_purpose_bits
453 * builtins.c (initialize_builtins): Remove unused float_ftype_float
455 * expr.c (java_stack_pop): Remove unused val variable.
456 (build_jni_stub): Remove unused res_type variable.
457 * verify-impl.c (check_field_constant): Remove unused len variable.
459 2009-10-20 Joel Dice <dicej@mailsnare.net>
462 * mangle_name.c (append_unicode_mangled_name): Fix mangling
463 of names with multiple underscores and "U".
464 (unicode_mangling_length): Likewise.
466 2009-10-03 Simon Baldwin <simonb@google.com>
468 * config-lang.in (lang_dirs): Remove zlib.
470 2009-09-28 Richard Henderson <rth@redhat.com>
472 * builtins.c (initialize_builtins): Update call to
473 build_common_builtin_nodes.
474 * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
476 2009-09-14 Richard Henderson <rth@redhat.com>
478 * builtins.c (initialize_builtins): Update call to
479 build_common_builtin_nodes.
480 * decl.c (java_init_decl_processing): Don't call
481 default_init_unwind_resume_libfunc.
482 * except.c: Include tree-iterator.h.
483 (build_exception_object_var): New.
484 (build_exception_object_ref): Use it.
485 (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
486 Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
487 * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
489 2009-09-13 Richard Guenther <rguenther@suse.de>
490 Rafael Avila de Espindola <espindola@google.com>
492 * decl.c (do_nothing): Remove.
493 (java_init_decl_processing): Do not set lang_eh_runtime_type.
494 * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
495 * lang.c (java_eh_personality): New.
496 (java_eh_personality_decl): Likewise.
497 (LANG_HOOKS_EH_PERSONALITY): Define.
499 2009-09-03 Diego Novillo <dnovillo@google.com>
501 * lang.c (lang_hooks): Remove const qualifier.
503 2009-09-01 Jakub Jelinek <jakub@redhat.com>
505 * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
508 2009-09-01 Richard Guenther <rguenther@suse.de>
510 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
511 * java-tree.h (java_mark_addressable): Likewise.
512 * typeck.c (java_mark_addressable): Likewise.
514 2009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
516 * Make-lang.in (java.install-pdf): Install gcj.pdf in
517 $(pdfdir)/gcc, alongside the other manuals.
519 2009-08-12 Andrew Haley <aph@redhat.com>
521 * builtins.c (compareAndSwapInt_builtin): Use
522 flag_use_atomic_builtins.
523 (compareAndSwapLong_builtin): Likewise.
524 (compareAndSwapObject_builtin): Likewise.
525 * jvspec.c: Add flag_use_atomic_builtins.
526 * gcj.texi: Likewise.
527 * java-tree.h: Likewise.
528 * lang.opt: Likewise.
530 2009-08-11 Dodji Seketeli <dodji@redhat.com>
533 * lang.c (put_decl_node): Outputs different level of information
534 depending on the verbosity level.
536 2009-07-31 Andrew Haley <aph@redhat.com>
539 * decl.c (java_replace_references): Set EXPR_LOCATION on all
540 generated expressions.
541 (binding_level.loc): new field.
542 (clear_binding_level): Initialize loc.
543 (set_input_location): New function.
544 (pushlevel): Set new binding_level.loc.
545 (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
546 (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
547 (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
549 2009-07-17 Richard Guenther <rguenther@suse.de>
552 * java-gimplify.c (java_genericize): Do not gimplify here.
553 But replace all local references.
554 (java_gimplify_expr): Do not replace local references here.
555 (java_gimplify_modify_expr): Likewise.
556 * jcf-parse.c (java_parse_file): Do not finalize the CU or
557 optimize the cgraph here.
558 * decl.c (java_replace_reference): Make static.
559 (java_replace_references): New function.
560 (end_java_method): Clear base_decl_map.
561 * java-tree.h (java_replace_references): Declare.
562 (java_replace_reference): Remove.
564 2009-07-14 Taras Glek <tglek@mozilla.com>
565 Rafael Espindola <espindola@google.com>
567 * Make-lang.in (java.install-plugin): New target for
568 installing plugin headers.
570 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
572 * class.c: Replace %J by an explicit location. Update all calls.
574 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
576 * jcf-parse.c: Replace %H by an explicit location. Update all calls.
578 2009-06-29 Andrew Haley <aph@redhat.com>
581 * java-tree.h (cxx_keyword_p): New declaration.
582 * mangle_name.c (utf8_cmp): Move here from mangle.c.
583 (cxx_keywords): Likewise.
584 (cxx_keyword_p): Likewise.
585 (MANGLE_CXX_KEYWORDS): New macro.
586 (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
587 (append_gpp_mangled_name): Likewise.
588 * mangle.c: Move code to mangle_name.c.
589 (mangle_member_name): Don't call cxx_keyword_p.
591 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
593 * java-gimplify.c (java_gimplify_block): New argument to
595 * expr.c (force_evaluation_order): Same.
596 * typeck.c: Add location to build_decl or PUSH_FIELD calls.
605 * java-tree.h (PUSH_FIELD): Add location field.
607 2009-06-09 Ian Lance Taylor <iant@google.com>
609 * verify.h: Remove extern "C".
611 2009-06-07 Ian Lance Taylor <iant@google.com>
613 * jcf-parse.c (handle_constant): Change local variable 'kind' to
616 2009-06-01 Ian Lance Taylor <iant@google.com>
618 * jcf-io.c (find_class): Use CONST_CAST.
620 2009-05-27 Ian Lance Taylor <iant@google.com>
622 * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
624 (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
626 2009-05-26 Ian Lance Taylor <iant@google.com>
628 * Make-lang.in (jvspec.o): Use $(COMPILER).
629 ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
630 (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
632 2009-05-12 Alexandre Oliva <aoliva@redhat.com>
634 * Make-lang.in (GCJ): Renamed to...
637 2009-04-27 Ian Lance Taylor <iant@google.com>
639 * builtins.c (java_builtins): Add casts to enum type.
640 * verify-impl.c (check_class_constant): Add cast to enum type.
641 (check_constant, check_wide_constant): Likewise.
643 2009-04-27 Richard Guenther <rguenther@suse.de>
646 * constants.c (build_constants_constructor): Retain the old
647 pointer type as valid TYPE_POINTER_TO after patching the
648 type of the constant pool decl.
650 2009-04-24 Ian Lance Taylor <iant@google.com>
652 * jcf-parse.c (handle_constant): Add cast to enum type.
654 2009-04-21 Taras Glek <tglek@mozilla.com>
656 * builtins.c: Update GTY annotations to new syntax
658 * java-tree.h: Likewise
662 2009-04-21 Joseph Myers <joseph@codesourcery.com>
664 * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
667 2009-04-18 Ian Lance Taylor <iant@google.com>
669 * verify-impl.c (verify_instructions_0): Add cast to enum type.
671 2009-04-09 Paolo Bonzini <bonzini@gnu.org>
673 * builtins.c (compareAndSwapLong_builtin,
674 compareAndSwapInt_builtin, compareAndSwapObject_builtin,
675 VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
677 2009-03-31 Richard Guenther <rguenther@suse.de>
679 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
680 the first operand of binary and comaprison expressions.
682 2009-03-30 Joseph Myers <joseph@codesourcery.com>
684 PR rtl-optimization/323
685 * lang.c (java_post_options): Set flag_excess_precision_cmdline.
686 Give an error for -fexcess-precision=standard for processors where
687 the option is significant.
689 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
691 * lang.opt: Unify help text for -Wdeprecated.
693 2009-02-03 Jakub Jelinek <jakub@redhat.com>
695 * jcf-dump.c (version): Update copyright notice dates.
697 2009-01-16 Richard Guenther <rguenther@suse.de>
699 PR tree-optimization/38835
701 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
703 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
706 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
708 2008-11-04 Andrew Haley <aph@redhat.com>
711 * jcf-parse.c (java_emit_static_constructor): Don't call
712 cgraph_build_static_cdtor. Rewrite.
714 2008-10-24 Jakub Jelinek <jakub@redhat.com>
716 * Make-lang.in (check-java-subtargets): New target.
718 2008-10-16 David Edelsohn <edelsohn@gnu.org>
721 * Make-lang.in (class.o): Depend on $(TM_P_H).
723 * class.c: Include tm_p.h.
724 * expr.c: Include tm_p.h.
726 2008-10-14 Andrew Haley <aph@redhat.com>
728 * constants.c (build_constant_data_ref): Make sure we only build
729 one copy of the decl for the constant pool.
731 2008-09-22 Andrew Haley <aph@redhat.com>
733 * expr.c (rules): Add new rule for
734 gnu.java.lang.VMCPStringBuilder.toString.
735 (rewrite_rule.new_classname): New field.
736 (maybe_rewrite_invocation): Use new_classname field instead of
737 DECL_CONTEXT (*method_p).
738 Allow rewrite_arglist to be NULL.
740 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
742 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
743 (java_get_callee_fndecl): Kill.
745 2008-09-17 Jan Hubicka <jh@suse.cz>
748 * class.c (add_method_1): Do not initialize DECL_INLINE.
749 (make_local_function_alias): Likewise.
750 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
751 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
753 2008-09-09 Richard Guenther <rguenther@suse.de>
755 * decl.c (build_result_decl): Remove no longer applicable
758 2008-09-05 David Daney <ddaney@avtrex.com>
760 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
762 2008-08-21 David Daney <ddaney@avtrex.com>
764 * class.c (make_class_data): Don't add field_index when
765 flag_reduced_reflection set.
767 2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
769 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
771 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
774 * lang.c (java_handle_option): Replace set_Wunused with
777 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
779 * gcj.texi: Update copyright years. Do not list GPL as
782 2008-07-29 Jakub Jelinek <jakub@redhat.com>
784 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
787 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
790 2008-07-29 Jan Hubicka <jh@suse.cz>
792 * lang.c (java_post_options): Remove handling of flag_no_inline.
794 2008-07-28 Richard Guenther <rguenther@suse.de>
796 Merge from gimple-tuples-branch.
798 2008-07-18 Richard Guenther <rguenther@suse.de>
800 * expr.c: Include tree-iterator.h.
801 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
803 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
805 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
808 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
810 * java-gimplify.c (java_gimplify_expr): Same.
811 (java_gimplify_modify_expr): Same.
812 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
814 2008-05-02 Diego Novillo <dnovillo@google.com>
816 * expr.c (build_java_throw_out_of_bounds_exception): Fix
817 mixed declarations and code.
819 2008-05-02 Doug Kwan <dougkwan@google.com>
821 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
822 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
824 2008-02-19 Diego Novillo <dnovillo@google.com>
826 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
828 * java-gimplify.c (java_gimplify_self_mod_expr): Change
829 gimple_seq arguments to gimple_seq *. Update all users.
831 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
833 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
835 (java_gimplify_self_mod_expr): Same.
836 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
839 2008-07-24 Jan Hubicka <jh@suse.cz>
841 * java/decl.c: Include cgraph.h
842 (end_java_method): Remove non-unit-at-a-time code.
843 (java_mark_decl_local): Likewise; sanity check that we don't touch
846 2008-07-15 Jan Hubicka <jh@suse.cz>
848 * lang.c (java_init_options): Enable unit-at-a-time by default.
850 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
852 * Make-lang.in (jvspec.o): Fix dependencies.
854 2008-07-06 Tom Tromey <tromey@redhat.com>
856 * Make-lang.in (java/parse.o-warn): Remove.
857 (java/jcf-io.o-warn): Remove.
859 2008-07-05 Tom Tromey <tromey@redhat.com>
861 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
862 (compare_path): Remove.
863 (java_or_class_file): Likewise.
864 (memoized_dirlist_entry): Likewise.
865 (memoized_dirlist_hash): Likewise.
866 (memoized_dirlist_lookup_eq): Likewise.
867 (memoized_dirlists): Likewise.
868 (caching_stat): Likewise.
869 (find_class): Use stat.
870 * jcf.h (JCF_USE_SCANDIR): Remove.
872 2008-06-30 Joshua Sumali <jsumali@redhat.com>
874 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
876 (java.uninstall): Likewise.
877 (java.maintainer-clean): Likewise.
878 (aot-compile.pod): New rule.
879 (rebuild-gcj-db.pod): New rule.
880 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
881 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
883 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
885 * Make-lang.in (java/jcf-io.o-warn): New.
887 2008-06-24 Tom Tromey <tromey@redhat.com>
889 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
890 * expr.c (add_type_assertion): Rename argument.
891 (build_java_arrayaccess): Don't name variable 'throw'.
892 (ARRAY_NEW_MULTI): Don't name variable 'class'.
893 * jcf-io.c (find_class): Don't name variable 'class'.
894 * mangle.c (compression_table_add): Don't name variable 'new'.
895 * constants.c (cpool_for_class): Rename argument.
896 (alloc_constant_fieldref): Likewise.
897 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
899 (read_class): Likewise.
900 (parse_zip_file_entries): Likewise.
901 (process_zip_dir): Likewise.
902 * decl.c (java_mark_class_local): Rename argument.
903 * class.c (GEN_TABLE): Use type_name, not typename.
904 (gen_indirect_dispatch_tables): Likewise.
905 (add_field): Rename argument.
906 (is_compiled_class): Likewise.
907 (safe_layout_class): Likewise.
908 (emit_assertion_table): Likewise.
909 * typeck.c (has_method): Rename argument.
911 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
913 * class.c (ident_subst, mangled_classname, unmangle_classname,
914 gen_indirect_dispatch_tables, add_method_1,
915 build_fieldref_cache_entry, make_local_function_alias,
916 layout_class, java_treetreehash_find, java_treetreehash_new,
917 split_qualified_name): Fix for -Wc++-compat.
918 * constants.c (set_constant_entry, cpool_for_class): Likewise.
919 * decl.c (make_binding_level, java_dup_lang_specific_decl,
920 start_java_method): Likewise.
921 * except.c (prepare_eh_table_type): Likewise.
922 * expr.c (type_assertion_hash, note_instructions): Likewise.
923 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
924 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
925 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
927 * jcf-parse.c (reverse, java_read_sourcefilenames,
928 annotation_grow, rewrite_reflection_indexes, java_parse_file,
929 process_zip_dir): Likewise.
930 * jcf-path.c (add_entry, add_path, jcf_path_init,
931 jcf_path_extdirs_arg): Likewise.
932 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
933 * jvgenmain.c (do_mangle_classname): Likewise.
934 * lang.c (put_decl_string): Likewise.
935 * verify-impl.c (make_state_copy, make_state, add_new_state):
938 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
940 * gcj.texi: Expand TABs, remove whitespace from blank lines.
942 2008-06-14 Tom Tromey <tromey@redhat.com>
945 * class.c (build_class_ref): Initialize this_classdollar when
948 2008-05-23 Andrew Haley <aph@redhat.com>
950 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
951 pathname of source file.
953 2008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
955 * jcf-dump.c (print_constant): Use
956 HOST_LONG_LONG_FORMAT.
958 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
960 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
963 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
965 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
966 (build_classdollar_field): Don't set TREE_INVARIANT.
967 (get_dispatch_table): Don't set TREE_INVARIANT.
968 (make_class_data): Don't set TREE_INVARIANT.
969 (build_symbol_entry): Don't set TREE_INVARIANT.
970 (emit_symbol_table): Don't set TREE_INVARIANT.
971 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
972 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
973 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
974 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
976 2008-04-03 Tom Tromey <tromey@redhat.com>
978 * Make-lang.in (java_OBJS): New variable.
980 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
982 * java-tree.h (insert_block): Kill.
983 * decl.c (insert_block): Kill.
985 2008-04-01 Joseph Myers <joseph@codesourcery.com>
987 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
988 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
991 2008-03-27 Tom Tromey <tromey@redhat.com>
993 * Make-lang.in: Revert automatic dependency patch.
995 2008-03-25 Tom Tromey <tromey@redhat.com>
997 * Make-lang.in: Removed most explicit .o targets.
998 (java/jvspec.o): Reduce to variable setting. Moved to java/.
999 ($(GCJ)$(exeext)): Update.
1000 (JAVA_OBJS): New variable.
1001 (JCFDUMP_OBJS): Reformat.
1002 (java_OBJS): New variable.
1003 (java/jvspec.o-warn): Update.
1004 (java/parse.o-warn): Remove.
1005 (JAVA_TREE_H): Remove.
1006 (java/jcf-io.o): Reduce to variable setting.
1007 (ALL_CPPFLAGS): Likewise.
1009 2008-03-12 Paolo Bonzini <bonzini@gnu.org>
1011 * mangle.c (java_mangle_decl): Remove dead check.
1013 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1015 * jcf-parse.c (java_parse_file): Assert binding levels are
1017 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1020 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1022 * jcf-dump.c (version): Update copyright notice dates.
1024 2008-02-29 Tom Tromey <tromey@redhat.com>
1026 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1028 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1030 2008-02-26 Tom Tromey <tromey@redhat.com>
1032 * lang.c (java_post_options): Remove conditional.
1033 * expr.c (expand_byte_code): Remove old location code.
1034 * jcf-parse.c (set_source_filename): Remove old location code.
1035 (give_name_to_class): Likewise.
1036 (jcf_parse): Likewise.
1037 (duplicate_class_warning): Likewise.
1038 (parse_class_file): Likewise.
1039 (java_parse_file): Likewise.
1040 * decl.c (finish_method): Remove old location code.
1041 * class.c (push_class): Remove old location code.
1043 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1046 * Make-lang.in (jc1): Add $(GMPLIBS).
1048 2008-01-23 David Daney <ddaney@avtrex.com>
1050 * class.c (hide) Rename to...
1051 (java_hide_decl) ... this throughout, and make public.
1052 * resource.c (Jr_count): Remove.
1053 (compile_resource_data): Call java_mangle_resource_name to generate
1054 decl name. Make resource decl public and hidden.
1055 * mangle.c (java_mangle_resource_name): New function.
1056 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1059 2008-01-04 Andrew Haley <aph@redhat.com>
1062 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1065 2008-01-03 Andrew Haley <aph@redhat.com>
1068 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1069 we're about to re-layout the type.
1071 2007-12-20 Alexandre Oliva <aoliva@redhat.com>
1073 * lang.c (java_classify_record): Don't return
1074 RECORD_IS_INTERFACE for now.
1076 2007-12-18 Andrew Haley <aph@redhat.com>
1079 * jcf-parse.c (java_parse_file): Remove call to
1080 java_mark_class_local.
1081 (parse_class_file): Reinstate call to java_mark_class_local here.
1082 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1083 already set, call java_mangle_decl() and make_decl_rtl() to
1084 rewrite its name as a hidden alias.
1086 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1089 * lang.c (java_classify_record): New.
1090 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1092 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1095 * decl.c (finish_method): Pass 'false' for the new
1096 allocate_struct_function parameter.
1098 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1100 * expr.c (build_jni_stub): Use the computed jni func type for
1103 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1105 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1107 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1109 * expr.c (type_assertion_hash): Hash type uids rather than
1112 2007-11-17 David Daney <ddaney@avtrex.com>
1113 Andrew Haley <aph@redhat.com>
1115 * constants.c (build_constants_constructor): Use POINTER_SIZE
1116 insead of BITS_PER_WORD in big-endian work around.
1118 2007-11-07 Tom Tromey <tromey@redhat.com>
1121 * gcj.texi (Input Options): Add missing noun.
1123 2007-11-02 Tom Tromey <tromey@redhat.com>
1126 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1127 * zipfile.h (ZIPEMPTYMAGIC): New define.
1129 2007-11-01 Tom Tromey <tromey@redhat.com>
1131 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1132 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1133 (java/jcf-io.o): Depend on zipfile.h.
1135 2007-10-17 Richard Guenther <rguenther@suse.de>
1137 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1140 2007-10-03 Andrew Haley <aph@redhat.com>
1143 * class.c (mangled_classname): Detect and replace illegal
1144 characters in assembly language symbols.
1145 (gen_indirect_dispatch_tables): Call mangled_classname() on
1148 2007-09-27 Jakub Jelinek <jakub@redhat.com>
1150 * lang.c (java_print_error_function): Add third argument.
1152 2007-09-15 Tom Tromey <tromey@redhat.com>
1154 * java-tree.h (struct lang_decl_func) <function_decl_body>:
1156 <init_final>: Likewise.
1157 * lang.c (java_dump_tree): Update.
1158 * java-tree.h (DECL_FUNCTION_BODY): Remove.
1160 2007-09-11 Jan Hubicka <jh@suse.cz>
1162 * decl.c (java_expand_body): Kill.
1163 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1165 2007-09-06 Tom Tromey <tromey@redhat.com>
1167 * jcf-parse.c (parse_class_file): Re-enter the current file.
1169 2007-09-07 Roman Zippel <zippel@linux-m68k.org>
1171 * boehm.c (mark_reference_fields): Move misaligned pointer check
1172 after JREFERENCE_TYPE_P test
1174 2007-09-06 Roman Zippel <zippel@linux-m68k.org>
1176 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1177 if pointer is misaligned.
1179 2007-09-06 Tom Tromey <tromey@redhat.com>
1181 * lang.c (java_post_options): Update.
1182 * jcf-parse.c (set_source_filename): Update.
1183 (give_name_to_class): Update.
1184 (jcf_parse): Update.
1185 (duplicate_class_warning): Update.
1186 (parse_class_file): Update.
1187 (java_parse_file): Update.
1188 * expr.c (expand_byte_code): Update.
1190 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1192 * decl.c (finish_method): Use set_cfun.
1194 2007-09-04 Andrew Haley <aph@redhat.com>
1196 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1197 when using the ARM EABI.
1199 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1201 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1203 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1205 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1207 * jcf.h (JCF_FINISH): Likewise.
1209 2007-08-28 Tom Tromey <tromey@redhat.com>
1211 * Make-lang.in (java.tags): Don't tag '*.y' files.
1213 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1215 * lang.c (java_decl_ok_for_sibcall): Likewise.
1217 2007-08-21 Paul Brook <paul@codesourcery.com>
1218 Nathan Sidwell <nathan@codesourcery.com>
1219 Mark Mitchell <mark@codesourcery.com>
1220 Joseph Myers <joseph@codesourcery.com>
1222 * jcf-dump.c (version): Use pkgversion_string. Update copyright
1225 2007-08-20 Richard Guenther <rguenther@suse.de>
1227 * lang.c (java_tree_inlining_walk_subtrees): Remove.
1228 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1230 2007-08-17 Tom Tromey <tromey@redhat.com>
1232 * typeck.c (find_method_in_interfaces): Update.
1233 * jcf-parse.c (load_class): Update.
1234 * java-gimplify.c (java_gimplify_component_ref): Removed.
1235 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
1237 (java_gimplify_expr): Update.
1238 * decl.c (java_init_decl_processing): Update.
1239 * class.c (set_constant_value): Update.
1240 (make_class_data): Update.
1241 (finish_class): Update.
1242 (build_static_field_ref): Update.
1243 (is_compiled_class): Update.
1244 (maybe_layout_super_class): Update.
1245 (layout_class): Update.
1246 (layout_class_method): Update.
1247 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1248 (lang_decl_var) <am, final_iud, cif>: Removed fields.
1249 (lang_decl_func) <init_calls_this>: Removed field.
1250 (lang_type) <dot_class, verify_method>: Removed fields.
1251 (FIELD_NESTED_ACCESS): Removed.
1252 (FIELD_NESTED_ACCESS_P): Removed.
1253 (DECL_FIELD_FINAL_IUD): Removed.
1254 (DECL_LOCAL_FINAL_IUD): Removed
1255 (LOCAL_FINAL_P): Removed.
1256 (FINAL_VARIABLE_P): Removed.
1257 (CLASS_FINAL_VARIABLE_P): Removed.
1258 (DECL_BIT_INDEX): Removed.
1259 (DECL_INIT_CALLS_THIS): Removed.
1260 (FIELD_LOCAL_ALIAS): Removed.
1261 (FIELD_LOCAL_ALIAS_USED): Removed.
1262 (FIELD_THISN): Removed.
1263 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1264 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1265 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1266 (TYPE_DOT_CLASS): Removed.
1267 (TYPE_VERIFY_METHOD): Removed.
1268 (ID_CLASSDOLLAR_P): Removed.
1269 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1271 (classdollar_identifier_node): Removed.
1272 (TYPE_UNKNOWN): Removed.
1273 (CLASS_FROM_SOURCE_P): Removed.
1274 * expr.c (build_jni_stub): Update.
1275 (force_evaluation_order): Update.
1276 (build_java_empty_stmt): Update.
1277 (build_class_init): Update.
1278 (java_stack_swap): Update.
1279 (build_jni_stub): Update.
1281 2007-08-17 Tom Tromey <tromey@redhat.com>
1283 * java-tree.h (LABEL_TYPE_STATE): Removed.
1284 (load_type_state): Removed.
1285 (LABEL_PC): Removed.
1286 (LABEL_VERIFIED): Removed.
1287 (type_states): Declare.
1288 * expr.c (type_states): New global.
1289 (load_type_state): Now static. Use type_states. Changed
1291 (lookup_label): Don't set LABEL_PC.
1292 (expand_byte_code): Don't use LABEL_VERIFIED.
1293 (note_instructions): Initialize type_states.
1294 * verify-glue.c (vfy_note_stack_depth): Rewrote.
1295 (vfy_note_stack_type): Use type_states.
1296 (vfy_note_local_type): Likewise.
1298 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1300 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1301 * jcf.h (JCF_FINISH): Likewise.
1303 2007-07-31 Nick Clifton <nickc@redhat.com>
1305 * java-gimplify.c: Change copyright header to refer to version 3
1306 of the GNU General Public License and to point readers at the
1307 COPYING3 file and the FSF's license web page.
1308 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1309 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1310 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1311 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1312 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1313 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1314 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1316 2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1318 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1320 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1322 * lang.c (java_get_callee_fndecl): Constify.
1324 2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1326 * mangle.c (set_type_package_list): Constify.
1327 * verify-glue.c (vfy_make_string): Delete.
1328 * verify.h (vfy_make_string): Likewise.
1330 2007-07-26 Tom Tromey <tromey@redhat.com>
1332 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1333 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1334 EXIT_BLOCK_LABELED_BLOCK): Likewise.
1335 * lang.c (java_tree_inlining_walk_subtrees): Update.
1336 (java_dump_tree): Likewise.
1337 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1339 * decl.c (push_labeled_block, pop_labeled_block): Remove.
1340 * java-gimplify.c (java_gimplify_labeled_block_expr,
1341 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1342 (java_gimplify_expr): Update.
1344 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1346 * class.c (java_treetreehash_hash, java_treetreehash_compare):
1348 * expr.c (type_assertion_eq): Likewise.
1349 * jcf-io.c (compare_path): Likewise.
1350 * jcf-parse.c (cmpstringp): Likewise.
1351 * verify-impl.c (get_one_type, compute_argument_types,
1352 compute_return_type): Likewise.
1354 2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1358 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1360 2007-07-12 Richard Guenther <rguenther@suse.de>
1362 * expr.c (expand_java_return): RETURN_EXPR has void type.
1363 (build_jni_stub): Likewise. Use a comparison against zero
1364 for null-pointer test in COND_EXPR.
1365 (build_field_ref): Build POINTER_PLUS_EXPR with correct
1366 type. Convert result instead.
1367 (build_invokevirtual): Likewise.
1369 2007-07-09 Geoffrey Keating <geoffk@apple.com>
1372 * lang.c (java_init): Remove setting of force_align_functions_log.
1373 * class.c (add_method_1): Set DECL_ALIGN of non-static method
1374 to cope with ptrmemfunc_vbit_in_pfn.
1376 2007-07-03 David Daney <ddaney@avtrex.com>
1378 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
1380 (doc/gcj.dvi): Same.
1381 (doc/gcj.pdf): Same.
1382 (java/index.html): Same.
1384 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1386 * class.c (make_class_data): Build the index in sizetype.
1387 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1388 adding to a pointer type.
1389 (build_symbol_entry): Likewise.
1390 * expr.c (build_java_arrayaccess): Likewise.
1391 (build_field_ref): Likewise.
1392 (build_known_method_ref): Likewise.
1393 (build_invokevirtual): Likewise.
1394 * except.c (build_exception_object_ref): Do a
1395 NEGATIVE and then a POINTER_PLUS_EXPR instead
1398 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
1400 * typeck.c (java_signed_type): Remove.
1401 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1402 * java-tree.h (java_signed_type): Remove.
1404 2007-05-18 Geoffrey Keating <geoffk@apple.com>
1406 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1407 (print_constant): Likewise.
1409 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
1411 * expr.c (build_java_binop): Use unsigned_type_for instead of
1413 * java-tree.h (java_unsigned_type): Remove.
1414 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1415 * typeck.c (java_unsigned_type): Remove.
1417 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1419 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1420 instead of checking GIMPLE_STMT_P in chain_next.
1422 2007-04-06 Colin Walters <walters@redhat.com>
1424 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1425 * jcf-io.c (open_class): Copy 'filename'.
1427 2007-04-03 Andrew Haley <aph@redhat.com>
1429 * jvgenmain.c (main): Change main to use class$, not class$$.
1430 (do_mangle_classname): Likewise.
1431 * class.c (hide): New function.
1432 (add_field): Hide everything that shouldn't be visible outside a
1434 (build_static_class_ref): Likewise.
1435 (build_classdollar_field): Likewise.
1436 (make_class_data): Likewise.
1437 (layout_class_method): Likewise.
1438 * expr.c (special_method_p): New function.
1440 * class.c (push_class): Don't bogusly guess the source filename.
1441 * jcf-parse.c (give_name_to_class): Don't set input_location from
1442 DECL_ARTIFICIAL decls.
1444 2007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
1446 * typeck.c (java_signed_or_unsigned_type): Removed.
1447 (java_signed_type): use get_signed_or_unsigned_type instead of
1448 java_signed_or_unsigned_type.
1449 (java_unsigned_type): Ditto.
1450 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1451 * java-tree.h (java_signed_or_unsigned_type): Removed.
1453 2007-03-26 Tom Tromey <tromey@redhat.com>
1455 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1456 (java.maintainer-clean): Likewise.
1457 (java.install-man): Likewise.
1458 (.INTERMEDIATE): Removed grmiregistry.pod.
1459 (grmiregistry.pod): Removed.
1460 * gcj.texi (Invoking gcjh): Removed.
1461 (Invoking gjnih): Likewise.
1462 (Invoking grmiregistry): Likewise.
1463 (direntry): Updated.
1465 (which-gcj): Removed.
1467 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1469 * Make-lang.in: Add install-pdf target as copied from
1470 automake v1.10 rules.
1472 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
1474 * gcj.texi: Standardize title page.
1476 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
1478 * class.c: Fix a comment typo.
1480 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1481 Brooks Moses <brooks.moses@codesourcery.com>
1482 Lee Millward <lee.millward@codesourcery.com>
1484 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
1486 (BUILD_MONITOR_EXIT): Likewise.
1488 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
1489 (java_gimplify_modify_expr): Likewise.
1491 * class.c (cache_this_class_ref): Use build_call_expr.
1492 (build_static_field_ref): Likewise.
1493 (emit_indirect_register_classes): Likewise.
1494 (emit_register_classes): Likewise.
1496 * resource.c (write_resource_constructor): Use build_call_expr.
1498 * builtins.c (builtin_creator_function): Change interpretation of
1499 the second parameter to be the whole CALL_EXPR instead of the arglist.
1500 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
1501 (min_builtin): Likewise.
1502 (abs_builtin): Likewise.
1503 (java_build_function_call_expr): Likewise.
1504 (convert_real): Likewise.
1505 (UNMARSHAL3): Likewise.
1506 (UNMARSHAL4): Likewise.
1507 (UNMARSHAL5): Likewise.
1508 (build_arglist_for_builtin): Delete. Fix callers to use
1509 build_call_expr instead.
1510 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
1512 (compareAndSwapInt_builtin): Likewise.
1513 (compareAndSwapLong_builtin): Likewise.
1514 (compareAndSwapObject_builtin): Likewise.
1515 (putVolatile_builtin): Likewise.
1516 (getVolatile_builtin): Likewise.
1517 (VMSupportsCS8_builtin): Likewise.
1518 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
1521 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
1522 (build_java_throw_out_of_bounds_exception): Likewise.
1523 (java_check_reference): Likewise.
1524 (build_java_arraystore_check): Likewise.
1525 (build_newarray): Likewise.
1526 (build_anewarray): Likewise.
1527 (expand_java_multinewarray): Use build_call_list instead of build3.
1528 (build_java_monitor): Use build_call_nary instead of build3.
1529 (java_create_object): Likewise.
1530 (expand_java_NEW): Likewise.
1531 (build_instanceof): Likewise.
1532 (expand_java_CHECKCAST): Likewise.
1533 (build_java_soft_divmod): Likewise.
1534 (build_java_binop): Likewise.
1535 (build_field_ref): Likewise.
1536 (build_class_init): Likewise.
1537 (rewrite_arglist_getcaller): Use build_call_expr.
1538 (build_invokeinterface): Use build_call_nary instead of build3.
1539 (expand_invoke): Use build_call_list instead of build3.
1540 (build_jni_stub): Use build_call_nary, build_call_list, or
1541 build_call_expr instead of build3.
1542 (expand_java_field_op): Use build_call_expr instead of build3.
1543 (force_evaluation_order): Use new CALL_EXPR accessors.
1545 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
1547 2007-02-15 David Daney <ddaney@avtrex.com>
1549 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
1550 (java.maintainer-clean):Add gc-analyze.1.
1551 (.INTERMEDIATE): Add gc-analyze.pod.
1552 (gc-analyze.pod): New rule.
1553 (java.install-man): Install gc-analyze.1
1554 * gcj.texi: Add new section for the gc-analyze program.
1556 2007-02-07 Andrew Haley <aph@redhat.com>
1558 * class.c (uncache_this_class_ref): New.
1559 * expr.c (build_jni_stub): Initialize the class.
1560 (expand_byte_code): Call uncache_this_class_ref after generating
1563 2007-02-06 Tom Tromey <tromey@redhat.com>
1566 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
1568 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
1570 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
1572 2007-02-02 Andrew Haley <aph@redhat.com>
1574 * expr.c (expand_byte_code): Call cache_this_class_ref() and
1575 cache_cpool_data_ref().
1576 Set TYPE_CPOOL_DATA_REF.
1577 (cache_cpool_data_ref): New function.
1578 * constants.c (build_ref_from_constant_pool): Remove special-case
1579 code for flag_indirect_classes.
1580 (build_constant_data_ref): Move special-case code for
1581 flag_indirect_classes here from build_ref_from_constant_pool.
1582 * decl.c (finish_method): Move class initialization from here to
1583 cache_this_class_ref.
1584 * class.c (cache_this_class_ref): New function.
1585 (build_class_ref): Use this_classdollar for the ouput class.
1587 2007-02-02 David Daney <ddaney@avtrex.com>
1589 * class.c (is_compiled_class): Move check to avoid reloading
1591 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
1594 2007-02-01 Andrew Haley <aph@redhat.com>
1597 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
1599 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
1601 * class.c, jcf-parse.c: Fix comment typos.
1603 2007-01-30 Tom Tromey <tromey@redhat.com>
1605 * gcj.texi (Strings): Fix documentation for JvNewString.
1607 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1609 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
1612 2007-01-30 Ben Elliston <bje@au.ibm.com>
1614 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
1616 2007-01-29 Tom Tromey <tromey@redhat.com>
1619 * jvspec.c (lang_specific_driver): Handle separate -I argument.
1620 * lang.opt (-I): Add 'Separate'.
1622 2007-01-29 Andrew Haley <aph@redhat.com>
1624 * class.c (add_method_1): Mark fndecl as external unless we are
1625 compiling it into this object file.
1627 2007-01-24 Andrew Haley <aph@redhat.com>
1629 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
1630 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
1632 2007-01-22 Andrew Haley <aph@redhat.com>
1634 * builtins.c (VMSupportsCS8_builtin): New function.
1636 2007-01-23 Andrew Pinski <pinskia@gmail.com>
1639 * jcf-io.c (opendir_in_zip): Close the file
1640 and free zipf before returning after an error.
1642 2007-01-16 Tom Tromey <tromey@redhat.com>
1644 * java-tree.def: Added copyright header.
1646 2007-01-15 Tom Tromey <tromey@redhat.com>
1648 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
1650 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
1652 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
1653 (EXPR_WFL_NODE): Likewise.
1654 (EXPR_WFL_LINECOL): Likewise.
1655 (EXPR_WFL_FILENAME): Likewise.
1656 (EXPR_WFL_LINENO): Likewise.
1657 (build_expr_wfl, expr_add_location): Don't declare.
1658 (build_unknown_wfl): Removed.
1659 (EXPR_WFL_FILENAME_NODE): Removed.
1660 (EXPR_WFL_COLNO): Removed.
1661 (EXPR_WFL_SET_LINECOL): Removed.
1662 (DECL_FUNCTION_WFL): Removed.
1663 (DECL_FIELD_FINAL_WFL): Removed.
1664 (struct lang_decl_func) <wfl>: Removed field.
1665 <called_constructor>: Likewise.
1666 <inner_access>: Likewise.
1667 (struct lang_decl_var) <wfl>: Removed field.
1668 (DECL_CONSTRUCTOR_CALLS): Removed.
1669 (DECL_FUNCTION_ACCESS_DECL): Likewise.
1670 (DECL_FUNCTION_INNER_ACCESS): Likewise.
1671 (DECL_SPECIFIC_COUNT): Likewise.
1672 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
1673 * expr.c (build_expr_wfl): Removed.
1674 (expr_add_location): Likewise.
1676 2007-01-12 Tom Tromey <tromey@redhat.com>
1678 * jcf-dump.c (main): Updated call to find_class.
1679 * lang.c (java_init): Removed dead code.
1680 * jcf-parse.c (read_class): Don't use java_source field. Removed
1682 (parse_zip_file_entries): Don't use java_source field.
1683 (process_zip_dir): Likewise.
1684 (jcf_parse): Removed dead code.
1685 (java_parse_file): Likewise.
1686 (read_class): Updated call to find_class.
1687 * jcf-io.c (find_class): Don't use java_source field. Removed
1688 'source_ok' argument, .java logic.
1689 * jcf.h (JCF) <java_source>: Removed field.
1690 (JCF_ZERO): Updated. (find_class): Updated.
1691 * decl.c: Removed dead code.
1692 * class.c: Removed dead code.
1694 2007-01-11 Tom Tromey <tromey@redhat.com>
1696 * typeck.c (convert): Don't use flag_emit_class_files.
1697 * lang.c (java_post_options): Don't use flag_emit_class_files.
1698 (java_handle_option): Don't use flag_extraneous_semicolon or
1700 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
1701 flag_emit_class_files.
1702 (load_class): Likewise.
1703 * java-tree.h (flag_emit_class_files): Don't declare.
1704 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
1705 (flag_extraneous_semicolon): Don't declare.
1706 (flag_not_overriding): Likewise.
1707 (flag_static_local_jdk1_1): Likewise.
1708 (flag_redundant): Likewise.
1709 * expr.c (build_newarray): Don't use flag_emit_class_files.
1710 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
1711 flag_emit_class_files.
1712 (build_class_ref): Likewise.
1713 * builtins.c (check_for_builtin): Don't use
1714 flag_emit_class_files.
1716 2007-01-10 Tom Tromey <tromey@redhat.com>
1718 * lang.c (java_can_use_bit_fields_p): Removed.
1719 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
1721 2007-01-09 Andrew Haley <aph@redhat.com>
1723 * expr.c (build_java_arrayaccess): Rewrite to generate array
1724 access in canonical form.
1725 (expand_java_arraystore): Use build_fold_addr_expr() on address of
1728 2007-01-03 Andrew Haley <aph@redhat.com>
1731 * expr.c (expand_java_field_op): If we're initializing a field's
1732 declaring interface we should not also initialize the class
1733 context in which it was referenced.
1735 2007-01-02 Tom Tromey <tromey@redhat.com>
1737 * java-tree.h (compiling_from_source, current_encoding,
1738 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
1739 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
1740 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
1741 JTI_WFL_OPERATOR): Removed
1742 (finit_identifier_node, instinit_identifier_node,
1743 length_identifier_node, super_identifier_node,
1744 continue_identifier_node, access0_identifier_node, wfl_operator):
1746 (cyclic_inheritance_report,
1747 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
1748 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
1749 DECL_FIXED_CONSTRUCTOR_P): Removed.
1750 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
1752 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
1753 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
1754 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
1755 import_list, import_demand_list>: Removed.
1756 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
1757 cxx_keyword_p): Removed.
1758 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
1759 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
1760 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
1761 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
1762 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
1763 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
1764 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
1765 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
1766 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
1767 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
1768 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
1769 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
1770 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
1771 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
1772 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
1773 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
1774 java_parse_abort_on_error, extract_field_decl): Removed.
1776 * lang.c: (compiling_from_source, current_encoding): Removed.
1777 (java_handle_option): Ignore -fencoding.
1778 * parse.h: Don't include lex.h.
1779 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
1780 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
1781 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
1782 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
1783 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
1784 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
1785 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
1786 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
1787 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
1788 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
1789 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
1790 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
1791 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
1792 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
1793 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
1794 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
1795 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
1796 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
1797 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
1798 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
1799 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
1800 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
1801 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
1802 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
1803 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
1804 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
1805 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
1806 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
1807 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
1808 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
1809 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
1810 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
1811 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
1812 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
1813 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
1814 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
1815 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
1816 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
1817 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
1818 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
1819 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
1820 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
1821 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
1822 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
1823 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
1824 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
1825 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
1826 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
1827 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
1828 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
1829 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
1830 SET_CPC_STATIC_INITIALIZER_STMT,
1831 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
1832 java_complete_class, java_check_circular_reference,
1833 java_fix_constructors, java_layout_classes, java_reorder_fields,
1834 java_method_add_stmt, java_get_line_col, reset_report,
1835 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
1836 java_finish_classes, ctxp, ctxp_for_generation,
1837 ctxp_for_generation_last): Removed.
1838 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
1839 * mangle.c (utf8_cmp): New function.
1840 (cxx_keywords): New global.
1841 (cxx_keyword_p): New function.
1842 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
1843 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
1844 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
1845 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
1846 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
1847 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
1848 * Make-lang.in (java.srcextra): Do nothing.
1849 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
1850 (JAVA_OBJS): Don't mention deleted files.
1851 (java.mostlyclean): Likewise.
1852 (java.clean): Likewise.
1853 (JAVA_LEX_C): Removed.
1854 (buffer.o, check-init.o, parse.o): Remove unused targets.
1855 (typeck.o): Updated.
1856 * jcf-parse.c (read_class): Comment out unused code.
1857 (java_layout_seen_class_methods): New function.
1858 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
1860 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
1861 (init_jcf_parse): Removed.
1862 * config-lang.in (gtfiles): Remove deleted files.
1863 * decl.c (java_init_decl_processing): Don't initialize
1864 finit_identifier_node, instinit_identifier_node,
1865 length_identifier_node, super_identifier_node,
1866 continue_identifier_node, access0_identifier_node. Don't call
1868 * class.c (cyclic_inheritance_report): New global.
1869 (add_method_1): Don't use
1870 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
1871 (maybe_layout_super_class): Comment out code.
1872 (safe_layout_class): New function.
1873 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
1874 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
1875 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
1876 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
1877 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
1878 (java_gimplify_case_expr): Removed.
1879 (java_gimplify_default_expr): Likewise.
1880 (java_gimplify_new_array_init): Likewise.
1882 * keyword.gperf, keyword.h: Removed.
1883 * chartables.h: Removed.
1884 * check-init.c: Removed.
1885 * buffer.c, buffer.h: Removed.
1886 * convert.h: Removed.
1887 * gen-table.pl: Removed.
1888 * lex.c, lex.h: Removed.
1890 2007-01-02 Andrew Haley <aph@redhat.com>
1892 * expr.c (expand_java_arraystore): Make sure we perform a bounds
1893 check at runtime before we perform a type check.
1895 2006-12-19 Andrew Haley <aph@redhat.com>
1897 * decl.c: Bump minor BC ABI version.
1899 2006-12-13 Gary Benson <gbenson@redhat.com>
1901 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
1903 2006-12-12 Tom Tromey <tromey@redhat.com>
1905 * lang-specs.h: Pass -M options to jc1.
1906 * jcf-depend.c (jcf_dependency_add_file): Don't emit
1909 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
1911 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
1913 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
1915 * lang-specs.h: Pass '%U'-based options as separate arguments.
1917 2006-12-05 Tom Tromey <tromey@redhat.com>
1920 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
1922 * class.c (add_field): Handle ACC_SYNTHETIC.
1923 (add_method_1): Likewise. Handle bridge and varargs.
1924 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
1926 (set_class_decl_access_flags): Handle synthetic and annotation.
1927 * java-tree.h (METHOD_BRIDGE): New macro.
1928 (METHOD_VARARGS): Likewise.
1929 (TYPE_SYNTHETIC): Likewise.
1930 (TYPE_ANNOTATION): Likewise.
1931 (lang_type): New fields 'synthetic' and 'annotation'.
1932 (lang_decl_func): New fields 'varargs' and 'bridge'.
1934 2006-12-04 Andrew Haley <aph@redhat.com>
1936 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
1939 2006-11-29 Gary Benson <gbenson@redhat.com>
1941 * expr.c (rewrite_arglist_getcaller): Reorder.
1943 2006-11-29 Andrew Haley <aph@redhat.com>
1945 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
1946 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
1948 2006-11-23 Andrew Haley <aph@redhat.com>
1950 * expr.c (rewrite_arglist_getcaller): New.
1951 (rewrite_arglist_getclass): Fix indentation.
1952 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
1953 gnu.classpath.VMStackWalker.getCallingClassLoader().
1954 * builtins.c (initialize_builtins): Remove duplicate def'n of
1956 Add __builtin_return_address.
1958 2006-11-22 Andrew Haley <aph@redhat.com>
1960 * jcf-reader.c (get_attribute): Mark attr_type unused.
1962 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
1964 2007-01-08 Richard Guenther <rguenther@suse.de>
1966 * lex.c (do_java_lex): Use build_int_cst_wide_type.
1967 * jcf-parse.c (get_constant): Likewise.
1969 2006-11-12 Jan Hubicka <jh@suse.cz>
1971 * resource.c (compile_resource_data): Update for new varpool names.
1972 * java/class.c (build_utf8_ref): Likewise.
1974 2006-11-12 David Daney <ddaney@avtrex.com>
1977 * typeck.c (build_java_array_type): Increase buffer sizes.
1979 2006-11-11 Richard Guenther <rguenther@suse.de>
1981 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
1982 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1984 2006-11-06 Andrew Haley <aph@redhat.com>
1986 * java-tree.h (CONSTANT_LazyFlag): New.
1987 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
1988 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
1990 (handle_constant): Return 0 for dummy cpool entries.
1991 Handle constants of kind Class.
1992 Handle constants of kind NameAndType.
1993 (handle_enclosingmethod_attribute): New.
1994 (handle_signature_attribute): New.
1995 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
1996 (HANDLE_SIGNATURE_ATTRIBUTE): New.
1997 (handle_constant): Use unmangle_classname()rather than calling
1998 identifier_subst() directly.
2000 2006-11-02 Andrew Haley <aph@redhat.com>
2002 * java-tree.h (FIELD_ENUM): New.
2003 (lang_decl_var.field_enum): New.
2004 (lang_type.enum_class): New.
2006 * class.c (set_class_decl_access_flags): Handle enum types.
2007 (add_field): Handle enum fields.
2008 (get_access_flags_from_decl): Likewise.
2010 * class.c (make_class_data): Put reflection_data into rodata.
2012 2006-11-01 Andrew Haley <aph@redhat.com>
2014 * jcf-parse.c (field_offsets, bit_obstack): New variables.
2015 (jcf_parse): Write end marker to annotation_data.
2016 (java_parse_file): Create field_offsets bitmap. Destroy it.
2017 (annotation_grow, annotation_rewrite_byte)
2018 (annotation_rewrite_short, annotation_rewrite_int)
2019 (annotation_read_short, annotation_write_byte)
2020 (annotation_write_short, annotation_write_int)
2021 (handle_long_constant, handle_constant, handle_element_value)
2022 (handle_annotation, handle_annotations)
2023 (handle_annotation_attribute, rewrite_reflection_indexes)
2024 (handle_member_annotations, handle_parameter_annotations)
2025 (handle_default_annotation): New functions.
2026 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2027 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2028 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2029 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2030 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2031 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
2032 (TYPE_REFLECTION_DATA): New.
2033 (TYPE_REFLECTION_DATASIZE): New.
2034 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2036 * jcf-reader.c (get_attribute): Pass field/method index and
2037 attribute type to get_attribute().
2038 * constants.c (find_class_or_string_constant): Make nonstatic.
2039 (cpool_for_class): Likewise.
2040 (build_constants_constructor): Separate string and scalar types.
2041 * class.c (make_class_data): Generate field_indexes permutation.
2042 Pass it to rewrite_reflection_indexes().
2043 (make_class_data): Generate constructor for reflection_data field.
2045 2006-10-20 Tom Tromey <tromey@redhat.com>
2047 * gcj.texi (Top): Don't mention jv-scan.
2048 (Invoking gcj): Likewise.
2049 (Invoking gcjh): Likewise.
2050 (Invoking gjnih): Likewise.
2051 (Invoking gij): Likewise.
2052 (Invoking gcj-dbtool): Likewise.
2053 (Invoking jv-scan): Removed.
2054 * parse-scan.y: Removed.
2055 * jv-scan.c: Removed.
2056 * config-lang.in (stagestuff): Don't mention jv-scan.
2057 * Make-lang.in (java): Removed jv-scan.
2058 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2059 (JVSCAN_OBJS): Removed.
2060 (jv-scan$(exeext)): Likewise.
2061 (JAVA_MANFILES): Removed jv-scan.1.
2062 (java.uninstall): Don't mention jv-scan.
2063 (java.mostlyclean): Likewise.
2064 (java.maintainer-clean): Likewise.
2065 (.INTERMEDIATE): Likewise.
2066 (java/jv-scan.o): Removed.
2067 (jv-scan.pod): Likewise.
2068 (java.srcextra): Don't mention parse-scan.c.
2069 (java.mostlyclean): Likewise.
2070 (java/parse-scan.c): Removed.
2071 (java/parse-scan.o-warn): Removed.
2072 (java/parse-scan.o): Removed.
2074 2006-10-20 Tom Tromey <tromey@redhat.com>
2076 * lang.c (java_handle_option): Don't use
2077 jcf_write_base_directory.
2078 * jcf.h (jcf_write_base_directory): Removed.
2079 * parse.y (java_expand_classes): Don't call write_classfile.
2080 * config-lang.in (gtfiles): Removed jcf-write.c.
2081 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2082 (java/jcf-write.o): Removed.
2083 * jcf-parse.c (parse_class_file): Don't call write_classfile.
2084 * java-tree.h (write_classfile): Removed declaration.
2085 * jcf-write.c: Removed.
2087 2006-10-20 Tom Tromey <tromey@redhat.com>
2089 * Make-lang.in (java): Removed gjnih, gcjh.
2090 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2091 (GCJH_OBJS): Removed.
2092 (GJNIH_OBJS): Likewise.
2093 (gjnih$(exeext)): Likewise.
2094 (gcjh$(exeext)): Likewise.
2095 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2096 (java.install-common): Don't special case gcjh.
2097 (java.uninstall): Don't mention gcjh, gjnih.
2098 (java.mostlyclean): Likewise.
2099 (java.maintainer-clean): Likewise.
2100 (.INTERMEDIATE): Likewise.
2101 (gcjh.pod): Removed.
2102 (gjnih.pod): Likewise.
2103 (GCJH_TARGET_INSTALL_NAME): Removed.
2104 (java/gjavah-jni.o): Removed.
2105 (java/gjavah.o): Likewise.
2106 * config-lang.in (stagestuff): Removed gjnih, gcjh.
2107 * gjavah.c: Removed.
2109 2006-10-17 Tom Tromey <tromey@redhat.com>
2111 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2114 2006-10-17 Tom Tromey <tromey@redhat.com>
2116 * jvgenmain.c (main): Handle -findirect-dispatch.
2117 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2120 2006-10-06 Andrew Haley <aph@redhat.com>
2122 * builtins.c (compareAndSwapInt_builtin): Check that we really do
2123 have a compare_and_swap builtin.
2124 (compareAndSwapLong_builtin): Likewise.
2125 (compareAndSwapObject_builtin): Likewise.
2127 2006-10-04 Andrew Haley <aph@redhat.com>
2129 * builtins.c (java_builtins): Add compareAndSwapInt,
2130 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2131 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2132 putObjectVolatile, getObjectVolatile, getIntVolatile,
2133 getLongVolatile, getLong.
2134 (UNMARSHAL3): New macro.
2135 (UNMARSHAL4): Likewise.
2136 (UNMARSHAL5): Likewise.
2137 (build_arglist_for_builtin): New function.
2138 (build_addr_sum, build_check_this): New functions.
2139 (putObject_builtin. compareAndSwapInt_builtin,
2140 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2141 putVolatile_builtin, getVolatile_builtin): New builtins.
2143 2006-06-08 Andrew Haley <aph@redhat.com>
2145 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2146 get_symbol_table_index().
2147 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2149 (build_known_method_ref): New arg: special. Pass it to
2150 get_symbol_table_index.
2151 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2153 (build_invokevirtual): New arg: special. Pass it to
2154 get_symbol_table_index.
2155 (expand_invoke): New variable: special.
2156 Pass it to maybe_rewrite_invocation().
2157 Pass it to build_known_method_ref().
2158 * class.c (build_symbol_entry): Add new arg: special. Use it to
2159 build the symbol table conbstructor.
2160 (emit_symbol_table): Extract SPECIAL from the method list and pass
2161 it to build_symbol_entry().
2162 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2163 special accordingly.
2165 2006-09-08 Andrew Haley <aph@redhat.com>
2167 * class.c (layout_class_method): Use build_java_signature, not
2168 build_java_argument_signature. Use lookup_java_method, not
2169 lookup_argument_method.
2171 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2172 Bryce McKinlay <bryce@mckinlay.net.nz>
2174 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2176 2006-07-18 Tom Tromey <tromey@redhat.com>
2178 * lang.opt: Added missing -W options.
2180 2006-07-12 Tom Tromey <tromey@redhat.com>
2183 * lang-specs.h: Pass '%U'-based options as separate arguments.
2184 Use -faux-classpath.
2185 * lang.c (java_handle_option): Handle OPT_faux_classpath.
2186 * lang.opt (faux-classpath): New option.
2188 2006-07-07 Tom Tromey <tromey@redhat.com>
2190 * class.c (make_class_data): Set value for reflection_data field.
2191 * decl.c (java_init_decl_processing): Add reflection_data field.
2193 2006-07-07 Tom Tromey <tromey@redhat.com>
2195 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2197 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2199 2006-07-07 Andrew Haley <aph@redhat.com>
2201 * jcf-parse.c (set_source_filename): Don't check for
2202 CLASS_FROM_CURRENTLY_COMPILED_P.
2205 2006-07-07 Andrew Haley <aph@redhat.com>
2207 * java-tree.h (java_read_sourcefilenames): Declare.
2208 * lang.c (java_handle_option): Call java_read_sourcefilenames().
2209 * lang.opt (fsource-filename): New opt.
2210 * lang-specs.h: Add -fsource-filename.
2211 * jcf-parse.c (num_files, filenames): New variables.
2212 (reverse, cmpstringp, java_read_sourcefilenames,
2213 find_sourcefile): New.
2214 (set_source_filename): Call find_sourcefile to find the real name
2217 2006-06-27 Tom Tromey <tromey@redhat.com>
2219 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2220 Signature, LocalVariableTypeTable, annotation attributes.
2221 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2222 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2223 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2224 (HANDLE_METHOD): Likewise.
2225 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2226 (print_annotation): New function.
2227 (print_element_value): Likewise.
2229 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2230 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2231 (print_parameter_annotations): New function.
2232 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2233 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2235 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2236 (print_annotations): New function.
2238 2006-06-23 Tom Tromey <tromey@redhat.com>
2240 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
2241 emitting class files, always use 1.5.
2242 * gcj.texi (Input Options): Document -fsource.
2243 (Code Generation): Document -ftarget.
2245 2006-06-21 Tom Tromey <tromey@redhat.com>
2248 * expr.c (expand_java_field_op): Initialize field's declaring
2251 2006-06-20 Tom Tromey <tromey@redhat.com>
2253 * expr.c (push_value): Always flush quick stack.
2255 2006-06-19 Tom Tromey <tromey@redhat.com>
2257 * expr.c (push_value): Also flush quick stack if value is a
2260 2006-06-19 Tom Tromey <tromey@redhat.com>
2262 * expr.c (push_value): Flush quick stack if value has side
2265 2006-06-13 Tom Tromey <tromey@redhat.com>
2267 * class.c (is_compiled_class): Explicitly check for current
2270 2006-06-09 Tom Tromey <tromey@redhat.com>
2272 * gjavah.c (decompile_method): Don't decompile a static field
2275 2006-06-06 Tom Tromey <tromey@redhat.com>
2277 * lang-specs.h <jc1>: Add .jar file to command line if
2278 -fsaw-java-file. Also, remove -ffilelist-file in this case.
2280 2006-06-05 Tom Tromey <tromey@redhat.com>
2282 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2283 synthetic, enum, annotation.
2284 * jcf.h (ACC_BRIDGE): New macro.
2285 (ACC_VARARGS): Likewise.
2286 (ACC_SYNTHETIC): Likewise.
2287 (ACC_ENUM): Likewise.
2288 (ACC_ANNOTATION): Likewise.
2290 2006-06-04 Tom Tromey <tromey@redhat.com>
2292 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2293 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2295 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
2296 when needed. Handle classpath-setting.
2297 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2298 * lang-specs.h: Rewrote.
2300 2006-06-04 Tom Tromey <tromey@redhat.com>
2302 * jcf-io.c (find_class): Set source_ok to 0.
2303 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2304 (parse_class_file): Don't call java_mark_class_local.
2305 (java_parse_file): Skip .java files. Call java_mark_class_local
2306 before lowering any code.
2307 (parse_zip_file_entries): Don't call duplicate_class_warning
2309 (process_zip_dir): ... call it here.
2310 * class.c (add_field): Don't mark field external if it is being
2311 compiled into this object.
2312 (make_class_data): Handle situation where class_dtable_decl is
2313 created before Class is compiled.
2314 (is_compiled_class): Don't assume files in zip are compiled into
2316 (layout_class_method): Don't mark method external if it is being
2317 compiled into this object.
2319 2006-06-04 Tom Tromey <tromey@redhat.com>
2321 * jcf-path.c (jcf_path_compute): New function.
2322 * jcf.h (jcf_path_compute): Declare.
2324 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2326 * decl.c: Include langhooks.h.
2327 (builtin_function): Remove.
2328 (java_init_decl_processing): Replace calls to builtin_function
2329 with add_builtin_function.
2330 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2331 (java/decl.o): Depend on langhooks.h.
2332 * java-tree.h (builtin_function): Remove.
2334 2006-10-10 Brooks Moses <bmoses@stanford.edu>
2336 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2338 2006-09-12 Tom Tromey <tromey@redhat.com>
2340 * expr.c (push_value): Always flush quick stack.
2342 2006-09-12 Tom Tromey <tromey@redhat.com>
2345 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2346 the push of the called method's return result.
2348 2006-09-12 Tom Tromey <tromey@redhat.com>
2350 * jvspec.c (lang_specific_driver): Read spec file even if
2353 2006-09-12 Tom Tromey <tromey@redhat.com>
2356 * expr.c (expand_java_field_op): Initialize field's declaring
2357 interface if necessary.
2359 2006-09-12 Tom Tromey <tromey@redhat.com>
2362 * expr.c (expand_java_field_op): No error for assignments not in
2363 class initializer or constructor.
2365 2006-08-22 Andrew Haley <aph@redhat.com>
2367 * decl.c (java_add_stmt): Give the statement list a type.
2369 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2370 Bryce McKinlay <bryce@mckinlay.net.nz>
2372 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2374 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
2377 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2378 or '--' is used with a constant operand.
2379 (java_complete_lhs): When processing a '++' or '--' expression,
2380 don't call java_complete_tree but java_complete_lhs, so that a
2381 static final variable operand is never replaced by its value. This
2382 avoids an ICE later on.
2383 (patch_unaryop): Fixed typo in comment.
2385 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2387 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2389 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2391 * builtins.c (check_for_builtin): If a builtin could result in a
2392 direct call being generated, don't use it if flag_indirect_dispatch
2395 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2397 * gcj.texi (Invocation): Corrections for Invocation API example.
2399 2006-07-04 Andrew Haley <aph@redhat.com>
2401 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2404 2006-06-21 Andrew Haley <aph@redhat.com>
2406 * java-tree.h (update_aliases): Remove
2407 * expr.c (expand_iinc): Remove call to update_aliases().
2408 (STORE_INTERNAL): Likewise.
2409 * decl.c (update_aliases, initialize_local_variable)
2410 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2412 2006-06-19 Andrew Haley <aph@redhat.com>
2416 * expr.c (java_modify_addr_for_volatile): New function.
2417 (expand_java_field_op): Handle volatile fields.
2418 * java-gimplify.c (java_gimplify_component_ref): Call
2419 java_modify_addr_for_volatile to give the field_ref the correct
2421 (java_gimplify_modify_expr): Likewise.
2422 * java-tree.h (java_modify_addr_for_volatile): New decl.
2424 2006-06-17 Karl Berry <karl@gnu.org>
2426 * gcj.texi (@dircategory): Use "Software development" instead
2427 of "Programming", following the Free Software Directory.
2429 2006-06-16 Andrew Haley <aph@redhat.com>
2431 * class.c (make_class_data): When using flag_indirect_classes,
2432 don't initialize the vtable of Class instances.
2434 2006-06-09 Andrew Haley <aph@redhat.com>
2438 * builtins.c (initialize_builtins): Add __sync_synchronize().
2439 * class.c (add_field): Mark volatile fields.
2440 * java-gimplify.c (java_gimplify_expr): Call new functions to
2441 handle self-modifying exprs and COMPONENT_REFs.
2442 (java_gimplify_component_ref): New.
2443 (java_gimplify_modify_expr): Add handling for volatiles.
2445 2006-06-08 Tom Tromey <tromey@redhat.com>
2447 * gcj.texi (libgcj Runtime Properties): Document
2448 gnu.gcj.user.realname.
2450 2006-06-08 Andrew Haley <aph@redhat.com>
2452 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2453 get_symbol_table_index().
2454 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2456 (build_known_method_ref): New arg: special. Pass it to
2457 get_symbol_table_index.
2458 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2460 (build_invokevirtual): New arg: special. Pass it to
2461 get_symbol_table_index.
2462 (expand_invoke): New variable: special.
2463 Pass it to maybe_rewrite_invocation().
2464 Pass it to build_known_method_ref().
2465 * class.c (build_symbol_entry): Add new arg: special. Use it to
2466 build the symbol table conbstructor.
2467 (emit_symbol_table): Extract SPECIAL from the method list and pass
2468 it to build_symbol_entry().
2469 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2470 special accordingly.
2472 2006-06-06 David Daney <ddaney@avtrex.com>
2474 * gcj.texi (libgcj Runtime Properties): Document
2475 gnu.gcj.runtime.NameFinder.show_raw and
2476 gnu.gcj.runtime.NameFinder.remove_unknown.
2478 2006-06-06 Tom Tromey <tromey@redhat.com>
2480 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2481 synthetic, enum, annotation.
2482 * jcf.h (ACC_BRIDGE): New macro.
2483 (ACC_VARARGS): Likewise.
2484 (ACC_SYNTHETIC): Likewise.
2485 (ACC_ENUM): Likewise.
2486 (ACC_ANNOTATION): Likewise.
2488 2006-06-06 Mike Stump <mrs@apple.com>
2490 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
2491 installing during build.
2493 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
2495 * gcj.texi (Extensions): Document the new gcj-dbtool-based
2496 classname-to-library resolution mechanism.
2497 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
2498 mechanism deprecated.
2499 (libgcj Runtime Properties): Document
2500 gnu.gcj.runtime.VMClassLoader.library_control's new default.
2502 2006-05-29 Jakub Jelinek <jakub@redhat.com>
2504 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
2506 (jword): Define to uint64 on 64-bit arches.
2507 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
2509 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
2511 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
2514 2006-05-26 Tom Tromey <tromey@redhat.com>
2516 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
2517 * verify-glue.c (vfy_class_type): New function.
2518 * verify-impl.c (check_constant): Allow 'ldc class'.
2519 * verify.h (vfy_class_type): Declare.
2521 2006-05-25 Andrew Haley <aph@redhat.com>
2524 * decl.c (maybe_pushlevels): When variable ranges are non-nested
2525 update all lifetimes, not just the first one.
2527 2006-05-24 Tom Tromey <tromey@redhat.com>
2529 * java-tree.h: Fixed flag documentation.
2531 2006-05-24 Tom Tromey <tromey@redhat.com>
2534 * jcf.h (ACC_INVISIBLE): Changed value.
2536 2006-05-24 Andrew Haley <aph@redhat.com>
2539 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
2542 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2544 * lang.opt (femit-class-file): Remove VarExists.
2546 2006-05-16 Tom Tromey <tromey@redhat.com>
2548 * verify-impl.c (verify_instructions_0) <op_return>: Special case
2551 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
2554 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
2557 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
2559 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
2560 (java/expr.o): Replace target.h with $(TARGET_H).
2561 (java/parse.o): Likewise.
2563 2006-05-10 Andrew Haley <aph@redhat.com>
2565 * class.c (emit_indirect_register_classes): Fix comment.
2567 2006-05-04 Tom Tromey <tromey@redhat.com>
2569 * java-tree.h (uses_jv_markobj_p): Declare.
2570 * class.c (uses_jv_markobj_p): Removed.
2571 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
2572 (get_boehm_type_descriptor): Use it.
2573 (uses_jv_markobj_p): Moved from class.c. Return bool.
2575 2006-05-04 Tom Tromey <tromey@redhat.com>
2577 * java-tree.def (THIS_EXPR): Now a tcc_expression.
2579 2006-05-04 Andrew Haley <aph@redhat.com>
2581 * class.c (make_field_value): Always build_address_of fdecl if
2582 there is an initializer.
2584 2006-05-03 Andrew Haley <aph@redhat.com>
2587 * expr.c (maybe_rewrite_invocation): New function.
2588 (rewrite_arglist_getclass): Likewise.
2590 (expand_invoke): Call maybe_rewrite_invocation.
2591 * parse.y (patch_invoke): Likewise.
2592 * java-tree.h: (maybe_rewrite_invocation): New function.
2594 2006-04-21 Andrew Haley <aph@redhat.com>
2596 * lang.c (java_init): Handle flag_indirect_classes.
2597 * jvgenmain.c: Use "class$$" instead of "class$".
2598 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
2600 (mangle_class_field): Special case "class$$" as well as "class$".
2601 * constants.c (build_ref_from_constant_pool): If
2602 flag_indirect_classes, generate a ref into the heap.
2603 * decl.c (constants_field_decl_node,
2604 constants_data_field_decl_node): New.
2605 * class.c (build_static_class_ref): New.
2606 (build_classdollar_field): Factor out from build_class_ref().
2607 (make_field_value): Handle static fields in heap.
2608 (make_class_data): Make sure we get a static ref to class.
2609 Make class initializer const if flag_indirect_classes.
2610 (register_class): Build a class_ref for initialization if
2611 flag_indirect_classes.
2612 (emit_indirect_register_classes): New.
2614 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
2616 * expr.c, gjavah.c: Fix comment typos.
2618 2006-04-03 Andrew Haley <aph@redhat.com>
2621 * expr.c (build_field_ref): Don't check the field offset if
2624 2006-03-30 Andrew Haley <aph@redhat.com>
2627 * lang.c (java_attribute_table): New.
2628 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
2629 * expr.c (build_field_ref): Add a null pointer check for all
2630 fields of offset > 4k. Don't do so for accesses via the this
2631 pointer, which we know can never be null.
2632 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
2635 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
2637 * Make-lang.in: Rename docdir to gcc_docdir.
2639 2006-03-30 Tom Tromey <tromey@redhat.com>
2642 * parse.y (java_reorder_fields): Reset superclass field's size as
2645 2006-03-28 Tom Tromey <tromey@redhat.com>
2648 * parse.y (find_most_specific_methods_list): Added 'class'
2650 (lookup_method_invoke): Updated.
2652 2006-03-15 Tom Tromey <tromey@redhat.com>
2654 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
2655 non-static method calls.
2657 2006-03-15 David Daney <ddaney@avtrex.com>
2659 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
2662 2006-03-15 David Daney <ddaney@avtrex.com>
2664 * lang.opt (-freduced-reflection): New option.
2665 * lang.c (java_post_options): Generate an error if
2666 -freduced-reflection used with -fjni or -findirect-dispatch.
2667 * java-tree.h (flag_reduced_reflection): Declare new variable.
2668 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
2669 if bitmap overflows and flag_reduced_reflection set.
2670 * class.c (uses_jv_markobj_p): New function.
2671 (make_class_data): Moved generation of vtable to before
2672 reflection data, generate less reflection data if
2673 flag_reduced_reflection set.
2674 * gcj.texi: Document -freduced-reflection.
2676 2006-03-15 Tom Tromey <tromey@redhat.com>
2679 * class.c (get_interface_method_index): Don't put <clinit> into
2682 2006-03-15 Tom Tromey <tromey@redhat.com>
2684 * parse.y (analyze_clinit_body): Ignore empty statements.
2686 2006-03-08 David Daney <ddaney@avtrex.com>
2688 * gcj.texi: Document -static-libgcj option.
2690 2006-02-20 Andrew Haley <aph@redhat.com>
2692 * jcf-parse.c (parse_class_file): Set input_location from
2695 2006-02-15 Andrew Haley <aph@redhat.com>
2697 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
2698 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
2699 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
2701 2006-02-09 Andrew Haley <aph@redhat.com>
2704 * expr.c (expand_invoke): Allow methods in arrays to be resolved
2705 in their superclass.
2707 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
2710 2006-02-08 Tom Tromey <tromey@redhat.com>
2713 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
2714 * builtins.c (convert_real): New function.
2715 (java_builtins): Handle Float.intBitsToFloat,
2716 Float.floatToRawIntBits, Double.longBitsToDouble,
2717 Double.doubleToRawLongBits.
2719 2006-02-07 Andrew Haley <aph@redhat.com>
2721 * expr.c (expand_invoke): (BC mode.) If we find a method in a
2722 class other than the one in which we expected to find it, ignore
2726 * constants.c (build_constants_constructor): move initializer into
2727 first halfword on a 64-bit big-endian machine.
2729 2006-02-04 Tom Tromey <tromey@redhat.com>
2732 * builtins.c (max_builtin): Skip floating point 'max'.
2733 (min_builtin): Skip floating point 'min'.
2734 (check_for_builtin): Never return NULL_TREE.
2736 2006-02-04 Tom Tromey <tromey@redhat.com>
2739 * expr.c (push_type): Avoid side effect in gcc_assert.
2741 2006-02-04 Roger Sayle <roger@eyesopen.com>
2743 * decl.c (java_init_decl_processing): Create char_type_node as a
2744 regular INTEGER_TYPE node.
2745 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
2746 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
2747 test for char_type_node and promoted_char_type_node as special
2748 instances of INTEGER_TYPE tree codes.
2749 (promote_type,build_java_signature): Likewise.
2750 * jcf-write.c (adjust_typed_op): Likewise.
2751 * mangle.c (mangle_type): Likewise.
2752 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
2753 * parse.h (JINTEGRAL_TYPE_P): Likewise.
2755 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
2757 * expr.c (java_stack_swap): Revert gcc_assert patch.
2759 2006-02-03 Ben Elliston <bje@au.ibm.com>
2761 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
2762 * typeck.c: Likewise.
2763 * verify-impl.c: Likewise.
2764 * class.c: Likewise.
2766 * jcf-parse.c: Likewise.
2767 * constants.c: Likewise.
2768 * check-init.c: Likewise.
2769 * jcf-write.c: Likewise.
2770 * verify-glue.c: Likewise.
2771 * mangle.c: Likewise.
2774 * boehm.c: Likewise.
2776 2006-02-01 Jan Hubicka <jh@suse.cz>
2778 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
2779 * lang.c (java_init_options): Set no_unit_at_a_time_default.
2781 2006-01-30 Andrew Haley <aph@redhat.com>
2784 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
2786 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
2788 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
2789 Update copyright notice dates.
2791 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2793 * jvspec.c (lang_specific_spec_functions): Remove.
2795 2006-01-06 Tom Tromey <tromey@redhat.com>
2797 * gcj.texi (Arrays): Added more documentation for
2799 (Primitive types): Correct information about primitive classes.
2800 (Reference types): New node.
2803 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
2805 * jcf-parse.c (set_source_filename): Set the decl source location
2806 even when returning early.
2808 2005-12-15 Tom Tromey <tromey@redhat.com>
2809 Andrew Haley <aph@redhat.com>
2812 * parse.y (resolve_expression_name): Don't generate accessor
2813 methods for constant fields.
2815 2005-12-13 Andrew Haley <aph@redhat.com>
2819 * class.c (maybe_layout_super_class): Update current_class before
2820 calling do_resolve_class.
2822 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
2825 * jcf-write.c (write_classfile): Use PID in temporary class
2826 file. Save/restore errno when reporting error.
2828 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
2831 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
2832 to bare_function_type and including the return type
2833 * builtins.c (initialize_builtins) : Change builtin mangled name
2834 constants to conform to new mangling scheme
2836 2005-12-08 Andrew Haley <aph@redhat.com>
2839 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
2840 (soft_abstractmethod_node): New.
2841 * expr.c (build_field_ref): Add in-line check for missing field.
2842 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
2844 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2846 * Make-lang.in (java.all.build, java.install-normal): Remove.
2848 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2850 * Make-lang.in: Remove all dependencies on s-gtype, except for
2853 2005-12-07 Richard Sandiford <richard@codesourcery.com>
2855 * class.c (build_utf8_ref, emit_register_classes): Use
2856 switch_to_section and get_section.
2858 2005-12-06 Tom Tromey <tromey@redhat.com>
2861 * parse.y (patch_new_array_init): Revert previous patch.
2862 (lookup_method_invoke): Use size-less array type when creating an
2863 anonymous constructor.
2865 2005-12-05 Tom Tromey <tromey@redhat.com>
2867 * parse.y (patch_new_array_init): Don't set length on array.
2869 2005-12-02 Richard Guenther <rguenther@suse.de>
2871 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
2872 buildN instead of build.
2873 * class.c (finish_class): Likewise.
2874 * expr.c (java_create_object): Likewise.
2876 2005-11-28 Tom Tromey <tromey@redhat.com>
2879 * expr.c (build_jni_stub): Unwrap the return value.
2880 * java-tree.h (soft_unwrapjni_node): New define.
2881 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
2882 * decl.c (java_init_decl_processing): Initialize
2883 soft_unwrapjni_node.
2885 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
2887 * gcj.texi (gij options): Add -Xss documentation.
2889 2005-11-08 Wil Mahan <wmahan@gmail.com>
2892 * zextract.c (read_zip_archive): Fix out of memory error when
2893 reading jar files with zip-style comments.
2895 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
2897 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
2899 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
2901 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
2902 Wil Mahan <wmahan@gmail.com>
2905 * class.c (make_class): Create empty binfo here.
2906 (set_super_info): Only create binfo if we have superclasses.
2908 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
2911 * parse.y (method_header): Make the result of the rule a NULL_TREE
2912 when a parsing error occurs.
2914 2005-09-29 Tom Tromey <tromey@redhat.com>
2917 * jcf-io.c (memoized_dirlist_hash): New function.
2918 (caching_stat): Use it.
2920 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
2923 * class.c (inherits_from_p): Try to lay out super class
2924 if it is not already laid out.
2925 (maybe_layout_super_class): Handle the case where SUPER_CLASS
2928 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
2930 * builtins.c (max_builtin, min_builtin, abs_builtin,
2931 java_build_function_call_expr): Use fold_buildN.
2932 * class.c (layout_class_method): Likewise.
2933 * expr.c (java_truthvalue_conversion, build_java_jsr,
2934 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
2935 build_java_binop, build_field_ref, expand_compare,
2936 build_known_method_ref, build_invokevirtual,
2937 process_jvm_instruction): Likewise.
2938 * parse.y (patch_binop, patch_exit_expr): Likewise.
2939 * typeck.c (convert_ieee_real_to_integer): Likewise.
2940 (convert): Don't call fold after convert_ieee_real_to_integer.
2942 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
2945 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
2946 the newly created type. Set import lists here, not in create_class.
2947 (jdep_resolve_class): Set current_class.
2948 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
2949 the current package context, not ctxp->package.
2950 (cicp_cache): Removed.
2951 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
2952 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
2953 * java-tree.h (TYPE_PACKAGE): New macro.
2954 (struct lang_type): New member 'package'.
2956 2005-09-09 Andrew Haley <aph@redhat.com>
2959 * expr.c (pop_type_0): If the expected type is object or ptr
2960 (i.e. void*), return the type of the object we just popped from
2963 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
2965 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
2966 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
2968 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
2970 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
2971 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
2972 typos. Follow spelling conventions.
2974 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
2977 * typeck.c (lookup_do): Look up interfaces for the original class,
2979 * parse.y (java_check_regular_methods): Fix diagnostic message for
2980 more restrictive overriding of a method from an interface.
2982 2005-08-16 Tom Tromey <tromey@redhat.com>
2984 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
2985 class' initial state.
2987 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
2990 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
2991 `literal_token' for large numeric input tokens.
2993 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
2996 * parse.y (nested_field_access_p): Rename to nested_member_access_p
2997 and expand to handle method accesses across nested classes.
2998 (build_outer_method_access_method): Rename to
2999 build_nested_method_access_method. Minor adjustments to comments.
3000 (resolve_expression_name): Use the newly-renamed
3001 nested_member_access_p method.
3002 (resolve_qualified_expression_name): Likewise.
3003 (patch_method_invocation): Also consider static methods for access
3004 method generation. Minor adjustments to comments.
3005 (maybe_use_access_method): Use the more general
3006 nested_memeber_access_p to determine access across nested class
3007 boundaries. Allow THIS_ARG to be NULL (for static methods).
3009 2005-08-15 Tom Tromey <tromey@redhat.com>
3012 * expr.c (build_field_ref): Don't generate otable reference when
3013 DECL_FIELD_OFFSET is 0.
3014 * class.c (maybe_layout_super_class): Pass outer class to
3017 2005-08-15 Tom Tromey <tromey@redhat.com>
3019 * java-tree.h (LABEL_IN_SUBR): Removed.
3020 (LABEL_IN_SUBR): Likewise.
3021 (LABEL_IS_SUBR_START): Likewise.
3022 (LABEL_SUBR_START): Likewise.
3023 (LABEL_SUBR_CONTEXT): Likewise.
3024 (LABEL_CHANGED): Likewise.
3025 (LABEL_RETURN_LABEL): Likewise.
3026 (LABEL_RETURN_TYPE_STATE): Likewise.
3027 (LABEL_RETURN_LABELS): Likewise.
3028 (RETURN_MAP_ADJUSTED): Likewise.
3029 (LABEL_PENDING_CHAIN): Likewise.
3031 2005-08-15 Tom Tromey <tromey@redhat.com>
3033 * Make-lang.in (JAVA_OBJS): Removed verify.o
3034 (java/verify.o): Removed.
3035 * verify.c: Removed.
3036 * lang.c (flag_new_verifier): Removed.
3037 (java_post_options): Updated.
3038 * java-tree.h (flag_new_verifier): Removed.
3039 (verify_jvm_instructions): Removed.
3040 * expr.c (pop_type_0): Assume flag_new_verifier is true.
3041 (build_java_check_indexed_type): Likewise.
3042 (expand_java_arraystore): Likewise.
3043 (expand_java_arrayload): Likewise.
3044 (pop_arguments): Likewise.
3045 (expand_byte_code): Likewise.
3046 (process_jvm_instruction): Likewise.
3048 2005-08-10 Andrew Haley <aph@redhat.com>
3050 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3051 type mismatches to make legal GIMPLE.
3053 2005-08-10 Robin Green <greenrd@greenrd.org>
3056 * parse.y (maybe_use_access_method): Generalize check from
3057 java.lang.Object to any superclass of current_class
3059 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
3061 * class.c (build_class_ref): Wrap the primary class type in a
3063 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3064 primary class type from the NOP_EXPR in which it was placed.
3066 2005-07-28 Diego Novillo <dnovillo@redhat.com>
3068 * expr.c (expand_load_internal): Fix missing parens in
3071 2005-07-28 Andrew Haley <aph@redhat.com>
3073 * expr.c (expand_load_internal): Convert to destination type.
3075 2005-07-22 Manfred Hollstein <mh@suse.com>
3077 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3078 (check_constant): Likewise.
3079 (check_wide_constant): Likewise.
3081 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
3083 Make CONSTRUCTOR use VEC to store initializers.
3084 * check-init.c (check_init): Update to cope with VEC in
3086 * class.c (make_field_value, make_method_value, get_dispatch_table,
3087 make_class_data, emit_symbol_table, emit_catch_table,
3088 emit_assertion_table): Use build_constructor_from_list instead of
3090 * constants.c (build_constants_constructor): Likewise.
3091 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3092 VEC in CONSTRUCTOR_ELTS.
3093 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3094 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3096 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3098 * parse.y (build_new_array_init): Use build_constructor_from_list
3099 instead of build_constructor.
3100 (patch_new_array_init): Update to cope with VEC in
3102 (array_constructor_check_entry): Likewise.
3104 2005-07-12 Tom Tromey <tromey@redhat.com>
3106 * jvspec.c (lang_specific_driver): Put filelist_filename first on
3109 2005-07-12 Tom Tromey <tromey@redhat.com>
3112 * parse-scan.y (interface_member_declaration): Added
3115 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
3117 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3118 (LABEL_PENDING_CHAIN): Ditto.
3120 (DECL_BIT_INDEX): Ditto.
3122 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3125 * parse.y (inner_class_accessible): New function. Logic moved from
3126 check_inner_class_access.
3127 (check_inner_class_access): Use inner_class_accessible.
3128 (resolve_inner_class): Simplify arguments. Create circularity hash
3129 here. Keep looking for classes if we found one that was inaccessible.
3130 Return the inaccessible class only if there is no other match.
3131 (do_resolve_class): Update for new resolve_inner_class arguments.
3132 Don't create circularity_hash here.
3134 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3137 * parse.y (add_exception_to_throws): New function.
3138 (purge_unchecked_exceptions): Removed.
3139 (get_constructor_super): Renamed from verify_constructor_super. Now
3140 returns the super constructor after verification.
3141 (java_complete_expand_method): Don't use purge_unchecked_exceptions
3142 or save/restore the exception list.
3143 (check_thrown_exceptions): Add uncaught exceptions in anonymous
3144 class initializers and constructors to the throws clause of the method.
3146 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
3149 * parse.y (interface_member_declaration): Allow empty statements in
3150 interface declarations.
3152 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
3154 * Makefile.in (parse.o): Adjust dependencies.
3155 * parse.y: Include tree-dump.h.
3157 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
3159 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
3162 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
3164 * parse.y (issue_warning_error_from_context): Call
3165 pp_output_formatted_text to be able to get the buffer.
3167 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
3169 * parse.y (issue_warning_error_from_context): Update for the
3170 renaming of pp_format_text to pp_format.
3172 2005-06-28 Paul Brook <paul@codesourcery.com>
3174 * decl.c (java_init_decl_processing): Call
3175 default_init_unwind_resume_libfunc.
3177 2005-06-27 Tom Tromey <tromey@redhat.com>
3179 PR java/21540, PR java/13788:
3180 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3181 fold_constant_for_init.
3182 (patch_binop): Added 'folding' argument. Updated all callers.
3183 (patch_unaryop) <NOP_EXPR>: New case.
3184 (fold_constant_for_init) <NOP_EXPR>: Likewise.
3185 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3187 2005-06-25 Jan Hubicka <jh@suse.cz>
3189 * builtins.c (define_builtin): Accept new flags parameter.
3190 (initialize_builtins): Mark the builtins const and nothrow accordingly.
3192 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
3194 * all files: Update FSF address in copyright headers.
3196 2005-06-24 Tom Tromey <tromey@redhat.com>
3198 * verify-impl.c (verify_instructions_0): Correctly handle
3199 situation where PC falls off end.
3201 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
3204 * parse.y (find_most_specific_methods_list): Remove special case for
3207 2005-06-15 Tom Tromey <tromey@redhat.com>
3210 * class.c (make_method_value): Use soft_abstractmethod_node for
3212 * java-tree.h (soft_abstractmethod_node): New define.
3213 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3214 * decl.c (java_init_decl_processing): Initialize
3215 soft_abstractmethod_node.
3217 2005-06-13 Geoffrey Keating <geoffk@apple.com>
3219 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3221 2005-06-13 Per Bothner <per@bothner.com>
3223 * expr.c (int highest_label_pc_this_method,
3224 start_label_pc_this_method): New globals.
3225 (lookup_label): Add start_label_pc_this_method to pc for label, and
3226 update highest_label_pc_this_method. This prevents conflicts between
3227 labels from different methods.
3228 * java-tree.h: Declare new globals.
3229 * jcf-parse.c (parse_class_file): If needed bump
3230 start_label_pc_this_method and reset highest_label_pc_this_method.
3232 2005-06-13 Tom Tromey <tromey@redhat.com>
3235 * parse.y (nested_field_access_p): Handle case where outer field
3236 is inherited by enclosing class.
3238 2005-06-12 Per Bothner <per@bothner.com>
3240 * class.c (inherits_from_p): Do load_class if needed.
3242 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3244 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3245 * java-tree.h (parse_error_context): Move...
3246 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3247 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3248 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3250 2005-06-08 Roger Sayle <roger@eyesopen.com>
3252 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3254 2005-06-06 Jakub Jelinek <jakub@redhat.com>
3256 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3257 msgid for argument name.
3258 * gjavah.c (error): Likewise.
3259 * java-tree.h (parse_error_context): Likewise.
3260 * parse.y (parse_error_context, parse_warning_context,
3261 issue_warning_error_from_context): Likewise.
3263 2005-06-01 Tom Tromey <tromey@redhat.com>
3266 * class.c (build_static_field_ref): Don't fold constant fields if
3267 current class is from a .class file and we're using indirect
3270 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3272 * java/verify-glue.c: Don't include errors.h and include toplev.h.
3273 * java/Make-lang.in: Updates dependencies.
3275 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
3278 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3279 NESTED_FIELD_ACCESS_IDENTIFIER_P.
3280 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3281 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3282 * jcf-write.c (generate_classfile): Use
3283 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3284 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3285 * parse.y (build_outer_field_access): Rename to
3286 build_nested_field_access. Support static fields and outer-to-inner
3288 (outer_field_access_p): Rename to nested_field_access_p. Support
3289 static fields and generalise to outer-to-inner class and sibling
3290 inner class accesses.
3291 (outer_field_expanded_access_p): Rename to
3292 nested_field_expanded_access_p and support static fields.
3293 (outer_field_access_fix): Rename to nested_field_access_fix and
3294 support static fields.
3295 (build_outer_field_access_expr): Rename to
3296 build_nested_field_access_expr and support static fields.
3297 (build_outer_field_access_methods): Rename to
3298 build_nested_field_access_methods and support static fields. For
3299 static fields, generate accessors without class instance parameters.
3300 (build_outer_field_access_method): Rename to
3301 build_nested_field_access_method and support static fields.
3302 (build_outer_method_access_method): Use
3303 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3304 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3305 (resolve_expression_name): Consider static field accesses across
3307 (resolve_qualified_expression_name): Likewise.
3308 (java_complete_lhs): Use nested_field_access_fix instead of
3309 outer_field_access_fix.
3310 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3311 Use nested_field_expanded_access_p instead of
3312 outer_field_expanded_access_p. Use nested_field_access_fix instead
3313 of outer_field_access_fix.
3314 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3315 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3317 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
3319 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
3320 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3321 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3322 MINOR_BINARYCOMPAT_ABI_VERSION): New.
3323 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3324 (parse_version): Calculate version ID using new method. Use bit-flags
3325 for flag_indirect_dispatch and flag_bootstrap_classes.
3327 2005-05-25 Richard Henderson <rth@redhat.com>
3330 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3331 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3332 DECL_CONTEXT; avoid pushdecl_top_level.
3333 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3334 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3335 (layout_class_method): Likewise.
3336 * decl.c (java_mark_cni_decl_local): New.
3337 (java_mark_class_local): Use it.
3338 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3339 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3340 (struct lang_decl_func): Add local_cni;
3341 (struct lang_decl_var): Add class_field, vtable.
3342 (java_mangle_decl): Declare.
3343 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3344 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3345 (mangle_obstack_1): New.
3346 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
3347 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
3348 lhd_set_decl_assembler_name for things that don't need mangling.
3349 (mangle_class_field): Rename from java_mangle_class_field, make
3350 static, don't call init_mangling or finish_mangling.
3351 (mangle_vtable): Similarly.
3352 (mangle_local_cni_method_decl): New.
3353 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
3354 gcc_assert, and MANGLE_RAW_STRING.
3355 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3357 2005-05-25 DJ Delorie <dj@redhat.com>
3359 * class.c (set_constant_value): Move warning control from if() to
3362 2005-05-24 Richard Henderson <rth@redhat.com>
3364 * builtins.c (define_builtin): Don't call make_decl_rtl.
3365 * constants.c (build_constant_data_ref): Likewise.
3366 * class.c (build_utf8_ref): Likewise.
3367 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3368 (get_dispatch_table, layout_class_method): Likewise.
3369 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3371 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3372 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3373 to determine if we need a non-zero address.
3374 * decl.c (builtin_function): Don't call make_decl_rtl.
3375 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3376 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3377 * resource.c (compile_resource_data): Likewise.
3378 * parse.y (resolve_field_access): Re-word comment to avoid
3381 2005-05-24 Richard Henderson <rth@redhat.com>
3383 * class.c (registered_class): Take it out of class_roots; turn into
3385 (register_class): Make static. Don't duplicate decl node. Use
3387 (emit_register_classes): Use VEC_iterate. Use output_constant
3388 instead of assemble_integer. Don't call mark_decl_referenced
3390 * java-tree.h (register_class): Remove decl.
3392 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
3396 * parse.y (register_package, package_list): Remove.
3397 (package_declaration): Do not call register_package.
3398 (do_resolve_class): Do not use package_list.
3400 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
3402 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3405 2005-05-15 Tom Tromey <tromey@redhat.com>
3408 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3411 2005-05-12 Aaron Luchko <aluchko@redhat.com>
3413 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
3415 2005-05-11 Tom Tromey <tromey@redhat.com>
3417 * gcj.texi (Code Generation): Document -fbootstrap-classes.
3418 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3419 (parse_version): Use it.
3420 * lang.opt (-fbootstrap-classes): New option.
3422 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
3425 * class.c (maybe_layout_super_class): Look for imports in this_class.
3426 * parse.h (ctxp_for_generation_last): New.
3427 (do_resolve_class): Add a parameter.
3428 * parse.y (ctxp_for_generation_last): New.
3429 (java_pop_parser_context): Add at end of list.
3430 (find_in_imports, find_in_imports_on_demand): Look in ctxp
3431 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
3432 the given type are NULL.
3433 (do_resolve_class): Look into the imports of the new second parameter.
3434 Adjust recursive calls.
3435 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3436 calls to do_resolve_class.
3437 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3438 (java_complete_class): Do not do that here.
3440 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
3443 * Make-lang.in (java): Add gjnih.
3444 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3445 (GJNIH_OBJS): New variable.
3446 (gjnih$(exeext)): New target.
3447 (JAVA_MANFILES): Add gjnih.1.
3448 (java.uninstall): Add gjnih.1.
3449 (java.mostlyclean): Add gjnih.
3450 (java.maintainer-clean): Add gjnih.1.
3451 (java/gjavah-jni.o): New target.
3452 (.INTERMEDIATE): Add gjnih.pod.
3453 (gjnih.pod): New target.
3454 * config-lang.in (stagestuff): Add gjnih.
3455 * gcj.texi (Top): Add gjnih node.
3456 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3457 -bootclasspath options.
3458 (Invoking gjnih): New node.
3459 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3460 (TOOLNAME): New macro.
3461 (error): Replace hard-coded gcjh with TOOLNAME.
3462 (process_file): Likewise.
3464 (version): Likewise.
3465 (help): Likewise. Add help output for -force, -old, -trace and -J
3467 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3468 (options): Add force, old, trace and J fields.
3469 (main): Handle -force, -old, -trace and -J options.
3471 2005-05-03 Tom Tromey <tromey@redhat.com>
3474 * gjavah.c (main): Unlink output file on error.
3476 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
3478 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3481 2005-04-29 Tom Tromey <tromey@redhat.com>
3483 * expr.c (build_jni_stub): Updated for change to build_block.
3485 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
3487 * expr.c (force_evaluation_order): Declare 'saved' earlier.
3489 2005-04-28 Andrew Haley <aph@redhat.com>
3492 * java-tree.h (soft_resolvepoolentry_node): New.
3493 (alloc_constant_fieldref): Declare.
3494 * expr.c (expand_java_field_op): Don't call class_init for
3495 accesses to static fields with indirect dispatch.
3496 * builtins.c (initialize_builtins): Add "__builtin_expect".
3497 * decl.c (soft_resolvepoolentry_node): New variable.
3498 (java_init_decl_processing): Create a decl for
3499 "_Jv_ResolvePoolEntry".
3500 * class.c (build_fieldref_cache_entry): New function.
3501 (build_static_field_ref): Rewrite for indirect dispatch.
3502 * constants.c (find_name_and_type_constant_tree): New function.
3503 (alloc_constant_fieldref): Likewise.
3504 (build_constants_constructor): Handle CONSTANT_Fieldref and
3505 CONSTANT_NameAndType.
3508 * expr.c (force_evaluation_order): Convert outgoing args smaller
3511 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
3513 * gcj.texi (libgcj Runtime Properties): Remove obsolete
3514 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
3515 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
3517 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3519 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
3520 to `unlock_stream' with `unlock_std_streams'.
3522 2005-04-25 Jakub Jelinek <jakub@redhat.com>
3524 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
3525 instead of just expr.h.
3527 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3529 * gjavah.c (main): Unlock the stdio streams.
3530 * jcf-dump.c (main): Likewise.
3531 * jv-scan.c (main): Likewise.
3532 * jvgenmain.c (main): Likewise.
3534 2005-04-23 DJ Delorie <dj@redhat.com>
3536 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
3537 parse.y: Adjust warning() callers.
3539 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
3541 * gcj.texi (Object fields): Change "Integer" to "Int" in example
3544 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
3546 * gcj.texi: Fix typos and bogus example.
3548 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
3550 * except.c: Fix a comment typo.
3552 2005-04-19 Julian Brown <julian@codesourcery.com>
3554 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
3555 indirect dispatch with PIC.
3557 2005-04-18 Andrew Haley <aph@redhat.com>
3559 * java-except.h (struct eh_range.handler): Remove unused field.
3560 (handle_nested_ranges): Remove function declaration.
3561 (sanity_check_exception_range): Add function declaration.
3562 * verify.c (verify_jvm_instructions): Remove call to
3563 handle_nested_ranges.
3564 * verify-glue.c (verify_jvm_instructions_new): Call
3565 sanity_check_exception_range.
3566 * except.c (link_handler, eh_range_freelist, link_handler,
3567 handle_nested_ranges): Remove.
3568 (add_handler): Rewrite.
3569 (sanity_check_exception_range): New function.
3570 (print_ranges): New function.
3572 2005-04-13 Julian Brown <julian@codesourcery.com>
3574 * decl.c (finish_method): Give methods once-only linkage.
3576 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
3578 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
3580 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3582 * java-tree.h: Don't use PARAMS().
3584 2005-04-07 Per Bothner <per@bothner.com>
3586 * class.c (push_class): By default, suppress debug output.
3587 (finish_class): Enable debug output for classes we're emitting.
3589 2005-04-07 Andrew Haley <aph@redhat.com>
3591 * gcj.texi: Correct gcj-dbtool instructions.
3593 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
3595 * gcj.texi: Fix a typo.
3596 * lang.c: Fix a comment typo.
3598 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
3600 * gcj.texi (Invoking gij): Add descriptions of new -X options.
3601 Mention recognized-and-ignored compatibility options.
3602 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
3604 (About CNI): Add Memory allocation section.
3606 2005-04-01 Tom Tromey <tromey@redhat.com>
3608 * decl.c (java_init_decl_processing): Fix types of
3609 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
3610 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
3611 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
3613 2005-03-31 Jan Hubicka <jh@suse.cz>
3615 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
3616 * class.c: Include cgraph.h
3617 (make_local_functoin_alias): Mark aslias as needed.
3618 * resource.c: Include cgraph.h
3619 (compile_resource_data): Go via cgraph interface.
3621 2005-03-30 Ian Lance Taylor <ian@airs.com>
3623 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
3625 2005-03-30 Tom Tromey <tromey@redhat.com>
3627 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
3628 inner_class_info_index==0 or outer_class_info_index==0.
3630 2005-03-29 Tom Tromey <tromey@redhat.com>
3632 * gcj.texi (libgcj Runtime Properties): Document
3633 gnu.gcj.runtime.endorsed.dirs.
3635 2005-03-24 Anthony Green <green@redhat.com>
3637 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
3640 2005-03-23 Tom Tromey <tromey@redhat.com>
3642 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
3643 (parse_version): Use it.
3645 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
3647 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
3649 2005-03-18 Andrew Haley <aph@redhat.com>
3652 * decl.c (update_aliases): Don't update variables that are about
3654 (maybe_poplevels): Add comment.
3656 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
3659 * jcf-parse.c (duplicate_class_warning): New function.
3660 (java_parse_file): Call duplicate_class_warning if
3661 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
3662 (parse_zip_file_entries): Likewise. Also set
3663 CLASS_FROM_CURRENTLY_COMPILED_P.
3665 2005-03-16 Andrew Haley <aph@redhat.com>
3667 * expr.c (expand_java_arrayload): Don't generate a
3668 NullPointerException based on the type of the node.
3669 (build_java_array_length_access): Likewise.
3671 2005-03-15 Zack Weinberg <zack@codesourcery.com>
3673 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
3675 2005-03-11 Tom Tromey <tromey@redhat.com>
3677 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
3678 (libgcj Runtime Properties): Document the default .db.
3680 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
3683 * parse.y (checks_throws_clauses): Check exceptions list even when
3684 the base class does not come from a source file being compiled.
3685 (java_complete_lhs): Remove unused variable 'wfl'.
3687 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
3690 * decl.c (finish_method): Emit _Jv_InitClass for private static
3691 methods inside inner classes as well.
3693 2005-03-08 Julian Brown <julian@codesourcery.com>
3694 * Revert patch from 2005-03-08 for causing bootstrap failure on
3697 2005-03-08 Julian Brown <julian@codesourcery.com>
3699 * decl.c (finish_method): Give methods once-only linkage.
3701 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
3703 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
3705 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
3707 * verify-glue.c (vfy_is_assignable_from): Perform static check using
3708 can_widen_reference_to if the C++ ABI is in use.
3709 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
3710 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
3711 type_isresolved, init_state, set_pc, state_get_pc,
3712 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
3713 (verify_fail): Report the current PC from the verifier context.
3714 (free_state): Remove #if 0 block to enable this function.
3715 (free_verifier_context): Call free_state on state_list iterator
3716 values before freeing them.
3717 * expr.c (pop_type_0): Pop correct type for error message when stack
3718 contains a multi-word type.
3720 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
3722 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
3723 for known NULL array length access.
3725 2005-03-07 Tom Tromey <tromey@redhat.com>
3727 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
3729 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
3731 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
3732 typeck.c: Update copyright.
3734 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
3737 * xref.c, xref.h: Remove file.
3738 * Make-lang.in (java/xref.o): Remove.
3739 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
3740 * lang.c (flag_emit_xref): Remove definition.
3741 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
3742 * typeck.c (convert): Remove use of do_not_fold.
3743 * parse.y (do_not_fold): Remove definition.
3744 (parser grammar): Remove xref code.
3745 (maybe_create_class_interface_decl, create_class): Likewise.
3746 (register_fields, method_header, finish_method_declaration): Likewise.
3747 (declare_local_variables, source_end_java_method): Likewise.
3748 (java_complete_expand_classes): Do not set do_not_fold.
3749 (java_complete_expand_method): Remove xref code.
3750 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
3751 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
3752 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
3753 (patch_synchronized_statement, patch_throw_statement): Likewise.
3754 (maybe_build_class_init_for_field): Likewise.
3756 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
3758 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
3759 instead of IS_NON_TYPE_CODE_CLASS.
3761 2005-03-04 Andrew Haley <aph@redhat.com>
3764 * class.c (set_method_index): Don't set method_index if it is
3766 (layout_class_method): Don't complain about "non-static method foo
3767 overrides static method" in the case of indirect dispatch.
3769 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3771 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
3773 * Make-lang.in: Don't elide warnings in jcf-io.c.
3775 2005-03-01 Per Bothner <per@bothner.com>
3778 * check-init.c (wfl): Remove static.
3779 (final_assign_error, check_init): Replace calls to parse_error_context
3781 (check_init): Save, set, and restore input_location for each exp.
3783 2005-03-01 Per Bothner <per@bothner.com>
3785 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
3786 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
3787 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
3789 2005-03-01 Per Bothner <per@bothner.com>
3791 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
3793 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
3796 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
3799 2005-02-22 Tom Tromey <tromey@redhat.com>
3802 * verify-impl.c (EITHER): New define.
3803 (types_compatible): Handle it.
3804 (check_field_constant): Use it.
3806 2005-02-18 Tom Tromey <tromey@redhat.com>
3809 * verify-impl.c (types_equal): Fixed test.
3812 * verify-glue.c (vfy_class_has_field): New function.
3813 * verify.h (vfy_class_has_field): Declare.
3814 * verify-impl.c (check_field_constant): Added 'putfield'
3816 (verify_instructions_0): Updated.
3817 (types_equal): New function.
3819 2005-02-14 Tom Tromey <tromey@redhat.com>
3822 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
3823 stack effect of multianewarray.
3825 2005-02-14 Andrew Haley <aph@redhat.com>
3828 * expr.c (expand_byte_code): Call promote_arguments().
3829 (promote_arguments): New function.
3830 * decl.c (check_local_unnamed_variable): Remove special case for
3832 (find_local_variable): Promote all boolean types to int
3833 when searching for local variable decls.
3835 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
3837 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
3838 parse-scan.y: Update copyright.
3840 2005-02-11 Per Bothner <per@bothner.com>
3843 * parse-scan.y (input_location): Remove variable.
3844 (main_input_filename): New - replaces input_filename, which isn't
3845 settable if USE_MAPPED_LOCATION.
3846 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
3847 so we don't reference input_location or wfl_operator in that case.
3848 * jv-scan.c (expand_location): Remove - no longer used.
3849 (main): Set main_input_filename rather than input_filename.
3851 2005-02-09 Richard Henderson <rth@redhat.com>
3853 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
3854 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
3856 2005-02-08 Marcin Dalecki <martin@dalecki.de>
3858 * expr.c (add_type_assertion): Use the proper enumeration type,
3859 since this is what htab_find_slot() is expecting.
3861 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
3863 * gcj.texi: Update copyright dates.
3865 2005-02-02 Tom Tromey <tromey@redhat.com>
3867 * gcj.texi (libgcj Runtime Properties): Default library_control
3870 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
3873 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
3874 (modifiers) when square brackets are present in a declaration for
3876 * jv-scan.c (main): Set input_filename and input_line.
3878 2005-02-01 Tom Tromey <tromey@redhat.com>
3881 * gjavah.c (get_field_name): Don't override name for JNI header.
3883 2005-02-01 Roger Sayle <roger@eyesopen.com>
3885 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
3886 of unsigned types using iushr and lushr JVM bytecodes.
3888 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
3891 * gjavah.c (jni_print_float): Do not emit floating-point
3892 initialiser for a static final field.
3893 (jni_print_double): Likewise.
3895 2005-02-01 Mark Mitchell <mark@codesourcery.com>
3898 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3899 * gjavah.c (print_field_info): Mark static data members of
3900 floating-point type with "__extension__".
3902 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3904 * gjavah.c (print_field_info): Mark static data members of
3905 floating-point type with "__extension__".
3907 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
3910 * parse.y (build_string_concatenation): Remove redundant if.
3911 (patch_conditional_expr): Attempt to patch_string() the condition
3912 of a ?: as well, in addition to its other operands.
3914 2005-01-25 Tom Tromey <tromey@redhat.com>
3916 * Make-lang.in (java/java-tree-inline.o): Removed.
3918 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
3921 * parse.y (patch_binop): Allow comparisons against NULL only
3922 if the other operand is of a reference type.
3924 2005-01-24 Tom Tromey <tromey@redhat.com>
3926 * java-tree.h (gcj_abi_version): Declare.
3927 * class.c (make_class_data): Push gcj_abi_version into "next"
3928 field. Renamed field.
3929 * decl.c (gcj_abi_version): New global.
3930 (parse_version): New function.
3931 (java_init_decl_processing): Call it. Renamed 'next' field.
3933 (GCJ_BINARYCOMPAT_ADDITION): New define.
3935 2005-01-24 Roger Sayle <roger@eyesopen.com>
3938 * jcf-write.c (generate_bytecode_insns): Conversions between
3939 integer types of the same precision shouldn't generate widening
3940 or narrowing conversion bytecodes.
3942 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
3944 * java-except.h, java-tree.h: Remove unused prototypes.
3946 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
3949 * jcf-write.c (perform_relocations): Don't call memcpy if source
3950 and destination are the same.
3952 2005-01-17 Tom Tromey <tromey@redhat.com>
3954 * verify-impl.c (get_short): Sign extend.
3955 (get_int): Likewise.
3957 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
3959 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
3962 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
3964 * verify.c: Revert to the version before the BC-ABI merge.
3966 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
3969 * check-init.c (check_init): Take care of references that do not
3970 have an explicit final variable declaration (e.g. array length
3971 access) for pre/post in/de-crement operators.
3973 2005-01-08 Mark Wielaard <mark@klomp.org>
3975 * parse.y (process_imports): Allocate (and free) original_name only
3976 when not already defined.
3977 * jcf-parse.c (read_class): Free results of find_class() and
3979 (java_parse_file): Keep pointer to head of file_list and free when
3980 done. Free result of lrealpath().
3982 2005-01-05 Tom Tromey <tromey@redhat.com>
3984 * gcj.texi (Standard Properties): java.ext.dirs is now used.
3986 2004-12-20 Andrew Haley <aph@redhat.com>
3988 * typeck.c: Use fold_convert for ints and booleans.
3990 2004-12-17 Andrew Haley <aph@redhat.com>
3993 * typeck.c (convert): Use a CONVERT_EXPR when converting to
3994 BOOLEAN_TYPE or CHAR_TYPE.
3995 (convert_to_boolean, convert_to_char) : Remove.
3996 * convert.h (convert_to_boolean, convert_to_char) : Remove.
3997 * expr.c (expand_load_internal): Do type conversion if type is not
4000 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
4003 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4006 2004-12-07 Andrew Haley <aph@redhat.com>
4009 * jcf-parse.c (load_class): Remove sanity test for missing inner
4012 2004-12-06 Tom Tromey <tromey@redhat.com>
4014 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4015 (java.uninstall): Likewise.
4016 (java.maintainer-clean): Likewise.
4017 (.INTERMEDIATE): Likewise.
4018 (java.install-man): Likewise.
4019 (gcj-dbtool.pod): New target.
4020 * gcj.texi (Code Generation): Document -findirect-dispatch.
4021 (libgcj Runtime Properties): Document
4022 gnu.gcj.precompiled.db.path.
4023 (Top): Link to "Invoking gcj-dbtool".
4025 2004-12-06 Tom Tromey <tromey@redhat.com>
4028 * java-tree.h (extract_field_decl): Declare.
4029 * parse.y (extract_field_decl): Renamed from
4030 strip_out_static_field_access_decl. No longer static.
4031 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4033 2004-12-03 Tom Tromey <tromey@redhat.com>
4035 * lang.c (flag_new_verifier): Define.
4036 (java_post_options): Set flag_new_verifier if indirect dispatch
4038 * lang.opt (fnew-verifier): Removed.
4040 2004-12-03 Tom Tromey <tromey@redhat.com>
4043 * Make-lang.in (java.install-common): Only install transformed
4044 gcjh if gcj-cross exists.
4046 2004-12-03 Andrew Haley <aph@redhat.com>
4049 * except.c (link_handler): Patch 'outer' field of siblings of the
4050 range we're demoting.
4052 2004-12-03 Andrew Haley <aph@redhat.com>
4055 * class.c (layout_class_method): Don't fail to override a method
4056 simply because it has DECL_ARTIFICIAL set.
4058 2004-12-02 Tom Tromey <tromey@redhat.com>
4061 * parse.y (craft_constructor): Special case null_pointer_node.
4063 2004-12-02 Tom Tromey <tromey@redhat.com>
4066 * java-gimplify.c (java_gimplify_expr): Don't call
4067 SET_EXPR_LOCATION unless wrapped tree is an expression.
4069 2004-11-27 Per Bothner <per@bothner.com>
4071 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
4072 Fix fencepost error in 'i', which got executed one too many times.
4073 Also, fold memcpy into explicit loop, as originally intended.
4074 Also, free temporary 'buf' which otherwise leaks.
4076 2004-11-27 Per Bothner <per@bothner.com>
4078 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4079 local static variables if not USE_MAPPED_LOCATION.
4081 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
4083 * class.c, decl.c, expr.c: Fix comment typos.
4085 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
4088 * decl.c (end_java_method): Call
4089 attach_init_test_initialization_flags on all the init_decls.
4090 * parse.y (attach_init_test_initialization_flags): Move to ...
4091 * expr.c (attach_init_test_initialization_flags): here and
4092 support BIND_EXPR also.
4093 * java-tree.h (attach_init_test_initialization_flags): Prototype.
4094 * jcf-parse.c (parse_class_file): Don't disable class init
4097 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
4099 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4102 2004-11-24 Richard Henderson <rth@redhat.com>
4104 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4105 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4107 2004-11-24 Tom Tromey <tromey@redhat.com>
4109 * verify.c (defer_merging): Don't use C++-style comment.
4110 * verify.h (java_opcode): Added java_opcode_end.
4111 * class.c (build_class_ref): Remove C++ comment and old FIXME.
4113 * verify-impl.c (vfy_push_type): Removed bogus "return".
4114 (initialize_stack): Use vfy_alloc and vfy_free.
4115 (verify_instructions_0): Likewise.
4117 * Merged gcj-abi-2-dev-branch to trunk.
4119 2004-11-24 Andrew Haley <aph@redhat.com>
4121 * jcf-parse.c (parse_class_file): Set file_start_location.
4123 2004-11-10 Tom Tromey <tromey@redhat.com>
4125 * class.c (make_field_value): Don't call build_static_field_ref.
4126 (build_static_field_ref): Don't emit direct references when using
4129 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
4130 -verbose:class into man page synopsis.
4132 2004-11-09 Tom Tromey <tromey@redhat.com>
4134 * expr.c (build_java_arraystore_check): Still generate check if
4135 element type is itself an array.
4137 2004-11-08 Tom Tromey <tromey@redhat.com>
4139 * java-tree.h (soft_check_assignment_node): Removed.
4140 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4141 * decl.c (java_init_decl_processing): Don't initialize
4142 soft_check_assignment_node.
4144 2004-11-05 Tom Tromey <tromey@redhat.com>
4146 * class.c (layout_class_methods): Don't add Miranda methods when
4147 using indirect dispatch.
4149 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
4151 * class.c (make_class_data): Call emit_assertion_table to set the
4152 'assertion_table' field.
4153 (build_signature_for_libgcj): Move here from expr.c.
4154 (add_assertion_table_entry): New function. Callback for assertion
4155 hashtable traversal.
4156 (emit_assertion_table): New. Take class argument, and generate
4157 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4158 * decl.c (init_decl_processing): Define assertion_entry_type record.
4159 Push 'assertion_table' class field instead of 'verify'.
4160 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4161 (type_assertion_hash): Include 'assertion_code' in hash.
4162 (add_type_assertion): Rewritten. Take class and assertion_code
4163 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4164 (can_widen_reference_to): Use new add_type_assertion() arguments.
4165 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4166 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4167 (verify_identifier_node): Removed.
4168 (assertion_entry_type, assertion_table_type): New.
4169 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4170 assertion code definitions.
4171 (struct type_assertion): Add assertion_code. Rename 'source_type' and
4172 'target_type' to 'op1' and 'op2'.
4173 (add_type_assertion): Declare.
4174 (lang_printable_name_wls): Remove unused definition.
4175 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4176 to emit runtime assertion.
4177 (vfy_note_stack_type): Clean up non-C90 declarations.
4178 (vfy_note_local_type): Likewise.
4179 * verify.h (vfy_is_assignable_from): Declare.
4180 * verify-impl.c (is_assignable_from_slow): Remove unused function.
4181 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4182 instead of is_assignable_from_slow().
4183 (types_compatible): Reinstate ref_compatible() call.
4185 2004-11-04 Tom Tromey <tromey@redhat.com>
4187 * class.c (build_static_field_ref): Reverted previous patch.
4189 * class.c (build_static_field_ref): Don't emit direct references
4190 when using indirect dispatch.
4192 2004-11-03 Tom Tromey <tromey@redhat.com>
4194 * expr.c (expand_java_arrayload): Set lhs_type_node.
4195 (expand_java_arraystore): Set rhs_type_node.
4197 2004-11-02 Tom Tromey <tromey@redhat.com>
4199 * jcf-parse.c (compute_class_name): Use filename length from zip
4200 directory, not strlen.
4202 * expr.c (expand_invoke): Mark new interface methods as abstract.
4204 2004-11-01 Tom Tromey <tromey@redhat.com>
4206 * verify-impl.c (push_jump): Removed check for uninitialized
4208 (push_exception_jump): Likewise.
4209 (handle_ret_insn): Likewise.
4210 (handle_jsr_insn): Likewise.
4211 (state_check_no_uninitialized_objects): Removed.
4213 * decl.c (check_local_unnamed_variable): Recognize
4214 promoted-to-int parameters when using the new verifier.
4215 * expr.c (expand_java_arraystore): Explicitly request array type
4216 when using new verifier.
4217 (expand_java_arrayload): Likewise.
4218 (invoke_build_dtable): Don't pass object_type_node as
4219 expression argument to build_java_indirect_ref.
4220 (build_java_check_indexed_type): Do nothing.
4221 (build_java_arraystore_check): Handle case where array doesn't
4223 (build_java_array_length_access): Likewise.
4224 (expand_invoke): Handle case where interface overrides a method
4226 (pop_type_0): Always succeed for reference types.
4227 (process_jvm_instruction): Don't pop a value in a dead
4229 (pop_arguments): Convert arguments to correct types.
4231 2004-10-29 Andrew Haley <aph@redhat.com>
4233 * jcf-parse.c (give_name_to_class): Remove line that was
4236 2004-10-29 Andrew Haley <aph@redhat.com>
4238 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4240 2004-10-20 Andrew Haley <aph@redhat.com>
4242 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4244 2004-10-26 Tom Tromey <tromey@redhat.com>
4246 * verify.h (vfy_notify_verified): Removed.
4247 * verify-glue.c (vfy_notify_verified): Removed.
4249 2004-10-26 Tom Tromey <tromey@redhat.com>
4251 * verify-impl.c (debug_print_state): Declare `i' before code.
4252 (merge_types): Modify `t' when it is null_type.
4254 2004-10-26 Tom Tromey <tromey@redhat.com>
4256 * verify-impl.c (type_print): Renamed from print. Now static and
4258 (debug_print_state): Use type_print.
4260 2004-10-25 Tom Tromey <tromey@redhat.com>
4262 * expr.c (build_invokeinterface): Compute correct offset for
4263 index into interface methods.
4265 2004-10-20 Tom Tromey <tromey@redhat.com>
4267 * java-tree.h (verify_jvm_instructions_new): Declare.
4269 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4272 * verify-impl.c (verify_instructions): Correctly handle wide
4274 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4275 (vfy_get_component_type): Strip pointer types.
4276 (vfy_find_class): Use get_type_from_signature. Strip pointer
4278 Include java-except.h.
4280 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
4282 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4283 vfy_push_type_t, set_variable, add_new_state, merge_into,
4284 handle_jsr_insn, branch_prepass, check_class_constant,
4285 check_wide_constant, get_one_type, compute_static_types,
4286 verify_instructions_0): Clean up C99 declarations after statements.
4288 2004-10-20 Tom Tromey <tromey@redhat.com>
4290 * verify-impl.c (merge_refs): Compare reference against iterator,
4293 * verify-glue.c (vfy_tag): Mask off resolved flag.
4295 2004-10-19 Tom Tromey <tromey@redhat.com>
4297 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4298 (init_state_with_stack): Initialize `this_type' in state.
4299 (verify_method): Use debug_print.
4300 * verify-glue.c (vfy_is_primitive): Removed debugging print.
4301 (vfy_note_stack_depth): Reverted last patch.
4302 (vfy_note_stack_type): Note pointer to Object, not Object.
4303 (vfy_note_local_type): Likewise.
4305 * verify.h (vfy_note_instruction_seen): Declare.
4306 * verify-glue.c (verify_jvm_instructions_new): Set
4307 BCODE_EXCEPTION_TARGET on target instruction.
4308 (vfy_note_instruction_seen): New function.
4309 * verify-impl.c (FLAG_INSN_SEEN): New define.
4310 (verify_instructions_0): Set flag on instruction. Save state for
4312 (verify_instructions): Call vfy_note_instruction_seen.
4314 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4315 (verify_jvm_instructions_new): Call method_init_exceptions,
4316 add_handler, and handle_nested_ranges.
4317 * verify-impl.c (verify_method): Return 1 on success.
4318 (verify_instructions_0): Save the state at PC=0.
4320 * verify-impl.c (init_type_from_class): Set is_resolved and
4321 ref_next on new ref_intersection.
4322 (init_type_from_string): Likewise.
4324 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
4326 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4327 if flag_new_verifier is set.
4328 * java-tree.h (flag_new_verifier): Declare.
4329 * lang.opt (fnew-verifier): New option.
4330 * verify-impl.c: Work around namespace pollution by undef'ing
4332 (struct verifier_context): Make 'bytecode' const.
4333 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4334 (types_compatible): For the BC-ABI, always consider reference types
4336 (check_class_constant): Use vfr->current_class.
4337 (check_constant): Likewise.
4338 (check_wide_constant): Likewise.
4339 (check_field_constant): Check for 'L' at start of type name.
4340 (get_one_type): Return pointer instead of type. Set type result in
4341 caller via passed type pointer.
4342 (compute_argument_types): Update to use new get_one_type arguments.
4343 (compute_return_type): Likewise.
4344 (make_verifier_context): New. Allocate and initialize 'vfr'.
4345 (free_verifier_context): New. Free 'vfr' and its contents.
4346 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4347 and free_verifier_context.
4349 2004-10-15 Tom Tromey <tromey@redhat.com>
4351 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4352 * verify.h (vfy_fail): Fixed formatting.
4354 * verify-impl.c (vfr): Fixed comment formatting.
4355 (collapse_type): New function.
4356 (verify_instructions): Notify compiler about type map.
4357 * verify.h (vfy_note_stack_depth): Updated.
4358 (vfy_note_stack_type): Likewise.
4359 (vfy_note_local_type): Likewise.
4360 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4362 * verify-glue.c (vfy_note_stack_depth): Correctly size type
4363 state. Added `method' argument.
4364 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
4366 (vfy_note_local_type): New function.
4367 (vfy_unsuitable_type): Likewise.
4368 (vfy_return_address_type): Likewise.
4369 (vfy_null_type): Likewise.
4371 * verify.h (VFY_IN_GCC): Removed.
4372 (VFY_WANT_TYPEMAP): Removed.
4373 * verify-impl.c (verify_instructions_0): Removed useless "\".
4374 (struct state) <next>: Uncomment.
4376 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
4378 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
4381 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4383 * Make-lang.in (verify.o): Re-enabled this target.
4384 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4385 (vfy_get_interface): Likewise.
4386 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4387 * verify.h (verify_jvm_instructions_new): Declare.
4388 * verify-impl.c (free_state): Temporarily comment out unused
4391 2004-10-06 Tom Tromey <tromey@redhat.com>
4393 * java-tree.h (JV_STATE_READ): New enum value.
4395 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4397 * verify.h: New file.
4399 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
4401 * verify-impl.c, verify-glue.c, verify.h: New files.
4402 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4404 2004-09-24 Andrew Haley <aph@redhat.com>
4406 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4407 for a slot if it's of pointer type.
4409 2004-09-14 Tom Tromey <tromey@redhat.com>
4411 * class.c (make_class_data): Correctly initialize "state" field.
4412 Initialize "engine" field.
4413 * decl.c (java_init_decl_processing): Add "engine" field.
4415 2004-09-10 Andrew Haley <aph@redhat.com>
4418 * expr.c (build_invokeinterface): Use fast method for interface
4420 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4421 JTI_ITABLE_PTR_TYPE.
4422 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
4423 (emit_symbol_table): Add new arg, element_size.
4424 * decl.c (java_init_decl_processing): Initialize Class.itable.
4425 * class.c (GEN_TABLE): New macro.
4426 (gen_indirect_dispatch_tables): Use it. Add itable.
4427 (make_class_data): Add new arg for emit_symbol_table().
4429 (add_miranda_methods): Make sure search_class has been parsed.
4430 (emit_symbol_table): Add new arg, element_size.
4432 2004-09-06 Andrew Haley <aph@redhat.com>
4434 * verify.c (merge_types): Return Object for all merges of
4436 * expr.c (add_type_assertion): Don't generate assertions when
4437 source type is array of Object.
4439 2004-09-03 Andrew Haley <aph@redhat.com>
4441 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4443 * lang.c (java_post_options): Force flag_verify_invocations if
4444 we're not using indirect dispatch.
4446 * expr.c (pop_type_0): Move test for interfaces before call to
4447 can_widen_reference_to().
4448 (build_signature_for_libgcj): Remove generation of canonical array
4450 (add_type_assertion): Canonicalize both arrays.
4451 Don't assert that type X can be assigned to Object.
4452 Don't assert that type X an be assigned to type X.
4453 Don't assert that Object can be assigned to type X.
4454 (can_widen_reference_to): Warn whenever we generate an assertion.
4455 (process_jvm_instruction): Use throwable_type_node for the type of
4458 2004-09-01 Andrew Haley <aph@redhat.com>
4460 * decl.c (java_init_decl_processing): Change
4461 verify_identifier_node to "__verify".
4462 * expr.c (add_type_assertion): Use verify_identifier_node for name.
4463 * java-tree.h (verify_identifier_node): Change to "__verify".
4465 * expr.c (build_signature_for_libgcj): New function.
4466 (add_type_assertion): Use it to construct signatures for
4467 source_type and target_type.
4469 2004-08-27 Andrew Haley <aph@redhat.com>
4471 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4472 (verify_identifier_node): New.
4473 (TYPE_VERIFY_METHOD): New.
4474 (struct type_assertion): New type.
4475 * expr.c (type_assertion_eq): New function.
4476 (type_assertion_hash): New function.
4477 (add_type_assertion): New function.
4478 (can_widen_reference_to): Call add_type_assertion().
4479 * decl.c (java_init_decl_processing): Add verify_identifier_node.
4480 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4481 (finish_class): Output TYPE_VERIFY_METHOD (type).
4483 * decl.c (end_java_method): Nullify unused fields.
4485 2004-08-17 Andrew Haley <aph@redhat.com>
4487 * verify.c (defer_merging): Quieten.
4488 * jcf-parse.c (load_class): Only try to open a class file if it's
4489 java.lang.Object or if it's part of the current compilation.
4490 Check that the class we just tried to load is the class we just
4492 (java_parse_file): Set flag_verify_invocations off if we're
4493 compiling from .class.
4494 (parse_zip_file_entries): Abort if we try to read a dummy class.
4495 * expr.c (can_widen_reference_to): Quieten.
4496 (build_invokevirtual): Abort if we try to invokevirtual an
4498 (expand_invoke): Don't build a non-interface call to an interface.
4499 (build_instanceof): Don't do premature optimization if
4500 flag_verify_invocations is not set.
4501 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
4503 (build_static_field_ref): Add correct type conversion for
4505 (add_miranda_methods): Disable generation of Miranda methods for
4507 (layout_class_method): Don't complain about non-static method
4508 overrides static method with dummy classes.
4510 2004-08-13 Tom Tromey <tromey@redhat.com>
4512 * class.c (build_static_field_ref): Re-enable atable lookups for
4515 * parse.y (strip_out_static_field_access_decl): Indentation fix.
4517 2004-08-11 Tom Tromey <tromey@redhat.com>
4519 * gcj.texi (libgcj Runtime Properties): Document new properties.
4521 2004-08-06 Andrew Haley <aph@redhat.com>
4523 * jcf-parse.c (load_class): Check that we really have loaded the
4524 class we're looking for.
4526 2004-07-19 Andrew Haley <aph@redhat.com>
4528 * verify.c (verify_jvm_instructions): Comment change only.
4530 * typeck.c (build_java_array_type): Add size field to array name.
4532 * java-tree.h (LOCAL_SLOT_P): New.
4533 (update_aliases): Add PC argument.
4534 (pushdecl_function_level): New function.
4536 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4537 MODIFY_EXPR, and SAVE_EXPR.
4538 (java_gimplify_modify_expr): New function.
4540 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4541 (expand_iinc): Pass PC to update_aliases().
4542 (STORE_INTERNAL): Likewise.
4543 (process_jvm_instruction): Likewise.
4545 * decl.c (base_decl_map): New variable.
4546 (uniq): New variable.
4547 (update_aliases): Rewrite with more thorough checking.
4548 (debug_variable_p): New function.
4549 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
4550 (check_local_named_variable): Delete whole function.
4551 (initialize_local_variable): New function.
4552 (check_local_unnamed_variable): Add checks and comments.
4553 (find_local_variable): Rewrite.
4554 (java_replace_reference): New function.
4555 (function_binding_level): New variable.
4556 (pushdecl_function_level): New function.
4557 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4558 (maybe_pushlevels): Call pushdecl() on each of the new decls.
4559 (start_java_method): Reset uniq. Create base_decl_map. Set
4560 function_binding_level.
4561 (end_java_method): Null unused fields to save memory.
4563 2004-06-29 Andrew Haley <aph@redhat.com>
4565 * except.c (expand_start_java_handler): Push a new binding level.
4566 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
4567 register_exception_range() to register where we'll do it.
4568 (expand_end_java_handler): Remove old bogus code. Replace with
4569 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4570 the top of the expression we're curently building.
4571 (maybe_end_try): Delete.
4572 * decl.c (binding_level.exception_range): New field.
4573 (clear_binding_level): Add field exception_range. Reformat.
4574 (poplevel): Call expand_end_java_handler().
4575 (poplevel): Call java_add_stmt only if functionbody is false.
4576 (maybe_poplevels): Don't call maybe_end_try() from here.
4577 (end_java_method): Clear no longer used trees in function decl.
4578 (register_exception_range): New function.
4579 * java-tree.h (register_exception_range, struct eh_range): Declare.
4581 2004-06-22 Andrew Haley <aph@redhat.com>
4583 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
4585 * check-init.c (get_variable_decl): Teach check-init about
4586 FIELD_DECLs addressed via the otable.
4587 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
4590 2004-05-28 Andrew Haley <aph@redhat.com>
4592 * jcf-parse.c (load_class): Don't try to read a class that we've
4595 * expr.c (build_invokeinterface): Use the old-fashioned way of
4596 doing indirect dispatch: look up interfaces by name.
4597 * java-tree.h (enum java_tree_index): Add
4598 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
4599 * decl.c (java_init_decl_processing): Add
4600 soft_lookupinterfacemethodbyname_node.
4602 * gjavah.c (print_method_info): Final methods have vtable entries,
4603 so gjavah needs to output them.
4604 * class.c (layout_class_method): Generate vtable entries for final
4606 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
4607 dispatch, even if a method is final.
4609 2004-05-25 Andrew Haley <aph@redhat.com>
4611 * class.c (build_symbol_entry): Convert the names of constructors
4612 to init_identifier_node when generating an entry for the indirect
4615 * expr.c (build_known_method_ref): Generate indirect calls for
4616 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
4618 2004-05-24 Andrew Haley <aph@redhat.com>
4620 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
4621 atable element is of the right type.
4623 * class.c (build_static_field_ref): Cast pointer to correct type
4626 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
4628 * Merged with HEAD as of 20040514. Diff against
4629 gcj-abi-2-merge-20040514.
4631 2004-04-16 Andrew Haley <aph@redhat.com>
4633 * verify.c (check_pending_block): Disable subroutine checks.
4634 (defer_merging): New function.
4635 (merge_types): If types are dummy, use defer_merging to combine them.
4636 (verify_jvm_instructions): If invocation is invokeinterface and
4637 target is dummy, assume target really is an interface.
4639 * parse.y (patch_invoke): Break out call to java_create_object.
4641 * lang.c (flag_verify_invocations): New.
4643 * jcf-parse.c (load_class): If we've already failed to load a
4644 class, don't try again.
4645 (load_class): If we can't find a .class file, don't fail, but emit
4647 (parse_class_file): Don't act on dummy methods.
4649 * java-tree.h (flag_verify_invocations): New.
4651 (lang_type.dummy_class): New field.
4652 (java_create_object): New function.
4653 (METHOD_DUMMY): New.
4655 * expr.c (build_field_ref): Widen field offset.
4656 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
4657 that each of its elements is compatible with the one we're
4659 (pop_type_0): Issue a warning to say that we need to generate a
4661 (java_create_object): New function.
4662 (build_field_ref): Only generate hard refs if we're not using
4664 (expand_java_field_op): If we're using !verify_invocations and we
4665 see a missing field, generate a decl for it.
4667 (expand_invoke): If a class doesn't have the method we seek and
4668 we're using !flag_verify_invocations, generate a decl for the
4671 (build_known_method_ref): Always use indirect dispatch via the
4672 atable for static methods.
4674 (expand_java_NEW): Break out object creation into new function,
4677 (can_widen_reference_to): Issue a warning to say that we need to
4678 generate a runtime check.
4680 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
4681 (make_method_value): Also use index for interfaces.
4682 (make_class_data): Skip dummy field for inherited data.
4683 Don't build method array for dummy methods.
4684 Set size_in_byte to -1 when using inirect dispatch
4685 Don't build a hard class ref if we don't have a hard ref to our
4686 superclass, or if we're using inirect dispatch.
4687 Null out dispatch tables.
4689 (layout_class_method): Don't complain about non-static method
4690 overrides static method is method is artificial.
4692 (build_static_field_ref): Disable atable references to static
4693 fields for the time being.
4695 (layout_class_methods): Check for CLASS_INTERFACE as
4696 well as CLASS_ABSTRACT.
4698 2004-11-24 Steven Bosscher <stevenb@suse.de>
4700 * class.c (make_class_data): Don't check flag_inline_functions.
4701 * lang.c (flag_really_inline): Remove unused flag.
4702 (java_handle_option): Don't set it here. Remove special handling
4703 of flag_inline_functions for Java.
4704 (java_init): Don't set flag_inline_trees here. Already done...
4705 (java_post_options): ...here. Don't clear flag_inline_functions.
4707 2004-11-24 Steven Bosscher <stevenb@suse.de>
4709 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
4710 (java_gimplify_exit_block_expr): New function.
4711 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
4713 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
4714 (EXIT_BLOCK_EXPR): Likewise.
4715 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
4716 (LABELED_BLOCK_BODY): Likewise.
4717 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
4718 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
4719 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
4721 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
4722 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
4723 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
4724 second operand of EXIT_BLOCK_EXPR.
4725 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
4727 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
4729 2004-11-23 Ben Elliston <bje@au.ibm.com>
4731 * xref.h (xref_flag_value): Remove.
4732 (xref_set_data, xref_get_data): Likewise.
4733 (xref_set_current_fp): Likewise.
4734 (XREF_NONE): Likewise.
4735 (XREF_GET_DATA): Likewise.
4736 * xref.c (xref_flag_value): Remove.
4737 (xref_set_data, xref_get_data): Likewise.
4738 (xref_set_current_fp): Likewise.
4740 2004-11-23 Ben Elliston <bje@au.ibm.com>
4742 * gjavah.c (output_directory): Make static.
4743 (temp_directory): Likewise.
4745 2004-11-15 Tom Tromey <tromey@redhat.com>
4747 * decl.c (instn_ptr_type_node): Removed.
4748 (lineNumbers_ptr_type_node): Removed.
4749 (jint_type): Removed.
4750 (jint_ptr_type): Removed.
4752 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
4755 * check-init.c (check_init): Ignore DECL_EXPR.
4756 * expr.c (always_initialize_class_p): Reenable.
4757 (build_class_init): Use a variable to store the decl. Also use
4758 boolean_false_node instead of integer_zero_node.
4759 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
4762 2004-11-08 Tom Tromey <tromey@redhat.com>
4765 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
4766 generating a JNI header.
4767 (print_field_info): Handle JNI headers.
4768 (jni_print_float): Likewise.
4769 (jni_print_double): Likewise.
4771 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
4773 * decl.c (end_java_method): Remove duplicated code.
4775 2004-11-06 Zack Weinberg <zack@codesourcery.com>
4776 Gerald Pfeifer <gerald@pfeifer.com>
4778 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4781 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
4784 * class.c: Reinstate 2004-08-18 patch.
4785 (make_local_function_alias): Don't create an alias for extern (native)
4788 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
4791 * class.c (make_local_function_alias): Revert 2004-08-18 change.
4792 (make_method_value): Likewise.
4794 2004-10-21 Andrew Haley <aph@redhat.com>
4797 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4799 2004-10-20 Andrew Haley <aph@redhat.com>
4801 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4802 Remove duplicated code block.
4804 2004-10-18 Steven Bosscher <stevenb@suse.de>
4806 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
4807 New rules to work around old Bison warnings.
4809 2004-10-17 Steven Bosscher <stevenb@suse.de>
4811 * class.c (ident_subst): Always alloca buffer.
4812 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
4813 opcode after including javaop.def.
4814 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
4815 conditional expression that exits, to avoid warnings.
4816 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
4817 a user of an extension.
4818 * win32-host.c: Move check down to have non-empty file when
4819 WIN32 is not defined.
4821 * Make-lang.in (java-warn): Add STRICT_WARN.
4822 (java/jcf-io.o-warn): Don't have Werror for this file.
4823 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
4825 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
4827 * expr.c (expr_add_location): Move declaration to before all
4829 * parse.y (java_expand_classes): Ditto.
4830 * lex.c (java_peek_unicode): Ditto.
4832 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
4834 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
4835 if possible, else convert `foo' to 'foo'.
4836 * class.c: Likewise.
4839 * jcf-io.c: Likewise.
4840 * jcf-parse.c: Likewise.
4843 * parse.h: Likewise.
4845 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
4847 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
4848 rename parameter 'msg' to 'msgid' in function declaration.
4849 (issue_warning_error_from_context): Likewise.
4850 (yyerror): Rename parameter 'msg' to 'msgid'.
4851 (all over): Use new quoting style for diagnostics.
4853 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
4855 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
4856 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
4859 2004-10-14 Matt Austern <austern@apple.com>
4861 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
4864 2004-10-13 Tom Tromey <tromey@redhat.com>
4867 * lang.opt (--extdirs): Document.
4868 * jvspec.c (lang_specific_driver): Recognize -encoding and
4871 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
4873 * parse.y (issue_warning_error_from_context): Use va_list *
4874 instead of va_list parameter.
4875 (parse_error_context): Update call.
4876 (parse_warning_context): Likewise.
4878 2004-10-05 Zack Weinberg <zack@codesourcery.com>
4880 * parse.y, parse-scan.y: Add list of diagnostic messages to
4881 insulate translation template from version of yacc/bison used
4882 to compile the grammar.
4884 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
4886 Prepare for %q, %< and %> in diagnostic message strings.
4887 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
4888 Name second parameter 'msgid'.
4889 * parse.y: Additionally include pretty-print.h and diagnostic.h.
4890 (issue_warning_error_from_context): Use pretty-printer functions
4891 instead of vsprintf for constructing formatted messages. Rename
4892 parameter 'msg' to 'msgid'.
4893 (parse_error_context): Rename parameter 'msg' to 'msgid'.
4894 (parse_warning_context): Likewise.
4896 2004-10-05 Andrew Haley <aph@redhat.com>
4899 * jcf-parse.c (parse_zip_file_entries): If a class has a
4900 superclass and a TYPE_SIZE of zero, lay it out.
4902 2004-09-30 Andrew Haley <aph@redhat.com>
4905 * jcf-parse.c (compute_class_name): Rewrite.
4907 2004-10-01 Jan Hubicka <jh@suse.cz>
4909 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
4911 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
4913 * lex.c: Fix a comment typo.
4915 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
4917 * java-tree.h: Fix a comment typo.
4919 2004-09-30 Per Bothner <per@bothner.com>
4921 Simplify lexer. Implement --enable-mapped-location support.
4922 * jcf-parse.c (parse_class_file): Use linemap_line_start.
4923 (parse_source_file_1): Pass filename as extra parameter, so we can call
4924 linemap_add and set input_location here, rather than in both callers.
4925 (read_class): Pass copied filename to parse_source_file_1.
4926 Don't initialize wfl_operator - only needed for source compilation.
4927 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
4928 * lex.h: Remove a bunch of debugging macros.
4929 * lex.h (struct_java_line, struct java_error): Remove types.
4930 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
4931 (struct java_lc_s): Remove prev_col field.
4932 (struct java_lexer): New fields next_unicode, next_columns, and
4933 avail_unicode. New position field, and maybe token_start field.
4934 Don't need hit_eof field - use next_unicode == -1 instead.
4935 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
4936 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
4937 * parse.h: Various changes for USE_MAPPED_LOCATION.
4938 (EXPR_WFL_EMIT_LINE_NOTE): XXX
4939 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
4940 (struct parser_ctxt): New file_start_location field.
4941 Remove p_line, c_line fields since we no longer save lines.
4942 Remove elc, lineno, and current_jcf fields - no longer used.
4943 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
4944 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
4945 source_location and is probably not needed anymore anyway.
4946 Use new expr_add_Location function.
4947 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
4948 (java_pop_parser_context): Minor cleanup.
4949 (java_parser_context_save_global, java_parser_context_restore_global,
4950 java_pop_parser_context): Save/restore input_location as a unit.
4951 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
4952 a source_location instead of a wfl context node.
4953 (check_class_interface_creation): input_filename is not addressable.
4954 (create_artificial_method): Calling java_parser_context_save_global
4955 and java_parser_context_restore_global is overkill. Instead,
4956 temporarily set input_location from class decl.
4957 (java_layout_seen_class_methods): Set input_location from method decl.
4958 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
4959 (finish_loop_body): Likewise.
4960 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
4961 (java_sprint_unicode): Take a character, not index in line.
4962 (java_sneak_uncode): Replaced by java_peek_unicode.
4963 (java_unget_unicode): No longer used.
4964 (java_allocate_new_line. java_store_unicode): Removed, since we
4965 no longer remember "lines".
4966 (java_new_lexer): Update for new data structures.
4967 (java_read_char): Move unget_value checking to java_read_unicode.
4968 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
4969 efficient functions that are used directly when lexing.
4970 (java_read_unicode_collapsing_terminators): No longer needed.
4971 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
4972 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
4973 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
4974 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
4975 combine switch branches, and test for common token kinds earlier.
4976 (java_lex_error): Rewrite.
4977 * jv-scan.c (expand_location): New function, copied from tree.c.
4978 (main): Set ctxp->filename instead of setting input_filename directly.
4980 2004-09-30 Per Bothner <per@bothner.com>
4982 More cleanup for --enable-mapped-location.
4983 * class.c (push_class): If USE_MAPPED_LOCATION don't set
4984 input_location here. Instead do it in give_name_to_class.
4985 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
4986 * expr.c (expand_byte_code): Call linemap_line_start.
4987 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
4988 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
4989 (expr_add_location): New function, if USE_MAPPED_LOCATION.
4990 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
4991 to USE_MAPPED_LOCATION case.
4993 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
4994 * jcf-parse.c (java_parse_file): Don't set input_filename.
4995 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
4996 Create a list of TRANSLATION_UNIT_DECL.
4997 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
4998 reason is so we can set a DECL_SOURCE_LOCATION for each file.
4999 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5000 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5001 (file_start_location): New static.
5002 (set_source_filename): Avoid extra access to input_filename macro.
5003 Concatenate new name with class's package prefix.
5004 (set_source_filename, give_name_to_class): Update.
5005 (give_name_to_class): Set class's "line 0" input_location here.
5006 (parse_class_file): Set input_location as a unit.
5008 * jcf-parse.c (load_class): Sanity test if missing inner class file.
5010 2004-09-29 Per Bothner <per@bothner.com>
5012 * java-tree.h: Redefine some macros and add some declaration
5013 to handle the USE_MAPPED_LOCATION case.
5014 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
5015 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
5016 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5017 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5019 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5020 * decl.c (finish_method, java_add_stmt): Likewise.
5021 * java-gimplify.c (java-gimplify.c): Likewise.
5022 * jcf-write.c (generate_bytecode_insns): Likewise.
5023 * lang.c (java_post_options): Likewise - call linemap_add.
5025 2004-09-29 Andrew Haley <aph@redhat.com>
5028 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5029 result of TRUNC_MOD_EXPR.
5030 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5031 * decl.c (java_init_decl_processing): Mark
5032 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5034 2004-09-28 Tom Tromey <tromey@redhat.com>
5037 * class.c (add_miranda_methods): Load superinterface if not
5040 2004-09-28 Andrew Haley <aph@redhat.com>
5043 * jcf-parse.c (load_class): Don't try to read a class that we've
5046 2004-09-28 Andrew Haley <aph@redhat.com>
5048 * jcf-parse.c (load_class): Back out previous broken patch.
5050 2004-09-28 Andrew Haley <aph@redhat.com>
5053 * jcf-parse.c (load_class): Don't try to read a class that we've
5055 Check that we really did read the right class.
5057 2004-09-25 Tom Tromey <tromey@redhat.com>
5060 * parse.y (create_artificial_method): Use add_method_1.
5062 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
5064 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5066 * gcj.texi: Fix typos.
5068 2004-09-24 Tom Tromey <tromey@redhat.com>
5071 * parse.y (class_instance_creation_expression): Set `$$' to NULL
5072 in error parts of rule.
5073 (unary_expression): Don't call error_if_numeric_overflow when $1
5076 2004-09-24 Tom Tromey <tromey@redhat.com>
5079 * parse.y (resolve_qualified_expression_name): Set
5080 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5081 * expr.c (force_evaluation_order): Check for empty argument list
5082 after stripping COMPOUND_EXPR.
5084 2004-09-23 Andrew Haley <aph@redhat.com>
5087 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5090 2004-09-23 Tom Tromey <tromey@redhat.com>
5093 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5094 where operand is null.
5096 2004-09-23 Tom Tromey <tromey@redhat.com>
5099 * parse.y (not_accessible_p): Allow access to protected members
5100 even when class is not static.
5102 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
5104 * Make-lang.in: Revert the gcc-none.o change.
5106 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
5108 * parse.y (patch_anonymous_class): VEC_space returns true if there
5111 2004-09-21 Matt Austern <austern@apple.com>
5114 * gjavah.c (free_method_name_list): Fix function definition so
5115 it's a proper C prototype.
5117 2004-09-21 Tom Tromey <tromey@redhat.com>
5120 * gjavah.c (free_method_name_list): New method.
5123 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
5124 Zack Weinberg <zack@codesourcery.com>
5126 * java-tree.def: Use tree_code_class enumeration constants
5127 instead of code letters.
5128 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5129 new tree-class enumeration constants.
5131 2004-09-13 Tom Tromey <tromey@redhat.com>
5134 * class.c (layout_class_method): Put synthetic methods into the
5137 2004-09-11 Andrew Pinski <apinski@apple.com>
5139 * Make-lang.in (java/ggc-none.c): Change dependency
5140 for ggc.h into $(GGC_H).
5142 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5144 * Make-lang.in (java/win32-host.o): Add dependency on
5146 * win32-host.c: Add includes for coretypes.h, jcf.h
5148 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5150 * Make-lang.in (GCJH_OBJS): Change dependency from
5151 ggc-none.o to java/ggc-none.o
5152 (JCFDUMP_OBJS): Likewise.
5153 (java/ggc-none.o): New target.
5155 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
5157 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
5158 * class.c (build_utf8_ref, build_static_field_ref,
5159 make_field_value, make_method_value, get_dispatch_table,
5160 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5161 * constants.c (get_tag_node, build_ref_from_constant_pool,
5162 build_constants_constructor): Likewise.
5163 * decl.c (java_init_decl_processing): Likewise.
5164 * expr.c (build_java_array_length_access, build_newarray,
5165 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5166 build_java_binop, build_field_ref, expand_java_add_case,
5167 expand_java_call, build_known_method_ref, build_invokevirtual,
5168 build_invokeinterface, build_jni_stub): Likewise.
5169 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5170 * jcf-parse.c (get_constant): Likewise.
5171 * lex.c (do_java_lex): Likewise.
5172 * parse.y (patch_binop, patch_unaryop, patch_cast,
5173 build_newarray_node, patch_newarray): Likewise.
5174 * resource.c (compile_resource_data): Likewise.
5175 * typeck.c (build_prim_array_type): Likewise.
5177 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
5179 * decl.c (java_init_decl_processing): Adjust
5180 initialize_sizetypes call.
5182 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
5184 * jv-scan.c (fancy_abort): Add.
5186 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
5188 * expr.c (build_java_arrayaccess): Use convert to change
5191 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
5193 * class.c (make_local_function_alias): Allocate extra space for 'L'
5194 in name buffer. Reported by Thomas Neumann.
5196 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
5198 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5199 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
5200 * lex.c (do_java_lex): Adjust.
5201 (error_if_numeric_overflow): Likewise.
5203 2004-08-18 Andrew Pinski <apinski@apple.com>
5205 * class.c (make_local_function_alias): Only make a new decl if we
5206 support alias attribute on all decls.
5208 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
5210 * class.c (make_local_function_alias): New function. Create local
5211 alias for public method DECL.
5212 (make_method_value): Use make_local_function_alias.
5213 * parse.y (craft_constructor): Don't special-case anonymous classes.
5214 Always set ctor_name to init_identifier_node.
5215 (lookup_method_invoke): Call layout_class_method when creating
5216 anonymous class constructor.
5218 2004-08-18 Richard Henderson <rth@redhat.com>
5220 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5221 default case. Treat '<' similarly. Update for
5222 is_gimple_formal_tmp_var name change.
5224 2004-08-17 Andrew Haley <aph@redhat.com>
5226 * lang.c (lang_printable_name): Obey verbose flag.
5227 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5228 lang_printable_name().
5229 (verify_constructor_circularity, get_printable_method_name,
5230 check_abstract_method_definitions, java_check_regular_methods,
5231 java_check_abstract_methods, check_inner_class_access,
5232 fix_constructors, patch_method_invocation, patch_return):
5234 * expr.c (pop_type_0): Likewise.
5236 * java-tree.h (lang_printable_name_wls): Delete.
5238 2004-08-16 Tom Tromey <tromey@redhat.com>
5241 * parse.y (primary): Changed for initialized and uninitialized
5243 (array_access): Handle array_creation_initialized.
5244 (array_creation_expression): Split into
5245 array_creation_initialized and array_creation_uninitialized.
5247 2004-08-16 Andrew Haley <aph@redhat.com>
5249 * jcf-write.c (find_constant_index): Canonicalize NaNs when
5250 generating bytecode.
5252 2004-08-16 Elliot Lee <sopwith@redhat.com>
5255 * jcf-parse.c (java_parse_file): Handle filenames with embedded
5256 spaces, and quoted filelists.
5258 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
5260 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5261 * class.c (build_utf8_ref, build_static_field_ref,
5262 make_field_value, make_method_value, get_dispatch_table,
5263 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5264 * constants.c (get_tag_node, build_ref_from_constant_pool,
5265 build_constants_constructor): Likewise.
5266 * decl.c (java_init_decl_processing): Likewise.
5267 * expr.c (build_java_array_length_access, build_newarray,
5268 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5269 build_java_binop, build_field_ref, expand_java_add_case,
5270 expand_java_call, build_known_method_ref, build_invokevirtual,
5271 build_invokeinterface, build_jni_stub): Likewise.
5272 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5273 * jcf-parse.c (get_constant): Likewise.
5274 * lex.c (do_java_lex): Likewise.
5275 * parse.y (patch_binop, patch_unaryop, patch_cast,
5276 build_null_of_type, patch_newarray): Likewise.
5277 * resource.c (compile_resource_data): Likewise.
5278 * typeck.c (build_prim_array_type): Likewise.
5280 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
5282 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5283 Don't create BLOCK here or call java_gimplify_block.
5285 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
5287 * java-tree.h (flag_deprecated): Removed.
5288 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5289 * parse.y (check_deprecation): Check warn_deprecated instead of
5292 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
5294 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5295 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5296 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5297 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5298 flag_force_classes_archive_check, flag_optimize_sci,
5299 flag_indirect_dispatch): Remove explicit declarations.
5300 * lang.opt: Add implicit declare/define/assign. Remove obsolete
5303 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
5306 * Make-lang.in (java.install-man): Install from either build
5307 tree or source tree, whichever has the file first.
5309 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
5311 * jcf-parse.c (get_constant): Adjust force_fit_type call.
5312 * lex.h (SET_LVAL_NODE_TYPE): Remove.
5313 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5314 (do_java_lex): Likewise. Adjust force_fit_type call.
5316 2004-08-04 Roger Sayle <roger@eyesopen.com>
5317 Andrew Haley <aph@redhat.com>
5319 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5320 checking trees as they're being built.
5321 (convert): Call convert_ieee_real_to_integer if we're
5322 converting a constant, even if we're writing a class file.
5324 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
5327 * parse.y (fold_constant_for_init): Call resolve_field_access with
5328 correct current_class context.
5330 2004-08-01 Roger Sayle <roger@eyesopen.com>
5332 * decl.c (update_aliases, initialize_local_variable): Replace calls
5333 to build with calls to buildN.
5334 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5335 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5336 * parse.h (BUILD_THROW): Likewise.
5337 * parse.y (switch_expression, synchronized_statement,
5338 catch_clause_parameter, array_creation_expression,
5339 conditional_expression, make_qualified_name,
5340 resolve_qualified_expression_name, patch_method_invocation,
5341 patch_invoke, build_method_invocation, build_new_invocation,
5342 build_assignment, patch_assignment, build_binop, patch_binop,
5343 build_string_concatenation, build_incdec, patch_unaryop,
5344 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5345 patch_return, build_if_else_statement, build_labeled_block,
5346 build_new_loop, build_loop_body, build_bc_statement,
5347 build_assertion, encapsulate_with_try_catch, build_try_statement,
5348 build_try_finally_statement, patch_synchronized_statement,
5349 emit_test_initialization): Likewise, replace build with buildN.
5351 2004-07-28 Eric Christopher <echristo@redhat.com>
5353 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5354 (java_unsafe_for_reeval): Ditto.
5356 2004-07-26 <hp@bitrange.com>
5358 * parse.y (build_super_invocation): Adjust declaration order to
5359 avoid declaration after statement.
5361 2004-07-25 Bernardo Innocenti <bernie@develer.com>
5363 * decl.c: Rename all identifiers named `class' to `cl'.
5365 2004-07-25 Richard Henderson <rth@redhat.com>
5367 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5369 2004-07-23 Mike Stump <mrs@apple.com>
5371 * boehm.c (set_bit): Improve type safety wrt unsignedness.
5372 * gjavah.c (throwable_p, decode_signature_piece,
5373 print_full_cxx_name, print_include, add_namelet, add_class_decl,
5374 process_file): Likewise.
5375 * jcf-dump.c (main): Likewise.
5376 * jcf-io.c (read_zip_member): Likewise.
5377 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5378 give_name_to_class, get_class_constant): Likewise.
5379 * jcf-write.c (find_constant_wide, push_long_const,
5380 generate_classfile): Likewise.
5381 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5382 * parse.y (read_import_dir): Likewise.
5383 * typeck.c (parse_signature_type): Likewise.
5384 * verify.c (verify_jvm_instructions): Likewise.
5385 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5387 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
5389 * Make-lang.in: Replace rmic and rmiregistry references with
5390 grmic and grmiregistry.
5391 * gcj.texi: Likewise.
5393 2004-07-20 Andrew Haley <aph@redhat.com>
5396 * verify.c (verify_jvm_instructions): Comment change only.
5398 * typeck.c (build_java_array_type): Add size field to array name.
5400 * java-tree.h (LOCAL_SLOT_P): New.
5401 (update_aliases): Add PC argument.
5402 (pushdecl_function_level): New function.
5404 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5405 MODIFY_EXPR, and SAVE_EXPR.
5406 (java_gimplify_modify_expr): New function.
5408 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5409 (expand_iinc): Pass PC to update_aliases().
5410 (STORE_INTERNAL): Likewise.
5411 (process_jvm_instruction): Likewise.
5413 * decl.c (base_decl_map): New variable.
5414 (uniq): New variable.
5415 (update_aliases): Rewrite with more thorough checking.
5416 (debug_variable_p): New function.
5417 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5418 (check_local_named_variable): Delete whole function.
5419 (initialize_local_variable): New function.
5420 (check_local_unnamed_variable): Add checks and comments.
5421 (find_local_variable): Rewrite.
5422 (java_replace_reference): New function.
5423 (function_binding_level): New variable.
5424 (pushdecl_function_level): New function.
5425 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5426 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5427 (start_java_method): Reset uniq. Create base_decl_map. Set
5428 function_binding_level.
5429 (end_java_method): Null unused fields to save memory.
5431 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
5433 * class.c (add_interface_do): Remove.
5434 (set_super_info, interface_of_p, maybe_add_interface,
5435 add_interface, make_class_data, layout_class,
5436 add_miranda_methods): Adjust BINFO accessors and addition.
5437 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5439 * jcf-write.c (generate_classfile): Likewise.
5440 * parse.y (patch_anonymous_class, check_inner_circular_reference,
5441 check_circular_reference, java_complete_class,
5442 check_abstract_method_definitions,
5443 java_check_abstract_method_definitions,
5444 check_interface_throws_clauses, java_check_abstract_methods,
5445 lookup_java_interface_method2,
5446 find_applicable_accessible_methods_list): Adjust BINFO accessors
5448 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5450 2004-07-18 Roger Sayle <roger@eyesopen.com>
5452 * builtins.c (max_builtin, min_builtin,
5453 java_build_function_call_expr): Replace calls to build with buildN.
5454 * class.c (build_class_ref, build_static_field_ref,
5455 get_dispatch_table, make_class_data, layout_class_method): Likewise.
5456 * constants.c (build_ref_from_constant_pool): Likewise.
5457 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5458 add_stmt_to_compound): Likewise.
5459 * except.c (build_exception_object_ref, expand_end_java_handler):
5461 * java-gimplify.c (java_gimplify_case_expr,
5462 java_gimplify_default_expr, java_gimplify_block,
5463 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5464 * jcf-write.c (generate_bytecode_insns): Likewise.
5465 * typeck.c (convert_ieee_real_to_integer): Likewise.
5467 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
5469 * java-tree.h (builtin_function): Declare.
5471 2004-07-16 Steven Bosscher <stevenb@suse.de>
5473 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5474 abuse restore_line_number_status.
5476 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
5479 * jcf-parse.c (java_emit_static_constructor): Specify default
5482 2004-07-13 Per Bothner <per@bothner.com>
5484 * java-tree.h (all_class_filename): Remove useless macro.
5485 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
5486 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
5487 * parse.y (java_parser_context_restore_global): Replace
5488 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
5489 * jcf-parse.c (read_class, java_parse_file): Likewise.
5491 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
5494 gjavah.c (print_field_info): Emit constant only if field is static.
5496 2004-07-11 Roger Sayle <roger@eyesopen.com>
5498 * expr.c (java_truthvalue_conversion, flush_quick_stack,
5499 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
5500 build_java_ret, build_java_throw_out_of_bounds_exception,
5501 build_java_array_length_access, java_check_reference,
5502 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
5503 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
5504 expand_java_arrayload, build_java_monitor, expand_java_return,
5505 expand_load_internal, expand_java_NEW, build_get_class,
5506 build_instanceof, expand_java_CHECKCAST, expand_iinc,
5507 build_java_soft_divmod, build_java_binop, build_field_ref,
5508 expand_compare, expand_java_goto, expand_java_switch,
5509 expand_java_add_case, build_class_init, build_known_method_ref,
5510 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
5511 expand_invoke, build_jni_stub, expand_java_field_op,
5512 java_expand_expr, expand_byte_code, STORE_INTERNAL,
5513 force_evaluation_order, emit_init_test_initialization): Convert
5514 calls to "build" into calls to the prefered "buildN" functions.
5516 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
5518 * java-tree.h (set_block): Remove.
5519 * lang.c (java_clear_binding_stack): New.
5520 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5521 * decl.c (struct binding_level): Remove this_block.
5522 (clear_binding_level): Likewise.
5523 (poplevel): Don't handle this_block.
5524 (set_block): Remove.
5526 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
5528 * class.c (common_enclosing_context_p): Remove statement with no
5531 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
5534 * parse.y (create_anonymous_class): Remove 'location' argument. Use
5535 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
5536 (craft_constructor): Inherit access flags for implicit constructor
5537 from the enclosing class.
5538 (create_class): Fix comment typo.
5539 (resolve_qualified_expression_name): Pass type of qualifier to
5540 not_accessible_p, not the type in which target field was found.
5541 (not_accessible_p): Handle inner classes. Expand protected
5542 qualifier-subtype check to enclosing instances, but don't apply this
5543 check to static members. Allow protected access to inner classes
5544 of a subtype. Allow private access within common enclosing context.
5545 (build_super_invocation): Get WFL line number info from current
5547 (build_incomplete_class_ref): Update for new create_anonymous_class
5549 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
5550 common_enclosing_instance_p.
5551 * class.c (common_enclosing_context_p): New. Determine if types
5552 share a common enclosing context, even across static contexts.
5553 (common_enclosing_instance_p): Renamed from
5554 common_enclosing_context_p. Determines if types share a common
5555 non-static enclosing instance.
5556 * java-tree.h (common_enclosing_instance_p): Declare.
5557 * jcf-write.c (get_method_access_flags): New. Surpress private flag
5558 for inner class constructors.
5559 (generate_classfile): Use get_method_access_flags.
5561 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
5563 * class.c (interface_of_p): Check for null TYPE_BINFO.
5565 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
5567 * class.c (make_class): Do not create binfo here.
5568 (set_super_info): Create it here.
5569 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
5571 2004-07-08 Richard Henderson <rth@redhat.com>
5573 * expr.c (case_identity, get_primitive_array_vtable,
5574 java_expand_expr, emit_init_test_initialization): Remove.
5575 * java-tree.h (java_expand_expr): Remove.
5576 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
5578 2004-07-07 Per Bothner <per@bothner.com>
5580 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
5581 get internal error due to mismatched types.
5583 * gcj.texi (Invoking gij): Document new -verbose:class flag.
5585 * gcj.texi (Linking): New node. Document -lgij usage.
5587 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
5589 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
5590 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
5591 * java/class.c (set_super_info, class_depth, interface_of_p,
5592 maybe_add_interface, add_interface, make_class_data,
5593 layout_class, add_miranda_methods): Adjust BINFO macros.
5594 * expr.c (can_widen_reference_to, lookup_field): Likewise.
5595 * jcf-write.c (generate_classfile): Likewise.
5596 * parse.y (patch_anonymous_class,
5597 check_inner_circular_reference, check_circular_reference,
5598 java_complete_class, check_abstract_method_definitions,
5599 java_check_abstract_method_definitions,
5600 check_interface_throws_clauses, java_check_abstract_methods,
5601 lookup_java_interface_method2,
5602 find_applicable_accessible_methods_list): Likewise.
5603 * typeck.c (find_method_in_interface): Likewise.
5604 * verify.c (merge_types): Likewise.
5606 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
5608 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
5609 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
5611 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
5613 * class.c (make_class): Use make_tree_binfo.
5614 (set_super_info, add_interface_do): Likewise.
5615 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
5617 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
5619 * verify.c: Correct array element access formatting thinko.
5621 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
5623 * verify.c: Insert a short blurb at the start referring to the JVMS.
5624 (merge_type_state): Remove redundant nested if statement.
5625 (verify_jvm_instructions): Ensure current_subr is initialised to
5627 Minor formatting fixes all over the place.
5629 2004-07-02 Richard Henderson <rth@redhat.com>
5631 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
5633 2004-07-01 Richard Henderson <rth@redhat.com>
5635 * class.c (registerClass_libfunc): Remove.
5636 (init_class_processing): Don't set it.
5637 (emit_register_classes): Take list_p parameter. Fill it in
5638 with _Jv_RegisterClass calls.
5639 * decl.c (java_init_decl_processing): Don't call
5640 init_resource_processing.
5641 * jcf-parse.c (java_emit_static_constructor): New.
5642 (java_parse_file): Call it.
5643 * resource.c (registerResource_libfunc): Remove.
5644 (init_resource_processing): Remove.
5645 (write_resource_constructor): Take list_p parameter. Fill it in
5646 with _Jv_RegisterResource calls.
5647 * java-tree.h: Update prototypes.
5649 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
5652 * class.c (layout_class_method): Do not override package-private
5653 method if its in a different package.
5654 (split_qualified_name): Move here from parse.y. Rename from
5655 breakdown_qualified. Add comment.
5656 (in_same_package): Move here from parse.y. Add comment.
5657 * java-tree.h (break_down_qualified, in_same_package): Declare.
5658 (in_same_package): Likewise.
5659 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
5662 2004-06-29 Andrew Haley <aph@redhat.com>
5664 * except.c (expand_start_java_handler): Push a new binding level.
5665 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
5666 register_exception_range() to register where we'll do it.
5667 (expand_end_java_handler): Remove old bogus code. Replace with
5668 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5669 the top of the expression we're curently building.
5670 (maybe_end_try): Delete.
5671 * decl.c (binding_level.exception_range): New field.
5672 (clear_binding_level): Add field exception_range. Reformat.
5673 (poplevel): Call expand_end_java_handler().
5674 (poplevel): Call java_add_stmt only if functionbody is false.
5675 (maybe_poplevels): Don't call maybe_end_try() from here.
5676 (end_java_method): Clear no longer used trees in function decl.
5677 (register_exception_range): New function.
5678 * java-tree.h (register_exception_range, struct eh_range): Declare.
5680 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
5682 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
5684 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
5687 * expr.c (class_has_finalize_method): Fix method name indentation.
5688 (expand_java_call): Remove K&R style parameter declaration.
5689 (expand_invoke): Fix statement indentation.
5690 (expand_java_field_op): Likewise.
5691 * parse-scan.y: Fix typo.
5692 (reset_report): Fix method name indentation.
5693 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
5695 * verify.c (verify_jvm_instructions): Document parameters, insert
5697 * lang.c (lang_init_source): Fix method name indentation.
5698 * class.c (common_enclosing_context_p): Likewise.
5699 (emit_symbol_table): Fix parameter list indentation.
5700 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
5701 parameter declaration.
5702 * constants.c: Fix copyright notice indentation.
5703 * typeck.c (find_method_in_superclasses): Fix parameter list
5705 (find_method_in_interfaces): Likewise.
5706 * zextract.c (makelong): Fix method name indentation.
5708 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5711 * parse.y (create_interface): Set correct access modifiers for
5713 * jcf-write.c (get_classfile_modifiers): New function.
5714 (generate_classfile): Use get_classfile_modifiers, not
5717 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5719 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
5720 dependency to current parser context, not NULL_TREE, for top-level
5722 (jdep_resolve_class): Enable member access check for all inner
5725 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5727 * parse.y (qualify_and_find): Pass type decl, not identifier, to
5730 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5733 * expr.c (expand_java_field_op): Ensure that target class for static
5734 field access has been loaded.
5736 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5737 Ranjit Mathew <rmathew@hotmail.com>
5739 PR java/1207, java/16178
5740 * jcf-parse.c (load_class): Return immediately if passed a type decl
5741 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
5742 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
5743 before calling load_class.
5744 (qualify_and_find): Likewise.
5745 (find_in_imports_on_demand): Likewise.
5746 (find_applicable_accessible_methods_list): Likewise.
5748 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
5750 * parse.y (java_layout_seen_class_methods): Don't call load_class
5751 on class defined by source parser.
5753 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
5755 * parse.y (set_nested_class_simple_name_value): Removed.
5756 (java_complete_expand_class): Remove calls to
5757 set_nested_class_simple_name_value.
5759 2004-06-22 Andrew Haley <aph@redhat.com>
5760 Ranjit Mathew <rmathew@hotmail.com>
5762 Fixes PR java/16113.
5763 * decl.c (force_poplevels): Remove call to expand_end_bindings.
5765 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
5767 * parse.y (create_class): Correct diagnostic message about
5768 java.lang.Object extending anything else.
5770 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5772 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
5773 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
5774 * constants.c (build_ref_from_constant_pool): Likewise.
5775 * expr.c (build_java_array_length_access): Likewise.
5776 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
5777 (invoke_build_dtable, build_invokevirtual): Likewise.
5778 (build_invokeinterface, java_expand_expr): Likewise.
5779 (emit_init_test_initialization): Likewise.
5780 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5781 * parse.y (make_qualifed_name, build_array_ref): Likewise.
5783 2004-06-21 Andrew Haley <aph@redhat.com>
5785 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
5788 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
5790 * jcf.h (struct JCF): Change java_source, right_zip and finished
5792 * lex.h (struct java_lexer): Change hit_eof, read_anything,
5793 byte_swap and use_fallback to unsigned int.
5794 * parse.h (struct _jdep): Change flag0 to unsigned int.
5796 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
5799 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
5800 before trying to lay out its methods.
5801 * jcf-parse.c (read_class): Track parsed files using canonical paths
5802 obtained via lrealpath from libiberty.
5803 (java_parse_file): Likewise.
5804 (parse_source_file_1): Rename formal parameter to reflect its
5805 modified purpose. Minor formatting fix.
5807 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
5809 * class.c (emit_register_classes): Make the function uninlinable,
5810 do not set current_function_cannot_inline.
5811 * resource.c (write_resource_constructor): Do not reset
5812 flag_inline_functions around rest_of_compilation.
5814 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
5817 * expr.c (java_truthvalue_conversion): Handle
5818 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
5819 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
5820 i.e. return the expression.
5822 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
5824 * gjavah.c: Include version.h
5826 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
5828 * jcf-write.c (generate_bytecode_conditional): Correct handling
5829 of unordered conditionals. Add comment.
5831 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
5832 Per Bothner <per@bothner.com>
5834 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
5835 local variable was initialised upon declaration.
5836 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
5837 variable was final and initialised upon declaration.
5838 * check-init.c (check_final_reassigned): Give error only if a blank
5839 final is not definitely unassigned or if an initialised final is
5841 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
5842 assignment expressions. Remove case MODIFY_EXPR, label do_default.
5843 (check_init): Perform initialised-variable-removing-optimisation
5844 only on non-final local variables.
5846 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5848 * jcf-write.c (generate_bytecode_conditional): Handle binops
5849 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
5851 (generate_bytecode_insns): Likewise.
5853 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5855 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
5856 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
5858 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5860 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
5861 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
5863 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
5865 * decl.c (struct binding_level): Add GTY marker. Compile
5866 binding_depth unconditionally.
5867 (current_binding_level, free_binding_level, global_binding_level):
5869 (clear_binding_level): Unconditionally set binding_depth.
5870 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
5872 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
5874 * lex.c (java_new_lexer): Set 'encoding'.
5875 (java_read_char): Improve error message for unrecognized characters.
5876 * lex.h (struct java_lexer): New field 'encoding'.
5878 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
5880 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
5882 2004-05-21 Mark Wielaard <mark@klomp.org>
5884 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
5887 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
5889 * typeck.c: Remove non-printable character 160.
5891 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
5893 * check-init.c: Correct minor typos.
5895 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5897 * Make-lang.in, expr.c, java-gimplify.c: Rename
5898 tree-simple.[ch] to tree-gimple.[ch].
5900 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
5902 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
5904 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5906 Merge from tree-ssa-20020619-branch. See
5907 ChangeLog.tree-ssa for details.
5909 * Make-lang.in, builtins.c, check-init.c, class.c,
5910 constants.c, decl.c, except.c, expr.c, java-except.h,
5911 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
5912 lang.c, lang.opt, parse.y, resource.c: Merged.
5913 * java-gimplify.c: New file.
5915 2004-05-10 Andrew Haley <aph@redhat.com>
5917 * parse.y (create_class): Set TYPE_VFIELD.
5918 * decl.c (java_init_decl_processing): Likewise.
5920 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
5921 * class.c (make_method_value): Replace DECL_VINDEX with call to
5923 (get_dispatch_vector): Likewise.
5924 (layout_class_method): Likewise.
5925 Replace set of DECL_VINDEX with call to set_method_index().
5926 (set_method_index): New function.
5927 (get_method_index): New function.
5928 * java-tree.h (set_method_index): New function decl.
5929 (get_method_index): New function decl.
5931 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
5933 * parse.y (check_pkg_class_access): Add new argument
5934 and use it when cl is NULL to call lookup_cl on it.
5935 (parser_check_super_interface): Do not call lookup_cl.
5936 Pass this_decl to check_pkg_class_access and NULL
5937 instead of lookup_cl.
5938 (parser_check_super): Update for change in
5939 check_pkg_class_access.
5940 (do_resolve_class): Likewise.
5941 (process_imports): Likewise.
5942 (find_in_imports_on_demand): Likewise.
5943 (resolve_qualified_expression_name): Likewise.
5945 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
5947 Fixes PR java/9685, PR java/15073
5948 * parse.y (accessibility_string): New method.
5949 (not_accessible_field_error): Use accessibility_string()
5950 instead of java_accstring_lookup().
5951 (resolve_qualified_expression_name): Check with
5952 check_pkg_class_access() before allowing access using
5955 Use check_pkg_class_access() instead of not_accessible_p()
5956 for unqualified types.
5957 (not_accessible_p): Use DECL_CONTEXT (member) instead of
5958 REFERENCE for package-private access checking.
5959 (patch_method_invocation): Use accessibility_string() instead
5960 of java_accstring_lookup().
5962 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
5965 * gjavah.c (struct method_name): Add member is_native.
5966 (overloaded_jni_method_exists_p): Match candidate method only if
5968 (print_method_info): Initialise is_native flag from the method's
5971 2004-04-30 Roger Sayle <roger@eyesopen.com>
5973 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
5974 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
5976 2004-04-22 Roger Sayle <roger@eyesopen.com>
5978 * resource.c (write_resource_constructor): Guard call to possibly
5979 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
5981 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
5983 * class.c (make_class_data): Add new field aux_info.
5984 * decl.c (java_init_decl_processing): Push type and decl for
5987 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
5989 * expr.c (expand_java_NEW): Don't use size argument for
5990 _Jv_AllocObject calls.
5991 * parse.y (patch_invoke): Likewise.
5993 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
5995 * expr.c (build_invokeinterface): Remove unused variables to
5998 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6000 * class.c (get_interface_method_index): New function. Return dispatch
6001 index for interface method.
6002 (make_method_value): For interface methods, set index field to
6003 iface dispatch index, not DECL_VINDEX.
6004 * expr.c (build_invokeinterface): Use get_interface_method_index.
6006 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6008 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6010 2004-03-31 Andrew Haley <aph@redhat.com>
6013 * jcf-io.c (opendir_in_zip): Tidy up error handling.
6015 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6017 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6018 form of GTY markers.
6020 2004-03-25 Marcus Meissner <meissner@suse.de>
6023 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6025 2004-03-23 Tom Tromey <tromey@redhat.com>
6028 * jcf-write.c (make_class_file_name): Don't report if mkdir
6031 2004-03-23 Tom Tromey <tromey@redhat.com>
6033 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6035 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
6037 * class.c, gjavah.c, lang.c: Fix comment typos.
6038 * gcj.texi: Fix typos.
6040 2004-03-19 Per Bothner <per@bothner.com>
6042 * gcj.texi (Code Generation): Document new flags and assert defaults.
6044 * class.c (assume_compiled_node_struct): Rename type to
6045 class_flag_node_struct, as it is now also used for enable_assertions.
6046 Rename assume_compiled_node typedef. Rename excludep field to value.
6047 (find_assume_compiled_node): Rename function to find_class_flag_node.
6048 Minor optimization - avoid needless strlen.
6049 (add_assume_compiled): Some tweaking and optimization.
6050 Rename and generalize to add_class_flag takem an extra parameter.
6051 (add_assume_compled): New just calls add_class_flag.
6052 (add_enable_assert, enable_assertions): New functions.
6053 (enable_assert_tree): New static.
6054 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6055 * lang.opt (fenable-assertions, fenable-assertions=,
6056 fdisable-assertions, fdisable-assertions=): New options.
6057 * lang.c (java_handle_option): Handle new options.
6058 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
6059 class in an interface - create helper class nested in outer interface.
6060 (build_assertion): Short-circuit if enable_assertions is false.
6062 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6064 * java-tree.h: Changes throughout to add checking to macros
6065 and numerous whitespace changes.
6066 (VAR_OR_FIELD_CHECK): New macro.
6067 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6068 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6070 2004-03-16 Per Bothner <per@bothner.com>
6072 * jcf-jump.c (options): New --print-constants option.
6073 * gcj.texi (Invoking jcf-dump): Document --print-constants.
6075 * jcf-dump.c (flag_print_constant_pool): Default to off.
6076 (print_constant_terse_with_index): New helper function.
6077 (various places): Check flag_print_constant_pool where missing.
6078 (main): If verbose set flag_print_constant_pool.
6079 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
6081 2004-03-15 Andrew Haley <aph@redhat.com>
6084 * parse.y (java_complete_lhs): Check that final variable has an
6087 2004-03-12 Andrew Haley <aph@redhat.com>
6090 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6093 2004-02-29 Roger Sayle <roger@eyesopen.com>
6095 * jcf-parse.c (java_parse_file): Handle the case that input_filename
6098 2004-02-27 Per Bothner <per@bothner.com>
6100 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
6101 suggestion: Use build_incomplete_class_ref.
6102 This fixes PR java/13508, java/11714.
6104 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
6106 * java/parse.h: Update copyright.
6108 2004-02-26 Andrew Haley <aph@redhat.com>
6111 * parse.y (check_interface_throws_clauses): Check for
6112 !METHOD_INVISIBLE (iface_method).
6113 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6114 well as CLASS_ABSTRACT.
6116 2004-02-25 Per Bothner <per@bothner.com>
6118 * parse.y (build_assertion): If we're in an inner class, create the
6119 class$ helper routine in the outer class.
6121 2004-02-19 Richard Henderson <rth@redhat.com>
6123 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6125 2004-02-16 Geoffrey Keating <geoffk@apple.com>
6127 * Make-lang.in (java.install-man): Add extra dependencies.
6129 2004-02-13 Geoffrey Keating <geoffk@apple.com>
6131 * Make-lang.in: Install man pages under the same names
6132 (possibly transformed) as the program they document.
6134 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
6136 * gjavah.c: Include "intl.h".
6137 (error): New function.
6138 (main): Call gcc_init_libintl.
6139 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6140 print_stub_or_jni, process_file, main): Use error rather than
6142 (print_method_info, usage, help, version, main): Mark strings for
6143 translation with _. Avoid splitting up sentences. Send
6144 information messages to stdout.
6145 * jcf-dump.c: Include "intl.h".
6146 (main): Call gcc_init_libintl.
6147 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6148 Mark error, usage and version messages for translation with _.
6149 Avoid splitting up sentences.
6150 * jv-scan.c: Include "intl.h".
6151 (fatal_error, warning): Change parameter s to msgid. Translate
6153 (main): Call gcc_init_libintl.
6154 (usage, help, version): Mark error, usage and version messages for
6155 translation with _. Avoid splitting up sentences.
6156 * jvgenmain.c: Include "intl.h".
6157 (main): Call gcc_init_libintl.
6158 (usage, main): Mark error messages for translation with _.
6159 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6160 JVGENMAIN_OBJS): Add intl.o.
6161 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6162 java/jvgenmain.o): Update dependencies.
6164 2004-02-08 Per Bothner <per@bothner.com>
6166 * parse.y (resolve_qualified_expression_name): In case of inaccessible
6167 class don't use not_accessible_field_error, which can get confused.
6169 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6171 Make-lang.in (po-generated): Delete.
6173 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6175 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6177 * decl.c: Include target.h.
6178 (start_java_method): Replace PROMOTE_PROTOTYPES with
6179 targetm.calls.promote_prototypes.
6180 * expr.c: Include target.h.
6181 (pop_arguments): Replace PROMOTE_PROTOTYPES with
6182 targetm.calls.promote_prototypes.
6183 * parse.y: Include target.h.
6184 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6185 with targetm.calls.promote_prototypes.
6187 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6189 * typeck.c: Update copyright.
6191 2004-02-02 Tom Tromey <tromey@redhat.com>
6193 * decl.c (java_init_decl_processing): Remove duplicate
6196 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
6198 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6200 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
6202 * expr.c (build_field_ref): Move variable
6205 2004-01-28 Andrew Haley <aph@redhat.com>
6207 * expr.c (build_field_ref): Widen field offset.
6209 2004-01-27 Andrew Haley <aph@redhat.com>
6212 * parse.y (check_interface_throws_clauses): Make sure class_decl
6215 2004-01-22 Jeff Sturm <jsturm@one-point.com>
6218 * parse.y (patch_assignment): Don't modify lhs_type for
6219 reference assignments.
6221 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6223 * Make-lang.in: Replace $(docdir) with doc.
6224 (java.info, java.srcinfo, java.man, java.srcman): New rules.
6225 (java.install-man): Revamp rule.
6227 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6229 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6230 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6231 instead of deferred backquote.
6233 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
6235 * typeck.c (find_method_in_interfaces): Move variable
6238 2004-01-16 Andrew Haley <aph@redhat.com>
6241 * typeck.c (shallow_find_method): New.
6242 (find_method_in_superclasses): New.
6243 (find_method_in_interfaces): New.
6244 (lookup_do): Rewrite.
6245 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6247 * jcf-parse.c (read_class): Save and restore output_class.
6248 * decl.c (java_expand_body): Set output_class from fndecl.
6250 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
6252 * class.c (gen_indirect_dispatch_tables): Fix string length
6255 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6257 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6258 (java.srcextra): Copy above back to source directory if requested.
6259 (po-generated): Delete reference to $(parsedir).
6260 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6263 2004-01-14 Jan Hubicka <jh@suse.cz>
6265 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6268 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6270 * java-tree.h (java_expand_expr): Change prototype.
6271 * expr.c (java_expand_expr): Add alt_rtl parameter.
6273 2004-01-09 Andrew Haley <aph@redhat.com>
6276 * parse.y (java_fix_constructors): Set output_class.
6277 (java_reorder_fields): Likewise.
6278 (java_layout_classes): Likewise.
6279 (java_expand_classes): Generate indirect dispatch tables.
6280 (java_expand_classes): Set output_class.
6281 (java_finish_classes): Likewise.
6282 * lang.c (java_init): Turn on always_initialize_class_p if we're
6283 using indirect dis[atch.
6284 (java_decl_ok_for_sibcall): Use output_class, not current_class.
6285 (java_get_callee_fndecl): Use class local atable.
6287 (always_initialize_class_p): Decl moved to java-tree.h.
6288 (HANDLE_CLASS_INFO): Set output_class.
6289 (read_class): Likewise.
6290 (parse_class_file): Call gen_indirect_dispatch_tables.
6291 (parse_zip_file_entries): Set output_class.
6292 (java_parse_file): Set output_class. Don't emit symbol tables.
6293 * java-tree.h (output_class): New.
6294 Remove global declarations for otable, atable, and ctable.
6295 (always_initialize_class_p): moved here from decl.c.
6297 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6298 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6299 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6300 (struct lang_type): Add otable_methods, otable_decl,
6301 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6302 ctable_decl, catch_classes, type_to_runtime_map.
6303 * expr.c (build_field_ref): Make otable, atable, and ctable class
6304 local rather than global.
6305 (build_known_method_ref): Likewise.
6306 (build_invokeinterface): Likewise.
6307 (java_expand_expr): Pass runtime type (rather than actual type) to
6309 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6310 this class. Look up each class in that map to delete duplicates.
6311 (expand_end_java_handler): Pass runtime type (rather than actual
6312 type) to expand_start_catch.
6313 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6315 (java_init_decl_processing): Rearrange things. Remove global
6316 declarations of otable, atable, and ctable.
6317 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6318 (java_expand_body): Set output_class.
6319 * constants.c (build_constant_data_ref): Use output_class, not
6321 (alloc_name_constant): Likewise.
6322 * class.c (gen_indirect_dispatch_tables): New.
6323 (build_class_ref): Generate hard reference to superclass, even if
6324 using indirect dispatch.
6325 (build_static_field_ref): Use class local atable.
6326 (make_class_data): Generate hard reference to superclass, even if
6327 using indirect dispatch.
6328 Generate symbolic references to interfaces when using indirect
6330 (make_class_data): Emit otable, atable, and ctable.
6331 Make otable, atable, and ctable class local rather than global.
6332 (emit_catch_table): Make otable, atable, and ctable class local
6335 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
6337 * parse.y (catch_clause_parameter): Fix typo.
6340 * parse.y: (catch_clause_parameter): Return early if $3, aka
6341 formal_parameter, is null.
6343 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
6345 * class.c: Remove uses of "register" specifier in
6346 declarations of arguments and local variables.
6349 * gjavah.c: Likewise.
6350 * jcf-dump.c: Likewise.
6351 * jcf-io.c: Likewise.
6352 * jcf-parse.c: Likewise.
6353 * jcf-write.c: Likewise.
6354 * keyword.h: Likewise.
6355 * parse.y: Likewise.
6356 * typeck.c: Likewise.
6357 * verify.c: Likewise.
6359 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
6361 * Make-lang.in (GCJ_CROSS_NAME): Delete.
6362 (java.install_common, java.install-man): Adjust for above.
6363 (java.uninstall): Likewise.
6365 2003-12-03 Michael Koch <konqueror@gmx.de>
6367 * class.c (make_class_data):
6368 Push field value to 'hack_signers' instead of 'signers'.
6369 * decl.c (java_init_decl_processing):
6370 Push field 'hack_signers' instead of 'signers'.
6372 2003-12-03 Zack Weinberg <zack@codesourcery.com>
6374 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6377 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
6380 * parse.y (qualify_ambiguous_name): Remove lots of broken
6381 field access processing - there's no need to do that here,
6382 because we have resolve_field_access. Remove
6383 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6384 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6387 2003-12-01 Jeff Sturm <jsturm@one-point.com>
6390 * parse.y (java_complete_lhs): Save location prior to patching
6393 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
6396 * resource.c (write_resource_constructor): Append
6397 "_resource" to constructor identifier name.
6399 2003-11-25 Jeff Sturm <jsturm@one-point.com>
6402 * constants.c (cpool_for_class): New function.
6403 (outgoing_cpool): Remove global variable.
6404 (alloc_name_constant): Use cpool_for_class.
6405 (build_constants_constructor): Likewise.
6406 * decl.c (java_expand_body): Set current_class.
6407 * java-tree.h (outgoing_cpool) Remove declaration.
6408 (init_outgoing_cpool): Likewise.
6409 * jcf-parse.c (init_outgoing_cpool): Remove function.
6410 (parse_class_file): Don't call init_outgoing_cpool.
6411 * parse.y (java_complete_expand_methods): Don't call
6412 init_outgoing_cpool. Don't save outgoing_cpool.
6413 (java_expand_classes): Don't restore outgoing_cpool.
6414 (java_finish_classes): Likewise.
6416 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
6418 * Make-lang.in: (java.install-common) Add
6419 symlink for $(target_noncanonical)-gcjh for
6422 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6424 * Make-lang.in (java.extraclean): Delete.
6426 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6428 * Make-lang.in (check-java): Add.
6430 2003-11-19 Jeff Sturm <jsturm@one-point.com>
6433 * except.c (prepare_eh_table_type): Allocate variable-sized
6434 buffer `buf' with alloca.
6436 2003-11-17 Jeff Sturm <jsturm@one-point.com>
6440 decl.c (java_init_decl_processing): Don't initialize
6441 class_not_found_type_node, no_class_def_found_type_node.
6443 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6444 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6445 (class_not_found_type_node, no_class_def_found_type_node):
6448 parse.y (build_dot_class_method_invocation): Add this_class
6449 argument. Qualify method invocations to a different class.
6450 (create_new_parser_context): Initialize saved_data_ctx to 0.
6451 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6452 (build_dot_class_method): Don't load classes. Register
6454 (build_incomplete_class_ref): Special cases for interfaces
6455 and inner classes. Move build_dot_class_method call to here...
6456 (patch_incomplete_class_ref): ...from here. Pass current_class
6457 to build_dot_class_method_invocation.
6458 (build_assertion): Pass class_type to
6459 build_dot_class_method_invocation.
6460 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6462 2003-11-17 Jeff Sturm <jsturm@one-point.com>
6465 * java-tree.h (BLOCK_EMPTY_P): Define.
6466 * parse.y (java_complete_lhs): Check for empty blocks
6467 in TRY_FINALLY_EXPR case.
6469 2003-11-17 Andrew Haley <aph@redhat.com>
6471 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
6472 (struct lang_decl_var:freed): New variable.
6473 * decl.c (poplevel): Mark local vars that have gone out of scope.
6474 (push_jvm_slot): Don't use the RTL of a var that has gone out of
6477 2003-11-16 Jason Merrill <jason@redhat.com>
6479 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6480 and TAGS files that include them for each front end.
6482 2003-11-15 Tom Tromey <tromey@redhat.com>
6484 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
6486 2003-11-12 Jason Merrill <jason@redhat.com>
6488 PR optimization/12547
6489 * lang.c (java_tree_inlining_walk_subtrees): Just walk
6490 BLOCK_EXPR_BODY directly.
6492 2003-11-12 Andrew Haley <aph@redhat.com>
6495 * parse.y (fold_constant_for_init): Check that we really do have a
6499 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
6500 init_test_decls being inlined.
6503 * parse.y (do_resolve_class): Check return value from
6504 breakdown_qualified().
6506 2003-11-11 Tom Tromey <tromey@redhat.com>
6509 * parse.y (merge_string_cste): Handle case where we have a
6510 pointer that happens to be zero, not null_pointer_node.
6512 2003-11-10 Tom Tromey <tromey@redhat.com>
6514 * jcf-parse.c (classify_zip_file): Correctly compare
6515 filename_length against length of manifest file's name.
6517 2003-11-08 Tom Tromey <tromey@redhat.com>
6520 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
6522 2003-11-06 Andrew Haley <aph@redhat.com>
6524 * expr.c (java_stack_swap): Make sure destination stack slots are
6525 of the correct type.
6527 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
6529 * Make-lang.in (dvi): Move targets to $(docobjdir).
6530 (gcj.dvi): Simplify rule and adjust target.
6531 (gcj.info): Simplify rule.
6532 (gcj.pod): New intermediate rule.
6533 (gcjh.pod): Likewise.
6534 (jv-scan.pod): Likewise.
6535 (jcf-dump.pod): Likewise.
6536 (gij.pod): Likewise.
6537 (jv-convert.pod): Likewise.
6538 (rmic.pod): Likewise.
6539 (rmiregistry.pod): Likewise.
6542 (jv-scan.1): Delete.
6543 (jcf-dump.1): Delete.
6545 (jv-convert.1): Delete.
6547 (rmiregistry.1): Delete.
6549 2003-11-02 Jeff Sturm <jsturm@one-point.com>
6551 Fixes PR java/12866.
6552 * parse.y (resolve_qualified_expression_name): Move test
6553 for outer field access methods from here...
6554 (check_thrown_exceptions) ...to here.
6556 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
6558 * .cvsignore: Delete.
6560 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
6562 * verify.c (verify_jvm_instructions): Don't warn about legal
6563 eh binding regions generated for example by jdk 1.4.1.
6565 2003-10-24 David S. Miller <davem@redhat.com>
6567 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
6569 2003-10-22 Andrew Haley <aph@redhat.com>
6571 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
6572 (java_get_callee_fndecl): New.
6574 * jcf-parse.c (java_parse_file): Call emit_catch_table().
6576 * java-tree.h (ctable_decl): New.
6577 (catch_classes): New.
6578 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
6580 * decl.c (java_init_decl_processing): Add catch_class_type.
6582 Add catch_classes field.
6584 * class.c (build_indirect_class_ref): Break out from
6586 (make_field_value): Check flag_indirect_dispatch.
6587 (make_class_data): Ditto.
6588 Tidy uses of PUSH_FIELD_VALUE.
6589 Add field catch_classes.
6590 (make_catch_class_record): New.
6592 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
6594 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
6596 * jcf-write.c: Follow spelling conventions.
6597 * parse.y: Likewise.
6599 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
6601 * ChangeLog: Fix typos.
6602 * expr.c: Fix comment typos.
6603 * jcf-write.c: Likewise.
6606 * mangle.c: Likewise.
6607 * parse-scan.y: Likewise.
6608 * parse.y: Likewise.
6610 2003-10-22 Tom Tromey <tromey@redhat.com>
6612 * expr.c (expand_byte_code): Only warn about dead bytecode when
6613 extra_warnings is set.
6615 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
6617 Fix for PR java/12586.
6618 * mangle.c (find_compression_record_match): Don't iterate through
6619 package namespace elements unless they all match compression_table
6622 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
6624 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
6625 (generate-manpages): Likewise.
6626 (java.maintainer-clean): Likewise.
6627 (gcj.info): Likewise.
6630 (jv-scan.1): Likewise.
6631 (jcf-dump.1): Likewise.
6633 (jv-convert.1): Likewise.
6635 (rmiregistry.1): Likewise.
6636 (java.install-man): Likewise.
6637 (parse-scan.o): Move and define complete compile line.
6638 (parse.o): Likewise.
6639 (jcf-tree-inline.o): Move.
6641 2003-10-20 Mark Mitchell <mark@codesourcery.com>
6643 * Make-lang.in (info): Update dependencies.
6644 (java.install-info): Remove.
6645 ($(srcdir)/java/gcj.info): Replace with ...
6646 ($(docobjdir)/gcj.info): ... this.
6648 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
6650 * Make-lang.in: Replace uses of $(target_alias) with
6651 $(target_noncanonical).
6653 2003-10-09 Tom Tromey <tromey@redhat.com>
6655 * decl.c (java_init_decl_processing): Declare signers field.
6656 * class.c (make_class_data): Set signers field.
6658 2003-10-09 Jason Merrill <jason@redhat.com>
6660 * parse.y (patch_assignment): Use make_node to create a BLOCK.
6661 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
6664 2003-10-06 Mark Mitchell <mark@codesourcery.com>
6666 * Make-lang.in (java.info): Replace with ...
6668 (java.dvi): Replace with ...
6670 (java.generated-manpages): Replace with ...
6672 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
6674 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
6676 2003-10-01 Andrew Haley <aph@redhat.com>
6678 * jcf-parse.c (java_parse_file): Write otable and atable.
6679 * java-tree.h (atable_methods): New.
6681 (atable_syms_decl): New.
6682 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
6683 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
6684 (symbol_*type): Rename method_symbol* to symbol*type.
6685 (emit_offset_symbol_table): Delete.
6686 (emit_symbol_table): New.
6687 (get_symbol_table_index): New.
6689 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
6690 (build_known_method_ref): Likewise.
6691 (get_symbol_table_index): Rename from get_offset_table_index.
6692 Parameterize to allow re-use by differing types of symbol table.
6693 (build_invokevirtual): Pass table to get_offset_table_index.
6694 * decl.c (java_init_decl_processing): Push types and decls for
6695 atable and atable_syyms.
6696 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
6697 (make_class_data): Add new fields atable and atable_syms.
6698 (emit_symbol_table): Rename from emit_offset_symbol_table.
6699 Parameterize to allow re-use by different types of symbol table.
6700 (build_symbol_entry): Renamed from build_method_symbols_entry.
6702 2003-09-30 Roger Sayle <roger@eyesopen.com>
6704 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
6705 semantics for SAVE_EXPR, by caching the result in a temporary.
6707 2003-09-28 Richard Henderson <rth@redhat.com>
6709 * check-init.c (check_init): Save and restore input_location
6710 instead of file and line separately.
6711 * decl.c (java_expand_body): Likewise.
6712 * jcf-write.c (generate_bytecode_insns): Likewise.
6713 * parse.y (safe_layout_class): Likewise.
6714 * jcf-parse.c (read_class, parse_class_file): Likewise.
6715 (java_parse_file): Use %H for warning locator.
6717 2003-09-28 Roger Sayle <roger@eyesopen.com>
6719 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
6720 with void-type branches instead of using a COMPOUND_EXPR.
6722 2003-09-28 Jeff Sturm <jsturm@one-point.com>
6724 * decl.c (java_optimize_inline, dump_function): Remove.
6725 * java-tree.h (java_optimize_inline): Remove declaration.
6726 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
6727 * parse.y (source_end_java_method, java_expand_classes):
6728 Likewise. Remove dead code.
6730 2003-09-27 Roger Sayle <roger@eyesopen.com>
6732 * lang.c (java_init_options): Set flag_evaluation_order.
6733 * expr.c (force_evaluation_order): Don't attempt to force
6734 evaluation order of binary operations using save_expr.
6735 * parse.y (java_complete_lhs): No longer need to call
6736 force_evaluation_order when constructing binary operators.
6738 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6739 Bryce McKinlay <bryce@mckinlay.net.nz>
6742 * parse.y (not_accessible_field_error): New function.
6743 (resolve_expression_name): Check field access permissions.
6744 (resolve_qualified_expression_name): Use
6745 not_accessible_field_error.
6746 (resolve_qualified_expression_name): Likewise.
6748 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6750 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
6752 2003-09-23 Roger Sayle <roger@eyesopen.com>
6754 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
6755 with equal operands without side-effects.
6757 2003-09-22 Jeff Sturm <jsturm@one-point.com>
6759 * decl.c (java_init_decl_processing): Don't emit otable decls
6760 if flag_indirect_dispatch is not set.
6762 2003-09-21 Richard Henderson <rth@redhat.com>
6764 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6767 2003-09-21 Richard Henderson <rth@redhat.com>
6769 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6770 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
6772 2003-09-20 Richard Henderson <rth@redhat.com>
6774 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
6776 2003-09-18 Roger Sayle <roger@eyesopen.com>
6778 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
6779 * check-init.c (check_init): Likewise.
6781 2003-09-18 Roger Sayle <roger@eyesopen.com>
6783 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
6785 2003-09-16 Andrew Haley <aph@redhat.com>
6787 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
6789 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
6792 * mangle.c (find_compression_record_match): Skip
6793 over a "6JArray" (the array template mangled string)
6795 (mangle_array_type): Correct minor typo.
6796 (atms): Move definition to the beginning.
6798 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
6800 * class.c (add_miranda_methods): Ensure super-interfaces are laid
6801 out. Fix for PR java/12254.
6803 2003-09-11 Richard Henderson <rth@redhat.com>
6805 * parse.y (source_end_java_method): Update for new
6806 cgraph_finalize_function argument.
6808 2003-09-09 Richard Henderson <rth@redhat.com>
6810 * parse.y (source_end_java_method): Update call to
6811 cgraph_finalize_function.
6813 2003-09-03 Jeff Sturm <jsturm@one-point.com>
6815 * decl.c (java_expand_body): New function.
6816 * expr.c (build_class_init): Set DECL_IGNORED_P.
6817 * java-tree.h (start_complete_expand_method,
6818 java_expand_body): Declare.
6819 * jcf-parse.c (cgraph.h): Include.
6820 (java_parse_file): Handle flag_unit_at_a_time.
6821 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
6822 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
6823 (java_estimate_num_insns): Use walk_tree_without_duplicates.
6824 (java_start_inlining): New function.
6825 * parse.h (java_finish_classes): Declare.
6826 * parse.y: Include cgraph.h.
6827 (block): Don't special-case empty block production.
6828 (craft_constructor): Set DECL_INLINE.
6829 (source_end_java_method): Handle flag_unit_at_a_time.
6830 Replace inline code with call to java_expand_body.
6831 (start_complete_expand_method): Remove static modifier.
6832 (java_expand_method_bodies): Patch function tree for
6833 class initialization and/or synchronization as needed.
6834 Don't begin RTL expansion yet.
6835 (java_expand_classes): Check flag_unit_at_a_time before
6836 calling finish_class.
6837 (java_finish_classes): New function.
6838 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
6839 (patch_assignment): Set DECL_CONTEXT on temporary variable.
6840 (emit_test_initialization): Set DECL_IGNORED_P.
6842 2003-09-03 Roger Sayle <roger@eyesopen.com>
6844 * builtins.c (enum builtin_type): Delete unused enumeration.
6845 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
6847 2003-08-28 Tom Tromey <tromey@redhat.com>
6849 * gcj.texi (Extensions): Document gcjlib URLs.
6851 2003-08-20 Tom Tromey <tromey@redhat.com>
6853 * gcj.texi (Extensions): Added xref.
6854 (libgcj Runtime Properties): Document
6855 gnu.gcj.runtime.VMClassLoader.library_control.
6857 2003-08-20 Andrew Haley <aph@redhat.com>
6859 * except.c (prepare_eh_table_type): Use new encoding for exception
6860 handlers when using -fno-assume-compiled.
6862 2003-08-13 Tom Tromey <tromey@redhat.com>
6864 * gcj.texi (Invoking gij): Document -X and -?.
6866 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
6868 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
6869 GCJH_OBJS, JCFDUMP_OBJS
6870 * win32-host.c: Removed the unnecessary and broken dependency
6873 2003-08-11 Tom Tromey <tromey@redhat.com>
6875 * parse.y (java_check_regular_methods): Typo fixes. Call
6876 check_interface_throws_clauses. Use
6877 check_concrete_throws_clauses.
6878 (check_interface_throws_clauses): New function.
6879 (check_concrete_throws_clauses): New function.
6880 (hack_is_accessible_p): New function.
6881 (find_most_specific_methods_list): Added FIXME.
6882 * typeck.c (lookup_do): Use `flags' argument to decide what to
6884 (lookup_argument_method_generic): New function.
6885 (lookup_argument_method2): Removed.
6886 * jcf.h (ACC_INVISIBLE): New define.
6887 * jcf-write.c (generate_classfile): Skip invisible methods.
6888 * class.c (add_miranda_methods): New function.
6889 (layout_class_methods): Use it.
6890 (get_access_flags_from_decl): Use ACC_INVISIBLE.
6891 * java-tree.h (METHOD_INVISIBLE): New define.
6892 (lang_decl_func) [invisible]: New field.
6893 (lookup_argument_method_generic): Declare.
6894 (SEARCH_INTERFACE): New define.
6895 (SEARCH_SUPER): Likewise.
6896 (SEARCH_ONLY_INTERFACE): Likewise.
6897 (SEARCH_VISIBLE): Likewise.
6898 (lookup_argument_method2): Removed declaration.
6900 2003-08-05 Tom Tromey <tromey@redhat.com>
6902 Fix for PR java/11600:
6903 * parse.y (java_complete_lhs): See whether we're calling a method
6905 (check_thrown_exceptions): Added `is_array_call' argument;
6906 fixed `clone' checking; updated all callers.
6908 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
6910 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
6912 2003-08-03 Tom Tromey <tromey@redhat.com>
6914 * java-tree.h (METHOD_TRANSIENT): Removed.
6915 * decl.c (pushdecl): Removed some dead code.
6916 * class.c (get_access_flags_from_decl): Can't have transient
6918 (add_method_1): Can't have a transient method.
6920 2003-07-28 Andreas Jaeger <aj@suse.de>
6922 * jvspec.c: Convert to ISO C90 prototypes.
6924 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
6926 * decl.c (force_poplevels): Fix warning call.
6928 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6930 * expr.c (expand_java_field_op): Don't use xxx_with_decl
6931 (expand_java_field_op): Likewise.
6932 * class.c (layout_class_method): Likewise
6933 (emit_register_classes): Likewise.
6934 * decl.c (pushdecl): Likewise.
6935 (poplevel): Likewise.
6936 (force_poplevels): Likewise.
6937 (give_name_to_locals): Likewise.
6938 * check-init.c (check_for_initialization): Likewise.
6940 2003-07-24 Jason Merrill <jason@redhat.com>
6942 * java-tree.h: Move boolean_type_node et al to the back end.
6944 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6946 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
6949 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
6951 * lang.opt: Don't show -MD_ and -MDD_.
6953 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
6955 * lang-options.h: Remove.
6956 * lang.opt: Add help text.
6958 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
6960 * expr.c: Remove the last argument to expand_assignment().
6962 2003-07-09 Jan Hubicka <jh@suse.cz>
6964 * java-tree.h (DECL_NUM_STMTS): Rename to...
6965 (DECL_ESTIMATED_INSNS): ... this.
6966 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
6967 New static functions.
6968 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
6969 * parser.y (add_stmt_to_compound): Do not account statements.
6971 2003-07-08 Mark Wielaard <mark@klomp.org>
6973 * gcj.texi: CNI now expands to Compiled Native Interface.
6975 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6977 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
6979 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
6981 * expr.c (expand_byte_code): Adjist emit_line_note call.
6983 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
6985 * lang.c (java_handle_option): Don't handle filenames.
6987 2003-07-02 Zack Weinberg <zack@codesourcery.com>
6989 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
6992 * jcf-write.c: Don't default-define DIR_SEPARATOR.
6993 * jcf.h: Delete COMPARE_FILENAMES definition.
6995 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
6997 * lang.c (java_init_options): Update prototype.
6999 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
7001 * decl.c (poplevel): Adjust define_label call.
7003 2003-06-27 Zack Weinberg <zack@codesourcery.com>
7005 * gjavah.c (flag_jni): Make non-static.
7006 * parse-scan.y (ctxp): Make non-static.
7008 * class.c (build_method_symbols_entry)
7009 * expr.c (get_offset_table_index)
7010 * jcf-parse.c (jcf_parse):
7011 Mark the definition static, matching the forward declaration.
7013 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
7015 * lang.c (java_handle_option): Don't check for missing arguments.
7017 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
7019 * class.c (push_class): Use a location_t to save place.
7020 (emit_register_classes): Set input_location. Adjust
7021 expand_function_end call.
7022 * resource.c (write_resource_constructor): Likewise.
7023 * decl.c (end_java_method): Adjust expand_function_end call.
7024 * parse.y (source_end_java_method): Likewise.
7026 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
7028 * lang.c (java_handle_option): Likewise.
7030 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
7032 * lang.c (java_handle_option): Special-casing of optional
7033 joined arguments no longer needed.
7034 * lang.opt: Update switches that take optional argument.
7036 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7038 * lang.opt: Declare Java.
7039 * lang.c (java_init_options): Update.
7041 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7043 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7045 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7047 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7048 * lang.c (java_handle_option): -MD and -MMD have an underscore.
7049 * lang.opt: -MD and -MMD have an underscore.
7051 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
7053 * class.c (emit_register_classes): Adjust init_function_start
7055 * decl.c (complete_start_java_method): Likewise.
7056 * resource.c (write_resource_constructor): Likewise.
7058 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7060 * Make-lang.in: Update to use options.c and options.h.
7061 * lang.c: Include options.h not j-options.h.
7062 (java_handle_option): Abort on unrecognized option.
7063 (java_init_options): Request Java switches.
7065 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
7067 * Make-lang.in: Handle mostlyclean.
7069 2003-06-11 Tom Tromey <tromey@redhat.com>
7071 * lang.c (java_handle_option): Update dependency_tracking for
7074 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7077 2003-06-10 Andrew Haley <aph@redhat.com>
7079 * resource.c (write_resource_constructor): Use expand_expr to
7080 generate the address of the label attached to a resource.
7081 * Make-lang.in (java/resource.o): Add expr.h
7083 2003-06-10 Andrew Haley <aph@redhat.com>
7085 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7086 (java_decl_ok_for_sibcall): New.
7088 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
7090 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7091 (java/j-options.c, java/j-options.h): New.
7092 * java-tree.h (resource_name, compile_resource_file,
7093 compile_resource_data): Constify.
7094 * jcf-write.c (jcf_write_base_directory): Similarly.
7095 * jcf.h (jcf_write_base_directory): Similarly.
7096 * lang.c: Include j-options.h.
7097 (cl_options_count, cl_options, string_option, java_decode_option,
7098 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7099 process_option_with_no): Remove.
7100 (resource_name): Constify.
7101 (LANG_HOOKS_HANDLE_OPTION): Override.
7102 (java_handle_option): New.
7103 (java_init): Don't call jcf_path_init.
7104 (java_init_options): Call jcf_path_init.
7106 * resource.c (compile_resource_data, compile_resource_file): Constify.
7108 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
7110 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7111 (struct lang_decl_func): Add last_line field.
7112 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7113 DECL_SOURCE_LINE_LAST): Remove.
7114 * parse.y (missing_return_error, finish_method_declaration,
7115 lookup_cl, start_artificial_method_body, source_end_java_method,
7116 start_complete_expand_method): Adjust.
7118 2003-06-08 Tom Tromey <tromey@redhat.com>
7120 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7121 fno-assume-compiled.
7123 2003-06-08 Roger Sayle <roger@eyesopen.com>
7125 * builtins.c (define_builtin_type, builtin_types): Delete.
7126 (define_builtin): Rewritten to take just the built-in code,
7127 the function's name, type and fallback library function name.
7128 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7129 (initialize_builtins): Overhaul to define the GCC builtins
7130 used by gcj manually, providing the Java run-time's
7131 implementations as the fallback library function.
7133 2003-06-08 Anthony Green <green@redhat.com>
7135 * parse.y (patch_cast): Fix conversions from floating-point to
7138 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
7140 * Make-lang.in: Update.
7141 * lang.c: Include opts.h. Define cl_options_count and cl_options.
7143 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
7145 * lang.c (java_init_options): Update.
7147 2003-06-05 Jan Hubicka <jh@suse.cz>
7149 * Make-lang.in: Add support for stageprofile and stagefeedback
7151 2003-05-31 Roger Sayle <roger@eyesopen.com>
7153 * lang.c (java_init_options): Prescribe wrap-around two's
7154 complement arithmetic overflow by setting flag_wrapv.
7156 2003-05-29 Roger Sayle <roger@eyesopen.com>
7158 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7159 (builtin_record): Add an additional builtin_code field to
7160 record which GCC built-in corresponds to the Java function.
7161 (java_builtins): Add new entries for atan, atan2, exp, log,
7163 (max_builtin, min_builtin, abs_builtin): Perform constant
7164 folding on the resulting tree.
7165 (java_build_function_call_expr): Likewise, perform constant
7166 folding on the resulting tree.
7167 (initialize_builtins): The NULL creators are now allowed in
7168 the java_builtins table, which is now terminated by an entry
7169 with builtin_code == END_BUILTINS.
7170 (check_for_builtin): Likewise. If the matching creator is
7171 NULL, construct the call using java_build_function_call_expr
7172 directly with the decl for the corresponding builtin_code.
7174 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
7176 * win32-host.c: Normalize copyright boilerplate.
7178 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7180 * parse.y (print_int_node): Use string concatentation on
7181 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7182 function calls into one.
7184 2003-05-13 Zack Weinberg <zack@codesourcery.com>
7186 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7187 fatal_io_error with calls to fatal_error; add ": %m" to the end of
7188 all the affected error messages.
7190 2003-05-13 Richard Henderson <rth@redhat.com>
7192 * class.c (layout_class_method): Set DECL_EXTERNAL.
7193 * decl.c (java_mark_decl_local, java_mark_class_local): New.
7194 * java-tree.h (java_mark_class_local): Declare.
7195 * jcf-parse.c (parse_class_file): Use it.
7196 * parse.y (java_expand_classes): Likewise.
7198 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
7200 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7201 * lex.h: #include input.h.
7202 * jv-scan.c (input_filename): Remove.
7204 2003-05-02 Tom Tromey <tromey@redhat.com>
7207 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7208 (handle_inner_classes): New function.
7210 2003-05-01 Tom Tromey <tromey@redhat.com>
7213 * parse.y (finish_for_loop): Do nothing if update expression is a
7214 EXPR_WFL_NODE wrapping nothing.
7215 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7217 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
7219 * lex.h (input_lineno): Remove declaration.
7220 * parse-scan.y: #include input.h.
7221 (input_filename): Remove declaration.
7222 (input_location): Add definition.
7223 (input_line): Remove definition.
7225 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
7227 * lex.h (lineno): Rename to ...
7228 (input_line): ... here
7229 * parse-scan.y (lineno): Rename to ...
7230 (input_line): ... here.
7231 (reset_report): Rename lineno to input_line.
7232 * check-init.c (check_init): Likewise.
7233 * class.c (push_class): Likewise.
7234 * decl.c (complete_start_java_method, end_java_method): Likewise.
7235 * expr.c (expand_byte_code): Likewise.
7236 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7237 * jcf-write.c (generate_bytecode_insns): Likewise.
7238 * lex.c (java_init_lex, java_allocate_new_line,
7239 do_java_lex): Likewise.
7240 * parse.h (YYNOT_TWICE): Likewise.
7241 * parse.y (empty_statement, expression_statement,
7242 java_pop_parser_context, java_parser_context_save_global,
7243 yyerror, register_fields, method_header, safe_layout_class,
7244 find_in_imports_on_demand, create_artificial_method,
7245 source_end_java_method, start_complete_expand_method,
7246 build_thisn_assign, java_complete_lhs,
7247 maybe_absorb_scoping_block): Likewise.
7249 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
7251 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7252 '/' when computing java source filename
7254 2003-04-13 Tom Tromey <tromey@redhat.com>
7256 * gjavah.c (print_c_decl): Indentation fix.
7258 2003-04-12 Zack Weinberg <zack@codesourcery.com>
7260 * class.c (make_field_value, make_method_value, get_dispatch_table)
7261 (make_class_data, emit_offset_symbol_table)
7262 * constants.c (build_constants_constructor)
7263 * java-tree.h (START_RECORD_CONSTRUCTOR)
7264 * parse.y (maybe_build_array_element_wfl):
7265 Use build_constructor.
7267 2003-04-10 Eric Blake <ebb9@email.byu.edu>
7270 * parse.y (string_convert_int_cst): Always use at least one digit
7271 in string conversion. Remove ASCII dependence.
7272 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7274 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
7276 * Make-lang.in: added win32-host.c
7277 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7278 resolves to open() on non-Win32 platforms and
7279 Win32-specific jcf_open_exact_case() on Win32
7280 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7281 when trying .java and .class files
7282 * win32-host.c: added to repository. Defines
7283 Win32-specific jcf_open_exact_case()
7285 2003-04-10 Andrew Haley <aph@redhat.com>
7287 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7288 (maybe_free_localvar): Renamed from localvar_free.
7289 Add new arg, really.
7290 (generate_bytecode_insns): Set new variable, jsrs.
7291 Only free local vars if no jsr insns have been emittted.
7292 Call maybe_free_localvar, not localvar_free.
7294 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
7296 * gcj.texi: Remove @ at start of file.
7298 2003-03-25 Tom Tromey <tromey@redhat.com>
7300 * parse.y (create_interface): Call CHECK_DEPRECATED.
7302 2003-03-23 Zack Weinberg <zack@codesourcery.com>
7304 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7306 2003-03-21 Zack Weinberg <zack@codesourcery.com>
7308 * javaop.h (jfloat, jdouble): Make them structures mirroring
7309 the bit fields of IEEE float and double respectively.
7310 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7311 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7312 (union Word, union DWord): Delete.
7313 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7315 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7316 D_NAN_MASK): Delete.
7317 (jni_print_float, jni_print_double): New. Generate
7318 hexadecimal floating constants.
7319 (print_field_info): Use jni_print_float/double.
7321 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
7322 finite floating point numbers for output; special case
7325 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
7327 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7328 Replace 0 and 1 with true and false in return statements.
7330 2003-03-19 Tom Tromey <tromey@redhat.com>
7332 * lex.c (do_java_lex): Renamed from java_lex.
7333 (java_lex): New function.
7336 2003-03-13 Tom Tromey <tromey@redhat.com>
7338 * parse.y (resolve_inner_class): Error if qualifier is a primitive
7341 2003-03-04 Andrew Haley <aph@redhat.com>
7343 * gjavah.c (is_first_data_member): New global variable.
7344 (print_c_decl): If it's the first data member, align it as the
7346 (process_file): Set is_first_data_member.
7348 2003-03-11 Tom Tromey <tromey@redhat.com>
7350 * parse.y (resolve_field_access): Initialize class if field is
7351 found in another static field.
7352 * expr.c (build_class_init): Don't optimize out initialization of
7353 implemented interface.
7355 2003-03-11 Andrew Haley <aph@redhat.com>
7357 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7360 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
7362 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7363 and DIR_SEPARATOR_2 for a target.
7364 Correct minor typos.
7366 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7367 and DIR_SEPARATOR_2 for a target into account.
7369 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
7371 * lang.c (java_init): Update prototype, move code to java_post_options.
7372 (java_post_options): Similarly.
7374 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
7376 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7377 compare file name components depending on the case-sensitivity
7378 or otherwise of the host file system.
7380 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7381 "strcmp" to compare file name components.
7382 Use IS_DIR_SEPARATOR instead of comparing directly against
7384 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
7385 comparing directly against DIR_SEPARATOR.
7387 2003-03-04 Tom Tromey <tromey@redhat.com>
7389 * Make-lang.in (java.tags): New target.
7391 2003-03-01 Roger Sayle <roger@eyesopen.com>
7393 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7394 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7396 2003-03-01 Tom Tromey <tromey@redhat.com>
7398 * parse.y (jdep_resolve_class): Only check deprecation if we found
7401 2003-02-28 Tom Tromey <tromey@redhat.com>
7404 * class.c (maybe_layout_super_class): Always pass a WFL to
7406 * parse.y (do_resolve_class): Updated comment to explain
7409 2003-02-26 Tom Tromey <tromey@redhat.com>
7411 * jcf-write.c (generate_classfile): Check whether class is
7412 deprecated before writing attribute count.
7414 2003-02-25 Roger Sayle <roger@eyesopen.com>
7416 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7417 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
7419 2003-02-23 Tom Tromey <tromey@redhat.com>
7421 * lang-options.h: Added -Wdeprecated.
7422 * gcj.texi (Warnings): Document -Wdeprecated.
7423 * java-tree.h (flag_deprecated): Declare.
7424 * lang.c (lang_W_options): Added deprecated.
7425 (flag_deprecated): New global.
7426 * chartables.h: Rebuilt.
7427 * gen-table.pl (process_one): Look at whitespace.
7428 (print_tables): Define LETTER_SPACE, LETTER_MASK.
7429 * parse.h (CLEAR_DEPRECATED): New macro.
7430 (CHECK_DEPRECATED_NO_RESET): New macro.
7431 * jcf-parse.c (handle_deprecated): New function.
7432 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
7433 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7434 * parse.y (resolve_type_during_patch): Check deprecation.
7435 (jdep_resolve_class): Likewise.
7436 (process_imports): Likewise.
7437 (resolve_expression_name): Likewise.
7438 (check_deprecation): Strip arrays from decl. Check
7440 (patch_method_invocation): Also check the particular constructor
7442 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7443 * jcf-write.c (append_deprecated_attribute): New function.
7444 (generate_classfile): Generate deprecated attribute when
7446 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
7447 (java_lex) [case '*']: Simplify logic.
7448 (java_start_char_p): Use LETTER_MASK.
7449 (java_part_char_p): Likewise.
7450 (java_space_char_p): New function.
7452 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
7454 Change base class access representation.
7455 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7456 (add_interface_do): Likewise.
7458 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
7460 * decl.c (java_init_decl_processing): Change
7461 soft_lookupjnimethod_node to reflect the change in
7462 signature of _Jv_LookupJNIMethod in libjava/jni.cc
7463 * expr.c (build_jni_stub): Calculate and pass the size
7464 on the stack of the arguments to a JNI function. Use
7465 new target macro MODIFY_JNI_METHOD_CALL to allow a
7466 target to modify the call to a JNI method.
7468 2003-02-08 Roger Sayle <roger@eyesopen.com>
7470 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7471 instead of basename to avoid compiler warnings on Tru64.
7473 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
7475 * gcj.texi: Update to GFDL 1.2.
7477 2003-01-31 Andrew Haley <aph@redhat.com>
7479 * parse.y (java_expand_classes): Scan the whole class list looking
7480 for access methods that haven't yet been expanded.
7482 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
7486 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
7487 to fix bootstrap on sparc-unknown-netbsdelf1.5.
7488 * jcf-parse.c: Likewise.
7490 2003-01-31 Mark Wielaard <mark@klomp.org>
7492 * gjavah.c (throwable_p): Allocate 1 more byte for string.
7494 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
7496 * class.c (make_class): Use BINFO_ELTS.
7497 (set_super_info): Likewse.
7498 (add_interface_do): Likewise.
7500 2003-01-30 Tom Tromey <tromey@redhat.com>
7502 * jcf-parse.c (read_class): Update identifier's class value if it
7503 changed during parsing.
7505 2003-01-30 Loren James Rittle <ljrittle@acm.org>
7507 * Make-lang.in (po-generated): Find the targets in $(parsedir).
7508 Propagate change to all other rules as required.
7509 (java/parse-scan.o): Add explicit dependency on
7510 $(parsedir)/java/parse-scan.c .
7512 2003-01-29 Tom Tromey <tromey@redhat.com>
7514 * parse.y (patch_assignment): Only transform the rhs of an
7515 assignment when compiling to native.
7517 2003-01-28 Tom Tromey <tromey@redhat.com>
7519 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
7521 2003-01-28 Tom Tromey <tromey@redhat.com>
7523 * lex.c (java_lex): Don't include UEOF as part of token.
7524 (java_read_unicode): Error if \u sequence prematurely terminated.
7526 2003-01-27 Tom Tromey <tromey@redhat.com>
7528 * parse.y (java_check_regular_methods): Check for construct after
7529 checking types in throws clause.
7531 2003-01-24 Tom Tromey <tromey@redhat.com>
7533 * class.c (build_static_field_ref): Only a String or numeric field
7534 can fold to a constant.
7536 2003-01-23 Tom Tromey <tromey@redhat.com>
7538 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
7539 file name in resource buffer.
7541 2003-01-23 Tom Tromey <tromey@redhat.com>
7543 * expr.c (build_known_method_ref): Use method's context to find
7546 2003-01-23 Tom Tromey <tromey@redhat.com>
7548 * constants.c (set_constant_entry): Allocated cleared memory.
7550 2003-01-22 Tom Tromey <tromey@redhat.com>
7552 * java-tree.h: Don't use PARAMS.
7553 * resource.c: Add prototypes for all functions.
7554 (write_resource_constructor): Use `const char *' to avoid
7557 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
7559 * jcf-parse.c (process_zip_dir): Remove unused variable.
7561 2003-01-22 Tom Tromey <tromey@redhat.com>
7563 * expr.c (build_invokeinterface): Abort if method's context is not
7566 2003-01-22 Tom Tromey <tromey@redhat.com>
7568 * gcj.texi (Input and output files): Mention non-class entries.
7569 * decl.c (java_init_decl_processing): Call
7570 init_resource_processing.
7571 * java-tree.h (compile_resource_data, write_resource_constructor,
7572 compile_resource_file, init_resource_processing): Declare.
7573 * config-lang.in (gtfiles): Added resource.c.
7574 * Make-lang.in (gt-java-resource.h): New target.
7575 (JAVA_OBJS): Added resource.o.
7576 (java/resource.o): New target.
7577 * resource.c: New file.
7578 * class.c (compile_resource_file): Moved to resource.c.
7579 (registerResource_libfunc): Likewise.
7580 (utf8_decl_list): Mark with GTY; now static.
7581 * jcf-parse.c (classify_zip_file): New function.
7582 (parse_zip_file_entries): Use it; compile .properties files.
7583 (process_zip_dir): Use classify_zip_file and compute_class_name.
7584 Don't write class name into zip directory.
7585 (java_parse_file): Call write_resource_constructor.
7586 (compute_class_name): New function.
7587 * jcf-io.c (read_zip_member): Reindented.
7589 2003-01-21 Tom Tromey <tromey@redhat.com>
7591 * class.c (supers_all_compiled): New function.
7592 (make_class_data): Use it.
7594 2003-01-21 Tom Tromey <tromey@redhat.com>
7596 * parse.y (method_header): Native method can't be strictfp.
7597 No method can be transient or volatile.
7599 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7601 Make-lang.in (jvspec.o-warn): Add -Wno-error.
7603 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
7605 * check-init.c: Fix comment typos.
7606 * class.c: Likewise.
7607 * constants.c: Likewise.
7609 * except.c: Likewise.
7611 * java-except.h: Likewise.
7612 * java-tree.h: Likewise.
7613 * javaop.h: Likewise.
7614 * jcf-dump.c: Likewise.
7615 * jcf-io.c: Likewise.
7616 * jcf-parse.c: Likewise.
7617 * jcf-write.c: Likewise.
7619 * mangle.c: Likewise.
7620 * typeck.c: Likewise.
7621 * verify.c: Likewise.
7623 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7625 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
7626 * jcf-write.c: Include "tm_p.h".
7628 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7630 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
7632 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7634 * builtins.c (java_build_function_call_expr): Renamed from
7635 build_function_call_expr. All callers changed.
7637 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
7638 * jcf-parse.c: Include tm_p.h.
7640 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
7643 2003-01-14 Tom Tromey <tromey@redhat.com>
7645 * class.c (make_class_data): Check that super is compiled before
7646 building class reference to it.
7648 2003-01-14 Andrew Haley <aph@redhat.com>
7650 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7651 varargs function -- correct.
7653 2003-01-14 Andrew Haley <aph@redhat.com>
7655 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
7657 2003-01-14 Andrew Haley <aph@redhat.com>
7659 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7660 varargs function -- correct.
7662 * parse.y (patch_assignment): Copy the rhs of an assignment into a
7663 temporary if the RHS is a reference.
7665 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7667 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
7668 * keyword.h: Regenerated.
7670 * All Files: Convert to ISO C style function definitions.
7672 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
7674 * parse.y (check_pkg_class_access): ANSIfy definition.
7676 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7678 * decl.c, parse-scan.y, parse.y: Don't cast return value of
7681 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
7683 2003-01-09 Geoffrey Keating <geoffk@apple.com>
7685 Merge from pch-branch:
7687 2002-12-02 Geoffrey Keating <geoffk@apple.com>
7689 * Make-lang.in (java/gjavah.o): Update dependencies.
7690 * gjavah.c: Include ggc.h.
7692 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
7694 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
7695 (JCFDUMP_OBJS): Add ggc-none.o.
7696 (java/jcf-dump.o): Depend on GGC_H.
7697 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
7698 CPool substructures.
7699 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
7700 * jcf-dump.c: Include ggc.h.
7702 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
7704 * jcf.h (union cpool_entry): New.
7705 (struct CPool): Use gengtype to mark. Change field 'data' to be
7707 (struct JCF): Use gengtype to mark.
7708 (CPOOL_UINT): Update for new cpool_entry type.
7709 (CPOOL_USHORT1): Likewise.
7710 (CPOOL_USHORT2): Likewise.
7711 (CPOOL_FINISH): Use GC to free cpool subfields.
7712 * parse.h (struct parser_ctxt): Mark field current_jcf.
7713 * lex.c (java_init_lex): Use GC to allocate struct JCF.
7714 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
7715 (main_jcf): Use gengtype to mark.
7716 (ggc_mark_jcf): Delete.
7717 (get_constant): Update for new cpool_entry type.
7718 (give_name_to_class): Likewise.
7719 (get_class_constant): Likewise.
7720 (init_outgoing_cpool): Use GGC to allocate struct CPool.
7721 (java_parse_file): Use GGC to allocate struct JCF.
7722 (init_jcf_parse): Don't call ggc_add_root.
7723 * jcf-reader.c (jcf_parse_constant_pool): Update for new
7725 * java-tree.h (current_jcf): Use gengtype to mark.
7726 (CPOOL_UTF): Update for new cpool_entry type.
7727 (outgoing_cpool): Use gengtype to mark.
7728 (struct lang_type): GC struct JCF and struct CPool.
7729 * config-lang.in (gtfiles): Add jcf.h.
7730 * constants.c (find_tree_constant): New.
7731 (set_constant_entry): Allocate cpool subfields using GGC. Update
7732 for new cpool_entry type.
7733 (find_constant1): Update for new cpool_entry type.
7734 (find_constant2): Likewise.
7735 (find_utf8_constant): Use find_tree_constant.
7736 (find_class_or_string_constant): Remove unnecessary cast to jword.
7737 Update for new cpool_entry type.
7738 (count_constant_pool_bytes): Update for new cpool_entry type.
7739 (write_constant_pool): Likewise.
7740 (alloc_name_constant): Use find_tree_constant.
7741 (build_constants_constructor): Update for new cpool_entry type.
7743 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
7745 * parse.y (mark_parser_ctxt): Delete.
7746 (goal): Don't use ggc_add_root.
7747 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
7748 (java_pop_parser_context): Let GC free parser_ctxt.
7749 (java_parser_context_resume): Likewise.
7750 * parse.h (struct parser_ctxt): Use gengtype to mark.
7752 (ctxp_for_generation): Likewise.
7753 * lex.h (struct java_lc_s): Mark for gengtype.
7754 (java_lexer): Rearrange for gengtype.
7755 * config-lang.in (gtfiles): Add lex.h, parse.h.
7757 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7759 * All Files: Remove PARAMS macro.
7761 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
7762 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
7765 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
7768 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
7770 * Make-lang.in (java.install-common, java.uninstall,
7771 java.install-info, java.install-man): Prepend $(DESTDIR)
7772 to destination paths in all (un)installation commands.
7773 (java.install-common): Rewrite $(LN) command to support
7774 DESTDIR with "ln" as well as with "ln -s".
7776 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
7778 * java-tree.h: Protect against multiple inclusion.
7780 2003-01-07 Tom Tromey <tromey@redhat.com>
7782 * class.c (add_assume_compiled): Don't adjust parent if we're
7783 already at the root of tree.
7785 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7787 * lang.c (dump_compound_expr): Prototype.
7789 2003-01-03 Tom Tromey <tromey@redhat.com>
7791 Fix for PR java/8712:
7792 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
7793 when simply checking against `null'.
7795 2003-01-03 Tom Tromey <tromey@redhat.com>
7797 * gcj.texi (Standard Properties): Document http.proxyHost and
7800 * gcj.texi (GNU Classpath Properties): Document new properties.
7802 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7804 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
7805 java/lang-options.h, java/mangle.c, java/mangle_name.c,
7806 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
7808 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7810 * Make-lang.in, boehm.c, buffer.c,
7811 buffer.h, builtins.c, class.c,
7812 config-lang.in, constants.c,
7813 convert.h, decl.c, except.c,
7814 expr.c, java-except.h,
7815 java-tree.h, javaop.def,
7816 jcf-parse.c, jcf-write.c,
7817 jv-scan.c, jvgenmain.c,
7818 jvspec.c, keyword.gperf,
7819 keyword.h, lang-options.h,
7820 lang-specs.h, lang.c, lex.c,
7821 lex.h, mangle.c, mangle_name.c,
7822 parse-scan.y, parse.h, parse.y,
7823 typeck.c, verify.c, xref.c,
7824 xref.h: Replace "GNU CC" with
7825 "GCC" in the copyright header.
7827 * check-init.c, gjavah.c, javaop.h,
7828 jcf-depend.c, jcf-dump.c, jcf-io.c,
7829 jcf-path.c, jcf-reader.c, jcf.h,
7830 zextract.c, zipfile.h: These files are
7831 "part of GCC". Also say "GCC" not "GNU CC".
7833 2002-12-30 DJ Delorie <dj@redhat.com>
7835 * Make-lang.in: Protect against texi2pod/pod2man failing.
7837 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
7839 * gcj.texi: Use @copying.
7841 2002-12-27 Mark Mitchell <mark@codesourcery.com>
7843 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
7844 print_cxx_classname.
7845 (print_cxx_classname): Add add_scope parameter.
7846 (print_class_decls): Do not emit a semicolon after the extern
7848 (process_file): Adjust calls to print_cxx_classname.
7850 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
7852 * gcj.texi: Include Cover Texts in man page.
7854 2002-12-23 Jeff Sturm <jsturm@one-point.com>
7856 * class.c (build_static_field_ref): Check FIELD_FINAL.
7858 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
7859 instead of current_constant_pool_data_ref.
7860 * java-tree.h (current_constant_pool_data_ref): Undefine.
7861 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
7862 * jcf-parse.c (init_outgoing_cpool): Don't initialize
7863 current_constant_pool_data_ref.
7865 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
7866 not build_internal_class_name.
7868 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
7869 Use it when class ref isn't certain to be compiled.
7871 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
7873 * gcj.texi: Include gcc-common.texi.
7874 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
7875 $(srcdir)/doc/include/gcc-common.texi.
7877 2002-12-22 Anthony Green <green@redhat.com>
7879 * gcj.texi (Limitations): Add note about org.xml.sax and
7882 2002-12-20 Tom Tromey <tromey@redhat.com>
7884 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
7885 where minimum case value is Integer.MIN_VALUE.
7888 2002-12-18 Andrew Haley <aph@redhat.com>
7890 * parse.y (patch_invoke): Force evaluation order when `check' is
7891 set. For PR libgcj/8945.
7893 2002-12-16 Mark Mitchell <mark@codesourcery.com>
7895 * gcj.texi: Change version number to 3.4.
7897 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
7898 Andrew Haley <aph@redhat.com>
7900 * parse.y (source_end_java_method): Remove custom encoding of line
7901 numbers for a function decl before passing it to the back end.
7903 2002-12-03 Andrew Haley <aph@redhat.com>
7905 * class.c (make_class_data): New field, "chain".
7906 * decl.c (java_init_decl_processing): Likewise.
7908 2002-12-02 Tom Tromey <tromey@redhat.com>
7911 * parse.y (do_resolve_class): Handle qualified name via
7914 2002-11-30 Zack Weinberg <zack@codesourcery.com>
7916 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
7917 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
7918 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
7919 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
7920 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
7921 Include coretypes.h and tm.h.
7922 * Make-lang.in: Update dependencies.
7924 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7926 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
7928 2002-11-25 Diego Novillo <dnovillo@redhat.com>
7930 * jcf-reader.c: Don't expand JCF_readu4 inside the
7931 expansion of JCF_SKIP.
7933 2002-11-25 Diego Novillo <dnovillo@redhat.com>
7935 * jcf-reader.c: Don't expand JCF_readu4 inside the
7936 expansion of JCF_SKIP.
7938 2002-11-22 Tom Tromey <tromey@redhat.com>
7940 * parse.y (patch_binop): Cast right hand side of shift expression
7941 to `int'. Fixes PR java/8676.
7943 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
7944 Andrew Haley <aph@redhat.com>
7946 * gcc/java/jcf-write.c (write_classfile): Remove target
7947 class file, if it exists, before renaming the temporary
7950 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7952 * jvspec.c (lang_specific_spec_functions): New.
7954 2002-11-18 Tom Tromey <tromey@redhat.com>
7956 Fix for PR java/7912:
7957 * expr.c (can_widen_reference_to): Allow cast of array to
7958 Cloneable or Serializable.
7959 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
7960 (java_io_serializable_identifier_node): Likewise.
7961 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
7962 (valid_ref_assignconv_cast_p): Use new identifier nodes.
7963 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
7964 java_io_serializable.
7965 * decl.c (java_init_decl_processing): Initialize
7966 java_lang_cloneable_identifier_node and
7967 java_io_serializable_identifier_node.
7968 (java_lang_cloneable_identifier_node): New global.
7969 (java_io_serializable_identifier_node): Likewise.
7971 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
7973 * buffer.c: Remove unnecessary casts.
7974 * check-init.c: Likewise.
7975 * class.c: Likewise.
7976 * constants.c: Likewise.
7978 * except.c: Likewise.
7979 * gjavah.c: Likewise.
7980 * jcf-io.c: Likewise.
7981 * jcf-parse.c: Likewise.
7982 * jcf-path.c: Likewise.
7983 * jvspec.c: Likewise.
7986 * verify.c: Likewise.
7988 2002-11-06 Tom Tromey <tromey@redhat.com>
7990 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
7993 2002-11-05 Tom Tromey <tromey@redhat.com>
7995 Fix for PR java/6388.
7996 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
7997 * java-tree.h (enum java_tree_index): New values
7998 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
7999 (decimal_int_max, decimal_long_max): New defines.
8000 * lex.c (yylex): Rewrote range checking. Sign extend literals.
8001 (error_if_numeric_overflow): Rewrote range checking.
8002 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8005 2002-11-02 Tom Tromey <tromey@redhat.com>
8007 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8009 * class.c (make_method_value): Put class name, not signature, into
8010 `throws' field. For PR java/8415.
8012 2002-10-24 Tom Tromey <tromey@redhat.com>
8014 * gcj.texi (Invoking gij): Document --showversion.
8015 (Standard Properties): java.library.path now set.
8017 2002-10-23 Tom Tromey <tromey@redhat.com>
8019 * gjavah.c (decode_signature_piece): In JNI mode, print
8020 `jobjectArray' when array depth is nonzero.
8023 2002-10-15 Andrew Haley <aph@redhat.com>
8025 * parse.y (patch_invoke): Call force_evaluation_order on a static
8027 (resolve_qualified_expression_name): Call force_evaluation_order
8028 on a arg list that is part of a Qualified Expression Name.
8030 * lang.c (dump_compound_expr): New.
8031 (java_dump_tree): New.
8033 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
8035 * gcj.texi: Added item describing the GCJ runtime property
8038 2002-10-15 Richard Henderson <rth@redhat.com>
8040 * jcf-parse.c (get_constant): Fix type warning.
8042 2002-10-15 Andrew Haley <aph@redhat.com>
8044 * java-tree.h (java_inlining_merge_static_initializers): Declare.
8045 (java_inlining_map_static_initializers): Declare.
8047 2002-10-14 Andrew Haley <aph@redhat.com>
8049 * tree-inline.c (remap_block): All local class initialization
8050 flags go in the outermost scope.
8051 (expand_call_inline): Call java_inlining_map_static_initializers.
8052 (expand_call_inline): Call java_inlining_merge_static_initializers.
8053 * java/lang.c (merge_init_test_initialization): New.
8054 (java_inlining_merge_static_initializers): New.
8055 (inline_init_test_initialization): New.
8056 (java_inlining_map_static_initializers): New.
8058 2002-10-11 Mark Wielaard <mark@klomp.org>
8060 * gcj.texi (Compatibility): Add Limitations and Extensions section.
8062 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8064 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8066 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8068 * parse.y (merge_string_cste): Add parentheses around & within |.
8070 2002-10-08 Tom Tromey <tromey@redhat.com>
8072 * parse.y (variable_declarator_id): Simplify error path for
8073 array declarator error. For PR java/8003.
8075 2002-10-08 Zack Weinberg <zack@codesourcery.com>
8077 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8080 2002-10-08 Andrew Haley <aph@redhat.com>
8082 * parse.y (attach_init_test_initialization_flags): Check for
8085 2002-10-07 Anthony Green <green@redhat.com>
8087 * parse.y (merge_string_cste): Fix bug in string concatenation.
8089 2002-10-03 Michael Koch <konqueror@gmx.de>
8091 * gcj.texi (Standard properties):
8092 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8094 2002-10-02 Roger Sayle <roger@eyesopen.com>
8096 PR optimization/6627
8097 * lang.c (java_init): If storing the vbit in function
8098 pointers, ensure that force_align_functions_log is atleast
8099 one to aid compatability with g++ vtables.
8101 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
8103 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8104 foul of type-based aliasing.
8106 2002-09-30 Anthony Green <green@redhat.com>
8108 * gcj.texi (Invoking jv-scan): Fix texinfo.
8110 2002-09-28 Anthony Green <green@redhat.com>
8112 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8113 (Code Generation): Add -fno-assert documentation.
8114 * jv-scan.c (flag_assert): New global.
8115 (options): Add assert option.
8116 (help): Add --no-assert documentation.
8117 * parse-scan.y (flag_assert): New global.
8118 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8119 (flag_assert): New global.
8120 * java-tree.h (flag_assert): New global.
8121 * lex.c (java_lex): Obey flag_assert.
8122 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8125 2002-09-26 Andrew Haley <aph@redhat.com>
8127 * expr.c (build_java_array_length_access): Check for null pointer.
8128 * expr.c (expand_java_arrayload): Likewise.
8130 2002-09-21 Richard Henderson <rth@redhat.com>
8132 * jcf-parse.c (get_constant): Decode from IEEE no matter
8133 what the target format.
8135 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
8137 * ChangeLog: Follow spelling conventions.
8138 * class.c: Likewise.
8141 * gjavah.c: Likewise.
8142 * java-tree.h: Likewise.
8143 * jcf-dump.c: Likewise.
8144 * jcf-parse.c: Likewise.
8145 * jvspec.c: Likewise.
8147 * mangle.c: Likewise.
8148 * parse.y: Likewise.
8150 2002-09-17 Tom Tromey <tromey@redhat.com>
8152 * lex.c (java_read_unicode_collapsing_terminators): Handle case
8153 where \r appears at EOF. Fixes PR java/7950.
8155 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
8157 * jvspec.c (lang_specific_driver): Remove unused variable.
8159 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8161 * java-tree.h (union lang_tree_node): Add chain_next option.
8163 2002-09-16 Richard Henderson <rth@redhat.com>
8165 * jcf-parse.c (get_constant): Runtime check for IEEE format;
8166 use new real.h interface.
8167 * jcf-write.c (find_constant_index): Use new real.h interface.
8168 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8170 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8172 * lang.c: Follow spelling conventions.
8174 2002-09-11 Per Bothner <per@bothner.com>
8176 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
8177 constant to the type of the field.
8178 (java_complete_tree): Remove now-redundant code.
8180 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
8182 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
8185 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8186 return label if a ret instruction for the jsr has been reached.
8188 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
8190 * parse.y (DIR_SEPARATOR): Don't define.
8191 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8193 2002-08-28 Andrew Haley <aph@redhat.com>
8195 * verify.c (verify_jvm_instructions): Allow exception handler
8196 inside code that is being protected, but generate a warning.
8197 * except.c (link_handler): Initialize `expanded' in new eh_range.
8198 (binding_depth, is_class_level, current_pc): Declare extern.
8200 2002-09-01 Mark Wielaard <mark@klomp.org>
8202 * gcj.texi: Add chapter about system properties.
8205 2002-08-26 Tom Tromey <tromey@redhat.com>
8207 * parse.y (try_builtin_assignconv): Allow narrowing primitive
8208 conversion if RHS_TYPE is byte, short, or char.
8210 2002-08-22 Tom Tromey <tromey@redhat.com>
8212 * gcj.texi (Invoking gij): Document -cp and -classpath.
8214 2002-08-21 Tom Tromey <tromey@redhat.com>
8216 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8217 $(prefix)/share. For PR libgcj/7633.
8219 For PR java/6005 and PR java/7611:
8220 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8221 (java_can_use_bit_fields_p): New function.
8223 2002-08-16 Tom Tromey <tromey@redhat.com>
8225 * gcj.texi (Class Initialization): Mention class initialization of
8228 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
8230 * Make-lang.in (java-tree-inline.o): New.
8231 (JAVA_OBJS): Add java-tree-inline.o.
8232 * parse.y (source_end_java_method): Call java_optimize_inline.
8233 (java_expand_method_bodies): Save method's tree in
8235 (add_stmt_to_compound): Keep track of the number of statments.
8236 * lang.c (java_init): Enable flag_inline_trees.
8237 (java_post_options): If flag_inline_functions is on, enable
8238 flag_inline_trees instread.
8239 (decl_constant_value): New.
8240 (java_tree_inlining_walk_subtrees): New.
8241 * java-tree.h (DECL_NUM_STMTS): New macro.
8242 (java_optimize_inline): Declare.
8243 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8244 Handle a LABEL_EXPR.
8245 * decl.c (build_result_decl): If we already have a DECL_RESULT
8247 (dump_function): New.
8248 (java_optimize_inline): New.
8249 (dump_function): New.
8251 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
8254 * parse.y (build_assertion): Invert return from
8255 desiredAssertionStatus.
8257 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8259 * jcf-write.c (get_access_flags): Return correct access flags for
8260 private and protected inner classes.
8262 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8264 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8266 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8268 * mangle_name.c: Don't include obstack.h twice.
8269 * xref.c: Don't include obstack.h.
8271 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8273 * class.c: (permanent_obstack): Delete declaration.
8274 * constants.c: (permanent_obstack): Delete declaration.
8275 * except.c: (permanent_obstack): Delete declaration.
8276 * expr.c: (permanent_obstack): Delete declaration.
8277 * jcf-parse.c: (permanent_obstack): Delete declaration.
8278 (saveable_obstack): Delete declaration.
8279 * parse.h: (permanent_obstack): Delete declaration.
8280 * typeck.c: (permanent_obstack): Delete declaration.
8282 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
8284 * gcj.texi (version-gcc): Increase to 3.3.
8286 2002-07-22 Tom Tromey <tromey@redhat.com>
8288 * lex.c (java_lex): Check for `e' or `E' after 0.
8290 2002-07-21 Richard Henderson <rth@redhat.com>
8292 * lang.c (java_unsafe_for_reeval): New.
8293 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8295 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
8297 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8298 (jcf_path_init): Use GET_ENVIRONMENT.
8300 2002-07-10 Roger Sayle <roger@eyesopen.com>
8301 Zack Weinberg <zack@codesourcery.com>
8303 * builtins.c (initialize_builtins): Remove defines that
8304 handled C/C++ specific junk hereby removed from builtins.def.
8306 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
8308 * lang.c (java_post_options): Update prototype.
8310 2002-07-05 Roger Sayle <roger@eyesopen.com>
8312 * builtins.c (initialize_builtins): Ignore the additional
8313 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
8314 the builtins.def file.
8316 2002-07-01 Tom Tromey <tromey@redhat.com>
8319 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8322 2002-07-01 Roger Sayle <roger@eyesopen.com>
8324 * java/decl.c (builtin_function): Accept additional parameter.
8325 (java_init_decl_processing): Pass an additional NULL_TREE
8326 argument to builtin_function.
8328 2002-06-29 T.J. Mather <tjmather@maxmind.com>
8330 * gcj.texi: Fixed gcj invocation example so that it compiles.
8332 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8334 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8335 * parse.y (mark_parser_ctxt): Likewise.
8336 (check_modifiers, declare_local_variables): Avoid incorrect
8337 hardcoded constant 10.
8339 * lex.c (java_read_char): Avoid "comparison is always true"
8342 2002-06-25 Andreas Schwab <schwab@suse.de>
8344 * expr.c (JSR): Avoid undefined operation on PC.
8346 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8348 * decl.c (clear_binding_level): Const-ify.
8350 2002-06-13 Akim Demaille <akim@epita.fr>
8352 * parse.y (class_declaration, interface_declaration): Make sure
8353 all their rules have an action, in order to avoid meaningless `$$
8354 = $1' and their type clashes.
8356 2002-06-11 Tom Tromey <tromey@redhat.com>
8358 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8359 * parse-scan.y (statement_without_trailing_substatement): Added
8361 (assert_statement): New rule.
8362 * java-tree.h (struct lang_type) [assertions]: New field.
8363 (TYPE_USES_ASSERTIONS): New macro.
8364 (CLASS_USES_ASSERTIONS): Likewise.
8365 (FIELD_SYNTHETIC): New define.
8366 * lex.c (java_lval;): Added ASSERT_TK.
8367 * parse.y (ASSERT_TK): Added.
8368 (statement_without_trailing_substatement): Added assert_statement.
8369 (assert_statement): New rule.
8370 (build_assertion): New function.
8371 (maybe_generate_pre_expand_clinit): Create and initialize
8372 $assertionsDisabled.
8373 (lookup_package_type): Removed decl.
8374 * keyword.h: Rebuilt.
8375 * keyword.gperf (assert): New token.
8377 2002-06-10 Akim Demaille <akim@epita.fr>
8379 * parse.y (interface_type_list, class_member_declaration)
8380 (unary_expression_not_plus_minus): Remove duplicate %type.
8383 2002-06-09 Tom Tromey <tromey@redhat.com>
8385 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8387 * parse.y (method_header): Give error message in all cases.
8390 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8392 Don't use RTL inlining. Fix for PR java/6820.
8393 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8394 (flag_really_inline): New.
8395 (java_decode_option): Set flag_really_inline if -finline-functions
8397 (java_post_options): New function. Turn off inlining unless
8398 flag_really_inline is set.
8400 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8402 * gjavah.c (throwable_p): Accept argument as either a classname or
8403 signature fragment. Create null-terminated classname string for super
8404 when calling itself recursively.
8405 (decode_signature_piece): Skip first character from class name
8406 signature when calling throwable_p.
8408 2002-06-08 H.J. Lu (hjl@gnu.org)
8410 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8412 2002-06-04 Tom Tromey <tromey@redhat.com>
8414 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8416 2002-06-04 Michael Koch <konqueror@gmx.de>
8418 * gcj.texi (Input Options): Fixed typo.
8420 2002-06-04 Zack Weinberg <zack@codesourcery.com>
8422 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8423 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8424 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8425 and all now-pointless local variables. Rename other local
8426 variables to reflect their not being handles.
8428 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
8429 #if JCF_USE_STDIO blocks.
8431 * parse.y: Add missing semicolon at end of rule.
8433 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
8435 * check-init.c (attach_initialized_static_class): Delete, unused.
8436 * parse.y: Use htab_t instead of struct hashtable, update
8438 * java-tree.h: Include hashtab.h instead of hash.h.
8439 (struct lang_decl_func): Use htab_t, set up for gengtype.
8440 (struct init_test_hash_entry): Delete.
8441 (struct treetreehash_entry): New.
8442 (java_treetreehash_find): New
8443 (java_treetreehash_new): New prototype.
8444 (java_treetreehash_create): New prototype.
8445 (java_mark_tree): Delete prototype.
8446 (java_hash_hash_tree_node): Delete prototype.
8447 (java_hash_compare_tree_node): Delete prototype.
8448 (attach_initialized_static_class): Delete prototype.
8449 * expr.c (build_class_init): Update to use java_treetreehash
8451 (java_expand_expr): Update to use htab_t.
8452 (emit_init_test_initialization): Likewise.
8453 * decl.c (java_mark_tree): Delete.
8454 * class.c (init_test_hash_newfunc): Delete.
8455 (java_hash_hash_tree_node): Delete.
8456 (java_hash_compare_tree_node): Delete.
8457 (add_method_1): Update to use java_treetreehash functions.
8458 (JAVA_TREEHASHHASH_H): New macro.
8459 (java_treetreehash_hash): New function.
8460 (java_treetreehash_compare): New function.
8461 (java_treetreehash_find): New function.
8462 (java_treetreehash_new): New function.
8463 (java_treetreehash_create): New function.
8464 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8466 * Make-lang.in (java/parse.o): Depend on debug.h.
8467 * java-tree.h (struct lang_identifier): Use gengtype.
8468 (union lang_tree_node): New.
8469 (struct lang_decl_func): Use gengtype.
8470 (struct lang_decl_var): Likewise.
8471 (struct lang_decl): Likewise.
8472 * parse.y: Include debug.h.
8473 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8475 * lang.c (struct language_function): New dummy structure.
8477 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8478 descriminator for DECL_LANG_SPECIFIC.
8479 (struct lang_decl_func): Rename from struct lang_decl.
8480 (enum lang_decl_desc): New.
8481 (struct lang_decl): Make it a union. Update all the accessor macros.
8482 (struct lang_type): Use gengtype.
8483 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
8484 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
8485 are now the same size.
8486 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
8487 use discriminator to mark DECL_LANG_SPECIFIC.
8489 * Make-lang.in (gt-java-builtins.h): New rule.
8490 (java/builtins.o): Add dependency on gt-<filename>.h.
8491 * builtins.c: Use gengtype for roots.
8492 (union string_or_tree): Use gengtype.
8493 (struct builtin_record): Use gengtype.
8494 * config-lang.in (gtfiles): Add builtins.c.
8496 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
8497 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
8498 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
8499 gt-java-parse.h, gtype-java.h): Add rules to generate.
8500 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
8501 (class.o): Add dependency on gt-*.h.
8502 (constants.o): Likewise.
8505 (jcf-parse.o): Likewise.
8506 (jcf-write.o): Likewise.
8508 * config-lang.in (gtfiles): New.
8509 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8510 * constants.c: Replace uses of ggc_add_* with GTY markers.
8512 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8513 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8514 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
8515 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
8517 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
8519 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8520 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
8522 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
8523 Include gtype-java.h.
8525 2002-06-02 Tom Tromey <tromey@redhat.com>
8527 Fix for PR java/5913:
8528 * parse.y (patch_binop): Call patch_string on op1.
8530 2002-06-02 Tom Tromey <tromey@redhat.com>
8532 Fix for PR java/1343, PR java/6336:
8533 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
8534 formatting. Changed return type.
8535 (anonymous_class_counter): Moved to top of file.
8536 (maybe_make_nested_class_name): Append number to class name for
8537 function-local classes.
8539 2002-05-28 Zack Weinberg <zack@codesourcery.com>
8541 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
8542 * Make-lang.in: Update dependency lists.
8544 2002-05-18 Mark Mitchell <mark@codesourcery.com>
8546 * gjavah.c (throwable_p): Do not free the name of the class after
8547 passing it to find_class.
8548 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
8549 * jcf-io.c (dirent.h): Include it.
8550 (fnmatch.h): Likewise.
8551 (compare_path): New function.
8552 (java_or_class_file): Likewise.
8553 (memoized_dirlist_entry): New type.
8554 (memoized_dirlist_lookup_eq): New function.
8555 (memoized_dirlists): New variable.
8556 (caching_stat): New function.
8557 (memoized_class_lookup_eq): New function.
8558 (memoized_class_lookups): Likewise.
8559 (find_class): Use memoized_class_lookups and caching_stat.
8560 * jcf.h (JCF_USE_SCANDIR): Define.
8561 * parse.y (java_expand_classes): Write the class files in reverse
8564 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8566 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
8568 2002-05-13 Mark Mitchell <mark@codesourcery.com>
8570 * jcf-write.c (write_classfile): Unlink the temporary file if it
8571 cannot be renamed. Use concat to build up the name of the
8574 2002-05-08 Mark Mitchell <mark@codesourcery.com>
8576 * jcf-write.c (write_classfile): Write the file to a
8577 temporary file and then rename it.
8579 2002-05-07 Tom Tromey <tromey@redhat.com>
8581 * gjavah.c (throwable_p): Use xstrdup, not strdup.
8583 Fix for PR java/1200:
8584 * gjavah.c (throwable_p): New function.
8585 (decode_signature_piece): Use it. A `WeakReference' isn't the
8588 (gcjh_streq): New function.
8590 2002-05-07 Andreas Jaeger <aj@suse.de>
8592 * parse.y (finish_for_loop): Fix if statement.
8594 2002-05-06 Tom Tromey <tromey@redhat.com>
8596 Fix for PR java/5941:
8597 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
8598 loop update expression.
8599 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
8600 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
8602 2002-05-04 Mark Wielaard <mark@klomp.org>
8605 * parse.y (build_string_concatenation): Return just op1 only when op2
8606 is null and op1 is a STRING_CST, otherwise always construct a
8609 2002-04-27 Tom Tromey <tromey@redhat.com>
8612 * parse.y (string_convert_int_cst): New function.
8613 (merge_string_cste): Use it.
8615 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
8617 * java-tree.h (java_parse_file): Update.
8618 (java_set_yydebug): Remove.
8619 * jcf-parse.c (yydebug): Remove.
8620 (java_set_yydebug): Die.
8621 (java_parse_file): Update.
8622 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8624 2002-04-24 Tom Tromey <tromey@redhat.com>
8627 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
8628 EXPR_WFL_QUALIFICATION of qual_wfl.
8630 2002-04-23 Per Bothner <per@bothner.com>
8632 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
8633 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
8634 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
8636 2002-04-23 Tom Tromey <tromey@redhat.com>
8639 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
8640 recognize `-fcompile-resource='.
8641 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
8644 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
8646 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
8647 paths. Fixes PR java/2791.
8649 2002-04-19 Andrew Haley <aph@redhat.com>
8651 * jcf-write.c (push_long_const): lo, hi: New variables.
8652 Use rshift_double to extract the high part of a 64-bit long.
8653 Use WORD_TO_INT to extract the low part.
8655 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
8656 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
8657 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
8659 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
8661 * typeck.c (incomplete_type_error): Remove.
8663 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8665 * class.c (make_class_data): Set DECL_ALIGN on static class data,
8666 for hash synchronization.
8667 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
8668 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
8671 2002-04-16 Mark Wielaard <mark@klomp.org>
8673 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
8676 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8678 Fix for PR java/6294:
8679 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
8682 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8684 Fix for PR java/6085:
8685 * parse.y (patch_method_invocation): Always use build_access_to_thisn
8686 to get enclosing "this" argument for inner-class constructor
8687 invocation. Pass correct arguments to build_access_to_thisn.
8689 2002-04-10 Andreas Jaeger <aj@suse.de>
8691 * gcj.texi (Input Options): Fix extdirs patch.
8693 2002-04-10 Anthony Green <green@redhat.com>
8695 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
8697 2002-04-09 Anthony Green <green@redhat.com>
8699 * gcj.texi (Input Options): Add --extdirs documentation.
8700 * jcf-dump.c (OPT_extdirs): New macro.
8701 (options): Add extdirs option.
8702 (help): Describe --extdirs.
8703 (main): Handle OPT_extdirs.
8704 * gjavah.c (OPT_extdirs): New macro.
8705 (options): Add extdirs option.
8706 (help): Describe --extdirs.
8707 (main): Handle OPT_extdirs.
8708 * jcf-path.c (jcf_path_init): Add extdirs support.
8709 (jcf_path_extdirs_arg): New function.
8710 (extensions): New variable to hold extensions path entries.
8711 * jvspec.c: Remove -fextdirs= when compiling main().
8712 * lang.c (java_decode_option): Handle -fextdirs=.
8713 * jcf.h (jcf_path_extdirs_arg): Declare new function.
8714 * Make-lang.in: Compile jcf-path with version info for use in
8715 identifying the appropriate libgcj.jar.
8717 2002-04-08 Tom Tromey <tromey@redhat.com>
8720 * .cvsignore: Added rmic.1 and rmiregistry.1.
8721 * gcj.texi (Top): Link to new nodes.
8722 (Invoking rmic): New node.
8723 (Invoking rmiregistry): Likewise.
8724 * Make-lang.in (java.generated-manpages): Added rmic.1 and
8726 (java.maintainer-clean): Likewise.
8727 ($(srcdir)/java/rmic.1): New target.
8728 ($(srcdir)/java/rmiregistry.1): Likewise.
8729 (java.install-man): Handle rmic.1 and rmiregistry.1.
8731 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8733 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
8734 Add note about handling uncaught exceptions. Add an exception handler
8737 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8739 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
8740 after using it to patch CALL_EXPR.
8742 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8744 * gcj.texi (Invocation): Document CNI invocation API.
8746 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
8748 * expr.c (truthvalue_conversion): Rename. Update.
8749 (expand_compare): Update.
8750 * java-tree.h (java_truthvalue_conversion): New.
8751 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8753 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8755 * java-tree.h (java_mark_addressable): New.
8756 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8757 * typeck.c (mark_addressable): Rename, update.
8759 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8761 * expr.c (build_java_binop): Update.
8762 * java-tree.h (java_signed_type, java_unsigned_type,
8763 java_signed_or_unsigned_type): Update.
8764 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8765 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8766 * parse.y (patch_binop): Update.
8767 * typeck.c (signed_or_unsigned_type, unsigned_type,
8768 signed_type): Update.
8770 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8772 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8773 (java_dummy_print): Remove.
8774 (lang_print_error): Rename. Exit early if inhibiting output.
8775 (inhibit_error_printing_function): New.
8776 (java_init): Don't set hook.
8777 (lang_init_source): Use new boolean.
8779 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
8781 * parse.y (do_resolve_class): Fix infinite recursion.
8783 2002-03-29 Tom Tromey <tromey@redhat.com>
8785 * parse.y (check_inner_circular_reference): Ignore incomplete
8788 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8790 * Make-lang.in (builtins.o): Update.
8791 * boehm.c (get_boehm_type_descriptor): Update.
8792 * builtins.c: Include langhooks.h.
8793 * decl.c (java_init_decl_processing): Update.
8794 * java-tree.h (java_type_for_mode, java_type_for_size): New.
8795 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
8797 * typeck.c (type_for_mode, type_for_size): Update.
8799 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
8801 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
8803 2002-03-28 Tom Tromey <tromey@redhat.com>
8805 * except.c (expand_end_java_handler): If the handler type is NULL,
8806 use java.lang.Throwable. Fixes PR java/5986.
8808 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
8810 Fix for PR java/4715:
8811 * jcf-parse.c (parse_source_file_3): New function.
8812 (read_class): Call it.
8813 (java_parse_file): Likewise.
8815 2002-03-28 Jan Hubicka <jh@suse.cz>
8817 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
8819 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8821 * parse.y (resolve_package): Initialize "decl".
8822 (lookup_package_type): Remove unused function.
8824 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8826 Fix for PR java/5993:
8827 * parse.y (resolve_package): Return the decl if resolution was
8828 successful. Don't special case "java.lang" and "java.lang.reflect"
8829 packages. Set type_name to the merged identifier.
8830 (resolved_qualified_expression_name): Print error using "name" if
8831 resolve_package returns NULL_TREE.
8833 2002-03-27 Tom Tromey <tromey@redhat.com>
8835 * expr.c (expand_invoke): Don't generate null pointer check if
8836 we're calling <init>.
8838 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8840 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
8842 * java-tree.h (java_lang_expand_expr): Similarly.
8843 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8844 (java_init): Don't set hook.
8846 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8848 Fix for PR java/5850:
8849 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
8850 context if field was not found in the current scope.
8851 * expr.c (lookup_field): Don't look in enclosing contexts.
8853 2002-03-26 Tom Tromey <tromey@redhat.com>
8855 Fix for PR java/5942:
8856 * parse.y (init_src_parse): Added sanity check.
8857 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
8860 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
8862 * decl.c (lang_mark_tree): Rename java_mark_tree.
8863 * java-tree.h (java_mark_tree): New.
8864 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8866 2002-03-25 Zack Weinberg <zack@codesourcery.com>
8868 * lex.c: Change java_perform_atof to take normal parameters
8869 instead of a pointer to a parameter block. Call it directly
8872 2002-03-22 Mark Wielaard <mark@klomp.org>
8874 Fix for PR java/5368:
8875 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
8876 when printing error message.
8878 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
8880 * decl.c (maybe_build_cleanup): Remove.
8882 2002-03-22 Tom Tromey <tromey@redhat.com>
8884 Andrew Haley <aph@cambridge.redhat.com>
8886 * expr.c (build_field_ref): Don't build a check if the field is a
8889 2002-03-21 Eric Blake <ebb9@email.byu.edu>
8891 Fix for PR java/6026:
8892 * lex.c (java_lex): Fix parsing of consecutive floats.
8894 2002-03-21 Tom Tromey <tromey@redhat.com>
8896 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
8899 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
8901 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8902 insert_block, getdecls, kept_level_p, global_bindings_p): New.
8904 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
8906 * gcj.texi: @code{gcj} becomes @command{gcj}.
8907 @code{gcc} becomes @command{gcc}.
8908 GcjRaw changed to gnu.gcc.RawData.
8910 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
8912 * decl.c (start_java_method): Use new hook.
8913 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8914 (java_init): Remove old hook.
8916 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
8918 * builtins.c (define_builtin): Do nothing if `type' is null.
8921 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8923 * parse.y (parser_check_super_interface): Fix error message
8926 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8928 * jcf-parse.c (get_constant): Delete unused variables.
8930 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
8932 * java-tree.h (java_parse_file): New.
8933 * jcf-parse.c (yyparse): Rename java_parse_file.
8934 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8936 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8938 * parse.y (craft_constructor): Return the constructor decl.
8939 (java_expand_classes): Update comments.
8940 (lookup_method_invoke): Call fix_constructors immediately for
8941 anonymous class. Fixes PR java/5935.
8943 2002-03-15 Anthony Green <green@redhat.com>
8945 * jcf-parse.c (yyparse): Don't emit class registration
8946 constructor when compiling resource files.
8948 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8950 * lang.c (java_tree_code_type, java_tree_code_length,
8951 tree_code_name): Delete.
8952 (tree_code_type, tree_code_length, tree_code_name): Define.
8953 (java_init): Don't try to copy into the various tree_code
8956 2002-03-12 Tom Tromey <tromey@redhat.com>
8958 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
8959 UTF-8, not UCS-2. Fixes PR java/5923.
8961 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
8962 a call_expr wrapped in a convert. Fixes PR java/5848.
8964 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8966 * jcf-write.c (write_classfile): Improve error strings.
8968 2002-03-11 Eric Blake <ebb9@email.byu.edu>
8970 * lex.c: Adjust comments to GNU standards.
8972 2002-03-11 Eric Blake <ebb9@email.byu.edu>
8974 Fix for PR java/5902:
8975 * lex.c (java_lex): Fix parsing of literals.
8977 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8979 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
8980 to prevent it getting evaluated twice in the store checking case.
8981 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
8984 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8986 * decl.c (java_init_decl_processing): Make sure class_type_node
8987 alignment is not less than 64 bits if hash synchronization is enabled.
8989 2002-03-08 Per Bothner <per@bothner.com>
8991 * parse.y (java_complete_lhs): Check if patch_assignment
8992 returned an error-mark.
8994 * parse.y (try_builtin_assignconv): Don't special-case zero.
8996 2002-03-08 Per Bothner <per@bothner.com>
8998 Fix for PR java/5812.
8999 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
9000 here instead of in JSR macro. Likewise with load_type_state call.
9001 Do the latter on if the return_pc has been verified (the jsr returns).
9002 (JSR): Now just call build_java_jsr.
9004 2002-03-07 Jeff Sturm <jsturm@one-point.com>
9006 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9007 (java.install-common): Link native driver to
9008 JAVA_TARGET_INSTALL_NAME.
9010 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
9012 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9013 * builtins.c(sin_builtin): Likewise
9014 * builtins.c(sqrt_builtin): Likewise
9016 2002-03-03 Zack Weinberg <zack@codesourcery.com>
9018 * java/expr.c, java/jcf-parse.c, java/lex.c:
9019 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9020 REAL_ARITHMETIC blocks unconditional. Delete some further
9021 #ifdef blocks predicated on REAL_ARITHMETIC.
9023 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9025 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9026 explicit sizeof/sizeof.
9027 * decl.c (java_init_decl_processing): Likewise.
9028 * jcf-parse.c (init_jcf_parse): Likewise.
9029 * parse.y (init_src_parse): Likewise.
9031 2002-03-02 Per Bothner <per@bothner.com>
9033 Make --CLASSPATH by a synonym for --classpath and -classpath.
9034 Implement --bootclasspath.
9035 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
9036 (classpath_l): Remove.
9037 (jcf_path_CLASSPATH_arg): Remove.
9038 (jcf_path_bootclasspath_arg): New function.
9039 (jcf_path_seal): Simplify accordingly.
9041 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
9042 (jcf_path_CLASSPATH): Remove declaration.
9043 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
9044 (lang_specific_driver): Translate -bootclasspath.
9045 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
9046 * lang.c (decode_lang_options): Do jcf_path_init first.
9047 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
9048 * gjavah.c: Also handle --bootclasspath.
9049 Handle --CLASSPATH as a synonum for --classpath.
9050 * jcf-dump.c: Likewise.
9052 "." is not part of system path, but is the default for --classpath.
9053 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
9054 (jcf_path_seal): Add "." if no CLASSPATH specified.
9056 * gcj.texi: Document changes.
9058 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9060 * expr.c (build_java_arraystore_check): Fix formatting.
9062 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9064 Fix for PR java/5758, java/5632:
9065 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9066 inner-class separator too.
9067 * parse.y (do_resolve_class): New local `decl_result.'
9068 Progressively build a name for what can have been loaded.
9070 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9072 * expr.c (java_array_data_offset): Removed function.
9073 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9074 (build_java_array_length_access): Obtain "length" value using a
9075 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9076 (build_java_arrayaccess): Correct comment. Access "data" using a
9077 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9078 (build_java_arraystore_check): New function.
9079 (expand_java_arraystore): Use build_java_arraystore_check.
9080 * parse.y (patch_assignment): Simplify code to insert a store check
9081 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9082 * check-init.c (check_init): Update to reflect that an array length
9083 access is now a COMPONENT_REF.
9084 * gcj.texi (Code Generation): Improve documentation of
9085 -fno-bounds-check. Add documentation for -fno-store-check.
9086 * java-tree.h (flag_store_check): Declare.
9087 (build_java_arraystore_check): Declare.
9088 * lang.c (flag_store_check): Initialize to 1.
9089 (lang_f_options): Add store-check option.
9090 * jvspec.c: Don't pass store-check option to jvgenmain.
9091 * lang-options.h: Add help string for -fno-store-check.
9093 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9095 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9096 * java-tree.h (java_dup_lang_specific_decl): New.
9097 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9099 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9101 * builtins.c, decl.c: Delete traditional-mode-related code
9102 copied from the C front end but not used, or used only to
9103 permit the compiler to link.
9105 2002-02-22 Tom Tromey <tromey@redhat.com>
9107 Fix for PR java/2369:
9108 * jvspec.c (verify_class_name): New function.
9109 (lang_specific_driver): Call it.
9110 (JAVA_START_CHAR_P): New macro.
9111 (JAVA_PART_CHAR_P): Likewise.
9113 2002-02-22 Per Bothner <per@bothner.com>
9115 * class.c: Change vtable to be more compatible with g++ v3 abi.
9116 (get_dispatch_table): Prepend offset-to-top (always 0) and
9117 type_info pointer (currently unimplemented hence NULL) to vtable.
9118 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9119 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
9120 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9121 (build_dtable_decl): Add declarations for new fields.
9123 2002-02-20 Per Bothner <per@bothner.com>
9125 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9126 to finit$ (otherwise generate_bytecode_insns drops it). However, we
9127 don't need to set it on the COMPOUND_EXPR - the caller does that.
9129 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9131 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9132 `--CLASSPATH' becomes `--classpath.'
9133 * gjavah.c: Likewise.
9134 * jcf-dump.c: Likewise.
9135 * lang-options.h: Likewise.
9137 * jcf-path.c: Updated comment.
9138 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9139 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9140 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9141 (jcf_path_CLASSPATH_arg): Ditto.
9142 (classpath_u): Updated leading comment.
9144 2002-02-20 Per Bothner <per@bothner.com>
9146 * builtins.c (check_for_builtin): New function.
9147 (build_call_or_builtin): Remove.
9148 * java-tree.h: Update accordingly.
9149 * expr.c (expand_invoke): Use build + check_for_builtin instead
9150 of build_call_or_builtin.
9151 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
9152 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9153 flag (which had caused jcf-write to incorrectly emit invokevirtual).
9155 2002-02-17 Tom Tromey <tromey@redhat.com>
9157 * java-tree.h (TYPE_STRICTFP): New macro.
9158 (struct lang_type) [strictfp]: New field.
9159 (CLASS_STRICTFP): New macro.
9160 (METHOD_STRICTFP): New macro.
9161 (struct lang_decl) [strictfp]: New field.
9162 * parse.y (method_header): Disallow strictfp constructor or
9164 (STRICT_TK): Move before MODIFIER_TK.
9165 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9166 (METHOD_MODIFIERS): Likewise.
9167 (INTERFACE_MODIFIERS): Likewise.
9168 * jcf-write.c (get_access_flags): Likewise.
9169 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9170 (add_method_1): Likewise.
9171 (get_access_flags_from_decl): Likewise.
9172 * jcf-dump.c (print_access_flags): Print in standard order. Also,
9173 recognize strictfp flag.
9174 * jcf.h (ACC_STRICT): New define.
9176 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
9178 * class.c(build_utf8_ref): Move declaration of decl_size
9180 2002-02-07 Tom Tromey <tromey@redhat.com>
9182 * gcj.texi (Input Options): --CLASSPATH does not suppress system
9185 2002-02-04 Anthony Green <green@redhat.com>
9187 * class.c (build_utf8_ref): Put UTF-8 constants into merged
9188 sections if available.
9190 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9192 * parse.y (java_expand_classes): Fix typo in static field loop.
9194 2002-02-02 Richard Henderson <rth@redhat.com>
9196 * class.c (add_field): Mark static fields external.
9197 (build_class_ref): Remove redundant set.
9198 * parse.y (java_expand_classes): Mark static fields of classes
9199 to be compiled as local.
9200 * jcf-parse.c (parse_class_file): Likewise.
9202 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9204 * gcj.texi (About CNI): New node.
9206 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
9209 * jcf-parse.c : Check for HAVE_LOCALE_H before using
9210 setlocale() with LC_CTYPE as a parameter.
9213 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
9215 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9216 Follow GNU Coding Standards for --version.
9218 2002-01-28 Tom Tromey <tromey@redhat.com>
9220 * expr.c (build_jni_stub): Ensure storage for `meth' is
9222 * parse.y (java_complete_expand_methods): Set
9223 current_function_decl before building JNI stub.
9225 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9227 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9230 2002-01-22 Tom Tromey <tromey@redhat.com>
9232 * decl.c (java_init_decl_processing): Use add_predefined_file.
9233 Predefine RawData.java.
9234 (predef_filenames): Removed.
9235 (java_init_decl_processing): Don't register predef_filenames.
9236 * jcf-parse.c (add_predefined_file): New function.
9237 (predefined_filename_p): Rewrote.
9238 (predefined_filename_p): No longer static.
9239 * decl.c (java_init_decl_processing): Call initialize_builtins.
9240 * Make-lang.in (JAVA_OBJS): Added builtins.o.
9241 (java/builtins.o): New target.
9242 * builtins.c: New file.
9243 * parse.y (patch_invoke): Use build_call_or_builtin.
9244 * java-tree.h (build_call_or_builtin): Declare.
9245 (initialize_builtins): Declare.
9246 (java_set_exception_lang_code): Removed unused declaration.
9247 (PREDEF_FILENAMES_SIZE): Removed.
9248 (java_tree_index): Added JTI_PREDEF_FILENAMES.
9249 (predef_filenames): New define.
9250 (add_predefined_file): Declare.
9251 (predefined_filename_p): Declare.
9252 * expr.c (expand_invoke): Use build_call_or_builtin.
9254 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9256 * parse.y (patch_switch_statement): Fix format specifier.
9258 2002-01-16 Tom Tromey <tromey@redhat.com>
9260 More for PR java/5365:
9261 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9263 (process_file): Generate include for
9264 java.lang.UnsupportedOperationExceptions.
9266 2002-01-15 Andreas Jaeger <aj@suse.de>
9268 * .cvsignore: Add man pages.
9270 2002-01-15 Tom Tromey <tromey@redhat.com>
9272 Fix for PR java/5365:
9273 * gjavah.c (process_file): Turn class name into a file name.
9275 2002-01-14 Matthias Klose <doko@debian.org>
9277 * gcj.texi: Fix whitespace and formatting errors in the
9278 synopsis of the man pages. Update copyright.
9280 2002-01-14 Tom Tromey <tromey@redhat.com>
9283 * Make-lang.in (java.install-man): Handle jv-convert man page.
9284 (java.generated-manpages): Added jv-convert.1.
9285 (java.uninstall): Remove jv-convert.1.
9286 (java.maintainer-clean): Likewise.
9287 ($(srcdir)/java/jv-convert.1): New target.
9288 * gcj.texi (Top): Link to jv-convert node.
9289 (Individual utilities): Likewise.
9290 (Invoking jv-convert): New node.
9292 2001-01-10 Jeff Sturm <jsturm@one-point.com>
9293 Martin Kahlert <martin.kahlert@infineon.com>
9295 * jcf-parse.c (get_constant): Don't swap lo/hi for big
9296 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9298 2002-01-03 Graham Stott <grahams@redhat.com>
9300 * class.c (compile_resource_file): Update copyright date.
9301 Constify filename parameter.
9302 (java-tree.h): Update copyright date.
9303 (compile_resource_file): Constify filename parameter.
9305 2002-01-03 Graham Stott <grahams@redhat.com>
9307 * gcc/jcf-parse.c: Update copyright date.
9308 (yyparse): Constify resource_filename.
9310 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9312 * parse.y (src_parse_roots): Don't needlessly zero init.
9314 2001-12-31 Tom Tromey <tromey@redhat.com>
9316 * parse.y (dump_java_tree): New function.
9317 (source_end_java_method): Call it.
9318 (end_class_declaration): Likewise.
9319 * lang.c (java_decode_option): Call dump_switch_p.
9321 2001-12-28 Tom Tromey <tromey@redhat.com>
9323 * gen-table.pl: Don't process characters after \uffff. Added
9324 comment pointing to input file.
9326 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9328 * gen-table.pl: Const-ify output. Document the location of a
9329 suitable unicode input file.
9331 * chartables.h: Regenerate.
9333 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9335 * chartables.h: Const-ify.
9336 * gjavah.c (options): Likewise.
9337 * jcf-dump.c (options): Likewise.
9338 * jv-scan.c (options): Likewise.
9339 * lex.c (java_start_char_p, java_part_char_p): Likewise.
9340 * parse.y (binop_lookup): Likewise.
9342 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9344 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9345 the static arrays that are output.
9346 * jvspec.c (jvgenmain_spec): Make static.
9347 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9348 * keyword.h: Regenerate.
9349 * lang.c (string_option, process_option_with_no, lang_f_options,
9350 lang_W_options): Const-ify.
9351 * lex.c (java_lex): Likewise.
9353 2001-12-21 Richard Henderson <rth@redhat.com>
9355 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9356 (get_boehm_type_descriptor): ... here. Arrange for the
9357 TREE_TYPE to get set properly.
9359 2001-12-21 Richard Henderson <rth@redhat.com>
9361 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9362 only if the target requires collect2.
9364 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9366 2001-12-20 Tom Tromey <tromey@redhat.com>
9369 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9370 CAN_COMPLETE_NORMALLY for the node.
9371 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9372 generate code for second branch if first branch can't complete
9374 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9375 the loop head if the loop body can't complete normally.
9377 2001-12-20 Tom Tromey <tromey@redhat.com>
9380 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9381 case where `finally' clause can't complete normally.
9383 2001-12-20 Tom Tromey <tromey@redhat.com>
9386 * parse.y (analyze_clinit_body): Added this_class parameter.
9387 Check for more cases where we must keep <clinit>.
9388 (maybe_yank_clinit): Cleaned up flow control.
9390 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9392 * decl.c (java_init_decl_processing): Don't initialize
9393 finit_leg_identifier_node.
9394 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9395 (finit_leg_identifier_node): Remove.
9396 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9398 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9400 * mangle.c (mangle_member_name): Don't special-case for
9402 * mangle_name.c (unicode_mangling_length): Likewise.
9403 (append_unicode_mangled_name): Likewise.
9404 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9407 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9409 * expr.c (build_java_array_length_access): Don't force null pointer
9410 check unless flag_check_references is set.
9412 2001-12-20 Tom Tromey <tromey@redhat.com>
9414 Fix for PR java/3417:
9415 * parse.y (patch_assignment): Added special processing for
9417 (patch_return): Don't convert booleans to integers, and don't
9418 special-case `null'.
9420 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
9422 * config-lang.in (diff_excludes): Remove.
9424 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
9426 * gcj.texi: Update link to GCC manual.
9428 2001-12-17 Tom Tromey <tromey@redhat.com>
9430 * parse.y (link_nested_class_to_enclosing): Removed useless
9433 2001-12-16 Tom Tromey <tromey@redhat.com>
9435 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9438 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
9440 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9441 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9444 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9446 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9448 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9450 * decl.c (java_init_decl_processing): Build otable_type correctly.
9451 otable_decl is an otable_type.
9453 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9455 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
9456 otable_type, otable_ptr_type, method_symbol_type,
9457 method_symbols_array_type, method_symbols_array_ptr_type): New
9458 field/global tree definitions.
9459 (flag_indirect_dispatch): New flag.
9460 * decl.c (java_init_decl_processing): Initialize new otable and
9461 otable_syms type nodes and decls. Add new field "index" to
9463 * class.c (build_method_symbols_entry): New function.
9464 (make_method_value): Set "index" to to method's vtable index for
9465 virtual methods when indirect-dispatch is not used.
9466 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
9467 and set vtable_method_count to -1. Set otable and otable_syms field
9468 if indirect-dispatch is used and there was something to put in them.
9469 (build_method_symbols_entry): New function.
9470 (emit_offset_symbol_table): New function.
9471 * expr.c (get_offset_table_index): New function.
9472 (build_invokevirtual): Build array reference to otable at the index
9473 returned by get_offset_table_index, and use the result as the vtable
9475 (build_invokeinterface): Similar.
9476 * jcf-parse.c (yyparse): If indirect-dispatch, call
9477 emit_offset_symbol_table at the end of compilation, after all classes
9478 have been generated.
9479 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9480 * lang.c (flag_indirect_dispatch): Define.
9481 (lang_f_options): Add indirect-dispatch flag.
9483 2001-12-14 Matthias Klose <doko@debian.org>
9485 * gcj.texi: Markup for man page generation. Document missing
9486 options printed by <tool> --help.
9487 Terminate description of gij's -ms option with a dot.
9488 * Make-lang.in ($(srcdir)/java/*.1): New targets.
9489 (java.generated-manpages java.install-man, java.uninstall,
9490 java-maintainer-clean) Updated.
9492 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
9494 * class.c (get_dispatch_table): Fix java vtable layout
9495 for TARGET_VTABLE_USES_DESCRIPTORS.
9496 * decl.c (java_init_decl_processing): Initialize
9497 alloc_no_finalizer_node, finalize_identifier_node.
9498 * expr.c (class_has_finalize_method): New function.
9499 (expand_java_NEW): Generate calls for finalizer-free allocation.
9500 (build_invokevirtual): Fix java vtable layout for
9501 TARGET_VTABLE_USES_DESCRIPTORS.
9502 * java-tree.h (enum java_tree_index): New entries:
9503 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
9504 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
9505 (class_has_finalize_method): declare.
9506 (HAS_FINALIZER_P): New macro.
9507 * parse.y (patch_invoke): Generate calls for finalizer-free
9510 2001-12-12 Matthias Klose <doko@debian.org>
9512 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
9513 whitespace at end of line.
9515 2001-12-11 Tom Tromey <tromey@redhat.com>
9517 * lex.c (java_init_lex): Define wfl_to_string as
9518 gnu.gcj.runtime.StringBuffer unless generating bytecode.
9520 2001-12-11 Jeff Sturm <jsturm@one-point.com>
9522 * class.c (make_method_value): Use null_pointer_node to
9523 represent empty exception table.
9525 2001-12-10 Tom Tromey <tromey@redhat.com>
9527 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
9529 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
9531 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
9533 2001-12-09 Per Bothner <per@bothner.com>
9535 * check-init.c (current_switch_has_default): New static field.
9536 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
9537 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
9538 DEFAULT_EXPR seen, simulate a default alternative that copies state.
9540 2001-12-09 Tom Tromey <tromey@redhat.com>
9542 * check-init.c (check_init): Don't allow pre- or post- increment
9543 or decrement of final variable.
9544 (final_assign_error): Minor error message rewording.
9546 2001-12-08 Tom Tromey <tromey@redhat.com>
9548 * java-tree.h: Fixed typo.
9550 * gjavah.c (decompile_method): Don't decompile to `return this'
9553 * gjavah.c (cxx_keywords): Re-sorted.
9554 * lex.c (cxx_keywords): Re-sorted.
9556 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
9559 * gjavah.c (print_namelet): Clear subnamelets.
9560 (HANDLE_METHOD): Set `method_printed' earlier.
9562 2001-12-07 Tom Tromey <tromey@redhat.com>
9564 * lang.c (lang_f_options): Added
9565 optimize-static-class-initialization.
9566 (java_decode_option): Removed special case.
9568 2001-12-07 Per Bothner <per@bothner.com>
9570 * check-init.c (check_init): Fix typo freeing memory twice.
9572 2001-12-05 Per Bothner <per@bothner.com>
9574 Restore support for static class initialization optimization.
9575 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
9576 * check-init.c (check_int): At end of BLOCK handle initialization
9577 blocks, which used to be done in java_complete_expand_method but did
9578 not handle the case where check_for_initialization might allocate
9579 more than a word of bits.
9580 * decl.c (lang_make_tree): The smic field is now a tree.
9581 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
9582 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
9584 * parse.y (emit_test_initialization): Combine hash_lookup calls.
9586 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
9587 Change from a hash table to a list.
9588 (struct_lang_decl): Change field 'smic' to match.
9589 * class.c (add_method_1): Initialize
9590 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
9591 * parse.y (adjust_init_test_initialization): Removed - inlined into -
9592 (java_expand_method_bodies): -here, since 'smic' is now a list.
9593 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
9595 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
9597 * class.c (java_hash_compare_tree_node): Fix casts.
9599 2001-12-04 Per Bothner <per@bothner.com>
9601 * check-init.c: Handle definite unassignment to finals in addition
9602 to definite assignment.
9603 (loop_current_locals): New field.
9604 (num_current_locals, int start_current_locals, num_current_words):
9606 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
9607 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
9608 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
9609 (get_variable_decl, check_final_reassigned): New functions.
9610 (check_init, check_bool_init): Modify as needed for checking finals.
9611 (check_for_initialization): Take extra parameter and return void.
9612 Do extra start-up logic to check final fields for assignment.
9613 * parse.y (check_static_final_variable_assignment_flag,
9614 reset_static_final_variable_assignment_flag, check_final_assignment,
9615 check_final_variable_local_assignment_flag,
9616 reset_final_variable_indirect_assignment_flag,
9617 reset_final_variable_global_assignment_flag): Remove functions.
9618 (java_complete_expand_methods, outer_field_access_fix,
9619 patch_assignment): Remove no-longer used logic.
9620 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
9621 * parse.y (register_fields, java_complete_tree): Update accordingly.
9623 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
9624 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
9625 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
9627 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
9629 * java-tree.h (DECL FINAL): New bit-field.
9630 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
9631 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
9632 (DECL_INIT_CALLS_THIS): New macro.
9633 (struct lang_decl): New bit-field init_calls_this.
9634 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
9635 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
9636 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
9637 use it for both local variables and final fields.
9638 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
9640 (struct lang_type): Remove hfv bit-field.
9641 (check_for_initialization): Change to return void.
9643 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
9644 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
9645 * check-init.c (final_assign_error): New helper function.
9646 (check_final_reassigned, check_init): Use it.
9647 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
9649 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
9650 bit-fields to unsigned.
9652 2001-12-03 Per Bothner <per@bothner.com>
9654 * parse.y (patch_binop): Minor constant folding.
9656 * parse.y (build_current_thisn): Shorter 'buffer'.
9658 2001-12-03 Per Bothner <per@bothner.com>
9660 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
9661 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
9662 * jcf-write.c (generate_bytecode_insns): Remove support for
9663 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
9664 * check-init.c (check_init): Likewise.
9666 2001-12-03 Per Bothner <per@bothner.com>
9668 * verify.c (subroutine_nesting): New function.
9669 (verify_jvm_instructions): Use it to fix logic for checking that
9670 we're done with the current subroutine.
9672 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
9673 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
9675 2001-12-03 Per Bothner <per@bothner.com>
9677 * jcf.h: Fix obvious typo in comment.
9678 * typeck.c (build_null_signature): Add comment.
9680 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
9682 * expr.c: Remove leading capital from diagnostic messages, as
9683 per GNU coding standards.
9684 * jcf-io.c: Similarly.
9685 * jcf-parse.c: Similarly.
9686 * jv-scan.c: Similarly.
9687 * jvspec.c: Similarly.
9688 * mangle.c: Similarly.
9690 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
9691 Alexandre Petit-Bianco <apbianco@redhat.com>
9693 * expr.c (build_java_arrayaccess): Call save_expr on array for
9694 correct evaluation order, modified comment, fixed indentation.
9695 * parse.y: (patch_assignment): Correctly extract the array base
9696 from the tree generate by build_java_arrayaccess, added comments.
9697 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
9698 Fixes PR java/3096, PR java/3803, PR java/3965.
9700 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
9702 * expr.c (expand_byte_code): Remove trailing periods from messages.
9703 * jcf-parse.c (load_class, jcf_parse): Similarly.
9704 * jcf-write.c (generate_classfile): Similarly.
9705 * lex.c (java_lex): Similarly.
9707 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9709 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
9711 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
9713 * Make-lang.in (java.generated-manpages): New dummy target.
9715 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9717 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9719 (lang_specific_pre_link): Use set_input to set input_filename.
9721 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9722 (main): Fix definition.
9723 Strip `main' from classname.
9726 2001-11-18 Roger Sayle <roger@eyesopen.com>
9728 * parse.h (java_expand_switch): Remove old prototype.
9730 2001-11-18 Tom Tromey <tromey@redhat.com>
9732 Fix for PR java/1401:
9733 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
9735 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
9738 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
9740 * lang.c (finish_parse): Rename to java_finish.
9741 (LANG_HOOKS_FINISH, java_finish): New.
9743 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
9745 * decl.c (init_decl_processing): Rename java_init_decl_processing.
9746 * java-tree.h: New prototype.
9747 * lang.c (java_init): Update prototype. Combine with old init_parse.
9749 2001-11-13 Tom Tromey <tromey@redhat.com>
9751 * gjavah.c (method_signature): New global.
9752 (HANDLE_METHOD): Set it.
9753 (decompile_return_statement): New function.
9754 (decompile_method): Use it.
9755 (print_method_info): Removed `synth' argument.
9757 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9759 * java-tree.h (java_set_yydebug): New.
9760 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
9761 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
9762 (print_lang_decl, print_lang_type, print_lang_identifier,
9763 print_lang_statistics, lang_print_xnode): Remove.
9765 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9767 * jcf-parse.c (init_lex): Remove.
9768 * lang.c (language_string, lang_identify): Remove.
9769 (struct lang_hooks): Constify.
9770 (LANG_HOOKS_NAME): Override.
9771 (init_parse): Update.
9773 2001-11-08 Andreas Franck <afranck@gmx.de>
9775 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
9776 program_transform_name the way suggested by autoconf.
9777 (java.install-common): Also transform auxiliary program names with
9778 program_transform_name.
9780 2001-11-08 Tom Tromey <tromey@cygnus.com>
9782 * parse.y (trap_overflow_corner_case): New rule.
9783 (unary_expression): Use it.
9784 * lex.c (java_init_lex): Don't set minus_seen.
9785 (yylex): Don't use minus_seen. Communicate overflow to parser for
9787 (error_if_numeric_overflow): New function.
9788 * parse.h (minus_seen): Removed field.
9789 (JAVA_RADIX10_FLAG): New define.
9791 2001-11-07 Tom Tromey <tromey@redhat.com>
9793 Patch for PR java/1414:
9794 * parse.y (case_label_list): New global.
9795 (goal): Register case_label_list with GC.
9796 (java_complete_lhs): Save new case on case_label_list.
9797 (patch_switch_statement): Check for duplicate case labels.
9799 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9801 * parse.y (patch_assignment): Removed unused third argument.
9802 (java_complete_lhs): Removed unused third argument to patch_assignment.
9804 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9806 * lang.c: Include langhooks-def.h.
9807 * Make-lang.in: Update.
9809 2001-10-31 Zack Weinberg <zack@codesourcery.com>
9811 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9813 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9815 * mangle.c (find_compression_record_match): Don't match compression
9816 records for package name elements unless they occur at the start of
9817 the name. Fix for PR java/4717.
9819 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9821 * expr.c (expand_java_field_op): Don't special-case references to
9822 java.lang.PRIMTYPE.TYPE.
9823 (build_primtype_type_ref): Removed.
9824 * java-tree.h (build_primtype_type_ref): Remove prototype.
9825 * parse.y (maybe_build_primttype_type_ref): Removed.
9826 (complete_function_arguments): Don't special-case references to
9827 java.lang.PRIMTYPE.TYPE.
9828 (patch_assignment): Likewise.
9829 (array_constructor_check_entry): Likewise.
9831 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
9833 * mangle.c (static tree compression_table): Fixed leading comment.
9834 * parse.h (struct parser_ctxt): Fixed field comment.
9835 * parse.y (check_pkg_class_access): New prototype, fixed leading
9836 comment, new parameter used to emit error only if passed as true.
9837 (parse_check_super): Pass extra argument to check_pkg_class_access.
9838 (do_resolve_class): Likewise.
9839 (process_imports): Likewise.
9840 (read_import_dir): Fixed indentation.
9841 (find_in_imports_on_demand): New local class_type_name. Local
9842 node_to_use deleted. while loop changed into for loop. Report
9843 multiple definition only for accessible classes. Improved error
9845 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
9846 assigned to parameter list, fixed indentation. while loop changed
9847 into for loop, restore TREE_CHAIN on local `tem' before the next
9850 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9852 * lang.c (lang_get_alias_set): Deleted.
9854 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9856 * gjavah.c (jni_print_char): Fix thinko in last change.
9858 * gjavah.c (jni_print_char, decode_signature_piece): Use
9859 safe-ctype macros and/or fold extra calls into fewer ones.
9860 * lex.c (java_read_unicode, java_lex): Likewise.
9861 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
9862 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
9863 * mangle_name.c (append_unicode_mangled_name,
9864 unicode_mangling_length): Likewise.
9866 2001-10-17 Richard Henderson <rth@redhat.com>
9868 * Make-lang.in (java/lang.o): Depend on langhooks.h.
9870 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
9872 * lang.c (langhooks.h): Included.
9873 (LANG_HOOKS_INIT): Redefined.
9874 (LANG_HOOKS_INIT_OPTIONS): Likewise.
9875 (LANG_HOOKS_DECODE_OPTION): Likewise.
9876 (struct lang_hooks lang_hooks): New initialization.
9878 2001-10-11 Per Bothner <per@bothner.com>
9880 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
9881 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
9882 The former is simpler, and jcf-write.c handles it better.
9883 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
9884 or WITH_CLEANUP_EXPR.
9885 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
9886 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
9888 * parse.y (patch_if_else_statement): If the condition is constant,
9889 optimize away the test.
9891 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9893 * parse.y (patch_cast): Call patch_string on the first operand of
9894 the incoming node, update it if necessary. Fixes PR java/4510.
9896 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9898 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
9899 when name qualifier matches a package name.
9901 2001-10-08 Tom Tromey <tromey@redhat.com>
9903 Fix for PR java/4489:
9904 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
9905 force a new label when computing `body_block'.
9907 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9909 * jcf-io.c (format_uint): Const-ify.
9910 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
9911 * lex.c (java_get_line_col): Likewise.
9912 * parse.y (build_incdec): Likewise.
9914 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
9916 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
9917 a NULL enclosing context if appropriate. Fixes PR java/4466.
9919 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
9921 * parse.y (patch_assignment): Use lvalue's original TYPE when
9922 building the final COMPOUND_EXPR.
9923 (try_reference_assignconv): Fixed leading comment.
9925 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
9927 * parse.y (check_final_variable_indirect_assignment): For
9928 COMPOUND_EXPR, return only if finals were found initialized
9929 properly, if not, keep on checking.
9930 (check_final_variable_global_assignment_flag): New local
9931 error_found, set when appropriate and used to decide whether to
9932 report uninitialized finals. Fixed typo in comment.
9934 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9936 * decl.c (init_decl_processing): Fixed typo in predef_filenames
9937 last three initializations. Fixes PR java/4360.
9939 2001-09-21 Richard Henderson <rth@redhat.com>
9941 * class.c (get_dispatch_table): Handle function descriptors.
9942 (build_dtable_decl): Likewise.
9943 * expr.c (build_invokevirtual): Likewise.
9945 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
9947 * parse.y (patch_method_invocation): Build class initialization
9948 when static finals are used to qualify method invocation.
9951 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
9953 * parse.h: (WFL_STRIP_BRACKET): Re-written using
9954 build_type_name_from_array_name.
9955 (STRING_STRIP_BRACKETS): New macro.
9956 * parse.y (build_type_name_from_array_name): New function.
9957 (array_creation_expression:): Accumulate []s instead of [s.
9958 (cast_expression:): Accumulate []s instead of [s after cast type
9960 (build_array_from_name): Local string deleted, use
9961 build_type_name_from_array_name.
9962 (build_unresolved_array_type): Accumulate []s instead of [s after
9964 (register_fields): Fixed comment.
9965 (resolve_class): Local name, base deleted, new locals tname and
9966 array_dims. Use build_type_name_from_array_name. Use array_dims to
9968 (purify_type_name): Use STRING_STRIP_BRACKETS.
9970 2001-09-18 Andreas Jaeger <aj@suse.de>
9972 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
9973 * jv-scan.c: Likewise.
9975 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9977 * parse.y (patch_method_invocation): Inner class creation context
9978 check not enforced within constructors. Fixes PR java/1873.
9980 2001-09-16 Tom Tromey <tromey@redhat.com>
9982 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
9983 NOTE_PUSH for single-case push. Fixes PR java/4189.
9985 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
9987 * java-tree.h (TYPE_IMPORT_LIST): New macro.
9988 (TYPE_IMPORT_DEMAND_LIST): Likewise.
9989 (struct lang_type): New fields import_list and import_demand_list.
9990 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
9991 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
9992 (do_resolve_class): New local saved_enclosing_type, initialized,
9993 passed as parameter to find_in_imports and find_in_imports_on_demand.
9994 (find_in_imports): Added paramater enclosing_type, use its
9995 TYPE_IMPORT_LIST when applicable.
9996 (find_in_imports_on_demand): Added parameter enclosing_type, use
9997 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
9998 declaration and initialization.
9999 (fold_constant_for_init): Switch/restore current_class to the
10000 appropriate context.
10002 2001-09-13 Mark Mitchell <mark@codesourcery.com>
10004 * verify.c (verify_jvm_instructions): Fix typo.
10006 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10008 * expr.c (expand_invoke): Const-ification.
10009 * parse.y (patch_method_invocation): Likewise.
10011 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10013 * gjavah.c (cxx_keywords): Const-ification.
10014 * keyword.gperf (java_keyword): Likewise.
10015 * lang.c (java_tree_code_name): Likewise.
10016 * lex.c (cxx_keywords): Likewise.
10017 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10019 2001-09-11 Richard Henderson <rth@redhat.com>
10021 * parse.h (ctxp_for_generation): Mark extern.
10023 2001-09-10 Richard Henderson <rth@redhat.com>
10025 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10027 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10029 * typeck.c (java_array_type_length, build_prim_array_type):
10030 Represent empty arrays by NULL index.
10032 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
10034 * java-tree.h (compile_resource_file): Grouped with other prototypes.
10035 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10037 2001-09-06 Anthony Green <green@redhat.com>
10039 * class.c (O_BINARY): Define if necessary.
10040 (registerResource_libfunc): Declare.
10041 (init_class_processing): Initilize registerResource_libfunc.
10042 (compile_resource_file): New function.
10043 * java-tree.h (resource_name): Declare.
10044 (compile_resource_file): Declare.
10045 * jcf-parse.c (yyparse): Handle compiling java resource files.
10046 * lang.c (java_decode_option): Handle -fcompile-resource option.
10047 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10049 * gcj.texi (Code Generation): Add documentation for -R flag.
10051 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10053 * jcf-write.c (generate_classfile): Issue an error in case of
10054 field/initial value mismatch.
10055 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10056 being initialized and we're generating bytecode.
10057 (java_complete_lhs): In MODIFY_EXPR section: added comments,
10058 set DECL_INITIAL properly when appropriate.
10062 2001-09-01 Per Bothner <per@bothner.com>
10064 * parse.y (maybe_yank_clinit): A field without an initializer is not
10065 relevant. All initializers except static final and constant require
10066 <clinit>, regardless of flag_emit_class_files.
10068 2001-08-31 Per Bothner <per@bothner.com>
10070 * class.c (set_constant_value): When not emitting class files, then a
10071 String ConstantValue is a utf8const_ptr_type.
10073 2001-08-30 Per Bothner <per@bothner.com>
10075 * jcf-write.c (generate_classfile): Check that field is primitive
10076 or string before emitting ConstantValue attribute.
10078 2001-08-30 Per Bothner <per@bothner.com>
10080 * parse.y (resolve_qualified_expression_name): If creating a
10081 COMPOUND_EXPR, set it's type correctly.
10083 2001-08-30 Per Bothner <per@bothner.com>
10085 * jcf-io.c (open_class): Set filename field.
10087 * jcf-parse,c (parse_class_file): Set current_function_decl
10088 for better error message when Code attribute is missing.
10090 * lang.c (put_decl_node, lang_print_error): Re-arrange for
10091 better diagnostics, especially for constructors.
10093 2001-08-30 Per Bothner <per@bothner.com>
10095 * jcf-write.c (generate_classfile): Don't write ConstantValue
10096 attribute if field is not final, for compatibility with jdk.
10098 * jcf-write.c (generate_classfile): Convert ConstantValue values
10099 to correct type. Work-around for front-end bug.
10100 * class.c (set_constant_value): Error if constant has wrong type.
10102 2001-08-30 Per Bothner <per@bothner.com>
10104 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
10105 "Double" are printed at verbosity 1.
10107 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
10109 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
10111 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10113 * parse.y (patch_assignment): Don't verify final re-assignment here.
10114 (java_complete_lhs): Verify assignments to finals calling
10115 patch_assignment. Verify re-assignments to finals before calling
10118 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
10120 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10123 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
10125 * lex.c (java_lex): new local found_hex_digits. Set and then used
10126 in test to reject invalid hexadecimal numbers.
10127 * parse.y (java_complete_tree): Prevent unwanted cast with
10128 initialized floating point finals.
10129 (patch_binop): Emit a warning when detecting a division by zero,
10130 mark result not constant, don't simplify non integer division.
10132 2001-08-28 Per Bothner <per@bothner.com>
10134 * jcf-write.c (generate_bytecode_insns): For increments and
10135 decrements just recurse to push constant. Improvement on Mark's patch.
10137 2001-08-28 Mark Mitchell <mark@codesourcery.com>
10139 * jcf-write.c (generate_bytecode_insns): Generate an integer to
10140 real conversion for increments and decrements of reals.
10142 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10144 * parse.y (resolve_qualified_expression_name): Handle unresolved
10145 qualified expressions, prevent numerical qualifiers, fixed typo.
10148 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10150 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10151 don't report anything but deprecated class when marked so. Handle
10153 (patch_method_invocation): Check deprecation on methods and types.
10154 (patch_binop): code becomes an enum tree_code, added default: to
10155 switch to handle that. Detect division by zero, try to fold and
10156 return before using a subroutine.
10158 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10160 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10161 file smaller than 4 bytes.
10162 * parse.y (check_inner_circular_reference): New function.
10163 (check_circular_reference): Likewise.
10164 (array_initializer:): Accept {,}.
10165 (java_check_circular_reference): Rewritten using
10166 check_circular_reference and check_inner_circular_reference.
10167 (java_complete_expand_method): Unconditionally save and restore
10168 the unpurged exception list.
10169 (build_dot_class_method_invocation): Unmangle signature parameter.
10171 2001-08-21 Tom Tromey <tromey@redhat.com>
10173 * decl.c (init_decl_processing): Add `throws' field to method
10175 * class.c (make_method_value): Compute `throws' field for method.
10177 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10179 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10180 circularity is detected.
10181 (ctors_unchecked_throws_clause_p): Fixed leading comment.
10183 2001-08-17 Richard Henderson <rth@redhat.com>
10185 * class.c (emit_register_classes): Add align parameter to
10186 call to assemble_integer.
10188 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
10190 * jcf-parse.c (load_class): New locals saved and class_loaded. If
10191 loading a class_or_name fails, try considering an innerclass name
10192 and load the enclosing context.
10193 * parse.y (resolve_inner_class): New function.
10194 (find_as_inner_class): Added leading comment.
10195 (register_incomplete_type): Keep the current context as enclosing
10196 context for JDEP_FIELD dependencies.
10197 (do_resolve_class): Locals new_class_decl and super initialized to
10198 NULL. Call resolve_inner_class, explore the enclosing context
10199 superclass if necessary.
10202 2001-08-16 Tom Tromey <tromey@redhat.com>
10204 * jcf-dump.c (main): Updated for change to jcf_path_seal.
10205 * gjavah.c (main): Updated for change to jcf_path_seal.
10206 * lang.c (version_flag): New global.
10207 (java_decode_option): Recognize `-version'.
10208 (java_init): Update for change to jcf_path_seal.
10209 * jcf.h (jcf_path_seal): Added `print' argument.
10210 * jcf-path.c (jcf_path_seal): Added `print' argument.
10212 2001-08-13 Zack Weinberg <zackw@panix.com>
10214 * Make-lang.in (java/decl.o): Update dependencies.
10215 * decl.c: Include libfuncs.h, don't include toplev.h.
10217 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10219 * decl.c (init_decl_processing): exception_type_node,
10220 class_not_found_type_node, and no_class_def_found_type_node
10221 initialized. predef_filenames augmented accordingly.
10222 instinit_identifier_node initialized.
10223 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10224 * java-tree.h (enum java_tree_index): New entries
10225 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10226 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10227 (exception_type_node): New macro.
10228 (class_not_found_type_node): Likewise.
10229 (no_class_def_found_type_node): Likewise.
10230 (instinit_identifier_node): Likewise.
10231 (PREDEF_FILENAMES_SIZE): Adjusted.
10232 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10233 (struct lang_type): Fixed typo in bitfield name.
10234 (DECL_INSTINIT_P): New macro.
10235 (ID_INSTINIT_P): Likewise.
10236 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10238 * parse.y (encapsulate_with_try_catch): New function.
10239 (generate_instinit): Likewise.
10240 (build_instinit_invocation): Likewise.
10241 (ctors_unchecked_throws_clause_p): Likewise.
10242 (add_instance_initializer): Deleted.
10243 (build_instance_initializer): Likewise.
10244 (in_instance_initializer): Likewise.
10245 (check_method_redefinition): instinit$ not to be verified.
10246 (java_complete_expand_methods): Generate instinit$, simplified code.
10247 (build_dot_class_method): Eliminated unnecessary locals. Use
10248 encapsulate_with_try_catch, removed unnecessary code.
10249 (fix_constructors): New local iii. Use build_instinit_invocation.
10250 (patch_method_invocation): Added comment.
10251 (maybe_use_access_method): Don't consider instinit$.
10252 (find_applicable_accessible_methods_list): Shorten the search for
10254 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10255 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10256 (patch_throw_statement): Likewise. Fixed typo.
10258 2001-08-12 David Edelsohn <edelsohn@gnu.org>
10261 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10262 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10264 (lang_specific_pre_link): Use set_input to set input_filename.
10265 Append `main' here.
10266 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10267 (main): Fix definition.
10268 Strip `main' from classname.
10271 2001-08-11 Zack Weinberg <zackw@panix.com>
10273 * lex.h: Don't include setjmp.h. Don't define
10274 SET_FLOAT_HANDLER or prototype set_float_handler.
10276 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10278 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10279 `poplevel' in the right order.
10281 2001-08-09 Richard Henderson <rth@redhat.com>
10283 * Make-lang.in (class.o): Depend on TARGET_H.
10284 * class.c (emit_register_classes): Use target hooks instead of
10285 assemble_constructor and assemble_destructor.
10287 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
10289 * check-init.c (flags.h): Include
10290 (check_init): Don't report uninitialized static class
10291 initialization flags, don't free bit index when doing static class
10292 initialization optimization.
10293 (check_for_initialization): Return type changed to `unsigned int.'
10294 (attach_initialized_static_class): New function.
10295 * class.c (add_method_1): Create the initialized static class
10296 table if necessary.
10297 (finish_class): Always emit deferred inline methods.
10298 * decl.c (emit_init_test_initialization): Moved to expr.c
10299 (complete_start_java_method): Don't traverse
10300 DECL_FUNCTION_INIT_TEST_TABLE.
10301 (lang_mark_tree): Mark hash tables in function decls.
10302 * expr.c (emit_init_test_initialization): Moved from decl.c.
10303 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10304 initialization flag, set DECL_CONTEXT and
10305 LOCAL_CLASS_INITIALIZATION_FLAG.
10306 (java_lang_expand_expr): Emit initialization code for static class
10307 initialized flags when entering block, if necessary.
10308 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10309 * java-tree.h (flag_optimize_sci): New global variable declaration.
10310 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10311 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10312 (LOCAL_FINAL_P): Fixed typo in comment.
10313 (FINAL_VARIABLE_P): Likewise.
10314 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10315 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10316 (struct lang_decl): New fields `ict', `smic' and `cif.'
10317 (check_for_initialization): New returned value for global.
10318 (attach_initialized_static_class): New global function.
10319 (STATIC_CLASS_INIT_OPT_P): New macro.
10320 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10321 * lang.c (java_decode_option): Handle
10322 `-fno-optimize-static-class-initialization'
10323 * parse.y (start_complete_expand_method): New function.
10324 (java_expand_method_bodies): Likewise.
10325 (attach_init_test_initialization_flags): Likewise.
10326 (adjust_init_test_initialization): Likewise.
10327 (emit_test_initialization): Likewise.
10328 (java_complete_expand_methods): Nullify abstract and native method
10330 (java_complete_expand_method): New locals `fbody', `block_body'
10331 and `exception_copy.' Reorganized: directly return on empty method
10332 bodies, call `start_complete_expand_method', remember definitely
10333 initialized static class in function, don't expand method bodies.
10334 (java_expand_classes): Call `java_expand_method_bodies' before
10335 `finish_class' when compiling to native.
10336 (resolve_expression_name): Use `orig' after building outer class
10338 (patch_invoke): Remember static method invocations.
10340 2001-08-06 Richard Henderson <rth@redhat.com>
10342 * class.c (emit_register_classes): Pass a symbol_ref and priority
10343 to assemble_constructor.
10345 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
10347 * java-tree.h (all_class_filename): New macro.
10348 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10349 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10350 newly created IDENTIFIER_NODE to `all_class_filename.'
10352 2001-08-01 Jeff Sturm <jsturm@one-point.com>
10354 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10355 Use ggc_add_tree_root to register roots.
10357 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10359 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10360 second operand calling check_init.
10361 * decl.c (complete_start_java_method): Swaped second and third
10362 arguments while creating WITH_CLEANUP_EXPR node.
10363 * jcf-write.c (generate_bytecode_insns): Use second operand
10364 instead of third when handling WITH_CLEANUP_EXPR.
10365 * parse.y (java_complete_lhs): Expand second operand of
10366 WITH_CLEANUP_EXPR nodes.
10367 (patch_synchronized_statement): Swaped second and third arguments
10368 while creating WITH_CLEANUP_EXPR node.
10370 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
10372 * parse.y (create_interface): Avoid cyclic inheritance report when
10373 syntax error encountered during class definition.
10376 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10378 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10380 (lang_specific_pre_link): Use set_input to set input_filename.
10381 Append `main' here.
10382 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10383 (main): Fix definition.
10384 Strip `main' from classname.
10387 2001-07-18 Tom Tromey <tromey@redhat.com>
10390 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10391 * lex.c (java_new_lexer): Use ICONV_CONST.
10392 (java_read_char): Likewise.
10393 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10394 (jv-scan$(exeext)): Likewise.
10396 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10398 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10399 * parse.y (check_class_interface_creation): Allow `private' if the
10400 enclosing is not an interface.
10401 (create_interface): Interface tagged public if the enclosing
10402 context is an interface.
10403 (create_class): Class tagged public if the enclosing context
10407 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10409 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10412 2001-07-14 Tim Josling <tej@melbpc.org.au>
10414 * check-init.c (check_init): Remove references to EXPON_EXPR.
10416 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10418 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10419 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
10422 2001-07-13 Tom Tromey <tromey@redhat.com>
10424 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10427 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10429 * parse.y (patch_method_invocation): Don't override primary if one
10430 is already provided, but let this$<n> be built. Fixed comment.
10432 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10434 * parse.y (empty_statement:): Report empty statement error only
10435 when found at class declaration level.
10438 2001-07-12 Tom Tromey <tromey@redhat.com>
10440 * expr.c (expand_load_internal): New function.
10441 (LOAD_INTERNAL): Use it.
10443 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
10445 * parse.y (verify_constructor_super): Compare anonymous class ctor
10446 args with `valid_method_invocation_conversion_p.'
10449 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10451 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10452 `-fsyntax-only.' Fixes PR java/3248
10454 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10456 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10458 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10460 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10461 current function is static. Fixes PR java/1970
10463 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10465 * parse.y (patch_method_invocation): Add enclosing context to ctor
10466 calls if necessary. Fixes PR java/2953
10468 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10470 * parse.y (resolve_package): Abort if qualified expression member
10472 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10475 2001-07-07 Zack Weinberg <zackw@stanford.edu>
10477 * verify.c: Don't use // comments.
10479 2001-07-05 Tom Tromey <tromey@redhat.com>
10481 * lang.c (flag_assume_compiled): Removed.
10482 * java-tree.h (flag_assume_compiled): Removed.
10483 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
10484 -fhash-synchronization, -fuse-divide-subroutine,
10485 -fcheck-references, -femit-class-file, -femit-class-files,
10486 -fassume-compiled. Updated --encoding information. Changed
10487 -foutput-class-dir to `-d'.
10489 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
10491 * jcf-parse.c (parse_class_file): Add lineno parameter to
10492 debug_start_source_file call.
10494 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
10496 * gcj.texi: Use gpl.texi.
10497 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
10498 dependencies and use doc/include in search path.
10500 2001-07-03 Jeff Sturm <jsturm@one-point.com>
10502 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
10503 `this'. If so, don't build instance initializers.
10505 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
10507 * parse.y (resolve_expression_name): Improved error message for
10508 inner class cases. Fixes PR java/1958
10510 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
10512 * lang.c: #include diagnostic.h
10513 (lang_print_error): Add a `diagnostic_context *' parameter.
10514 (java_dummy_print): Likewise.
10515 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
10517 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10519 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
10520 * jcf.h (typedef struct JCF): New bitfield `finished.'
10521 (JCF_FINISH): Set `finished.'
10522 (JCF_ZERO): Reset `finished.'
10525 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10527 * parse.y (class_body_declaration:): Don't install empty instance
10531 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10533 * class.c (set_super_info): Call `set_class_decl_access_flags.'
10534 (set_class_decl_access_flags): New function.
10535 * java-tree.h (set_class_decl_access_flags): New prototype.
10536 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
10537 (parse_class_file): New local `decl_max_locals.' Take wide types
10538 into account to compute DECL_MAX_LOCALS.
10539 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
10542 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
10544 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
10546 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10548 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
10549 * parse.y (do_resolve_class): Moved comments out to leading comment
10550 section. Removed local `start', New local `_ht' and
10551 `circularity_hash.' Record `enclosing' in hash table and search
10552 it to detect circularity. Use `enclosing' as an argument to
10553 `lookup_cl.' Free the hash table when done.
10555 2001-06-19 Tom Tromey <tromey@redhat.com>
10557 * lex.c (java_read_char): Disallow invalid and overlong
10558 sequences. Fixes PR java/2319.
10560 2001-06-05 Jeff Sturm <jsturm@one-point.com>
10562 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
10564 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10566 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
10567 arguments accordingly.
10569 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
10571 * gcj.texi: Move contents to just after title page.
10573 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
10575 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
10577 (patch_incomplete_class_ref): Build the class ref, build the class
10578 init if necessary, complete the tree.
10581 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10583 * parse.y (lookup_field_wrapper): Test `name' code.
10584 (resolve_qualified_expression_name): Test `qual_wfl' code.
10585 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
10586 handle `qual_wfl' by code.
10587 (maybe_build_primttype_type_ref): Test `wfl' code.
10589 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10591 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
10593 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
10594 the dvi file in the java directory.
10596 2001-05-25 Sam TH <sam@uchicago.edu>
10598 * gen-table.pl javaop.h jcf.h lex.h,
10599 parse.h: Fix header include guards.
10601 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
10603 * jv-scan.c (version): Update copyright year.
10605 2001-05-21 Per Bothner <per@bothner.com>
10607 * jcf-parse.c (read_class): If class is from .class or .zip file
10608 and it's already been read, don't push/pop parser context.
10610 2001-05-18 Per Bothner <per@bothner.com>
10612 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
10613 command line so the jvgenmain-generated main program comes first.
10615 2001-05-15 Tom Tromey <tromey@redhat.com>
10617 * class.c (build_utf8_ref): Don't generate identifier based on
10618 utf8const contents.
10620 2001-05-12 Richard Henderson <rth@redhat.com>
10622 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
10623 * expr.c (java_lang_expand_expr): Expand it.
10624 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
10625 calling build_exception_object_ref.
10626 * parse.y (catch_clause_parameter): Likewise.
10627 (build_dot_class_method): Likewise.
10628 (try_reference_assignconv): Likewise.
10629 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
10630 * jcf-write.c (generate_bytecode_insns): Likewise.
10632 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10634 * parse.y (build_unresolved_array_type): Set
10635 EXPR_WFL_QUALIFICATION on the newly created wfl.
10636 Fixes PR java/2538. Fixes PR java/2535.
10638 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10640 * parse.y (fix_constructors): Removed unnecessary assignment to
10641 local. Moved assignment to `this$<n>', fixed comments and
10643 (build_wfl_wrap): Fixed indentation.
10644 Fixes PR java/2598, java/2579 and java/2658.
10646 2001-05-03 Mo DeJong <mdejong@redhat.com>
10648 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
10649 check for byte swap.
10651 2000-05-02 Jeff Sturm <jsturm@one-point.com>
10653 * expr.c (build_class_init): Move MODIFY_EXPR
10654 outside of COND_EXPR. Remove variable `call'.
10656 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10658 * decl.c: NULL_PTR -> NULL.
10659 * jcf-write.c: Likewise.
10661 2001-05-01 Tom Tromey <tromey@redhat.com>
10663 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
10664 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
10665 * gcj.texi: Updated copyright text. Include fdl.texi.
10666 (Top): Link to new node.
10668 2001-05-01 Per Bothner <per@bothner.com>
10670 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
10672 2001-05-01 Per Bothner <per@bothner.com>
10674 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
10675 import_list contains the name, not the TREE_PURPOSE.
10677 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10679 * jcf-io.c (read_zip_member): Cast to long in comparison with
10682 * jvspec.c (lang_specific_driver): Initialize variables.
10684 * mangle.c (find_compression_record_match): Likewise.
10686 * typeck.c (build_null_signature): Provide static prototype. Mark
10687 parameter with ATTRIBUTE_UNUSED.
10689 * verify.c (verify_jvm_instructions): Initialize variable.
10691 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10693 * parse.y (do_resolve_class): Check for cyclic inheritance during
10694 inner class resolution.
10696 2001-04-27 Per Bothner <per@bothner.com>
10698 * parse.y (java_expand_classes): Don't change ctxp_for_generation
10699 while iterating, since that could cause gc to lose stuff.
10701 2001-04-26 Per Bothner <per@bothner.com>
10703 Fix method search wrt scope of inner classes to match JLS2.
10704 * typeck.c (build_null_signature): New static function.
10705 (has_method): New function. Uses build_null_signature and lookup_do.
10706 * java-tree.h (has_method): New declaration.
10707 * parse.y (find_applicable_accessible_methods_list): Do not search
10708 context of inner classes here.
10709 (patch_method_invocation): Search scope, ie. current and outer clases,
10710 for method matching simple name, to find class.
10712 2001-04-26 Per Bothner <per@bothner.com>
10714 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
10715 Fix thinko: If a single case, use if_icmpeq, not ifeq.
10717 * constants.c (find_methodref_with_class_index): New function.
10718 (find_methodref_index): Use find_methodref_with_class_index.
10719 * java-tree.h (find_methodref_with_class_index): New declaration.
10720 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
10721 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
10722 If context changed from interface to class, don't use invokeinterface.
10724 2001-04-25 Per Bothner <per@bothner.com>
10726 * verify.c (verify_jvm_instructions): For field instructions,
10727 check that field index is valid. For invoke instructions, check that
10728 method index is valid.
10730 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
10732 * config-lang.in (target_libs): Copy from $libgcj_saved.
10734 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10736 * decl.c (init_decl_processing): Add new class "protectionDomain"
10738 * class.c (make_class_data): Set initial value for "protectionDomain".
10740 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10742 * jvspec.c (lang_specific_driver): Fix memory allocation
10743 deficit, by using concat in lieu of xmalloc/sprintf.
10745 2001-04-20 Per Bothner <per@bothner.com>
10747 Fixes to compile multiple .class files at once.
10748 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
10749 * java-tree.h (CLASS_PARSED_P): New macro.
10750 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
10751 * jcf-parse.c (jcf_parse_source): Inline into read_class.
10752 (read_class): Avoid some code duplication.
10753 Don't call JCF_FINISH for a .class file - might be needed later.
10754 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
10755 rather than CLASS_LOADED_P, since latter implies class laid out.
10756 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
10757 * parse.y: Don't need to set CLASS_LOADED_P for array types.
10759 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10761 * Make-lang.in (java/boehm.o): Depend on toplev.h.
10763 * boehm.c: Include toplev.h.
10765 2001-04-06 Tom Tromey <tromey@redhat.com>
10766 Alexandre Petit-Bianco <apbianco@redhat.com>
10768 Fix for PR gcj/1404 and PR gcj/2332:
10769 * parse.y (build_array_from_name): If we use the type_wfl then
10770 accumulate dimensions from the original type as well.
10771 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
10773 2001-04-06 Tom Tromey <tromey@redhat.com>
10775 * parse.y (analyze_clinit_body): Return true if the second operand
10776 of a METHOD_EXPR is nonzero.
10778 2001-04-06 Tom Tromey <tromey@redhat.com>
10780 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
10782 ($(srcdir)/java/parse.c): Likewise.
10784 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10786 * gcj.texi: Use `which-gcj' instead of `which-g77.'
10787 (version-gcc): Initialized.
10788 (which-gcj): Likewise.
10790 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10792 * java-tree.h (struct lang_decl): New macro
10793 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
10794 * parse.y (build_instance_initializer): New function.
10795 (add_instance_initializer): Use it.
10796 (java_fix_constructors): Set `current_class' before fix pass.
10797 (fix_constructors): Just return if already fixed. Move `super()'
10798 invocation ahead. Use `build_instance_initializer.'
10799 Fixes PR java/1315.
10801 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10803 * parse.y (resolve_qualified_expression_name): Pass field's
10804 DECL_CONTEXT to `not_accessible_p.'
10805 (not_accessible_p): Changed parameters order in `inherits_from_p'
10808 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
10810 * lang-options.h: Add flag_check_references.
10812 2001-04-04 Per Bothner <per@bothner.com>
10814 * java-tree.h (CONSTANT_VALUE_P): New macro.
10815 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
10816 * parse.y (maybe_build_class_init_for_field): New static function.
10817 (resolve_expression_name, resolve_field_access): Use
10818 maybe_build_class_init_for_field instead of build_class_init
10819 This does not do the init if the field is compile-time-constant.
10820 (resolve_field_access): Simplify.
10822 * parse.y (fold_constant_for_init): Merge test into switch.
10824 2001-04-03 Zack Weinberg <zackw@stanford.edu>
10826 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
10828 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
10830 2001-04-02 Zack Weinberg <zackw@stanford.edu>
10832 * expr.c (pop_type_0): Save the result of the first
10833 lang_printable_name call in a scratch buffer, so it
10834 won't be clobbered by the second call.
10836 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10838 * parse-scan.y (array_type:): Rewritten.
10839 (type_declaration:): `empty_statement' replaces `SC_TK.'
10840 (class_member_declaration:): `empty statement' added.
10841 (method_body:): Simplified.
10842 (static_initializer:): Likewise.
10843 (primary_no_new_array:): Use `type_literals.'
10844 (type_literals:): New rule.
10845 (dims:): Set and update `bracket_count.'
10846 Fixes PR java/1074. Fixes PR java/2412.
10848 2001-03-28 Hans Boehm <boehm@acm.org>
10850 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
10851 (get_boehm_type_descriptor): Set type on returned value to be a
10852 pointer length integer.
10854 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10856 * expr.c (pop_type_0): Call `concat' rather than building the
10858 (pop_type): Add format specifier in call to `error'.
10860 * parse.y (patch_method_invocation): Avoid casting away
10863 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
10865 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
10867 2001-03-28 Richard Henderson <rth@redhat.com>
10869 IA-64 ABI Exception Handling:
10870 * Make-lang.in (except.o): Don't depend on eh-common.h.
10871 * check-init.c (check_init): Handle EXC_PTR_EXPR.
10872 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
10873 [soft_exceptioninfo_call_node]: Remove.
10874 [eh_personality_libfunc, lang_eh_runtime_type]: New.
10875 (end_java_method): No emit_handlers.
10876 * except.c (java_set_exception_lang_code): Remove.
10877 (method_init_exceptions): Don't call it.
10878 (prepare_eh_table_type): No CATCH_ALL_TYPE.
10879 (build_exception_object_ref): New.
10880 (expand_end_java_handler): Update for except.h name changes.
10881 (emit_handlers, expand_resume_after_catch): Remove.
10882 * expr.c (java_lang_expand_expr): Update for except.h name changes.
10883 (process_jvm_instruction): Use build_exception_object_ref.
10884 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
10885 (soft_exceptioninfo_call_node): Remove.
10886 (build_exception_object_ref): Declare.
10887 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
10888 soft_exceptioninfo_call_node. Move processing ...
10889 [EXC_PTR_EXPR]: ... here.
10890 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
10891 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
10892 (source_end_java_method): No java_set_exception_lang_code or
10894 (build_dot_class_method): Use build_exception_object_ref.
10895 (try_reference_assignconv): Check EXC_PTR_EXPR not
10896 soft_exceptioninfo_call_node.
10898 2001-03-28 Richard Henderson <rth@redhat.com>
10900 * java-tree.h (throw_node): Define as a single member of
10901 java_global_trees instead of a separate array.
10902 (JTI_THROW_NODE): New.
10903 * decl.c (throw_node): Don't declare.
10904 (init_decl_processing): Init a scalar throw_node.
10905 Don't register it for gc.
10906 * check-init.c (check_init): Reference scalar throw_node.
10907 * expr.c (build_java_athrow): Likewise.
10908 * jcf-write.c (generate_bytecode_insns): Likewise.
10909 * parse.h (BUILD_THROW): Likewise.
10911 2001-03-28 Richard Henderson <rth@redhat.com>
10913 * decl.c (end_java_method): Do not save and restore
10914 flag_non_call_exceptions.
10915 * parse.y (source_end_java_method): Likewise.
10916 * lang.c (flag_exceptions): Don't declare.
10917 (java_init_options): Set flag_non_call_exceptions. Set
10918 flag_exceptions here ...
10919 (java_init): ... not here.
10921 2001-03-27 Richard Henderson <rth@redhat.com>
10923 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
10924 exceptions_via_longjmp.
10926 * lang.c (flag_new_exceptions): Don't declare it.
10927 (java_init_options): Or set it.
10929 2001-03-27 Richard Henderson <rth@redhat.com>
10931 * decl.c (end_java_method): Rename asynchronous_exceptions to
10932 flag_non_call_exceptions.
10933 * parse.y (source_end_java_method): Likewise.
10935 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10937 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10939 2001-03-26 Mark Mitchell <mark@codesourcery.com>
10941 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
10943 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
10945 * parse.y (find_as_inner_class): Follow current package
10946 indications not to mistakingly load an unrelated class.
10948 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10950 * constants.c (PUTN): Use memcpy, not bcopy.
10952 * lex.c (java_read_char): Use memmove, not bcopy.
10954 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
10956 2001-03-23 Per Bothner <per@bothner.com>
10958 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
10959 macro for better error pin-pointing.
10960 * java-tree.h: Fix typo in comment.
10962 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
10963 Don't include jsr/goto in exception range.
10964 Check if start and end of exception range are the same (also TRY_EXPR).
10965 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
10966 However, do emit the following goto even if try_block is empty.
10967 Defer freeing exception_decl until after the finalizer, to make
10968 sure the local isn't reused in the finalizer. Fixes PR java/1208.
10970 * parse.y (java_complete_lhs): If the try-clause is empty, just
10971 return the finally-clause and vice versa.
10973 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10975 * gcj.texi (Input Options): documented the check for attribute
10976 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
10977 * java-tree.h (flag_force_classes_archive_check): Declared extern.
10978 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
10979 (jcf_parse): Check for the right classes archive if necessary.
10980 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
10981 (jcf_parse_fields): Fixed indentation.
10982 * jcf-write.c (append_gcj_attribute): New function.
10983 (generate_classfile): Compute the attribute count, invoke
10984 `append_gcj_attribute'.
10985 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
10986 turned into bit-fields. New bit-field `right_zip.'
10987 (JCF_ZERO): Set `right_zip' to zero.
10988 * lang-options.h (-fforce-classes-archive-check): Added flag.
10989 * lang.c (flag_force_classes_archive_check): New flag.
10990 (lang_f_options): New entry `force-classes-archive-check.'
10991 Fixes PR java/1213.
10993 2001-02-07 Andrew Haley <aph@redhat.com>
10995 * gcj.texi (Configure-time Options): Add -fcheck-references.
10996 * expr.c (build_java_indirect_ref): New function.
10997 (java_check_reference): New function.
10998 (build_java_array_length_access): Use build_java_indirect_ref to
10999 check for null references.
11000 (build_java_arrayaccess): Likewise.
11001 (build_get_class): Likewise.
11002 (build_field_ref): Likewise.
11003 (invoke_build_dtable): Likewise.
11004 (build_invokeinterface): Likewise.
11005 * lang.c (lang_f_options): Add flag_check_references.
11006 * jvspec.c (jvgenmain_spec): Add flag_check_references.
11007 * java-tree.h (flag_check_references): New variable.
11008 * lang.c (flag_check_references): Likewise.
11009 * parse.y (patch_invoke): Use java_check_reference.
11010 (patch_assignment): Allow for extra nesting in
11011 _Jv_CheckArrayStore.
11013 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
11015 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11016 * lex.c (cxx_keywords): Likewise.
11018 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11020 * parse.y (qualify_ambiguous_name): Broaden `length'
11021 recognition. Help MODIFY_EXPR be resolved as expression names.
11022 Fixes PR java/2066. Fixes PR java/2400.
11024 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
11026 * gjavah.c (process_file): Mark interface definitions with
11027 "__attribute__ ((java_interface))".
11029 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11031 * class.c (layout_class): Fixed push_super_field's second
11032 argument. Fixes PR java/2333.
11033 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11034 too early to lay innerclasses out.
11036 2001-03-20 Tom Tromey <tromey@redhat.com>
11037 Alexandre Petit-Bianco <apbianco@redhat.com>
11039 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11040 inside an array reference. Insertion of the array store check
11041 rewritten. Fixes PR java/2299.
11043 2001-03-20 Tom Tromey <tromey@redhat.com>
11045 * lex.c (java_read_unicode): Only accept leading `u's.
11047 2001-03-20 Tom Tromey <tromey@redhat.com>
11049 * jcf-parse.c (read_class): Initialize `class'.
11051 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11053 * jcf_parse.c (jcf_parse): Eliminate unused variable.
11055 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11057 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11058 (layout_class): Likewise.
11059 (layout_class_method): Likewise.
11060 (emit_register_classes): Likewise.
11061 * decl.c (builtin_function): Likewise.
11062 (give_name_to_locals): Likewise.
11064 2001-03-19 Per Bothner <per@bothner.com>
11066 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
11067 before trying to load an inner class.
11069 Fixes to process to command-line .class files in two passes.
11070 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
11071 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
11072 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
11073 * class.c (is_compiled_class): Fix for renamed flag.
11074 * parse.y (maybe_create_class_interface_decl): Likewise.
11075 * jcf-parse.c (yyparse): Also set if compiling .class files.
11076 * jcf-parse.c (read_class); Read current_class.
11077 (jcf_parse): Make static.
11078 (load_inner_classes): New function, with code moved from jcf_parse,
11079 because we need to inner classes after the command-line files are read.
11080 (yyparse): Set finput to NULL when it doesn't need to be closed.
11081 Reduce use of main_jcf (basically only for archive) and
11082 use finput instead of main_jcf->read_state.
11083 Inline jcf_figure_file_type into yyparse.
11084 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11085 Defer load_inner_classes and parse_class_file to a second pass,
11086 after we've correctly mapped command-line .clas fiels to classes.
11087 (jcf_figure_file_type): Removed.
11088 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
11089 (JCF_ZERO): Also clear zipd field.
11090 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
11092 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11094 * jcf-parse.c (yyparse): Change ch from char * to char.
11096 2001-03-19 Per Bothner <per@bothner.com>
11098 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
11099 Add constructed filelist-file at end, following -xjava. Thus any .o
11100 and library files are not affected by the -xjava. Also wrap
11101 explicit @FILE with -xjava and -xnone.
11103 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
11105 * class.c (build_static_field_ref): Call make_decl_rtl() after
11106 setting the DECL_EXTERNAL flag.
11108 2001-03-17 Per Bothner <per@bothner.com>
11110 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
11112 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
11113 when result is is needed (target is STACK_TARGET).
11115 * parse.h (JDEP_SOLV): Removed.
11116 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
11118 * parse.y (incomplete_class_list): Removed.
11119 (obtain_incomplete_type): Don't use or set incomplete_class_list.
11120 It doesn't work if resolve_class changes the name of an array type
11121 that is on the list and then someone else looks for the modified name.
11122 Also, seems liable to break when compiling multiple source files at
11123 once. So the simplest is to just remove incomplete_class_list -
11124 it is only a minor space win and it is not even clear it saves time.
11126 * parse.y (resolve_class): Remove unneeded promote_type.
11128 2001-03-15 Per Bothner <per@bothner.com>
11130 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
11131 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
11132 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11133 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11135 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
11136 * parse.y (java_expand_classes): Likewise.
11138 * parse.y (expand_start_java_method): Was only called once and had a
11139 misleading name, so inline in caller java_complete_expand_method.
11140 (enter_a_block): Likewise inline in enter_block and remove.
11142 Remove junk from when gcc/java was created (by copying from C/C++).
11143 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
11144 (struct binding_level): Remove fields keep, keep_if_subblocks,
11145 more_cleanups_ok, have_cleanups (which have never been used).
11146 (pushlevel, poplevel): Remove related useless code.
11148 * class.c (make_class_data): The class_dtable_decl (i.e. the
11149 vtable for Class) should be external, except when compiling Class.
11151 * jvspec.c (lang_specific_driver): Fix -C handling.
11152 Check -save-temps to see if temp @FILE should be deleted.
11153 Follow-up to/fix for February 16 patch.
11155 * verify.c (verify_jvm_instructions): Better error msgs for dup.
11156 (type_stack_dup): Remove no-longer neded error check.
11158 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
11160 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11161 to 'for_pointer'. If this type is for a pointer (argument) mangling,
11162 don't surround the element with 'N..E' if the type name is
11165 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11167 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11168 DECL_RTL_SET_P, etc.
11169 (make_method_value): Likewise.
11170 (get_dispatch_table): Likewise.
11172 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11174 2001-03-07 Tom Tromey <tromey@redhat.com>
11176 * config-lang.in (lang_requires): Define.
11178 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
11180 * typeck.c (convert): Check flag_unsafe_math_optimizations,
11181 not flag_fast_math.
11183 2001-03-05 Per Bothner <per@bothner.com>
11185 Fix a problem where rest_of_decl_compilation applied to
11186 class_dtable_decl causes problems because it was done too early,
11187 before output file was opened.
11188 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
11189 * class.c (class_dtable_decl): Add macro - element of class_roots.
11190 (make_class_data): Define class_dtable_decl.
11191 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
11193 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11195 * java/class.c, java/decl.c, java/java-tree.h: Replace all
11196 uses of 'boolean' with 'bool'.
11198 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11200 * lang-specs.h: Add zero initializer for cpp_spec field to all
11203 2001-02-16 Per Bothner <per@bothner.com>
11205 Handle compiling multiple input files at once, and @FILE syntax.
11206 * gcj.texi: Updated documentation to match.
11207 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
11208 * jcf-parse.c (parse_source_file): Split into ...
11209 (parse_source_file_1): New function - and:
11210 (parse_source_file_2): New function.
11211 (yyparse): On -ffilelist-file, open and scan named file.
11212 On first pass over files, only do parse_source_file_1.
11213 A new second pass calls parse_source_file_2 for each file to compile.
11214 (init_jcf_parse): Call init_src_parse.
11215 * jvspec.c (INDIRECT_FILE_ARG): New flag.
11216 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
11217 as multiple input file combined in one compilation.
11218 * lang-options.h: Add -ffilelist-file
11219 * lang.c (flag_filelist_file): New flag variable.
11220 (lang_f_options): Handle -ffilelist-file.
11221 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11222 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
11223 gclass_list - use global fields of src_parse_roots instead.
11224 * parse.y (src_parse_roots): New array.
11225 (incomplete_class_list, gclass_list): New macros.
11226 (push_parser_context, java_pop_parser_context,
11227 java_parser_context_resume): Don't fiddle with deleted fields.
11228 (various): Use incomplete_class gclass_list and global macros
11229 instead of parse_ctxt fields - the lists are global.
11230 (init_src_parse): New function.
11232 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11234 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11236 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11238 * parse.y (check_inner_class_access): Moved declaration of local
11239 `enclosing_decl_type' to the right location.
11241 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
11243 * parse.y (parser_check_super_interface): Don't call
11244 check_pkg_class_access for an inner interface.
11245 (parser_check_super): Don't call check_pkg_class_access for inner
11247 (do_resolve_class): Simplify enclosing type loop. Don't call
11248 check_pkg_class_access if CL and DECL are not set.
11249 (find_in_imports_on_demand): Set DECL if class_type needed to be
11250 loaded. Don't call check_pkg_class_access for an inner class.
11251 (check_inner_class_access): Rewritten to implement member access
11252 rules as per spec 6.6.1.
11253 (check_pkg_class_access): Handle the empty package correctly.
11254 (in_same_package): New function. Determine if two classes are in the
11257 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
11259 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11260 method into array types.
11261 * parse.y (patch_method_invocation): Bypass access check on clone call
11264 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
11266 * expr.c (build_instanceof): Check for arrays when trying fold to
11269 2001-02-15 Jim Meyering <meyering@lucent.com>
11271 * Make-lang.in (java.install-common): Depend on `installdirs'.
11272 (java.install-info): Likewise.
11274 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
11276 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11278 2001-02-14 Tom Tromey <tromey@redhat.com>
11279 Alexandre Petit-Bianco <apbianco@cygnus.com>
11281 Fix for PR java/1261.
11282 * typeck.c (build_java_array_type): Add public `clone' method to
11284 * parse.y (resolve_qualified_expression_name): Use current_class
11285 when checking for inaccessibility.
11286 (patch_method_invocation): Fixed error message when accessibility
11287 denied. Added `from_super' argument.
11289 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11291 * parse.y (resolve_class): Don't build a fake decl. Use the one
11293 * typeck.c (build_java_array_type): Build and assign decl to array
11296 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11298 * parse.y (not_accessible_p): Changed leading comment. Added extra
11299 `where' argument. Use it to enforce protected access rules.
11300 (resolve_qualified_expression_name): Added extra argument to
11302 (patch_method_invocation): Use argument `primary' to provide
11303 not_accessible_p with an extra argument.
11304 (lookup_method_invoke): Added extra argument to not_accessible_p.
11305 (search_applicable_method_list): Likewise.
11307 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
11309 * parse.y (resolve_qualified_expression_name): Try to resolve as
11310 an inner class access only if `decl' is a TYPE_DECL.
11312 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11314 * decl.c (classdollar_identifier_node): Initialize.
11315 * java-tree.h (enum java_tree_index): New entry
11316 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11317 (classdollar_identifier_node): New macro.
11318 (ID_CLASSDOLLAR_P): Likewise.
11319 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11320 (build_dot_class_method_invocation): Likewise.
11321 (find_applicable_accessible_methods_list): `class$' can't be
11324 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
11326 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11328 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11330 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11331 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11334 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11336 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11337 outside of the `__U' sequence too.
11338 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11341 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11343 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11345 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11347 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11348 (JVGENMAIN_OBJS): Likewise.
11349 * java-tree.h (append_gpp_mangled_name): New prototype.
11350 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11351 Removed cast calling `gcc_add_root.'
11352 * jvgenmain.c (mangle_obstack): New global, initialized.
11354 (do_mangle_class): Constify local `ptr.'
11355 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11356 append_gpp_mangle_name and update `count' if necessary.
11357 Use `mangle_obstack.'
11358 * mangle.c (append_unicode_mangled_name): Removed.
11359 (append_gpp_mangled_name): Likewise.
11360 (unicode_mangling_length): Likewise.
11361 (mangle_member_name): Return type set to `void.'
11362 (mangle_field_decl): Don't append `U' in escaped names.
11363 (mangle_method_decl): Likewise.
11364 (mangle_member_name): Just use `append_gpp_mangled_name.'
11365 * mangle_name.c: New file.
11367 2001-02-07 Per Bothner <per@bothner.com>
11369 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
11371 * check-init.c (check_init): Don't call done_alternative after
11372 processing loop code, as a LOOP_EXPR never terminates normally.
11374 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
11376 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11378 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11380 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11383 2001-02-06 Tom Tromey <tromey@redhat.com>
11385 * lex.c (java_new_lexer): Longer error message.
11387 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
11388 Alexandre Petit-Bianco <apbianco@cygnus.com>
11390 * typeck.c (build_prim_array_type): Added leading comment.
11391 (build_java_array_type): Moved locals out of
11392 block. Always create the `data' field, fixed alignment to match
11395 2001-02-04 Tom Tromey <tromey@redhat.com>
11397 * expr.c (java_lang_expand_expr): Don't bother recomputing
11398 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
11399 Fixes PR java/1866.
11401 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11403 * parse.y (process_imports): Save the original name of the import
11404 for better error report.
11406 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
11408 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11409 of macros used when compiling jvspec.c.
11410 * jvspec.c (lang_specific_driver): Link with the shared
11413 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11415 * check-init.c (check_init): Call internal_error instead of fatal.
11416 * expr.c (java_lang_expand_expr): Likewise.
11417 * jcf-parse.c (get_constant): Likewise.
11418 * mangle.c (java_mangle_decl): Likewise.
11419 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11420 (operator_string): Likewise.
11421 * check-init.c (check_init): Call abort instead of fatal.
11422 * class.c (build_class_ref): Likewise.
11423 * constants.c (write_constant_pool): Likewise.
11424 * decl.c (start_java_method): Likewise.
11425 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11426 (java_stack_dup, encode_newarray_type): Likewise.
11427 (build_java_array_length_access): Likewise.
11428 (build_java_check_indexed_type, expand_java_pushc): Likewise.
11429 (build_java_soft_divmod, build_invokeinterface): Likewise.
11430 * java-tree.h (INNER_CLASS_P): Likewise.
11431 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
11432 (give_name_to_class, get_class_constant): Likewise.
11433 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11434 (find_constant_index, generate_bytecode_conditional): Likewise.
11435 (generate_bytecode_insns, perform_relocations): Likewise.
11436 * lex.c (java_unget_unicode, java_lex): Likewise.
11437 * mangle.c (mangle_type, mangle_record_type): Likewise.
11438 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11439 (finish_mangling): Likewise.
11440 * parse.h (MARK_FINAL_PARMS): Likewise.
11441 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11442 (obtain_incomplete_type, java_complete_class): Likewise.
11443 (java_check_regular_methods, java_complete_expand_method): Likewise.
11444 (cut_identifier_in_qualified, check_deprecation): Likewise.
11445 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11446 (java_complete_lhs, lookup_name_in_blocks): Likewise.
11447 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11448 * typeck.c (set_local_type, parse_signature_type): Likewise.
11449 (parse_signature_string, build_java_signature): Likewise;
11450 (set_java_signature): Likewise.
11451 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11452 * class.c (add_method): Call fatal_error instead of fatal.
11453 (build_static_field_ref): Likewise.
11454 * expr.c (build_known_method_ref, expand_invoke): Likewise.
11455 * jcf-parse.c (get_constant, jcf_parse): Likewise.
11456 * lex.c (java_new_new_lexer): Likewise.
11457 * jv-scan.c (main): Likewise.
11458 (fatal_error): Renamed from fatal.
11459 * jcf-parse.c (yyparse): Call fatal_io_error instead of
11461 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11462 (yyparse): Likewise.
11463 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11464 * lex.c (java_get_line_col): Likewise.
11465 * jcf-parse.c (load_class): Make errors non-fatal.
11466 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
11468 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
11470 * jvgenmain.c (class_mangling_suffix): Remove unused string.
11471 (error): Remove unused function.
11472 (main): Don't use "__attribute__ alias" on generated class symbol.
11474 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11476 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11478 * parse.y (finish_method_declaration): Code accounting for WFLed
11479 method DECL_NAMEs deleted.
11480 (check_abstract_method_definitions): Likewise.
11481 (resolve_type_during_patch): Layout resolved type.
11482 * typeck.c (lookup_do): Removed unused local.
11484 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
11486 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
11487 * decl.c (init_decl_processing): Use integer_minus_one_node, not
11488 integer_negative_one_node.
11489 * expr.c (build_java_binop): Likewise.
11491 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
11493 * zextract.c (read_zip_archive): Read file_offset before writing
11494 zipd and consequently clobbering the header contents.
11496 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11498 * Make-lang.in: Remove all dependencies on defaults.h.
11499 * decl.c: Don't include defaults.h.
11500 * expr.c: Likewise.
11501 * parse.y: Likewise.
11503 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11505 * ChangeLog (2001-01-21): Fixed typo.
11506 * class.c (layout_class_method): Code accounting for WFLed
11507 method DECL_NAMEs deleted.
11508 * constant.c (find_methodref_index): Likewise.
11509 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
11510 * java-tree.h (DECL_FUNCTION_WFL): New macro.
11511 (struct lang_decl): New field `wfl'.
11512 (java_get_real_method_name): Prototype deleted.
11513 * mangle.c (mangle_method_decl): Code accounting for WFLed
11514 method DECL_NAMEs deleted.
11515 * parse.h (GET_METHOD_NAME): Macro deleted.
11516 * parse.y (reset_method_name): Deleted.
11517 (method_header): Set DECL_FUNCTION_WFL.
11518 (check_abstract_method_header): Code accounting for WFLed method
11519 DECL_NAMEs deleted.
11520 (java_get_real_method_name): Deleted.
11521 (check_method_redefinition): Code accounting for WFLed method
11522 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
11523 (java_check_regular_methods): Likewise.
11524 (java_check_abstract_methods): Likewise.
11525 (java_expand_classes): Don't call `reset_method_name.'
11526 (search_applicable_method_list): Use DECL_NAMEs instead of
11528 * typeck.c (lookup_do): Code accounting for WFLed method
11529 DECL_NAMEs deleted.
11531 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
11533 * lex.c (java_read_char): Check for EOF from getc first.
11535 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11537 * class.c (layout_class): Don't lay the superclass out if it's
11538 already being laid out.
11539 * jcf-parse.c (handle_innerclass_attribute): New function.
11540 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
11541 handle_innerclasses_attribute.
11542 (jcf_parse): Don't load an innerclasses if it's already being
11544 * jcf-write.c (append_innerclass_attribute_entry): Static
11545 `anonymous_name' and its initialization deleted. `ocii' and `ini'
11546 to be zero for anonymous classes.
11548 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11550 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
11552 * jcf-parse.c (set_source_filename): Use
11553 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
11555 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11557 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
11558 gets a unique asm name.
11560 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11562 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
11563 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11565 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
11566 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
11567 * parse.y (lookup_package_type_and_set_next): Deleted.
11568 (resolve_package): Removed unnecessary code.
11569 (find_applicable_accessible_methods_list): `finit$' can't be
11571 * verify.c (pop_argument_types): Added missing prototype.
11573 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
11575 * config-lang.in: Disable java by default.
11577 2001-01-23 Tom Tromey <tromey@redhat.com>
11579 * gcj.texi (Copying): New node.
11580 Added copyright information.
11582 2001-01-21 Per Bothner <per@bothner.com>
11584 Various fixes to allow compiling a compressed .jar/.zip archive.
11585 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
11586 (struct ZipFile): Add fields name and next (from ZipFileCache).
11587 (struct ZipDirectory): New field zipf points to owning ZipFile.
11588 * jcf.h (struct ZipDirectory): Add forward declaration.
11589 (struct JCF): Declare zipd field to have type struct ZipDirectory.
11590 Remove seen_in_zip and zip_offset fields.
11591 (JCF_SEEN_IN_ZIP): New macro.
11592 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
11593 * jcf-io.c: Change all ZipFileCache to ZipFile.
11594 (read_zip_member): New function.
11595 (open_in_zip): Call read_zip_member.
11596 * jcf-parse.c (find_in_current_zip): Remove function.
11597 (read_class): Merge in find_in_current_zip functionality.
11598 Call read_zip_member if needed.
11599 (parse_zip_file_entries): Use read_zip_member.
11600 (process_zip_dir): Update for removed and added JCF fields.
11601 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
11603 2001-01-21 Per Bothner <per@bothner.com>
11605 Minor optimization of static ggc roots.
11606 * jcf-parse.c (parse_roots): New static field.
11607 (current_field, current_method, current_file_list): Replace by macros
11608 naming fields of parse_roots.
11609 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
11610 * class.c (class_roots): New static field.
11611 (registered_class, fields_ident, info_ident, class_list):
11612 New macros naming fields of parse_roots.
11613 (build_static_field_ref): Don't register roots here.
11614 (layout_class): Static field list replaced by macro class_list.
11615 (init_class_processing): Call ggc_add_tree_root for 4 roots.
11616 Initialize fields_ident and info_ident here.
11618 2001-01-21 Per Bothner <per@bothner.com>
11620 * jcf-parse.c (ggc_mark_jcf): New function.
11621 (init_jcf_parse): Register current_jcf as ggc root.
11623 2001-01-21 Per Bothner <per@bothner.com>
11625 * lang.c (put_decl_node): Print method's name.
11627 2001-01-21 Per Bothner <per@bothner.com>
11629 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
11630 (verify_jvm_instructions): Use it, for better error messages on loads.
11632 2001-01-21 Per Bothner <per@bothner.com>
11634 * verify.c (merge_type_state): Still may have to merge even if
11635 LABEL_VERIFIED (label).
11637 2001-01-21 Per Bothner <per@bothner.com>
11639 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
11640 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
11642 2001-01-19 Per Bothner <per@bothner.com>
11644 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
11645 if expeting an interface type. Refines Tom's change of 2000-09-12.
11647 2001-01-18 Per Bothner <per@bothner.com>
11649 * gcj.texi (Input Options): Mention .java files.
11651 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11653 * lang-options.h (-Wunsupported-jdk11): Removed.
11654 * lang.c (flag_not_overriding): Deleted.
11655 (flag_static_local_jdk1_1): Likewise.
11656 (lang_W_options): Removed "unsupported-jdk11" entry.
11657 * parse.y (java_check_methods): Removed dead code.
11659 2001-01-17 Tom Tromey <tromey@redhat.com>
11661 Changes suggested by Per Bothner:
11662 * gcj.texi (Input Options): Don't mention input files.
11663 (Code Generation): Updated --main information.
11664 (Invoking jcf-dump): Mention that --javap is incomplete.
11665 From Alexandre Petit-Bianco:
11666 (Warnings): Don't mention -Wunsupported-jdk11.
11668 (Compatibility): Mention JDK 1.2-ness of libraries.
11669 (Resources): Mention resources used when writing gcj.
11671 2001-01-17 Tom Tromey <tromey@redhat.com>
11673 * gcj.texi: New file.
11674 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
11675 (java.info): Depend on gcj.info.
11676 (java/gcj.dvi): New target.
11677 (java.dvi): Depend on gcj.dvi.
11678 (java.install-info): Wrote.
11680 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
11682 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
11683 having called make_decl_rtl.
11685 2001-01-14 Per Bothner <per@bothner.com>
11687 Various patches to emit better messages on verification errors.
11688 * expr.c (push_type_0): Return error indication on stack overflow,
11689 instead of callinfg fatal.
11690 (push_type): Now just call push_type_0 (nd fatal on overflow).
11691 (pop_type_0): Return detailed error message (in a char** argument).
11692 (pop_type): If pop_type_0 fails, print error message.
11693 (pop_argument_types): Moved to verify.c.
11694 * verify.c (pop_argument_types): Moved from expr.c.
11695 Return a (possible) error message, rather than void.
11696 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
11697 (verify_jvm_instruction): Use new macros, improving error messages.
11698 For case OPCODE_astore use object_ptr_type_node.
11699 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
11700 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
11702 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
11703 constant, return body without wrapper. (Improves constant folding.)
11704 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
11706 2001-01-13 Per Bothner <per@bothner.com>
11708 * expr.c (expand_java_field_op): Assigning to a final field outside
11709 an initializer does not violate JVM spec, so should be warning, not
11710 error. (Sun's verifier does not complain - though MicroSoft's does.)
11712 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
11714 * gjavah.c (version), jcf-dump.c (version): Update copyright year
11717 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
11719 * parse.y (resolve_expression_name): Permit instance variables from
11720 enclosing context in super constructor call.
11721 (resolve_qualified_expression_name): Permit enclosing class's qualified
11722 "this" in super constructor call.
11724 2001-01-10 Mark Mitchell <mark@codesourcery.com>
11726 * class.c (build_utf8_ref): Remove last argument in call to
11727 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11728 (build_class_ref): Likewise.
11729 (build_static_field_ref): Likewise.
11730 (get_dispatch_table): Likewise.
11731 (layout_class_method): Likewise.
11732 (emit_register_classes): Likewise.
11733 * constants.c (build_constant_data_ref): Likewise.
11734 * decl.c (builtin_function): Likewise.
11735 (create_primitive_vtable): Likewise.
11736 * expr.c (build_known_method_def): Likewise.
11737 (build_jni_stub): Likewise.
11738 (java_lang_expand_expr): Likewise.
11740 2001-01-10 Tom Tromey <tromey@redhat.com>
11742 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
11744 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11746 * java-tree.h (lang_printable_name_wls): New prototype.
11747 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
11748 rather than `current_class' to print type name. Don't prepend type
11749 names when printing constructor names.
11750 (lang_printable_name_wls): New function.
11751 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
11752 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
11753 * parse.y (patch_method_invocation): Message tuned for constructors.
11754 (not_accessible_p): Grant `private' access from within
11755 enclosing contexts.
11757 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11759 All files with updated copyright when applicable.
11760 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
11761 * class.c (mangle_class_field): Function removed.
11762 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
11763 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
11764 (build_class_ref): Call `java_mangle_class_field' instead of
11765 `mangle_class_field.'
11766 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
11767 (layout_class): Call `java_mangle_decl' instead of
11768 `mangle_static_field.'
11769 (cxx_keywords): Initialized static array moved to `lex.c.'
11770 (layout_class_method): Changed leading comment. Simplified to
11771 call `java_mangle_decl.' Local `ptr' moved in for loop body.
11772 * decl.c (lang_mark_tree): Mark field `package_list.'
11773 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
11774 (struct lang_type): New field `package_list.'
11775 (unicode_mangling_length): Prototype removed.
11776 (append_gpp_mangled_name, append_gpp_mangled_classtype,
11777 emit_unicode_mangled_name): Likewise.
11778 (cxx_keyword_p): New prototype.
11779 (java_mangle_decl, java_mangle_class_field,
11780 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
11781 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
11783 * jvgenmain.c (main_method_prefix): Global variable removed.
11784 (main_method_suffix): Likewise.
11785 (do_mangle_classname): New function.
11786 (main): Call it. Format changed to accommodate new mangling scheme.
11787 * lex.c: (utf8_cmp): Conditionally prototyped.
11788 (cxx_keywords): Moved from class.c, conditionally defined.
11789 (utf8_cmp, cxx_keyword_p): Likewise.
11790 * mangle.c (obstack.h, ggc.h): Included.
11791 (mangle_field_decl): New function.
11792 (mangle_method_decl, mangle_type, mangle_pointer_type,
11793 mangle_array_type, mangle_record_type,
11794 find_compression_pointer_match, find_compression_array_match,
11795 find_compression_record_match,
11796 find_compression_array_template_match, set_type_package_list,
11797 entry_match_pointer_p, emit_compression_string, init_mangling,
11798 finish_mangling, compression_table_add, mangle_member_name): Likewise.
11799 (mangle_obstack): New global.
11800 (MANGLE_RAW_STRING): New macro.
11801 (unicode_mangling_length): Turned static.
11802 (append_unicode_mangled_name): Renamed from
11803 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
11804 replaces `obstack', removed from the parameter list.
11805 (append_gpp_mangled_name): Turned static. `mangle_obstack'
11806 replaces parameter `obstack', removed from the parameter list. Call
11807 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
11808 (append_gpp_mangled_classtype): Removed.
11809 (compression_table, compression_next): New static variables.
11810 * parse.y (temporary_obstack): Extern declaration removed.
11812 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11814 * parse.y (patch_binop): Compute missing type in error situations.
11816 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
11818 * class.c (make_class_data): Push initial value for "arrayclass".
11819 * decl.c (init_decl_processing): Add new class field "arrayclass".
11821 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
11823 From patha@softlab.ericsson.se:
11824 * parse.y (switch_label): Use build, not build1, to construct
11827 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
11829 * lang.c (lang_decode_option): Change -MA to -MP.
11830 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
11831 Update to new prototype; do quote targets.
11832 (jcf_dependency_write): Update.
11834 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
11836 Shorten primitive array allocation path:
11837 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
11838 to create new primitive arrays.
11839 * expr.c (build_newarray): If generating native code, call
11840 soft_newarray_node with a reference to the primitive TYPE identifier
11841 instead of type_value.
11843 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
11845 Fix for PRs gcj/312 and gcj/253:
11846 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
11847 dest if they arn't already.
11848 * class.c (layout_class): Call maybe_layout_super_class on
11849 superinterfaces also, but only if compiling from bytecode.
11851 Fix for PR gcj/373:
11852 * parse.y (create_class): Set ACC_STATIC if class is declared in an
11855 2000-12-15 Tom Tromey <tromey@redhat.com>
11857 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
11860 2000-12-14 Andrew Haley <aph@redhat.com>
11862 * boehm.c (mark_reference_fields): Change test to correctly detect
11865 2000-12-15 Andreas Jaeger <aj@suse.de>
11867 * config-lang.in (lang_dirs): Added.
11869 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
11871 * parse.y (end_artificial_method_body): Fixed undefined behavior.
11872 Credits go to rth for finding it.
11874 2000-12-13 Mike Stump <mrs@wrs.com>
11876 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
11878 2000-11-07 Tom Tromey <tromey@cygnus.com>
11880 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
11881 * lex.c (java_ignorable_control_p): Removed.
11882 (java_letter_or_digit_p): Removed.
11883 (java_start_char_p): New function.
11884 (java_read_char): Return `int', not `unicode_t'. Changed
11886 (java_read_unicode): Likewise.
11887 (java_read_unicode_collapsing_terminators): Likewise.
11888 (java_get_unicode): Likewise.
11889 (java_new_lexer): Initialize hit_eof.
11890 (java_parse_end_comment): Take `int' argument.
11891 (java_parse_doc_section): Likewise.
11892 (java_parse_escape_sequence): Don't allow backlash-newline.
11894 * lex.h (JAVA_DIGIT_P): Removed.
11895 (_JAVA_LETTER_OR_DIGIT_P): Removed.
11896 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
11897 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
11898 (JAVA_PART_CHAR_P): New macro.
11900 (JAVA_CHAR_ERROR): Now -2.
11901 (java_lexer): New field `hit_eof'.
11902 * chartables.h: New file.
11903 * gen-table.pl: new file.
11905 2000-11-20 Tom Tromey <tromey@cygnus.com>
11906 Alexandre Petit-Bianco <apbianco@cygnus.com>
11908 * parse.y (java_complete_lhs): Only allow compound assignment of
11909 reference type if type is String.
11911 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11913 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
11914 jcf-path.c: Likewise.
11916 2000-12-09 Anthony Green <green@redhat.com>
11918 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
11919 filestart and filename_length as int values.
11921 2000-12-07 Mo DeJong <mdejong@redhat.com>
11923 * jcf-io.c (find_class): Correct the logic that tests to see if a
11924 .java file is newer than its .class file. The compiler was
11925 incorrectly printing a warning when file mod times were equal.
11927 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
11929 * jvgenmain.c: Use ISPRINT not isascii.
11931 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11933 * parse.y (end_artificial_method_body): Fixed typo.
11935 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
11937 * parse.y (patch_method_invocation): Pick the correct enclosing
11938 context when creating inner class instances.
11941 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
11943 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
11944 Update copyright year to 2000.
11946 2000-11-23 Anthony Green <green@redhat.com>
11948 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
11949 Move current_file_list out of yyparse and make it static.
11951 * expr.c: Declare quick_stack and tree_list_free_list as static
11952 (init_expr_processing): Register quick_stack and
11953 tree_list_free_list roots.
11955 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11957 * parse.y (build_outer_field_access): New local `decl_ctx', use
11958 it. Check for field's context and current class immediate outer
11959 context inheritance.
11960 (outer_field_access_p): Consider fields inherited from the last
11962 (build_access_to_thisn): Stop at the last enclosing context if
11966 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
11968 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
11970 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
11972 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
11975 2000-11-20 Tom Tromey <tromey@cygnus.com>
11977 * jv-scan.c (help): Document --complexity.
11978 (options): Added --complexity.
11979 (flag_complexity): New global.
11980 (main): Call `report'.
11981 * parse-scan.y (complexity): New global.
11982 (if_then_statement, if_then_else_statement,
11983 if_then_else_statement_nsi, switch_block_statement_group,
11984 while_expression, do_statement, for_begin, continue_statement,
11985 throw_statement, catch_clause, finally, method_invocation,
11986 conditional_and_expression, conditional_or_expression,
11987 conditional_expression): Update complexity.
11988 (reset_report): Reset complexity.
11989 (report): New function.
11991 2000-11-20 Tom Tromey <tromey@cygnus.com>
11993 * lex.c (yylex): Added STRICT_TK case.
11994 * parse.y (STRICT_TK): Added.
11995 * parse-scan.y (STRICT_TK): Added.
11996 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
11997 `;'. Use 4, not 3, with -k option. Correctly rename resulting
11999 * keyword.h: Rebuilt.
12000 * keyword.gperf (strictfp): Added.
12002 2000-11-20 Tom Tromey <tromey@cygnus.com>
12004 * lex.c (yylex): Recognize floating point constants with leading
12007 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12009 * java-tree.h (cyclic_inheritance_report): Constify.
12010 * parse.y (cyclic_inheritance_report): Likewise.
12012 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
12014 * parse.y (goal): Remove call to ggc_add_string_root.
12016 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
12018 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12019 Create string in scratch buffer, then pass to build_string.
12021 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
12023 * parse.y (issue_warning_error_from_context): Add
12026 2000-11-11 Anthony Green <green@redhat.com>
12028 * jcf-parse.c (process_zip_dir): Add finput parameter.
12029 (jcf_figure_file_type): Call process_zip_dir with appropriate
12032 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12034 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12035 * jcf-parse.c (jcf_figure_file_type): Likewise.
12037 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
12039 * parse.y (create_new_parser_context): Use memset () instead of
12042 2000-11-08 Tom Tromey <tromey@cygnus.com>
12044 * gjavah.c (process_file): Only include gcj/cni.h when generating
12047 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
12049 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12050 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12051 instead of bzero ().
12053 2000-11-05 Tom Tromey <tromey@cygnus.com>
12055 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12056 * lex.c (IS_ZERO): New define.
12057 (java_perform_atof): Error on floating point underflow.
12059 2000-11-04 Tom Tromey <tromey@cygnus.com>
12061 * lex.c (java_parse_escape_sequence): Only read two octal
12062 characters if the first one is greater than 3. Don't allow
12063 "octal" numbers to include the digits 8 or 9.
12065 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
12067 * Make-lang.in (java.distdir): Remove.
12069 2000-11-03 Tom Tromey <tromey@cygnus.com>
12071 * Make-lang.in (java.dvi): New target.
12072 Partial fix for PR other/567.
12074 * lang-options.h: Mention -Wout-of-date.
12075 * jcf-dump.c (flag_newer): New global.
12076 * gjavah.c (flag_newer): New global.
12077 * jcf-io.c (find_class): Only warn when flag_newer set.
12078 * lang.c (flag_newer): New global.
12079 (struct string_option): New declaration.
12080 (lang_W_options): New global.
12081 (process_option_with_no): New function.
12082 (lang_decode_option): Use it.
12084 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12085 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12088 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12089 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12090 * lex.c (java_read_unicode): Removed `term_context' argument.
12091 Recognize any number of `u' in `\u'.
12092 (java_read_unicode_collapsing_terminators): New function.
12093 (java_get_unicode): Use it.
12094 (java_lineterminator): Removed.
12095 (yylex): Produce error if character literal is newline or single
12096 quote. Return if eof found in middle of `//' comment. EOF in
12097 `//' comment is only an error if pedantic.
12098 (java_ignorable_control_p): New function.
12099 (java_parse_end_comment): Return if eof found in middle of
12102 * jv-scan.c (pedantic): New global.
12104 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12106 * parse.y (outer_field_access_p): Inherited fields aren't
12107 consider outer fields.
12108 (maybe_build_thisn_access_method): Use
12109 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12110 (resolve_expression_name): Trigger an error if a static field
12111 is being accessed as an outer field.
12113 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12115 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12118 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12120 * Make-lang.in: Move all build rules here from Makefile.in,
12121 adapt to new context. Wrap all rules that change the current
12122 directory in parentheses. Expunge all references to $(P).
12123 When one command depends on another and they're run all at
12124 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12125 all object-file generation rules. Delete obsolete variables.
12127 * Makefile.in: Delete.
12128 * config-lang.in: Delete outputs= line.
12130 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12132 * parse.y (patch_method_invocation): NULLify this_arg when already
12134 (maybe_use_access_method): Handle call to methods unrelated to the
12135 current class. Fixed comment.
12138 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12140 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12143 2000-10-24 Tom Tromey <tromey@cygnus.com>
12145 * lex.c (java_new_lexer): Initialize new fields. Work around
12146 broken iconv() implementations.
12147 (java_read_char): Swap bytes if required. Use fallback decoder if
12149 (byteswap_init, need_byteswap): New globals.
12150 (java_destroy_lexer): Only close iconv handle if it is in use.
12151 * lex.h (java_lexer): New fields read_anything, byte_swap,
12153 Made out_buffer unsigned.
12155 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12157 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12158 where an enclosing context can be set on the jdep.
12159 (do_resolve_class): Fixed identation.
12161 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12163 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12165 * jcf-reader.c (peek_attribute, skip_attribute): Only define
12168 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12170 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12172 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12174 * jcf-write.c (OP1): Update `last_bc'.
12175 (struct jcf_block): Fixed indentation and typo in comments. New
12177 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12178 follows `monitorenter'.
12179 * parse.y (patch_synchronized_statement): New local `tmp'. Call
12183 2000-10-16 Tom Tromey <tromey@cygnus.com>
12185 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12186 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12187 * lang-options.h: Added -MA, -MT, -MF..
12188 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12189 (DEPEND_TARGET_SET): New macro.
12190 (DEPEND_FILE_ALREADY_SET): Likewise.
12191 (init_parse): Handle new flags.
12192 * jcf.h (jcf_dependency_print_dummies): Declare.
12193 * Make-lang.in (s-java): Added mkdeps.o.
12194 * Makefile.in (BACKEND): Added mkdeps.o.
12195 (../gcjh$(exeext)): Added mkdeps.o.
12196 (../jcf-dump$(exeext)): Added mkdeps.o.
12197 * jcf-depend.c: Include mkdeps.h.
12198 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12199 add_entry): Removed.
12200 (jcf_dependency_reset): Rewrote.
12201 (dependencies): New global.
12202 (jcf_dependency_set_target): Rewrote.
12203 (jcf_dependency_add_target): Likewise.
12204 (jcf_dependency_add_file): Likewise.
12206 (print_ents): Removed.
12207 (jcf_dependency_write): Rewrote.
12208 (print_dummies): New global.
12209 (jcf_dependency_print_dummies): New function
12210 (jcf_dependency_write): Call deps_dummy_targets if required.
12212 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12214 * gjavah.c (add_class_decl): Removed unused variables `tname',
12215 `tlen' and `name_index'.
12216 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12217 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12218 in `wfl_operator' with value.
12219 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12220 (jcf_figure_file_type): Fixed identation.
12221 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12222 * parse.y (analyze_clinit_body): New function.
12223 (static_initializer:): Reset `current_static_block'.
12224 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12225 `wfl_operator' with new value.
12226 (lookup_cl): Use EXPR_WFL_FILENAME.
12227 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12228 analyze_clinit_body.
12229 (build_outer_field_access): Access to this$<n> built from
12230 current_class, not its outer context.
12231 (build_access_to_thisn): Fixed leading comment. Tidied things up.
12232 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12233 (patch_method_invocation): Use `is_static_flag' when already
12235 (patch_newarray): Removed assignment in ternary operator.
12237 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12239 * except.c (free_eh_ranges): Don't free `whole_range'.
12241 2000-10-15 Anthony Green <green@redhat.com>
12243 * decl.c (init_decl_processing): Call init_class_processing before
12246 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12248 * check-init.c (check_init): Fixed leading comment. Use
12250 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12251 (give_name_to_locals): Likewise.
12252 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12253 fields in lang_decl_var.
12254 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12255 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12256 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12257 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12258 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12259 (LOCAL_FINAL): Rewritten.
12260 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12261 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12262 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12263 `init_final' fields.
12264 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12265 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12266 (TYPE_HAS_FINAL_VARIABLE): New macro.
12267 (struct lang_type): Added `afv' field.
12268 * parse.y (check_static_final_variable_assignment_flag): New function.
12269 (reset_static_final_variable_assignment_flag): Likewise.
12270 (check_final_variable_local_assignment_flag): Likewise.
12271 (reset_final_variable_local_assignment_flag): Likewise.
12272 (check_final_variable_indirect_assignment): Likewise.
12273 (check_final_variable_global_assignment_flag): Likewise.
12274 (add_inner_class_fields): Use LOCAL_FINAL_P.
12275 (register_fields): Handle local finals and final variables.
12276 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12277 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12278 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12280 (java_complete_expand_methods): Loop to set
12281 TYPE_HAS_FINAL_VARIABLE. Call
12282 `reset_final_variable_local_assignment_flag' and
12283 `check_final_variable_local_assignment_flag' accordingly before
12284 and after constructor expansion. Call
12285 `reset_static_final_variable_assignment_flag'
12286 before expanding <clinit> and after call
12287 `check_static_final_variable_assignment_flag' if the
12288 current_class isn't an interface. After all methods have been
12289 expanded, call `check_final_variable_global_assignment_flag' and
12290 `check_static_final_variable_assignment_flag' if the current class
12292 (maybe_yank_clinit): Fixed typo in comment.
12293 (build_outer_field_access_methods): Removed old sanity check. Use
12294 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12295 Don't create access methods for finals.
12296 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12297 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12298 existing DECL_INIT has been processed.
12299 (java_complete_lhs): Likewise.
12300 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12301 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12303 (patch_assignment): Use LOCAL_FINAL_P.
12304 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12305 DECL_INITIAL is nullified.
12308 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12310 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12312 * Makefile.in (parse.c, parse-scan.c): Likewise.
12314 2000-10-12 Mark Mitchell <mark@codesourcery.com>
12316 * class.c (temporary_obstack): Remove.
12317 (make_class): Don't mess with obstascks.
12318 (push_class): Likewise.
12319 (set_super_info): Likewise.
12320 (add_method_1): Likewise.
12321 (add_method): Likewise.
12322 (add_field): Likewise.
12323 (build_utf8_ref): Likewise.
12324 (build_class_ref): Likewise.
12325 (build_static_field_ref): Likewise.
12326 (finish_class): Likewise.
12327 (push_super_field): Likewise.
12328 (layout_class): Likewise.
12329 (layout_class_methods): Likewise.
12330 (init_class_processing): Likewise.
12331 * constants.c (get_tag_node): Likewise.
12332 (build_constant_data_ref): Likewise.
12333 * decl.c (ggc_p): Remove.
12334 (copy_lang_decl): Use ggc_alloc.
12335 (complete_start_java_method): Don't mess with obstacks.
12336 (start_java_method): Likewise.
12337 (end_java_method): Likewise.
12338 * except.c (link_handler): Use xmalloc.
12339 (free_eh_ranges): New function.
12340 (method_init_exceptions): Use it.
12341 (add_handler): Use xmalloc.
12342 (expand_start_java_handler): Don't mess with obstacks.
12343 (prepare_eh_table_type): Likewise.
12344 (expand_end_java_handler): Likewise.
12345 * expr.c (push_value): Likewise.
12346 (create_label_decl): Likewise.
12347 (build_jni_stub): Likewise.
12348 (java_lang_expand_expr): Likewise.
12349 (note_instructions): Use xrealloc.
12350 (java_push_constant_from_pool): Don't mess with obstacks.
12351 (process_jvm_instruction): Likewise.
12352 * java-tree.h (cyclic_inheritance_report): Remove duplicate
12354 * jcf-parse.c (get_constant): Don't mess with obstacks.
12355 (read_class): Likewise.
12356 (jcf_parse): Likewise.
12357 * lex.c (expression_obstack): Remove.
12358 (java_lex): Don't use obstack_free.
12359 * parse.h (exit_java_complete_class): Don't mess with obstacks.
12360 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12361 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12362 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12363 * parse.y (gaol): Add more GC roots.
12364 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12365 (lookup_field_wrapper): Likewise.
12366 (obtain_incomplete_type): Don't mess with obstacks.
12367 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
12369 (craft_constructor): Don't mess with obstacks.
12370 (safe_layout_class): Likewise.
12371 (java_complete_class): Likewise.
12372 (source_end_java_method): Likewise.
12373 (build_outer_field_access_methods): Likewise.
12374 (build_outer_method_access_method): Likewise.
12375 (maybe_build_thisn_access_method): Likewise.
12376 (build_dot_class_method_invocation): Likewise.
12377 (java_complete_tree): Likewise.
12378 (java_complete_lhs): Likewise.
12379 (do_merge_string_cste): Likewise.
12380 (patch_string_cst): Likewise.
12381 (array_constructor_check_entry): Likewise.
12382 * typeck.c (build_java_array_type): Likewise.
12383 (parse_signature_string): Likewise.
12384 (build_java_signature): Likewise.
12386 2000-10-12 Tom Tromey <tromey@cygnus.com>
12388 Fix for PR gcj/356:
12389 * gjavah.c (add_class_decl): Don't special-case inner classes.
12390 (add_namelet): Likewise.
12392 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
12394 * java-tree.h: Constify current_encoding.
12395 * lang.c: Constify current_encoding.
12397 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
12399 * jvgenmain.c (class_mangling_suffix): Omit `.'.
12400 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12402 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12404 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12405 patch. Fixes gcj/340.
12407 2000-10-10 Tom Tromey <tromey@cygnus.com>
12409 * lex.c (java_new_lexer): Initialize out_first and out_last
12411 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12413 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12415 * parse.y (pop_current_osb): New function.
12416 (array_type:): Use `dims:', changed actions
12417 accordingly. Suggested by Anthony Green.
12418 (array_creation_expression:): Used pop_current_osb.
12419 (cast_expression:): Likewise.
12420 (search_applicable_method_list): Fixed indentation.
12422 2000-10-08 Anthony Green <green@redhat.com>
12424 * parse.y (array_type_literal): Remove production.
12425 (type_literals): Refer to array_type, not array_type_literal.
12427 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12429 Patch contributed by Corey Minyard.
12430 * decl.c (check_local_named_variable): New function.
12431 (tree check_local_unnamed_variable): Likewise.
12432 (find_local_variable): Splitted. Call check_local_{un}named_variable.
12434 2000-10-07 Anthony Green <green@redhat.com>
12436 * class.c (layout_class): Handle case where superclass can't be
12439 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
12441 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12444 2000-10-05 Tom Tromey <tromey@cygnus.com>
12446 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12447 * jvgenmain.c (class_mangling_prefix): Removed.
12448 (class_mangling_suffix): New global.
12450 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12452 (print_method_info): Handle overrides for static and final
12454 (process_file): Generate declaration for class object field.
12455 * class.c (cxx_keywords): New array.
12456 (utf8_cmp): New function.
12457 (cxx_keyword_p): New function.
12458 (layout_class_method): Mangle C++ keywords by appending `$'.
12459 (mangle_field): New function.
12460 (mangle_class_field): Use mangle_field. Mangle class name as
12462 (mangle_static_field): Use mangle_field.
12464 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12466 * decl.c (find_local_variable): Removed uncessary type check and
12467 fixed range check typo. From Corey Minyard.
12469 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12471 * decl.c (give_name_to_locals): New local `code_offset'. Call
12472 `maybe_adjust_start_pc'.
12473 * expr.c (note_instructions): New function.
12474 (expand_byte_code): Don't collect insn starts here.
12475 (peek_opcode_at_pc): New function.
12476 (maybe_adjust_start_pc): Likewise.
12477 * java-tree.h (maybe_adjust_start_pc): Declare.
12478 (note_instructions): Likewise.
12479 * jcf-parse.c (parse_class_file): Call `note_instructions'.
12481 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12483 * parse.y (field_access:): Fixed indentation.
12484 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
12486 2000-09-07 Tom Tromey <tromey@cygnus.com>
12488 Fix for PR gcj/307:
12489 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
12490 JPRIMITIVE_TYPE_P, for arithmetic operators.
12491 (patch_method_invocation): Indentation fix.
12492 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
12493 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
12494 (do_unary_numeric_promotion): Cleaned up code.
12495 (valid_cast_to_p): Handle boolean correctly.
12497 2000-09-27 Tom Tromey <tromey@cygnus.com>
12499 * lex.c (java_read_unicode): Reset bs_count when finished with
12502 2000-10-01 Mark Mitchell <mark@codesourcery.com>
12505 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
12506 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
12507 (typeck.o): Depend on ggc.h.
12508 * class.c (add_method_1): Use GC functions for allocation.
12509 (init_class_processing): Register roots.
12510 * decl.c (ggc_p): Set to 1.
12511 (pending_local_decls): Make it static.
12512 (push_jvm_slot): Use GC functions for allocation.
12513 (init_decl_processing): Register roots.
12514 (give_name_to_locals): Use GC functions for allocation.
12515 (lang_mark_tree): New function.
12516 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
12517 functions for allocation.
12518 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
12519 * lex.c (java_lex): Use build_string, rather than replicating it
12521 * parse.y (goal): Add more roots.
12522 (mark_parser_ctxt): New function.
12523 * typeck.c: Include ggc.h.
12525 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12527 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
12528 contains something else than MODIFY_EXPR.
12530 2000-09-23 Mark Mitchell <mark@codesourcery.com>
12532 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
12533 * Makefile.in (parse.o): Depend on ggc.h.
12534 (class.o): Likewise.
12535 (constants.o): Likewise.
12536 (decl.o): Likewise.
12537 (expr.o): Likewise.
12538 (jcf-parse.o): Likewise.
12539 (jcf-write.o): Likewise.
12540 (mangle.o): Likewise.
12541 * class.c: Include ggc.h.
12542 (build_static_field_ref): Register GC roots.
12543 (layout_class): Likewise.
12544 (init_class_processing): Likewise.
12545 * constants.c: Include ggc.h.
12546 (current_constant_pool_data_ref): Remove.
12547 (tag_nodes): Move it to ...
12548 (get_tag_node): ... here. Register GC roots.
12549 * decl.c: Include ggc.h. Remove many global tree definitions.
12550 (throw_node): Define.
12551 (java_global_trees): Likewise.
12552 (predef_filenames): Make the size a constant.
12553 (init_decl_processing): Adjust accordingly.
12554 (init_decl_processing): Call init_jcf_parse. Register GC roots.
12555 * expr.c: Include ggc.h.
12556 (init_expr_processing): Register GC roots.
12557 (build_invokeinterface): Likewise.
12558 * java-tree.h: Replace extern tree declarations with macros.
12559 (java_global_trees): New variable.
12560 (java_tree_index): New enumeration.
12561 (init_jcf_parse): Declare.
12562 * jcf-parse.c: Include ggc.h.
12563 (current_class): Remove declaration.
12564 (main_class): Likewise.
12565 (all_class_list): Likewise.
12566 (predefined_filename_p): Adjust for constant size of
12568 (init_jcf_parse): New function.
12569 * jcf-write.c: Include ggc.h.
12570 (generate_classfile): Register GC roots.
12571 (append_synthetic_attribute): Likewise.
12572 (append_innerclass_attribute_entry): Likewise.
12573 * lang.c: Include ggc.h.
12574 (lang_print_error): Register GC roots.
12575 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
12577 * parse.y: Include ggc.h.
12578 (wfl_operator): Remove.
12579 (goal): Register GC roots.
12580 (java_pop_parser_context): Adjust for new field names.
12581 (java_parser_context_save_global): Likewse.
12582 (java_parser_context_restore_global): Likewise.
12583 (java_parser_context_suspend): Likewise.
12584 (java_parser_context_resume): Likewise.
12585 (verify_constructor_circularity): Register GC roots.
12586 (lookup_cl): Likewise.
12587 (java_reorder_fields): Likewise.
12588 (build_current_this): Likewise.
12589 (class_in_current_package): Likewise.
12590 (argument_types_convertible): Likewise.
12591 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
12593 2000-09-14 Tom Tromey <tromey@cygnus.com>
12595 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
12597 2000-09-13 Tom Tromey <tromey@cygnus.com>
12599 * jcf-parse.c: Include <locale.h>.
12600 * jv-scan.c: Include <locale.h>.
12602 2000-09-12 Tom Tromey <tromey@cygnus.com>
12604 * expr.c (pop_type_0): Return `Object' if trying to merge two
12606 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
12607 interface types; `Object' is always a valid supertype.
12609 2000-09-12 Tom Tromey <tromey@cygnus.com>
12612 * jv-scan.c (help): Document --encoding.
12613 (options): Added `encoding' entry.
12614 (OPT_ENCODING): New define.
12615 (main): Handle --encoding.
12616 Include <langinfo.h> if nl_langinfo exists.
12617 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
12619 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
12620 (parse_source_file): Correctly call java_init_lex. Added `finput'
12621 argument. Use nl_langinfo to determine default encoding.
12622 * java-tree.h (current_encoding): Declare.
12623 * parse.y (java_parser_context_restore_global): Don't restore
12625 (java_parser_context_save_global): Don't set `finput' field.
12626 (java_pop_parser_context): Don't restore `finput'. Free old lexer
12628 * lang.c (current_encoding): New global.
12629 (lang_decode_option): Recognize `-fencoding='.
12630 (finish_parse): Don't close finput.
12631 * parse.h (struct parser_ctxt): Removed `finput' and
12632 `unget_utf8_value' fields. Added `lexer' field.
12633 (java_init_lex): Fixed declaration.
12634 * lex.c (java_new_lexer): New function.
12635 (java_destroy_lexer): Likewise.
12636 (java_read_char): Added `lex' argument. Handle iconv case.
12637 (java_read_unicode): Added `lex' argument. Count backslashes in
12639 (java_init_lex): Added `finput' and `encoding' arguments. Set
12640 `lexer' field in ctxp.
12641 (BAD_UTF8_VALUE): Removed.
12642 (java_lex): Handle seeing UEOF in the middle of a string literal.
12643 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
12644 (java_lexer): New structure.
12647 (DEFAULT_ENCODING): New define.
12648 (java_destroy_lexer): Declare.
12650 2000-09-12 Tom Tromey <tromey@cygnus.com>
12652 Fix for PR gcj/343:
12653 * lex.c (java_init_lex): Initialize java_io_serializable.
12654 * parse.y (java_io_serializable): New global.
12655 (valid_ref_assignconv_cast_p): An array can be cast to
12658 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
12660 * decl.c, expr.c: Include defaults.h if not already included.
12661 Don't define the *_TYPE_SIZE macros.
12663 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
12665 * typeck.c (build_java_array_type): Correct first parameter
12666 in ADJUST_FIELD_ALIGN invocation.
12668 2000-09-06 Tom Tromey <tromey@cygnus.com>
12670 * lang-specs.h: Also recognize `-femit-class-files'.
12672 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12674 * verify.c (merge_types): Load the types to merge if necessary.
12676 2000-09-02 Anthony Green <green@redhat.com>
12678 * jcf-io.c: Include zlib.h.
12679 (open_in_zip): Read compressed class file archives.
12680 * zipfile.h (ZipDirectory): Add uncompressed_size and
12681 compression_method fields.
12682 * zextract.c (read_zip_archive): Collect file compression info.
12684 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
12686 * parse.y (do_resolve_class): Also explore superclasses of
12687 intermediate enclosing contexts when searching for inner classes.
12689 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12691 * parse.y (variable_declarator_id:): Better error message.
12692 (expression_statement:): Use YYNOT_TWICE.
12693 (cast_expression:): Likewise.
12694 (assignment:): Likewise.
12696 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12698 * parse.y (do_merge_string_cste): New locals. Create new
12699 STRING_CSTs each time, use memcpy. Fixes gcj/311.
12701 2000-08-07 Hans Boehm <boehm@acm.org>
12703 * boehm.c (mark_reference_fields): Set marking bits for all words in
12704 a multiple-word record.
12705 (get_boehm_type_descriptor): Use the procedure marking descriptor for
12708 2000-08-31 Mike Stump <mrs@wrs.com>
12710 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
12711 jcf-dump$(exeext)): Make parallel safe.
12713 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12715 * jcf-parse.c (set_source_filename): Constify a char *.
12716 * jcf-write.c (append_innerclasses_attribute,
12717 make_class_file_name): Constify a char *. Don't recycle a
12718 variable for an unrelated purpose.
12719 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
12720 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
12722 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12724 * expr.c (can_widen_reference_to): Fixed indentation.
12725 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
12726 * parse.y: `finit$' replaces `$finit$' in comments.
12727 (try_builtin_assignconv): Fixed leading comment.
12729 2000-08-25 Greg McGary <greg@mcgary.org>
12731 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
12733 2000-08-24 Greg McGary <greg@mcgary.org>
12735 * lang.c (lang_decode_option): Use ARRAY_SIZE.
12736 * parse.y (BINOP_LOOKUP): Likewise.
12738 2000-08-22 Andrew Haley <aph@cygnus.com>
12740 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
12741 sign extending. Fixes gcj/321.
12742 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
12743 combining to make a jlong. Fixes gcj/321.
12745 2000-08-21 Nix <nix@esperi.demon.co.uk>
12747 * lang-specs.h: Do not process -o or run the assembler if
12750 2000-08-16 Andrew Haley <aph@cygnus.com>
12752 * typeck.c (build_java_array_type): Rewrite code to do array
12753 alignment. Take into account back-end macros when aligning array
12754 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
12755 user to set alignment. Fixes gcj/252 and 160.
12757 2000-08-09 Tom Tromey <tromey@cygnus.com>
12759 * parse.y (check_abstract_method_definitions): Now return `int'.
12760 Check implemented interfaces. Fixes PR gcj/305.
12762 * parse.y (patch_switch_statement): Disallow `long' in switch
12763 expressions. Fixes PR gcj/310.
12765 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12767 * decl.c (finit_leg_identifier_node): New global.
12768 (init_decl_processing): Use `finit$' to initialize
12769 finit_identifier_node. Use `$finit$' to initialize
12770 finit_leg_identifier_node.
12771 * expr.c (expand_java_field_op): Use ID_FINIT_P.
12772 * java-tree.h (finit_identifier_node): Changed attached comment.
12773 (finit_leg_identifier_node): New declaration.
12774 (ID_FINIT_P): Take finit_identifier_node and
12775 finit_leg_identifier_node into account. This is a backward
12776 compatibility hack.
12778 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12780 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
12782 (generate_bytecode_insns): Check `nargs' before emitting it.
12783 * verify.c (merge_type_state): Fixed typo.
12784 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
12785 generate_bytecode_{conditional,insns}.
12787 2000-08-13 Anthony Green <green@redhat.com>
12789 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
12792 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12794 * class.c (maybe_layout_super_class): Fixed indentation.
12795 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
12796 (java_check_methods): New function declaration.
12797 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
12798 instead of `str_ptr'.
12799 * jcf-write.c (generate_bytecode_insns): Emit number the of args
12800 of a `invokeinterface' at the right time.
12801 * parse.h (WFL_STRIP_BRACKET): New macro.
12802 (SET_TYPE_FOR_RESOLUTION): Use it.
12803 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
12804 (check_class_interface_creation): Don't check for cross package
12805 innerclass name clashes.
12806 (method_header): Behave properly if MDECL is `error_mark_node'.
12807 (method_declarator): Return `error_mark_node' if bogus current
12809 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
12810 (resolve_and_layout): New local `decl_type', set and used. Call
12811 java_check_methods.
12812 (java_check_methods): New method.
12813 (java_layout_classes): Use it.
12814 (resolve_qualified_expression_name): No EH check necessary in
12816 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
12818 (patch_assignment): Set DECL_INITIAL on integral final local.
12820 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12822 * java-tree.h (flag_extraneous_semicolon): New extern.
12823 * lang-options.h: (-Wextraneous-semicolon): New option.
12824 * lang.c (flag_redundant): Fixed typo in leading comment.
12825 (flag_extraneous_semicolon): New global.
12826 (lang_decode_option): Set `flag_extraneous_semicolon' when
12827 -Wall. Decode `-Wextraneous-semicolon'.
12828 * parse.y (type_declaration:): Removed `SC_TK' hack, added
12829 `empty_statement' rule.
12830 (class_body_declaration): Likewise.
12831 (method_body:): Accept `;' as a method body.
12832 (static_initializer:): Removed `SC_TK' hack.
12833 (constructor_block_end:): Likewise.
12834 (empty_statement:): Report deprecated empty declaration. Fixes
12837 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12839 * parse.y (build_dot_class_method_invocation): Changed parameter
12840 name to `type'. Build signature from `type' and convert it to a
12841 STRING_CST if it's an array.
12842 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
12843 to use `ref_type' directly.
12845 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
12847 * lang-options.h: Added a comma after the last element to avoid
12848 syntax errors when other languages define additional options.
12850 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
12852 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
12853 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
12854 (jc1): Link with $(BACKEND).
12855 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
12857 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
12859 * jvspec.c: Adjust type of second argument to
12860 lang_specific_driver, and update code as necessary.
12862 * class.c (build_dtable_decl): Initialize dummy.
12864 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12866 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
12867 method bodies not to rule out discarding `<clinit>'; don't use
12868 <clinit> to initialize static fields with constant initializers.
12870 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12872 * gjavah.c (print_method_info): Added `synth' parameter. Skip
12874 (method_synthetic): New global.
12875 (HANDLE_METHOD): Recognize synthetic method and tell
12876 `print_method_info' about it.
12877 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
12878 processing a synthetic method.
12879 * jcf-reader.c (skip_attribute): New function.
12880 ( skip_attribute): Likewise.
12882 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12884 * parse.y (build_outer_field_access): Fixed comments.
12885 (fix_constructors): Emit the initialization of this$<n> before
12887 (resolve_qualified_expression_name): Build an access to `decl' if
12890 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12892 * parse-scan.y (curent_class): Non longer const.
12893 (inner_qualifier, inner_qualifier_length): Deleted.
12894 (current_class_length): New global.
12895 (bracket_count): Fixed typo in leading comment.
12896 (anonymous_count): New global.
12897 (class_instance_creation_expression:): Handle anonymous classes.
12898 (anonymous_class_creation:): New rule.
12899 (push_class_context): Rewritten.
12900 (pop_class_context): Likewise.
12901 (INNER_QUALIFIER): Macro deleted.
12902 (report_class_declaration): call `push_class_context' when
12903 entering the function. `fprintf' format modified not to use
12905 (report_class_declaration): Assign `package_name' and
12906 `current_class' to NULL separately.
12908 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12910 * expr.c (build_invokeinterface): Call layout_class_methods on
12913 2000-07-27 Tom Tromey <tromey@cygnus.com>
12914 Anthony Green <green@cygnus.com>
12915 Alexandre Petit-Bianco <apbianco@cygnus.com>
12917 * class.c (make_class_data): Create vtable for abstract classes.
12918 (get_dispatch_table): Changed to cope with abstract classes.
12920 2000-07-27 Tom Tromey <tromey@cygnus.com>
12922 * parse.y (patch_method_invocation): Don't reverse the argument
12923 list when dealing with anonymous class constructors. Fixed typo in
12926 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12928 * parse.y (build_alias_initializer_parameter_list): Reverse
12929 crafted list when building aliases for anonymous class
12932 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12934 * parse.y (jdep_resolve_class): Don't bother checking potential
12935 innerclass access if `decl' is NULL.
12936 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
12939 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12941 * parse.c: Remove (again.)
12943 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12945 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
12946 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
12947 outside the `if' statement, alias to innerclass removed, `decl'
12948 used to mark the class complete.
12950 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12952 * parse.y (simple_name:): Fixed typo in error message.
12954 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12956 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
12957 or its first operand can be error marks.
12959 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12961 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
12962 * parse.y (method_header): Likewise.
12964 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12966 * parse.y (process_imports): Consider that one might be trying to
12967 import an innerclass. Fixes gcj/254
12969 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12971 * parse.y (find_as_inner_class): Handle the case where the
12972 enclosing context of an innerclass has been loaded as bytecode.
12974 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12976 * parse.y (simple_name:): Reject `$' in type names.
12977 (resolve_type_during_patch): Use `type' as a second
12978 argument to resolve_no_layout. Fixes gcj/257.
12980 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
12982 * parse.y (find_most_specific_methods_list): Select the only
12983 non-abstract method even if max has been set.
12984 Fixes gcj/285, gcj/298.
12986 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
12988 * lang-specs.h: Added %(jc1) to java compiler options.
12990 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
12992 * .cvsignore: New file.
12994 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12996 * parse.y (not_accessible_p): Access granted to innerclasses
12997 (indirectly) extending the reference type. Fixes gcj/249.
12999 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13001 * parse.y (patch_method_invocation): Fixed comment.
13002 (maybe_use_access_method): Build this$<n>s to the context of the
13003 target method, or a type that extends it. Fixes gcj/242.
13005 2000-07-13 Mark Mitchell <mark@codesourcery.com>
13009 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13011 * parse.y (fold_constant_for_init): Avoid bullish conversion.
13013 2000-07-13 Tom Tromey <tromey@cygnus.com>
13015 * lang-specs.h: Added %{I*}.
13017 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13019 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13021 2000-07-12 Mark Mitchell <mark@codesourcery.com>
13023 * parse-scan.c: Remove.
13025 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13027 * class.c (set_super_info): Handled protected inner classes.
13028 (common_enclosing_context_p): Bail early if arguments aren't both
13030 (get_access_flags_from_decl): Handle private and protected inner
13032 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13033 (CLASS_PROTECTED): Likewise.
13034 (struct lang_type): New bitfield `poic'.
13035 * parse.y (jdep_resolve_class): Call check_inner_class_access on
13036 inner classes only.
13037 (check_inner_class_access): Renamed arguments, added
13038 comments. Handles protected inner classes (fixes gcj/225)
13039 (not_accessible_p): Fixed comments. Avoid handling inner classes.
13041 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13043 * parse.y (resolve_qualified_expression_name): Verify qualified
13044 access to `this'. Fixes gcj/239.
13046 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13048 * jcf-write.c (generate_classfile): Don't install ConstantValue
13051 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13053 * parse.y (resolve_qualified_expression_name): Handle inner class
13054 access. Fixes gcj/256.
13056 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13058 * jcf-write.c (generate_classfile): Properly install the
13059 ConstantValue attribute and the initial value constant pool index
13060 on string constants.
13061 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13064 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13066 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13068 * parse.y (find_as_inner_class): Fixed typo.
13069 (do_resolve_class): Explore enclosing contexts when searching for
13070 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13071 (check_inner_class_access): Check `decl' which can be null in case
13072 of previous errors.
13074 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13076 * java-tree.h (java_debug_context): Declared `extern'.
13077 (safe_layout_class): Likewise.
13078 * parse.y (resolve_field_access): Field must be `static' in order
13079 to be replaced by its initial value. Added comments.
13080 (find_applicable_accessible_methods_list): Fixed typo.
13081 (find_most_specific_methods_list): Methods found in innerclasses
13082 take over methods founds in the enclosing contexts.
13083 (java_complete_tree): Loosen restrictions on the type of DECLs
13084 that can be replaced by their initialization values.
13085 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13087 2000-07-05 Tom Tromey <tromey@cygnus.com>
13089 * Make-lang.in (PARSE_DIR): New macro.
13090 (PARSE_RELDIR): Likewise.
13091 (PARSE_C): Likewise.
13092 (PARSE_SCAN_C): Likewise.
13093 ($(PARSE_C)): New target.
13094 ($(PARSE_SCAN_C)): Likewise.
13095 (SET_BISON): New macro.
13096 (BISONFLAGS): Likewise.
13097 (JAVABISONFLAGS): Likewise.
13099 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
13101 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13102 argument on the first pass for CNI as well as JNI.
13103 (print_method_info): Set up method name on the first pass only.
13105 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13107 * parse.y (parser_qualified_classname): Removed parameter
13109 (create_interface): Removed first passed parameter to
13110 parser_qualified_classname.
13111 (create_class): Likewise. Don't install alias on static
13112 innerclasses. Fixes gcj/275.
13114 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13116 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13117 debugable statement with empty_stmt_node. Fixes gcj/272
13119 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13121 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13124 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13126 * jcf-write.c (push_long_const): Appropriately cast short negative
13129 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13131 * parse.y (verify_constructor_super): Use loop variable
13132 `m_arg_type' initialized with `mdecl_arg_type'.
13134 2000-06-29 Tom Tromey <tromey@cygnus.com>
13136 * parse.y (resolve_field_access): Handle case where `type_found'
13139 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13141 * expr.c (lookup_field): The same field can be found through two
13142 different interface. Don't declare it ambiguous in that case.
13144 2000-06-27 Tom Tromey <tromey@cygnus.com>
13146 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
13147 follows \r, then unget it at a lower level.
13149 2000-06-26 Tom Tromey <tromey@cygnus.com>
13151 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13152 java_complete_tree.
13154 2000-06-25 Tom Tromey <tromey@cygnus.com>
13156 * parse.y (for_statement): Wrap expression in a WFL if it is a
13157 constant. For PR gcj/268.
13159 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13161 * parse.y (do_resolve_class): Minor optimiztion in the package
13162 list search. Removed unnecessary test and return statement.
13163 (valid_ref_assignconv_cast_p): Order of arguments to
13164 enclosing_context_p fixed.
13166 2000-06-24 Tom Tromey <tromey@cygnus.com>
13168 * expr.c (lookup_field): Print error and return error_mark_node if
13169 field reference is ambiguous.
13171 * parse.y (check_abstract_method_definitions): Also check if
13172 `other_method' is abstract.
13174 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13176 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13178 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13179 (struct lang_type): New field `pic'.
13180 (CLASS_PRIVATE): New macro.
13181 * parse.y (check_inner_class_access): New function.
13182 (jdep_resolve_class): Call it.
13184 2000-06-23 Tom Tromey <tromey@cygnus.com>
13186 * parse.y (patch_incomplete_class_ref): Initialize the returned
13187 class. For PR gcj/260.
13189 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13191 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13193 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13195 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13196 Java specific checks.
13197 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13198 screened by DECL_P.
13199 * java-tree.def (CASE_EXPR): Marked 'e'.
13200 (DEFAULT_EXPR): Likewise.
13201 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13202 screened by DECL_P.
13203 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13204 Java specific checks.
13205 (generate_bytecode_insns): Test try_block for BLOCK before using
13207 * parse.y (build_wfl_wrap): Added `location' argument. Set
13208 EXPR_WFL_LINECOL accordingly.
13209 (dim_expr:): Wrap constants with WFLs.
13210 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13211 (resolve_package): Check for `stmt' not being a BLOCK before
13212 building a debuggable statement with it.
13213 (make_qualified_primary): Added extra parameter to build_wfl_wrap
13215 (resolve_field_access): Make sure `decl' is a DECL before treating
13217 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13218 IDENTIFIER_NODE before treating it as such.
13219 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13220 treating it as such.
13221 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13222 to be applied only on non array types.
13224 2000-06-16 Per Bothner <per@bothner.com>
13226 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
13227 define in terms of DECL_RESULT, as that fails when --enable-checking.
13229 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13231 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
13232 types the same in comparison.
13233 (CHECK_OP): Add static prototype.
13235 2000-06-13 Jakub Jelinek <jakub@redhat.com>
13237 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13238 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13239 * parse.c: Rebuilt.
13241 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13243 * decl.c (create_primitive_vtable): Prototype.
13245 * jcf-write.c (generate_bytecode_insns): Initialize variable
13248 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13250 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13252 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13253 to track searched classes, and do not search the same class more than
13254 once. Call find_applicable_accessible_methods_list on immediate
13255 superclass, instead of search_applicable_method_list on all ancestors.
13256 Fix for PR gcj/238.
13258 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13260 * parse.y (register_fields): Permit static fields in inner classes
13261 if they are final. Fix for PR gcj/255.
13263 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13265 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13266 * parse.y (find_in_imports): Returned type changed to void,
13267 leading comment fixed.
13268 (register_package): New function.
13269 (qualify_and_find): Likewise.
13270 (package_declaration:): Use `register_package'.
13271 (single_type_import_declaration:): Removed local variable
13272 `node'. Added missing `;' for consistency.
13273 (type_import_on_demand_declaration:): Use `chainon' to link new
13275 (lookup_field_wrapper): Lookup local variables defined in outer
13277 (java_complete_class): Don't reverse the list of imported on demand.
13278 (do_resolve_class): Reorganized. Removed local variable
13279 `original_name'. Call `qualify_and_find' with the current package
13280 name, invoke `find_in_imports_on_demand' right after. Call
13281 `qualify_and_find' with the packages we've seen so far. Fixed
13282 operations numbering in comments.
13283 (java_expand_class): Don't reverse `package_list'.
13284 (find_most_specific_methods_list): New local variables `abstract'
13285 and `candidates'. Use them to pick the right method.
13287 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
13289 * parse.y (check_modifiers_consistency): Don't subtract out
13290 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13292 2000-06-04 Philipp Thomas <pthomas@suse.de>
13294 * Makefile.in (INTLLIBS): New.
13298 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13300 * class.c (get_dispatch_table): Build the vtable dummy entry list
13301 element with a null purpose. Fixed leading comment.
13302 (build_dtable_decl): Build an accurate dtable type when appropriate
13305 2000-06-02 Richard Henderson <rth@cygnus.com>
13307 * lang.c (lang_get_alias_set): New.
13309 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13311 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13312 before using it as the accessed field.
13314 2000-05-31 Tom Tromey <tromey@cygnus.com>
13316 * java-tree.h (boolean_array_vtable, byte_array_vtable,
13317 char_array_vtable, short_array_vtable, int_array_vtable,
13318 long_array_vtable, float_array_vtable, double_array_vtable):
13320 * expr.c (get_primitive_array_vtable): New function.
13321 (create_primitive_vtable): New function.
13322 (java_lang_expand_expr): Enable code to statically generate
13324 * decl.c (init_decl_processing): Create primitive vtables.
13325 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13326 short_array_vtable, int_array_vtable, long_array_vtable,
13327 float_array_vtable, double_array_vtable): Define.
13329 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
13331 * java/parse.y (find_applicable_accessible_methods_list):
13332 Don't add an uninitialized value to the list.
13334 2000-05-25 Tom Tromey <tromey@cygnus.com>
13336 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13337 when trying to see if field's class should be initialized. Always
13338 initialize field's declaring class, not qualified class.
13341 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13342 `wfl_operator', to maybe_build_primttype_type_ref.
13345 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
13347 * parse.y (patch_method_invocation): Don't try to lookup methods
13348 in primitive types.
13350 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13352 * parse.y (resolve_field_access): Call the appropriate <clinit>
13353 before accessing the length of a static array. Craft a decl for
13354 the field while its time. Fixes PR gcj/129.
13356 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13358 * parse.y (resolve_package): Correctly set `*next' (was off by
13360 (resolve_qualified_expression_name): Fixed comment.
13362 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13364 * jcf-parse.c (jcf_parse_source): Reset current_class and
13365 current_function_decl to NULL before parsing a new file.
13367 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13369 * parse.y (block_end:): If the collected block doesn't feature a
13370 statement, insert an empty statement.
13372 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13374 * parse.y (maybe_yank_clinit): New function.
13375 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13376 end of the list of methods belonging to a class.
13377 (java_complete_expand_method): Check whether <clinit> is really
13378 necessary and expand it accordingly.
13380 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13382 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13383 processed by the method's switch statement.
13385 2000-05-19 Tom Tromey <tromey@cygnus.com>
13387 * java-tree.h: Added init state enum.
13388 * decl.c (emit_init_test_initialization): Initialize class
13389 initialization check variable by looking at class' state.
13391 2000-05-19 Tom Tromey <tromey@cygnus.com>
13393 * java-tree.h (build_instanceof): Declare.
13394 (build_get_class): Declare.
13395 * parse.y (patch_binop): Use build_instanceof.
13396 * expr.c (build_instanceof): New function. If class is final,
13397 don't make a function call.
13398 (expand_java_INSTANCEOF): Use it.
13399 (build_get_class): New function.
13401 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
13403 * jcf-write.c (generate_classfile): Scan the source_file for
13404 slashes with the right pointer variable.
13406 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
13408 * lang.c (lang_decode_option): Update -Wunused flags by calling
13410 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13412 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
13414 * check_init.c (check_init): Constify local char *.
13415 * class.c (push_class): Constify local char *.
13416 * java_tree.h: Update prototypes.
13417 * jcf-io.c (open_class): Constify filename parameter and
13419 (find_class): Remove redundant string copy. Cast return from
13421 * jcf-parse.c (read_class, parse_class_file, yyparse):
13422 Constify local char *.
13423 * jcf-write.c (generate_bytecode_insns, generate_classfile):
13424 Constify local char *.
13425 * jcf.h (JCF): Constify filename and classname.
13426 (JCF_FINISH): Cast args to FREE to char * when appropriate.
13427 * lang.c (init_parse): Constify parameter and return value.
13428 * lex.c (java_get_line_col): Constify filename parameter.
13429 * parse.h: Constify parser_ctxt.filename. Update prototypes.
13430 * parse.y (java_parser_context_suspend,
13431 issue_warning_error_from_context, safe_layout_class): Constify
13433 * parse.c: Regenerate.
13435 2000-05-08 Tom Tromey <tromey@cygnus.com>
13437 * expr.c (build_jni_stub): Cache the result of
13438 _Jv_LookupJNIMethod.
13440 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13442 * decl.c (predef_filenames_size): Now 7.
13443 (predef_filenames): New seventh entry.
13445 2000-05-04 Tom Tromey <tromey@cygnus.com>
13447 * boehm.c (mark_reference_fields): Don't mark RawData fields.
13448 Keep track of when we've seen a reference field after a
13449 non-reference field.
13450 (get_boehm_type_descriptor): Handle case where we see
13451 non-reference fields but no trailing reference field.
13452 * decl.c (rawdata_ptr_type_node): Define.
13453 (init_decl_processing): Initialize rawdata_ptr_type_node.
13454 * java-tree.h (rawdata_ptr_type_node): Declare.
13456 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13458 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13459 specifiers in calls to fprintf.
13461 2000-05-03 Andrew Haley <aph@cygnus.com>
13463 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13465 * javaop.h (WORD_TO_INT): New function.
13466 (IMMEDIATE_s4): Use WORD_TO_INT.
13467 * jcf.h (JPOOL_INT): Ditto.
13469 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13472 2000-04-19 Tom Tromey <tromey@cygnus.com>
13474 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13475 on native function.
13476 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13478 * expr.c (build_jni_stub): New function.
13479 * lang-specs.h: -fjni and -femit-class-file are incompatible.
13480 * parse.c: Rebuilt.
13481 * parse.y (java_complete_expand_methods): Expand a native method
13482 and call build_jni_stub if -fjni given.
13483 * lang-options.h: Document -fjni.
13484 * lang.c (flag_jni): New global.
13485 (lang_f_options): Added `jni' entry.
13486 * java-tree.h (soft_lookupjnimethod_node,
13487 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
13489 (flag_jni): Declare.
13490 (build_jni_stub): Declare.
13491 (struct lang_decl): Added `native' flag.
13492 (METHOD_NATIVE): Redefined to use `native' field of lang specific
13494 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
13495 soft_jnipopsystemframe_node): New globals.
13496 (init_decl_processing): Set them. _Jv_InitClass only takes one
13499 * java-tree.def: Put into `C' mode.
13501 2000-04-27 Tom Tromey <tromey@cygnus.com>
13504 * expr.c (expand_invoke): Generate check to see if object pointer
13505 is null in nonvirtual invocation case.
13506 * java-tree.h (soft_nullpointer_node): Declare.
13507 * decl.c (soft_nullpointer_node): New global.
13508 (init_decl_processing): Initialize soft_nullpointer_node.
13509 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13510 or `private' methods.
13511 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13513 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
13515 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13518 2000-04-26 Tom Tromey <tromey@cygnus.com>
13520 * zextract.c (find_zip_file_start): New function.
13521 (read_zip_archive): Use it.
13523 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13525 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
13527 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13529 * class.c (common_enclosing_context_p): New function.
13530 * java-tree.h (common_enclosing_context_p): Added prototype.
13531 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
13532 classes sharing an outer context with the current instance.
13533 * parse.y (build_access_to_thisn): Fixed leading comment.
13534 (verify_constructor_super): New local `supper_inner'. Skip
13535 enclosing context argument in the case of inner class constructors.
13536 (patch_method_invocation): Insert proper context as second
13537 parameter to pure inner class constructor super invocations.
13539 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13541 * parse.y (end_class_declaration): Reset the interface number
13544 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13546 * parse.y (source_start_java_method): Deleted unnecessary code.
13547 (patch_method_invocation): Fixed comment.
13549 2000-04-24 Robert Lipe <robertlipe@usa.net>
13551 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
13553 2000-04-23 Tom Tromey <tromey@cygnus.com>
13555 * boehm.c (mark_reference_fields): Use int_byte_position.
13557 2000-04-22 Tom Tromey <tromey@cygnus.com>
13559 * boehm.c (mark_reference_fields): Only call byte_position on
13562 2000-04-22 Tom Tromey <tromey@cygnus.com>
13564 * boehm.c (mark_reference_fields): Added `last_view_index'
13565 argument. Use DECL_FIELD_OFFSET to determine field's offset.
13567 2000-04-20 Mo DeJong <mdejong@cygnus.com>
13569 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
13570 * parse.y (check_class_interface_creation): Fixed comments. Select
13571 permitted modifiers for (inner) interfaces. Changed error message
13572 to report rejected modifiers used with local classes.
13574 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13576 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
13577 of directly inherited type considered in scope.
13578 * parse.y (do_resolve_class): Search inherited classes for inner
13581 2000-04-20 Tom Tromey <tromey@cygnus.com>
13583 * parse.y (not_accessible_p): Use member's class, not current
13584 class, when doing inheritance check for protected reference.
13587 2000-04-20 Jason Schroeder <shrode@subnature.com>
13589 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
13591 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13593 * parse.y (lookup_field_wrapper): Search for final local aliases.
13594 (resolve_expression_name): Let lookup_field_wrapper search for
13595 final local aliases. Force the value of `name' if one is found.
13596 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
13597 an expression name. Fixed comments.
13599 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13601 * parse.y (yyerror): `msg' can be null, don't use it in that case.
13603 2000-04-19 Tom Tromey <tromey@cygnus.com>
13605 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
13607 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13609 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
13611 2000-04-18 Tom Tromey <tromey@cygnus.com>
13614 * gjavah.c (utf8_cmp): Changed return value.
13615 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
13617 (cxx_keywords): New global.
13618 (get_field_name): Handle new result of cxx_keyword_subst.
13619 (print_method_info): Likewise.
13621 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
13623 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
13624 with a newline, for CNI.
13625 (print_stub_or_jni): Print a space or newline before method name for
13626 CNI as well as JNI.
13627 (print_cxx_classname): Don't write leading "::" in CNI stub method.
13628 (process_file): Include gcj/cni.h if generating CNI stubs.
13630 2000-04-16 Tom Tromey <tromey@cygnus.com>
13632 * gjavah.c (decompile_method): Use print_field_name.
13635 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13637 * parse.y (java_expand_classes): Reverse the package list once.
13638 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
13640 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
13641 the `==' and `!=' operators.
13643 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13645 * jcf-write.c (generate_bytecode_insns): At invocation time,
13646 always relate an interface method to the type of its selector.
13648 2000-04-05 Tom Tromey <tromey@cygnus.com>
13651 * expr.c (expand_invoke): Generate check to see if object pointer
13652 is null in nonvirtual invocation case.
13653 * java-tree.h (soft_nullpointer_node): Declare.
13654 * decl.c (soft_nullpointer_node): New global.
13655 (init_decl_processing): Initialize soft_nullpointer_node.
13656 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13657 or `private' methods.
13658 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13660 2000-04-05 Tom Tromey <tromey@cygnus.com>
13662 Fix for PR gcj/140:
13663 * parse.y (check_final_assignment): Recognize assignments to the
13664 `length' field of an array when generating class files.
13666 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13668 * class.c (decl_hash): Prototype removed.
13669 (decl_compare): Likewise.
13671 2000-04-05 Tom Tromey <tromey@cygnus.com>
13673 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
13674 * parse.y (check_modifiers_consistency): Check for final/volatile
13675 clash. Fixes PR gcj/164.
13677 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13679 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
13681 (java_hash_compare_tree_node): Renamed from `decl_compare, made
13683 (add_method_1): Use `java_hash_hash_tree_node' and
13684 `java_hash_compare_tree_node'.
13685 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
13686 (java_hash_compare_tree_node): Likewise.
13687 * parse.y (find_applicable_accessible_methods_list): Create,
13688 delete and use a hash table to remember already searched interfaces.
13690 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
13692 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
13695 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13697 * boehm.c (mark_reference_fields, set_bit): Prototype.
13698 (set_bit): Un-ANSI-fy definition.
13700 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
13703 * decl.c (emit_init_test_initialization): Likewise.
13705 * gjavah.c (jni_print_char): Likewise.
13707 * parse.y (create_new_parser_context): Likewise.
13709 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
13711 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
13712 patch missing hunk. Fixed indentation.
13714 2000-03-30 Tom Tromey <tromey@cygnus.com>
13716 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
13717 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
13719 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13721 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13722 when negative *before* using it as an array index.
13723 * ChangeLog: Fixed typo.
13725 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13727 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13728 to 0 when it reaches -1.
13730 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13732 * jcf-parse.c (get_constant): Properly cast `num' during the
13733 invocation of `add_double'.
13734 * jcf-write.c (push_long_const): Properly cast `lo' before
13735 comparing it to short bounds.
13736 * parse-scan.y (interface_declaration:): Rule re-arrange so that
13737 `interface_body:' is reduced after the current interface is
13740 2000-03-26 Tom Tromey <tromey@cygnus.com>
13742 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
13743 Java-specific `-f' option.
13745 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13747 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
13748 Adjust order of making types.
13749 Make bitsize_*_node values.
13751 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13753 * class.c (make_field_value): Use byte_position.
13754 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
13755 (java_array_data_offset): Likewise.
13756 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
13759 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13761 * parse.y (check_abstract_method_definitions): New local
13762 `end_type_reached'. Make sure we also consider `end_type'.
13763 (java_check_abstract_method_definitions): Make sure we eventually
13764 consider `java.lang.Object'.
13765 (maybe_use_access_method): Don't use access method if not in the
13766 context of a pure inner class or if the method's context is right.
13767 (find_applicable_accessible_methods_list): New static flag
13768 `object_done'. Don't search abstract classes as interfaces. Fixed
13769 indentation. Fixed the `java.lang.Object' only search. Search
13770 class interface(s) first, then fully search enclosing contexts.
13771 (find_most_specific_methods_list): Pick the closest candidate when
13772 they're all abstract.
13774 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13776 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13777 properly initialize `finished_label'. Don't emit gotos for empty
13780 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13782 * except.c (emit_handlers): Clear catch_clauses_last.
13784 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13786 * parse.y (check_method_types_complete): New function.
13787 (create_class): Reset anonymous class counter only when seeing an
13789 (java_complete_class): JDEP_METHOD: Don't recompute signature
13792 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13794 * class.c (build_static_ref): Fixed indentation in comment.
13795 * java-tree.def (TRY_EXPR): Fixed typo in name.
13796 (CLASS_LITERAL): Likewise.
13797 * java-tree.h: (TYPE_DOT_CLASS): New macro.
13798 (struct lang_type): New field `dot_class'.
13799 * jcf-write.c (generate_bytecode_insns): Fixed error message.
13800 (generate_classfile): Method `class$' is synthetic.
13801 * parse.y (build_do_class_method): New function.
13802 (build_dot_class_method_invocation): Likewise.
13803 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
13804 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
13805 (qualify_ambiguous_name): Likewise.
13806 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
13807 (build_try_statement): Fixed leading comment.
13809 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13811 * class.c (make_field_value): Properly handle sizes.
13812 (get_dispatch_vector): Use tree_low_cst and host_integerp.
13813 (layout_class_method): Count using trees.
13814 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
13815 * expr.c (java_array_data_offset): Use int_bit_position.
13816 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
13817 (build_invokevirtual): Use tree_low_cst and do computations with trees.
13819 2000-03-16 Tom Tromey <tromey@cygnus.com>
13821 * lang.c (flag_hash_synchronization): New global.
13822 (lang_f_options): Added `hash-synchronization'.
13823 * lang-options.h: Mention -fhash-synchronization.
13824 * java-tree.h (flag_hash_synchronization): Declare.
13825 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
13826 hash table synchronization is disabled.
13827 * decl.c (init_decl_processing): Only push `sync_info' value when
13828 hash table synchronization is disabled.
13829 * class.c (make_class_data): Only push `sync_info' field when hash
13830 table synchronization is disabled. Removed dead code.
13832 2000-03-16 Tom Tromey <tromey@cygnus.com>
13834 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
13836 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13838 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
13840 * parse.y (patch_method_invocation): Handle anonymous classes
13841 creation in static context.
13843 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13845 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
13846 * parse.y (resolve_qualified_expression_name): Use it.
13847 (patch_method_invocation): Likewise.
13849 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13851 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
13852 depending on the type of dependency which dictates what the
13854 (unresolved_type_p): Resolved types limited to the current class.
13856 2000-03-15 Tom Tromey <tromey@cygnus.com>
13858 * decl.c (init_decl_processing): Set type of `sync_info' to be
13861 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
13862 Correctly compute bit number for current slot. Zero `high' and
13863 `low' in DS_LENGTH case. Don't skip inherited fields. Use
13864 mark_reference_fields.
13865 (mark_reference_fields): New function.
13867 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13869 * parse.y (register_incomplete_type): Fixed initialization of
13872 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13874 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
13876 (push_class_context, pop_class_context): New function.
13877 (class_body:): Call pop_class_context.
13878 (interface_body:): Likewise.
13879 (INNER_QUALIFIER): New macro.
13880 (report_class_declaration): Changed output format and use
13881 INNER_QUALIFIER. Call push_class_context.
13883 2000-02-14 Andrew Haley <aph@cygnus.com>
13885 * check-init.c (check_init): Add new cases for unary and binary
13888 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13890 * parse.y (resolve_package): Set `next' once a type name has been
13891 progressively discovered.
13892 (resolve_qualified_expression_name): Propagate resolution only if
13893 there are remaining qualifiers. Take into account `q' might have
13894 been cleared after re-qualification.
13895 * parse.y (patch_method_invocation): New local `resolved'.
13896 Section dealing with qualified expression rewritten to use
13897 resolve_field_access.
13899 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13901 * parse.h (PUSH_CPC): Fixed indentation.
13902 (DEBUG_CPC): New macro.
13903 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
13904 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
13905 * parse.y (class_body_declaration:): Use
13906 SET_CPC_INSTANCE_INITIALIZER_STMT.
13907 (method_declaration:): Check for null current_function_decl.
13908 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
13909 (java_parser_context_pop_initialized_field): Better handling of
13911 (maybe_make_nested_class_name): Mark nested class name as
13912 qualified when necessary.
13913 (end_class_declaration): Don't call java_parse_context_resume when
13914 one or more error occurred.
13915 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
13916 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
13917 SET_CPC_INITIALIZER_STMT.
13918 (method_header): Check for inner classes declaring static methods.
13919 (resolve_qualified_expression_name): Handle situation where `this'
13922 2000-03-13 Hans Boehm <boehm@acm.org>
13924 * typeck.c (build_prim_array_type): Correctly set the high word too.
13926 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13928 * parse.y (java_complete_expand_methods): Leave <clinit> out of
13930 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
13931 list of methods for interfaces.
13933 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13935 * parse.y (qualify_ambiguous_name): Properly handle expressions
13938 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13940 * parse.y (check_final_assignment): Extended to process
13942 (patch_assignment): Have check_final_assignment called only once.
13944 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13946 * java-tree.h (IS_INIT_CHECKED): New flag.
13947 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
13948 * parse.y (patch_string): Call force_evaluation_order on the
13949 completed string concatenation tree.
13950 * expr.c (force_evaluation_order): Call force_evaluation_order on
13951 function's arguments too.
13953 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13955 * decl.c (emit_init_test_initialization): Mark KEY as unused.
13956 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
13957 (build_anewarray): Likewise.
13958 * parse.y (patch_newarray): Likewise.
13959 * parse.c: Regenerated.
13961 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
13963 * decl.c (init_decl_processing): Added new class fields `depth',
13964 `ancestors', and `idt' to class_type_node. Use
13965 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
13966 * class.c (make_class_data): Push initial values for new fields.
13967 * java-tree.h: Updated prototype for `build_invokeinterface'.
13968 * expr.c (build_invokeinterface): Changed parameters to accept
13969 `method' tree. Calculate index of `method' in its declaring
13970 interface. Build call to _Jv_LookupInterfaceMethodIdx.
13971 (expand_invoke): Call `build_invokeinterface' with new parameters.
13972 * parse.y (patch_invoke): Call `build_invokeinterface' with new
13975 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
13977 * typeck.c (lookup_do): Search superinterfaces first
13978 when looking up an interface method. From Godmar Back
13979 <gback@cs.utah.edu>
13981 2000-03-06 Tom Tromey <tromey@cygnus.com>
13983 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
13985 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13987 * java-tree.h (lookup_argument_method2): Declared.
13988 (safe_layout_class): Prototype moved from parse.h.
13989 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
13990 * parse.y (java_check_regular_methods): Local `super_class' gone.
13991 Call lookup_argument_method2 instead of lookup_argument_method.
13992 Perform modifier match for methods found declared in implemented
13993 interfaces. Fixed indentation problem. Overriding/hiding error
13994 report to take place only for methods found in classes.
13995 * typeck.c (lookup_argument_method): Changed leading
13996 comment. Re-written by calling lookup_do.
13997 (lookup_argument_method2): New function.
13998 (lookup_java_method): Re-written by calling lookup_do.
13999 (lookup_do): New function.
14001 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14003 * check-init.c (check_init): Removed dead code. Handle (blank)
14005 * parse.y (declare_local_variables): New local `final_p', set it
14006 and use it to initialize LOCAL_FINAL.
14007 (check_final_assignment): Only check FIELD_DECLs.
14009 2000-02-17 Tom Tromey <tromey@cygnus.com>
14011 * Makefile.in (JAVA_OBJS): Added boehm.o.
14012 (boehm.o): New target.
14013 * Make-lang.in (JAVA_SRCS): Added boehm.c.
14014 * java-tree.h (flag_use_boehm_gc): Declare.
14015 (get_boehm_type_descriptor): Declare.
14016 * lang.c (lang_f_options): Added `use-boehm-gc'.
14017 (flag_use_boehm_gc): New global.
14018 * lang-options.h: Added -fuse-boehm-gc.
14019 * boehm.c: New file.
14020 * class.c (get_dispatch_table): If class uses a Boehm type
14021 descriptor, put it in the vtable.
14022 (make_class_data): Removed dead code.
14024 2000-03-03 Per Bothner <per@bothner.com>
14026 * decl.c (init_decl_processing): Initialize sizetype properly.
14028 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14030 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14031 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14032 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14033 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14034 (jcf_parse): New local `current'. Load innerclasses seen in outer
14035 context being processed.
14036 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14037 * jcf-write.c (append_innerclasses_attribute): New function.
14038 (append_innerclasses_attribute_entry): Likewise.
14039 (get_access_flags): Handle static classes. Set anonymous and local
14040 classes to be private.
14041 (generate_classfile): Attribute count adjusted. Call
14042 append_innerclasses_attribute.
14043 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14044 PURE_INNER_CLASS_TYPE_P.
14045 * parse.y (parser_qualified_classname): New parameter `is_static',
14046 produce non qualified name accordingly.
14047 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14048 (create_interface): Added argument to parser_qualified_classname.
14049 (create_class): Added argument to parser_qualified_classname. Setup
14050 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14051 (add_inner_class_fields): Fixed indentation.
14052 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14053 (method_declarator): Fixed typo in comment.
14054 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14055 (build_current_thisn): Likewise.
14056 (patch_method_invocation): Likewise.
14058 2000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
14060 * decl.c (current_function_decl): Move to toplev.c.
14062 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14064 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14065 (DECL_BIT_INDEX): Use underlying representation.
14066 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14068 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14070 * expr.c (build_java_ret): Pass proper type to size_binop.
14072 2000-02-25 Anthony Green <green@cygnus.com>
14074 * expr.c (build_class_init): Mark the decl to be ignored by
14076 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14077 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14078 * class.c (init_test_hash_newfunc): New function.
14079 (decl_hash): New function.
14080 (decl_compare): New function.
14081 * decl.c (emit_init_test_initialization): New function.
14082 (complete_start_java_method): Traverse the init test hashtable,
14083 calling emit_init_test_initialization.
14084 (always_initialize_class_p): Define.
14085 * expr.c (build_class_init): Use initialization tests when
14086 emitting class initialization code.
14087 (always_initialize_class_p): Declare.
14088 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14090 * java-tree.h: Include hash.h.
14091 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14092 (struct lang_decl): Add init_test_table field.
14093 (init_test_hash_entry): Define.
14095 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14097 * gjavah.c (main): Avoid using `argi' to report unimplemented
14100 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14102 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14103 initialize locals to avoid warnings. Local `exception_type' moved
14106 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14108 * parse.y (resolve_expression_name): Use `orig' as a second
14109 argument to resolve_field_access.
14110 (resolve_field_access): Removed unnecessary code when dealing with
14113 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14115 * class.c (push_super_field): Don't push the field twice.
14116 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14117 * parse.h (java_reorder_fields): Prototyped.
14118 * parse.y (java_reorder_fields): New function.
14119 (java_layout_class): Simplified not to worry about re-ordering.
14121 2000-02-23 Tom Tromey <tromey@cygnus.com>
14123 * gjavah.c (print_name): In JNI case, correctly quote string.
14124 (print_method_info): Don't handle overrides in JNI mode.
14126 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14128 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14129 value type set to `boolean_type_node'.
14131 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14133 * jcf-dump.c (main): Test for correct condition after
14134 output file creation.
14136 2000-02-19 Anthony Green <green@cygnus.com>
14138 * jcf-depend.c (add_entry): Fix test for first list entry.
14140 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14142 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14143 * constants.c (build_constants_constructor): Likewise.
14145 2000-02-19 Anthony Green <green@cygnus.com>
14147 * jcf-depend.c (add_entry): Add entries to the end of the list.
14149 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
14151 * decl.c (INT_TYPE_SIZE): Define if necessary.
14152 (expand_java_return): Handle the case of a native integer smaller
14153 than a JVM integer.
14155 2000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
14157 * gjavah.c (help): Use GCCBUGURL.
14158 * jv-scan.c (help): Likewise.
14159 * jcf-dump.c (help): Likewise.
14161 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14163 * jcf-write.c (generate_bytecode_insns): Don't generate empty
14166 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14168 * jcf-parse.c (load_class): Call `fatal' if no file containing
14169 the target class are found.
14171 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
14173 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14174 lex.c, lex.h, and PARSE_H to...
14175 (parse.o, parse-scan.o): ...here, respectively.
14177 * lex.c: Split out code that may trigger SIGFPE from yylex()
14178 to its own function.
14179 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14181 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14183 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14185 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14187 * parse.y (outer_field_access_p): Stop in time when outer contexts
14189 (resolve_qualified_expression_name): Properly qualify *everything*
14190 after a package.type to be resoled as expression names.
14191 (find_applicable_accessible_methods_list): Save/restore `class' to
14192 isolate it from a possible outer context search.
14194 2000-02-15 Tom Tromey <tromey@cygnus.com>
14196 * gjavah.c (jni_print_char): New function.
14197 (print_full_cxx_name): Use it.
14198 (decode_signature_piece): Likewise.
14199 (print_cxx_classname): Likewise.
14201 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14203 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14205 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14207 * gjavah.c: Include version.h.
14209 * jcf-dump.c: Likewise.
14211 * jv-scan.c: Likewise.
14213 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14215 * parse.y (outer_field_access_fix): First parameter now a tree
14216 node. Check for assignment to final. First argument to
14217 build_outer_field_access_fix modified to accommodate prototype.
14218 (build_outer_field_access): Don't check for assignment to final
14220 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14221 possibly returned by outer_field_access_fix. Changed
14222 outer_field_access_fix's first argument.
14223 (check_final_assignment): $finit$'s context is OK.
14224 (patch_unaryop): Use node instead of its line/column value when
14225 calling outer_field_access_fix.
14227 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14229 * parse.y (interface_declaration:): No longer tagged
14230 <node>. Re-installed default action.
14231 (class_member_declaration:): Handle inner interfaces.
14232 (interface_member_declaration): Handle inner interfaces and
14234 (create_interface): Push error if one seen. Suspend parsing
14235 context when processing an inner interface.
14236 (register_fields): Inner class static field limitations not to
14237 apply to inner interfaces.
14239 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14241 * jcf-parse.c (load_class): Update `java_error_count' when a
14242 class' file can't be found.
14243 (parse.y): Avoid (byte)code generation when errors seen.
14245 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14247 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14248 decodes a valid node.
14249 (patch_binop): Handle TRUNC_DIV_EXPR.
14251 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14253 * parse.y (resolve_package): New local `acc'. Try to progressively
14254 build and guess a package and type name.
14256 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14258 * parse.y (find_applicable_accessible_methods_list): Load and
14259 layout the search class if necessary.
14260 (java_complete_tree): Keep to original type of the folded initial
14263 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14265 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14266 Generate error message if circularity is detected. New static
14268 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
14269 * jcf-write.c (generate_bytecode_insns): Very simply handle
14271 * parse.y (java_check_circular_reference): Use
14272 `cyclic_inheritance_report' during report, if necessary.
14273 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14274 walking NEW_ARRAY_INIT twice.
14276 2000-02-09 Tom Tromey <tromey@cygnus.com>
14278 * parse.y (check_class_interface_creation): Allow inner classes to
14279 be `private' or `protected', check modifiers' consistency. Prevent
14280 block local classes from bearing any modifiers.
14282 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14284 * except.c (check_start_handlers): Re-add prototype lost in last
14286 (maybe_start_try): Remove excess argument to `check_start_handlers'.
14288 2000-02-09 Andrew Haley <aph@cygnus.com>
14290 * decl.c (clear_binding_level): Remove excess initializer.
14291 (maybe_poplevels): Remove unused variable.
14292 (force_poplevels): Ditto.
14293 (struct binding_level): Add comment.
14295 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14297 * jcf-write.c (generate_classfile): Don't consider
14298 pre-initialization with reference value (use <clinit> instead.)
14299 * parse.y (java_fix_constructors): No generated constructor for
14301 (build_outer_field_access): Removed debug message.
14302 (outer_field_expanded_access_p): Adapted to bytecode generation.
14303 (build_outer_field_access_method): Use fix_method_argument_names.
14304 (build_outer_method_access_method): Fixed indentation. Added
14305 comment. Handle access method generation for static and also void
14307 (build_access_to_thisn): Inserted debug message.
14308 (maybe_build_thisn_access_method): Use fix_method_argument_names.
14309 (resolve_qualified_expression_name): Fixed comment.
14310 (not_accessible_p): Adapted to bytecode generation. Added comment.
14311 (patch_method_invocation): Added comment.
14312 (maybe_use_access_method): Fixed leading comment. Handle static
14314 (java_complete_lhs): Don't shortcut handling of initialized upon
14315 declaration String type static fields when generating bytecode.
14316 (patch_unaryop): Handle outer field access when generating
14319 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14321 * java-tree.h (FIELD_THISN): New macro.
14322 * jcf-write.c (append_synthetic_attribute): New function.
14323 (generate_classfile): Set "Synthetic" attribute on this$<n>,
14324 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14325 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14327 (build_outer_field_access): Turned on access functions usage and
14328 generation when compiling to bytecode.
14329 (maybe_use_access_method): Likewise.
14331 2000-01-25 Andrew Haley <aph@cygnus.com>
14333 * java-except.h (struct eh_range): Add `expanded' field.
14334 (maybe_start_try): Add end_pc arg.
14335 (maybe_end_try): Ditto.
14336 * java-tree.h (force_poplevels): new function.
14337 * expr.c (expand_byte_code): Don't call maybe_start_try or
14339 * except.c (add_handler): Reset expanded.
14340 (expand_start_java_handler): Set expanded.
14341 (check_start_handlers): Don't expand a start handler that's
14342 already been expanded.
14343 (maybe_start_try): Add end_pc arg. Only expand a handler which
14345 (expand_end_java_handler): call force_poplevels.
14346 (force_poplevels): new function.
14347 * decl.c (binding_level): Add start_pc of binding level.
14348 (maybe_pushlevels): Call maybe_start_try when pushing binding
14350 (maybe_poplevels): Call maybe_end_try when popping binding levels.
14351 (LARGEST_PC): Define.
14352 (clear_binding_level): Use LARGEST_PC.
14354 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14355 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14356 (binding_depth, is_class_level, current_pc): new variables.
14357 (struct binding_level): ditto.
14358 (indent): new function.
14359 (push_jvm_slot): add debugging info.
14360 (maybe_pushlevels): ditto.
14361 (maybe_poplevels): ditto.
14362 (pushlevel): ditto.
14364 (start_java_method): ditto.
14365 (give_name_to_locals): comment only.
14366 * except.c (binding_depth, is_class_level, current_pc):
14368 (expand_start_java_handler): add debugging info.
14369 (expand_end_java_handler): ditto.
14371 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14373 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14374 (print_name_for_stub_or_jni, process_file): Constify a char*.
14376 2000-02-03 Tom Tromey <tromey@cygnus.com>
14378 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14380 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14382 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14383 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14386 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14388 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14389 * java-tree.h (TYPE_II_STMT_LIST): New macro.
14390 (struct lang_type): New field `ii_block'.
14391 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14392 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14393 * parse.h (struct parser_ctxt): New field `instance_initializers'.
14394 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14395 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14396 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14398 * parse.y (add_instance_initializer): New function.
14399 (in_instance_initializer): New static global.
14400 (class_body_declaration:): Link instance initializer block.
14401 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14402 (array_creation_expression:): Remove unused local.
14403 (java_parser_context_push_initialized_field): Fixed leading
14404 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14405 CPC_INSTANCE_INITIALIZER_LIST.
14406 (java_parser_context_pop_initialized_field): Likewise.
14407 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14408 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14409 CPC_INITIALIZER_STMT.
14410 (fix_constructors): New local `class_type'. Use it. Call
14411 add_instance_initializer.
14412 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14413 (patch_return): Forbid return in instance initializers.
14414 (patch_throw_statement): Enforce exception handling in the context
14415 of instance initializers.
14417 2000-02-03 Tom Tromey <tromey@cygnus.com>
14419 * Make-lang.in (java.mostlyclean): Remove executables in
14422 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14424 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14425 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14426 (java_float_finite): Convert to use union Word from javaop.h.
14427 (java_double_finite): Convert to use union DWord from javaop.h.
14429 2000-02-02 Tom Tromey <tromey@cygnus.com>
14431 * gjavah.c (options): Added `jni' entry.
14432 (help): Document -jni.
14433 (flag_jni): New global.
14434 (process_file): Handle JNI output. Don't print text from
14435 -prepend, -add, etc, when generating stubs. Only remove `.class'
14436 suffix if it actually exists.
14437 (main): Create a `.c' file when run with `--jni --stubs'. Create
14438 correct output file name with `--jni'.
14439 (print_include): Mangle header name differently in JNI case.
14440 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14442 (print_method_info): Handle JNI case. Put signature info into
14443 method name. Handle case when STREAM is NULL.
14444 (print_name_for_stub_or_jni): New function.
14445 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
14446 (print_cxx_classname): Handle JNI.
14447 (print_full_cxx_name): Likewise.
14448 (decode_signature_piece): Likewise.
14449 (overloaded_jni_method_exists_p): New function.
14450 (struct method_name): Added `signature' and `sig_length' fields.
14451 (HANDLE_END_FIELD): Do nothing in JNI mode.
14453 2000-02-02 Tom Tromey <tromey@cygnus.com>
14455 * jv-scan.c: Include version.c, <getopt.h>.
14456 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14457 (options): New array.
14458 (usage): New function.
14459 (version): New function.
14460 (main): Use getopt_long to parse command line.
14461 * jcf-dump.c: Include version.c, <getopt.h>.
14462 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14463 OPT_JAVAP): New macros.
14464 (options): New array.
14465 (usage): Return `void'. Changed message.
14466 (help): New function.
14467 (version): New function.
14468 (main): Use getopt_long_only to parse command line.
14469 * gjavah.c: Include <getopt.h>.
14470 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14471 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14472 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14473 (options): New array.
14474 (java_no_argument): Removed.
14475 (help): Updated with missing options.
14476 (main): Use getopt_long_only to parse command line.
14477 (usage): Changed message.
14479 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14481 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14482 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
14483 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
14484 * parse.y (array_creation_expression:): Handle anonymous arrays.
14485 (build_array_from_name): Don't set `ret_name' if null.
14486 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
14487 (qualify_ambiguous_name): Likewise.
14488 (java_complete_expand_class): Likewise.
14490 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14492 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
14493 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
14494 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
14495 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
14496 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
14497 AIPL_FUNCTION_COMPLETED_INVOCATION.
14498 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
14499 AIPL_FUNCTION_INVOCATION_READY.
14500 (AIPL_FUNCTION_DECLARATION): New enum entry.
14501 * parse.y (reorder_static_initialized): New function.
14502 (java_parser_context_pop_initialized_field): Use it.
14503 (add_inner_class_fields): Use
14504 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
14505 augmented. Install marker after last alias initializer, if any.
14506 (generate_finit): Fixed typo. Don't try to retain only the used
14508 (method_header): Compute and set DECL_FUNCTION_NAP.
14509 (method_declarator): Fixed comment. Insert alias initializer in
14511 (build_alias_initializer_parameter_list): Fixed leading
14512 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
14513 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
14514 (java_complete_expand_class): Code to retain only used aliases
14516 (java_complete_expand_methods): New local `first_decl'. Generate
14517 $finit$ first, then expand the constructors, regular methods and
14519 (java_complete_expand_method): Don't report error on missing
14520 return statement if previously detected bogus.
14521 (fix_constructors): Don't patch constructor parameters list.
14522 (patch_method_invocation): Use new AIPL enum values. Reverse
14523 alias initializer list for anonymous classes.
14525 2000-01-30 Anthony Green <green@redhat.com>
14527 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
14528 determine how many stack slots to pop.
14530 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
14532 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
14533 error handling/recovery.
14534 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
14536 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14538 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
14539 FIELD_LOCAL_ALIAS_USED): New macros.
14540 (DECL_FUNCTION_NAP): New macro.
14541 (struct lang_decl): New field `nap'.
14542 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
14543 (struct lang_type): New fields `finit_stmt_list' and
14544 `clinit_stmt_list'.
14545 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
14546 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
14547 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
14548 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
14549 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
14550 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
14551 (BUILD_THROW): Macro line separator re-indented.
14552 * parse.y (end_class_declaration): New function.
14553 (maybe_generate_pre_expand_clinit): New name for
14554 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
14555 pre-expand static fields.
14556 (maybe_generate_clinit): Function deleted.
14557 (check_for_static_method_reference): Prototype's parameter list
14559 (generate_finit): New name for maybe_generate_finit. Changed
14560 leading comment. Function rewritten to use
14561 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
14562 (build_alias_initializer_parameter_list): New function.
14563 (java_parser_context_pop_initialized_field): Likewise.
14564 (add_inner_class_fields): Likewise.
14565 (type_declaration:): Call end_class_declaration.
14566 (class_member_declaration:): Likewise.
14567 (formal_parameter_list:): Fixed typos.
14568 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
14569 element. Improved error handling.
14570 (block_statement:): Call end_class_declaration.
14571 (anonymous_class_creation:): Likewise.
14572 (create_anonymous_class): Fixed comments.
14573 (create_class): Call add_inner_class_fields.
14574 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
14575 (method_header): Use MARK_FINAL_PARMS.
14576 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
14577 (method_declarator): Propagate final argument flag.
14578 (craft_constructor): New local `artificial'. Call
14579 build_alias_initializer_parameter_list. Use
14580 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
14581 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
14583 (complete_expand_class): Get rid of unused outer context local
14585 (java_complete_expand_methods): Fixed leading
14586 comment. Generate/pre-expand <clinit> first. Changed method
14587 expansion order to regular, $finit$, constructors, <clinit>.
14588 (java_complete_expand_method): Set current_function_decl.
14589 (fix_constructors): Fix constructor parameter list to account for
14590 outer context local alias initializers.
14591 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14592 (resolve_expression_name): Lookup outer context local aliases. New
14593 local `access', use it.
14594 (patch_method_invocation): Patch inner class ctor invocation with
14595 outer context local aliases initialization values. $finit$
14596 invocation patching now includes things generated with
14597 build_alias_initializer_parameter_list.
14598 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14599 (build_super_invocation): Likewise.
14600 (patch_assignment): Changed comment.
14602 2000-01-27 Andrew Haley <aph@cygnus.com>
14604 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
14608 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14610 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
14612 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
14614 * parse.y (register_fields): Don't pass a format specifier to
14615 OBSOLETE_MODIFIER_WARNING.
14616 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
14617 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
14619 (check_modifiers): Change function into a macro.
14620 (check_class_interface_creation): Pass a literal format string.
14622 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14624 * buffer.h: PROTO -> PARAMS.
14625 * check-init.c: Likewise.
14626 * class.c: Likewise.
14627 * constants.c: Likewise.
14628 * convert.h: Likewise.
14629 * decl.c: Likewise.
14630 * except.c: Likewise.
14631 * expr.c: Likewise.
14632 * gjavah.c: Likewise.
14633 * java-except.h: Likewise.
14634 * java-tree.h: Likewise.
14635 * jcf-depend.c: Likewise.
14636 * jcf-dump.c: Likewise.
14637 * jcf-parse.c: Likewise.
14638 * jcf-path.c: Likewise.
14639 * jcf-reader.c: Likewise.
14640 * jcf-write.c: Likewise.
14642 * jv-scan.c: Likewise.
14643 * jvgenmain.c: Likewise.
14644 * jvspec.c: Likewise.
14645 * lang.c: Likewise.
14648 * parse-scan.y: Likewise.
14649 * parse.h: Likewise.
14650 * parse.y: Likewise.
14651 * typeck.c: Likewise.
14652 * verify.c: Likewise.
14653 * xref.c: Likewise.
14654 * xref.h: Likewise.
14655 * zextract.c: Likewise.
14656 * zipfile.h: Likewise.
14658 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14660 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14661 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
14662 * constants.c (build_constant_data_ref): Check for cached
14663 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
14664 in TYPE_CPOOL_DATE_REF.
14665 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
14666 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
14667 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
14668 (LOCAL_FINAL): New macro.
14669 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
14670 constant pool -- don't try to reuse.
14671 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
14672 TYPE_LANG_SPECIFIC.
14673 (find_in_current_zip): Use TYPE_JCF.
14674 * parse.h (java_check_final): Prototype removed.
14675 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
14676 (maybe_create_class_interface_decl,
14677 check_class_interface_creation): Likewise.
14678 (java_expand_finals): Function removed.
14679 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
14680 (block_statement:): Fixed comment.
14681 (anonymous_class_creation:): Likewise.
14682 (check_class_interface_creation): Reversed Jan 12, 2000 extra
14684 (check_class_interface_creation): Loosened error report on (inner)
14685 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
14686 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
14687 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
14689 (create_interface): Likewise.
14690 (anonymous_class_counter): New static global.
14691 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
14692 patch. Fixed comments.
14693 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
14694 anonymous_class_counter when declaring a toplevel class.
14695 (craft_constructor): Fixed constructor name when handling
14696 anonymous classes. Anonymous class constructors to feature hidden
14697 this$<n> parameter.
14698 (java_fix_constructors): Added comment.
14699 (java_check_final): Function removed.
14700 (java_complete_expand_methods): Fixed comment. Don't generate
14701 class data, save its outgoing constant pool instead.
14702 (verify_constructor_super): Skip anonymous class constructor
14703 hidden this$<n> parameter.
14704 (java_expand_classes): New local `saved_ctxp'. Removed call to
14705 java_expand_finals and java_check_final. Expand anonymous class
14706 constructors. Generate class data.
14707 (build_super_invocation): Skip anonymous class hidden this$<n>
14709 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
14710 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14711 (set_java_signature): Likewise.
14713 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14715 * gjavah.c: Delete ACC_VISIBILITY define.
14716 * jcf.h: Add ACC_VISIBILITY define.
14717 * parse.y: final: rule tagged <value>.
14718 (java_check_regular_methods): Use ACC_VISIBILITY define for
14719 default package access check.
14720 (local_variable_declaration_statement): Use final: rule.
14722 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14724 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
14725 (final:): New rule.
14727 2000-01-17 Tom Tromey <tromey@cygnus.com>
14729 * gjavah.c (print_field_info): Allow non-static final fields.
14731 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14733 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
14734 * parse.y (patch_anonymous_class): New function.
14735 (create_anonymous_class): Register incomplete type when the
14736 class/interface to extends/implement isn't known yet.
14737 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
14738 (verify_constructor_super): Tuned error message.
14740 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14742 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
14743 (ANONYMOUS_CLASS_P): New macro.
14744 (TYPE_SIGNATURE, TYPE_JCF): New macros.
14745 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
14746 * parse.y (create_class): Added leading argument.
14747 (maybe_create_class_interface_decl,
14748 check_class_interface_creation): Likewise.
14749 (craft_constructor): New function.
14750 (verify_constructor_super): Added argument in prototype.
14751 (class_declaration:): Inserted leading argument.
14752 (for_begin:): Use FOR_LOOP_P.
14753 (anonymous_class_creation): Create WFL of the anonymous class to
14754 instantiate. Call build_new_invocation. Added comments.
14755 (check_class_interface_creation): Handle parameter `anonymous' in
14756 verbose mode class creation announce.
14757 (link_nested_class_to_enclosing): Exclude anonymous classes.
14758 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
14759 anonymous class, even though they appear to have an enclosing
14761 (create_interface): Pass extra argument to
14762 check_class_interface_creation.
14763 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
14764 (create_class): Call check_class_interface_creation and
14765 maybe_create_class_interface_decl with extra new argument. Don't
14766 add private this$<n> to anonymous classes.
14767 (method_declarator): Insert hidden this$<n> to anonymous class
14769 (java_fix_constructors): Deleted code creating default
14770 constructor. Call craft_constructor instead.
14771 (java_check_regular_methods): Set `saw_constructor' to 1 for
14773 (fix_constructors): Pass extra argument to verify_constructor_super.
14774 (verify_constructor_super): New local `sdecl', use it. Search for
14775 matching constructor (possibly featuring arguments) in super
14777 (lookup_method_invoke): Craft constructor according to arguments
14778 list when dealing with anonymous class constructors.
14779 (build_super_invocation): Pass arguments to anonymous class super
14781 (search_loop): Use FOR_LOOP_P.
14782 (labeled_block_contains_loop_p): Likewise.
14784 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14786 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
14787 (enclosing_context_p): New function.
14788 (get_access_flags_from_decl): Handle CLASS_STATIC.
14789 (maybe_layout_super_class): Extra first argument passed to
14791 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
14793 * decl.c (access0_identifier_node): New global.
14794 (init_decl_processing): access0_identifier_node initialized.
14795 (pushdecl): Set DECL_CONTEXT only on non type decls.
14796 * expr.c (lookup_field): Lookup inner class fields in enclosing
14798 (expand_invoke): Use ID_INIT_P.
14799 (expand_java_field_op): Use DECL_CLINIT_P.
14800 * java-tree.def (CLASS_LITERAL): New tree code.
14801 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
14802 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
14803 (struct lang_decl): New field `inner_access'.
14804 (enclosing_context_p): Prototyped.
14805 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
14806 ID_CLINIT_P): New macros.
14807 (CLASS_STATIC): New macro.
14808 (CLASS_ACCESS0_GENERATED_P): New macro.
14809 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
14810 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
14811 INNER_CLASS_P): New macros.
14812 (DECL_INNER_CLASS_LIST): New macro.
14813 * jcf-parse.c (yyparse): Avoid the use of ANSI string
14815 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14816 the shift value to int. Fixed typo in comment.
14817 * lex.c (inst_id, wpv_id): Initialize.
14818 * mangle.c (unicode_mangling_length): Take `$' into account.
14819 * parse.h (DRECOVER, RECOVER): Terminate properly.
14820 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
14821 (typedef struct _jdep): New field `enclosing'.
14822 (JDEP_ENCLOSING): New macro.
14823 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
14824 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
14825 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
14826 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
14827 GET_ENCLOSING_CPC_CONTEXT): New macros.
14828 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
14829 (do_resolve_class): Added extra argument in prototype.
14830 * parse.y (resolve_class): Added extra argument in prototype.
14831 (maybe_create_class_interface_decl): Likewise.
14832 (maybe_use_access_method, build_wfl_wrap): New functions.
14833 (java_complete_expand_classes, java_complete_expand_class):
14835 (java_parser_context_push_initialized_field,
14836 java_parser_context_suspend, java_parser_context_resume):
14838 (maybe_make_nested_class_name, make_nested_class_name,
14839 set_nested_class_simple_name_value,
14840 link_nested_class_to_enclosing, find_as_inner_class,
14841 find_as_inner_class_do, check_inner_class_redefinition,
14842 build_thisn_assign, build_current_thisn, build_access_to_thisn,
14843 maybe_build_thisn_access_method, build_outer_field_access,
14844 build_outer_field_access_methods, build_outer_field_access_expr,
14845 build_outer_method_access_method, build_new_access_id,
14846 build_outer_field_access_method, outer_field_access_p,
14847 outer_field_expanded_access_p, outer_field_access_fix,
14848 build_incomplete_class_ref, patch_incomplete_class_ref,
14849 create_anonymous_class): Likewise.
14850 (inst_id, wpv_id): New static global variables.
14851 (synchronized:): New rule, tagged <node>.
14852 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
14854 (anonymous_class_creation:): New rule, tagged <node>.
14855 (NEW_TK): Tagged <node>.
14856 (type_literals, array_type_literal): New rules, tagged <node>.
14857 (class_declaration:): Removed action when reducing by class_body:
14858 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
14859 using GET_CPC in sub-rules.
14860 (class_member_declaration): Handle inner classes.
14861 (method_declaration): When reducing method_header:, reset
14862 current_function_decl when appropriate.
14863 (method_declarator:): Set the number of formal parameter to 0 for
14864 method declared without arguments.
14865 (constructor_declarator:): Likewise.
14866 (static_initializer:): List of elements kept in a list.
14867 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
14868 use of the keyword `static' for type declarations.
14869 (block_statement:): Handle inner class declarations.
14870 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
14871 type qualified `this'.
14872 (class_instance_creation_expression): Use anonymous_class_creation:
14873 to handle inner class instances creation. Handle qualified `new'.
14874 (something_dot_new): Added appropriate actions.
14875 (create_new_parser_context): New function.
14876 (java_push_parser_context, java_parser_context_save_global,
14877 java_parser_context_suspend): Use create_new_parser_context.
14878 (check_modifiers): Changed leading comment.
14879 (check_class_interface_creation): Handle interclasses.
14880 (add_superinterfaces): Fixed comment.
14881 (create_interface): Build qualified name from the raw_name instead
14882 of its matching WFL. Push the initialized fields list. raw_name added
14883 as an extra argument to maybe_create_class_interface_decl.
14884 (create_class): Build qualified name from the raw_name instead of
14885 its matching WFL. Removed assignment to current_parsed_class_un.
14886 Call PUSH_ERROR before returning an error. Suspend the current
14887 parser context when processing an inner class. Push the
14888 initialized fields list. raw_name added as an extra argument to
14889 maybe_create_class_interface_decl. Add the private this$<n>
14891 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
14892 (register_fields): Get the class type from GET_CPC and handle
14893 previous errors. Added code to handle the creation of static
14894 fields in inner classes. Initialized fields initialization
14895 statements kept in a list of lists.
14896 (maybe_generate_finit): Initialized fields initialization
14897 statements kept in a list of lists. Use GET_CPC.
14898 (maybe_generate_clinit): Likewise.
14899 (method_header): Use GET_CPC and GET_CPC_UN.
14900 (parser_qualified_classname): Handle inner classes.
14901 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
14902 (java_fix_constructors): Hide pointer to enclosing context
14903 instance in constructor list when dealing with inner classes.
14904 (jdep_resolve_class): Call resolve_class with extra first argument
14906 (resolve_class): Add enclosing context as a first extra argument
14907 to do_resolve_class.
14908 (do_resolve_class): Call find_as_inner_class. Handle WFLs
14910 (resolve_no_layout): Extra argument added to resolve_class
14912 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
14913 (java_get_real_method_name): Use GET_CPC_UN.
14914 (check_abstract_method_definitions): Use DECL_CLINIT_P.
14915 (java_check_abstract_methods): Handle static method declared in
14916 inner classes by an error.
14917 (java_check_regular_methods): Use DECL_CLINIT_P.
14918 (source_start_java_method): Also set DECL_MAX_LOCALS.
14919 (create_artificial_method): Call java_parser_context_save_global
14920 and java_parser_context_restore_global instead of saving/restoring
14921 the context by hand.
14922 (expand_start_java_method): Improved verbose mode message.
14923 (java_complete_expand_methods): Fixed leading comment. Use
14925 (fix_constructors): Added assignment to this$<n> if necessary.
14926 (java_expand_classes): Call java_complete_expand_classes instead
14927 of java_complete_expand_methods.
14928 (make_qualified_primary): Simplified.
14929 (merge_qualified_name): Optimized for missing left or right parts.
14930 (resolve_expression_name): Handle access to outer class fields from
14932 (resolve_qualified_expression_name): New macro
14933 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
14934 classes. Report error on non appropriate qualification of
14935 `new'. Handle qualified `this'.
14936 (not_accessible_p): Allow access to outer class private fields from
14938 (patch_method_invocation): Handle method invocations through
14939 access methods and inner class constructor invocations.
14940 (find_applicable_accessible_methods_list): Search enclosing
14941 contexts of an inner class.
14942 (search_applicable_methods_list): Fixed typo.
14943 (argument_types_convertible): Handle inner class constructors'
14944 hidden outer context reference argument.
14945 (qualify_ambiguous_name): Handle qualified `this'.
14946 (java_complete_lhs): Handle use of field accessed through
14947 artificial access methods in various cases of assignments. Handle
14948 CLASS_LITERAL node.
14949 (check_final_assignment): Use DECL_CLINIT_P.
14950 (valid_ref_assignconv_cast_p): Handle the destination being an
14951 enclosing context of the source.
14952 (patch_unaryop): Handle use of field accessed through artificial
14954 (patch_return): Use DECL_CLINIT_P.
14955 (patch_throw_statement): Use DECL_CLINIT_P.
14956 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
14957 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
14960 2000-01-16 Anthony Green <green@cygnus.com>
14962 * parse.y (build_string_concatenation): Only use
14963 StringBuffer(String) shortcut if String arg is constant.
14965 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14967 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14968 the shift value to int. Fixed typo in comment.
14970 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
14972 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
14973 * jcf-write.c: Likewise.
14974 * parse.y: Likewise.
14975 * parse.c: Regenerate.
14977 2000-01-09 Anthony Green <green@cygnus.com>
14979 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
14980 bytecodes in the correct order.
14982 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14984 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
14986 2000-01-06 Anthony Green <green@cygnus.com>
14988 * expr.c (java_lang_expand_expr): Switch to permanent obstack
14989 before building constant array decl.
14991 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
14993 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
14994 method invocation and typo in conditional expression.
14995 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
14996 the appropriate NOTE_POP.
14997 * parse.y (patch_binop): Shift value mask to feature the right
15000 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15002 * class.c (assume_compiled, assume_compiled_node): Add static
15004 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15006 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15008 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15010 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15011 to `__modifier' to avoid stringifying it.
15013 * parse.y (verify_constructor_circularity): Don't call a variadic
15014 function with a non-literal format string.
15015 (java_check_abstract_methods): Move unreachable code inside
15016 `continue' statement.
15017 (lookup_method_invoke): Call xstrdup, not strdup.
15019 * expr.c (expand_java_field_op): Avoid the use of ANSI string
15022 * jcf-parse.c (yyparse): Likewise.
15024 * jv-scan.c (main): Likewise.
15026 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15028 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15029 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15030 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15033 * parse.y (synchronized, variable_redefinition_error,
15034 check_class_interface_creation, create_interface, create_class,
15035 method_header, finish_method_declaration,
15036 check_modifiers_consistency, method_declarator,
15037 complete_class_report_errors, check_abstract_method_definitions,
15038 java_check_regular_methods, check_throws_clauses,
15039 java_check_abstract_methods, read_import_dir,
15040 check_pkg_class_access, declare_local_variables, fix_constructors,
15041 cut_identifier_in_qualified, resolve_expression_name,
15042 resolve_qualified_expression_name, patch_method_invocation,
15043 java_complete_lhs, patch_assignment, try_builtin_assignconv,
15044 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15045 patch_exit_expr, patch_exit_expr, patch_switch_statement,
15046 patch_try_statement, patch_synchronized_statement,
15047 patch_throw_statement, check_thrown_exceptions,
15048 patch_conditional_expr): Likewise.
15050 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15052 * Makefile.in (LIBDEPS): Added gcc's errors.o
15053 (../jcf-dump$(exeext):): Link with gcc's errors.o
15054 (../gcjh$(exeext):): Likewise.
15055 * expr.c (expand_java_NEW): Layout the entire target type instead of
15056 laying out its methods only.
15057 (lookup_field): Layout the class after having loaded it.
15058 * java-tree.h (java_debug_context): Declared.
15059 * jcf-io.c (toplev.h): Included.
15060 (find_class): Removed assignment to jcf's outofsynch
15061 field. Force source file to be read if newer than its matching
15062 class file. Tweaked debug messages.
15063 * jcf-parse.c (jcf_out_of_synch): Deleted.
15064 (read_class): Call to jcf_out_of_synch removed.
15065 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15066 (jcf_out_of_synch): Prototype deleted.
15067 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15068 `deprecated' and `class_err': integer turned into bit-fields.
15069 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15070 * parse.y (package_list): New global.
15071 (package_declaration:): Record newly parsed package name.
15072 (extra_ctxp_pushed_p): Static global deleted.
15073 (java_parser_context_save_global): Create buffer context for the
15074 purpose of saving globals, if necessary.
15075 (java_parser_context_restore_global): Pop context pushed for the
15076 purpose of saving globals, if necessary.
15077 (java_debug_context_do): New prototype and function.
15078 (java_debug_context): Likewise.
15079 (do_resolve_class): Use already parsed package names to qualify
15080 and lookup class candidate.
15081 (java_pre_expand_clinit): Removed unnecessary local variable.
15083 1999-12-17 Tom Tromey <tromey@cygnus.com>
15085 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
15087 (process_file): Use `\n\' at end of each line in string.
15089 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15091 * expr.c (expand_invoke): Layout the loaded class before
15092 attempting to use it.
15093 (expand_java_field_op): Allow final field assignments to take
15095 * typeck.c (convert): Return error_mark_node if expr is null.
15097 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15099 * class.c (class_depth): Return -1 if the class doesn't load
15101 * expr.c (can_widen_reference_to): Check for errors during depth
15102 computation and return 0 accordingly.
15103 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15104 create default constructors and add an other error check.
15105 * parse.h (java_fix_constructors): Prototyped.
15106 * parse.y (java_pre_expand_clinit): Likewise.
15107 (build_super_invocation): Re-prototyped to feature one argument.
15108 (java_check_circular_reference): Directly use `current'.
15109 (java_fix_constructors): New function.
15110 (java_check_regular_methods): Don't create default constructors
15111 here, but abort if none were found.
15112 (java_complete_expand_methods): Pre-process <clinit> calling
15113 java_pre_expand_clinit.
15114 (java_pre_expand_clinit): New function.
15115 (fix_constructors): build_super_invocation invoked with the
15116 current method declaration as an argument.
15117 (build_super_invocation): Use the context of the processed method
15118 decl argument instead of current_class.
15119 * typeck.c (lookup_java_method): Take WFLs in method names into
15122 1999-12-14 Per Bothner <per@bothner.com>
15124 * class.c (make_class_data): flag_keep_inline_functions to keep
15125 private methods in the method array.
15127 1999-12-15 Anthony Green <green@cygnus.com>
15129 * check-init.c (check_init): Take into account both types of
15130 `throw's when checking for uninitialized variables.
15132 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15134 * parse.y (java_complete_lhs): Force conversion of array
15135 dimensions to int_type_node, that's what runtime's ABI expects.
15137 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15139 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15140 operand of a WFL, until the Java front-end gets fixed with regard
15141 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15143 1999-12-10 Andrew Haley <aph@cygnus.com>
15145 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15146 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15147 expr.c (build_java_athrow): Add support for sjlj-exceptions.
15148 java-tree.h: Ditto.
15149 jcf-write.c: Ditto.
15151 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
15153 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15154 before calling expand_eh_region_start and expand_start_all_catch.
15155 * except.c (expand_start_java_handler): Switch to permanent
15156 obstack before calling expand_eh_region_start.
15157 (expand_end_java_handler): Switch to permanent obstack before
15158 calling expand_start_all_catch.
15160 1999-12-5 Anthony Green <green@cygnus.com>
15162 * decl.c (init_decl_processing): Mark throw_node as a noreturn
15163 function with side effects.
15164 (init_decl_processing): Mark all memory allocating DECLs with
15167 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15169 * except.c (expand_end_java_handler): Call
15170 expand_resume_after_catch and end_catch_handler.
15172 1999-11-30 Anthony Green <green@cygnus.com>
15174 * verify.c (verify_jvm_instructions): Create new return label
15175 chain if non existent (don't rely on the verified state of the jsr
15178 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15180 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15181 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15183 * parse.y (patch_assignment): Removed bogus final class test on
15184 lhs when checking on whether to emit an ArrayStoreException runtime
15186 * expr.c (expand_java_arraystore): Likewise.
15188 1999-11-28 Anthony Green <green@cygnus.com>
15190 * decl.c (find_local_variable): Reuse single slot decls when
15193 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15195 * jcf-parse.c (saw_java_source): Global variable removed.
15196 (read_class): Don't use `saw_java_source'. Added extra braces.
15197 (yyparse): Code setting `saw_java_source' removed.
15199 1999-11-24 Mark Mitchell <mark@codesourcery.com>
15201 * except.c (emit_handlers): Zero catch_clauses after emitting them.
15203 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15205 * verify.c (merge_type_state): Non verified subroutines being
15206 considered more than once to trigger passive type merge.
15208 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15210 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15211 in case of error. Error message tuned.
15213 1999-11-21 Anthony Green <green@cygnus.com>
15215 * constants.c (find_methodref_index): Unwrap method names before
15216 inserting them in the constant pool.
15218 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15220 * class.c (assume_compiled_node): New typedef.
15221 (assume_compiled_tree): New static data.
15222 (find_assume_compiled_node): New function.
15223 (add_assume_compiled): New function.
15224 (assume_compiled): New function.
15225 * class.c (make_class_data): Use assume_compiled.
15226 (is_compiled_class): Use assume_compiled.
15228 * java-tree.h (add_assume_compiled): Declare.
15230 * lang.c (lang_decode_option): Parse new options.
15232 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15234 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15235 int_type_node: that's what `_Jv_AllocObject' expects.
15237 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15239 * parse.y (lookup_method_invoke): Use lang_printable_name to
15240 reliably build the type name during error report. Fixes PR gcj/97.
15242 1999-11-09 Tom Tromey <tromey@cygnus.com>
15244 * jcf-path.c: Include <sys/stat.h>.
15245 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
15246 (DIR_UP): New macro.
15248 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15250 * parse.y (source_end_java_method): Resume permanent allocation,
15251 reversing Apr 27 1998 patch.
15252 (patch_string_cst): Pop obstacks after having pushed the permanent
15255 1999-11-05 Tom Tromey <tromey@cygnus.com>
15257 * class.c (finish_class): Emit inlined methods if any native
15258 methods exist in the class. Fixes PR gcj/85.
15260 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
15262 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15263 (qualify_ambiguous_name): Likewise.
15265 1999-11-03 Godmar Back <gback@cs.utah.edu>
15267 * typeck.c: (lookup_java_method): search all inherited
15268 interfaces when looking up interface method.
15270 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15272 * parse.y (method_header:): Issue error message for rule `type
15274 (synchronized:): Error report when not using synchronized.
15276 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15278 * parse.y (resolve_qualified_expression_name): Prevent `this' from
15279 being used before the superclass constructor has been called.
15280 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15281 instead of `CALL_THIS_CONSTRUCTOR_P'.
15283 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
15285 * check-init.c: Fix typo in comment.
15287 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15289 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15292 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15294 * parse.y (expression_statement:): Call function to report
15295 improper invocation of a constructor.
15296 (parse_ctor_invocation_error): New function.
15298 1999-10-26 Mark Mitchell <mark@codesourcery.com>
15300 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15303 1999-10-21 Tom Tromey <tromey@cygnus.com>
15305 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15306 in generated `main'.
15308 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15310 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15311 (qualify_ambiguous_name): Likewise.
15313 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15315 * parse.y (java_complete_tree): fold_constant_for_init to work on
15317 (java_complete_lhs): Likewise.
15318 (array_constructor_check_entry): Complete an initializer element
15319 on permanent_obstack.
15321 1999-10-19 Tom Tromey <tromey@cygnus.com>
15323 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15324 From Mike Moreton <mike@pillim.demon.co.uk>.
15326 1999-10-15 Greg McGary <gkm@gnu.org>
15328 * java-tree.h (flag_bounds_check): Remove extern decl.
15329 * lang.c (flag_bounds_check): Remove global variable.
15330 (lang_f_options): Remove "bounds-check" entry.
15331 (lang_init_options): Default flag_bounds_check to "on".
15333 1999-10-14 Tom Tromey <tromey@cygnus.com>
15335 * jvgenmain.c (usage): New function.
15336 (main): Use it. Also, handle `-D' options.
15337 * jvspec.c (lang_specific_driver): Recognize -D.
15338 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15340 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15342 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15344 * jcf-dump.c (print_constant, disassemble_method): Don't call a
15345 variadic function with a non-literal format string.
15347 * parse-scan.y (report_main_declaration): Likewise.
15349 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15351 * parse.y (read_import_dir, patch_assignment, patch_binop,
15352 patch_array_ref): Likewise.
15354 * typeck.c (build_java_array_type): Likewise.
15356 * verify.c (verify_jvm_instructions): Likewise.
15358 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15360 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
15362 1999-10-07 Anthony Green <green@cygnus.com>
15364 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15365 where CHECK_PUT may fail for valid reasons.
15367 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
15368 UNSAFE_PUTN): New macros.
15370 1999-10-04 Tom Tromey <tromey@cygnus.com>
15372 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15373 well. Fixes Java PR gcj/59.
15374 * parse-scan.y (yyerror): Report errors.
15376 1999-09-24 Glenn Chambers <GChambers@provsol.com>
15378 * decl.c (insert_block): Remove unconditional `abort'.
15380 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
15382 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
15383 FUNCTION_CODE now of type int. All callers changed.
15384 Set the builtin's DECL_BUILT_IN_CLASS.
15386 1999-09-23 Tom Tromey <tromey@cygnus.com>
15388 * jvspec.c (lang_specific_driver): Don't read spec file if
15389 -fsyntax-only given.
15391 1999-09-22 Tom Tromey <tromey@cygnus.com>
15393 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15395 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15396 (WORDS_TO_LONG): Likewise.
15397 (WORDS_TO_DOUBLE): Likewise.
15399 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15401 * jcf-write.c (RELOCATION_VALUE_0): New macro.
15402 (RELOCATION_VALUE_1): Likewise.
15403 (emit_iinc, emit_reloc, push_constant1, push_constant2,
15404 push_in_const, push_long_const): Prototyped.
15405 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15406 (push_constant2): Likewise.
15407 (push_int_const): Cast find_constant1's integer arguments to `jword'.
15408 (find_constant_wide): Cast find_constant2's integer arguments to
15410 (find_constant_index): Cast find_constant2's and find_constant2's
15411 integer arguments to `jword'.
15412 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15413 (emit_switch_reloc): Use RELOCATION_VALUE_0.
15414 (emit_if): Use RELOCATION_VALUE_1.
15415 (emit_goto): Likewise.
15416 (emit_jsr): Likewise.
15417 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
15418 argument to push_long_const to HOST_WIDE_INT.
15420 1999-09-15 Andreas Schwab <schwab@suse.de>
15422 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15424 1999-09-20 Nick Clifton <nickc@cygnus.com>
15426 * lang.c (lang_decode_option): Extend comment.
15428 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15430 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
15433 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15435 * gjavah.c (get_field_name, print_method_info, print_include,
15436 add_namelet): Use xmalloc, not malloc.
15438 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
15439 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15442 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15444 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
15446 * jcf-path.c (add_entry): Likewise.
15448 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15450 * jv-scan.c (xmalloc): Remove definition.
15452 * jvgenmain.c (xmalloc): Likewise.
15454 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15456 * lex.c (java_store_unicode): Use xrealloc, not realloc.
15458 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
15459 concat, not xmalloc/sprintf.
15460 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15461 (xstrdup): Remove definition.
15463 * parse.y (duplicate_declaration_error_p,
15464 constructor_circularity_msg, verify_constructor_circularity,
15465 check_abstract_method_definitions, java_check_regular_methods,
15466 java_check_abstract_methods, patch_method_invocation,
15467 check_for_static_method_reference, patch_assignment, patch_binop,
15468 patch_cast, array_constructor_check_entry, patch_return,
15469 patch_conditional_expr): Use xstrdup, not strdup.
15471 * zextract.c (ALLOC): Use xmalloc, not malloc.
15473 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15475 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15477 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
15478 (do_spec, lang_specific_pre_link, lang_specific_driver,
15479 input_filename, input_filename_length): Don't declare.
15480 (main_class_name, jvgenmain_spec, lang_specific_driver):
15482 (lang_specific_driver): All calls to the function pointer
15483 parameter now explicitly call `fatal'.
15485 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15487 * parse.y (find_applicable_accessible_methods_list): Search
15488 abstract classes as interfaces.
15490 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15492 * class.c (finish_class): We're now outside a valid method
15493 declaration. Tell the rest of gcc so.
15495 1999-09-08 Bruce Korb autogen@linuxbox.com
15497 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
15499 1999-09-07 Tom Tromey <tromey@cygnus.com>
15501 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
15503 (decode_signature_piece): Don't emit "::" in JArray<>.
15504 (print_namelet): Only print trailing `;' when printing a class.
15506 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
15508 * java-tree.h: Delete declarations for all tree nodes now moved to
15510 * decl.c: Delete their definitions.
15512 1999-09-04 Mark Mitchell <mark@codesourcery.com>
15514 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
15515 * Makefile.in (OBJS): Add ggc-callbacks.o.
15516 (OBJDEPS): Likewise.
15518 1999-09-03 Tom Tromey <tromey@cygnus.com>
15520 * parse.y (strip_out_static_field_access_decl): Return operand if
15521 it satisfies JDECL_P.
15523 1999-09-02 Tom Tromey <tromey@cygnus.com>
15525 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
15526 Handle nested arrays, like `[[I'.
15528 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15530 * class.c (finish_class): Remove unused parameter, all callers
15533 * expr.c (build_java_athrow): Change return type to void.
15534 (java_lang_expand_expr): Make sure each case in switch returns a
15537 * java-tree.h (finish_class): Fix prototype to take void args.
15539 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
15540 (main): Issue return from main, not exit.
15542 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
15544 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
15546 * jv-scan.c (main): Issue return from main, not exit.
15548 * parse.y (check_abstract_method_definitions,
15549 java_check_abstract_method_definitions): Add static prototypes.
15550 (java_complete_expand_methods): Fix call to `finish_class'.
15552 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
15555 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15557 * lang.c (language_string): Constify.
15559 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15561 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
15562 Remove hacks for stuff which comes from libiberty.
15564 * Make-lang.in: Likewise.
15566 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
15568 * Makefile.in (xref.o): Depend on xref.c explicitly.
15570 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15572 * java-tree.h (lang_printable_name): Constify a char*.
15574 * lang.c (lang_printable_name): Likewise.
15576 1999-08-27 Jeffrey A Law (law@cygnus.com)
15578 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
15579 comments in C code.
15581 1999-08-26 Tom Tromey <tromey@cygnus.com>
15583 * gjavah.c (print_cxx_classname): Print "::" before qualified
15586 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
15588 * parse.y (lookup_cl): Changed leading comment. Now does its best
15589 to set the column number.
15590 (qualify_ambiguous_name): Take WFL wrappers into account.
15592 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
15594 * verify.c (verify_jvm_instructions): Don't check instruction
15595 validity beyond end of method.
15597 1999-08-25 Tom Tromey <tromey@cygnus.com>
15599 * jvspec.c (lang_specific_driver): Correctly handle --help again.
15601 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15603 * gjavah.c (print_name, print_base_classname, utf8_cmp,
15604 cxx_keyword_subst, generate_access, name_is_method_p,
15605 get_field_name, print_field_name, super_class_name, print_include,
15606 decode_signature_piece, print_class_decls, usage, help,
15607 java_no_argument, version, add_namelet, print_namelet): Add static
15609 (print_base_classname, utf8_cmp, cxx_keyword_subst,
15610 name_is_method_p): Constify a char*.
15611 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
15612 Provide a final else clause in an if-else-if.
15613 (print_field_info): Add missing final arg in function call to
15614 `print_field_name'.
15615 (print_method_info, decompile_method, decode_signature_piece,
15616 print_c_decl, print_full_cxx_name, print_stub,
15617 print_mangled_classname, super_class_name, print_include,
15618 add_namelet, add_class_decl, print_class_decls, process_file,
15619 help): Constify a char*.
15621 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
15622 push_int_const, find_constant_wide, find_constant_index,
15623 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
15624 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
15625 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
15626 emit_if, emit_goto, emit_jsr, call_cleanups,
15627 make_class_file_name): Add static prototypes.
15628 (generate_bytecode_return, generate_bytecode_insns): Pass a
15629 NULL_PTR, not a NULL_TREE.
15631 * jv-scan.c: Include "jcf.h".
15632 (main): Declare using DEFUN macro.
15634 * jvspec.c (find_spec_file, lang_specific_pre_link,
15635 lang_specific_driver): Add prototypes.
15636 (find_spec_file): Constify a char*.
15638 * keyword.gperf (hash, java_keyword): Add prototypes.
15640 * lang.c (lang_print_error): Add static prototype.
15641 (lang_init): Prefer memcpy over bcopy to avoid casts.
15643 * lex.c (yylex): Add static prototype.
15645 * parse-scan.y: Include "lex.c" earlier.
15647 * parse.h: Remove redundant declaration for `yylex'.
15649 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
15650 labeled_block_contains_loop_p): Add static prototypes.
15651 (not_accessible_p): Make static to match prototype.
15653 * verify.c (start_pc_cmp): Don't needlessly cast away const.
15655 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15657 * parse.y (check_method_redefinition): Changed leading comment.
15658 (check_abstract_method_definitions): New function.
15659 (java_check_abstract_method_definitions): New function.
15660 (java_check_regular_methods): Call it.
15661 (verify_constructor_super): Fixed indentation.
15662 (lookup_method_invoke): Likewise.
15664 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15666 * parse.y (method_header): Return a null pointer if the current
15667 class node is null.
15668 (finish_method_declaration): Return if the current function decl
15670 (source_start_java_method): Likewise.
15671 (java_method_add_stmt): Likewise.
15673 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15675 * class.c (emit_register_class): Removed unnecessary call to
15677 * parse.y (labeled_block_contains_loop_p): Removed unused local
15680 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15682 * parse.y (java_refold): Added prototype.
15684 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15686 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
15687 (java_stabilize_reference): Removed unnecessary `else'.
15688 (java_complete_lhs): Set flag to remember boolean. Call
15689 java_refold. Added comments.
15690 (java_decl_equiv): New function.
15691 (binop_compound_p): Likewise.
15692 (java_refold): Likewise.
15693 (patch_unaryop): Striped static field access assigned to decl and
15694 op. Changed promotion scheme for ++/-- operators.
15695 (search_loop): New function.
15696 (labeled_block_contains_loop_p): Likewise.
15697 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
15699 (patch_bc_statement): Call search_loop. Fixed comment.
15701 1999-08-14 Anthony Green <green@cygnus.com>
15703 * expr.c (java_lang_expand_expr): Mark static array data as
15706 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
15708 * jvgenmain.c (main): NUL-terminate name_obstack.
15710 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15712 * check-init.c (check_bool2_init, done_alternative): Add static
15715 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
15716 (add_method, build_utf8_ref, build_class_ref,
15717 append_gpp_mangled_type, layout_class_method): Constify a char*.
15719 * decl.c (push_promoted_type, make_binding_level): Add static
15721 (push_promoted_type, pushdecl): Constify a char*.
15723 * except.c (find_handler_in_range, link_handler,
15724 check_start_handlers): Add static prototypes.
15726 * expr.c (process_jvm_instruction): Constify a char*.
15728 * gjavah.c (main): Constify a char*.
15730 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
15733 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
15735 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
15736 munge, print_ents): Constify a char*.
15738 * jcf-dump.c (disassemble_method): Constify a char*.
15739 (print_constant_pool, print_exception_table): Add static prototypes.
15740 (print_constant, print_exception_table, main, disassemble_method):
15743 * jcf-io.c (find_classfile, find_class): Likewise.
15745 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
15746 (set_source_filename, predefined_filename_p): Add static prototypes.
15747 (set_source_filename, get_constant, get_class_constant,
15748 find_in_current_zip): Constify a char*.
15750 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
15752 (add_entry, add_path, jcf_path_classpath_arg,
15753 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15755 * jcf-reader.c (get_attribute, jcf_parse_preamble,
15756 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
15757 jcf_parse_one_method, jcf_parse_methods,
15758 jcf_parse_final_attributes): Add static prototypes.
15759 (get_attribute): Constify a char*.
15761 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
15762 jcf_dependency_add_target, jcf_path_classpath_arg,
15763 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15765 * jv-scan.c (main): Constify a char*.
15766 (gcc_obstack_init): Add prototype arguments.
15768 * jvgenmain.c (gcc_obstack_init): Likewise.
15769 (main): Constify a char*.
15771 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
15773 (put_decl_string, lang_print_error): Constify a char*.
15774 (lang_init): Remove redundant extern prototype.
15776 * mangle.c (emit_unicode_mangled_name): Constify a char*.
15778 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
15779 Add static prototypes.
15780 (get_type_from_signature): Constify a char*.
15782 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
15783 Add static prototypes.
15784 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
15785 (verify_jvm_instructions): Constify a char*.
15787 * xref.c (xref_flag_value): Likewise.
15789 * xref.h (xref_flag_value): Likewise.
15791 * zextract.c (makeword, makelong): Add static prototypes.
15792 (makeword, makelong): Constify a uch*.
15794 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15796 * lang.c (java_dummy_print): Constify a char*.
15797 (lang_print_error): Likewise.
15798 (lang_init): Remove redundant prototype for `print_error_function'.
15799 (lang_init_source): Likewise.
15800 (lang_identify): Constify a char*.
15802 1999-08-09 Tom Tromey <tromey@cygnus.com>
15804 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
15805 (WORDS_TO_LONG): Likewise.
15806 (WORDS_TO_DOUBLE): Likewise.
15808 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15810 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
15812 * expr.c (java_stack_pop, java_array_data_offset,
15813 build_java_throw_out_of_bounds_exception, case_identity,
15814 build_java_check_indexed_type): Add static prototypes.
15815 (linenumber_table, expand_invoke, expand_java_field_op,
15816 build_primtype_type_ref, expand_byte_code): Constify a char*.
15818 * java-tree.h (build_primtype_type_ref, linenumber_table):
15820 (java_lang_expand_expr): Add prototype.
15822 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
15823 `java_lang_expand_expr'.
15825 * lex.c (java_lex_error): Constify a char*.
15826 (java_get_unicode, java_read_char, java_allocate_new_line,
15827 java_unget_unicode, java_sneak_unicode): Prototype.
15829 * parse-scan.y (current_class, package_name, method_declarator,
15830 report_class_declaration, yyerror): Constify a char*.
15832 * parse.h (java_report_errors): Prototype.
15833 (yyerror): Constify a char*.
15835 * parse.y (classitf_redefinition_error, check_modifiers,
15836 parse_jdk1_1_error, lookup_package_type,
15837 lookup_package_type_and_set_next, get_printable_method_name,
15838 purify_type_name): Constify a char*.
15839 (build_super_invocation, maybe_generate_finit,
15840 verify_constructor_super, parser_add_interface,
15841 add_superinterfaces, jdep_resolve_class, note_possible_classname,
15842 java_complete_expand_methods, java_expand_finals,
15843 cut_identifier_in_qualified, java_stabilize_reference,
15844 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
15845 merge_string_cste): Prototype.
15846 (single_type_import_declaration, yyerror,
15847 variable_redefinition_error, build_array_from_name,
15848 build_unresolved_array_type, check_class_interface_creation,
15849 resolve_class, complete_class_report_errors,
15850 note_possible_classname, read_import_dir,
15851 find_in_imports_on_demand, resolve_package, fix_constructors,
15852 check_deprecation, lookup_method_invoke,
15853 maybe_build_primttype_type_ref, array_constructor_check_entry):
15855 (java_complete_expand_methods, java_expand_finals): Make static.
15856 (convert_narrow): Remove static prototype.
15858 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
15860 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
15862 1999-08-02 Richard Henderson <rth@cygnus.com>
15864 * decl.c: Include defaults.h instead of expr.h.
15865 * parse.y: Likewise.
15867 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
15869 * java/decl.c (start_java_method): Change all uses of
15870 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
15871 Ensure expr.h is included.
15872 * java/expr.c (pop_arguments): Ditto.
15873 * java/parse.y (expand_start_java_method): Ditto.
15875 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15877 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
15879 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
15881 * decl.c: Include "function.h".
15882 * except.c: Likewise.
15883 * parse.y: Likewise.
15884 * Makefile.in: Update dependencies.
15886 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15888 * expr.c (build_java_soft_divmod): Provide a default case in switch.
15889 (java_lang_expand_expr): Mark parameters `target', `tmode' and
15890 `modifier' with ATTRIBUTE_UNUSED.
15892 * gjavah.c (process_file): Add braces around ambiguous `else'.
15894 * jcf-dump.c (print_access_flags, localvar_free): Change return
15897 * parse.y (java_complete_expand_method): Initialize variable
15899 (resolve_qualified_expression_name): Likewise for `field_decl'.
15900 (patch_method_invocation): Likewise for `class_to_search'.
15901 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
15902 (patch_assignment): Likewise for `lhs_type'.
15904 * verify.c (verify_jvm_instructions): Remove unused variable
15907 1999-07-25 Richard Henderson <rth@cygnus.com>
15909 * decl.c (va_list_type_node): New.
15911 1999-07-25 Anthony Green <green@cygnus.com>
15913 * gjavah.c (print_stub): New function.
15914 (METHOD_IS_NATIVE): New macro.
15915 (print_mangled_classname): Make static.
15916 (HANDLE_END_FIELD): Don't emit fields during stub generation.
15917 (process_file): Perform stub generation.
15918 (HANDLE_METHOD): Don't emit class decls during stub
15920 (HANDLE_END_METHOD): Take into account stub generation.
15921 (print_method_info): Handle stub generation.
15922 (print_stub): New function.
15923 (print_cxx_classname): Make signature consistant with others.
15924 (help): Describe -stubs option.
15925 (main): Create stub file.
15926 (version): Use version.c.
15927 (print_full_cxx_name): New function.
15928 (print_c_decl): Use print_full_cxx_name.
15930 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15932 * check-init.c (check_init): Handle MAX_EXPR.
15934 1999-07-15 Andrew Haley <aph@cygnus.com>
15936 * lang.c (flag_use_divide_subroutine): New variable.
15937 * typeck.c: (convert_ieee_real_to_integer): Bounds check
15938 fp-to-integer conversion.
15939 (convert): Call convert_ieee_real_to_integer when flag_fast_math
15942 * expr.c (build_java_soft_divmod): New function.
15943 (build_java_binop): Call build_java_soft_divmod if
15944 flag_use_divide_subroutine is set.
15945 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15946 soft_lrem_node: new builtin functions.
15947 (init_decl_processing) Initialize the new builtins.
15948 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15949 soft_lrem_node: new builtin functions.
15950 (build_java_soft_divmod): New function.
15951 * parse.y: Call build_java_soft_divmod if
15952 flag_use_divide_subroutine is set.
15953 * parse.c: Rebuilt.
15955 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
15956 a --specs= arg) even if not linking.
15957 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
15958 -fuse-divide-subroutine
15960 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15962 * parse.y (resolve_and_layout): Check methods only once.
15963 (resolve_qualified_expression_name): Verify thrown exceptions
15965 (check_thrown_exceptions): Reject exceptions thrown in
15966 initializer. Error message tuned.
15968 1999-07-14 Andrew Haley <aph@cygnus.com>
15970 * expr.c (expand_expr): Do not return the last statement in a
15971 block as the block's value.
15973 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
15975 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
15976 CALL_EXPR, to avoid order of evaluation changes.
15978 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15980 * parse.y (qualify_ambiguous_name): Do not use
15981 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
15983 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15985 * check-init.c (check_init): Handle MAX_EXPR.
15986 * expr.c (force_evaluation_order): Force method call arguments to
15987 be evaluated in left-to-right order.
15988 * parse.y (qualify_ambiguous_name): Loop again to qualify
15989 NEW_ARRAY_EXPR properly.
15991 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15993 * parse.y (patch_invoke): Resolve unresolved invoked method
15995 (qualify_ambiguous_name): STRING_CST to qualify expression for
15996 type name resolution.
15998 1999-06-24 Andrew Haley <aph@cygnus.com>
16000 * class.c (finish_class): Whenever a deferred method is
16001 output, rescan the list of methods to see if a new candidate for
16002 output can be found.
16004 1999-06-28 Tom Tromey <tromey@cygnus.com>
16006 * jvspec.c (lang_specific_driver): Recognize --help.
16008 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16010 * parse.y (resolve_package): Fixed bogus return statement.
16011 (patch_method_invocation): Resolve method invocation beginning with
16012 a package name qualifier.
16014 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16016 * Make-lang.in (java.stage1): Depend on stage1-start.
16017 (java.stage2): Likewise for stage2-start.
16018 (java.stage3): Likewise for stage3-start.
16019 (java.stage4): Likewise for stage4-start.
16021 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16023 * parse.y (java_complete_lhs): When doing cross referencing, don't
16024 try to keep file location on a WFL expanded as a CALL_EXPR.
16026 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16028 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16029 compiling to class file a void method with an empty method body.
16030 As a side effect, the bytecode backend will generate the
16031 appropriate `return' instruction.
16033 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16035 * parse.y (lookup_package_type_and_set_next): New function prototype.
16036 (resolve_package): Search current and imported packages.
16037 (lookup_package_type_and_set_next): New function.
16039 1999-06-22 Andrew Haley <aph@cygnus.com>
16041 * verify.c (verify_jvm_instructions): Check for pending blocks
16042 before invalid PC test and opcode switch, not after.
16044 1999-06-21 Andrew Haley <aph@cygnus.com>
16046 * except.c (find_handler_in_range): The upper limit for exception
16047 ranges is exclusive, not inclusive: (start <= pc < end).
16048 (link_handler): find child pointer which points to outer by
16049 searching sibling list: previous code incorrectly assumed that
16050 outer->outer->first_child must point to outer.
16051 * verify.c (verify_jvm_instructions): FIXME added to code for
16053 (verify_jvm_instructions): Do not assume that the last block
16054 processed in a subroutine is a block which ends with a `ret'
16055 instruction. With some control flows it is possible that the last
16056 block ends with an `athrow'.
16058 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16060 * parse.y (qualify_ambiguous_name): Reorganized the post
16061 evaluation of non WFL leading expression nodes.
16063 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16065 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16068 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16070 * parse.y (qualify_ambiguous_name): Handle qualified expression
16071 beginning with a STRING_CST.
16073 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16075 * parse.y (register_fields): Set DECL_INITIAL on both
16076 pre-initialized static and public fields.
16077 (resolve_field_access): Static field access expressions to always
16079 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16080 qualification. CONVERT_EXPR to be resolved as an expression name.
16081 (java_complete_lhs): Identify and access qualified final
16082 initialized field in switch statement case expression.
16083 (fold_constant_for_init): Pre-initialized field decl constant to
16086 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16088 * parse.y (note_possible_classname): Mark returned node with
16089 QUALIFIED_P only if the original class name contained a '/'.
16091 1999-06-05 Anthony Green <green@cygnus.com>
16093 * Make-lang.in (gcjh): More parallel build fixes.
16095 1999-06-03 Mike Stump <mrs@wrs.com>
16097 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16099 1999-06-02 Anthony Green <green@cygnus.com>
16101 * except.c (link_handler): Chain exception handlers in order.
16103 1999-06-02 Anthony Green <green@cygnus.com>
16105 * expr.c (expand_byte_code): Fill unreachable bytecode regions
16106 with nops and process as usual in order to always set correct EH
16107 ranges. Emit detailed warnings about unreachable bytecodes.
16109 1999-06-02 Anthony Green <green@cygnus.com>
16111 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16114 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16116 * parse.y (lookup_field_wrapper): Unified returned value to NULL
16117 or the searched field decl.
16119 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16121 * parse.y (fold_constant_for_init): Convert numerical constant
16122 values to the type of the assigned field.
16124 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16126 * expr.c (lookup_field): Relaxed the test on class loading error
16128 * parse.y (fold_constant_for_init): Enabeled old code.
16130 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16132 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16133 decide the validity of the cast of a java.lang.Cloneable reference
16135 (patch_conditional_expr): Fixed first argument passed to
16136 binary_numeric_promotion.
16138 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16140 * parse.y (qualify_ambiguous_name): Take into account that a
16141 CONVERT_EXPR might specify a type as a WFL.
16143 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16145 * parse.y (patch_assignment): Save the rhs before using it as an
16146 argument to _Jv_CheckArrayStore.
16148 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16150 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16152 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16154 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16155 floating point literal only when the exponent indicator has been
16158 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16160 * parse.y (formal_parameter:): Construct argument tree list
16161 element even if a yet unsupported final parameter was encountered.
16163 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16165 * parse.y (finish_method_declaration): Issue errors for native or
16166 abstract methods declared with a method body, as well as for non
16167 native or non abstract methods with no method body.
16169 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16171 * class.c (build_utf8_ref): Initialize variable `field'.
16173 * decl.c (init_decl_processing): Initialize variable `field'.
16175 * expr.c (build_known_method_ref): Mark parameters `method_type',
16176 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16177 (process_jvm_instruction): Likewise for parameter `length'.
16179 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16180 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16183 * parse.y (maybe_generate_clinit): Remove unused variable
16184 `has_non_primitive_fields'.
16185 (find_in_imports_on_demand): Initialize variables `node_to_use'
16187 (patch_binop): Likewise for variable `prom_type'.
16188 (patch_unaryop): Likewise for variable `prom_type'.
16190 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16192 * xref.c (xref_table): Add missing initializer.
16194 1999-05-14 Tom Tromey <tromey@cygnus.com>
16196 * java-except.h (struct eh_range): Removed unused `next' member.
16197 * verify.c (verify_jvm_instructions): Call check_nested_ranges
16198 after adding all exception handlers. Sort exception ranges in
16200 (struct pc_index): New structure.
16201 (start_pc_cmp): New function.
16202 * except.c (add_handler): Return `void'. Don't call link_handler;
16203 instead construct an ordinary linked list and do range
16205 (check_nested_ranges): New function.
16206 (link_handler): Changed interface to allow merging of eh_ranges.
16207 Split overlapping ranges. Return `void'.
16209 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16211 * parse.y (constructor_block_end:): New rule, tagged <node>.
16212 (constructor_body:): Use `constructor_block_end' instead of
16215 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16217 * parse.y (statement_nsi:): Pop `for' statement block.
16218 (java_complete_lhs): Labeled blocks containing no statement are
16219 marked as completing normally.
16221 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16223 * xref.c (xref_set_current_fp): New function, defined.
16224 * xref.h (xref_set_current_fp): New function, prototyped.
16226 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16228 * check-init.c (check_init): Take into account that
16229 LABELED_BLOCK_STMT can be empty.
16231 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16233 * parse.y (java_check_regular_methods): Warning check on not
16234 overriding methods with default access in other packages does not
16235 apply to `<clinit>'.
16236 (java_complete_lhs): If block body is an empty_stmt_node, replace
16237 it by NULL_TREE. This prevents gcc from generating an irrelevant
16240 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16242 * check-init.c (check_init): Removed code accepting to see things
16243 falling through default:, when doing xrefs.
16244 * java-tree.h (do_not_fold): New global variable, declared.
16245 * parse.y (do_not_fold): New global variable, defined.
16246 (java_complete_expand_method): Set `do_not_fold' to the value of
16247 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16248 and reinstall them after them have been purged; do not check for
16249 initializations; do not issue missing return errors.
16250 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16252 (patch_binop): Skip the fold part when doing xrefs.
16253 (build_string_concatenation): Skip the concatenation part when
16255 (patch_synchronized_statement): Do not generate a try-finally when
16257 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16258 and keep the location where the throw was seen.
16259 * typeck.c (convert): When `do_not_fold' is set, do not attempt
16260 any treatment on the converted node an simply return a NOP_EXPR of
16262 * xref.c (xref_get_data): New function, defined.
16263 * xref.h (xref_get_data): New function, declared.
16264 (XREF_GET_DATA): Use xref_get_data.
16266 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16268 * gjavah.c (print_include): Cast the result of `strlen' to int
16269 when comparing against a signed value.
16270 (add_namelet): Likewise.
16272 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16274 * expr.c (expand_invoke): Mark parameter `nargs' with
16276 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16278 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16281 * jcf-reader.c (get_attribute): Cast a value to long
16282 when comparing against a signed expression. Likewise.
16284 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16285 HOST_BITS_PER_CHAR.
16287 1999-05-11 Andrew Haley <aph@cygnus.com>
16289 * parse.y (source_end_java_method): If the current method contains
16290 any exception handlers, force asynchronous_exceptions: this is
16291 necessary because signal handlers in libjava may throw exceptions.
16292 * decl.c (end_java_method): Ditto.
16294 1999-05-11 Tom Tromey <tromey@cygnus.com>
16296 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16298 * jvspec.c (THREAD_NAME): Removed.
16299 (GC_NAME): Likewise.
16300 (MATHLIB): Likewise.
16301 (WITHLIBC): Likewise.
16303 (THREADLIB): Likewise.
16304 (MATH_LIBRARY): Likewise.
16305 (lang_specific_driver): Don't add `-l' options to command line.
16306 Instead, add a single --specs option. Recognize `-L' options and
16307 use them to search for spec file.
16308 (find_spec_file): New function.
16309 (SPEC_FILE): New define.
16311 1999-05-11 Dave Brolley <brolley@cygnus.com>
16313 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16314 cpplib-enabled build.
16316 1999-05-05 Per Bothner <bothner@cygnus.com>
16318 * class.c (make_field_value): DECL_INITIAL may be a string literal;
16319 temporarily zero it while calling rest_of_decl_compilation.
16321 * java-tree.h (string_ptr_type_node): Add declaration.
16322 * decl.c: Define and initialize string_ptr_type_node.
16323 * parse.y (patch_string_cst): Use string_ptr_type_node.
16325 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
16326 * parse.y (for_statement): Now unconditionally exit_block.
16327 (finish_labeled_statement): No longer exit_block if for-loop.
16328 (patch_loop_statement): Check harder if the loop is already labeled.
16330 * parse.y (patch_initialized_static_field): Removed function.
16331 (maybe_generate_clinit): Removed special handling for interfaces.
16332 (java_complete_expand_methods): Do a preliminary java_complete_tree
16333 on <clinit> to determine if it can be removed.
16334 (java_complete_expand_method): Remove special handling for <clinit>.
16335 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
16336 optimize if we get back empty_stmt_node.
16337 For MODIFY_EXPR, re-do checking of static initializers.
16338 (fold_constant_for_init): Don't return immediate if VAR_DECL.
16339 For VAR_DECL, pass correct context.
16341 * verify.c (verify_jvm_instructions): Better error messages.
16343 1999-05-03 Tom Tromey <tromey@cygnus.com>
16345 * parse-scan.y (interface_declaration): Call
16346 report_class_declaration for interfaces.
16348 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
16350 * Makefile.in: Remove -v from bison command lines.
16352 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16354 * check-init.c (check_init): Exclude a case of error when doing
16356 * class.c (layout_class_method): Don't generate the error message
16357 twice when compiling from source.
16358 * lang-options.h: Added `-Wredundant-modifers' and
16359 `-Wunusupported-jdk11' flags and help text.
16360 * lang.c (lang_decode_option): Added support for
16361 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
16362 flag_static_local_jdk11 and flag_redundant set accordingly.
16363 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16364 * parse.h (EXPR_WFL_ADD_COL): New macro.
16365 (DECL_END_SOURCE_LINE): Likewise.
16366 (DECL_INHERITED_SOURCE_LINE): Likewise.
16367 * parse.y (static_ref_err): New function, prototyped.
16368 (CCB_TK): Now tagged <operator>.
16369 (class_body:): Remember the location of the closing '}' of a class
16370 definition when doing xrefs.
16371 (block:): Likewise.
16372 (block_end:): Likewise.
16373 (create_class): Remember the location of the inherited class
16374 identifier when doing xrefs.
16375 (register_fields): Added test on first operand of `init' before
16376 testing it TREE_CODE.
16377 (method_header): Store the location of the class identifier in the
16378 class decl when doing xrefs.
16379 (finish_method_declaration): Don't combine first/last method line
16381 (java_check_regular_methods): Warning check on not overriding
16382 methods with default access on other packages move before check on
16383 static methods. Initialization of `aflags' also moved up.
16384 (resolve_expression_name): Call static_ref_err to report the error.
16385 (static_ref_err): New function, implemented.
16386 (resolve_field_access): Returned simplified static field access
16388 (resolve_qualified_expression_name): Check for illegal use of
16389 static fields in a non static context. Call static_ref_err to
16390 report error in various places.
16391 (java_complete_tree): Do not fold initialized static fields when
16393 (java_complete_lhs): Likewise.
16395 1999-04-29 Anthony Green <green@cygnus.com>
16397 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16398 create internal labels.
16399 (lookup_label): Ditto.
16401 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16403 * class.c (layout_class_method): Generate <clinit>'s rtl for
16405 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
16406 for interfaces' <clinit>.
16407 * expr.c (lookup_field): Search for fields in interfaces.
16408 (expand_invoke): Fixed indentation.
16409 (expand_java_field_op): Likewise. Use IS_CLINIT.
16410 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16411 (IS_CLINIT): New macro.
16412 * parse.y (type_declaration:): Call maybe_generate_clinit after an
16413 interface was parsed.
16414 (maybe_generate_clinit): Don't generate if the current class is an
16415 interface with only fields of primitive types.
16416 (reset_method_name): Use IS_CLINIT.
16417 (java_complete_expand_method): Expand <clinit> when it exists for
16418 interfaces. Use IS_CLINIT.
16419 (resolve_expression_name): Use DECL_CONTEXT instead of
16420 current_class to build static field references.
16421 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
16422 ARRAY_REF when doing xreferencing.
16423 (check_final_assignment): Fixed typo in leading comment. Use
16425 (patch_array_ref): Don't fully expand array references when
16427 (patch_return): Use IS_CLINIT.
16428 (patch_throw_statement): Likewise.
16430 1999-04-22 Tom Tromey <tromey@cygnus.com>
16432 * Make-lang.in (JAVA_SRCS): Added check-init.c.
16434 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
16436 * decl.c (predef_filenames, predef_filenames_size): New globals
16437 (init_decl_processing): predef_filenames and predef_filenames_size
16439 * java-tree.h (predef_filenames, predef_filenames_size): Declared
16441 * jcf-parse.c (predefined_filename_p): New function.
16442 (yyparse): Check that files on the command line are specified only
16443 once and issue a warning otherwise.
16444 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16445 * parse.y (source_end_java_method): Nullify NOP method bodies, to
16446 avoid a gcc warning with -W -Wall turned on.
16447 (java_expand_classes): Abort if errors were encountered.
16448 (java_complete_lhs): If the cross reference flag is set, wrap
16449 field DECL node around a WFL when resolving expression name.
16451 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16453 * lang.c (lang_decode_option): Fixed returned value when parsing
16454 `-fxref=...' and `-Wall'.
16455 * parse.y (source_end_java_method): Do not generate code when
16456 flag_emit_xref is set.
16457 (resolve_expression_name): Do not build static field access when
16458 flag_emit_xref is set.
16459 (resolve_field_access): No special treatment on `length' when
16460 flag_emit_xref is set. Do not build qualified static field access
16461 when flag_emit_xref is set.
16462 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
16463 when flag_emit_xref is set.
16464 (patch_assignment): Do not generate array store runtime check when
16465 flag_emit_xref is set.
16466 * xref.c (xref_flag_value): Fixed function declaration
16468 (xset_set_data): New function.
16469 * xref.h (xref_set_data): Added prototype for new function.
16470 (typedef struct xref_flag_table): New field data.
16471 (XREF_GET_DATA): New macro.
16473 1999-04-19 Tom Tromey <tromey@cygnus.com>
16475 * xref.h (enum): Removed trailing comma.
16477 * parse.y (resolve_qualified_expression_name): Added missing
16480 1999-04-15 Anthony Green <green@cygnus.com>
16482 * gjavah.c: New prototypes for java_float_finite and
16483 java_double_finite.
16485 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16487 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
16490 1999-04-06 Jeffrey A Law (law@cygnus.com)
16492 * Makefile.in (TREE_H): Add tree-check.h.
16493 (RTL_H): Add genrtl.h.
16495 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
16497 * parse.y (patch_assignment): Added ArrayStoreException runtime
16500 1999-04-06 Per Bothner <bothner@cygnus.com>
16502 * expr.c (pop_type_0): New function.
16503 (pop_type): Use pop_type_0.
16504 * java-tree.h (pop_type_0): New declaration.
16505 * verify.c (verify_jvm_instructions): Check return instructions.
16507 * parse.y (patch_binop): Don't fold if non-constant and emiting
16510 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16512 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
16514 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
16515 (main_jcf): Don't define.
16516 (process_file): Don't set `main_jcf'.
16518 * java-tree.h (main_jcf): Don't declare.
16520 * jcf-parse.c (main_jcf): Add static definition.
16522 * lang.c (main_jcf): Don't define.
16524 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16526 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
16528 * decl.c (copy_lang_decl): Likewise for `bcopy'.
16530 * jcf-depend.c: Include "config.h", not <config.h>.
16532 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
16535 * jcf-path.c: Include "config.h", not <config.h>.
16537 * lex.c: Don't include various system header files.
16538 (java_init_lex): Cast the argument of `bzero' to PTR
16540 * parse-scan.y (java_push_parser_context): Likewise.
16542 * parse.y (java_push_parser_context): Likewise.
16543 (patch_bc_statement): Match format specifier to variable argument.
16545 * xref.c: Don't include <stdio.h>.
16547 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
16549 * parse.y (struct parser_ctxt *ctxp): Now global.
16550 (declare_local_variables): Use WFL compound value for the
16551 declaration source line value, when doing cross-referencing.
16553 1999-03-31 Tom Tromey <tromey@cygnus.com>
16555 * gjavah.c (print_field_info): Allow constants of other types.
16556 (print_include): Generate include when new name is proper prefix
16557 of already printed name.
16558 (add_namelet): Likewise.
16559 (cxx_keyword_subst): New function.
16560 (print_method_info): Use it.
16561 (print_field_name): New function.
16562 (get_field_name): New function.
16563 (print_field_info): Use get_field_name and print_field_name.
16565 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16567 * Makefile.in (keyword.h): Generate using gperf language 'C', not
16568 'KR-C', so gperf uses the `const' keyword on strings.
16570 * keyword.gperf (java_keyword): Const-ify a char*.
16572 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16574 * parse.y (patch_bc_statement): Fixed identation and a bogus
16577 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16579 * parse.y (patch_assignment): Allow static variables in other
16580 classes to be assigned.
16582 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16584 * class.c (maybe_add_interface): Remove unused variable
16586 (make_class_data): Use = for assignment, not ==. Likewise.
16587 (emit_register_classes): Remove unused variable `decl'.
16589 * lex.c: Fix comment so as not to contain an embedded `/*'.
16591 * verify.c (verify_jvm_instructions): Remove unused variable
16594 1999-03-27 Per Bothner <bothner@cygnus.com>
16596 * parse.y (complete_loop_body): Rename to finish_loop_body.
16597 (complete_labeled_statement): Rename to finish_labeled_statement.
16598 (complete_for_loop): Rename to finish_for_loop.
16599 (complete_method_declaration): Rename to finish_method_declaration.
16601 * java-tree.h (continue_identifier_node): New global node.
16602 * decl.c: Define and initialize continue_identifier_node.
16603 * parse.y (generate_labeled_block): Remove - no longer needed.
16604 (build_loop_body): Use continue_identifier_node for continue block.
16605 (finish_labeled_statement): Also do pop_labeled_block actions.
16606 (java_complete_lhs): POP_LOOP even if error.
16607 (build_labeled_block): Special handling for continue_identifier_node.
16608 (patch_loop_statement): Re-organize.
16609 (patch_bc_statement): Re-write.
16611 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16613 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
16614 using a WFL compound value.
16615 * parse.y (xref.h): Include.
16616 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
16617 WFL compound value.
16618 (register_fields): Set WFL compound value to lineno if doing
16620 (java_complete_expand_method): Call expand_xref if flag_emit_xref
16622 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
16623 * xref.h (expand_xref): Prototype renamed from xref_generate.
16625 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16627 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
16628 (GET_CURRENT_BLOCK): New macro.
16629 * parse.y (current_static_block): New global variable.
16630 (method_body:): Define action.
16631 (complete_method_declaration): Set current_function_decl to NULL
16632 when work on the current method is done.
16633 (declare_local_variables): Use GET_CURRENT_BLOCK.
16634 (java_method_add_stmt): Likewise.
16635 (java_complete_expand_method): Disable the use of `this' when
16636 expanding <clinit>.
16637 (enter_a_block): If no current method exist, use
16638 current_static_block to link static initializer blocks.
16639 (exit_block): Rewritten to use current_static_block when no current
16640 method decl exists.
16641 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
16642 (patch_return): Forbid the use of `return' in static initializers.
16643 (patch_throw_statement): Fixed indentation. Issue specific error
16644 for uncaught thrown checked exception in static initializer
16645 blocks. Removed FIXME.
16647 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
16649 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
16650 Link gcj from gcc.o.
16652 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16654 * parse.y (find_applicable_accessible_methods_list): When dealing
16655 with interface: ensure that a given interface or java.lang.Object
16656 are searched only once.
16658 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16660 * gjavah.c (print_c_decl): Remove unused argument `flags'.
16662 * jcf-dump.c (print_access_flags): Add braces around if-else.
16664 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
16667 * lex.c (build_wfl_node): Add static prototype.
16669 * lex.h (build_wfl_node): Remove static prototype.
16671 * parse.y: Include lex.c early enough to declare everything needed.
16672 Ensure calls to `build_wfl_node' pass the proper arguments.
16673 (create_class): Remove unused variable `super_decl'.
16674 (get_printable_method_name): Initialize variable `name'.
16676 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16678 * Changelog: Fixed 1999-03-22 typos.
16679 * lang.c (lang_decode_option): Fixed typo in error string in the
16682 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16684 * Makefile.in (JAVA_OBJS): Added entry xref.o.
16685 (xref.o): New rule.
16686 * java-tree.h (flag_emit_xref): Declared extern.
16687 * lang.c (xref.h): Included.
16688 (flag_emit_xref): New global variable.
16689 (lang_decode_option): Added support for -fxref.
16691 * xref.h: Likewise.
16693 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
16695 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
16698 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16700 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
16701 $(srcdir)/../system.h and $(JAVA_TREE_H).
16702 (jcf-io.o): Depend on $(JAVA_TREE_H).
16703 (mangle.o): Likewise.
16705 * check-init.c (check_cond_init): Add static prototype.
16707 * class.c (build_java_method_type, hashUtf8String,
16708 make_field_value, get_dispatch_vector, get_dispatch_table,
16709 append_gpp_mangled_type, mangle_static_field): Likewise.
16710 (strLengthUtf8): Hide unused definition.
16711 (hashUtf8String): Const-ify.
16712 (make_field_value): Un-ANSI-fy.
16714 * constants.c: Move inclusion of jcf.h above java-tree.h.
16715 (set_constant_entry, find_class_or_string_constant,
16716 find_name_and_type_constant, get_tag_node,
16717 build_constant_data_ref): Add static prototype.
16719 * decl.c (push_jvm_slot, builtin_function,
16720 lookup_name_current_level): Likewise.
16721 (builtin_function): Const-ify.
16723 * except.c (expand_start_java_handler, expand_end_java_handler):
16724 Add static prototype.
16726 * expr.c (flush_quick_stack, push_value, pop_value,
16727 java_stack_swap, java_stack_dup, build_java_athrow,
16728 build_java_jsr, build_java_ret, expand_java_multianewarray,
16729 expand_java_arraystore, expand_java_arrayload,
16730 expand_java_array_length, build_java_monitor, expand_java_pushc,
16731 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
16732 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
16733 expand_compare, expand_test, expand_cond, expand_java_goto,
16734 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
16735 expand_java_field_op, java_push_constant_from_pool): Likewise.
16737 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
16738 (build_java_arraynull_check): Mark parameters `node' and `type'
16739 with ATTRIBUTE_UNUSED.
16740 (note_label): Likewise for parameter `current_pc'.
16741 (expand_java_call, expand_java_ret): Hide unused definition.
16743 * java-tree.h (make_class, build_constants_constructor,
16744 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
16745 init_outgoing_cpool, register_class, emit_register_classes,
16746 java_layout_seen_class_methods): Prototype.
16747 (unicode_mangling_length): Const-ify.
16748 (append_gpp_mangled_name, append_gpp_mangled_classtype,
16749 emit_unicode_mangled_name, format_int, format_uint,
16750 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
16751 jcf_print_utf8_replace, open_class): Prototype.
16753 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
16754 <stdio.h>. Include tree.h/java-tree.h.
16755 (utf8_equal_string usage, process_class): Add static prototype.
16756 (open_class): Don't prototype this here.
16757 (utf8_equal_string): Match arguments to format specifiers.
16758 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
16759 TABLE_SWITCH, disassemble_method): Likewise.
16761 * jcf-io.c: Include tree.h/java-tree.h.
16762 (open_class, find_classfile, jcf_print_utf8,
16763 jcf_print_utf8_replace): Const-ify.
16765 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
16766 parse_class_file): Add static prototype.
16767 (find_in_current_zip): Match definition to existing static
16770 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
16771 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
16772 finish_jcf_block, define_jcf_label, get_jcf_label_here,
16773 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
16774 write_chunks, adjust_typed_op, generate_bytecode_conditional,
16775 generate_bytecode_return, perform_relocations, init_jcf_state,
16776 init_jcf_method, release_jcf_state, generate_classfile):
16777 Add static prototype.
16778 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
16779 (make_class_file_name): Const-ify.
16781 * jcf.h (find_classfile): Const-ify.
16783 * jv-scan.c (reset_report): Remove prototype.
16785 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
16786 (error): Rewrite to allow varargs.
16788 * lang.c (lang_f_options): Const-ify.
16790 * lex.c (java_parse_escape_sequence): Add static prototype.
16791 (java_allocate_new_line): Match definition to existing static
16794 * mangle.c Include tree.h/java-tree.h.
16795 (unicode_mangling_length, emit_unicode_mangled_name,
16796 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
16798 * parse.h (jdep_code): Remove trailing comma in enumeration.
16799 (java_get_line_col): Move prototype outside of !JC1_LITE test.
16800 (reset_report): Add prototype.
16802 * verify.c (push_pending_label, merge_types): Add static
16805 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
16807 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16809 * parse.y (find_applicable_accessible_methods_list): Extend the
16810 search to superinterfaces when relevant.
16811 (search_applicable_methods_list): New function.
16813 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16815 * class.c (unmangle_classname): Implemented stricter testing
16816 before setting the QUALIFIED_P flag on an identifier.
16818 1999-03-16 Per Bothner <bothner@cygnus.com>
16820 * parse.y (java_complete_lhs): Call force_evaluation_order
16821 after patch_newarray.
16822 (patch_binop): Don't call fold if there are side effects.
16824 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16826 * parse.y (java_stabilize_reference): Use save_expr instead of
16827 building a SAVE_EXPR node.
16828 (java_complete_lhs): Patch the resulting string of the `+='
16829 operator (if necessary) and complete the RHS after having built
16832 1999-03-15 Per Bothner <bothner@cygnus.com>
16834 * class.c (make_class): Don't set CLASS_P here (because
16835 this function is also called by build_java_array_type).
16836 (push_class): Set CLASS_P here instead.
16837 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
16839 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
16840 context. If the context is class, perfer "super" over "synchronized".
16841 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
16843 * parse.y (create_class): Don't call parser_check_super here;
16844 it is not robust. Always wait until later.
16846 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
16847 match what JDK 1.2 does), but don't set ACC_PUBLIC.
16849 1999-03-13 Per Bothner <bothner@cygnus.com>
16851 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
16852 * lex.h (UNGETC): Change misleading macro.
16854 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16856 * parse.y (java_stabilize_reference): Return NODE when patching a
16858 (java_complete_lhs): Put parenthesis around truth values.
16860 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16862 * class.c (layout_class_method): Don't make rtl for interface
16864 * parse.h (GET_TYPE_NAME): New macro.
16865 * parse.y (if_then_statement:): Fixed indentation.
16866 (if_then_else_statement:): Likewise.
16867 (for_statement:): Fixed spacing.
16868 (try_statement:): Fixed indentation.
16869 (create_interface): Don't force interfaces to be abstract.
16870 (method_header): Abstract methods are OK in interfaces.
16871 (declare_local_variables): Fixed typo in comment.
16872 (java_complete_expand_method): Fixed indentation.
16873 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
16874 non accessible fields.
16875 (java_stabilize_reference): New function.
16876 (java_complete_lhs): Fixed indentation. Use
16877 java_stabilize_reference in compound assignment. Insert the
16878 cast. If not processing `+' fix string constants before processing
16881 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16883 * constants.c (find_class_or_string_constant): Cast variable `j'
16884 to a `jword' when comparing against one.
16886 * expr.c (java_lang_expand_expr): Remove unused variables
16887 `has_finally_p' and `op0'.
16889 * gjavah.c (print_field_info): Cast a value to jint when comparing
16890 against one. Likewise for a jlong.
16891 (add_namelet): Likewise cast a `sizeof' to an int when comparing
16892 against a signed quantity.
16894 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
16895 (print_signature): Don't needlessly dereference variable `str'
16897 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
16898 `max_locals' with ATTRIBUTE_UNUSED.
16899 (jcf_parse_class): Likewise for variable `index'.
16901 * parse.h (reverse_jdep_list): Remove static prototype.
16903 * parse.y (build_jump_to_finally): Remove prototype and definition.
16904 (reverse_jdep_list): Add static prototype.
16906 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
16907 `assignment' and `expr_decl'.
16909 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
16911 1999-03-12 Andrew Haley <aph@cygnus.com>
16913 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
16914 we'll need a directory separator and a null character.
16916 1999-03-10 Per Bothner <bothner@cygnus.com>
16918 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
16920 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
16922 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
16925 1999-03-05 Per Bothner <bothner@cygnus.com>
16927 * lex.c (java_parse_end_comment): Take extra parameter (next char).
16929 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
16931 * class.c (layout_class_method): A static method in a base class
16932 is never overridden, so treat it like it doesn't exist.
16933 However, do complain about private non-static method overriding
16934 public static method.
16936 * parse.y: Don't set unused INITIALIZED_P flag.
16937 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
16939 * parse.y (find_expr_with_wfl): Optimize tail-calls.
16940 (build_array_from_name): Re-order &index[string] to &string[index].
16942 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
16943 error_mark (it might catch more errors, but it is more likely to lose).
16945 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16947 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
16948 (parse-scan.o): Depend on toplev.h.
16950 * class.c (make_method_value): Add prototype. Make it static.
16951 Remove unused second argument, caller changed.
16953 * expr.c (java_lang_expand_expr): Remove unused variable
16956 * java-tree.h: Don't prototype find_in_current_zip.
16957 Add prototypes for verify_constant_pool, start_java_method,
16958 end_java_method, give_name_to_locals, expand_byte_code,
16959 open_in_zip, set_constant_value, find_constant1, find_constant2,
16960 find_utf8_constant, find_string_constant, find_class_constant,
16961 find_fieldref_index, find_methodref_index, write_constant_pool,
16962 count_constant_pool_bytes and encode_newarray_type.
16964 * jcf-dump.c: Remove unused variable `LONG_temp'.
16966 * jcf-parse.c: Include parse.h.
16967 (jcf_parse_source): Remove unused parameter, all callers changed.
16968 (jcf_figure_file_type): Add static prototype.
16969 (find_in_current_zip): Likewise. Also remove unused parameter,
16970 all callers changed.
16971 (read_class): Initialize variable `saved_pos'.
16973 * jcf-reader.c (jcf_parse_preamble): Mark variables
16974 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
16976 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
16977 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
16978 (java_parse_doc_section): Initialize variable `seen_star'.
16979 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
16980 (java_lex_error): Mark parameters `msg' and `forward' with
16982 (java_get_line_col): Mark parameters `filename' and `line' with
16985 * parse-scan.y: Include toplev.h.
16986 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
16988 * parse.h: use `struct JCF', not plain `JCF'.
16989 (java_parser_context_save_global, java_expand_classes
16990 java_parser_context_restore_global, java_parse): Add prototypes.
16992 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
16995 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
16997 * check-init.c (check_init): COPYN takes word count, not bit count.
16999 1999-02-26 Per Bothner <bothner@cygnus.com>
17001 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
17002 explicit build_decl. (Avoids crash in reload when optimizing.)
17004 1999-02-25 Per Bothner <bothner@cygnus.com>
17006 * decl.c (complete_start_java_method): Handle synchronized method
17007 even when compiling from bytecode.
17009 1999-02-26 Tom Tromey <tromey@cygnus.com>
17011 * gjavah.c (add_class_decl): Only generate `#include' if outer
17012 class is not the name of the class we are processing. Correctly
17013 append `.h' in #include.
17014 (process_file): Clean up newlines around generated `#include's.
17015 (decode_signature_piece): Correctly handle inner classes.
17016 (struct include): New structure.
17017 (all_includes): New global.
17018 (print_include): New function.
17019 (add_class_decl): Use it.
17020 (process_file): Likewise.
17021 (add_class_decl): Generate include for java-array.h if array
17023 (process_file): Don't generate java-array.h include.
17025 * gjavah.c (add_namelet): Check for standard package names here.
17026 (add_class_decl): Don't check for standard package names here.
17028 1999-02-25 Tom Tromey <tromey@cygnus.com>
17030 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17031 When reading a zip file, only use strncmp if both strings are
17032 bigger than the buffer length. Initialize `k' when looping
17035 1999-02-24 Tom Tromey <tromey@cygnus.com>
17037 * gjavah.c (struct namelet): New structure.
17038 (add_namelet): New function.
17039 (print_namelet): New function.
17040 (print_class_decls): Use add_namelet and print_namelet to generate
17041 namespaces and not classes.
17042 (method_printed): New global.
17043 (HANDLE_END_METHOD): Examine method_printed.
17044 (print_method_info): Set method_printed when required. Print
17045 error if function to be ignored is marked virtual. Handle $finit$
17047 (METHOD_IS_FINAL): New macro.
17048 (print_field_info): Use it.
17049 (HANDLE_METHOD): Clear method_printed.
17050 (method_pass): New global.
17051 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17052 (process_file): Do two passes over both fields and methods.
17053 (HANDLE_METHOD): Examine method_pass.
17054 (root): New global.
17055 (add_class_decl): New function.
17056 (print_class_decls): Don't scan over entire constant pool.
17058 1999-02-23 Tom Tromey <tromey@cygnus.com>
17060 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17061 disable linking in that case.
17063 1999-02-20 Tom Tromey <tromey@cygnus.com>
17065 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17068 1999-02-21 Per Bothner <bothner@cygnus.com>
17070 * decl.c (build_result_decl), java-tree.h: New method.
17071 (complete_start_java_method): Handle synchronized methods.
17072 Don't build DECL_RESULT here. (Ordering dependency problem.)
17073 (start_java_method): Call build_result_decl here instead ...
17074 * parse.y (java_complete_expand_method): ... and here.
17075 (expand_start_java_method): Don't call complete_start_java_method here.
17076 (java_complete_expand_method): Call it here instead.
17077 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
17078 * java-tree.h: ... here.
17080 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
17081 * parse.y (java_complete_lhs): Don't call force_evaluation_order
17082 for ARRAY_REF - it doesn't work when array bounds are checked.
17083 (patch_array_ref): Handle it here instead.
17085 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
17087 1999-02-19 Per Bothner <bothner@cygnus.com>
17089 Force left-to-right evaluation of binary operations etc.
17090 * expr.c (force_evaluation_order), java-tree.h: New function.
17091 * parse.y (java_complete_lhs): Pass binary operations, procedure
17092 calls, and ARRAY_REFs to force_evaluation_order.
17093 (various): Set TREE_SIDE_EFFECTS more carefully.
17095 Tolerate random (non-UTF8) encoding in comments without complaining.
17096 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
17097 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
17099 * parse.y (resolve_qualified_expression_name): Handle error_mark.
17100 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
17102 * parse.y (java_complete_lhs): Ignore an empty statement in a
17103 COMPOUND_EXPR. Don't complain about empty statement after return.
17105 1999-02-19 Per Bothner <bothner@cygnus.com>
17107 * parse.y (obtain_incomplete_type): Don't wrap unknown types
17108 in TREE_LIST - just chain the POINTER_TYPEs together.
17109 (resolve_class): If type already resolved, return decl.
17110 After resolving, update TREE_TYPE(class_type), and name (if array).
17111 * parse.h (do_resolve_class), parse.y: Make non-static.
17112 * class.c (maybe_layout_super_class): Take this_class argument.
17113 Do do_resolve_class if necessary.
17114 (layout_class, layout_class_methods): Adjust calls appropriately.
17115 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17116 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
17117 * typeck.c (build_java_array_type): Don't call layout_class.
17119 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17121 * parse.y (check_pkg_class_access): Allow private class access
17122 within the same package.
17123 (strip_out_static_field_access_decl): New function.
17124 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17125 operator argument before testing its nature.
17127 1999-02-03 Per Bothner <bothner@cygnus.com>
17129 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
17130 (TRY_EXPR): Simplify - it no longer has a finally clause.
17131 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
17132 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17133 * expr.c (java_lang_expand_expr): Likewise.
17134 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
17135 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
17136 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
17137 (build_try_statement): Remove finally parameter and handling.
17138 (build_try_finally_statement): New function.
17139 (patch_try_statement): No longer need to support finally clause.
17140 (try_statement): Update grammar action rules.
17141 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
17142 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17144 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
17146 * jcf-parse.c (get_constant): Add braces around computation of 'd'
17147 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
17149 1999-02-17 Andrew Haley <aph@cygnus.com>
17151 * class.c (build_utf8_ref): Back out broken patch which was
17152 intended to to output signatures using '.' as a separator.
17154 * class.c (make_class_data): Output signatures using '.' as a
17155 separator, rather than '/'.
17156 (mangled_classname): Likewise.
17157 (make_field_value): Likewise.
17158 (make_method_value): Likewise.
17159 * constants.c (alloc_class_constant): Likewise.
17160 * expr.c (build_invokeinterface): Likewise.
17162 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17164 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17165 of an ancient workaround.
17167 1999-02-10 Jeffrey A Law (law@cygnus.com)
17169 * jvspec.c (xmalloc): Kill the prototype. It does not belong
17172 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17174 * lex.c (yylex): Encode \0 as UTF8.
17176 1999-02-10 Tom Tromey <tromey@cygnus.com>
17178 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17179 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17180 (libgcj_zip): Renamed.
17181 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17183 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17185 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17186 (GC_NAME): Renamed -lgc to -lgcjgc.
17188 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17190 * lex.c (java_lang_cloneable): Initialize.
17191 * parse.y (java_lang_cloneable): New static variable.
17192 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17193 doing one more qualification round.
17194 (valid_ref_assignconv_cast_p): Reject null source or
17195 destination. Allow an array to be cast into java.lang.Cloneable.
17196 (patch_cast): Swapped two first arguments to first call to
17197 valid_ref_assignconv_cast_p.
17199 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
17201 * parse.h: DECL_P renamed JDECL_P.
17202 * parse.y: DECL_P replaced by JDECL_P.
17203 (build_array_from_name): Always use pointer's type.
17204 (patch_bc_statement): Extra code to search continue target in a
17205 for loop. Fixed comments. Continue target is current loop when
17208 1999-02-05 Andrew Haley <aph@cygnus.com>
17210 * class.c (make_class_data): The superclass of an interface should
17211 be null, not class Object.
17213 * lex.c (java_lex): Sign extend hex literals.
17215 1999-02-04 Andrew Haley <aph@cygnus.com>
17217 * class.c (build_utf8_ref): Output signatures using '.' as a
17218 separator, rather than '/'.
17219 (make_class_data): Likewise.
17221 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
17223 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17224 mkstemp.o. Get them from libiberty now.
17226 1999-02-02 Jeffrey A Law (law@cygnus.com)
17228 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17230 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17232 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17235 1999-02-02 Per Bothner <bothner@cygnus.com>
17237 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17238 * jcf-write.c (generate_bytecode_return): New function.
17239 (generate_bytecode_insns): Use it, for RETURN_EXPR.
17241 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
17242 generate special [fd]const_[01] instructions.
17244 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
17246 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
17247 handling OPCODE_lookupswitch or OPCODE_tableswitch.
17249 1999-02-01 Per Bothner <bothner@cygnus.com>
17251 * parse.y (patch_method_invocation): Handle calling static methods,
17252 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17254 * parse.y (java_complete_lhs): Don't complain about unreachable
17255 exit condition in a do-while statement.
17257 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
17259 * lex.c (java_read_char): Fixed utf8 decoding.
17260 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17262 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17263 comments. Local variable `all_primitive' is gone. Broadened
17264 acceptance of `0' to floating point targets. `long' can now be
17265 widened to `double' or `float'.
17266 (valid_method_invocation_conversion_p): Added leading
17267 comment. Fixed tabulation.
17268 (build_string_concatenation): Optimize out left or right empty
17271 1999-01-28 Per Bothner <bothner@cygnus.com>
17273 * jcf-write.c (localvar_alloc): Only emit entry for
17274 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17275 (generate_bytecode_insns): Only call put_linenumber if
17276 debug_info_level > DINFO_LEVEL_NONE.
17277 * jvspec.c (lang_specific_driver): If no -O* or -g* option
17278 is specified, add -g1 (for compatibility wih javac).
17280 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
17282 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17283 gjavah.o, check-init.o, jv-scan.o
17285 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17287 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17289 * gjavah.c: Include config.h and system.h.
17291 * javaop.h (inline): Don't define, its handled by system.h.
17292 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17293 from `inline' to `static inline'.
17295 * jcf.h (inline): Don't define, its handled by system.h.
17297 * lex.c (inline): Likewise.
17299 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
17301 * lang-specs.h: Map -Qn to -fno-ident.
17303 1999-01-29 Richard Henderson <rth@cygnus.com>
17305 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17307 1999-01-29 Tom Tromey <tromey@cygnus.com>
17309 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17310 then cast it to Object before calling `append' method.
17312 1999-01-28 Per Bothner <bothner@cygnus.com>
17314 * check-init.c (check_bool2_init, check_bool_init, check_init):
17315 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17316 * jcf-write.c (generate_bytecode_insns): Likewise.
17318 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
17320 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17321 * parse.y (patch_cast): Allow a boolean to be cast into a
17324 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17326 * parse.y: (class_declaration:): Fixed indentation.
17327 (class_member_declaration:): Extra `;' after field declaration now
17329 (interface_declaration:): Removed debug messages in error reports.
17330 (patch_binop): Nodes created and returned inherit the orignal
17331 node's COMPOUND_ASSIGN_P flag value.
17332 (patch_cast): Fix cast from char to floating point.
17334 1999-01-25 Andrew Haley <aph@cygnus.com>
17336 * except.c, java-except.h (expand_resume_after_catch): new
17338 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17339 to branch back to main flow of control after a catch block.
17341 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17343 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17344 $(srcdir)/../system.h.
17345 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17346 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17347 (jcf-write.o): Likewise.
17348 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17349 (mangle.o): Depend on $(srcdir)/../toplev.h.
17350 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17351 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17353 * class.c: Include output.h and parse.h.
17354 (mangled_classname): Add the `const' keyword to a char*.
17355 (find_named_method): Hide unused function definition.
17356 (build_utf8_ref): Change type of variable `c' to unsigned char.
17357 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17358 (build_class_ref): Add the `const' keyword to a char*.
17359 (layout_class_method): Remove unused variable `buf'.
17361 * decl.c (find_local_variable): Remove unused variable `rtl'.
17362 (pushdecl): Likewise for variables `different_binding_level' and
17364 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17365 (maybe_build_cleanup): Likewise for parameter `decl'.
17367 * except.c (expand_start_java_handler): Mark parameter `range'
17368 with ATTRIBUTE_UNUSED.
17370 * expr.c: Include except.h.
17371 (pop_type): Remove unused variable `i'.
17372 (pop_value): Likewise for variables `n_words' and `i'.
17373 (expand_java_arrayload): Likewise for variable `convert'.
17374 (java_lang_expand_expr): Likewise for variables `op0', `type',
17375 `mode', `unsignedp', `node' and `elements'.
17376 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17378 (process_jvm_instruction): Add a `const' qualifier to a char*.
17380 * gjavah.c (output_directory): Add the `const' keyword to a char*.
17381 (temp_directory): Likewise.
17382 (print_c_decl): Likewise.
17383 (print_method_info): Likewise.
17384 (decode_signature_piece): Likewise.
17385 (print_mangled_classname): Likewise.
17387 * java-except.h: Provide prototypes for maybe_start_try,
17388 maybe_end_try and add_handler.
17390 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17391 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
17392 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17393 init_expr_processing, push_super_field, init_class_processing,
17394 can_widen_reference_to, class_depth, verify_jvm_instructions,
17395 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17396 set_local_type, merge_type_state, push_type, load_type_state,
17397 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17398 emit_unicode_mangled_name): Add prototypes.
17400 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17401 (print_signature_type): Use ISDIGIT, not isdigit.
17402 (print_signature): Remove unused variable `j'.
17404 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17405 int when comparing against one.
17407 * jcf-parse.c: Include toplev.h.
17409 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
17410 (localvar_free): Remove unused variable `i'.
17411 (generate_bytecode_conditional): Likewise for variable `kind'.
17413 * jv-scan.c: Include config.h and system.h. Remove redundant
17414 OS header and gansidecl.h includes.
17415 (warning): Add the `const' keyword to a char*. Also add
17416 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
17417 __STDC__, when determining whether to use ANSI-isms.
17418 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
17419 (xmalloc): Don't redundantly prototype here.
17420 (main): Remove unused parameter `envp'. Also fix the arguments
17421 passed to function `fatal' to match the format specifier.
17423 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17425 * mangle.c: Include toplev.h.
17426 (emit_unicode_mangled_name): Declare parameter `len'.
17428 * parse.y (parse_warning_context): Add the `const' keyword to a
17429 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
17430 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
17431 (issue_warning_error_from_context): Add the `const' keyword to
17433 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
17434 not `__STDC__' for whether to use ANSI-isms.
17436 * typeck.c (incomplete_type_error): Mark parameters `value' and
17437 `type' with ATTRIBUTE_UNUSED.
17438 (parse_signature_type): Use ISDIGIT, not isdigit.
17440 * verify.c (check_pending_block): Add the `const' keyword to a char*.
17441 (verify_jvm_instructions): Likewise. Remove unused variables
17442 `field_name' and `default_val'.
17444 * zextract.c: Include config.h and system.h. Remove redundant
17445 OS header includes.
17447 * zipfile.h: Prototype `read_zip_archive'.
17449 1999-01-21 Andrew Haley <aph@cygnus.com>
17451 * typeck.c (convert): Allow conversions to void type: some
17452 optimizations in gcc do this.
17454 1999-01-21 Andrew Haley <aph@cygnus.com>
17456 * typeck.c (convert_ieee_real_to_integer): New function.
17457 (convert): When not using fast-math and using hardware fp, convert
17458 an IEEE NaN to zero.
17460 1999-01-18 Andrew Haley <aph@cygnus.com>
17462 * parse.y (patch_binop): Do a type conversion from signed to
17463 unsigned and then back to signed when a ">>>" is found.
17465 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17467 * java-tree.h: (check_for_initialization): Added prototype.
17468 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17469 * parse.y (do_resolve_class): Removed unused locals.
17470 (read_import_dir): Likewise.
17471 (resolve_qualified_expression_name): Array creation
17472 expressions are valid primary expressions.
17473 (qualify_ambiguous_name): Likewise.
17474 (patch_synchronized_statement): Removed unused local.
17476 1999-01-17 Jeffrey A Law (law@cygnus.com)
17478 * Makefile.in (zextract.o): Add dependencies.
17480 * Makefile.in: Do not put ^Ls at the start of a line.
17482 1999-01-15 Per Bothner <bothner@cygnus.com>
17484 * expr.c (process_jvm_instruction): Coerce to correct Throwable
17485 sub-type the result of the call that gets the exception value.
17487 * parse.y (java_complete_expand_methods): If flags_syntax_only,
17488 don't call finish_class.
17490 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
17491 clear found before continuing.
17493 * verify.c (verify_jvm_instructions): On an array load, allow
17494 and handle top of stack to be TYPE_NULL.
17496 * gjavah.c (generate_access): Translate Java package private or
17497 protected access to C++ public, but with a comment.
17499 1999-01-13 Andrew Haley <aph@cygnus.com>
17501 * expr.c (generate_name): Name prefix changed to avoid clashes
17502 with assembler temp labels.
17504 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
17505 MODIFY_EXPR. Without this, code for the assignment may not be
17506 generated at all and the synchronized statement will read an
17507 uninitialized variable.
17509 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
17511 * class.c (maybe_layout_super_class): Fixed returned value.
17512 * lex.c: Added 1999 to the copyright.
17513 (java_init_lex): Initialize java_lang_imported.
17514 * lex.h: Added 1999 to the copyright.
17515 * parse.h: Added 1999 to the copyright.
17516 (REGISTER_IMPORT): Fixed typo in trailing macro.
17517 (CURRENT_OSB): New macro.
17518 (struct parser_ctxt): New fields osb_depth, osb_limit.
17519 * parse.y (java_lang_id): New global variable.
17520 (type_import_on_demand_declaration): Don't import java.lang.* twice.
17521 (array_creation_expression:): Use CURRENT_OSB.
17522 (dims:): Uses a stack to keep track of array dimensions.
17523 (cast_expression:): Use CURRENT_OSB.
17524 (find_expr_with_wfl): Return NULL if node found doesn't meet the
17526 (register_fields): Fixed typos in comment.
17527 (check_method_redefinition): Fixed comment indentation.
17528 (java_check_regular_methods): Set saved found wfl to NULL after
17529 having reinstalled it in the previously found DECL_NAME.
17531 1999-01-10 Richard Henderson <rth@cygnus.com>
17533 * gjavah.c (java_float_finite): Use a union to do type punning.
17534 (java_double_finite): Likewise.
17536 1999-01-09 Per Bothner <bothner@cygnus.com>
17538 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
17539 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
17540 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
17541 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
17542 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
17543 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
17545 1999-01-08 Per Bothner <bothner@cygnus.com>
17547 * check-init.c (check_init): If compiling to native, we don't
17548 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
17550 1999-01-08 Tom Tromey <tromey@cygnus.com>
17552 * parse-scan.y (variable_declarator_id): Set or increment
17554 (bracket_count): New global.
17555 (formal_parameter): Handle case where bracket pairs trail variable
17558 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
17560 * jcf-parse.c (yyparse): variable len changed from a char to an
17561 int to prevent overflow.
17563 1999-01-06 Per Bothner <bothner@cygnus.com>
17565 * java-tree.h: Declare read_class.
17566 * jcf-parse.c (read_class): New function.
17567 (load_class): Now just call read_class.
17569 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
17570 * jcf-parse.c (parse_source_file): Declare save_error_count,
17571 which is needed by java_parse_abort_on_error macro,
17572 * parse.y (java_layout_classes, java_expand_classes): Likewise.
17574 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
17575 constructor, if initializing a static field.
17576 (patch_new_array_init): Set TREE_CONSTANT if it is.
17577 * expr.c (java_lang_expand_expr): For a static array constructor
17578 of primitive elements, allocate the array itself statically.
17579 Disabled until we can set the vtable field statically.
17581 * check-init.c: New file. Checks for definite assignment.
17582 * Makefile.in (JAVA_OBJS): Add check-init.o.
17583 * parse.y (java_complete_expand_method): Call check_for_initialization.
17584 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
17586 1999-01-06 Graham <grahams@rcp.co.uk>
17588 * parse.y : include system.h instead of including
17589 standard headers directly with the exception of <dirent.h>.
17591 1999-01-06 Per Bothner <bothner@cygnus.com>
17593 * lex.h: Moved static function declarations to lex.c,
17594 to shut up some -Wall warnings.
17595 * lex.c: Static function declarations moved here.
17596 * jcf-dump.c: Small fixes to shut up -Wall warnings.
17598 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17600 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
17602 1998-12-22 Per Bothner <bothner@cygnus.com>
17604 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
17605 * verify.c (verify_jvm_instructions): Fix off-by-one error.
17607 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
17608 (localvar_alloc): Change return type to void,
17609 (emit_unop): Remove unused variable size.
17611 * jcf-write.c (struct jcf_block): Add new union.
17612 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
17613 (call_cleanups): New functions.
17614 (struct jcf_partial): New fields num_finalizers and return_value_decl.
17615 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
17616 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
17617 * lang.c (lang_init): Call using_eh_for_cleanups.
17618 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
17619 completing operands to patch_synchronized_statement.
17620 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
17621 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
17622 WITH_CLEANUP_EXPR instead of TRY_EXPR.
17624 1998-12-20 John F. Carr <jfc@mit.edu>
17626 * Make-lang.in: Comment out control-Ls; they upset some makes.
17628 1998-12-18 Tom Tromey <tromey@cygnus.com>
17630 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
17633 1998-12-17 Tom Tromey <tromey@cygnus.com>
17635 * parse.y (DIR_SEPARATOR): New define.
17636 (check_class_interface_creation): Use it.
17638 * parse-scan.y (report_main_declaration): Recognize
17639 `java.lang.String' in argument to main.
17641 1998-12-16 Per Bothner <bothner@cygnus.com>
17643 * parse.y (create_interface): Remove bogus test.
17645 1998-12-16 Per Bothner <bothner@cygnus.com>
17647 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
17648 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
17650 1998-12-16 Tom Tromey <tromey@cygnus.com>
17652 * parse-scan.y (qualified_name): Use correct sprintf format.
17654 1998-12-15 Tom Tromey <tromey@cygnus.com>
17656 * gjavah.c (print_field_info): Changed how most negative number is
17659 1998-12-14 Per Bothner <bothner@cygnus.com>
17661 * parse.y (fold_constant_for_init): New function.
17662 (resolve_expression_name): Don't replace static final
17663 constant-initialized fields by its value.
17664 (java_complete_lhs): New. Same as java_complete_tree, except does
17665 not replace static final constant-initialized fields by their values.
17666 (register_fields): If there is an initializer, set DECL_INITIAL and
17667 MODIFY_EXPR_FROM_INITIALIZATION_P.
17668 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
17669 Only call patch_initialized_static_field if
17670 MODIFY_EXPR_FROM_INITIALIZATION_P.
17671 (patch_initialized_static_field): If not valid constant, clear
17674 * parse.y (lookup_field_wrapper): Fix thinko.
17676 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
17677 set and restore global lineno.
17679 1998-12-14 Tom Tromey <tromey@cygnus.com>
17681 * gjavah.c (print_field_info): If value to print is the smallest
17682 value of its size, then print as hex to avoid later warnings from
17685 1998-12-14 Tom Tromey <tromey@cygnus.com>
17687 * gjavah.c (decompile_method): Decompile `return null'.
17688 (process_file): Generate `#pragma interface'.
17689 (method_declared): New global.
17690 (print_method_info): Set it.
17691 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
17692 (print_method_info): Handle abstract methods.
17694 1998-12-13 Per Bothner <bothner@cygnus.com>
17696 * parse.y (patch_method_invocation): If class_decl is null
17697 (e.g. an array type), use original type.
17699 * parse.y (check_thrown_exceptions): Temporary hack to suppress
17700 errors about uncaught exception from clone (of array, specifically).
17702 1998-12-13 Tom Tromey <tromey@cygnus.com>
17704 * gjavah.c (decompile_method): Handle all types of `return'
17705 opcode. Decompile `return this' and `return'.
17706 (method_access): New global.
17707 (print_method_info): Set it.
17708 (decompile_method): Don't decompile a synchronized method.
17710 1998-12-13 Tom Tromey <tromey@cygnus.com>
17712 * jcf-reader.c (jcf_parse_one_method): Recognize
17714 * gjavah.c (HANDLE_END_METHOD): New macro.
17715 (HANDLE_CODE_ATTRIBUTE): New macro.
17716 (decompile_method): New function.
17717 (print_method_info): Don't print `;\n' at end of function decl.
17718 Include java-opcodes.h.
17719 (decompiled): New global.
17721 1998-12-12 Per Bothner <bothner@cygnus.com>
17723 * class.c (build_class_ref): Handle PRIMTYPE.class if
17724 flag_emit_class_files.
17725 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
17726 if flag_emit_class_files.
17727 * parse.y (java_complete_tree): Pre-liminary support for
17728 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
17730 * parse.y (patch_synchronized_statement): Don't call monitorexit
17731 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
17733 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
17735 * zipfile.h (opendir_in_zip): New declaration.
17736 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
17737 (opendir_in_zip): New function, using code from open_in_zip.
17738 (open_in_zip): Call opendir_in_zip.
17739 (find_class): Remove no-longer-used do_class_file parameter,
17740 but add source_ok parameter. Change logic so if we find a .java file,
17741 we don't look for .class in later classpath emtries.
17742 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
17743 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
17744 * gjavah.c: Update call to find_class.
17745 * jcf-dump.c: Likewise.
17747 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
17748 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
17749 nothing if body is empty_stmt_node.
17750 Various little fixes so SP gets correctly adjusted.
17751 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
17752 For CALL_EXPR, test if static first.
17753 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
17754 such as the ones we create for Object and Class.
17755 Set and restore current_function_decl.
17756 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
17757 (note_possible_classname): New function.
17758 (read_import_entry): Removed. Merged with read_import_dir.
17759 (read_import_dir): Don't call find_class - that only gives us
17760 the first classpath entry having the needed package.
17761 Use the struct buffer data structure from buffer.h.
17762 (read_import_dir, find_in_imports_on_demand): The remembered
17763 class names now use '.' (not '/') as package separator.
17765 * parse.y (java_complete_expand_methods): Call write_classfile
17766 here, and not in java_expand_classes (which only gets first class).
17768 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17770 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
17771 (register_fields): If a static fields has an initializer, just
17772 chain it on ctxp->static_initialized, and handle later.
17773 (java_complete_expand_methods): Force <clinit> first.
17774 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
17775 - it's already been completed.
17776 (patch_initialized_static_field): New function.
17777 (java_complete_field): Call it.
17779 1998-12-12 Per Bothner <bothner@cygnus.com>
17781 * expr.c (encode_newarray_type, build_new_array): New functions.
17782 * java-tree.h: Declare build_new_array.
17783 * jcf-write.c (patch_newarray): Use build_new_array.
17785 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
17786 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
17788 * parse.y (patch_new_array_init): Re-organize.
17789 Now is passed the actual array (pointer) type of the value.
17790 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
17791 (patch_array_constructor): Removed - merged into patch_new_array_init.
17792 (java_complete_tree): Update patch_new_array_init.
17794 * jcf-write.c (find_constant_index): New function.
17795 (generate_bytecode_insns): Use find_constant_index.
17796 (generate_classfile): Use find_constant_index for ConstantValue.
17798 1998-12-11 Tom Tromey <tromey@cygnus.com>
17800 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
17801 * decl.c (init_decl_processing): Renamed dtable -> vtable.
17802 * class.c (make_class_data): Renamed dtable -> vtable, and
17803 dtable_method_count -> vtable_method_count.
17805 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17807 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
17808 global variables, initialized.
17809 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
17810 Declared new global variables.
17811 * lex.c (java_lex): Return long_zero_node, float_zero_node,
17812 double_zero_node, integer_zero_node upon direct matching.
17813 * parse.y (purify_type_name): Added function prototype.
17814 (duplicate_declaration_error_p): Consider new_type as potentially
17815 being a incomplete type. Use purify_type_name on type string.
17816 (method_header): saved_type: unused variable removed. Don't figure
17817 return type if method name is invalid.
17818 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
17819 processed by patch_unaryop.
17820 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
17821 increment/decrement node into its original type after binary
17822 numeric promotion on its operands.
17824 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17826 * parse.y (array_initializer:): Array init operand is NULL_TREE
17827 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
17828 now an error. Fixed indentation problems.
17829 (patch_string): Handle error_mark_node as an argument.
17830 (patch_new_array_init): Fixed indentation problems.
17831 (array_constructor_check_entry): Removed check on null wfl_value.
17832 Return an error if wfl_value's walk returns an error.
17834 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17836 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
17837 * lex.c (java_lex): Remember column position before advancing one
17838 token. Retain location information on OCB_TK.
17839 * lex.h (typedef struct java_lc): Added new field.
17840 * parse.h (GET_SKIP_TYPE): New macro.
17841 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
17842 * parse.y (build_new_array_init, patch_new_array_init,
17843 patch_array_constructor, maybe_build_array_element_wfl,
17844 array_constructor_check_entry): New function prototypes.
17845 (switch_block:): Tagged <node>.
17846 (OCB_TK): Tagged <operator>.
17847 (array_initializer:): Installed actions.
17848 (variable_initializer): Build location information on element if
17850 (switch_statement:): Fixed indentation typo.
17851 (switch_block:): Redefined default action.
17852 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
17853 (patch_assignment): Removed duplicate code.
17854 (maybe_build_array_element_wfl, build_new_array_init,
17855 patch_new_array_init, patch_array_constructor,
17856 array_constructor_check_entry): New functions.
17858 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
17860 * parse.y (array_initializer): Tagged <node>.
17861 (variable_initializer:): Use default rule.
17862 (array_initializer:): Defined actions.
17863 (variable_initializers:): Likewise.
17864 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
17865 non-static field accesses.
17866 (patch_invoke): Fixed indentation typo.
17867 (java_complete_tree): Likewise.
17868 (build_labeled_block): Changed leading comment. Generate an error
17869 in case of duplicate loop labels.
17870 (patch_conditional_expr): Patch results of string concatenation
17873 1998-12-06 Per Bothner <bothner@cygnus.com>
17875 * constants.c (find_methodref_index): When the class is an interface,
17876 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
17878 * decl.c (finit_identifier_node): Use "$finit$", rather than
17879 "<finit>" (which Sun's verifier rejects).
17880 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
17881 (generate_field_initialization_code): Removed.
17882 (fix_constructors) Don't add call to $finit$ here (wrong order).
17883 (patch_method_invocation): Add $finit$ call here.
17885 * java-tree.h (CALL_USING_SUPER): New macro.
17886 * parse.y (patch_invoke): Remove im local variable.
17887 (patch_method_invocation, patch_invoke): Don't pass super parameter.
17888 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
17889 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
17891 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
17893 * parse.y (java_complete_tree): Don't complain about unreachable
17894 statement if it is empty_stmt_node.
17896 * jcf-write.c (find_constant_wide): New function.
17897 (push_long_const): Use find_constant_wide.
17899 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
17900 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
17901 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
17902 Emit invokeinterface when calling an interface method.
17903 Emit invokespecial also when calling super or private methods.
17905 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
17907 1998-12-06 Per Bothner <bothner@cygnus.com>
17909 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
17911 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
17913 * java-tree.h (java_layout_seen_class_methods): New function
17915 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
17916 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
17917 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
17918 * parse.y (method_declarator:): Defined action.
17919 (issue_warning_error_from_context): input_filename saved, set to
17920 the appropriate value and restored after java_error is called.
17921 (build_unresolved_array_type): Fixed comment.
17922 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
17923 (method_header): Deal with return type the same way type are
17924 handled for fields and method's parameters and local variables
17926 (check_method_redefinition): Removed extra CR.
17927 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
17928 (java_layout_seen_class_methods): New function.
17929 (java_layout_classes): Call java_layout_seen_class_methods.
17931 1998-12-03 Per Bothner <bothner@cygnus.com>
17933 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
17935 1998-12-03 Per Bothner <bothner@cygnus.com>
17937 * jcf-dump.c (main): Fix error message.
17938 * jcf-path.c (add_entry): Style fix.
17940 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
17942 * class.c (layout_class_method): Call build_java_argument_signature
17943 on constructors too.
17944 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
17945 (patch_method_invocation): Define a primary when resolving an
17946 expression name. Augmented comment on code checking illegal `this'
17947 usage. Loosened it test by accepting NEW_CLASS_EXPR.
17949 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
17951 * class.c (layout_class_method): Don't report error on non-static
17952 overriding static if the method is private.
17953 * java-tree.h (finish_class): Prototype added.
17954 * lex.c (java_get_line_col): Handle col argument -2 value.
17955 * parse.h: All static method declarations moved to parse.y.
17956 * parse.y: Now contains all static method declarations previously
17958 (find_expr_with_wfl, missing_return_error,
17959 unreachable_stmt_error): New functions.
17960 (java_get_real_method_name): Identify constructors bearing class
17961 names in source code compiled classes only.
17962 (java_complete_expand_methods): Call missing_return_error.
17963 (invocation_mode): Private methods invoked as static methods.
17964 (java_complete_tree): Call unreachable_stmt_error.
17966 1998-12-01 Tom Tromey <tromey@cygnus.com>
17968 * Makefile.in (+target): Removed.
17969 (+xmake_file): Likewise.
17970 (+tmake_file): Likewise.
17971 (.NOEXPORT): Removed duplicate.
17973 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17975 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
17977 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
17979 * jvgenmain.c: Remove the xmalloc prototype, we get it from
17980 libiberty.h. Provide an xmalloc definition.
17982 * jvspec.c: Remove the xmalloc prototype.
17984 * parse-scan.y: Include config.h and system.h. Don't include
17985 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
17986 Provide an xstrdup definition.
17988 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
17990 * jcf-path.c (add_entry): Recognize ".jar" too.
17991 * lang-specs.h: Likewise.
17993 1998-11-26 Per Bothner <bothner@cygnus.com>
17995 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
17996 soft_monitorenter_node, soft_monitorexit_node, throw_node.
17998 * jcf-write.c (generate_bytecode_insns):
17999 Handle pre/post-increment/decrement of long.
18001 * jcf-write.c (generate_bytecode_insns):
18002 Handle missing exception handler (finally for synchronized).
18004 1998-11-25 Per Bothner <bothner@cygnus.com>
18006 * java-tree.h (end_params_node): Declare global.
18007 * decl.c (end_params_node): New global.
18008 (init_decl_processing, start_java_method): Use end_params_node for
18009 end of list of parameter types. Follows correct gcc conventions.
18010 * expr.c (pop_argument_types, pop_arguments): Likewise.
18011 * lang.c (put_decl_node): Likewise.
18012 * typeck.c (various places): Likewise.
18013 * class.y (various places): Likewise.
18014 * parse.y (various places): Likewise.
18016 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
18017 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
18019 * class.c: Add #include flags.h, remove no-longer needed declaration.
18021 * class.c (layout_class_method): Remove commented-out code, re-format.
18022 Don't add vtable entry (or index) for private methods.
18023 * expr.c (expand_invoke): A private method is implicitly final.
18024 * class.c (make_class_data): If inlining or optimizing,
18025 skip private methods.
18027 * class.c (finish_class): New function. Calls existing methods,
18028 but alls emits deferred inline functions.
18029 * jcf-parse.c (parse_class_file): Call finish_class.
18030 * parse.y (java_complete_expand_methods): Likewise.
18032 * expr.c (build_java_binop): Explicit default, to silence -Wall.
18034 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
18036 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
18038 * jcf-write.c (generate_bytecode_conditional): Fix typo.
18040 1998-11-24 Per Bothner <bothner@cygnus.com>
18042 * (generate_classfile): Always write class access flag with
18045 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
18047 * class.c (maybe_layout_super_class): New function.
18048 (layout_class): Reorganized. Loop on class methods dispatched into
18049 a new function. Call maybe_layout_super_class.
18050 (layout_class_methods, layout_class_method): New functions.
18051 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18053 (expand_invoke): Likewise.
18054 * java-tree.h (all_class_list): New global variable declared.
18055 (layout_class_methods, layout_class_method): New function
18057 (LAYOUT_SEEN_CLASS_METHODS): New macro.
18058 * jcf-parse.c (all_class_list): New global variable.
18059 (load_class): Extended what class_or_name can be. Use parser
18060 context mechanism to save globals before calling jcf_parse.
18061 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18062 is set on the file name.
18063 (jcf_parse): Layout class methods when Object is loaded, otherwise
18064 record class in all_class_list for delayed method layout.
18065 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18066 * lang.c (put_decl_node): Decode <init> into the decl context
18068 * lex.c (java_allocate_new_line): Use xmalloc.
18069 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18070 pointers, not TREE_LIST elements.
18071 (struct parser_ctxt): Fixed comment indentations, added comments
18072 and reordered some fields.
18073 (java_check_methods): Function prototype removed.
18074 * parse.y (java_push_parser_context): Use xmalloc.
18075 (java_parser_context_restore_global): Pop extra pushed ctxp only
18076 when there's nothing next.
18077 (maybe_create_class_interface_decl): Fixed comment, add new
18078 created class decl to all_class_list.
18079 (method_header): Use GET_REAL_TYPE on argument's types.
18080 (method_declarator): Use GET_REAL_TYPE, change type to the real
18081 type in TREE_LIST dependency node. Build argument list with the
18083 (create_jdep_list): Use xmalloc. Removed allocation error message.
18084 (obtain_incomplete_type): Fixed leading comment. Broadened
18085 incoming argument meaning.
18086 (register_incomplete_type): Use xmalloc. Removed allocation error
18088 (safe_layout_class): Fixed leading comment.
18089 (jdep_resolve_class): Reversed if statement condition and switch
18090 if and else bodies.
18091 (resolve_and_layout): Fixed leading comment. Broadened incoming
18093 (complete_class_report_errors): New local variable name, for
18094 clarity. purify_type_name used for all error cases.
18095 (java_get_real_method_name): Stricter check on constructors.
18096 (java_check_regular_methods): Reverse methods list only if not
18097 already laid out. Layout artificial constructor.
18098 (java_check_methods): Deleted.
18099 (source_start_java_method): Obtain incomplete type for patchable
18101 (java_layout_classes): Fixed leading comment. Use
18102 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18103 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18104 before returning. Fixed comments.
18105 (java_expand_classes): Check for errors up front.
18106 (patch_method_invocation): Class to search is resolved and laid
18109 1998-11-24 Per Bothner <bothner@cygnus.com>
18111 * expr.c (java_lang_expand_expr): Add missing emit_queue.
18113 * javaop.h (int8): Removed - not used.
18114 (jbyte): Redefine portably with correct signedness.
18116 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
18118 * jcf-write.c (generate_bytecode_insns): Fix typo
18119 OPCODE_getstatic to OPCODE_getfield.
18121 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
18122 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
18123 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18125 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
18127 * jcf-parse.c (jcf_parse_source): Function returned type is
18128 void. Added prototype.
18129 (jcf_parse): Function returned type is void.
18130 (yyparse): Remove call to fclose on the last parsed file.
18132 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18134 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
18136 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18137 (layout_class): Cope with methods featuring WFL in decl names.
18138 * decl.c (unqualified_object_id_node): New global variable,
18140 (build_decl_no_layout): Removed.
18141 * expr.c (build_primtype_type_ref): Handle Double.
18142 (java_lang_expand_expr): Fixed indentations.
18143 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18144 (flag_wall, flag_redundant, flag_not_overriding,
18145 flag_static_local_jdk1_1, unqualified_object_id_node): Global
18146 variable declarations.
18147 (build_decl_no_layout): Removed prototype.
18148 (java_get_real_method_name): Added prototype.
18149 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18150 (java_parse_abort_on_error): Macro now just returns.
18151 * jcf-parse.c (jcf_parse_source): Check fclose returned
18152 value. Call emit_register_classes if java_report_errors returns
18154 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18155 flag_static_local_jdk1_1): New integer flags.
18156 (lang_decode_option): New flags set here.
18157 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18158 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18159 the flag_redundant variable.
18160 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18161 when parsing java.lang.Object class.
18162 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18163 NULL_TREE to build.
18164 (resolve_qualified_expression_name): Fixed indentation.
18165 (patch_array_ref): Changed prototype.
18166 (not_initialized_as_it_should_p): Prototype removed.
18167 (java_report_errors): Added function prototype.
18168 * parse.y (formal_parameter:): Changed error message for not yet
18169 supported final parameters.
18170 (class_type_list:): Set both PURPOSE and VALUE of created
18171 TREE_LIST to be class_type.
18172 (primary_no_new_array:): Handle class literals on primitive types.
18173 (parse_warning_context): Reinstalled correct force_error and
18174 do_warning flags setups.
18175 (java_report_errors): Changed prototype. Return java_error_count
18177 (variable_redefinition_error): Consider treating variable type as
18179 (create_interface): Warn about redundant abstract modifier if
18180 flag_redundant is set. Changed error message.
18181 (lookup_field_wrapper): Save/restore globals before/after looking
18183 (duplicate_declaration_error_p): Consider treating declaration
18184 type as a fake pointer.
18185 (register_fields): Extract real type from dependency node. Check
18186 for duplicate field declaration after type adjustment. Use
18187 DECL_INITIAL to store static final initialized values.
18188 (method_header): Extract real function type from dependency node.
18189 (check_abstract_method_header): Use GET_METHOD_NAME.
18190 (obtain_incomplete_type): Layout fake pointer type.
18191 (safe_layout_class): Don't try to check for methods before layout.
18192 (java_complete_class): Don't check for correct throws clause
18193 elements inheritance here.
18194 (resolve_and_layout): Broadened name parameter meaning.
18195 (reset_method_name): Use GET_METHOD_NAME.
18196 (java_get_real_method_name): New function.
18197 (java_check_regular_methods): Don't check methods in
18198 java.lang.Object. Verify lineage of throws clause elements. Use
18199 flag_no_overriding in warning report.
18200 (check_throws_clauses): Don't check if class was from
18201 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18202 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18203 (declare_local_variables): Use flag_static_local_jdk1_1 to report
18204 warning on unsupported final local variables. Use build_decl
18205 instead of build_decl_no_layout. Get real local variable type from
18207 (source_start_java_method): Get real parameter type from
18208 dependency node. Call build_decl instead of build_decl_no_layout.
18209 (java_layout_classes): Reverse tree and layout type and class as
18210 required. Mark class as loaded when done.
18211 (resolve_field_access): Fixed indentation. Restricted condition
18212 leading to static field access code generation. Set field_type
18213 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18214 (resolve_qualified_expression_name): Initialize type_found to
18215 null. Handle static field resolved during qualification. Fixed
18216 layout on non primitive field decl types.
18217 (not_accessible_p): Fixed typo in comment.
18218 (patch_method_invocation): Resolve and layout class to search from
18220 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18221 layout non primitive type, if necessary. Make method node only to
18223 (find_applicable_accessible_methods_list): Consider WFL'ed method
18224 decl names. Fixed indentation.
18225 (argument_types_convertible): Resolve and layout target type if
18227 (java_complete_tree): Fixed indentation problems. Rewrote
18228 CALL_EXPR thrown exceptions check. Re-installed further processing
18229 of the assignment in certain cases.
18230 (patch_assignment): Call maybe_build_primttype_type_ref to perform
18231 inlining on class literals.
18232 (valid_builtin_assignconv_identity_widening_p): Cope with constant
18234 (valid_method_invocation_conversion_p): Likewise.
18235 (patch_string): Temporary disable forbidden use of `this' in
18236 explicit constructor invocations when doing string concatenation
18237 within their scope.
18238 (patch_unaryop): Added comment. Reinstalled code to disable
18239 further check on assignment operation with cast expression RHS.
18240 (patch_switch_statement): Fixed indentation.
18241 (build_try_statement): Call build_decl instead of
18242 build_decl_no_layout.
18243 (patch_synchronized_statement): Likewise.
18244 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18245 IS_UNCHECKED_EXPRESSION_P.
18246 (check_thrown_exceptions_do): Changed leading comment. Resolve and
18247 layout argument exception type.
18248 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18249 of IS_UNCHECKED_EXPRESSION_P.
18251 1998-11-18 Anthony Green <green@cygnus.com>
18253 * jcf-parse.c (yyparse): Open class file in binary mode.
18255 1998-11-15 Per Bothner <bothner@cygnus.com>
18257 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
18259 * jcf-write.c (perform_relocations): Move check out one loop.
18261 1998-11-15 Anthony Green <green@hoser.cygnus.com>
18263 * Make-lang.in: Fix reference to srcdir.
18264 * jv-scan.c: Add missing xmalloc prototype.
18265 * jvgenmain.c: Ditto.
18267 1998-11-15 Per Bothner <bothner@cygnus.com>
18269 * decl.c (error_mark_node), java-tree.h: New global.
18270 * parse.y: Use empty_stmt_node instead of size_zero_node.
18271 (build_if_else_statement): If missing else, use empty_stmt_node.
18273 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
18274 (java_complete_expand_method): Complain if return is missing.
18275 (java_check_regular_methods): Comment out incorrect error check.
18276 (not_accessible_p): Fix incorrect handling of protected methods.
18277 (patch_method_invocation): Pass correct context to not_accessible_p.
18278 (find_applicable_accessible_methods_list): Likewise.
18279 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
18280 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
18281 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
18282 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
18284 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
18285 (push_int_const): Remove reundant NOTE_PUSH.
18286 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
18287 (- case SWITCH_EXPR): Fix code generation bug.
18288 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
18289 (generate_classfile): More robust for abstract methods.
18291 1998-11-15 Anthony Green <green@cygnus.com>
18293 * Makefile.in: jv-scan and jvgenmain all require libiberty.
18294 * Make-lang.in: Ditto.
18296 * jv-scan.c: Remove xmalloc and xstrdup definitions.
18297 * jvgenmain: Ditto.
18299 1998-11-15 Per Bothner <bothner@cygnus.com>
18301 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
18303 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
18305 1998-11-14 Per Bothner <bothner@cygnus.com>
18307 Allow uses of interface types to verify. This is not really
18308 type-safe, but it matches what Sun does, and is OK as long as
18309 there are appropriate run-time checks.
18310 * verify.c (merge_types): If merging two interface types,
18311 just set the result to java.lang.Object.
18312 * expr.c (pop_type): Any interface is matches by java.lang.Object.
18314 1998-11-13 Tom Tromey <tromey@cygnus.com>
18316 * gjavah.c (main): Handle --output-class-directory argument.
18317 * jvspec.c (lang_specific_driver): Translate `-d' into
18318 -foutput-class-dir.
18319 * jcf.h (jcf_write_base_directory): Declare.
18320 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18321 * lang-options.h: Mention -foutput-class-dir.
18322 * jcf-write.c (jcf_write_base_directory): New global.
18323 (make_class_file_name): Put generated .class file into `-d'
18324 directory, or into source directory if -d not given. Function now
18326 (write_classfile): Free class file name. Handle case where class
18328 (DIR_SEPARATOR): New macro.
18329 Include <sys/stat.h>
18331 * Makefile.in (prefix): New macro.
18333 1998-11-12 Per Bothner <bothner@cygnus.com>
18335 * parse.y (patch_invoke): Do less if flag_emit_class_files.
18336 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
18337 here (done in patch_invoke instead).
18338 (case_identity): Moved here from parse.y.
18340 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
18341 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
18342 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
18343 so they can be efficiently scanned without recursion.
18344 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18345 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
18346 in BLOCK iteratively, rather than recursively.
18348 * parse.y (do_unary_numeric_promotion): New function.
18349 (patch_unaryop, patch_binop, patch_array_ref): Use it.
18351 * parse.y (patch_newarray): Various fixes.
18353 Re-do handling of switch statements (for proper block scoping).
18354 * parse.y: Add just a single block for the enture switch block,
18355 but don't create any "case blocks".
18356 (group_of_labels): Rmeoved unneeded non-terminal.
18357 CASE_EXPR and DEFAULT_EXPR are added to current block.
18358 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
18359 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18360 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
18361 * parse.y (wfl_operator, print_int_node): Make non-static.
18362 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
18363 as part of recursive scan of block.
18364 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
18365 (patch_switch_statement): Most tests move dinto java_complete_tree.
18367 * parse.y: Make various production be non-typed (void).
18368 * parse.y (parse_error): Merged into issue_warning_error_from_context.
18369 * parse.y (add_stmt_to_compound): Don't create/change extra node.
18370 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
18372 * jcf-write.c (struct jcf_handler): New type.
18373 (struct jcf_switch_state): New type.
18374 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
18375 (alloc_handler, emit_unop, emit_reloc): New functions.
18376 (adjust_typed_op): Add extra parameter ("max type" offset).
18377 (emit_switch_reloc, emit_case-reloc): New function.
18378 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
18379 (generate_bytecode_insns): Support REAL_CST, switch statements,
18380 exception handling, method calls, object/array creation, and more.
18382 * class.c: Remove some unused variables.
18383 * constants.c (find_string_constant): New function.
18384 (count_constant_pool_bytes): Fix to correctly handle wide constants.
18385 * decl.c (complete_start_java_method): Don't _Jv_InitClass
18386 if flag_emit_class_files.
18388 1998-11-12 Tom Tromey <tromey@cygnus.com>
18390 * jcf-io.c (find_class): Added explanatory comment.
18392 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
18393 trailing slash to `.zip' entries.
18395 * jvspec.c (lang_specific_driver): Correctly handle case where
18396 GC_NAME not defined.
18398 1998-11-11 Tom Tromey <tromey@cygnus.com>
18400 * jvspec.c (GC_NAME): New define.
18401 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
18403 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18405 1998-11-11 Per Bothner <bothner@cygnus.com>
18407 * jcf-dump.c (TABLE_SWITCH): Fix typos.
18409 1998-11-11 Tom Tromey <tromey@cygnus.com>
18411 * jcf-dump.c (main): Correctly recognize `--'-style long options.
18413 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18415 * class.c (is_compiled_class): Call safe_layout_class for class
18416 compiled from source.
18417 * conver.h (convert_to_integer, convert_to_real,
18418 convert_to_pointer): Added prototypes.
18419 * decl.c (init_decl_processing): Non longer push the decls of
18420 `methodtable', `constants', `Class', `Field', `dispatchTable'
18421 `jexception' and `Method'.
18422 * expr.c (build_invokeinterface): New function.
18423 (expand_invoke): static variable CLASS_IDENT now in
18424 build_invokeinterface. Use build_invokeinterface.
18425 (expand_java_field_op): Moved code to inline
18426 java.lang.PRIMTYPE.TYPE into a function.
18427 (build_primtype_type_ref): New function.
18428 * java-tree.def (INSTANCEOF_EXPR): New tree code.
18429 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
18430 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
18431 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
18432 (DECL_LOCAL_STATIC_VALUE): New macro.
18433 (build_invokeinterface, build_primtype_type_ref): New function
18435 (java_parse_abort_on_error): Macro rewritten.
18436 * jcf-parse.c (current_method): Add comment to declaration.
18437 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
18438 Function prototypes fixed.
18439 (jcf_parse_source): push/pop parser context. save/restore global.
18440 (parse_source_file): Fixed leading comment. Now take a
18441 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18442 classes and pop the parser context anymore.
18443 (yyparse): Push parser context, save globals, parse the source
18444 file, restore globals and pop the parser context when processing a
18446 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18447 * lex.c (java_parse_doc_section): New function.
18448 (java_lex): Call java_parse_doc_section when appropriate. Build an
18449 operator around INSTANCEOF_TK.
18450 * lex.h (java_lineterminator, java_sprint_unicode,
18451 java_unicode_2_utf8, java_lex_error, java_store_unicode):
18452 Prototypes rewritten.
18453 (java_parse_escape_sequence, java_letter_or_digit_p,
18454 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18455 java_read_unicode, java_store_unicode, java_read_char,
18456 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18457 Added function prototypes.
18458 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
18460 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
18462 (struct parser_ctxt): New fields: deprecated,
18463 current_parsed_class_un, gclass_list.
18464 (fix_method_argument_names, issue_warning_error_from_context,
18465 resolve_package, lookup_package_type): New function prototypes.
18466 (resolve_expression_name): Fixed function prototype.
18467 (find_applicable_accessible_methods_list): Fixed indentation, added
18468 extra argument in prototype.
18469 (check_final_assignment, build_null_of_type, check_deprecation,
18470 check_method_redefinition, reset_method_name,
18471 java_check_regular_methods, java_check_abstract_methods,
18472 maybe_build_primttype_type_ref): New function prototype.
18473 * parse.y (conver.h): Include.
18474 (INSTANCEOF_TK): Tagged <operator>.
18475 (single_type_import_declaration): Use REGISTER_IMPORT macro.
18476 (relational_expression:): Build binop for instanceof.
18477 (java_push_parser_context): Remember ctxp->gclass_list across
18479 (java_pop_parser_context): Simply return if no context
18480 exists. Remember gclass_list across contexts.
18481 (issue_warning_error_from_context): New function.
18482 (parse_error_context): Don't setup ctxp->elc here. Call
18483 issue_warning_error_from_context instead.
18484 (parse_warning_context): Likewise.
18485 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
18486 setup. Link new class/interface to ctxp->gclass_list.
18487 (add_superinterfaces): Register interface as incomplete if not
18489 (create_class): Remember class unqualified name in
18490 ctxp->current_parsed_class_un. Check class deprecation.
18491 (register_fields): Check field deprecation. Remember static final
18492 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
18494 (method_header): New local variable ORIG_ARG. Use unqualified
18495 current class name for check on constructor errors. Promote return
18496 type if of record type. Argument list fix moved in
18497 fix_method_argument_names, called here. Check method deprecation.
18498 (fix_method_argument_names): New function.
18499 (method_declarator): Promote record typed arguments.
18500 (safe_layout_class): Check class methods before layout.
18501 (java_complete_class): Compute field layout when patched.
18502 (do_resolve_class): Try to load class after having it renamed
18503 after the package name.
18504 (get_printable_method_name): Use DECL_CONTEXT.
18505 (reset_method_name): New function.
18506 (check_method_redefinition): Use reset_method_name.
18507 (java_check_regular_methods): New local variable
18508 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
18509 names for error report. Check for compile-time error when method
18510 found has default (package) access.
18511 (java_check_abstract_methods): Now takes an interface DECL node as
18512 an argument. Also reinstall real name on unchecked
18513 overriding/hiding methods for error report.
18514 (java_check_methods): Fixed leading comment. Get classes to verify
18515 from ctxp->gclass_list. Use CHECK_METHODS macro and set
18516 CLASS_METHOD_CHECKED_P on class verification.
18517 (lookup_java_method2): Get real method name if necessary.
18518 (find_in_imports): Don't check package class access here.
18519 (resolve_package, lookup_package_type): New functions.
18520 (java_layout_classes): Fixed leading comment. Take classes to be
18521 laid out from ctxp->gclass_list.
18522 (java_complete_expand_methods): Don't expand native and abstract
18524 (java_expand_classes): New function.
18525 (resolve_expression_name): Use additional argument ORIG. Retrieve
18526 values of static final field of primitive types.
18527 (resolve_field_access): Handles static final field of promotive
18529 (resolve_qualified_expression_name): Handle STRING_CST as
18530 primaries and package name resolution. Check deprecation on found
18531 decls. Set where_found and type_found on non static field resolved
18532 during qualification. Layout non primitive field decl types.
18533 (check_deprecation): New function.
18534 (maybe_access_field): Simplified.
18535 (patch_method_invocation_stmt): Local variable CLASS_TYPE
18536 removed. Reverse method's argument when primary is a type. Don't
18537 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
18538 instead. Include abstract class in the list of class searchable
18539 for constructors. Use DECL_CONTEXT of found method for access
18540 checks. Check method deprecation.
18541 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
18542 converting arguments. Handle INVOKE_INTERFACE.
18543 (lookup_method_invoke): Search constructor using existing
18544 infrastructure (don't rely on lookup_java_constructor anymore).
18545 (find_applicable_accessible_methods_list): Extra argument flag
18546 LC. Now include constructor in the search.
18547 (qualify_ambiguous_name): Conditional expression are primaries.
18548 (not_initialized_as_it_should_p): static final are always
18550 (java_complete_tree): Pass extra NULL argument to
18551 resolve_expression_name. Stricter test to carry on patching
18552 assignments. New case for INSTANCEOF_EXPR.
18553 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
18554 (check_final_assignment, maybe_build_primttype_type_ref): New
18556 (patch_assignment): Detect resolved static finals and carry normal
18557 assignment error check on them. Inline PRIMTYPE.TYPE read access.
18558 (try_builtin_assignconv): Access constant 0 on all primitive
18560 (valid_builtin_assignconv_identity_widening_p): Accept identical
18561 types. Accept all promoted type on int type.
18562 (valid_ref_assignconv_cast_p): Accept a null pointer to be
18563 assigned to a reference.
18564 (valid_method_invocation_conversion_p): Accept to check null
18566 (build_binop): Merge declaration and initialization of local
18568 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
18569 numeric types. Improved validity test for qualify operators on
18571 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
18572 and PREINCREMENT_EXPR. Also detect resolved static finals of a
18573 primitive type and issue the appropriate error message.
18574 (resolve_type_during_patch): Mark class loaded when resolved.
18575 (patch_cast): Allow null to be cased to reference types.
18576 (build_null_of_type): New function.
18577 (patch_array_ref): Handle array on references correctly.
18578 (patch_return): Removed unused local variable MODIFY. Force
18579 boolean to be returned as integers. Allows null to be returned by
18580 a function returning a reference.
18581 * typeck.c (convert_to_integer, convert_to_real,
18582 convert_to_pointer): Prototypes moved to convert.h
18583 (lookup_argument_method): Use method real name, if necessary.
18585 1998-10-30 Tom Tromey <tromey@cygnus.com>
18587 * class.c (build_class_ref): Changed name of primitive classes to
18590 * class.c (make_class_data): Renamed fields: nmethods to
18591 method_count, method_count to dtable_method_count. Always set
18592 `state' field to 0.
18593 * decl.c (init_decl_processing): Likewise.
18595 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
18597 * class.c (layout_class): Don't mangle <finit>, produce
18598 __finit<class> instead. Don't verify artificial methods.
18599 * decl.c (finit_identifier_node): New declared global.
18600 (init_decl_processing): finit_identifier_node initialized.
18601 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
18602 * java-tree.h (finit_identifier_node): Declared as extern.
18603 (struct lang_decl): New field called_constructor.
18604 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
18605 (CLASS_HAS_FINIT_P): New macro.
18606 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
18607 explicit constructor invocation.
18608 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
18609 CALL_SUPER_CONSTRUCTOR_P): New macros.
18610 (write_classfile): Added prototype.
18611 * jcf-parse.c (jcf_parse_source): Parse and remember for
18612 generation if the file was seen on the command line.
18613 (parse_source_file): Don't write the class file here.
18614 (yyparse): Loop on files rewritten. Set current_jcf.
18615 (parse_zip_file_entries): Parse class file only if it was found.
18616 * lang.c (init_parse): Don't open command line provided filename
18618 (lang_parse): Don't set main_jcf anymore.
18619 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
18620 (JCONSTRUCTOR_CHECK): New macro.
18621 (JBSC_TYPE_P): New macro.
18622 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
18623 (COMPLETE_CHECK_OP_2): New macro.
18624 (struct parse_ctxt): New field explicit_constructor_p.
18625 (check_class_interface_creation): Fixed prototype indentation.
18626 (patch_method_invocation_stmt): Prototype reflects added argument.
18627 (patch_invoke): Likewise.
18628 (complete_method_declaration, build_super_invocation,
18629 verify_constructor_circularity,
18630 build_this_super_qualified_invocation, get_printable_method_name,
18631 patch_conditional_expr, maybe_generate_finit, fix_constructors,
18632 verify_constructor_super, create_artificial_method,
18633 start_artificial_method_body, end_artificial_method_body,
18634 generate_field_initialization_code): New function prototypes.
18635 * parse.y: Fixed leading comment
18636 (constructor_header:, constructor_body:, block_end:): Rules tagged
18638 (type_declaration:): Call maybe_generate_finit.
18639 (method_declaration:): Action for method_body: placed in new
18640 function complete_method_declaration, called here.
18641 (constructor_declaration:): Defined actions. Removed leading
18643 (constructor_header:): New rule with action.
18644 (constructor_body:): Rule rewritten using block_begin: and
18645 block_end:. Defined actions.
18646 (constructor_declarator:, explicit_constructor_invocation:):
18648 (block:): Use new rules block_begin: block_end:.
18649 (block_begin:, block_end:): New rules and actions.
18650 (block_statements:): Fixed error message for explicit
18652 (method_invocation:): Call build_this_super_qualified_invocation
18653 if primary is `this' or `super' was seen.
18654 (conditional_expression:): Action defined.
18655 (extra_ctxp_pushed_p): New static global flag.
18656 (java_parser_context_save_global): Create parser context if
18657 necessary. Use extra_ctxp_pushed_p to remember it.
18658 (java_parser_context_restore_global): Pop extra parser context if
18660 (build_array_from_name): Array on primitive types are marked
18662 (register_fields): Restore new name in field initializer
18663 expression if type was altered. Non static fields initialized upon
18664 declaration marked initialized.
18665 (maybe_generate_finit): New function.
18666 (maybe_generate_clinit): Use create_artificial_method,
18667 start_artificial_method_body, end_artificial_method_body. Generate
18668 debug info for enclosed initialization statements.
18669 (method_header): Fixed leading comment. Check constructor
18670 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
18672 (complete_method_declaration, constructor_circularity_msg,
18673 verify_constructor_circularity): New functions.
18674 (get_printable_method_name): New function.
18675 (check_method_redefinition): Don't rename <finit> methods. Fix
18676 declared constructor names. Error message for
18677 constructors modified.
18678 (java_check_regular_methods): Local variable seen_constructor
18679 renamed saw_constructor. Skip verification on constructors. Create
18680 default constructor with create_artificial_method.
18681 (java_check_methods): Removed unnecessary empty line.
18682 (create_artificial_method, start_artificial_method_body,
18683 end_artificial_method_body): New functions.
18684 (java_layout_classes): Changed leading comment. Reverse fields
18685 list if necessary. Always layout java.lang.Object if being
18687 (java_complete_expand_methods): Verify constructor circularity.
18688 (java_complete_expand_method): Call fix_constructor on
18689 constructors. Local variable no_ac_found removed. Restore
18690 bindings if method body expansion failed.
18691 (fix_constructors, verify_constructor_super,
18692 generate_field_initialization_code): New function.
18693 (java_expand_classes): Fixed leading comment. Write class file
18695 (resolve_expression_name): Check for illegal instance variable
18696 usage within the argument scope of an explicit constructor
18698 (resolve_qualified_expression_name): Pass extra from_super flag
18699 when invoking patch_method_invocation_stmt. New case for
18700 conditional expression when used as a primary. Check for error
18701 when acquiring super.
18702 (patch_method_invocation_stmt): Added extra argument super. New
18703 local variable is_static_flag. Set class_to_search according to
18704 the nature of the constructor invocation. Don't add `this'
18705 argument when expanding NEW_CLASS_EXPR. Check for illegal method
18706 invocation within the argument scope of explicit constructor
18707 invocation. Set is_static according to is_static_flag. Provide
18708 extra `super' argument to patch_invoke invocation.
18709 (patch_invoke): New argument from_super. Loop on arguments
18710 indentation fixed. Pass from_super to invocation_mode. New switch
18711 case INVOKE_SUPER. Fixed error message in switch default case.
18712 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
18714 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
18715 (lookup_method_invoke): Fixed prototypes in candidates list. Error
18716 message takes constructors into account.
18717 (find_applicable_accessible_methods_list): Fixed indentation.
18718 (qualify_ambiguous_name): Take explicit constructor invocation
18719 into account. Deal with a conditional expression as a primary to
18721 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
18722 case. Added extra argument to patch_method_invocation_stmt.
18723 Register calls made to explicit constructor `this'. Don't call
18724 save_expr in ARRAY_REF case when emitting class files. Check for
18725 illegal use of this when expanding explicit constructor invocation
18727 (complete_function_arguments): Set and reset parser context
18728 explicit_constructor_p field value when appropriate.
18729 (build_super_invocation, build_this_super_qualified_invocation):
18731 (patch_assignment): Fixed typo.
18732 (patch_unaryop): Check on final fields occurs only when a decl
18734 (patch_return): Take constructors into account.
18735 (patch_conditional_expr): New function.
18736 * typeck.c (build_java_signature): Removed unnecessary empty line.
18738 1998-10-28 Jeffrey A Law (law@cygnus.com)
18740 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
18742 1998-10-28 Tom Tromey <tromey@cygnus.com>
18744 * decl.c (init_decl_processing): Renamed fields.
18745 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
18746 interface_len, msize fields.
18748 * class.c (make_class_data): Removed subclass_head and
18749 subclass_next fields.
18750 * decl.c (init_decl_processing): Removed subclass_head and
18751 subclass_next fields.
18753 1998-10-28 Jeffrey A Law (law@cygnus.com)
18755 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
18756 * mangle.c (emit_unicode_mangled_name): Similarly.
18758 1998-10-26 Nick Clifton <nickc@cygnus.com>
18760 * jcf-parse.c (get_constant): Place braces around code to compute
18761 'd' when REAL_ARITHMETIC is not defined.
18763 1998-10-25 H.J. Lu (hjl@gnu.org)
18765 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
18768 1998-10-23 Tom Tromey <tromey@cygnus.com>
18770 * lang-specs.h: `.zip' files are input to jc1.
18772 1998-10-22 Per Bothner <bothner@cygnus.com>
18774 * jvspecs.c: Add (but don't enable) support for combining multiple
18775 .class and .java input filenames to a single jc1 invocation.
18776 Add support for -C flag (copile to .class files).
18777 Translate -classpath and -CLASSPATH arguments.
18778 * lang-specs.h: Don't set %2 spec.
18780 1998-10-22 Tom Tromey <tromey@cygnus.com>
18782 * jcf-path.c (add_entry): Don't add trailing separator if entry is
18784 (add_path): Don't add trailing separator to non-empty path
18787 * lang.c (lang_decode_option): Check for -fclasspath and
18788 -fCLASSPATH before examining other `-f' options.
18790 * java-tree.h (finalize_identifier_node): Don't declare.
18791 * class.c (make_class_data): Don't push "final" field.
18792 * decl.c (init_decl_processing): Don't push "final" field.
18793 (finalize_identifier_node): Removed.
18794 (init_decl_processing): Don't set finalize_identifier_node.
18796 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
18798 1998-10-11 Anthony Green <green@cygnus.com>
18800 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
18801 (JV_SCAN_SOURCES): New macro.
18802 (JCF_DUMP_SOURCES): Likewise.
18803 (jcf-dump$(exeext)): New target.
18804 (jv-scan$(exeext)): New target.
18806 1998-10-22 Tom Tromey <tromey@cygnus.com>
18808 * Makefile.in (LEX): Removed.
18809 (LEXFLAGS): Likewise.
18810 (SET_BISON): New macro.
18812 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
18813 spurious diffs in parse.c.
18814 ($(PARSE_SCAN_C)): Likewise.
18815 (PARSE_DIR): New macro.
18817 (PARSE_SCAN_C): Likewise.
18818 (PARSE_RELDIR): New macro.
18820 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
18822 * jcf-io.c (find_class): Use saw_java_source to determine when to
18823 look for `.java' file.
18824 * jcf-parse.c (saw_java_source): New global.
18825 (yyparse): Set it if `.java' file seen.
18827 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
18828 (GCJH_SOURCES): Likewise.
18829 * Makefile.in (datadir): New macro.
18830 (libjava_zip): Likewise.
18831 (JAVA_OBJS): Added jcf-path.o.
18832 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18833 (../gcjh$(exeext)): Likewise.
18834 (jcf-path.o): New target.
18835 * java-tree.h (fix_classpath): Removed decl.
18836 * jcf-parse.c (fix_classpath): Removed.
18837 (load_class): Don't call fix_classpath.
18838 * parse.y (read_import_dir): Don't call fix_classpath.
18839 * lex.h: Don't mention classpath.
18840 * lex.c (java_init_lex): Don't initialize classpath.
18841 * jcf-io.c (classpath): Removed global.
18842 (find_class): Use jcf_path iteration functions. Correctly search
18843 class path for .java file.
18844 (open_in_zip): New argument `is_system'.
18845 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
18846 classpath-related options.
18847 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
18849 (lang_init): Call jcf_path_init.
18850 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
18851 * lang-specs.h: Handle -I. Minor cleanup to -M options.
18852 Correctly put braces around second string in each entry.
18853 * gjavah.c (main): Call jcf_path_init. Recognize all the new
18854 classpath-related options.
18855 (help): Updated for new options.
18856 * jcf.h: Declare functions from jcf-path.c. Don't mention
18857 `classpath' global.
18858 * jcf-path.c: New file.
18860 * jcf-depend.c: Include jcf.h.
18862 * jcf-write.c (localvar_alloc): Returns `void'.
18863 (localvar_free): Removed unused variable.
18865 * lang.c (OBJECT_SUFFIX): Define if not already defined.
18866 (init_parse): Use OBJECT_SUFFIX, not ".o".
18868 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
18870 * class.c (emit_register_classes): Renamed from
18871 emit_register_class.
18872 * java-tree.h (emit_register_classes): Prototype renamed from
18873 emit_register_class.
18874 * jcf-parse.c (yyparse): Call emit_register_classes once before
18876 * parse.y (java_expand_classes): No longer register classes.
18878 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
18880 * class.c (is_compiled_class): New local variable
18881 seen_in_zip. Identify classes found in currently compiled source
18883 * decl.c (complete_start_java_method): Fixed typo.
18884 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
18885 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
18886 (CLASS_P): Moved around.
18887 (java_parse_abort_on_error): Macro moved from jcf-parse.c
18888 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
18890 (jcf_parse_source): Changed leading comment. Removed unnecessary
18891 fclose and CLASS_FROM_SOURCE_P marking.
18892 (parse_source_file): New local variables remember_for_generation
18893 and filename. Mark parsed file name identifier node. Removed block
18894 executed when parse_only was null. Set remember_for_generation.
18895 Use it as an argument to java_pop_parser_context.
18896 (yyparse): New local variables several_files, list, next node and
18897 current_file_list. Split ampersand separated file names into
18898 current_file_list. Iterate through the list and parse accordingly.
18899 * parse.h (java_pop_parser_context): New function prototype.
18900 * parse.y (ctxp_for_generation): New static global variable.
18901 (java_pop_parser_context): New argument generate. Link popped ctxp
18902 to ctxp_for_generation list accordingly.
18903 (java_complete_expand_methods): Fixed indentation.
18904 (java_expand_classes): New function.
18906 1998-10-17 Per Bothner <bothner@cygnus.com>
18908 * Makefile.in: Link with libiberty.a instead of memmove.o.
18910 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
18912 * lex.c (setjmp.h): No longer included.
18913 * lex.h (setjmp.h): Included.
18914 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
18915 (duplicate_declaration_error_p): Renamed from
18916 duplicate_declaration_error.
18917 (build_array_from_name): New function prototype.
18918 * parse.y (setjmp.h): No longer included.
18919 (variable_declarator_id): Define action.
18920 (build_array_from_name): New function.
18921 (duplicate_declaration_error_p): Renamed from
18922 duplicate_declaration_error. Fixed leading comment.
18923 (register_fields): Main `for' loop reorganized. Uses
18924 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
18925 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
18926 build_array_from_name.
18927 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
18929 (read_import_dir): Don't try to skip `.' and `..'.
18930 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
18931 build_array_from_name. Main `for' loop reorganized.
18932 (resolve_qualified_expression_name): When building access to a
18933 field, use the type where the field was found, not its own type.
18934 (maybe_access_field): Use field DECL_CONTEXT if the type where the
18935 field was found is null.
18936 (qualify_ambiguous_name): Sweep through all successive array
18939 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
18941 * java-tree.h (pop_labeled_block, lang_printable_name,
18942 maybe_add_interface, set_super_info, get_access_flags_from_decl,
18943 interface_of_p, inherits_from_p, fix_classpath,
18944 complete_start_java_method, emit_handlers, init_outgoing_cpool,
18945 make_class_data, register_class, alloc_name_constant): New
18946 function prototypes.
18947 * lang.c (lang_decode_option): Set argc argument unused. Fixed
18948 indentation. Added cast to remove warning.
18949 (lang_printable_name): Set v argument unused.
18950 (lang_print_error): Added argument to lang_printable_name call.
18951 (java_dummy_print, print_lang_decl, print_lang_type,
18952 print_lang_identifier, lang_print_xnode): All argument marked
18954 * lex.c (java_unget_unicode): Removed unnecessary argument.
18955 (java_allocate_new_line): Unused local variable is gone.
18956 (java_read_char): Added parenthesis in expressions to remove
18957 warnings. Added final return statement.
18958 (java_read_unicode): Added parenthesis in expression to remove
18960 (java_parse_end_comment): Fixed java_unget_unicode invocation.
18961 (java_parse_escape_sequence): Likewise.
18962 (java_lex): Unused local variables are gone. Fixed
18963 java_unget_unicode invocation.
18964 * lex.h (set_float_handler): Prototype added when JC1_LITE not
18966 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
18967 lang_printable_name invocation in macro.
18968 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
18970 (duplicate_declaration_error): Suppressed unused argument in
18972 (identical_subpath_p): Function declaration is gone.
18973 (patch_invoke): Suppressed unused argument in prototype.
18974 (patch_cast, build_labeled_block, check_thrown_exceptions):
18976 * parse.y (setjmp.h): Included
18977 (toplev.h): Likewise.
18978 (field_declaration:): Suppressed unused local
18979 (label_decl:): Fixed build_labeled_block invocation.
18980 (java_pop_parser_context): Put extra parenthesis around assignment
18982 (yyerror): Suppressed unused local variables.
18983 (variable_redefinition_error): Fixed lang_printable_name
18985 (create_interface): Suppressed unused local variables.
18986 (create_class): Likewise.
18987 (duplicate_declaration_error): Suppressed unused argument. Fixed
18988 lang_printable_name invocation.
18989 (register_fields): Suppressed unused local variable. Fixed
18990 duplicate_declaration_error invocation.
18991 (method_header): Suppressed unused local variable.
18992 (method_declarator, parser_check_super): Likewise.
18993 (java_complete_class): Suppressed unused local variable. Fixed
18994 fatal error message.
18995 (complete_class_report_errors): Added default: in switch.
18996 (java_check_regular_methods): Fixed lang_printable_name
18998 (check_throws_clauses): Likewise.
18999 (java_check_abstract_methods): Suppressed unused local
19000 variable. Fixed lang_printable_name invocation.
19001 (read_import_entry): Added supplemental return statement.
19002 (read_import_dir): Suppressed unused local variables.
19003 (check_pkg_class_access, declare_local_variables): Likewise.
19004 (source_start_java_method): Suppressed unused extern variable
19006 (expand_start_java_method): Suppressed unused extern and local
19007 variable declarations.
19008 (java_complete_expand_methods): Likewise.
19009 (java_complete_expand_method): Suppressed unused local variables.
19010 (make_qualified_name): Likewise.
19011 (resolve_qualified_expression_name): Added default: in
19012 switch. Fixed lang_printable_name invocation.
19013 (class_instance_creation_expression): Added parenthesis around
19015 (patch_method_invocation_stmt): Fixed lang_printable_name and
19016 patch_invoke invocations.
19017 (check_for_static_method_reference): Fixed lang_printable_name
19019 (patch_invoke): Suppressed unused arguments and local variables.
19020 (lookup_method_invoke): Suppressed unused local variables.
19021 (qualify_ambiguous_name): Added default: in switch.
19022 (identical_subpath_p): Function removed.
19023 (patch_assignment): Suppressed unused local variables. Suppressed
19024 unnecessary if statement. Fixed lang_printable_name invocations.
19025 (try_builtin_assignconv): Fixed lang_printable_name invocations.
19026 (valid_ref_assignconv_cast_p): Parenthesis around
19027 expression. Suppressed unused local variables.
19028 (build_binop): Suppressed unused local variables. fixed
19029 lang_printable_name invocations.
19030 (string_constant_concatenation): Suppressed unused local
19032 (patch_unaryop): Fixed lang_printable_name invocation.
19033 (patch_cast): Suppressed unnecessary argument. Fixed
19034 lang_printable_name invocation.
19035 (patch_array_ref): Fixed lang_printable_name invocation.
19036 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19037 (build_labeled_block): Suppressed unused argument.
19038 (generate_labeled_block): Fixed build_labeled_block invocation.
19039 (build_loop_body): Suppressed unused local variables.
19040 (patch_loop_statement): Likewise.
19041 (patch_exit): Fixed lang_printable_name invocation.
19042 (patch_switch_statement): Likewise.
19043 (case_identity): First argument marked unused.
19044 (patch_try_statement): Fixed lang_printable_name invocations.
19045 (patch_synchronized_statement, patch_throw_statement): Likewise.
19046 (check_thrown_exceptions): Fixed check_thrown_exceptions and
19047 lang_printable_name invocations.
19048 (check_thrown_exceptions_do): Suppressed unused argument.
19050 1998-10-14 Tom Tromey <tromey@cygnus.com>
19052 * jcf-write.c (write_classfile): Add output class file as target.
19053 * lang-options.h: Added -MD, -MMD, -M, and -MM.
19054 * jcf.h: Added declarations for dependency-tracking functions.
19055 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19056 * lang.c (lang_decode_option): Recognize -MD and -MMD.
19057 (finish_parse): Call jcf_dependency_write.
19058 (dependency_tracking): New global.
19059 (DEPEND_SET_FILE): New define.
19060 (DEPEND_ENABLE): New define.
19061 (init_parse): Enable dependency tracking if required.
19063 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19064 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19065 (../gcjh$(exeext)): Likewise.
19066 (jcf-depend.o): New target.
19067 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19068 (GCJH_SOURCES): Likewise.
19069 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
19071 (find_classfile): Added dep_name argument.
19072 (find_class): Compute name of dependency.
19073 (open_in_zip): Call jcf_dependency_add_file.
19074 * gjavah.c (output_file): No longer global.
19075 (usage): Don't mention "gjavah".
19077 (java_no_argument): Likewise.
19078 (version): Likewise.
19079 (main): Recognize and handle -M family of options.
19080 (print_mangled_classname): Return is void.
19081 (process_file): Handle case where output is suppressed.
19082 (HANDLE_END_FIELD): Likewise.
19083 (HANDLE_METHOD): Likewise.
19084 * jcf-depend.c: New file.
19086 1998-10-13 Jeffrey A Law (law@cygnus.com)
19088 * java-tree.def: Add missing newline at EOF.
19090 1998-10-13 Tom Tromey <tromey@cygnus.com>
19092 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19093 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
19095 Include <config.h> and "system.h".
19096 (disassemble_method): Undefine RET to avoid clash with
19097 config/i386/i386.h.
19099 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
19101 * decl.c (runtime_exception_type_node, error_exception_type_node):
19102 New global variables.
19103 (init_decl_processing): Initialized.
19104 * expr.c (java_lang_expand_expr): Set caught exception type to
19105 null if catch handler argument doesn't exit.
19106 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19108 * java-tree.h (runtime_exception_type_node,
19109 error_exception_type_node): Global variables declared.
19110 (DECL_FUNCTION_THROWS): New macro.
19111 (DECL_FUNCTION_BODY): Modified comment.
19112 (DECL_SPECIFIC_COUNT): Likewise.
19113 (struct lang_decl): New field throws_list.
19114 (IS_UNCHECKED_EXPRESSION_P): New macro.
19115 * lex.c (java_lex): Generate location information for THROW_TK.
19116 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19117 EXCEPTIONS_P): New macros.
19118 (enum jdep_code): New value JDEP_EXCEPTION.
19119 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19120 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19121 PATCH_METHOD_RETURN_ERROR): New macros.
19122 (patch_method_invocation_stmt): Added new argument to prototype.
19123 (patch_synchronized_statement, patch_throw_statement,
19124 check_thrown_exceptions, check_thrown_exceptions_do,
19125 purge_unchecked_exceptions, check_throws_clauses): New function
19127 * parse.y Fixed typo in keyword section.
19128 (throw:): Rule tagged <node>.
19129 (THROW_TK): Keyword tagged <operator>.
19130 (method_header:): Last argument to call to method_header passed
19132 (throws:, class_type_list:, throw_statement:,
19133 synchronized_statement:, synchronized:): Defined actions.
19134 (method_header): New local variable current. Register exceptions
19135 from throws clause.
19136 (java_complete_tree): Complete and verify exceptions from throws
19138 (complete_class_report_errors): Error message on exceptions not
19140 (java_check_regular_methods): Fixed typo. Shortcut on private
19141 overriding methods. Changed error message on method
19142 redefinition. Check for throws clause compatibility.
19143 (check_throws_clauses): New function.
19144 (java_check_abstract_methods): Use DECL_NAME for wfl or current
19145 method. Changed error message on method redefinition.
19146 (currently_caught_type_list): New static variable.
19147 (java_complete_expand_methods): Purge unchecked exceptions from
19148 throws clause list. Call PUSH_EXCEPTIONS before walk and
19149 POP_EXCEPTIONS after.
19150 (resolve_qualified_expression_name): Pass new argument as NULL to
19151 patch_method_invocation_stmt.
19152 (patch_method_invocation_stmt): New argument ref_decl. Invoke
19153 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19154 argument list when appropriate. Use new argument if non null to
19155 store selected method decl.
19156 (patch_invoke): Convert if necessary args of builtin types before
19157 forming CALL_EXPR. Argument list no longer reversed here.
19158 (invocation_mode): Treat final methods as static methods.
19159 (java_complete_tree): New cases for THROW_EXPR: and
19160 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19162 (complete_function_arguments): No more RECORD_TYPE
19163 conversion. Function parameter nodes no longer saved.
19164 (valid_ref_assignconv_cast_p): Avoid handling null type.
19165 (patch_binop): Fixed null constant reference handling.
19166 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19167 BUILD_THROW macros.
19168 (patch_try_statement): Fixed comments. Record caught types in
19169 list, push the list, expand try block and pop the list.
19170 (patch_synchronized_statement, patch_throw_statement,
19171 check_thrown_exceptions, check_thrown_exceptions_do,
19172 purge_unchecked_exceptions): New functions.
19173 * typeck.c (lookup_argument_method): Allow WFL in place of method
19174 DECL_NAME during method definition check
19176 1998-10-09 Tom Tromey <tromey@cygnus.com>
19178 * gjavah.c (decode_signature_piece): New function.
19179 (print_c_decl): Use it. Added `name_override' argument.
19180 (print_method_info): Use name_override argument to print_c_decl.
19181 (seen_fields): Removed.
19182 (print_field_info): Don't update seen_fields.
19183 (struct method_name): New structure.
19184 (method_name_list): New global.
19185 (print_method_info): Add new method to list of methods.
19186 (name_is_method_p): New function.
19187 (print_field_info): If field name has same name as method, then
19189 (process_file): Parse methods before fields.
19190 (field_pass): New global.
19191 (HANDLE_END_FIELD): Take field_pass into account.
19193 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19195 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19196 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19198 1998-10-03 Anthony Green <green@cygnus.com>
19200 * jvspec.c: Fix bug in jvgenmain_spec patch.
19202 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19204 * Makefile.in (lang.o:): Install dependency on java-tree.def.
19205 * decl.c (soft_exceptioninfo_call_node): New global variable.
19206 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19207 takes extra integer argument. soft_exceptioninfo_call_node
19209 * except.c (java_set_exception_lang_code): New function
19210 (method_init_exceptions): Called here.
19211 (prepare_eh_table_type): New function.
19212 (expand_end_java_handler): Called here.
19213 * expr.c (build_java_throw_out_of_bounds_exception): Now features
19214 one argument. Modified generation of call to
19215 soft_badarrayindex_node to use new argument.
19216 (build_java_arrayaccess): Pass faulty index value to
19217 build_java_throw_out_of_bounds_exception.
19218 (generate_name): New function.
19219 (java_lang_expand_expr): New local variables node, current,
19220 has_finally_p. Expand TRY_EXPR node.
19221 (process_jvm_instruction): Replace top of the stack with thrown
19222 object reference when entering exception handler.
19223 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19224 specific tree codes.
19225 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19227 (DECL_SPECIFIC_COUNT): New macro.
19228 (prepare_eh_table_type, java_set_exception_lang_code,
19229 generate_name): New function declarations.
19230 (match_java_method): Declaration deleted.
19231 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19233 * lex.c (TRY_TK, CATCH_TK): Generate location information.
19234 * parse.h (redefinition_error, refine_accessible_methods_list,
19235 can_cast_to_p): Function declaration removed.
19236 (classitf_redefinition_error, variable_redefinition_error,
19237 parse_jdk1_1_error, find_applicable_accessible_methods_list,
19238 find_most_specific_methods_list, argument_types_convertible,
19239 enter_a_block, valid_builtin_assignconv_identity_widening_p,
19240 valid_cast_to_p, valid_method_invocation_conversion_p,
19241 try_reference_assignconv, add_stmt_to_compound,
19242 build_jump_to_finally, build_tree_list, patch_try_statement,
19243 java_get_catch_block): New function declarations.
19244 * parse.y (string_buffer_type): Global variable deleted.
19245 (group_of_labels, catches, catch_clause, catch_clause_parameter,
19246 finally): Rules tagged <node>.
19247 (TRY_TK, CATCH_TK): Token tagged <operator>.
19248 (class_body_declaration:, class_member_declaration:,
19249 formal_parameter:, explicit_constructor_invocation:,
19250 interface_member_declaration:, constant_declaration:,
19251 primary_no_new_array:, class_instance_creation_expression:,
19252 array_creation_expression:): Issue error on unsuported JDK1.1
19254 (try_statement:, catches:, finally:): Define actions.
19255 (catch_clause_parameter): New rule.
19256 (catch_clause:): Use new rule catch_clause_parameter.
19257 (parse_jdk1_1_error): New function.
19258 (redefinition_error): Renamed classitf_redefinition_error.
19259 (variable_redefinition_error): New function.
19260 (check_class_interface_creation): Call
19261 classitf_redefinition_error.
19262 (java_complete_tree): Added error message on JDEP_TYPE: case.
19263 (complete_class_report_errors): Fixed indentation.
19264 (declare_local_variables): Call variable_redefinition_error.
19265 (source_end_java_method): Call java_set_exception_lang_code and
19266 emit_handlers where appropriate.
19267 (java_method_add_stmt): Call add_stmt_to_block.
19268 (add_stmt_to_block): New function.
19269 (lookup_method_invoke): Fixed outside comment. new local variable
19270 candicates. Call find_applicable_accessible_methods_list and
19271 find_most_specific_methods_list when searching for a
19272 method. Modified error report to list possible candidates when
19274 (find_applicable_accessible_methods_list,
19275 find_most_specific_methods_list, argument_types_convertible): New
19277 (refine_accessible_methods_list): Function deleted.
19278 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19279 expr (if applicable) before calling patch_array_ref.
19280 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19281 (enter_block): Fixed comment.
19282 (enter_a_block): New function.
19283 (patch_assignment): Reorganized. Call try_reference_assignconv for
19284 references. Call valid_cast_to_p instead of can_cast_to_p.
19285 (try_reference_assignconv,
19286 valid_builtin_assignconv_identity_widening_p): New functions.
19287 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19288 (valid_cast_to_p, valid_method_invocation_conversion_p): New
19290 (build_string_concatenation): Don't resolve StringBuffer.
19291 (patch_cast): Fixed inverted arguments.
19292 (patch_array_ref): Code to save array expr deleted. Call
19293 valid_cast_to_p instead of can_cast_to_p.
19294 (generate_labeled_block): Call generate_name.
19295 (build_jump_to_finally, build_try_statement, java_get_catch_block,
19296 patch_try_statement): New functions.
19297 * typeck.c (match_java_method): Function deleted.
19299 1998-10-02 Anthony Green <green@cygnus.com>
19301 * jvspec.c: jvgenmain_spec uses different temporary file names.
19303 1998-10-02 Anthony Green <green@cygnus.com>
19305 * jvspec.c (lang_specific_driver): Fail if user specifies
19306 --main= when not linking.
19308 1998-09-28 Tom Tromey <tromey@cygnus.com>
19310 * class.c (make_class_data): Push value for `thread' field.
19311 * decl.c (init_decl_processing): Added `thread' field to class.
19313 * class.c (add_field): Always make static fields externally
19316 1998-09-26 Anthony Green <green@cygnus.com>
19318 * expr.c (build_java_athrow,
19319 build_java_throw_out_of_bounds_exception, expand_invoke,
19320 build_newarray, expand_java_multianewarray, build_java_monitor):
19321 Update comments to reflect _Jv_* function names.
19323 1998-09-25 Per Bothner <bothner@cygnus.com>
19325 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
19326 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
19327 * parse.y (expand_start_java_method): Likewise.
19329 1998-09-24 Per Bothner <bothner@cygnus.com>
19331 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
19333 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19334 (add_field): No longer need to convert from RECORD_TYPE to pointer,
19335 * expr.c: Remove no-longer-needed calls to promote_type.
19336 * decl.c (give_name_to_locals): Liekwise.
19337 * jcf-parse.c (get_class_constant): Compensate for new signatures.
19338 * parse.y: Add/remove promote_type calls as appropriate.
19339 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
19340 (parse_signature_string): Likewise.
19341 (build_java_array_type): Fix for now signature convenions.
19343 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
19345 1998-09-23 Tom Tromey <tromey@cygnus.com>
19347 * class.c (init_class_processing): libjava function renamed to
19350 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
19352 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19353 * java-tree.def: Fixed DEFTREECODE third argument.
19354 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
19355 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
19356 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19357 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19358 JAVA_THIS_EXPR): Now replaced by tree code definitions.
19359 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19360 * lang.c (java_tree_code_type, java_tree_code_length,
19361 java_tree_code_name): New arrays.
19362 (lang_init): Append Java tree node definitions to Gcc ones.
19363 * lex.c (expression_obstack): Declared as extern when JC1_LITE
19365 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
19367 (java_lex): Allow declaration of empty string constants. Retain
19368 location information on CASE_TK and DEFAULT_TK.
19369 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
19370 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19371 Modified to be more robust.
19372 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19373 (build_new_invocation, try_builtin_assignconv,
19374 patch_switch_statement, string_constant_concatenation,
19375 build_string_concatenation, patch_string_cst, patch_string,
19376 java_expand_switch): New function declarations.
19377 * parse.y: Rules related to switch and EH tagged <node>.
19378 (label_id): Set to NULL_TREE
19379 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
19381 (this_or_super:): Fixed indentation.
19382 (statement:, statement_nsi:, statement_without_trailing_substatement:,
19383 statement_expression:): Removed call to RULE on all sub-rules.
19384 (switch_expression:, switch_labels:): New rules.
19385 (switch_statement:, switch_block:, switch_block_statement_groups:,
19386 switch_block_statement_group:, switch_labels:, switch_label:):
19388 (throw_statement:, synchronized_statement:, try_statement:):
19389 Defined temporary actions.
19390 (class_instance_creation_expression:): Call
19391 build_new_invocation. Fixed indentation.
19392 (field_access): Fixed indentation.
19393 (method_invocation): Likewise.
19394 (make_qualified_primary): Use THIS_EXPR.
19395 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
19396 resolving from SUPER, set *type_found.
19397 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19398 (java_complete_tree): Removed unused local variable `location'. Case
19399 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19400 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19401 on MODIFY_EXPR: and all binary operator tree code cases. Removed
19402 STRING_CST: case. default: checks for patchable strings.
19403 (complete_function_arguments): Transform string constant or
19404 crafted StringBuffer if necessary.
19405 (build_method_invocation): Fixed comments.
19406 (build_new_invocation): New function.
19407 (patch_assignment): Call try_builtin_assignconv to figure a valid
19408 assignment conversion between builtin types.
19409 (try_builtin_assignconv): New function.
19410 (build_binop): Use URSHIFT_EXPR directly to call build.
19411 (operator_string): Use UNARY_PLUS_EXPR.
19412 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
19414 (do_merge_string_cste, merge_string_cste,
19415 string_constant_concatenation, build_string_concatenation,
19416 patch_string, patch_string_cst): New function.
19417 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19418 (patch_unaryop): Likewise. New test of valid ++/-- operands.
19419 (build_newarray_node): Use NEW_ARRAY_EXPR.
19420 (build_this): Use THIS_EXPR.
19421 (build_return): Enable debug information on return statement.
19422 (build_if_else_statement): Likewise.
19423 (complete_labeled_statement): Fixed related comment.
19424 (build_loop_body): Fixed comment.
19425 (build_bc_statement): Enable debug information on break/continue
19427 (patch_bc_statement): Fixed typos. Handle SWITCH statement
19429 (patch_switch_statement, case_identity, java_expand_switch): New
19432 1998-09-21 Per Bothner <bothner@cygnus.com>
19434 * buffer.h (BUFFER_INIT): New macro.
19435 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
19436 Pass (struct jcf_partial *state) to most functions.
19437 (jcf_block, jcf_relocation): New types.
19438 Support labels, branches, conditionals, loops.
19440 1998-09-21 Tom Tromey <tromey@cygnus.com>
19442 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19444 1998-09-21 Per Bothner <bothner@cygnus.com>
19446 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
19447 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
19448 not integer_type_node (INT_TYPE_SIZ bits).
19450 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
19452 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
19453 * jcf-dump.c (print_exception_table): New function.
19454 (disassemble_method): Better handling of wide instructions.
19455 Make more robust for bad input.
19457 1998-09-30 Jeffrey A Law (law@cygnus.com)
19459 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19462 1998-09-17 Jeffrey A Law (law@cygnus.com)
19464 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19466 1998-09-17 Tom Tromey <tromey@cygnus.com>
19468 * Makefile.in ($(PARSE_H)): Removed target.
19470 1998-09-17 Jeffrey A Law (law@cygnus.com)
19472 * Makefile.in (JAVA_OBJS): Add memmove.o
19473 (memmove.o): New target & rules.
19475 1998-09-15 Tom Tromey <tromey@cygnus.com>
19477 * expr.c (expand_invoke): Don't generate a call to the class init
19480 1998-09-14 Jeffrey A Law (law@cygnus.com)
19482 * Makefile.in: Add many missing dependencies.
19483 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
19485 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
19486 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
19488 1998-09-11 Per Bothner <bothner@cygnus.com>
19490 * decl.c (complete_start_java_method): If method is static (and
19491 not private) call _Jv_InitClass.
19492 * expr.c (expand_invoke): Don't call build_class_init.
19494 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
19496 1998-09-10 Jeffrey A Law (law@cygnus.com)
19498 * Make-lang.in (GCJ): Define before using.
19500 1998-09-09 Jeffrey A Law (law@cygnus.com)
19502 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
19503 losing due to namespace pollution in GNU getopt.h
19505 1998-09-09 Tom Tromey <tromey@cygnus.com>
19507 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
19508 (java.all.cross): Likewise.
19509 (java.rest.encap): Likewise.
19511 1998-09-08 Jeffrey A Law (law@cygnus.com)
19513 * gjavah.c (print_class_decls): Fix thinko in arglist
19514 * jcv-io.c (find_classfile): Similarly.
19516 1998-09-07 Jeffrey A Law (law@cygnus.com)
19518 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
19520 1998-09-05 Tom Tromey <tromey@cygnus.com>
19522 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
19523 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
19524 * Makefile.in (PARSE_C): New macro.
19525 (PARSE_H): Likewise.
19526 (PARSE_SCAN_C): Likewise.
19527 ($(PARSE_C)): Target renamed from parse.c.
19528 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
19529 (clean): Remove parse-scan.c as well.
19530 (parse.o): Depend on $(PARSE_C).
19532 1998-09-05 Anthony Green <green@cygnus.com>
19534 * README, license.terms: Removed.
19536 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
19537 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
19538 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
19539 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
19540 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
19541 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
19542 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
19543 and Java trademark attribution.
19545 1998-09-04 Tom Tromey <tromey@cygnus.com>
19547 * Makefile.in: Use gcjh, not gjavah.
19548 * config-lang.in (stagestuff): Use gcjh, not gjavah.
19549 * Make-lang.in: Changed gjavah to gcjh everywhere.
19551 1998-09-03 Per Bothner <bothner@cygnus.com>
19553 * gjavah.c: Support new -prepend -add -append flags.
19554 (print_method_info): Method is not virtual if class is final.
19556 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
19558 * jv-scan.c: Fixed copyright assignment.
19559 * keyword.gperf: Likewise.
19560 * keyword.h: Likewise.
19561 * lex.c: Fixed copyright assignment.
19562 (java_lex): Push unicode back when parsing '<'.
19563 * lex.h: Fixed copyright assignment.
19564 * parse-scan.y: Likewise.
19565 * parse.h: Fixed copyright assignment.
19566 (build_debugable_stmt, complete_for_loop): New function prototypes.
19567 * parse.y: Fixed copyright assignment.
19568 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
19569 size_zero_node when completing a loop with no exit condition.
19570 (for_statement_nsi:): Define action.
19571 (for_init:, for_update:): Return size_zero_node when empty.
19572 (declare_local_variables): Call build_debugable_stmt.
19573 (build_debugable_stmt): New function.
19574 (build_loop_body): Build debugable statement around loop
19576 (complete_loop_body): Take into account the debugable statement
19577 around the EXIT_EXPR.
19578 (complete_loop_body): New function.
19579 (patch_exit_expr): Fixed condition inversion.
19581 1998-09-02 Tom Tromey <tromey@cygnus.com>
19583 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
19584 name of thread define.
19585 * jvspec.c (THREAD_NAME): New macro.
19587 (THREADLIB): Likewise.
19588 (lang_specific_driver): Recognize attempt to link with thread
19589 library or gc library. Recognize -ljava on command line so it
19590 isn't linked against more than once.
19592 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19594 * parse-scan.y (report_main_declaration): Name of the class
19595 containing `main' can be a qualified name.
19597 1998-08-31 Tom Tromey <tromey@cygnus.com>
19599 * config-lang.in: Changed gjavac to gjc everywhere.
19600 * Make-lang.in: Changed gjavac to gjc everywhere.
19602 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
19604 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
19605 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
19606 and install the files.
19607 * Makefile.in (JAVA_OBJS_LITE): New variable.
19608 (compiler:): Now include jv-scan as a dependency.
19609 (../jv-scan$(exeext), parse-scan.c): New targets.
19610 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
19611 * config-lang.in (compilers): Removed gcj, gjavah from the list.
19612 * jcf-parse.c (parse_source_file): Call java_layout_classes and
19613 check for errors even if parse_only.
19614 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
19616 (yylex): New function. Uses java_lex body.
19617 (java_lex): Removed commented out statement. Remove local variable
19618 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
19619 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
19620 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
19621 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
19622 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
19623 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
19625 (java_lex_error): Empty if JC1_LITE is defined.
19626 (java_get_line_col): Return 0 if JC1_LITE is defined.
19627 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
19628 SET_MODIFIER_CTX): Moved into the section containing the macros
19629 conditionally defined by JC1_LITE.
19630 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
19631 argument if JC1_LITE is defined.
19632 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
19633 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
19635 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
19636 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
19637 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
19638 to different values according to JC1_LITE.
19639 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
19640 declared if JC1_LITE set.
19641 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
19642 defined if JC1_LITE not set.
19643 (struct parser_ctx): Reorganized and skip the jc1 front end part
19645 (java_layout_classes): New function definition.
19646 (java_push_parser_context, java_init_lex, yyparse, yylex,
19647 yyerror): Prototype always declared. All other static function
19648 prototypes declared only if JC1_LITE is not set.
19649 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
19650 declared in parse.h.
19651 (java_layout_classes): New function.
19652 (java_complete_expand_methods): No longer layout the class here.
19653 * parse-scan.y: New file.
19654 * jv-scan.c: New file.
19656 1998-08-25 Tom Tromey <tromey@cygnus.com>
19658 * gjavah.c (main): Handle -friend option.
19659 (friend_specs): New global.
19660 (generate_access): Handle friend_specs.
19661 (process_file): Likewise.
19662 (MAX_FRIENDS): New macro.
19663 (friend_count): New global.
19664 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
19665 Changed all callers.
19667 1998-08-24 Per Bothner <bothner@cygnus.com>
19669 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
19670 (main): Handle processing all the entries of a named .zip archive.
19671 * jcf-io.c (jcf_trim_old_input): New function.
19672 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
19674 1998-08-24 Per Bothner <bothner@cygnus.com>
19676 * lang.c (flag_assume_compiled): Make default be on.
19678 1998-08-21 Per Bothner <bothner@cygnus.com>
19680 * jcf-dump.c: Add bunches of flags to control output more.
19681 (process_class): New function; support printing more than one class.
19682 (main): Support new --print-main and --javap flags.
19683 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
19684 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
19686 1998-08-20 Per Bothner <bothner@cygnus.com>
19688 Change mangling of dispatch table to match C++ vtable (w/thunks).
19689 * class.c (build_dtable_decl), java-tree.h: New function.
19690 (make_class_data): Call it.
19691 * decl.c (init_decl_processing): Likewise.
19693 1998-08-19 Warren Levy <warrenl@cygnus.com>
19695 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
19696 soft_anewarray; adjust args passed.
19697 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
19698 match _Jv_NewObjectArray.
19700 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
19702 * decl.c (push_labeled_block, pop_labeled_block): New functions.
19703 * expr.c (loopup_label): Call create_label_decl.
19704 (create_label_decl): New function.
19705 (java_lang_expand_expr): Call expand_start_bindings with argument
19707 * java-tree.h Added space after PROTO in function declarations
19709 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
19710 (create_label_decl, push_labeled_block): New function
19712 * lex.c (label_id): Initialize.
19713 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
19715 * parse.h Added space after PROTO in function declarations when
19717 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
19718 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
19719 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
19720 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
19722 (struct parser_ctxt): New fields current_loop,
19723 current_labeled_block.
19724 (build_if_else_statement, patch_if_else_statement,
19725 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
19726 generate_labeled_block, complete_labeled_statement,
19727 build_bc_statement, patch_bc_statement, patch_loop_statement,
19728 build_new_loop, build_loop_body, complete_loop_body): New function
19730 * parse.y (java_warning_count): New global variable.
19731 (label_id): New static variable.
19732 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
19733 (block:): Return size_zero_node when block is empty.
19734 (empty_statement:): Return size_zero_node.
19735 (statement:): Implement supplemental action when for_statement: is
19737 (label_decl:): New rule.
19738 (labeled_statement:): Rewritten using label_decl. Actions
19740 (labeled_statement_nsi:): Likewise.
19741 (if_then_statement): Actions implemented.
19742 (while_expression): New rule.
19743 (while_statement:): Rewritten using while_expression. Actions
19745 (while_statement_nsi:): Likewise.
19746 (do_statement_begin:): New rule.
19747 (do_statement:): Rewritten using do_statement_begin. Actions
19749 (for_statement:): Rewritten using for_begin. Actions implemented.
19750 (for_statement_nsi:): Likewise.
19751 (for_header:, for_begin:): New rules.
19752 (for_init:): Actions implemented.
19753 (statement_expression_list:, break_statement:,
19754 continue_statement:): Likewise.
19755 (yyerror): Count number of issued warning(s).
19756 (java_report_errors): Report error(s) and/or warning(s).
19757 (java_complete_class): Use build_java_argument_signature to
19758 recompute completed method signature.
19759 (java_check_regular_methods): New locals method_wfl and aflags.
19760 Use method_wfl instead of lookup_cl during error reports. Fixed
19761 indentation and modified some error messages. Use
19762 lang_printable_name in method instead of the DECL_NAME. New code
19763 to issue warnings on methods not overriding corresponding methods
19764 private to a different package.
19765 (java_method_add_stmt): Call add_stmt_to_compound.
19766 (add_stmt_to_compound): New function.
19767 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
19768 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
19769 (build_if_else_statement, patch_if_else_statement,
19770 build_labeled_block, generate_labeled_block,
19771 complete_labeled_statement, build_new_loop, build_loop_body,
19772 complete_loop_body, patch_loop_statement, build_bc_statement,
19773 patch_bc_statement, patch_exit_expr): New functions.
19774 * typeck.c (build_java_signature): Build argument signature before
19775 enclosing it in between parenthesis.
19777 1998-08-17 Warren Levy <warrenl@cygnus.com>
19779 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
19780 (JAVA_OBJS): Added reminder comment
19782 1998-08-13 Nick Clifton <nickc@cygnus.com>
19784 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
19785 be interpreted as a long long.
19787 1998-08-13 Warren Levy <warrenl@cygnus.com>
19789 * decl.c (init_decl_processing): Use _Jv_InitClass, not
19790 soft_initialise_class. Use _Jv_NewMultiArray, not
19791 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
19792 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
19793 _Jv_CheckArrayStore, not soft_checkarraystore. Use
19794 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
19796 1998-08-12 Per Bothner <bothner@cygnus.com>
19798 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
19799 length_identifier_node): New global tree node constants.
19800 * parse.y (kw_super, kw_this, kw_length): Removed globals.
19801 Replace uses by super_identifier_node etc.
19802 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
19804 * parse.y (resolve_field_access): Don't special-case ".length" if
19805 flag_emit_class_files.
19806 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
19807 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
19810 1998-08-11 Per Bothner <bothner@cygnus.com>
19812 * decl.c (init_decl_processing): Remove unused method_type_node fields.
19813 * class.c (make_method_value): Remove init for removed fields.
19815 * class.c (layout_class): Use build_java_argument_signature.
19816 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
19818 * typeck.c (push_java_argument_signature): Removed. Merged into ...
19819 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
19820 (build_java_signature): Don't use push_java_argument_signature.
19822 * typeck.c (lookup_argument_method): New function.
19823 * parse.y (java_check_regular_methods): Use lookup_argument_method
19824 instead of lookup_java_method2 followed by lookup_java_method.
19826 * parse.y (check_method_redefinition): Minor optimization.
19828 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
19829 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
19831 1998-08-10 Tom Tromey <tromey@cygnus.com>
19833 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
19836 * gjavah.c (java_float_finite): Use K&R-style definition.
19837 (java_double_finite): Likewise.
19838 (generate_access): Now returns void. Changed all callers.
19839 (last_access_generated): Removed.
19840 (process_file): Only make a single pass over the .class file.
19842 1998-07-29 Per Bothner <bothner@cygnus.com>
19844 * class.c (get_dispatch_table): Add extra dummy vtable entry,
19845 for compatibility for G++ (with -fvtable-thunks).
19846 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
19848 * gjavah.c (process_file): Use public inheritance for super-class.
19850 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
19852 * lex.c (java_init_lex): Initialize ctxp->package.
19853 * parse.h (struct parser_ctxt): package and package_len replaced
19854 by tree package, an identifier node. Field method_decl_list is
19855 gone. Fixed comments.
19856 (lookup_field_wrapper, merge_qualified_name, not_accessible,
19857 class_in_current_package): New function prototypes.
19858 * parse.y (array_type:): Set class loaded flag on primitive type
19860 (package_declaration:): Assign ctxp->package to the
19862 (method_invocation:): Handle invocation of method qualified by
19864 (single_type_import_declaration:): Removed ambiguity check.
19865 (java_pop_parser_context): New local variable `next'. Reset and
19866 set IMPORT_CLASSFILE_NAME flags on current and previous import
19868 (java_accstring_lookup): Use new local macro COPY_RETURN.
19869 (lookup_field_wrapper): New function.
19870 (parser_qualified_classname): Use merge_qualified_name.
19871 (parser_check_super_interface): Broaden error message.
19872 (do_resolve_class): Check for qualified class name in the current
19873 compilation unit if appropriate.
19874 (process_imports): Check for already defined classes.
19875 (check_pkg_class_access): Got rid of call to
19876 get_access_flags_from_decl.
19877 (java_complete_expand_methods): Call safe_layout_class based on
19878 the current class size.
19879 (make_qualified_primary): Build a WFL qualification on primary if
19881 (merge_qualified_name): New function.
19882 (make_qualified_name): Use merge_qualified_name.
19883 (resolve_expression_name): Use safe_lookup_field.
19884 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
19885 (resolve_qualified_expression_name): Likewise. Check on resolved
19886 element accessibility.
19887 (not_accessible_p, class_in_current_package): New functions.
19888 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
19889 (patch_method_invocation_stmt): Merged common pieces. Check
19890 accessibility of invoked method.
19891 (check_for_static_method_reference): Add returned type in error
19893 (invocation_mode): Get rid of bogus check on PRIVATE methods.
19894 (refine_accessible_methods_list): Merged two conditions in test.
19895 (java_complete_class): Sanity check on stabilize_ref gone.
19896 * zextract.c (read_zip_archive): Cast lseek second argument to long.
19898 1998-07-28 Per Bothner <bothner@cygnus.com>
19900 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
19902 1998-07-24 Tom Tromey <tromey@cygnus.com>
19904 * gjavah.c (F_NAN): Removed.
19905 (F_NAN_MASK): New macro.
19906 (F_POSITIVE_INFINITY): Removed.
19907 (F_NEGATIVE_INFINITY): Likewise.
19908 (java_float_finite): Rewrote.
19909 (D_NAN_MASK): Renamed.
19910 (java_double_finite): Rewrote.
19911 (D_POSITIVE_INFINITY): Removed.
19912 (D_NEGATIVE_INFINITY): Likewise.
19914 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
19915 If verbose, print underlying representation of value in hex.
19917 1998-07-24 Per Bothner <bothner@cygnus.com>
19919 * buffer.h, buffer.c: New files.
19920 * Makefile.in (JAVA_OBJS): Add buffer.o.
19922 Support locals variables and writing their debug entries to .class.
19923 * jcf-write.c: Simplify some by user new buffer type.
19924 (vode_buffer_grow): Removed.
19925 (struct localvar_info): New type.
19926 (localsvars, localvartable): New buffers.
19927 (localvar_alloc, localvar_free): New functions.
19928 (generate_bytecode_insns): Handle local variables.
19929 (generate_classfile): Write LocalVariableTable attribute.
19931 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
19933 * jcf-io.c (open_in_zip): Check the zipfile magic number.
19934 * zipfile.h (ZIPMAGIC): New macro.
19936 1998-07-24 Tom Tromey <tromey@cygnus.com>
19938 * Makefile.in (gjavah.o): Updated dependencies.
19939 (jcf-dump.o): Likewise.
19940 (all.indirect): Use ../gjavah.
19941 (../gjavah$(exeext)): Likewise.
19942 (clean): Don't remove gjavah.
19943 (clean): Remove parse.c, not java/parse.c.
19944 * Make-lang.in (java): Added gjavah.
19945 (gjavah$(exeext)): New target.
19946 (GJAVAH_SOURCES): New macro.
19947 (java.all.build): Added gjavah.
19948 (java.all.cross): Likewise.
19949 (java.rest.encap): Likewise.
19950 * config-lang.in (compilers, stagestuff): Added gjavah.
19952 1998-07-23 Tom Tromey <tromey@cygnus.com>
19954 * gjavah.c (java_float_finite): New function.
19955 (java_double_finite): Likewise.
19956 (F_POSITIVE_INFINITY): New macro.
19957 (F_NEGATIVE_INFINITY): Likewise.
19959 (D_POSITIVE_INFINITY): Likewise.
19960 (D_NEGATIVE_INFINITY): Likewise.
19962 (print_field_info): Use java_float_finite and java_double_finite.
19964 1998-07-23 Per Bothner <bothner@cygnus.com>
19966 * parse.y (method_header): Name "this" implicit argument.
19968 1998-07-22 Per Bothner <bothner@cygnus.com>
19970 * jcf-write.c: Write out LineNumberTable attribute in .class file.
19971 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
19972 (put_linenumber): New function.
19973 (generate_bytecode_insns, generate_classfile): Write line numbers.
19975 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
19977 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
19978 (lookup_name, build_known_method_ref, build_class_init,
19979 build_invokevirtual, invoke_build_dtable, match_java_method,
19980 build_field_ref, pushdecl_force_head, build_java_binop,
19981 binary_numeric_promotion, build_decl_no_layout,
19982 build_java_arrayaccess, build_newarray, build_anewarray,
19983 build_java_array_length_access, build_java_arraynull_check): New
19984 extern function prototypes.
19985 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19986 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
19988 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
19990 * jcf.h (jcf_out_of_synch): New extern function prototype.
19991 * parse.h: Static/global function implemented in parse.y
19992 prototyped and declarations moved at the end of the file.
19993 (DECL_P): Check that the argument isn't null.
19994 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19995 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
19996 (QUAL_DECL_TYPE): New macro.
19997 (PARAMS): Macro definition removed.
19998 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
19999 (return_statement:): Call build_return.
20000 (field_access:): Call make_qualified_primary in sub rule.
20001 (method_invocation:): Build method invocation and call
20002 make_qualified_primary when processing primaries.
20003 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20004 get_type_from_signature.
20005 (java_check_regular_method): Extra integer 0 argument when calling
20006 lookup_java_method2.
20007 (lookup_java_interface_method2): Extra method DECL argument when
20008 calling lookup_java_interface_method2.
20009 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20010 COMPOUND_EXPR node.
20011 (java_complete_expand_method): Layout current class iff not
20012 already done. Don't process interface's methods.
20013 (java_complete_expand_method): Use super class only if it
20014 exists. Use current class otherwise.
20015 (make_qualified_primary): New function.
20016 (resolve_expression_name): Process qualified expression or
20017 expression from primary the same way.
20018 (resolve_expression_name): Two last arguments to
20019 resolve_field_access are now NULL_TREEs.
20020 (resolve_field_access): New variable is_static. Local field must
20021 be DECLs. is_static computed on field DECLs only. Append code in
20022 where_found to the field access if necessary. Use QUAL_DECL_TYPE
20023 to initialize field_type.
20024 (resolve_qualified_expression_name): New local variable,
20025 previous_call_static and is_static. Handle primaries with function
20026 calls, casts, array references and `this'. `super' now handled as
20027 `(super_class)this'. Use is_static to clarify boolean expressions.
20028 Added code to handle case where a proper handle is required to
20029 access a field. Use QUAL_DECL_TYPE where applicable.
20030 (maybe_access_field): New function.
20031 (patch_method_invocation_stmt): New arguments primary, where,
20032 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20033 deleted. Use `where' as a type to search from if specified. Check
20034 for static method reference where forbidden. Append primary or
20035 current_this to the argument list if not calling constructor nor
20037 (check_for_static_method_reference): New function.
20038 (patch_invoke): Layout the class on which new is done if
20040 (lookup_method_invoke): Changed format to report errors on
20042 (qualify_ambiguous_name): New local variable this_found. Now
20043 handle things from primaries. Method call are considered
20045 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20046 changed into NULLs.
20047 (not_initialized_as_it_should_p): Comply with the new DECL_P.
20048 (java_complete_tree): New case fo RETURN_EXPR. Process function
20049 call arguments in separate function.
20050 (complete_function_arguments): New function.
20051 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20053 (patch_assignment): Take the return function slot into account as
20054 a RHS. Distinguish assignment from a return.
20055 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20056 when checking methods in interfaces.
20057 (resolve_type_during_patch): NULL argument to unresolve_type_p
20058 instead of NULL_TREE.
20059 (patch_newarray): Fixed typo in comment.
20060 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20061 (build_return, patch_return): New functions.
20062 * typeck.c (lookup_java_constructor): Fixed typo in comment.
20064 1998-07-21 Per Bothner <bothner@cygnus.com>
20066 * constants.c (find_name_and_type_constant, find_fieldref_index,
20067 find_methodref_index): New methods.
20068 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
20069 just return given method. Also, rename to build_known_method_ref.
20070 (expand_invoke): Rename call to build_invoke_non_interface.
20071 * java-tree.h, parse.h: Update prototype.
20072 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
20073 (such as expand_expr_stmt) if flag_emit_class_files.
20074 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20075 STACK_TARGET, IGNORE_TARGET): New macros.
20076 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
20077 (generate_bytecode_insn): New function to generate method's bytecode.
20078 (generate_classfile): Node generate Code attribute for a method.
20079 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20080 push_long_const, field_op, adjust_typed_op, maybe_wide):
20081 New functions used by generate_bytecode_insn.
20083 * typeck.c (signature_include_return): Remove variable.
20084 (push_java_argument_signature, build_java_argument_signature): New.
20085 (build_java_signature): Use push_java_argument_signature.
20086 * parse.y: Use build_java_argument_signature instead of fiddling
20087 with signature_include_return.
20089 1998-07-17 Tom Tromey <tromey@cygnus.com>
20091 * gjavah.c (print_c_decl): Always generate JArray<>* for array
20094 * Makefile.in (all.indirect): Added gjavah$(exeext).
20095 (gjavah$(exeext)): Added $(exeext).
20098 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
20100 * class.c (layout_class): Call to java_layout_parsed_class replace
20101 by safe_layout_class.
20102 * expr.c (build_java_array_length_access): Removed static storage
20103 class in the function definition.
20104 (build_java_arraynull_check): Likewise.
20105 Also fixed typos in two comments.
20106 * lex.c (java_init_lex): Initialize static global kw_length.
20107 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20108 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20110 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20111 * parse.h (resolve_no_layout): New static function declaration.
20112 (get_identifier_in_static): Declaration removed.
20113 (java_layout_parsed_class): Function name declaration changed to
20115 (build_newarray_node, patch_newarray, resolve_type_during_patch,
20116 not_initialized_as_it_should_p, build_this): New static function
20118 (pushdecl_force_head, build_java_binop, int_fits_type_p,
20119 binary_numeric_promotion, stabilize_reference,
20120 build_decl_no_layout, build_java_arrayaccess): Extern function
20121 declarations moved into their own section.
20122 (build_newarray, build_anewarray, build_java_array_length_access,
20123 build_java_arraynull_check): New extern function declarations.
20124 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20125 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20127 (CALL_CONSTRUCTOR_P): New macro.
20128 * parse.y (kw_length): New static global tree node.
20129 (return_statement): Tagged <node>.
20130 (RETURN_TK): Tagged <operator>.
20131 (variable_declarator_id:): Build variable declaration with an
20132 empty initialization value if a syntax error was found in the
20133 initialization part of the variable declaration.
20134 (statement_without_trailing_substatement:): return_statement: now
20135 uses the default rule.
20136 (return_statement:): Temporarily fixed to return NULL_TREE.
20137 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20138 (class_instance_creation_expression:): Class creation rules now
20139 call build_method_invocation upon reduction.
20140 (array_creation_expression:): Rules call build_newarray_node upon
20142 (dim_exprs:): Build a list of dimension expressions.
20143 (dim_expr:): Store location of the OSB_TK in the dimension
20145 (method_invocation:): Added a new error rule.
20146 (build_unresolved_array_type): WFL argument may also be an array
20147 on a primitive type. Name of the argument changed to reflect this.
20148 (method_declarator): Insert argument type at the beginning of the
20149 argument type list and later reverse the list.
20150 (unresolved_type_p): Argument 'returned' may be optionally
20152 (java_layout_class_from_source): Function renamed
20154 (resolve_and_layout): Now call resolve_no_layout and
20156 (resolve_no_layout): New function.
20157 (purify_type_name): New function.
20158 (complete_class_report_errors): Call purify_type_name during error
20159 report on a type not found.
20160 (process_imports): error_found local variable doesn't need to be
20161 initialized to zero.
20162 (declare_local_variables): New local type_wfl. Fixed typo in error
20163 message. type_wfl assigned to unresolved type and used to register
20164 incomplete type. Build a WFL around the variable initialization
20165 statement so that debug info can be generated on it.
20166 (source_start_java_method): Reverse argument list after they've
20168 (current_this): New static global variable.
20169 (java_complete_expand_methods): Set current_this when appropriate.
20170 (resolve_expression_name): Build correct static and non static
20171 field access bearing a simple name.
20172 (resolve_field_access): Resolve the length field of arrays. Handle
20174 (patch_method_invocation_stmt): Set the type of the method
20175 invocation to error_mark_node. This value is later overridden by a
20176 valid type, if any. Don't handle qualified constructor invocation
20177 as qualified method invocation. Call lookup_method_invoke with its
20178 new flag. It's no longer necessary to access the selected method
20179 as the value of a tree list. Handle constructor invocation.
20180 (patch_invoke): Reverse argument list when invoking non interface
20181 methods. Insert call to new as the first argument of the
20183 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20184 defined within a final class. Return INVOKE_STATIC if the invoked
20185 method is a constructor.
20186 (lookup_method_invoke): New lc argument is a flag to indicate a
20187 constructor lookup. Now handle constructor lookup. Choose the most
20188 specific method in case several were matching the invocation
20189 requirements. Return a method decl instead of a tree list featuring
20190 one single method decl element.
20191 (refine_accessible_methods_list): New lc flag argument to
20192 indicate that a constructor is being looked up.
20193 (not_initialized_as_it_should_p): New function.
20194 (java_complete_tree): Now process fake tree codes
20195 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20196 save_expr on resolved function call arguments. Case on
20197 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20198 (patch_assignment): LHS can be a field access expression. When
20199 dealing with reference, lhs_type is the promoted type of the
20200 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20202 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20203 (patch_binop): Use not_initialized_as_it_should_p where
20205 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20206 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20208 (resolve_type_during_patch): New function.
20209 (patch_cast): Call resolve_type_during_patch to resolve type and
20210 report error accordingly.
20211 (patch_array_ref): Use not_initialized_as_it_should_p where
20212 applicable. Array base expression is saved before being
20213 used. Promote the type of an array elements if it contains non
20215 (build_newarray_node, patch_newarray, build_this): New functions.
20217 1998-07-16 Tom Tromey <tromey@cygnus.com>
20219 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20220 increment it in `for' statement.
20221 (print_field_info): If number is inf or nan, don't print it.
20222 (print_method_info): If method name is `delete', just ignore it.
20223 (print_c_decl): Special-case jstringArray.
20225 * gjavah.c (help): New function.
20226 (no_argument): New function.
20227 (usage): Changed text.
20228 (main): Rewrote argument handling. Now handles -v, --help,
20230 (version): New function.
20231 (found_error): New global.
20232 (main): Return found_error.
20233 (generate_access): Set found_error.
20234 (print_c_decl): Likewise.
20236 1998-07-15 Tom Tromey <tromey@cygnus.com>
20238 * gjavah.c (print_c_decl): Don't print "," when examining field.
20239 Skip type name when looking at "[L" types.
20240 (process_file): Now static.
20241 (generate_access): Now returns int.
20242 (last_access_generated): New global.
20243 (process_file): Clear last_access_generated; make multiple passes
20245 (print_field_info): Just return if generate_access returns true.
20246 (print_method_info): Likewise. Also, allow <init> functions to
20248 (print_c_decl): Added is_init argument. Print constructors
20250 (print_cxx_classname): Use UTF8_GET to extract characters from
20252 (print_base_classname): New function.
20253 (print_class_decls): New function.
20254 (process_file): Use it.
20255 (utf8_cmp): New function.
20257 1998-07-13 Nick Clifton <nickc@cygnus.com>
20259 * lang-options.h: Format changed to match changes in gcc/toplev.c
20260 to implement a --help option.
20262 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
20264 * decl.c (init_decl_processing): Revert change to dtable_type.
20266 1998-07-09 Per Bothner <bothner@cygnus.com>
20268 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20270 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
20272 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20274 * lang.c (lang_init): Default flag_exceptions to 1, without
20275 checking to see if it's 2 first.
20277 1998-07-08 Jeffrey A Law (law@cygnus.com)
20279 * constants.c: Include "system.h".
20280 * decl.c: Likewise.
20281 * lang.c (flag_new_exceptions): Get via extern now.
20282 (lang_init_options): New functions. Turn on flag_new_exceptions.
20284 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
20286 * lex.c (java_lex): Return 0 when we see an invalid character in
20289 * lex.c (java_read_char): Specify extra argument when calling
20291 (java_read_unicode, java_parse_end_comment,
20292 java_parse_escape_sequence): Likewise,
20293 (java_lex): Specify extra argument when calling
20294 java_lex_error. Test that IDs are beginning with a legal character
20295 for IDs. Handle invalid characters with an error message and a
20296 call to java_lex_error.
20297 (java_lex_error): Adjust column position by new argument
20298 `forward'. Issue an error even if in the middle of reporting an
20301 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
20303 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20304 we don't explicitly put a null pointer when we're copying it.
20306 1998-07-07 Tom Tromey <tromey@cygnus.com>
20308 * gjavah.c (print_cxx_classname): New function.
20309 (super_class_name): Likewise.
20310 (print_super_fields): Removed.
20311 (in_super): Removed.
20312 (print_field_info): Never generate #defines.
20313 (print_c_decl): Changed generated types to match JNI. No longer
20314 print class name before method name.
20315 (print_method_info): Print "static" before static methods.
20316 Print "virtual" before non-final methods.
20317 (usage): Use exit(1), not exit(-1).
20319 (print_field_info): Use %.17g to print a double.
20320 (last_access): New globals.
20321 (process_file): Initialize last_access.
20322 (usage): Now static.
20323 (ACC_VISIBILITY): New define.
20324 (generate_access): New function.
20325 (print_field_info): Call it.
20326 (print_method_info): Likewise. Also, generate information for all
20327 methods, not just native methods. Return void.
20328 (print_c_decl): Return void.
20329 (print_field_info): Return void.
20331 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20333 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20334 processing the jc1 grammar file. Prefix bison functions and
20335 variables with java_.
20336 (parse.c): Dependencies on parse.h and lex.h
20337 * expr.c (build_java_arrayaccess): Function now global.
20338 * java-tree.h: Comment reorganized to carry on previous
20339 classification effort.
20340 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20341 RESOLVE_TYPE_NAME_P): New flags on WFLs.
20342 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20343 java_parse (new prefix java_ generated by bison).
20344 (java_layout_parsed_class, java_register_parsed_class): Function
20346 (yyparse): Removed unnecessary call to init_outgoing_cpool.
20347 * lex.c (static tree wfl_op): Variable deleted.
20348 (java_init_lex): Initialize kw_super and kw_this. Initialize more
20349 ctxp fields to NULL_TREE.
20350 (java_lex): No longer create WFL for operators. Filename caching
20351 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20352 created as STRING_CST and later expanded. Removed extra argument
20353 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20355 (build_wfl_node): Removed code in comments.
20356 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
20357 store token and location data in the current bison token.
20358 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
20359 static/extern function declaration at the beginning of the file.
20360 (struct qualification): Data structure definition deleted.
20361 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20362 (qualify_ambiguous_name): Function declaration modified. Function
20363 now returns nothing.
20364 (build_array_ref, patch_array_ref, make_qualified_name,
20365 resolve_qualified_expression_name, maybe_generate_clinit,
20366 resolve_field_access): New static function declarations.
20367 (build_java_arrayaccess): New extern function declaration.
20368 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20369 (CALL_EXPR_PRIMARY): Macro deleted.
20370 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20371 (struct parser_ctxt): Field initialized_final
20372 removed. non_static_initialized, static_initialized: New fields.
20373 * parse.y (static tree kw_super, static tree kw_this): New global
20375 (%union): tree wfl field of operator member replaced by int
20376 location. WFLs are non longer created for operators.
20377 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20378 (qualified_name:): Now calls make_qualified_name to build the
20380 (type_declaration:): Consider generating <clinit> when class
20382 (variable_declarator:): Directly build an assignment node when the
20383 variable is initialized when declared.
20384 (this_or_super:): Build a WFL and set current location when THIS
20385 or SUPER are parsed.
20386 (expression_statement:): Wrap statement around a WFL.
20387 (primary_no_new_array:): Fixed typo. Changed value returned by
20388 THIS_TK because of its new type (temporary).
20389 (dim_exprs:): Temporary fix because of OSB_TK's new type.
20390 (field_access:): Build qualified name with SUPER.
20391 (method_invocation:): Fixed returned value because of SUPER's new
20393 (array_access:): Use OSB_TK location information.
20394 (post_increment_expression:, post_decrement_expression:,
20395 unary_expression:, pre_increment_expression:,
20396 pre_decrement_expression:, unary_expression_not_plus_minus:,
20397 cast_expression:, multiplicative_expression:,
20398 additive_expression:, shift_expression:, relational_expression:,
20399 equality_expression:, and_expression:, exclusive_or_expression:,
20400 inclusive_or_expression:, conditional_and_expression:,
20401 conditional_or_expression:, assignment:): Use new location/token
20402 information available on operators.
20403 (create_class): Set super_decl_type to NULL_TREE when processing
20405 (register_fields): Field initialization is now a MODIFY_EXPR
20406 node. Chain initialization code to the matching lists (according
20407 to the field declaration modifiers).
20408 (maybe_generate_clinit): New function.
20409 (method_header): Don't set method's DECL_NAME to a WFL when adding
20410 methods to java.lang.Object.
20411 (resolve_and_layout): Now can return NULL_TREE if the type
20412 resolution fails. Otherwise, return the class DECL instead of its
20414 (check_method_redefinition): Don't patch method DECL_NAME if it
20415 belongs to java.lang.Object.
20416 (process_imports): Simply assign error_found to the value returned
20417 by check_pkg_class_access.
20418 (declare_local_variables): Don't use their init statements (if
20419 any) when parsing error were previously found. Reuse MODIFY_EXPR
20420 build during parsing as an init statement.
20421 (java_method_add_stmt): Now return the current method body.
20422 (java_layout_parsed_class, java_register_parsed_class): Functions
20424 (java_complete_expand_methods): Initialize the constant pool on a
20425 per class basis. Layout the classes before expanding their method
20426 bodies. Don't try expand artificial constructor code if error were
20427 found. Make the classes data and register them if no error were
20429 (java_complete_expand_method): Retrieve an artificial constructor
20430 argument list before entering its body. Assign the top block to
20431 the artificial constructor function body and set types of declared
20432 blocks and compound statements to void. Walk method body if not an
20433 artificial constructor.
20434 (make_qualified_name, cut_identifier_in_qualified): New functions.
20435 (resolve_expression_name): Fixed comments. Save/restore the
20436 current class CLASS_LOADED_P flag value. Build non qualified
20437 static field access and handle qualified expression names.
20438 (resolve_field_access, resolve_qualified_expression_name): New
20440 (patch_method_invocation_stmt): Use the new expression resolution
20441 scheme, calling resolve_field_access when the function call is
20442 resolved as an expression.
20443 (qualify_ambiguous_name): Function rewritten to work on qualified
20444 expression produced by make_qualified_name.
20445 (java_complete_tree): Promote type when function's argument are
20446 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20447 the assignment to discover further errors if RHS is a expression
20448 name that fails to evaluate. Declare LHS initialized even though
20449 the assignment failed. Don't use the location variable and removed
20450 extra argument in patch function calls. Now handle the ARRAY_REF
20451 case and build internal string representation when STRING_CSTs are
20453 (build_method_invocation): Don't wrap function call around a WFL.
20454 (build_assignment): Likewise. Use the operator location
20456 (patch_assignment): Handle array access LHSs. Handle error
20457 provenance, resulting in a better error report.
20458 (build_binop): Use op_location from operator as binop location
20460 (build_unaryop, build_incdec, build_cast): Likewise.
20461 (patch_binop): Extract location information from the node. Fixed
20462 typo in error message.
20463 (patch_unary_op): Extract location information from the node.
20464 (build_array_ref, patch_array_ref): New functions.
20466 1998-07-01 Tom Tromey <tromey@cygnus.com>
20468 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20469 match _Jv_IsInstanceOf.
20470 * decl.c (init_decl_processing): Use _Jv_NewArray, not
20471 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
20473 1998-06-30 Tom Tromey <tromey@cygnus.com>
20475 * decl.c (init_decl_processing): Functions are now named
20476 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20478 1998-06-29 Per Bothner <bothner@cygnus.com>
20480 * java-tree.h (load_class): Add prototype.
20481 * class.c (is_compiled_class): Add missing arg to load_class.
20482 * expr.c (expand_java_NEW): Call load_class.
20483 * parse.y (process_import): Removed bogus use of void return value.
20485 1998-06-25 Per Bothner <bothner@cygnus.com>
20487 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
20488 Function name is "_Jv_Throw" instead of "soft_athrow".
20489 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
20490 Function name is "_Jv_AllocObject" instead of "soft_new".
20491 Takes an extra parameter (object size).
20492 * expr.c: Update calls.
20494 1998-06-24 Per Bothner <bothner@cygnus.com>
20496 * lex.c (java_get_line_col): Handle end-of-file.
20497 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
20499 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
20501 * lang.c (lang_init): Make -fexceptions the default.
20502 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
20503 exception handling is not turned on.
20505 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
20507 * lang.c (flag_new_exceptions): Make this this default.
20508 * decl.c (end_java_method): Call emit_handlers.
20509 * except.c (method_init_exceptions): Set language code and version.
20510 (expand_start_java_handler): Enable exception, and call
20511 expand_eh_region_start.
20512 (expand_end_java_handler): Enable exception, and set up catch blocks.
20513 (emit_handlers): New routine to generate the saved handlers.
20514 * java-except.h (emit_handlers): Add prototype.
20516 1998-06-12 Per Bothner <bothner@cygnus.com>
20518 We used to have three different representations of the constant pool:
20519 the CPool structure, the tree_constant_pool, and the constructures
20520 used to build the Class object (which may need class and string
20521 constants) in compiled code. None were appropriate for compiling
20522 to .class files, so I did a major overhaul.
20524 First, the tree_constant_pool array was removed. Things were
20525 modified to the CPool structure in the JCF could be used.
20526 Second, a "capacity" field was added to the CPool, and functions
20527 written to search for a matching constant, adding one if not found.
20528 The code that generated the Class object was changed to use a CPool.
20529 The actual TREE_LISTs used to build the CONSTRUCTORs used for
20530 the static Class object are now only in build_constants_constructor.
20531 Finally, I wrote code which can generate a .class file (including its
20532 constant pool) from the RECORD_TYPE of a class. This is a big step
20533 on the way to compiling Java source into .class files.
20535 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
20536 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
20538 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
20539 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
20540 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
20541 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
20542 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
20543 (lang_type): Removed constant_pool field.
20544 * jcf.h (CPool): Renamed size to count. Added field capacity.
20545 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
20546 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
20547 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
20549 * constants.c (current_constant_pool_tags, current_constant_pool_data,
20550 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
20551 * constants.c (build_constants_constructor): Use new outgoing_cpool.
20552 (set_constant_entry, find_constant1, find_constant2,
20553 find_class_constant, count_constant_pool_bytes, write_constant_pool,
20554 find_utf8_constant, find_class_or_string_constant): New functions.
20556 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
20557 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
20558 (give_name_to_class, get_class_constant): Likewise.
20559 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
20560 (get_name_and_type_constant, get_ref_constant): Removed.
20561 * parse.h (parser_ctxt): Remove field tree_constant_pool.
20562 * parse.y: Don't save/restore tree_constant_pool.
20563 * verify.c (verify_jvm_instructions): Update for new approach.
20564 * expr.c (expand_invoke, expand_java_field_op): Likewise.
20566 * lang-options.h: Added -femit-class-file, -femit-class-files.
20567 * lang.c (flag_emit_class_files), java-tree.h: New flag.
20568 (lang_f_options): Added "emit-class-file(s)".
20570 * expr.c (build_java_arrayaccess): Generate more efficient array
20571 bounds checking, by using unsigned compare.
20573 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
20575 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
20577 * parse.h: New comment on the handling of unresolved type
20578 identifiers. JDEPs are now part of the jdep_code enum.
20579 (typedef struct jdep): Now use enum jdep_code or int, depending on
20580 availability. Both are narrowed down to an 8 bits bitfield.
20581 (CALL_EXPR_PRIMARY): Fixed comment.
20583 1998-06-10 Tom Tromey <tromey@cygnus.com>
20585 * Make-lang.in (java): Added gjavac and jvgenmain.
20586 (java.start.encap): Depend on gjavac.
20587 (java.rest.encap): Depend on jvgenmain.
20589 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
20590 (JAVA_CROSS_NAME): Likewise.
20591 (java.all.build): Depend on jvgenmain and gjavac.
20592 (java.all.cross): Depend on jvgenmain and gjavac-cross.
20593 (jvgenmain$(exeext)): New target.
20594 (java.install-common): Wrote.
20595 * config-lang.in (compilers, stagestuff): Added gjavac and
20598 1998-06-10 Dave Brolley <brolley@cygnus.com>
20600 * lang.c (lang_decode_option): New argc/argv interface.
20602 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
20604 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
20605 * decl.c (build_decl_no_layout): New function.
20606 * expr.c (java_lang_expand_expr): Layout declarations found in
20607 blocks before they're pushed.
20608 * jcf-parse.c (load_class): Save current line when parsing class
20610 (parse_source_file): Register class before expanding their
20612 * lang.c (put_decl_node): Produce `null' when `void *' is
20614 * lex.c (static tree wfl_op): New static global, for error report
20616 (java_init_lex): wfl_operator and wfl_op initialized
20617 here. Filename caching added for wfl_op. Return wfl_op when `(' is
20619 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
20620 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
20621 build_unresolved_array_type): New static function definitions.
20622 (build_decl_no_layout): New extern function declared.
20623 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
20624 faulty modifier exists.
20625 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
20626 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
20627 (UNARY_PLUS_EXPR): New fake operator.
20628 (struct parser_ctxt): New field osb_number.
20629 * parse.y (static tree wfl_operator): New static WFL for operator
20630 bound error messages.
20631 (DECR_TK, INCR_TK): Moved.
20632 (OP_TK): Tagged <operator>.
20633 (array_type:): Now call build_unresolved_array_type.
20634 (dim_expr:): Count the number of '[' seen.
20635 (post_increment_expression, post_decrement_expression,
20636 pre_increment_expression, pre_decrement_expression,
20637 unary_expression_not_plus_minus, unary_expression:): Actions are
20638 now building the corresponding unary expressions.
20639 (cast_expression:): Actions are now building cast expressions.
20640 (build_unresolved_array_type): New function.
20641 (create_interface): Reset the number of declared interfaces.
20642 (create_class): Likewise.
20643 (method_header): Methods declared within the scope of an interface
20644 are now implicitly set public and abstract.
20645 (java_complete_class): Variable's and parameter's type are patched
20646 with a promoted type.
20647 (declare_local_variables): Resolved non builtin types are promoted
20648 before being used to build a variable decl. Removed type patch
20649 posted on variable initialization statement.
20650 (source_start_java_method): Use build_decl_no_layout to build the
20651 decl of a parameter of incomplete type.
20652 (java_register_parsed_class): Process interfaces too. Call
20653 rest_of_decl_compilation on each processed class declarations.
20654 (java_complete_expand_methods): Don't attempt to expand things in
20656 (java_complete_tree): Process CONVERT_EXPR, even though it always
20657 has a type. Propagate error_mark_node to node's type too. Promote
20658 method's call argument type and return error_mark_node if
20659 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
20660 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
20661 handle unary operator nodes.
20662 (build_assignment): Added comment.
20663 (print_int_node): New function.
20664 (patch_assignment): New second argument. New error handling. Use
20665 print_int_node. Handle references. Use can_cast_to_p to issue
20666 different error message according to the context and check upon
20667 the initialization of the RHS.
20668 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
20669 (operator_string): Handle more operators.
20670 (patch_binop): No longer use a function static
20671 wfl_operator. Improved error message on shift distance.
20672 (build_unaryop, build_incdec, build_cast, patch_unaryop,
20673 patch_cast): New functions.
20675 1998-06-05 Per Bothner <bothner@cygnus.com>
20677 * jvspec.c: New file.
20678 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
20680 * java-tree.h (identifier_subst): Add declaration.
20682 1998-06-04 Tom Tromey <tromey@cygnus.com>
20684 * jvgenmain.c (main): Generate call to JvRunMain.
20686 * class.c (make_class_data): Push value for "sync_info" field.
20687 * decl.c (init_decl_processing): Push "sync_info" field.
20689 1998-06-03 Per Bothner <bothner@cygnus.com>
20691 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
20692 Java (source) name, not signature.
20693 Set TYPE_ALIGN to (at least) that of element_type.
20695 1998-06-02 Per Bothner <bothner@cygnus.com>
20697 * class.c: Moved classname-mangling-rekated code to ...
20698 * mangle.c: ... this new file.
20699 * jvgenmain.c: New program (needs mangle.c) to generate main program.
20700 * Makefile.in: Update for above changes.
20702 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
20704 * expr.c (truthvalue_conversion): Convert integer and floating
20705 point value to their truth value.
20706 * lex.c (java_lex): Handle the `null' literal.
20707 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
20708 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
20709 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
20712 * parse.y: Reorganization/documentation on token declaration.
20713 (binop_lookup[]): New added new tree codes.
20714 (relational_expression): Build corresponding binary operators.
20715 (equality_expression, conditional_and_expression,
20716 conditional_or_expression): Likewise.
20717 (java_complete_class): Fix crash in debug message.
20718 (java_complete_tree): Check initialization of method call
20719 arguments. Further bogus node evaluation to detect more error
20720 during assignments. Handles more binary operators.
20721 (patch_assignment): Use DECL_P.
20722 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
20724 (operator_string): Handle more case. Compacted source.
20725 (patch_binop): Changed function comment. Checking for
20726 uninitialized first operand takes the compound assignment into
20727 account and uses DECL_P. Checking for uninitialized second operand
20728 delayed to routine's end. Use macros to issue type bound error
20729 messages and issue messages on both operands if their types are
20730 different. Force fixed type into node. Handle all binary
20733 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20735 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
20736 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
20737 build operator node and return tokens.
20738 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
20739 * parse.h (java_complete_tree): Changed returned type in prototype.
20740 (build_method_invocation, build_assignment, patch_assignment,
20741 patch_binop): New static function declarations.
20742 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
20743 BUILD_EXPR_WFL): New macros.
20744 * parse.y (enum tree_code binop_lookup[]): New static for token to
20746 (%union): Parser union has new sub-structure `operator'.
20747 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
20748 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
20749 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
20750 ASSIGN_ANY_TK): Tokens tagged `operator'.
20751 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
20752 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
20753 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
20754 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
20755 (assignment_operator:): Rule tagged `operator'.
20756 (expression_statement:): Re-installed default rule.
20757 (method_invocation:): Sub rules call build_method_invocation.
20758 (postfix_expression:): Don't attempt to resolve name here. Just
20760 (multiplicative_expression:): Sub-rules build corresponding binop
20762 (additive_expression:, shift_expression:, and_expression:,
20763 exclusive_or_expression:, inclusive_or_expression:): Likewise.
20764 (assignment:): Sub rule invoke build_assignment.
20765 (assignment_operator:): Default rules on sub rules.
20766 (force_error): Added documentation on this variable.
20767 (declare_local_variables): Build initialization calling
20769 (expand_start_java_method): Removed unused rtx declaration. Mark
20770 arguments as already initialized.
20771 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
20772 (java_complete_expand_methods): Don't process next method if
20773 completion of the previous one triggered errors.
20774 (java_complete_expand_method): Call source_end_java_method if no
20775 error were found during completion.
20776 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
20777 locals declaratilon. Handle names found within a class. Return
20778 error_mark_node when things aren't found.
20779 (patch_method_invocation_stmt): Return error_mark_node on failures.
20780 (patch_invoke): Removed unused local. Return the correct node.
20781 (java_complete_tree): Now returns a value. The BLOCK section binds
20782 local identifiers and the type of a BLOCK is now void. Assign the
20783 result of operand completion on COMPOUND_EXPR. Assign the
20784 encapsulated node of a WFL to the result of its completion, except
20785 when the node is an identifier. Now handle MODIFY_EXPR and several
20786 binary operators. Return error_mark_node on errors.
20787 (build_method_invocation, build_assignment, patch_assignment,
20788 build_binop, operator_string, patch_binop): New functions.
20789 * typeck.c (binary_numeric_promotion): New function.
20791 1998-05-21 Per Bothner <bothner@cygnus.com>
20793 * class.c (identifier_subst): New convenience wrapper for ident_subst.
20794 Replace most uses of ident_subst by identifier_subst.
20796 * class.c (push_class_static_dummy_field): Removed function.
20797 (build_class_ref): Find Class object decl by looking up "CNAME.class",
20798 instead of looking got "class" static field. Create that decl here.
20799 (class_identifier_node): Removed; no longer needed.
20800 (init_class_processing): Don't init class_identifier_node.
20801 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
20802 Do nreverse 0 times (instead of twice) for Object and Class.
20803 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
20805 1998-05-20 Per Bothner <bothner@cygnus.com>
20807 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
20808 while initializing linenumber_count and linenumber_table.
20809 Do it before init_function_start (which calls emit_line_note).
20810 * expr.c (expand_byte_code): Don't need to clear lineno here.
20812 1998-05-18 Tom Tromey <tromey@cygnus.com>
20814 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
20815 then mangle number as _N_.
20817 * class.c (mangle_class_field): New function.
20818 (build_class_ref): Set assembler name of class reference using
20819 mangle_class_field.
20820 (push_class_static_dummy_field): Likewise.
20822 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
20824 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
20825 of assigning to TREE_CODE. The latter method exploits a feature
20826 of GCC that is not ANSI compliant.
20828 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
20830 * decl.c (pushdecl_force_head): New function.
20831 (pushlevel): Removed conditional printf.
20832 (complete_start_java_method): Don't enter local variable scope if
20833 function is compiled from source code.
20834 * expr.c: parse.h now included
20835 (java_lang_expand_expr): New function.
20836 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
20837 printf. Terminate buffer when doing directories.
20838 * jcf-parse.c (parse_source_file): Call lang_init_source before
20839 parsing and before code generation.
20840 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
20841 use printf if the macro is defined.
20842 * lang.c (lang_init): Install lang_expand_expr hook on
20843 java_lang_expand_expr.
20844 (java_dummy_print): New function.
20845 (lang_init_source): New function.
20846 * lex.c (java_lex): Remember location of an opening brace at the
20847 second nesting level.
20848 (java_is_eol): Unget character seen after a CR if it is EOF.
20849 * parse.h: Now includes lex.h
20850 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
20851 printf if the macro is defined.
20852 (expand_start_java_method, build_expr_block, enter_block,
20853 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
20854 New static function declarations.
20855 (pushdecl_force_head): New extern function declaration.
20856 (INCOMPLETE_TYPE_P): New macro.
20857 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
20858 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
20859 BLOCK_EXPR_ORIGIN): New macros.
20860 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
20861 DECL_SOURCE_LINE_LAST): New macros.
20862 (struct parser_ctxt): Removed field current_method_decl, redundant
20863 with the field current_function_decl. Added fields
20864 first_ccb_indent1 and pending_block.
20865 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
20866 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
20868 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
20869 (compilation_unit:): Cosmetic on sub rule.
20870 (type_declaration:): Cosmetic on sub rules. Added an error rule.
20871 (variable_initializer:): Installed default rule on expression:.
20872 (method_declaration:): method_header: starts a new
20873 method. method_body: installs the function body, absorbs blocks
20874 emitted for temporary variable scopings, pops function's body block
20875 and merges function's last statement lineno in DECL_SOURCE_LINE.
20876 (method_body:): Installed default rules.
20877 (block:): Call enter_block when an opening brace is seen. Absorb
20878 scoping blocks and call exit_block when a closing brace is seen.
20879 (block_statement:): Cosmetic changes.
20880 (method_invocation:): Create WFL around CALL_EXPR node.
20881 (patch_stage): Added comment around definition.
20882 (method_header): Try to use first_ccb_indent1 as the first line of
20883 the method, so BP debug info are emitted at the first opening
20884 brace of the function. If the function has no body, use the
20885 location of the function's name. Override currently defined method
20886 name with the matching WFL so we can point redefinition errors
20887 using the location where the function's name was declared.
20888 (check_abstract_method_header): Interprets DECL_NAME as an
20889 identifier or as a WFL, accordingly.
20890 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
20891 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
20892 location and name information out of it and reinstall DECL_NAME to
20893 its original identifier node value.
20894 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
20895 function's source code).
20896 (read_import_dir): Test the value returned by find_class and issue
20897 a fatal accordingly.
20898 (declare_local_variables): Push a new block for the scope of the
20899 new variable(s) if code has been already generated at that nesting
20900 level. Pinpoint redefinition errors using the variable id
20901 WFLs. Generate initialization code if necessary. If the variable
20902 type is incomplete, register a patch on its decl.
20903 (source_start_java_method): Rewritten. Define a new block for the
20904 function's parameters. Build parameter decl out of function's
20905 arguments and register them for a patch if their types are
20907 (expand_start_java_method): Includes the part of
20908 source_start_java_method that was pushing the parameter decls and
20909 completing the method start code.
20910 (source_end_java_method): Removed call the expand_end_bindings and
20911 poplevel (already taken care of). Reinstall function's arguments
20912 and get function's last line of code before calling
20913 expand_function_end.
20914 (java_method_add_stmt): New comment before the function's
20915 code. Complement the second operand of the current COMPOUND_EXPR
20917 (java_complete_expand_methods): Don't generate debug info on line
20918 zero when expanding a generated constructor.
20919 (java_complete_expand_method): Set start and end line numbers for
20920 a artificially generated constructor to one and manually call
20921 enter_block and exit_block when defining it. For all methods:
20922 expand function's start calling the new expand_start_java_method
20923 and invoke java_complete_tree on the effective method's body, if
20925 (resolve_expression_name): Now use lookup_name_in_blocks to search
20926 local variable decls and print out an error when variables are
20928 (patch_method_invocation_stmt): Inserted comment before the
20930 (lookup_method_invoke): Chain method's arguments using chainon
20931 with the current arg list as a second argument. Inserted missing
20932 IDENTIFIER_POINTER when reporting an error on methods not found.
20933 (refine_accessible_methods_list): Don't retain constructors.
20934 (patch_arguments): Function removed.
20935 (java_complete_tree): Inserted comment before the function's
20936 code. New case for BLOCKs. Moved the WFL case a bit
20937 further. Complete function's arguments.
20938 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
20939 maybe_absorb_scoping_blocks): New functions.
20941 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20943 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
20945 * jcf-parse.c (parse_source_file, java_error_count): New forward
20946 and extern declarations.
20947 (java_parse_abort_on_error): Macro moved.
20948 (jcf_parse_source): fatal called if fopen fails. Now calls
20950 (parse_source_file): New parse_only parameter. Reflects the
20951 elimination of the second pass.
20952 (yyparse): parse_source_file called with argument set to 0.
20953 * jcf.h (JCF_ZERO): Sets java_source to zero.
20954 * lex.c (java_init_lex): pass argument is gone. Function modified
20955 to be called once during the analysis of a file.
20956 (java_unget_unicode): Fixed typo in fatal message.
20957 (java_get_line_col): Likewise.
20958 (java_lval): Likewise. String literals no longer built during
20960 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
20962 * parse.h (MODIFIER_WFL): New macro.
20963 (parse_check_super, parser_check_super_interface): Now return int.
20964 (parser_chain_incomplete_item, not_builtin_p,
20965 complete_method_decl): Declarations removed.
20966 (build_method_invocation_stmt, build_invoke): Renamed using the
20967 `patch' instead of `build'
20968 (register-incomplete_type, obtain_incomplete_type,
20969 java_complete_tree, java_complete_expand_method,
20970 unresolved_type_p, create_jdep_list): New function declarations.
20971 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
20972 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
20973 (jdep): New typedef on new struct _jdep.
20974 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
20975 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
20976 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
20977 JDEP_RESOLVED_P): New macros.
20978 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
20979 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
20980 JDEP_VARIABLE): New enum values and jdep kinds.
20981 (jdeplist): New typedef on struct _jdeplist.
20982 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
20984 (CALL_EXPR_PRIMARY): New macro.
20985 (struct parser_ctxt): Fields java_pass, current_method_decl,
20986 method_decl_list deleted. New field jdeplist.
20987 (INCOMPLETE_P): Macro deleted.
20988 * parse.y (single_type_import_declaration:): Removed pass switch.
20989 (type_import_on_demand_declaration): Likewise.
20990 (field_declaration:): Removed pass switch on all sub rules.
20991 (class_declaration:): Call the complete_class_decl removed on
20993 (method_declaration:): Removed second pass switch. No longer chain
20994 methods decl when method_header reduced.
20995 (method_header:): Sub rules no longer depend on pass switch.
20996 (method_declarator:): Likewise.
20997 (method_body:): Likewise.
20998 (abstract_method_declaration:): Likewise.
20999 (block_statement:): Likewise.
21000 (local_variable_declaration:): Likewise.
21001 (argument_list:): Likewise.
21002 (method_invocation:): Likewise. Call to build_method_invocation_stmt
21003 removed. Partial CLASS_EXPR tree node built instead.
21004 (postfix_expression:): Removed pass switch on all sub rules.
21005 (java_pop_parser_context): Free classd_list content.
21006 (yyerror): Call obstrack_grow0 to finalize error message.
21007 (check_class_interface_creation): Comment modified to reflect new
21008 returned value meaning. Removed second pass switch. Return 1 if an
21009 error was found, 0 otherwise. Adjust pointer on filename if a
21010 leading path separator was found.
21011 (maybe_create_class_interface_decl): Removed first pass switch
21012 when linking the class decl to the class_list. Install a new
21013 jdep_list for the class.
21014 (add_superinterfaces): List of unresolved interfaces is
21015 gone. Unresolved interfaces are directly added to the current
21017 (create_interface): Second pass shortcut removed.
21018 ctpx->modifier_ctx access through MODIFIER_WFL.
21019 (create_class): Second pass shortcut removed. Call to
21020 register_incomplete_type replaces the call to
21021 parser_chain_incomplete_item.
21022 (complete_class_decl): Function removed.
21023 (duplicate_declaration_error): New way of retrieving redeclared
21025 (register_fields): Call to lookup_modifier_cl replaced by
21026 MODIFIER_WFL. New way of handling unresolved type, using
21027 unresolved_type_p and obtain_incomplete_type.
21028 register_incomplete_type replaces call to parser_chain_incomplete_item.
21029 (patch_stage): New static global variable.
21030 (method_header): New way of handling unresolved type, using
21031 unresolved_type_p and obtain_incomplete_type. patch_stage used to
21032 indicates that the method decl needs to be patched.
21033 (check_abstract_method_header): Call to lookup_modifier_cl
21034 replaced by MODIFIER_WFL.
21035 (method_declarator): Incomplete argument type are registered
21036 calling register_incomplete_type. Patch on the declared method is
21037 issued in that case.
21038 (unresolved_type_p): New function.
21039 (parser_check_super_interface): New comment to reflect function's
21040 modified returned type (int). Function and has a new argument
21041 this_wfl. Call to parse_error_context uses this_wfl instead of
21042 relying on lookup_cl.
21043 (parser_check_super): Comment reflects function's new returned
21044 type (int). Function returns nonzero value on error.
21045 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21046 register_incomplete_type, jdep_resolve_class): New functions to
21047 handle incomplete types in declarations.
21048 (java_complete_class): Rewritten to work with the new incomplete
21049 type handling scheme.
21050 (complete_class_report_errors): Likewise.
21051 (complete_method_decl): Removed: it jobs is now handled by
21052 java_complete_class.
21053 (do_resolve_class): Class loaded in not already loaded and not
21054 found in Java source code.
21055 (java_check_regular_methods, java_check_abstract_methods): Don't
21056 call complete_method_decl anymore.
21057 (lookup_modifier_cl, not_builtin_p): Functions deleted.
21058 (read_import_dir): Got rid of the pass number dependency.
21059 (declare_local_variables): New handling of unresolved types (patch
21061 (source_start_java_method): New parameter level. Function called
21062 with level set to 1 when argument types are potentially
21063 unresolved. Called to complete the job with level set to 2 once
21064 types are complete.
21065 (source_end_java_method): Call to permanent_allocation
21066 removed. Waiting to be replaced by a more suitable obstack
21068 (java_complete_expand_methods, java_complete_expand_method,
21069 java_expand_finals): New functions.
21070 (build_method_invocation_stmt): Renamed
21071 patch_method_invocation_stmt. Extracts function call expression
21072 (wfl) and arguments (args) from CALL_EXPR tree operands.
21073 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21074 call. Patch the function and argument operand of the CALL_EXPR
21076 (patch_argument, java_complete_tree): New functions.
21078 1998-04-20 Per Bothner <bothner@cygnus.com>
21080 Recover from missing fields and methods (i.e. error instead of fatal).
21081 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
21082 * expr.c (expand_invoke): Recover from missing method.
21083 (expand_java_field_op): Recover from missing field.
21084 Inline references to java.lang.{Integer,Char,...}.TYPE.
21085 * typeck.c (get_type_from_signature), java-tree.h: New function.
21086 * class.c (add_method): Use get_type_from_signature.
21087 (build_class_ref): Handle a class that was not found.
21088 * typeck.c (convert): Handle conversion to pointers (for convenience).
21089 * verify.c (verify_jvm_instructions): Use get_type_from_signature
21090 instead of lookup_field to handle missing fields.
21092 * jcf-parse.c (process_zip_dir): Set java_source.
21094 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
21096 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21098 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
21100 * jcf-parse.c (load_class): Don't change input_filename before
21101 calling jcf_parse_source (but still do it before calling
21103 (jcf_parse_source): Assign input_filename after having saved the
21105 * lex.c (java_init_lex): Chain a WFL node to the import on demand
21106 list. ctxp->modifier_ctx zeroed according to its new
21107 definition. ctxp->filename initialized. Removed
21108 JAVA_MODIFIER_CTX_UNMARK.
21109 (java_unget_unicode): Update the character based column position.
21110 (java_allocate_new_line): ref_count not used anymore. Always free
21111 ctxp->p_line. Initialize c_line->char_col to 0.
21112 (java_get_unicode): Update the character based column position.
21113 (java_lex): Use ctxp->elc to store current position in source
21114 file, at the beginning of the parsed token. Set modifier_ctx entry
21115 corresponding to the parse modifier to a WFL node. Return a WFL
21116 node when an identifier is parsed.
21117 (java_lex_error): Now uses ctxp->elc to store current position in
21119 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21120 * lex.h (build_wfl_node): New function definitions.
21121 (struct java_line): ref_count and next fields are gone. New field
21123 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21124 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21125 (JAVA_COLUMN_DELTA): New macro.
21126 (java_lc): New typedef on new struct _java_lc.
21127 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21128 (parse_error_context, parse_warning_context): Changed prototypes.
21129 (java_get_line_col): Added as an available global function.
21130 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21131 (IC_DECL): Replaced by macro IC_TYPE
21132 (DEPEND_WFL): New macro.
21133 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21135 (exit_java_complete_class): Removed a commented out statement.
21136 (struct parser_ctxt): Added comments on fields. modifier_ctx is
21137 now an array of tree nodes. Deleted fields line_list and
21138 e_line. New field elc, to replace e_line.
21139 * parse.y (array_type:): Build WFL node.
21140 (qualified_name:): Build a single WFL node out of two. Retain
21141 the location information of the first node in the resulting node.
21142 (package_declaration:): Use package name as a WFL node
21143 (single_type_import_declaration:): Use imported name as a WFL node.
21144 (type_import_on_demand_declaration:): Use root of the imported
21145 packages as a WFL node.
21146 (field_declaration:): Removed unused local variable cl.
21147 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21148 (yyerror): New static elc. Removed static error_line, error_pos.
21149 New local code_from_source. Save ctxp->elc into elc at the first
21150 pass. Call java_get_line_col to get a string of the line where
21151 the error occurred.
21152 (debug_line): Removed static function.
21153 (parse_error_context, parse_warning_context): Parameter cl is now
21154 a WFL node. Use its value to initialize ctxp->elc.
21155 (redefinition_error): Parameter cl is now a WFL node.
21156 (parse_add_interface): New parameter wfl. No longer call
21157 lookup_cl, use wfl instead.
21158 (check_class_interface_creation): Parameter cl is now a WFL node.
21159 (maybe_create_class_interface_decl): Likewise.
21160 (add_superinterfaces): New function.
21161 (create_interface): Removed local cl, node, super_decl,
21162 super_decl_type. Function now uses id as a WFL node. Better
21163 warning/error report on obsolete or forbidden mix of
21164 modifiers. Now calls add_superinterfaces to register interfaces.
21165 (create_class): Removed local cl, node. Local variable id is used
21166 as a WFL node. Better error report on forbidden modifier
21167 mix. Uses add_superinterfaces to register interfaces.
21168 (find_field): Argument cl is now a WFL node. Now store the WFL
21169 node of a fields that needs to be checked for their
21171 (method_header): Local variable node non longer used. Local
21172 variable id replaces cl.
21173 (check_modifiers_consistency): Local variable cl is now a WFL
21175 (method_declarator): Local variable cl replaced by parameter id.
21176 (parser_qualified_name): Now uses parameter name as a WFL node.
21177 (parser_check_super_interface): New parameter wfl, for achieve
21178 greater accuracy during error reports.
21179 (parser_chain_incomplete_item): New parameter named location. Used,
21180 along the decl, to construct the incomplete item node.
21181 (java_complete_class): resolve_class now uses WFL node extracted
21182 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21184 (complete_method_decl): Unresolved function's argument types are WFL.
21185 (resolve_class): Parameter cl is now a WFL node.
21186 (resolve_and_layout): Likewise.
21187 (do_resolve_class): Likewise. Try first to use cl and then do the
21188 lookup on the decl when calling check_pkg_class_access.
21189 (complete_class_report_errors): Use IC_TYPE in place of
21190 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21191 instead of doing a lookup over the decl.
21192 (java_check_final): Use WFL info from field tree list.
21193 (lookup_cl): Rewritten and returns a statically defined WFL node.
21194 (lookup_modifier_cl): Now uses information from WFL nodes.
21195 (process_imports): Likewise.
21196 (read_import_dir): name and cl arguments replaced by a single WFL
21197 node. Function modified accordingly.
21198 (find_in_imports_on_demand): Now uses WFL node.
21199 (check_pkg_class_access): cl argument is now a WFL node.
21200 (declare_local_variables): Fixed to use WFL nodes.
21201 (resolve_expression_name): Likewise.
21202 (build_method_invocation_stmt): name_combo argument renamed
21203 wfl. Function modified to use WFL nodes.
21204 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21205 (lookup_method_invoke): cl is now a WFL node. Added missing
21206 IDENTIFIER_POINTER to class type decl name.
21208 1998-04-14 Dave Brolley <brolley@cygnus.com>
21210 * lang.c (init_parse): Now returns char* containing the filename.
21212 1998-04-10 Per Bothner <bothner@cygnus.com>
21214 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
21216 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
21217 * class.c (make_class_data): If flag_assume_compiled, initial class
21218 state is CSTATE_PREPARED; make superclass and interfaces direct
21219 references, rather than constant pool indexes.
21221 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21223 * parser.y: Include flags.h. Removed debug variable pl.
21224 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21225 (block:): Likewise.
21226 (labeled_statement_nsi:): Generate debug info when reducing
21227 expression_statement:.
21228 (check_pkg_class_access): get_access_flags_from_decl invocation
21229 fixed for new CLASS_* flags location.
21230 (source_end_java_method): Save/restore parser context when
21231 entering/leaving this routine. Restore lineno to its right value
21232 before calling expand_end_bindings.
21233 (build_method_invocation_stmt): build_invoke called with the
21234 current line information.
21235 (build_invoke): New argument cl. Wrap the function call around a
21237 (refine_accessible_methods_list): Changed comment, removed
21239 * parse.h: Fixed typo in comments.
21240 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21241 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21242 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21244 * lex.c (java_lex): Record the last closing curly bracket of a
21246 * jcf-parse.c (jcf_parse_source): Now calls
21247 java_check_methods. Clarified comment, fixed typo.
21249 1998-04-09 Dave Brolley <brolley@cygnus.com>
21251 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21252 (finish_parse): Expose for non USE_CPPLIB builds.
21254 1998-04-08 Jeffrey A Law (law@cygnus.com)
21256 * lang.c (lang_print_xnode): New function.
21258 1998-04-03 Per Bothner <bothner@cygnus.com>
21260 * decl.c (class_dtable_decl), java-tree.h: New tree node.
21261 * class.c (get_dispatch_vector, get_dispatch_table): New functions
21262 used to build a class's dispatch table.
21263 (make_class_data): Generate dispatch table if flag_assume_compiled.
21264 Set dtable of class object to address of class_dtable_decl.
21266 * decl.c (int_decl_processing): Make soft_badarrayindex_node
21267 be volatile and have side effects - generates better code.
21269 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
21270 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21272 * expr.c (expand_invoke): If class is final, method is
21273 effectively final, so can call it directly.
21275 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
21277 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
21279 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
21281 * parse.y (build_method_invocation_stmt): Removed extra argument
21284 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
21286 * expr.c (dtable_indent): Now static global.
21287 (expand_invoke): Now call invoke_build_dtable and
21288 build_invokevirtual.
21289 (invoke_build_dtable, build_invokevirtual): New functions.
21290 * jcf-io.c (find_class): Defer issuing a warning by setting
21291 jcf->outofsynch to 1.
21292 * jcf-parse.c (jcf_out_of_synch): New function.
21293 (load_class): Test this_jcf.outofsynch flag and call
21294 jcf_out_of_synch accordingly.
21295 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21296 comment indentation.
21297 * lex.c (java_get_unicode): Fixed code indentation.
21298 (java_lex): Create string literal. Fixed typo. Removed several
21299 premature obstack_free.
21300 * parse.h: New enums for name resolution and invocation mode.
21301 (struct qualification): New data structure.
21302 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21303 (do_resolve_class, build_method_invocation_stmt,
21304 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21305 debug_line, identical_subpath_p, invocation_mode,
21306 refine_accessible_methods_list, build_invoke,
21307 lookup_method_invoke): New functions declared.
21308 (build_invokevirtual, invoke_build_dtable, match_java_method,
21309 build_field_ref, jcf_out_of_synch): New references to external
21311 (struct parse_ctxt): Removed artificial_constructor field.
21312 * parse.y: (array_type:): Type defined for this rule.
21313 (class_type:): Installed default rule for interface_type:.
21314 (array_type:): Now build Java array type.
21315 (qualified_name:): Now use obstack_grow0.
21316 (method_declaration:): Skip the artificial constructor added to
21318 (abstract_method_declaration:): Execute the code only during pass 1.
21319 (block:): Installed default rule in block_statements:.
21320 (block_statement:): Add the statement to the method during pass 2.
21321 (statement_expression): Installed default rule for
21322 method_invocation:.
21323 (argument_list:): Added code to build the argument list.
21324 (method_invocation:): Added call to create the method invocation
21326 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21327 (debug_line): New function for debug.
21328 (complete_class_decl): No longer do something during pass 1.
21329 (method_header): Use BUILD_PTR_FROM_NAME.
21330 (parser_qualified_classname): Use obstack_grow0. Removed bogus
21332 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21333 function's main comment.
21334 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21336 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21337 (resolve_class): Now works with arrays.
21338 (do_resolve_class, resolve_and_layout): New functions.
21339 (java_check_regular_methods): Reverse method list before and after
21340 having processed it. No longer set ctxp->artificial_constructor.
21341 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21342 accordingly. Fixed typo in issued error message. Now use
21344 (find_in_imports_on_demand): Now use obstack_grow0.
21345 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21346 (source_end_java_method): Call expand_expr_stmt instead of
21347 expand_expr. Calls it before calling expand_function_end.
21348 (java_method_add_stmt): Do nothing if errors were found during
21350 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21351 (build_method_invocation_stmt, build_invoke, invocation_mode,
21352 lookup_method_invoke, refine_accessible_methods_list,
21353 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21355 * typeck.c (build_java_signature): Properly end method signature
21356 if return type skipped.
21357 (match_java_method): New function.
21359 1998-03-16 Per Bothner <bothner@cygnus.com>
21361 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
21363 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
21365 * expr.c (build_invoke_non_interface): New function.
21366 (methods_ident, ncode_ident): Now static globals.
21367 (expand_invoke): Use build_invoke_non_interface.
21368 * java-tree.h (struct lang_decl): New field function_decl_body.
21369 (DECL_FUNCTION_BODY): New macro.
21370 * jcf-parse.c (jcf_parse_source): Deeper check before setting
21371 CLASS_FROM_SOURCE_P.
21372 (parse_source_file): Fixed typos. Call java_layout_parsed_class
21373 before starting pass 2. Call to java_generate_parsed_class replaced
21374 by java_register_parsed_class.
21375 * lex.c: Fixed typo in header. Some line width related formating.
21376 * lex.h: Some line width related formating.
21377 * parse.h (source_end_java_method, resolve_expression_name,
21378 complete_class_decl, maybe_create_class_interface_decl,
21379 check_class_interface_creation): New static function declarations.
21380 (java_layout_parsed_class, java_method_add_stmt): New function
21382 (struct parser_ctxt): Field mark_class_generate removed. New
21383 fields class_list and artificial_constructor.
21384 * parse.y: Fixed typo in header.
21385 (class_declaration:): Call complete_class_decl when class body
21387 (method_declaration:): Call source_end_java_method in pass 2 when
21388 the method body is defined.
21389 (postfix_expression:): Do expression name resolution on sub-rule
21390 name during pass 2.
21391 (create_class, create_interface): Merged common pieces.
21392 (check_class_interface_creation, maybe_create_class_interface_decl):
21394 (complete_class_decl): New function.
21395 (register_fields): Fixed line width related typo.
21396 (method_header): Correctly skip first argument when fixing
21397 argument line. Changed the loop.
21398 (java_check_circular_reference): Now use ctxp->class_list.
21399 (java_complete_class): Removed start/stop marking.
21400 (java_check_regular_methods): Now takes a class decl as an
21401 argument. Add default constructor if none were encountered.
21402 (java_check_methods): Now use ctxp->class_list. Changed call to
21403 java_check_regular_methods.
21404 (source_start_java_method): Set DECL_ARG_TYPE for each function
21406 (source_end_java_method, java_method_add_stmt): New functions.
21407 (java_generate_parsed_class): No longer exists.
21408 (java_layout_parsed_class, java_register_parsed_class): New functions.
21409 (resolve_expression_name): New function.
21411 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21413 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21414 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
21415 until pass initializations are done. Call read_import_dir with
21417 * parse.h: (lookup_modifier_cl): New function declared.
21418 (INTERFACE_FIELD_MODIFIERS): New macro.
21419 (OBSOLETE_MODIFIER_WARNING): New macro.
21420 * parse.y: (register_fields): Class type and current field name in
21421 local variables. Check modifier(s) if adding field(s) to an interface.
21422 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
21423 and report errors using the faulty modifier line context.
21424 (lookup_modifier_cl): New function.
21425 (read_import_dir): Detect and report default import processing
21428 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
21430 Add a pair of -fassume-compiled/-fno-assume-compiled options.
21431 * class.c (is_compiled_class): Return 1 after making sure it
21432 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
21433 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21434 * java-tree.h (flag_assume_compiled): Add decl.
21435 * lang.c (lang_f_options): Add the flag.
21436 (flag_assume_compiled): Add decl, default to 0.
21438 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
21440 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21441 (is_compiled_class): Likewise.
21442 (layout_class): Likewise.
21443 (layout_class): Detect and lay out classes defined in source code.
21444 (interface_of_p, add_interface_do, may_add_interface): New
21446 (add_interface): Now use add_interface_do.
21447 (add_method_1): New function.
21448 (add_method): Now use add_method_1.
21449 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21450 (complete_start_java_method): New function.
21451 (start_java_mehod): Now call complete_start_java_method.
21452 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21453 (expand_invoke): Likewise and fixed typo.
21454 *gjava.c: (print_super_field): Use new argument to find_class
21457 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
21458 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21459 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21461 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
21462 (add_method_1, push_class): New prototypes.
21463 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21464 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
21465 directory where the class was found.
21466 (find_class): New argument DO_CLASS_FILE. Function find_class
21467 modified accordingly.
21468 *jcf-parse.c: (fix_class_path): New function.
21469 (load_class): Use new VERBOSE argument. load_class now finds and
21470 loads/parses .class/.java files. Save read_state of current_jcf
21472 (java_parser_abort_on_error): New macro.
21473 (jcf_parse_source, parse_source_file): New function.
21474 (jcf_parse): Fixed typo.
21475 (yyparse): Call parse_source_file () only.
21476 (process_zip_dir): Fixed typo, fix zdir->filename_length when
21477 writing the real class name back in the zip directory entry.
21478 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21479 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21480 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21481 (find_class): Prototype fixed.
21482 *lex.c: Added 1998 time stamp.
21483 Removed all static global variables, moved into the parser
21484 context data structure.. Now include unistd.h if SEEK_SET not
21486 (java_init_lex): Rewritten.
21487 (java_sneak_unicode): Modified current unicode access in current line.
21488 (java_unget_unicode): Likewise.
21489 (java_allocate_new_line): New allocation management.
21490 (java_read_char): Modified access and storage of unget_utf8_value.
21491 New way of processing current unicode.
21492 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
21493 (java_get_unicode): Now use the parser context.
21494 (java_lineterminator): Likewise.
21495 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
21496 of the reentrant parser implementation. Function now use the
21497 parser context data structure and java_lval. Fixed production of
21498 the float and double constant "out of range" error message. Fixed
21499 obstack use. Return integer value when hitting a modifier. Now
21500 return type for TRUE, FALSE and other predefined types. Return
21501 identifier as a TREE_LIST list containing the current line context
21502 as the TREE_VALUE sub-node.
21503 (java_unicode_2_utf8): Fixed typo in declaration.
21504 (java_lex_error): Now use the parser context data structure.
21505 *lex.h: Added 1998 time stamp.
21506 (struct java_line): New fields ref_count and next.
21507 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21508 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
21509 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
21510 *parse.h: Added 1998 time stamp.
21511 (java_parse_source_file): Renamed from parse_source_file.
21512 (YYERROR_NOW, YYNOT_TWICE): Fixed.
21513 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
21514 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
21515 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
21516 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
21517 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
21518 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
21519 (struct parser_ctxt): New data structure to keep the parser context.
21520 *parse.y: Added 1998 time stamp, got rid of static global variables.
21521 (java_error_count, ctxp): New global variables.
21522 (%union): New value field.
21523 (numeric_type, integral_type): Rules removed.
21524 (primitive_type): Rule defined to handle integral, float, double and
21526 (qualified_name, package_declaration,
21527 single_type_import_declaration, type_import_on_demand_declaration,
21528 modifiers, class_declaration, super, interfaces,
21529 interface_type_list, class_body, field_declaration,
21530 field_declaration, variable_declarators, variable_declarator,
21531 variable_declarator_id, method_declaration, method_header,
21532 formal_parameter_list, formal_parameter, method_body, block,
21533 static, interface_declaration, extends_interfaces,
21534 abstract_method_declaration, local_variable_declarators): Rules now
21536 (force_error, do_warning): New global statics.
21537 (push_parser_context, parser_context_save_global,
21538 parser_context_restore_global, pop_parser_context): New functions.
21539 (yyerror): Now uses the global parser context. Fixed use of obstack.
21540 (parse_error, parse_error_context, parse_warning_context,
21541 java_accstring_lookup, redefinition_error, check_modifiers,
21542 parser_add_interface, create_interface, create_class, find_field,
21543 duplicate_declaration_error, register_fields, method_header,
21544 check_modifiers_consistency, check_abstract_method_header,
21545 method_declarator, parser_qualified_classname,
21546 parser_check_super_interface, parser_check_super,
21547 parser_chain_incomplete_item, java_check_circular_reference,
21548 layout_class_from_source, java_complete_class,
21549 complete_method_decl, resolve_class, complete_class_report_errors,
21550 java_check_final, check_method_redefinition,
21551 java_check_regular_methods, java_check_abstract_methods,
21552 java_check_methods, lookup_java_interface_method2,
21553 lookup_java_method2, lookup_cl, find_name_in_single_imports,
21554 process_imports, find_in_imports, read_import_entry,
21555 read_import_dir, find_in_imports_on_demand,
21556 check_pkg_class_access, not_builtin_p, declare_local_variables,
21557 source_start_java_method, java_generate_parsed_class): New
21559 *typeck.c: (signature_include_return): New global variable.
21560 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
21561 to add the function returned type in the signature.
21563 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
21565 * jcf-io.c (open_in_zip): Use strncmp and LEN.
21567 1998-01-29 Dave Brolley <brolley@cygnus.com>
21569 * Make-lang.in (java.info): Added.
21570 (java.install-info): Added
21572 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
21574 * Makefile.in (clean): Also remove java/parse.c.
21576 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
21578 Add a pair of -fbounds-check/-fno-bounds-check options.
21579 * lang.c (lang_decode_option): Add code to grok arguments.
21580 (flag_bounds_check): Add decl.
21581 (lang_f_options): New array w/ the option in it.
21582 * java-tree.h (flag_bounds_check): Add decl.
21583 * lang-options.h: New file.
21584 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
21585 of a static macro value.
21586 (JAVA_ARRAY_EXCEPTION): Delete macro.
21588 1998-01-23 Per Bothner <bothner@cygnus.com>
21590 * typeck.c (build_java_array_type): Fix two bugs in previous change.
21591 * expr.c (build_anewarray): Add missing promote_type.
21593 1998-01-22 Per Bothner <bothner@cygnus.com>
21595 Add array types with known length to optimize bounds checking.
21596 * typeck.c (build_java_array_type): Take length parameter.
21597 (java_array_type_length, build_prim_array_type): New functions.
21598 * java-tree.h: Update for new functions.
21599 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
21600 * class.c: Use build_prim_array_type.
21601 * expr.c (can_widen_reference_to): Handle known-length array types.
21602 (verify_jvm_instructions): Keep track of integer push instructions
21603 followed by newarray/anewarray, so we can build known-length arrays.
21604 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
21605 (java_array_data_offset): New function.
21606 (build_java_array_length_access): New function. Optimize if constant.
21607 (build_java_arrayaccess): Constant fold bounds check.
21608 (expand_java_newarray, expand_java_anewarray): Replaced by ...
21609 (build_newarray, build_anewarray): New functions.
21610 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
21611 * verify.c (merge_types): Handle known-lengh array types.
21613 1998-01-19 Per Bothner <bothner@cygnus.com>
21615 * expr.c (expand_byte_code): Fix performace bug, which caused
21616 searching linenumber_table to be linear rather than constant.
21618 1997-12-12 Per Bothner <bothner@cygnus.com>
21620 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
21622 * decl.c, java-tree.h (soft_fmod_node): New global.
21623 * decl.c (init_decl_processing): Define __builtin_fmod.
21624 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
21625 using __builtin_fmod.
21627 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
21629 * keyword.h: New file, output of keyword.gperf as processed by
21631 * lex.c (java_lex_init): Initialize java_error_flag.
21632 * parse.c (YYERROR_NOW): Uses java_error_flag.
21633 * parse.y: New static java_error_flag. Useless definition of
21635 * parse.y (java_error): Portable error recovery using
21636 java_error_flag (not yet completely tuned).
21638 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
21640 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
21642 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
21644 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
21645 (parse.c, lex.c, keyword.h): New rules for Java source code
21647 * parse.c: Renamed into jcf-parse.c.
21648 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
21649 * keyword.gperf: New file, Java keywords.
21650 * parse.y: New file, Java language grammar.
21651 * parse.h: New file, Java language grammar definitions.
21652 * lex.c: New file, Java language lexer.
21653 * lex.h: New file, Java language lexer definitions.
21655 1997-12-03 Per Bothner <bothner@cygnus.com>
21657 * decl.c (clinit_identifier_node), java-tree.h: New global.
21658 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
21659 * verify.c (verify_jvm_instructions): Inline use of removed macros.
21660 * expr.c (expand_java_field_op): Check for invalid assignment
21663 * jcf-reader.c (get_attribute): Test for wrong attribute length.
21665 1997-10-27 Per Bothner <bothner@cygnus.com>
21667 * verify.c (verify_jvm_instructions): When processing a handler,
21668 attempt to set the current_subr to the right value.
21669 (More complicated code combines Sep 17 and Oct 22 versions.)
21671 1997-10-24 Per Bothner <bothner@cygnus.com>
21673 * class.c (push_class): Figure out (guess) name of source file.
21674 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
21675 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
21676 (parse_class_file): Change return type from int to void.
21677 Call debug_start_source_file/debug_end_source_file.
21679 * expr.c (build_java_binop): Fix masking 2nd operand.
21680 * decl.c (init_decl_processing): Set sizetype first.
21682 1997-10-22 Per Bothner <bothner@cygnus.com>
21684 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
21685 (Revert Sep 17 change.)
21687 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
21689 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
21690 .class extension in their name and fix thing so we don't process
21691 them parse_zip_file_entries().
21692 (parse_zip_file_entries): Cleaned unused local variables.
21694 1997-10-20 Per Bothner <bothner@cygnus.com>
21696 * expr.c (can_widen_reference_to): Allows equal array element types.
21697 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
21698 * jcf-dump.c (RET): Get (and print) index.
21700 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
21701 Promote element type to POINTER_TYPE.
21703 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
21705 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
21706 find_in_current_zip, jcf_figure_file_type): Moved from
21707 jcf-reader.c to parse.c.
21708 * zextract.c: (read_zip_archive): takes file_comment_length possible
21709 field into account.
21711 1997-10-20 Per Bothner <bothner@cygnus.com>
21713 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
21715 * verify.c (merge_types): Handle array types even better ...
21717 1997-10-17 Per Bothner <bothner@cygnus.com>
21719 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
21721 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
21722 * class.c (make_class_data): Don't build fields_decl if no fields.
21723 When building fields_decl, skip if DECL_ARTIFICIAL.
21725 * expr.c (java_stack_swap): Update stack_type_map.
21726 * verify.c (merge_types): Handle array types better.
21728 1997-10-15 Per Bothner <bothner@cygnus.com>
21730 * class.c (add_field): Don't promote short integral fields to
21731 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
21732 * expr.c (push_value): Promote and convert short integral values.
21734 * decl.c, java-tree.h (integer_two_node): New constant node.
21735 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
21737 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
21739 * class.c (append_gpp_mangled_type): Use function argument
21740 unpromoted type to generate mangled name.
21742 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
21744 * constants.c (build_constant_data_ref): Now uses current_class
21745 instead of main_class.
21746 (build_constants_constructor): Now uses current_class instead of
21748 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
21749 of the global variable SeepZipFiles done here.
21750 * zextract.c (read_zip_archive): extra_field optional field taken
21751 into account while computing the position of the class file in the
21753 * verify.c (verify_jvm_instructions): Use current_jcf to search
21755 * parse.c (load_class): First search for the class to load in the
21756 current zip file. Saves current_jcf (restored before returning
21757 from that function). Don't call JCF_FINISH in the class was found
21758 in the current ZIP file.
21759 (jcf_parse): If the class was found in the current ZIP file, save
21760 its tree_constant_pool (for later reuse).
21761 (parse_class_file): New function. Process each method defined in
21762 the current class and record the class as to be later registered.
21763 (yyparse): Rewritten. Figure the type of the current file and switch
21765 * lang.c: New global variable current_jcf.
21766 (lang_init): Removed compiling_from_source test (done later, in
21767 yyparse). Removed call the jcf_parse ().
21768 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
21769 (typedef struct JCF): New fields seen_in_zip (to mark a class found
21770 in the current ZIP file) and zip_offset (offset to the class data in
21771 the current zip file).
21772 * jcf-reader.c: zipfile.h included.
21773 localToFile: New ZipFileCache static global variable
21774 (parse_zip_file_entries): New function. Browse the current ZIP
21775 file directory and process each class found.
21776 (process_zip_dir): New function. Register each class found in the
21777 ZIP file directory. The class aren't parsed but a valid JCF is
21778 link to each of them.
21779 (find_in_current_zip): New function. Search for a class in the
21780 current ZIP file directory. If found, prepare the class so that it
21782 (jcf_figure_file_type): New function. Examine the file structure
21783 to figure a class file, a ZIP file. If none of these categories are
21784 matched, a source file is assumed.
21785 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
21786 SeenZipFile: New global variable.
21787 (open_in_zip): Use zipmember's length to accelerate the search for
21788 a member. If zipmember was NULL and zip file successfully read,
21790 * java-tree.h: New global variable current_jcf declared. Added
21791 declaration for current_constant_pool_tags, current_constant_pool_data,
21792 current_constant_pool_length, current_constant_pool_data_ref.
21793 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
21794 store the JCF of classes seen in a zip file) and tree *constant_pool
21795 (to save a loaded class constant pool). current_class declared here.
21796 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
21797 retrieve method_ref_constant.
21798 (PUSHC): java_push_constant_from_pool now uses current_jcf.
21799 (OBJECT): get_class_constant now uses current_jcf.
21800 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
21801 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
21802 (expand_invoke): Now uses current_class instead of main_class
21803 (build_class_init): Now uses current_class instead of main_class
21804 * class.c: New static global variable registered_class.
21805 (register_class): New function.
21806 (emit_register_class): Modified to use registered_class instead of
21808 (is_compiled_class): Now take into account class seen in the archive.
21810 1997-10-06 Per Bothner <bothner@cygnus.com>
21812 * except.h: Renamed to: java-except.h.
21813 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
21814 * except.c: Add semi-working (commented out) implementation.
21816 * expr.c (expand_iinc): Add needed flush_quick_stack.
21817 * parse.c (set_source_filename): New function.
21818 (give_name_to_class): Set input_filename from package.classname.java.
21820 * jcf-io.c (find_class): Don't look first in ".".
21822 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21824 * zextract.c (read_zip_archive): Now takes into account the
21826 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
21828 1997-09-20 Per Bothner <bothner@cygnus.com>
21830 * constants.c, java-tree.h (build_internal_class_name): New function.
21831 (alloc_class_constant): Re-implement using build_internal_class_name.
21832 * class.c (make_class_data): Likewise.
21833 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
21835 1997-09-17 Per Bothner <bothner@cygnus.com>
21837 * verify.c (verify_jvm_instructions): Temporarily set current_subr
21838 to NULL before pushing an exception handler target.
21840 * expr.c (flush_quick_stack): Save from low stack indexes to high.
21841 (java_stack_swap, java_stack_dup): Re-write to be safe from
21842 clobbering registers.
21843 (build_class_init): New function.
21845 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
21847 * typeck.c (build_java_array_type): Temporary use
21848 permanent_obstack to create the array 'length' field.
21849 * expr.c (lookup_label): Temporay use permanent_obstack to create
21850 label if not found.
21851 * class.c (push_super_field): Tempory use permanent_obstack.
21853 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
21855 * typeck.c (type_for_mode): Now handles double_type_node and
21857 * verify.c (verify_jvm_instructions): The instruction following
21858 the wide bytecode is checked. OPCODE_ret added to the list of
21861 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
21863 * class.c (make_class): Temporary use permanent_obstack. Set the
21864 class CLASS_P field to 1.
21865 (push_class): Temporary use permanent_obstack.
21866 (set_super_info): Temporary use permanent_obstack.
21867 (add_method): Temporary use permanent_obstack, set
21868 METHOD_TRANSIENT().
21869 (add_field): Temporary use permanent_obstack. Sets
21870 FIELD_VOLATILE() and FIELD_TRANSIENT().
21871 (build_class_ref): Temporary use permanent_obstack if the class
21873 (build_static_field_ref): Temporary use permanent_obstack when
21874 creating field's rtl.
21875 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
21876 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
21877 and fields. Function finalized, as far as flag handling.
21878 (push_class_static_dummy_field): Temporary use permanent_obstack.
21879 (emit_register_class): Force generation of class registration at
21881 * decl.c (end_java_method): Call permanent_allocation() before
21883 * expr.c (can_widen_reference_to): Added comment to interface
21884 handling, fixed typo.
21885 (lookup_field): Now uses CLASS_P() to correct FIXME
21886 (expand_invoke): Verification on public && !static &&
21887 !abstract moved into soft_lookupinterfacemethod (kaffe).
21888 Use Object class dtable if objectref is an array when expanding
21890 (java_push_constant_from_pool): Temporary use permanent_obstack
21891 for CONSTANT_string
21892 * parse.c (get_ref_constant): Temporary use permanent_obstack to
21893 create constant references.
21894 (get_constant): Temporary use permanent_obstack to create constant.
21895 (load_class): Temporary use permanent_obstack to load class.
21896 (jcf_parse): Temporary use permanent_obstack to perform class
21898 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
21899 (build_java_signature): Temporary use permanent_obstack.
21900 * verify.c: (verify_jvm_instruction): removed unnecessary verification
21902 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
21903 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
21906 1997-09-11 Per Bothner <bothner@cygnus.com>
21908 * class.c (append_gpp_mangled_type): Fix typo.
21909 (emit_register_class): Use main_class to get class object, rather
21910 than looking for no-longer-existing static decl starting with _CL.
21911 * typeck.c (parse_signature_type): Promote array element type
21912 if it is a RECORD_TYPE.
21914 1997-09-10 Per Bothner <bothner@cygnus.com>
21916 * class.c (push_class_static_dummy_field): New function.
21917 (mangle_static_field): New. Do G++-style mangling of static fields.
21918 (layout_class): Mandle static fields here, not in add_field.
21919 (build_class_ref): The class object is now a dummy static field.
21920 * decl.c (find_local_variable): Look for best, instead of first match.
21921 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
21922 (build_java_athrow): Don't check here if exception is Throwable.
21923 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
21924 (TYPE_USED): Removed. No longer used ...
21925 * parse.c (jcf_parse): Call push_class_static_dummy_field.
21926 * verify.c (push_pending_label): New function.
21927 (push_pending_block): Renamed to check_pending_block.
21928 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
21929 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
21930 re-checking possible handlers) after a store (less wasted work).
21931 Check for null handler (finally) before calling add_handler.
21932 Various changes to (finally?) correctly handle try/finally.
21934 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
21936 * class.c: Include stdio.h.
21938 1997-09-04 Per Bothner <bothner@cygnus.com>
21940 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
21941 to make sure class is initialized before static/special invoke.
21943 * verify.c (verify_jvm_instructions): On a store instruction,
21944 call find_local_variable to force pre-allocation of decl and rtx.
21945 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
21947 1997-09-03 Per Bothner <bothner@cygnus.com>
21949 * class.c (build_class_ref): Strip off "promoted_" if need be.
21950 (make_field_value): Call build_java_signature when needed.
21951 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
21952 * expr.c (build_java_athrow): Don't push_value of exception.
21953 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
21954 match specification of [fd]cmp[lg] for NaNs.
21955 (expand_byte_code): Add support for exception handler ranges.
21956 * except.c: Add skeleton for EH code-generation.
21957 * verify.c (merge_types): Treat all promoted integral types as equal.
21958 * constants.c (build_constants_constructor): To force creation of
21959 current_constant_pool_data_ref, call build_constant_data_ref.
21961 * javaop.def (lload): Fix typo.
21962 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
21964 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
21966 * parse.c: Don't include function.h.
21968 1997-08-27 Per Bothner <bothner@cygnus.com>
21970 * except.[ch]: New files.
21971 * Makefile.in (JAVA_OBJS): Add except.o
21972 * expr.c: Temporary warning about unimplemented exceptions.
21973 * verify.c: Verify exception handlers.
21975 * jcf-dump.c (disassemble_method): Print exception table.
21977 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21979 * expr.c (verify_jvm_instructions): Started a thorough
21980 verification of invoke* bytecodes.
21981 (expand_byte_code): flush quick stack if PC is the target of a
21982 branch. and undef RET (conflicting with config/i386/i386.h).
21983 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
21985 (expand_invoke): Now handles invokeinterface and do more
21986 verification according to the bytecode.
21987 (lookup_field): Don't try to load the class if processing
21989 (can_widen_reference_to): Now handles interfaces.
21990 * decl.c (init_decl_processing): New global variable
21991 soft_lookupinterfacemethod_node, declared in java-tree.h.
21992 Call set_super_info on string_type_node.
21993 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
21995 * class.c (set_super_info): Fills the CLASS_* flags according to
21997 (get_access_flags_from_decl): Handles all class flags.
21999 1997-08-26 Per Bothner <bothner@cygnus.com>
22001 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
22002 * parse.c (yyparse): Check for abstract method, and missing code.
22003 * expr.c (expand_byte_code): Change interface.
22004 * lang.c (put_decl_node): Print promoted types prettier.
22005 * verify.c (verify_jvm_instruction): Change interface.
22006 Partial support for scanning exception table.
22007 For load instructions, handle promoted integral types.
22009 1997-08-21 Per Bothner <bothner@cygnus.com>
22011 * verify.c: New file, with contents moved from expr.c.
22012 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
22013 * typeck.c (is_array_type_p): Moved here from expr.c.
22014 * java-tree.h: Add some now-needed function declarations.
22015 * Makefile.in (JAVA_OBJS): Added verify.o.
22017 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22019 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22020 METHOD_ABSTRACT flag.
22022 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22023 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22024 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22026 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22028 (start_java_method): Hook for SYNCHRONIZED methods.
22030 * expr.c (build_java_jsr, build_java_ret): New functions
22031 (JSR,PRE): New macros
22032 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22033 (verify_jvm_instructions): tableswitch, lookupswitch,
22034 monitorenter, monitorexit, goto_w: verified.
22035 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22036 (build_java_monitor): New function.
22037 (MONITOR_OPERATION): Modified to call build_java_monitor()
22038 (verify_jvm_instructions): Started a thorough verification of
22041 1997-08-19 Per Bothner <bothner@cygnus.com>
22043 Support verification of jsr/ret subroutines (used for try/finally).
22044 * decl.c (return_address_type_node): New type node.
22045 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22046 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22047 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
22048 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22049 TYPE_USED): New macros for special types in type_map.
22051 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
22052 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
22054 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
22056 * expr.c (can_widen_reference_to): New function.
22057 (pop_type): Use it.
22058 (merge_type_state): Support handling start of subroutine.
22059 (push_pending_block): Return char* error message, instead of calling
22060 fatal on an error. Also handle subroutines.
22061 (verify_jvm_instructions): Handle errors from push_poending_block.
22062 Support jsr and ret instructions.
22064 1997-08-19 Per Bothner <bothner@cygnus.com>
22066 * jcf-io.c (find_classfile): Fix thinko.
22067 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
22069 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
22071 * Makefile.in (BISON): Remove.
22073 1997-08-07 Per Bothner <bothner@cygnus.com>
22075 * Makefile.in: Convert to autoconf.
22076 * config-lang.in (outputs): Added java/Makefile.
22078 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22079 Rename cc1java to jc1.
22081 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
22082 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
22084 * class.c (class_depth): Do load_class if needed.
22086 Mostly better verification.
22087 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
22088 (init_decl_processing): Change return type of soft_checkcast.
22089 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
22090 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22091 lang_print_error): New functions.
22092 (lang_init): Set global hook print_error_function to lang_print_error.
22093 * expr.c: In the type_map ptr_type_node is only used for null now.
22094 (pop_type, merge_types): Hence ptr_type_node matches any reference.
22095 (merge_types): Dererence pointer to record types before comparing.
22096 (decode_newarray_type, merge_types): On error just return NULL.
22097 (build_java_binop): Add preliminary implementation (with warning)
22098 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22099 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
22100 (expand_compare, expand_java_goto, expand_java_call): Don't
22101 push_pending_block, since that only makes sense when verifying.
22102 (merge_type_state): Different return codes.
22103 (push_pending_block): A block may need to be verified more than once.
22104 (expand_byte_code): Warn about unused code at code generation time.
22105 (verify_jvm_instruction): Changed logic, since code may need to be
22106 re-verified if type-state has changed. Also, better error handling.
22107 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22108 Improve newarray, anewarray, ?aload, athrow,
22109 * java-tree.h (LABEL_CHANGED): New macro.
22111 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
22113 * decl.c (soft_athrow_node): New global variable initialized.
22114 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22115 * typeck.c (convert): Added support for REAL_TYPE.
22116 (convert_to_char): New function.
22117 (convert): Handle CHAR_TYPE.
22118 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22119 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22120 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22122 (verify_jvm_instructions): Added break a the end of bogus unop: label.
22123 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22124 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22125 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22126 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22127 to Use The Right Things.
22128 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22129 compatible with INT. BOOLEAN is made equivalent to BYTE.
22130 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22131 OPCODE_ifnonnull): Now supported.
22132 (build_java_athrow): New function.
22134 1997-08-04 Per Bothner <bothner@cygnus.com>
22136 Rename method name <init> to match G++ (and fix mangling).
22137 * class.c (layout_class): Replace method name of <init> by class name.
22138 (make_method_value): Do inverse renaming of constructor from <init>.
22139 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
22140 * typeck.c (lookup_java_constructor): New function.
22141 * expr.c (expand_invoke): If method_name is <init>, call
22142 lookup_java_constructor to find constructor.
22144 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
22146 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22148 * parse.c (get_class_constant): Modified to handle array "classes"
22149 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22151 (convert): Modified to handle real type.
22152 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22153 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22154 variables declared.
22155 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22156 soft_multianewarray, soft_newarray_node, soft_throw_node): New
22157 global variables initialized.
22158 (find_local_variable): Handles the case of a pointer
22159 (end_java_method): Restore the use of one more scope
22160 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22161 build_java_array_length_access, expand_java_arrayload,
22162 expand_java_arraystore, expand_java_array_length,
22163 expand_java_multianewarray, expand_java_anewarray,
22164 build_java_check_indexed_type, is_array_type_p,
22165 build_java_throw_out_of_bound_exception): New functions.
22166 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22167 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22168 OPCODE_<t>aload): Implemented code for verification.
22169 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22170 ARRAY_NEW_MULTI): Macro defined.
22171 (CONVERT): Modified to invoke convert().
22172 (case OPCODE_aload2): Fixed index typo from 2 to 1.
22174 1997-07-31 Per Bothner <bothner@cygnus.com>
22176 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
22177 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
22178 (make_class_data): Field name needs '/' as package prefix.
22179 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
22181 1997-07-25 Per Bothner <bothner@cygnus.com>
22183 Implement debug information for local variables.
22184 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22185 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22186 DECL_LOCAL_SLOT_CHAIN): New macros.
22187 (struct lang_decl_var): New type.
22188 * parse.c (give_name_to_locals): Move to decl.c.
22189 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
22190 (start_java_method): Re-write parameter handling.
22191 (pending_local_decls): New global variable.
22192 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
22193 (find_local_variable): Accept pc so we can skips decls not in range.
22194 (struct binding_level): Add end_pc field.
22195 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22196 (various): Change so current pc gets passed to find_local_variable.
22198 * decl.c (init_decl_processing): Re-arrange fields in
22199 class_type_node and and method_type_node to match kaffe 0.9.1.
22200 * class.c (make_method_value, make_class_data): Update
22201 initializations to match.
22203 1997-07-16 Per Bothner <bothner@cygnus.com>
22205 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22206 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
22207 (push_super_field): New function.
22208 (make_class_data): Handle inheritance of class static initializer.
22209 (layout_class): New name mangling.
22210 * constants.c (build_constant_data_ref): Init type of data array
22211 to a one-element array.
22212 (build_constants_constructor): Set DECL_SIZE from complete array type.
22213 * decl.c: Rename class_type, object_type etc to class_type_node,
22214 object_type_node etc. Make former inherit from latter.
22215 * expr.c (expand_invoke): Add cast of function address.
22216 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
22217 * parse.c (yyparse): Don't call layout_class here.
22218 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
22220 1997-06-14 Per Bothner <bothner@cygnus.com>
22222 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
22223 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
22224 (alloc_class_constant): New.
22225 * expr.c (expand_invoke): Make sure method's class is initialized.
22226 * class.c (interits_from_p, emit_register_class): New functions.
22227 * parse.c (yyparse): Call emit_register_class.
22229 1997-06-09 Per Bothner <bothner@cygnus.com>
22231 * constants.c: New file, to handle constant pool.
22232 * Makefile.in (JAVA_OBJS): Add constants.o.
22233 * decl.c (init_decl_processing): Update, fix, finish various structs.
22234 (pushdecl_top_level): New.
22235 * parse.c (layout_class): Moved to class.c.
22236 * expr.c (java_push_constant_from_pool): New function.
22237 * class.c (build_class_ref): Make work fully
22238 (make_class_data): Emit super-class, constant pool, interface vector.
22240 1997-06-03 Per Bothner <bothner@cygnus.com>
22242 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
22243 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
22244 * class.c (class_depth): New function.
22245 (lookup_named_class): Replaced by new function lookup_class.
22246 * decl.c (object_type_node, string_type_node): New.
22247 Remove various types that we no longer need.
22248 * expr.c (verify_jvm_instructions): New separate verifier pass.
22249 (push_type, pop_type): New functions for verifier.
22250 (type_stack_dup, pop_argument_types, merge_types): Likewise.
22251 (expand_byte_code): Simplify, since we assume already verified.
22252 (expand_invoke): Now mostly works.
22253 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22254 * lang.c (main_class): Move to parse.c. Don't make_class yet.
22255 * parse.c: Wait to allocate class object until we know its name.
22256 (layout_class): Calculate DECL_VINDEX for each virtual method.
22257 * typeck.c (get_array_type): Rename to ...
22258 (build_java_array_type): ... and provide working implementation.
22259 (build_java_signature): New function - build Java signature of type.
22260 (set_java_signature): New function - cache signature with type.
22261 (lookup_java_method): New function.
22263 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
22265 * class.c (ident_subst): Take extra SUFFIX parameter.
22266 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
22267 (set_constant_value, build_static_field_ref, is_compiled_class): New.
22268 (build_class_ref): Actually implement.
22269 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
22270 * decl.c (builtin_function): New.
22271 (init_decl_processing): Update for current Kaffe. Declare some
22272 builtin Kaffe functions.
22273 * expr.c (build_address_of): New.
22274 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22275 Renamed (from expand_java_new etc), and added working implementations.
22276 (build_field_ref): Now also handle static fields.
22277 (expand_invoke): Implement invokestatic, and start implement rest.
22278 * java-opcodes.h: Use javaop.def to avoid duplicated list.
22279 * javaop.def: Rename invokevirt -> invokevirtual.
22280 * lang.c (use_handles): Removed.
22281 * parse.c: Add support for ConstantValue attribute.
22282 Handle nested loading of a class. (JPOOL_UTF): New.
22284 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
22286 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
22288 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
22290 * Make-lang.in (java.install-man): New empty rule.
22291 * typeck.c (set_local_type): New function.
22292 * expr.c (STORE_INTERNAL): Call find_local_variable,
22293 not find_stack_slot. Call set_local_type.
22295 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
22297 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
22298 and building RECORD_TYPE CONSTRUCTORs.
22299 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22301 * lang.c (use_handles): Change the default to 0.
22302 * decl.c: Define and build class_type, field_type, utf8const_type.
22303 * class.c (make_class_data, make_field_value,
22304 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22305 hashUtf8String, strLengthUtf8, mangled_classname:
22306 Functions to build reflective data structures.
22307 * parse.c (yyparse): Call make_class_data.
22309 * jcf-io.c (open_class, find_classfile): New functions.
22310 * jcf-dump.c: Support reading classfile from explicitly-named
22311 class file (without CLASSPATH searching).
22313 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22315 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
22316 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22317 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22318 (get_constant): Now trivial for CONSTANT_Utf8.
22320 * jcf.h: Make NEW_CPOOL the default.
22321 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
22323 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22328 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
22329 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
22331 Copying and distribution of this file, with or without modification,
22332 are permitted in any medium without royalty provided the copyright
22333 notice and this notice are preserved.