1 2006-05-04 Andrew Haley <aph@redhat.com>
3 * class.c (make_field_value): Always build_address_of fdecl if
4 there is an initializer.
6 2006-05-03 Andrew Haley <aph@redhat.com>
9 * expr.c (maybe_rewrite_invocation): New function.
10 (rewrite_arglist_getclass): Likewise.
12 (expand_invoke): Call maybe_rewrite_invocation.
13 * parse.y (patch_invoke): Likewise.
14 * java-tree.h: (maybe_rewrite_invocation): New function.
16 2006-04-21 Andrew Haley <aph@redhat.com>
18 * lang.c (java_init): Handle flag_indirect_classes.
19 * jvgenmain.c: Use "class$$" instead of "class$".
20 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
22 (mangle_class_field): Special case "class$$" as well as "class$".
23 * constants.c (build_ref_from_constant_pool): If
24 flag_indirect_classes, generate a ref into the heap.
25 * decl.c (constants_field_decl_node,
26 constants_data_field_decl_node): New.
27 * class.c (build_static_class_ref): New.
28 (build_classdollar_field): Factor out from build_class_ref().
29 (make_field_value): Handle static fields in heap.
30 (make_class_data): Make sure we get a static ref to class.
31 Make class initializer const if flag_indirect_classes.
32 (register_class): Build a class_ref for initialization if
33 flag_indirect_classes.
34 (emit_indirect_register_classes): New.
36 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
38 * expr.c, gjavah.c: Fix comment typos.
40 2006-04-03 Andrew Haley <aph@redhat.com>
43 * expr.c (build_field_ref): Don't check the field offset if
46 2006-03-30 Andrew Haley <aph@redhat.com>
49 * lang.c (java_attribute_table): New.
50 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
51 * expr.c (build_field_ref): Add a null pointer check for all
52 fields of offset > 4k. Don't do so for accesses via the this
53 pointer, which we know can never be null.
54 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
57 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
59 * Make-lang.in: Rename docdir to gcc_docdir.
61 2006-03-30 Tom Tromey <tromey@redhat.com>
64 * parse.y (java_reorder_fields): Reset superclass field's size as
67 2006-03-28 Tom Tromey <tromey@redhat.com>
70 * parse.y (find_most_specific_methods_list): Added 'class'
72 (lookup_method_invoke): Updated.
74 2006-03-15 Tom Tromey <tromey@redhat.com>
76 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
77 non-static method calls.
79 2006-03-15 David Daney <ddaney@avtrex.com>
81 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
84 2006-03-15 David Daney <ddaney@avtrex.com>
86 * lang.opt (-freduced-reflection): New option.
87 * lang.c (java_post_options): Generate an error if
88 -freduced-reflection used with -fjni or -findirect-dispatch.
89 * java-tree.h (flag_reduced_reflection): Declare new variable.
90 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
91 if bitmap overflows and flag_reduced_reflection set.
92 * class.c (uses_jv_markobj_p): New function.
93 (make_class_data): Moved generation of vtable to before
94 reflection data, generate less reflection data if
95 flag_reduced_reflection set.
96 * gcj.texi: Document -freduced-reflection.
98 2006-03-15 Tom Tromey <tromey@redhat.com>
101 * class.c (get_interface_method_index): Don't put <clinit> into
104 2006-03-15 Tom Tromey <tromey@redhat.com>
106 * parse.y (analyze_clinit_body): Ignore empty statements.
108 2006-03-08 David Daney <ddaney@avtrex.com>
110 * gcj.texi: Document -static-libgcj option.
112 2006-02-20 Andrew Haley <aph@redhat.com>
114 * jcf-parse.c (parse_class_file): Set input_location from
117 2006-02-15 Andrew Haley <aph@redhat.com>
119 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
120 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
121 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
123 2006-02-09 Andrew Haley <aph@redhat.com>
126 * expr.c (expand_invoke): Allow methods in arrays to be resolved
129 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
132 2006-02-08 Tom Tromey <tromey@redhat.com>
135 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
136 * builtins.c (convert_real): New function.
137 (java_builtins): Handle Float.intBitsToFloat,
138 Float.floatToRawIntBits, Double.longBitsToDouble,
139 Double.doubleToRawLongBits.
141 2006-02-07 Andrew Haley <aph@redhat.com>
143 * expr.c (expand_invoke): (BC mode.) If we find a method in a
144 class other than the one in which we expected to find it, ignore
148 * constants.c (build_constants_constructor): move initializer into
149 first halfword on a 64-bit big-endian machine.
151 2006-02-04 Tom Tromey <tromey@redhat.com>
154 * builtins.c (max_builtin): Skip floating point 'max'.
155 (min_builtin): Skip floating point 'min'.
156 (check_for_builtin): Never return NULL_TREE.
158 2006-02-04 Tom Tromey <tromey@redhat.com>
161 * expr.c (push_type): Avoid side effect in gcc_assert.
163 2006-02-04 Roger Sayle <roger@eyesopen.com>
165 * decl.c (java_init_decl_processing): Create char_type_node as a
166 regular INTEGER_TYPE node.
167 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
168 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
169 test for char_type_node and promoted_char_type_node as special
170 instances of INTEGER_TYPE tree codes.
171 (promote_type,build_java_signature): Likewise.
172 * jcf-write.c (adjust_typed_op): Likewise.
173 * mangle.c (mangle_type): Likewise.
174 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
175 * parse.h (JINTEGRAL_TYPE_P): Likewise.
177 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
179 * expr.c (java_stack_swap): Revert gcc_assert patch.
181 2006-02-03 Ben Elliston <bje@au.ibm.com>
183 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
184 * typeck.c: Likewise.
185 * verify-impl.c: Likewise.
188 * jcf-parse.c: Likewise.
189 * constants.c: Likewise.
190 * check-init.c: Likewise.
191 * jcf-write.c: Likewise.
192 * verify-glue.c: Likewise.
193 * mangle.c: Likewise.
198 2006-02-01 Jan Hubicka <jh@suse.cz>
200 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
201 * lang.c (java_init_options): Set no_unit_at_a_time_default.
203 2006-01-30 Andrew Haley <aph@redhat.com>
206 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
208 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
210 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
211 Update copyright notice dates.
213 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
215 * jvspec.c (lang_specific_spec_functions): Remove.
217 2006-01-06 Tom Tromey <tromey@redhat.com>
219 * gcj.texi (Arrays): Added more documentation for
221 (Primitive types): Correct information about primitive classes.
222 (Reference types): New node.
225 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
227 * jcf-parse.c (set_source_filename): Set the decl source location
228 even when returning early.
230 2005-12-15 Tom Tromey <tromey@redhat.com>
231 Andrew Haley <aph@redhat.com>
234 * parse.y (resolve_expression_name): Don't generate accessor
235 methods for constant fields.
237 2005-12-13 Andrew Haley <aph@redhat.com>
241 * class.c (maybe_layout_super_class): Update current_class before
242 calling do_resolve_class.
244 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
247 * jcf-write.c (write_classfile): Use PID in temporary class
248 file. Save/restore errno when reporting error.
250 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
253 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
254 to bare_function_type and including the return type
255 * builtins.c (initialize_builtins) : Change builtin mangled name
256 constants to conform to new mangling scheme
258 2005-12-08 Andrew Haley <aph@redhat.com>
261 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
262 (soft_abstractmethod_node): New.
263 * expr.c (build_field_ref): Add in-line check for missing field.
264 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
266 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
268 * Make-lang.in (java.all.build, java.install-normal): Remove.
270 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
272 * Make-lang.in: Remove all dependencies on s-gtype, except for
275 2005-12-07 Richard Sandiford <richard@codesourcery.com>
277 * class.c (build_utf8_ref, emit_register_classes): Use
278 switch_to_section and get_section.
280 2005-12-06 Tom Tromey <tromey@redhat.com>
283 * parse.y (patch_new_array_init): Revert previous patch.
284 (lookup_method_invoke): Use size-less array type when creating an
285 anonymous constructor.
287 2005-12-05 Tom Tromey <tromey@redhat.com>
289 * parse.y (patch_new_array_init): Don't set length on array.
291 2005-12-02 Richard Guenther <rguenther@suse.de>
293 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
294 buildN instead of build.
295 * class.c (finish_class): Likewise.
296 * expr.c (java_create_object): Likewise.
298 2005-11-28 Tom Tromey <tromey@redhat.com>
301 * expr.c (build_jni_stub): Unwrap the return value.
302 * java-tree.h (soft_unwrapjni_node): New define.
303 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
304 * decl.c (java_init_decl_processing): Initialize
307 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
309 * gcj.texi (gij options): Add -Xss documentation.
311 2005-11-08 Wil Mahan <wmahan@gmail.com>
314 * zextract.c (read_zip_archive): Fix out of memory error when
315 reading jar files with zip-style comments.
317 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
319 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
321 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
323 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
324 Wil Mahan <wmahan@gmail.com>
327 * class.c (make_class): Create empty binfo here.
328 (set_super_info): Only create binfo if we have superclasses.
330 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
333 * parse.y (method_header): Make the result of the rule a NULL_TREE
334 when a parsing error occurs.
336 2005-09-29 Tom Tromey <tromey@redhat.com>
339 * jcf-io.c (memoized_dirlist_hash): New function.
340 (caching_stat): Use it.
342 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
345 * class.c (inherits_from_p): Try to lay out super class
346 if it is not already laid out.
347 (maybe_layout_super_class): Handle the case where SUPER_CLASS
350 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
352 * builtins.c (max_builtin, min_builtin, abs_builtin,
353 java_build_function_call_expr): Use fold_buildN.
354 * class.c (layout_class_method): Likewise.
355 * expr.c (java_truthvalue_conversion, build_java_jsr,
356 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
357 build_java_binop, build_field_ref, expand_compare,
358 build_known_method_ref, build_invokevirtual,
359 process_jvm_instruction): Likewise.
360 * parse.y (patch_binop, patch_exit_expr): Likewise.
361 * typeck.c (convert_ieee_real_to_integer): Likewise.
362 (convert): Don't call fold after convert_ieee_real_to_integer.
364 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
367 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
368 the newly created type. Set import lists here, not in create_class.
369 (jdep_resolve_class): Set current_class.
370 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
371 the current package context, not ctxp->package.
372 (cicp_cache): Removed.
373 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
374 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
375 * java-tree.h (TYPE_PACKAGE): New macro.
376 (struct lang_type): New member 'package'.
378 2005-09-09 Andrew Haley <aph@redhat.com>
381 * expr.c (pop_type_0): If the expected type is object or ptr
382 (i.e. void*), return the type of the object we just popped from
385 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
387 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
388 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
390 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
392 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
393 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
394 typos. Follow spelling conventions.
396 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
399 * typeck.c (lookup_do): Look up interfaces for the original class,
401 * parse.y (java_check_regular_methods): Fix diagnostic message for
402 more restrictive overriding of a method from an interface.
404 2005-08-16 Tom Tromey <tromey@redhat.com>
406 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
407 class' initial state.
409 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
412 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
413 `literal_token' for large numeric input tokens.
415 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
418 * parse.y (nested_field_access_p): Rename to nested_member_access_p
419 and expand to handle method accesses across nested classes.
420 (build_outer_method_access_method): Rename to
421 build_nested_method_access_method. Minor adjustments to comments.
422 (resolve_expression_name): Use the newly-renamed
423 nested_member_access_p method.
424 (resolve_qualified_expression_name): Likewise.
425 (patch_method_invocation): Also consider static methods for access
426 method generation. Minor adjustments to comments.
427 (maybe_use_access_method): Use the more general
428 nested_memeber_access_p to determine access across nested class
429 boundaries. Allow THIS_ARG to be NULL (for static methods).
431 2005-08-15 Tom Tromey <tromey@redhat.com>
434 * expr.c (build_field_ref): Don't generate otable reference when
435 DECL_FIELD_OFFSET is 0.
436 * class.c (maybe_layout_super_class): Pass outer class to
439 2005-08-15 Tom Tromey <tromey@redhat.com>
441 * java-tree.h (LABEL_IN_SUBR): Removed.
442 (LABEL_IN_SUBR): Likewise.
443 (LABEL_IS_SUBR_START): Likewise.
444 (LABEL_SUBR_START): Likewise.
445 (LABEL_SUBR_CONTEXT): Likewise.
446 (LABEL_CHANGED): Likewise.
447 (LABEL_RETURN_LABEL): Likewise.
448 (LABEL_RETURN_TYPE_STATE): Likewise.
449 (LABEL_RETURN_LABELS): Likewise.
450 (RETURN_MAP_ADJUSTED): Likewise.
451 (LABEL_PENDING_CHAIN): Likewise.
453 2005-08-15 Tom Tromey <tromey@redhat.com>
455 * Make-lang.in (JAVA_OBJS): Removed verify.o
456 (java/verify.o): Removed.
458 * lang.c (flag_new_verifier): Removed.
459 (java_post_options): Updated.
460 * java-tree.h (flag_new_verifier): Removed.
461 (verify_jvm_instructions): Removed.
462 * expr.c (pop_type_0): Assume flag_new_verifier is true.
463 (build_java_check_indexed_type): Likewise.
464 (expand_java_arraystore): Likewise.
465 (expand_java_arrayload): Likewise.
466 (pop_arguments): Likewise.
467 (expand_byte_code): Likewise.
468 (process_jvm_instruction): Likewise.
470 2005-08-10 Andrew Haley <aph@redhat.com>
472 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
473 type mismatches to make legal GIMPLE.
475 2005-08-10 Robin Green <greenrd@greenrd.org>
478 * parse.y (maybe_use_access_method): Generalize check from
479 java.lang.Object to any superclass of current_class
481 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
483 * class.c (build_class_ref): Wrap the primary class type in a
485 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
486 primary class type from the NOP_EXPR in which it was placed.
488 2005-07-28 Diego Novillo <dnovillo@redhat.com>
490 * expr.c (expand_load_internal): Fix missing parens in
493 2005-07-28 Andrew Haley <aph@redhat.com>
495 * expr.c (expand_load_internal): Convert to destination type.
497 2005-07-22 Manfred Hollstein <mh@suse.com>
499 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
500 (check_constant): Likewise.
501 (check_wide_constant): Likewise.
503 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
505 Make CONSTRUCTOR use VEC to store initializers.
506 * check-init.c (check_init): Update to cope with VEC in
508 * class.c (make_field_value, make_method_value, get_dispatch_table,
509 make_class_data, emit_symbol_table, emit_catch_table,
510 emit_assertion_table): Use build_constructor_from_list instead of
512 * constants.c (build_constants_constructor): Likewise.
513 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
514 VEC in CONSTRUCTOR_ELTS.
515 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
516 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
518 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
520 * parse.y (build_new_array_init): Use build_constructor_from_list
521 instead of build_constructor.
522 (patch_new_array_init): Update to cope with VEC in
524 (array_constructor_check_entry): Likewise.
526 2005-07-12 Tom Tromey <tromey@redhat.com>
528 * jvspec.c (lang_specific_driver): Put filelist_filename first on
531 2005-07-12 Tom Tromey <tromey@redhat.com>
534 * parse-scan.y (interface_member_declaration): Added
537 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
539 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
540 (LABEL_PENDING_CHAIN): Ditto.
542 (DECL_BIT_INDEX): Ditto.
544 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
547 * parse.y (inner_class_accessible): New function. Logic moved from
548 check_inner_class_access.
549 (check_inner_class_access): Use inner_class_accessible.
550 (resolve_inner_class): Simplify arguments. Create circularity hash
551 here. Keep looking for classes if we found one that was inaccessible.
552 Return the inaccessible class only if there is no other match.
553 (do_resolve_class): Update for new resolve_inner_class arguments.
554 Don't create circularity_hash here.
556 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
559 * parse.y (add_exception_to_throws): New function.
560 (purge_unchecked_exceptions): Removed.
561 (get_constructor_super): Renamed from verify_constructor_super. Now
562 returns the super constructor after verification.
563 (java_complete_expand_method): Don't use purge_unchecked_exceptions
564 or save/restore the exception list.
565 (check_thrown_exceptions): Add uncaught exceptions in anonymous
566 class initializers and constructors to the throws clause of the method.
568 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
571 * parse.y (interface_member_declaration): Allow empty statements in
572 interface declarations.
574 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
576 * Makefile.in (parse.o): Adjust dependencies.
577 * parse.y: Include tree-dump.h.
579 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
581 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
584 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
586 * parse.y (issue_warning_error_from_context): Call
587 pp_output_formatted_text to be able to get the buffer.
589 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
591 * parse.y (issue_warning_error_from_context): Update for the
592 renaming of pp_format_text to pp_format.
594 2005-06-28 Paul Brook <paul@codesourcery.com>
596 * decl.c (java_init_decl_processing): Call
597 default_init_unwind_resume_libfunc.
599 2005-06-27 Tom Tromey <tromey@redhat.com>
601 PR java/21540, PR java/13788:
602 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
603 fold_constant_for_init.
604 (patch_binop): Added 'folding' argument. Updated all callers.
605 (patch_unaryop) <NOP_EXPR>: New case.
606 (fold_constant_for_init) <NOP_EXPR>: Likewise.
607 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
609 2005-06-25 Jan Hubicka <jh@suse.cz>
611 * builtins.c (define_builtin): Accept new flags parameter.
612 (initialize_builtins): Mark the builtins const and nothrow accordingly.
614 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
616 * all files: Update FSF address in copyright headers.
618 2005-06-24 Tom Tromey <tromey@redhat.com>
620 * verify-impl.c (verify_instructions_0): Correctly handle
621 situation where PC falls off end.
623 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
626 * parse.y (find_most_specific_methods_list): Remove special case for
629 2005-06-15 Tom Tromey <tromey@redhat.com>
632 * class.c (make_method_value): Use soft_abstractmethod_node for
634 * java-tree.h (soft_abstractmethod_node): New define.
635 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
636 * decl.c (java_init_decl_processing): Initialize
637 soft_abstractmethod_node.
639 2005-06-13 Geoffrey Keating <geoffk@apple.com>
641 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
643 2005-06-13 Per Bothner <per@bothner.com>
645 * expr.c (int highest_label_pc_this_method,
646 start_label_pc_this_method): New globals.
647 (lookup_label): Add start_label_pc_this_method to pc for label, and
648 update highest_label_pc_this_method. This prevents conflicts between
649 labels from different methods.
650 * java-tree.h: Declare new globals.
651 * jcf-parse.c (parse_class_file): If needed bump
652 start_label_pc_this_method and reset highest_label_pc_this_method.
654 2005-06-13 Tom Tromey <tromey@redhat.com>
657 * parse.y (nested_field_access_p): Handle case where outer field
658 is inherited by enclosing class.
660 2005-06-12 Per Bothner <per@bothner.com>
662 * class.c (inherits_from_p): Do load_class if needed.
664 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
666 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
667 * java-tree.h (parse_error_context): Move...
668 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
669 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
670 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
672 2005-06-08 Roger Sayle <roger@eyesopen.com>
674 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
676 2005-06-06 Jakub Jelinek <jakub@redhat.com>
678 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
679 msgid for argument name.
680 * gjavah.c (error): Likewise.
681 * java-tree.h (parse_error_context): Likewise.
682 * parse.y (parse_error_context, parse_warning_context,
683 issue_warning_error_from_context): Likewise.
685 2005-06-01 Tom Tromey <tromey@redhat.com>
688 * class.c (build_static_field_ref): Don't fold constant fields if
689 current class is from a .class file and we're using indirect
692 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
694 * java/verify-glue.c: Don't include errors.h and include toplev.h.
695 * java/Make-lang.in: Updates dependencies.
697 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
700 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
701 NESTED_FIELD_ACCESS_IDENTIFIER_P.
702 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
703 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
704 * jcf-write.c (generate_classfile): Use
705 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
706 OUTER_FIELD_ACCESS_IDENTIFIER_P.
707 * parse.y (build_outer_field_access): Rename to
708 build_nested_field_access. Support static fields and outer-to-inner
710 (outer_field_access_p): Rename to nested_field_access_p. Support
711 static fields and generalise to outer-to-inner class and sibling
712 inner class accesses.
713 (outer_field_expanded_access_p): Rename to
714 nested_field_expanded_access_p and support static fields.
715 (outer_field_access_fix): Rename to nested_field_access_fix and
716 support static fields.
717 (build_outer_field_access_expr): Rename to
718 build_nested_field_access_expr and support static fields.
719 (build_outer_field_access_methods): Rename to
720 build_nested_field_access_methods and support static fields. For
721 static fields, generate accessors without class instance parameters.
722 (build_outer_field_access_method): Rename to
723 build_nested_field_access_method and support static fields.
724 (build_outer_method_access_method): Use
725 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
726 OUTER_FIELD_ACCESS_IDENTIFIER_P.
727 (resolve_expression_name): Consider static field accesses across
729 (resolve_qualified_expression_name): Likewise.
730 (java_complete_lhs): Use nested_field_access_fix instead of
731 outer_field_access_fix.
732 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
733 Use nested_field_expanded_access_p instead of
734 outer_field_expanded_access_p. Use nested_field_access_fix instead
735 of outer_field_access_fix.
736 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
737 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
739 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
741 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
742 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
743 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
744 MINOR_BINARYCOMPAT_ABI_VERSION): New.
745 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
746 (parse_version): Calculate version ID using new method. Use bit-flags
747 for flag_indirect_dispatch and flag_bootstrap_classes.
749 2005-05-25 Richard Henderson <rth@redhat.com>
752 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
753 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
754 DECL_CONTEXT; avoid pushdecl_top_level.
755 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
756 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
757 (layout_class_method): Likewise.
758 * decl.c (java_mark_cni_decl_local): New.
759 (java_mark_class_local): Use it.
760 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
761 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
762 (struct lang_decl_func): Add local_cni;
763 (struct lang_decl_var): Add class_field, vtable.
764 (java_mangle_decl): Declare.
765 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
766 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
767 (mangle_obstack_1): New.
768 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
769 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
770 lhd_set_decl_assembler_name for things that don't need mangling.
771 (mangle_class_field): Rename from java_mangle_class_field, make
772 static, don't call init_mangling or finish_mangling.
773 (mangle_vtable): Similarly.
774 (mangle_local_cni_method_decl): New.
775 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
776 gcc_assert, and MANGLE_RAW_STRING.
777 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
779 2005-05-25 DJ Delorie <dj@redhat.com>
781 * class.c (set_constant_value): Move warning control from if() to
784 2005-05-24 Richard Henderson <rth@redhat.com>
786 * builtins.c (define_builtin): Don't call make_decl_rtl.
787 * constants.c (build_constant_data_ref): Likewise.
788 * class.c (build_utf8_ref): Likewise.
789 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
790 (get_dispatch_table, layout_class_method): Likewise.
791 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
793 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
794 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
795 to determine if we need a non-zero address.
796 * decl.c (builtin_function): Don't call make_decl_rtl.
797 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
798 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
799 * resource.c (compile_resource_data): Likewise.
800 * parse.y (resolve_field_access): Re-word comment to avoid
803 2005-05-24 Richard Henderson <rth@redhat.com>
805 * class.c (registered_class): Take it out of class_roots; turn into
807 (register_class): Make static. Don't duplicate decl node. Use
809 (emit_register_classes): Use VEC_iterate. Use output_constant
810 instead of assemble_integer. Don't call mark_decl_referenced
812 * java-tree.h (register_class): Remove decl.
814 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
818 * parse.y (register_package, package_list): Remove.
819 (package_declaration): Do not call register_package.
820 (do_resolve_class): Do not use package_list.
822 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
824 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
827 2005-05-15 Tom Tromey <tromey@redhat.com>
830 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
833 2005-05-12 Aaron Luchko <aluchko@redhat.com>
835 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
837 2005-05-11 Tom Tromey <tromey@redhat.com>
839 * gcj.texi (Code Generation): Document -fbootstrap-classes.
840 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
841 (parse_version): Use it.
842 * lang.opt (-fbootstrap-classes): New option.
844 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
847 * class.c (maybe_layout_super_class): Look for imports in this_class.
848 * parse.h (ctxp_for_generation_last): New.
849 (do_resolve_class): Add a parameter.
850 * parse.y (ctxp_for_generation_last): New.
851 (java_pop_parser_context): Add at end of list.
852 (find_in_imports, find_in_imports_on_demand): Look in ctxp
853 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
854 the given type are NULL.
855 (do_resolve_class): Look into the imports of the new second parameter.
856 Adjust recursive calls.
857 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
858 calls to do_resolve_class.
859 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
860 (java_complete_class): Do not do that here.
862 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
865 * Make-lang.in (java): Add gjnih.
866 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
867 (GJNIH_OBJS): New variable.
868 (gjnih$(exeext)): New target.
869 (JAVA_MANFILES): Add gjnih.1.
870 (java.uninstall): Add gjnih.1.
871 (java.mostlyclean): Add gjnih.
872 (java.maintainer-clean): Add gjnih.1.
873 (java/gjavah-jni.o): New target.
874 (.INTERMEDIATE): Add gjnih.pod.
875 (gjnih.pod): New target.
876 * config-lang.in (stagestuff): Add gjnih.
877 * gcj.texi (Top): Add gjnih node.
878 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
879 -bootclasspath options.
880 (Invoking gjnih): New node.
881 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
882 (TOOLNAME): New macro.
883 (error): Replace hard-coded gcjh with TOOLNAME.
884 (process_file): Likewise.
887 (help): Likewise. Add help output for -force, -old, -trace and -J
889 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
890 (options): Add force, old, trace and J fields.
891 (main): Handle -force, -old, -trace and -J options.
893 2005-05-03 Tom Tromey <tromey@redhat.com>
896 * gjavah.c (main): Unlink output file on error.
898 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
900 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
903 2005-04-29 Tom Tromey <tromey@redhat.com>
905 * expr.c (build_jni_stub): Updated for change to build_block.
907 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
909 * expr.c (force_evaluation_order): Declare 'saved' earlier.
911 2005-04-28 Andrew Haley <aph@redhat.com>
914 * java-tree.h (soft_resolvepoolentry_node): New.
915 (alloc_constant_fieldref): Declare.
916 * expr.c (expand_java_field_op): Don't call class_init for
917 accesses to static fields with indirect dispatch.
918 * builtins.c (initialize_builtins): Add "__builtin_expect".
919 * decl.c (soft_resolvepoolentry_node): New variable.
920 (java_init_decl_processing): Create a decl for
921 "_Jv_ResolvePoolEntry".
922 * class.c (build_fieldref_cache_entry): New function.
923 (build_static_field_ref): Rewrite for indirect dispatch.
924 * constants.c (find_name_and_type_constant_tree): New function.
925 (alloc_constant_fieldref): Likewise.
926 (build_constants_constructor): Handle CONSTANT_Fieldref and
927 CONSTANT_NameAndType.
930 * expr.c (force_evaluation_order): Convert outgoing args smaller
933 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
935 * gcj.texi (libgcj Runtime Properties): Remove obsolete
936 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
937 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
939 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
941 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
942 to `unlock_stream' with `unlock_std_streams'.
944 2005-04-25 Jakub Jelinek <jakub@redhat.com>
946 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
947 instead of just expr.h.
949 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
951 * gjavah.c (main): Unlock the stdio streams.
952 * jcf-dump.c (main): Likewise.
953 * jv-scan.c (main): Likewise.
954 * jvgenmain.c (main): Likewise.
956 2005-04-23 DJ Delorie <dj@redhat.com>
958 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
959 parse.y: Adjust warning() callers.
961 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
963 * gcj.texi (Object fields): Change "Integer" to "Int" in example
966 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
968 * gcj.texi: Fix typos and bogus example.
970 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
972 * except.c: Fix a comment typo.
974 2005-04-19 Julian Brown <julian@codesourcery.com>
976 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
977 indirect dispatch with PIC.
979 2005-04-18 Andrew Haley <aph@redhat.com>
981 * java-except.h (struct eh_range.handler): Remove unused field.
982 (handle_nested_ranges): Remove function declaration.
983 (sanity_check_exception_range): Add function declaration.
984 * verify.c (verify_jvm_instructions): Remove call to
985 handle_nested_ranges.
986 * verify-glue.c (verify_jvm_instructions_new): Call
987 sanity_check_exception_range.
988 * except.c (link_handler, eh_range_freelist, link_handler,
989 handle_nested_ranges): Remove.
990 (add_handler): Rewrite.
991 (sanity_check_exception_range): New function.
992 (print_ranges): New function.
994 2005-04-13 Julian Brown <julian@codesourcery.com>
996 * decl.c (finish_method): Give methods once-only linkage.
998 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
1000 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1002 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1004 * java-tree.h: Don't use PARAMS().
1006 2005-04-07 Per Bothner <per@bothner.com>
1008 * class.c (push_class): By default, suppress debug output.
1009 (finish_class): Enable debug output for classes we're emitting.
1011 2005-04-07 Andrew Haley <aph@redhat.com>
1013 * gcj.texi: Correct gcj-dbtool instructions.
1015 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
1017 * gcj.texi: Fix a typo.
1018 * lang.c: Fix a comment typo.
1020 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
1022 * gcj.texi (Invoking gij): Add descriptions of new -X options.
1023 Mention recognized-and-ignored compatibility options.
1024 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
1026 (About CNI): Add Memory allocation section.
1028 2005-04-01 Tom Tromey <tromey@redhat.com>
1030 * decl.c (java_init_decl_processing): Fix types of
1031 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
1032 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
1033 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
1035 2005-03-31 Jan Hubicka <jh@suse.cz>
1037 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
1038 * class.c: Include cgraph.h
1039 (make_local_functoin_alias): Mark aslias as needed.
1040 * resource.c: Include cgraph.h
1041 (compile_resource_data): Go via cgraph interface.
1043 2005-03-30 Ian Lance Taylor <ian@airs.com>
1045 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
1047 2005-03-30 Tom Tromey <tromey@redhat.com>
1049 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
1050 inner_class_info_index==0 or outer_class_info_index==0.
1052 2005-03-29 Tom Tromey <tromey@redhat.com>
1054 * gcj.texi (libgcj Runtime Properties): Document
1055 gnu.gcj.runtime.endorsed.dirs.
1057 2005-03-24 Anthony Green <green@redhat.com>
1059 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
1062 2005-03-23 Tom Tromey <tromey@redhat.com>
1064 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
1065 (parse_version): Use it.
1067 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
1069 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1071 2005-03-18 Andrew Haley <aph@redhat.com>
1074 * decl.c (update_aliases): Don't update variables that are about
1076 (maybe_poplevels): Add comment.
1078 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
1081 * jcf-parse.c (duplicate_class_warning): New function.
1082 (java_parse_file): Call duplicate_class_warning if
1083 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
1084 (parse_zip_file_entries): Likewise. Also set
1085 CLASS_FROM_CURRENTLY_COMPILED_P.
1087 2005-03-16 Andrew Haley <aph@redhat.com>
1089 * expr.c (expand_java_arrayload): Don't generate a
1090 NullPointerException based on the type of the node.
1091 (build_java_array_length_access): Likewise.
1093 2005-03-15 Zack Weinberg <zack@codesourcery.com>
1095 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
1097 2005-03-11 Tom Tromey <tromey@redhat.com>
1099 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
1100 (libgcj Runtime Properties): Document the default .db.
1102 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
1105 * parse.y (checks_throws_clauses): Check exceptions list even when
1106 the base class does not come from a source file being compiled.
1107 (java_complete_lhs): Remove unused variable 'wfl'.
1109 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
1112 * decl.c (finish_method): Emit _Jv_InitClass for private static
1113 methods inside inner classes as well.
1115 2005-03-08 Julian Brown <julian@codesourcery.com>
1116 * Revert patch from 2005-03-08 for causing bootstrap failure on
1119 2005-03-08 Julian Brown <julian@codesourcery.com>
1121 * decl.c (finish_method): Give methods once-only linkage.
1123 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
1125 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
1127 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
1129 * verify-glue.c (vfy_is_assignable_from): Perform static check using
1130 can_widen_reference_to if the C++ ABI is in use.
1131 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
1132 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
1133 type_isresolved, init_state, set_pc, state_get_pc,
1134 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
1135 (verify_fail): Report the current PC from the verifier context.
1136 (free_state): Remove #if 0 block to enable this function.
1137 (free_verifier_context): Call free_state on state_list iterator
1138 values before freeing them.
1139 * expr.c (pop_type_0): Pop correct type for error message when stack
1140 contains a multi-word type.
1142 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
1144 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
1145 for known NULL array length access.
1147 2005-03-07 Tom Tromey <tromey@redhat.com>
1149 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
1151 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
1153 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
1154 typeck.c: Update copyright.
1156 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
1159 * xref.c, xref.h: Remove file.
1160 * Make-lang.in (java/xref.o): Remove.
1161 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
1162 * lang.c (flag_emit_xref): Remove definition.
1163 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
1164 * typeck.c (convert): Remove use of do_not_fold.
1165 * parse.y (do_not_fold): Remove definition.
1166 (parser grammar): Remove xref code.
1167 (maybe_create_class_interface_decl, create_class): Likewise.
1168 (register_fields, method_header, finish_method_declaration): Likewise.
1169 (declare_local_variables, source_end_java_method): Likewise.
1170 (java_complete_expand_classes): Do not set do_not_fold.
1171 (java_complete_expand_method): Remove xref code.
1172 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
1173 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
1174 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
1175 (patch_synchronized_statement, patch_throw_statement): Likewise.
1176 (maybe_build_class_init_for_field): Likewise.
1178 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
1180 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
1181 instead of IS_NON_TYPE_CODE_CLASS.
1183 2005-03-04 Andrew Haley <aph@redhat.com>
1186 * class.c (set_method_index): Don't set method_index if it is
1188 (layout_class_method): Don't complain about "non-static method foo
1189 overrides static method" in the case of indirect dispatch.
1191 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1193 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
1195 * Make-lang.in: Don't elide warnings in jcf-io.c.
1197 2005-03-01 Per Bothner <per@bothner.com>
1200 * check-init.c (wfl): Remove static.
1201 (final_assign_error, check_init): Replace calls to parse_error_context
1203 (check_init): Save, set, and restore input_location for each exp.
1205 2005-03-01 Per Bothner <per@bothner.com>
1207 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
1208 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
1209 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
1211 2005-03-01 Per Bothner <per@bothner.com>
1213 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
1215 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
1218 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
1221 2005-02-22 Tom Tromey <tromey@redhat.com>
1224 * verify-impl.c (EITHER): New define.
1225 (types_compatible): Handle it.
1226 (check_field_constant): Use it.
1228 2005-02-18 Tom Tromey <tromey@redhat.com>
1231 * verify-impl.c (types_equal): Fixed test.
1234 * verify-glue.c (vfy_class_has_field): New function.
1235 * verify.h (vfy_class_has_field): Declare.
1236 * verify-impl.c (check_field_constant): Added 'putfield'
1238 (verify_instructions_0): Updated.
1239 (types_equal): New function.
1241 2005-02-14 Tom Tromey <tromey@redhat.com>
1244 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
1245 stack effect of multianewarray.
1247 2005-02-14 Andrew Haley <aph@redhat.com>
1250 * expr.c (expand_byte_code): Call promote_arguments().
1251 (promote_arguments): New function.
1252 * decl.c (check_local_unnamed_variable): Remove special case for
1254 (find_local_variable): Promote all boolean types to int
1255 when searching for local variable decls.
1257 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
1259 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
1260 parse-scan.y: Update copyright.
1262 2005-02-11 Per Bothner <per@bothner.com>
1265 * parse-scan.y (input_location): Remove variable.
1266 (main_input_filename): New - replaces input_filename, which isn't
1267 settable if USE_MAPPED_LOCATION.
1268 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
1269 so we don't reference input_location or wfl_operator in that case.
1270 * jv-scan.c (expand_location): Remove - no longer used.
1271 (main): Set main_input_filename rather than input_filename.
1273 2005-02-09 Richard Henderson <rth@redhat.com>
1275 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
1276 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
1278 2005-02-08 Marcin Dalecki <martin@dalecki.de>
1280 * expr.c (add_type_assertion): Use the proper enumeration type,
1281 since this is what htab_find_slot() is expecting.
1283 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
1285 * gcj.texi: Update copyright dates.
1287 2005-02-02 Tom Tromey <tromey@redhat.com>
1289 * gcj.texi (libgcj Runtime Properties): Default library_control
1292 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
1295 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
1296 (modifiers) when square brackets are present in a declaration for
1298 * jv-scan.c (main): Set input_filename and input_line.
1300 2005-02-01 Tom Tromey <tromey@redhat.com>
1303 * gjavah.c (get_field_name): Don't override name for JNI header.
1305 2005-02-01 Roger Sayle <roger@eyesopen.com>
1307 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
1308 of unsigned types using iushr and lushr JVM bytecodes.
1310 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
1313 * gjavah.c (jni_print_float): Do not emit floating-point
1314 initialiser for a static final field.
1315 (jni_print_double): Likewise.
1317 2005-02-01 Mark Mitchell <mark@codesourcery.com>
1320 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1321 * gjavah.c (print_field_info): Mark static data members of
1322 floating-point type with "__extension__".
1324 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1326 * gjavah.c (print_field_info): Mark static data members of
1327 floating-point type with "__extension__".
1329 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
1332 * parse.y (build_string_concatenation): Remove redundant if.
1333 (patch_conditional_expr): Attempt to patch_string() the condition
1334 of a ?: as well, in addition to its other operands.
1336 2005-01-25 Tom Tromey <tromey@redhat.com>
1338 * Make-lang.in (java/java-tree-inline.o): Removed.
1340 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
1343 * parse.y (patch_binop): Allow comparisons against NULL only
1344 if the other operand is of a reference type.
1346 2005-01-24 Tom Tromey <tromey@redhat.com>
1348 * java-tree.h (gcj_abi_version): Declare.
1349 * class.c (make_class_data): Push gcj_abi_version into "next"
1350 field. Renamed field.
1351 * decl.c (gcj_abi_version): New global.
1352 (parse_version): New function.
1353 (java_init_decl_processing): Call it. Renamed 'next' field.
1355 (GCJ_BINARYCOMPAT_ADDITION): New define.
1357 2005-01-24 Roger Sayle <roger@eyesopen.com>
1360 * jcf-write.c (generate_bytecode_insns): Conversions between
1361 integer types of the same precision shouldn't generate widening
1362 or narrowing conversion bytecodes.
1364 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
1366 * java-except.h, java-tree.h: Remove unused prototypes.
1368 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
1371 * jcf-write.c (perform_relocations): Don't call memcpy if source
1372 and destination are the same.
1374 2005-01-17 Tom Tromey <tromey@redhat.com>
1376 * verify-impl.c (get_short): Sign extend.
1377 (get_int): Likewise.
1379 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
1381 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
1384 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
1386 * verify.c: Revert to the version before the BC-ABI merge.
1388 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
1391 * check-init.c (check_init): Take care of references that do not
1392 have an explicit final variable declaration (e.g. array length
1393 access) for pre/post in/de-crement operators.
1395 2005-01-08 Mark Wielaard <mark@klomp.org>
1397 * parse.y (process_imports): Allocate (and free) original_name only
1398 when not already defined.
1399 * jcf-parse.c (read_class): Free results of find_class() and
1401 (java_parse_file): Keep pointer to head of file_list and free when
1402 done. Free result of lrealpath().
1404 2005-01-05 Tom Tromey <tromey@redhat.com>
1406 * gcj.texi (Standard Properties): java.ext.dirs is now used.
1408 2004-12-20 Andrew Haley <aph@redhat.com>
1410 * typeck.c: Use fold_convert for ints and booleans.
1412 2004-12-17 Andrew Haley <aph@redhat.com>
1415 * typeck.c (convert): Use a CONVERT_EXPR when converting to
1416 BOOLEAN_TYPE or CHAR_TYPE.
1417 (convert_to_boolean, convert_to_char) : Remove.
1418 * convert.h (convert_to_boolean, convert_to_char) : Remove.
1419 * expr.c (expand_load_internal): Do type conversion if type is not
1422 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
1425 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
1428 2004-12-07 Andrew Haley <aph@redhat.com>
1431 * jcf-parse.c (load_class): Remove sanity test for missing inner
1434 2004-12-06 Tom Tromey <tromey@redhat.com>
1436 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
1437 (java.uninstall): Likewise.
1438 (java.maintainer-clean): Likewise.
1439 (.INTERMEDIATE): Likewise.
1440 (java.install-man): Likewise.
1441 (gcj-dbtool.pod): New target.
1442 * gcj.texi (Code Generation): Document -findirect-dispatch.
1443 (libgcj Runtime Properties): Document
1444 gnu.gcj.precompiled.db.path.
1445 (Top): Link to "Invoking gcj-dbtool".
1447 2004-12-06 Tom Tromey <tromey@redhat.com>
1450 * java-tree.h (extract_field_decl): Declare.
1451 * parse.y (extract_field_decl): Renamed from
1452 strip_out_static_field_access_decl. No longer static.
1453 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
1455 2004-12-03 Tom Tromey <tromey@redhat.com>
1457 * lang.c (flag_new_verifier): Define.
1458 (java_post_options): Set flag_new_verifier if indirect dispatch
1460 * lang.opt (fnew-verifier): Removed.
1462 2004-12-03 Tom Tromey <tromey@redhat.com>
1465 * Make-lang.in (java.install-common): Only install transformed
1466 gcjh if gcj-cross exists.
1468 2004-12-03 Andrew Haley <aph@redhat.com>
1471 * except.c (link_handler): Patch 'outer' field of siblings of the
1472 range we're demoting.
1474 2004-12-03 Andrew Haley <aph@redhat.com>
1477 * class.c (layout_class_method): Don't fail to override a method
1478 simply because it has DECL_ARTIFICIAL set.
1480 2004-12-02 Tom Tromey <tromey@redhat.com>
1483 * parse.y (craft_constructor): Special case null_pointer_node.
1485 2004-12-02 Tom Tromey <tromey@redhat.com>
1488 * java-gimplify.c (java_gimplify_expr): Don't call
1489 SET_EXPR_LOCATION unless wrapped tree is an expression.
1491 2004-11-27 Per Bothner <per@bothner.com>
1493 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
1494 Fix fencepost error in 'i', which got executed one too many times.
1495 Also, fold memcpy into explicit loop, as originally intended.
1496 Also, free temporary 'buf' which otherwise leaks.
1498 2004-11-27 Per Bothner <per@bothner.com>
1500 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
1501 local static variables if not USE_MAPPED_LOCATION.
1503 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
1505 * class.c, decl.c, expr.c: Fix comment typos.
1507 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
1510 * decl.c (end_java_method): Call
1511 attach_init_test_initialization_flags on all the init_decls.
1512 * parse.y (attach_init_test_initialization_flags): Move to ...
1513 * expr.c (attach_init_test_initialization_flags): here and
1514 support BIND_EXPR also.
1515 * java-tree.h (attach_init_test_initialization_flags): Prototype.
1516 * jcf-parse.c (parse_class_file): Don't disable class init
1519 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1521 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
1524 2004-11-24 Richard Henderson <rth@redhat.com>
1526 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
1527 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
1529 2004-11-24 Tom Tromey <tromey@redhat.com>
1531 * verify.c (defer_merging): Don't use C++-style comment.
1532 * verify.h (java_opcode): Added java_opcode_end.
1533 * class.c (build_class_ref): Remove C++ comment and old FIXME.
1535 * verify-impl.c (vfy_push_type): Removed bogus "return".
1536 (initialize_stack): Use vfy_alloc and vfy_free.
1537 (verify_instructions_0): Likewise.
1539 * Merged gcj-abi-2-dev-branch to trunk.
1541 2004-11-24 Andrew Haley <aph@redhat.com>
1543 * jcf-parse.c (parse_class_file): Set file_start_location.
1545 2004-11-10 Tom Tromey <tromey@redhat.com>
1547 * class.c (make_field_value): Don't call build_static_field_ref.
1548 (build_static_field_ref): Don't emit direct references when using
1551 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
1552 -verbose:class into man page synopsis.
1554 2004-11-09 Tom Tromey <tromey@redhat.com>
1556 * expr.c (build_java_arraystore_check): Still generate check if
1557 element type is itself an array.
1559 2004-11-08 Tom Tromey <tromey@redhat.com>
1561 * java-tree.h (soft_check_assignment_node): Removed.
1562 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
1563 * decl.c (java_init_decl_processing): Don't initialize
1564 soft_check_assignment_node.
1566 2004-11-05 Tom Tromey <tromey@redhat.com>
1568 * class.c (layout_class_methods): Don't add Miranda methods when
1569 using indirect dispatch.
1571 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
1573 * class.c (make_class_data): Call emit_assertion_table to set the
1574 'assertion_table' field.
1575 (build_signature_for_libgcj): Move here from expr.c.
1576 (add_assertion_table_entry): New function. Callback for assertion
1577 hashtable traversal.
1578 (emit_assertion_table): New. Take class argument, and generate
1579 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
1580 * decl.c (init_decl_processing): Define assertion_entry_type record.
1581 Push 'assertion_table' class field instead of 'verify'.
1582 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
1583 (type_assertion_hash): Include 'assertion_code' in hash.
1584 (add_type_assertion): Rewritten. Take class and assertion_code
1585 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
1586 (can_widen_reference_to): Use new add_type_assertion() arguments.
1587 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
1588 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
1589 (verify_identifier_node): Removed.
1590 (assertion_entry_type, assertion_table_type): New.
1591 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
1592 assertion code definitions.
1593 (struct type_assertion): Add assertion_code. Rename 'source_type' and
1594 'target_type' to 'op1' and 'op2'.
1595 (add_type_assertion): Declare.
1596 (lang_printable_name_wls): Remove unused definition.
1597 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
1598 to emit runtime assertion.
1599 (vfy_note_stack_type): Clean up non-C90 declarations.
1600 (vfy_note_local_type): Likewise.
1601 * verify.h (vfy_is_assignable_from): Declare.
1602 * verify-impl.c (is_assignable_from_slow): Remove unused function.
1603 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
1604 instead of is_assignable_from_slow().
1605 (types_compatible): Reinstate ref_compatible() call.
1607 2004-11-04 Tom Tromey <tromey@redhat.com>
1609 * class.c (build_static_field_ref): Reverted previous patch.
1611 * class.c (build_static_field_ref): Don't emit direct references
1612 when using indirect dispatch.
1614 2004-11-03 Tom Tromey <tromey@redhat.com>
1616 * expr.c (expand_java_arrayload): Set lhs_type_node.
1617 (expand_java_arraystore): Set rhs_type_node.
1619 2004-11-02 Tom Tromey <tromey@redhat.com>
1621 * jcf-parse.c (compute_class_name): Use filename length from zip
1622 directory, not strlen.
1624 * expr.c (expand_invoke): Mark new interface methods as abstract.
1626 2004-11-01 Tom Tromey <tromey@redhat.com>
1628 * verify-impl.c (push_jump): Removed check for uninitialized
1630 (push_exception_jump): Likewise.
1631 (handle_ret_insn): Likewise.
1632 (handle_jsr_insn): Likewise.
1633 (state_check_no_uninitialized_objects): Removed.
1635 * decl.c (check_local_unnamed_variable): Recognize
1636 promoted-to-int parameters when using the new verifier.
1637 * expr.c (expand_java_arraystore): Explicitly request array type
1638 when using new verifier.
1639 (expand_java_arrayload): Likewise.
1640 (invoke_build_dtable): Don't pass object_type_node as
1641 expression argument to build_java_indirect_ref.
1642 (build_java_check_indexed_type): Do nothing.
1643 (build_java_arraystore_check): Handle case where array doesn't
1645 (build_java_array_length_access): Likewise.
1646 (expand_invoke): Handle case where interface overrides a method
1648 (pop_type_0): Always succeed for reference types.
1649 (process_jvm_instruction): Don't pop a value in a dead
1651 (pop_arguments): Convert arguments to correct types.
1653 2004-10-29 Andrew Haley <aph@redhat.com>
1655 * jcf-parse.c (give_name_to_class): Remove line that was
1658 2004-10-29 Andrew Haley <aph@redhat.com>
1660 * jcf-parse.c (set_source_filename): Add code to build new sfname.
1662 2004-10-20 Andrew Haley <aph@redhat.com>
1664 * decl.c (end_java_method): Don't expand if flag_syntax_only.
1666 2004-10-26 Tom Tromey <tromey@redhat.com>
1668 * verify.h (vfy_notify_verified): Removed.
1669 * verify-glue.c (vfy_notify_verified): Removed.
1671 2004-10-26 Tom Tromey <tromey@redhat.com>
1673 * verify-impl.c (debug_print_state): Declare `i' before code.
1674 (merge_types): Modify `t' when it is null_type.
1676 2004-10-26 Tom Tromey <tromey@redhat.com>
1678 * verify-impl.c (type_print): Renamed from print. Now static and
1680 (debug_print_state): Use type_print.
1682 2004-10-25 Tom Tromey <tromey@redhat.com>
1684 * expr.c (build_invokeinterface): Compute correct offset for
1685 index into interface methods.
1687 2004-10-20 Tom Tromey <tromey@redhat.com>
1689 * java-tree.h (verify_jvm_instructions_new): Declare.
1691 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
1694 * verify-impl.c (verify_instructions): Correctly handle wide
1696 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
1697 (vfy_get_component_type): Strip pointer types.
1698 (vfy_find_class): Use get_type_from_signature. Strip pointer
1700 Include java-except.h.
1702 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
1704 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
1705 vfy_push_type_t, set_variable, add_new_state, merge_into,
1706 handle_jsr_insn, branch_prepass, check_class_constant,
1707 check_wide_constant, get_one_type, compute_static_types,
1708 verify_instructions_0): Clean up C99 declarations after statements.
1710 2004-10-20 Tom Tromey <tromey@redhat.com>
1712 * verify-impl.c (merge_refs): Compare reference against iterator,
1715 * verify-glue.c (vfy_tag): Mask off resolved flag.
1717 2004-10-19 Tom Tromey <tromey@redhat.com>
1719 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
1720 (init_state_with_stack): Initialize `this_type' in state.
1721 (verify_method): Use debug_print.
1722 * verify-glue.c (vfy_is_primitive): Removed debugging print.
1723 (vfy_note_stack_depth): Reverted last patch.
1724 (vfy_note_stack_type): Note pointer to Object, not Object.
1725 (vfy_note_local_type): Likewise.
1727 * verify.h (vfy_note_instruction_seen): Declare.
1728 * verify-glue.c (verify_jvm_instructions_new): Set
1729 BCODE_EXCEPTION_TARGET on target instruction.
1730 (vfy_note_instruction_seen): New function.
1731 * verify-impl.c (FLAG_INSN_SEEN): New define.
1732 (verify_instructions_0): Set flag on instruction. Save state for
1734 (verify_instructions): Call vfy_note_instruction_seen.
1736 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
1737 (verify_jvm_instructions_new): Call method_init_exceptions,
1738 add_handler, and handle_nested_ranges.
1739 * verify-impl.c (verify_method): Return 1 on success.
1740 (verify_instructions_0): Save the state at PC=0.
1742 * verify-impl.c (init_type_from_class): Set is_resolved and
1743 ref_next on new ref_intersection.
1744 (init_type_from_string): Likewise.
1746 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
1748 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
1749 if flag_new_verifier is set.
1750 * java-tree.h (flag_new_verifier): Declare.
1751 * lang.opt (fnew-verifier): New option.
1752 * verify-impl.c: Work around namespace pollution by undef'ing
1754 (struct verifier_context): Make 'bytecode' const.
1755 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
1756 (types_compatible): For the BC-ABI, always consider reference types
1758 (check_class_constant): Use vfr->current_class.
1759 (check_constant): Likewise.
1760 (check_wide_constant): Likewise.
1761 (check_field_constant): Check for 'L' at start of type name.
1762 (get_one_type): Return pointer instead of type. Set type result in
1763 caller via passed type pointer.
1764 (compute_argument_types): Update to use new get_one_type arguments.
1765 (compute_return_type): Likewise.
1766 (make_verifier_context): New. Allocate and initialize 'vfr'.
1767 (free_verifier_context): New. Free 'vfr' and its contents.
1768 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
1769 and free_verifier_context.
1771 2004-10-15 Tom Tromey <tromey@redhat.com>
1773 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
1774 * verify.h (vfy_fail): Fixed formatting.
1776 * verify-impl.c (vfr): Fixed comment formatting.
1777 (collapse_type): New function.
1778 (verify_instructions): Notify compiler about type map.
1779 * verify.h (vfy_note_stack_depth): Updated.
1780 (vfy_note_stack_type): Likewise.
1781 (vfy_note_local_type): Likewise.
1782 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
1784 * verify-glue.c (vfy_note_stack_depth): Correctly size type
1785 state. Added `method' argument.
1786 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
1788 (vfy_note_local_type): New function.
1789 (vfy_unsuitable_type): Likewise.
1790 (vfy_return_address_type): Likewise.
1791 (vfy_null_type): Likewise.
1793 * verify.h (VFY_IN_GCC): Removed.
1794 (VFY_WANT_TYPEMAP): Removed.
1795 * verify-impl.c (verify_instructions_0): Removed useless "\".
1796 (struct state) <next>: Uncomment.
1798 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
1800 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
1803 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
1805 * Make-lang.in (verify.o): Re-enabled this target.
1806 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
1807 (vfy_get_interface): Likewise.
1808 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
1809 * verify.h (verify_jvm_instructions_new): Declare.
1810 * verify-impl.c (free_state): Temporarily comment out unused
1813 2004-10-06 Tom Tromey <tromey@redhat.com>
1815 * java-tree.h (JV_STATE_READ): New enum value.
1817 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
1819 * verify.h: New file.
1821 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
1823 * verify-impl.c, verify-glue.c, verify.h: New files.
1824 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
1826 2004-09-24 Andrew Haley <aph@redhat.com>
1828 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
1829 for a slot if it's of pointer type.
1831 2004-09-14 Tom Tromey <tromey@redhat.com>
1833 * class.c (make_class_data): Correctly initialize "state" field.
1834 Initialize "engine" field.
1835 * decl.c (java_init_decl_processing): Add "engine" field.
1837 2004-09-10 Andrew Haley <aph@redhat.com>
1840 * expr.c (build_invokeinterface): Use fast method for interface
1842 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
1843 JTI_ITABLE_PTR_TYPE.
1844 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
1845 (emit_symbol_table): Add new arg, element_size.
1846 * decl.c (java_init_decl_processing): Initialize Class.itable.
1847 * class.c (GEN_TABLE): New macro.
1848 (gen_indirect_dispatch_tables): Use it. Add itable.
1849 (make_class_data): Add new arg for emit_symbol_table().
1851 (add_miranda_methods): Make sure search_class has been parsed.
1852 (emit_symbol_table): Add new arg, element_size.
1854 2004-09-06 Andrew Haley <aph@redhat.com>
1856 * verify.c (merge_types): Return Object for all merges of
1858 * expr.c (add_type_assertion): Don't generate assertions when
1859 source type is array of Object.
1861 2004-09-03 Andrew Haley <aph@redhat.com>
1863 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
1865 * lang.c (java_post_options): Force flag_verify_invocations if
1866 we're not using indirect dispatch.
1868 * expr.c (pop_type_0): Move test for interfaces before call to
1869 can_widen_reference_to().
1870 (build_signature_for_libgcj): Remove generation of canonical array
1872 (add_type_assertion): Canonicalize both arrays.
1873 Don't assert that type X can be assigned to Object.
1874 Don't assert that type X an be assigned to type X.
1875 Don't assert that Object can be assigned to type X.
1876 (can_widen_reference_to): Warn whenever we generate an assertion.
1877 (process_jvm_instruction): Use throwable_type_node for the type of
1880 2004-09-01 Andrew Haley <aph@redhat.com>
1882 * decl.c (java_init_decl_processing): Change
1883 verify_identifier_node to "__verify".
1884 * expr.c (add_type_assertion): Use verify_identifier_node for name.
1885 * java-tree.h (verify_identifier_node): Change to "__verify".
1887 * expr.c (build_signature_for_libgcj): New function.
1888 (add_type_assertion): Use it to construct signatures for
1889 source_type and target_type.
1891 2004-08-27 Andrew Haley <aph@redhat.com>
1893 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
1894 (verify_identifier_node): New.
1895 (TYPE_VERIFY_METHOD): New.
1896 (struct type_assertion): New type.
1897 * expr.c (type_assertion_eq): New function.
1898 (type_assertion_hash): New function.
1899 (add_type_assertion): New function.
1900 (can_widen_reference_to): Call add_type_assertion().
1901 * decl.c (java_init_decl_processing): Add verify_identifier_node.
1902 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
1903 (finish_class): Output TYPE_VERIFY_METHOD (type).
1905 * decl.c (end_java_method): Nullify unused fields.
1907 2004-08-17 Andrew Haley <aph@redhat.com>
1909 * verify.c (defer_merging): Quieten.
1910 * jcf-parse.c (load_class): Only try to open a class file if it's
1911 java.lang.Object or if it's part of the current compilation.
1912 Check that the class we just tried to load is the class we just
1914 (java_parse_file): Set flag_verify_invocations off if we're
1915 compiling from .class.
1916 (parse_zip_file_entries): Abort if we try to read a dummy class.
1917 * expr.c (can_widen_reference_to): Quieten.
1918 (build_invokevirtual): Abort if we try to invokevirtual an
1920 (expand_invoke): Don't build a non-interface call to an interface.
1921 (build_instanceof): Don't do premature optimization if
1922 flag_verify_invocations is not set.
1923 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
1925 (build_static_field_ref): Add correct type conversion for
1927 (add_miranda_methods): Disable generation of Miranda methods for
1929 (layout_class_method): Don't complain about non-static method
1930 overrides static method with dummy classes.
1932 2004-08-13 Tom Tromey <tromey@redhat.com>
1934 * class.c (build_static_field_ref): Re-enable atable lookups for
1937 * parse.y (strip_out_static_field_access_decl): Indentation fix.
1939 2004-08-11 Tom Tromey <tromey@redhat.com>
1941 * gcj.texi (libgcj Runtime Properties): Document new properties.
1943 2004-08-06 Andrew Haley <aph@redhat.com>
1945 * jcf-parse.c (load_class): Check that we really have loaded the
1946 class we're looking for.
1948 2004-07-19 Andrew Haley <aph@redhat.com>
1950 * verify.c (verify_jvm_instructions): Comment change only.
1952 * typeck.c (build_java_array_type): Add size field to array name.
1954 * java-tree.h (LOCAL_SLOT_P): New.
1955 (update_aliases): Add PC argument.
1956 (pushdecl_function_level): New function.
1958 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1959 MODIFY_EXPR, and SAVE_EXPR.
1960 (java_gimplify_modify_expr): New function.
1962 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1963 (expand_iinc): Pass PC to update_aliases().
1964 (STORE_INTERNAL): Likewise.
1965 (process_jvm_instruction): Likewise.
1967 * decl.c (base_decl_map): New variable.
1968 (uniq): New variable.
1969 (update_aliases): Rewrite with more thorough checking.
1970 (debug_variable_p): New function.
1971 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
1972 (check_local_named_variable): Delete whole function.
1973 (initialize_local_variable): New function.
1974 (check_local_unnamed_variable): Add checks and comments.
1975 (find_local_variable): Rewrite.
1976 (java_replace_reference): New function.
1977 (function_binding_level): New variable.
1978 (pushdecl_function_level): New function.
1979 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1980 (maybe_pushlevels): Call pushdecl() on each of the new decls.
1981 (start_java_method): Reset uniq. Create base_decl_map. Set
1982 function_binding_level.
1983 (end_java_method): Null unused fields to save memory.
1985 2004-06-29 Andrew Haley <aph@redhat.com>
1987 * except.c (expand_start_java_handler): Push a new binding level.
1988 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
1989 register_exception_range() to register where we'll do it.
1990 (expand_end_java_handler): Remove old bogus code. Replace with
1991 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
1992 the top of the expression we're curently building.
1993 (maybe_end_try): Delete.
1994 * decl.c (binding_level.exception_range): New field.
1995 (clear_binding_level): Add field exception_range. Reformat.
1996 (poplevel): Call expand_end_java_handler().
1997 (poplevel): Call java_add_stmt only if functionbody is false.
1998 (maybe_poplevels): Don't call maybe_end_try() from here.
1999 (end_java_method): Clear no longer used trees in function decl.
2000 (register_exception_range): New function.
2001 * java-tree.h (register_exception_range, struct eh_range): Declare.
2003 2004-06-22 Andrew Haley <aph@redhat.com>
2005 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
2007 * check-init.c (get_variable_decl): Teach check-init about
2008 FIELD_DECLs addressed via the otable.
2009 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
2012 2004-05-28 Andrew Haley <aph@redhat.com>
2014 * jcf-parse.c (load_class): Don't try to read a class that we've
2017 * expr.c (build_invokeinterface): Use the old-fashioned way of
2018 doing indirect dispatch: look up interfaces by name.
2019 * java-tree.h (enum java_tree_index): Add
2020 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
2021 * decl.c (java_init_decl_processing): Add
2022 soft_lookupinterfacemethodbyname_node.
2024 * gjavah.c (print_method_info): Final methods have vtable entries,
2025 so gjavah needs to output them.
2026 * class.c (layout_class_method): Generate vtable entries for final
2028 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
2029 dispatch, even if a method is final.
2031 2004-05-25 Andrew Haley <aph@redhat.com>
2033 * class.c (build_symbol_entry): Convert the names of constructors
2034 to init_identifier_node when generating an entry for the indirect
2037 * expr.c (build_known_method_ref): Generate indirect calls for
2038 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
2040 2004-05-24 Andrew Haley <aph@redhat.com>
2042 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
2043 atable element is of the right type.
2045 * class.c (build_static_field_ref): Cast pointer to correct type
2048 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
2050 * Merged with HEAD as of 20040514. Diff against
2051 gcj-abi-2-merge-20040514.
2053 2004-04-16 Andrew Haley <aph@redhat.com>
2055 * verify.c (check_pending_block): Disable subroutine checks.
2056 (defer_merging): New function.
2057 (merge_types): If types are dummy, use defer_merging to combine them.
2058 (verify_jvm_instructions): If invocation is invokeinterface and
2059 target is dummy, assume target really is an interface.
2061 * parse.y (patch_invoke): Break out call to java_create_object.
2063 * lang.c (flag_verify_invocations): New.
2065 * jcf-parse.c (load_class): If we've already failed to load a
2066 class, don't try again.
2067 (load_class): If we can't find a .class file, don't fail, but emit
2069 (parse_class_file): Don't act on dummy methods.
2071 * java-tree.h (flag_verify_invocations): New.
2073 (lang_type.dummy_class): New field.
2074 (java_create_object): New function.
2075 (METHOD_DUMMY): New.
2077 * expr.c (build_field_ref): Widen field offset.
2078 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
2079 that each of its elements is compatible with the one we're
2081 (pop_type_0): Issue a warning to say that we need to generate a
2083 (java_create_object): New function.
2084 (build_field_ref): Only generate hard refs if we're not using
2086 (expand_java_field_op): If we're using !verify_invocations and we
2087 see a missing field, generate a decl for it.
2089 (expand_invoke): If a class doesn't have the method we seek and
2090 we're using !flag_verify_invocations, generate a decl for the
2093 (build_known_method_ref): Always use indirect dispatch via the
2094 atable for static methods.
2096 (expand_java_NEW): Break out object creation into new function,
2099 (can_widen_reference_to): Issue a warning to say that we need to
2100 generate a runtime check.
2102 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
2103 (make_method_value): Also use index for interfaces.
2104 (make_class_data): Skip dummy field for inherited data.
2105 Don't build method array for dummy methods.
2106 Set size_in_byte to -1 when using inirect dispatch
2107 Don't build a hard class ref if we don't have a hard ref to our
2108 superclass, or if we're using inirect dispatch.
2109 Null out dispatch tables.
2111 (layout_class_method): Don't complain about non-static method
2112 overrides static method is method is artificial.
2114 (build_static_field_ref): Disable atable references to static
2115 fields for the time being.
2117 (layout_class_methods): Check for CLASS_INTERFACE as
2118 well as CLASS_ABSTRACT.
2120 2004-11-24 Steven Bosscher <stevenb@suse.de>
2122 * class.c (make_class_data): Don't check flag_inline_functions.
2123 * lang.c (flag_really_inline): Remove unused flag.
2124 (java_handle_option): Don't set it here. Remove special handling
2125 of flag_inline_functions for Java.
2126 (java_init): Don't set flag_inline_trees here. Already done...
2127 (java_post_options): ...here. Don't clear flag_inline_functions.
2129 2004-11-24 Steven Bosscher <stevenb@suse.de>
2131 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
2132 (java_gimplify_exit_block_expr): New function.
2133 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
2135 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
2136 (EXIT_BLOCK_EXPR): Likewise.
2137 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
2138 (LABELED_BLOCK_BODY): Likewise.
2139 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
2140 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
2141 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
2143 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
2144 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
2145 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
2146 second operand of EXIT_BLOCK_EXPR.
2147 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
2149 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
2151 2004-11-23 Ben Elliston <bje@au.ibm.com>
2153 * xref.h (xref_flag_value): Remove.
2154 (xref_set_data, xref_get_data): Likewise.
2155 (xref_set_current_fp): Likewise.
2156 (XREF_NONE): Likewise.
2157 (XREF_GET_DATA): Likewise.
2158 * xref.c (xref_flag_value): Remove.
2159 (xref_set_data, xref_get_data): Likewise.
2160 (xref_set_current_fp): Likewise.
2162 2004-11-23 Ben Elliston <bje@au.ibm.com>
2164 * gjavah.c (output_directory): Make static.
2165 (temp_directory): Likewise.
2167 2004-11-15 Tom Tromey <tromey@redhat.com>
2169 * decl.c (instn_ptr_type_node): Removed.
2170 (lineNumbers_ptr_type_node): Removed.
2171 (jint_type): Removed.
2172 (jint_ptr_type): Removed.
2174 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
2177 * check-init.c (check_init): Ignore DECL_EXPR.
2178 * expr.c (always_initialize_class_p): Reenable.
2179 (build_class_init): Use a variable to store the decl. Also use
2180 boolean_false_node instead of integer_zero_node.
2181 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
2184 2004-11-08 Tom Tromey <tromey@redhat.com>
2187 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
2188 generating a JNI header.
2189 (print_field_info): Handle JNI headers.
2190 (jni_print_float): Likewise.
2191 (jni_print_double): Likewise.
2193 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
2195 * decl.c (end_java_method): Remove duplicated code.
2197 2004-11-06 Zack Weinberg <zack@codesourcery.com>
2198 Gerald Pfeifer <gerald@pfeifer.com>
2200 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2203 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
2206 * class.c: Reinstate 2004-08-18 patch.
2207 (make_local_function_alias): Don't create an alias for extern (native)
2210 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
2213 * class.c (make_local_function_alias): Revert 2004-08-18 change.
2214 (make_method_value): Likewise.
2216 2004-10-21 Andrew Haley <aph@redhat.com>
2219 * jcf-parse.c (set_source_filename): Add code to build new sfname.
2221 2004-10-20 Andrew Haley <aph@redhat.com>
2223 * decl.c (end_java_method): Don't expand if flag_syntax_only.
2224 Remove duplicated code block.
2226 2004-10-18 Steven Bosscher <stevenb@suse.de>
2228 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
2229 New rules to work around old Bison warnings.
2231 2004-10-17 Steven Bosscher <stevenb@suse.de>
2233 * class.c (ident_subst): Always alloca buffer.
2234 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
2235 opcode after including javaop.def.
2236 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
2237 conditional expression that exits, to avoid warnings.
2238 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
2239 a user of an extension.
2240 * win32-host.c: Move check down to have non-empty file when
2241 WIN32 is not defined.
2243 * Make-lang.in (java-warn): Add STRICT_WARN.
2244 (java/jcf-io.o-warn): Don't have Werror for this file.
2245 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
2247 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
2249 * expr.c (expr_add_location): Move declaration to before all
2251 * parse.y (java_expand_classes): Ditto.
2252 * lex.c (java_peek_unicode): Ditto.
2254 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
2256 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
2257 if possible, else convert `foo' to 'foo'.
2258 * class.c: Likewise.
2261 * jcf-io.c: Likewise.
2262 * jcf-parse.c: Likewise.
2265 * parse.h: Likewise.
2267 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
2269 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
2270 rename parameter 'msg' to 'msgid' in function declaration.
2271 (issue_warning_error_from_context): Likewise.
2272 (yyerror): Rename parameter 'msg' to 'msgid'.
2273 (all over): Use new quoting style for diagnostics.
2275 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2277 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
2278 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
2281 2004-10-14 Matt Austern <austern@apple.com>
2283 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
2286 2004-10-13 Tom Tromey <tromey@redhat.com>
2289 * lang.opt (--extdirs): Document.
2290 * jvspec.c (lang_specific_driver): Recognize -encoding and
2293 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
2295 * parse.y (issue_warning_error_from_context): Use va_list *
2296 instead of va_list parameter.
2297 (parse_error_context): Update call.
2298 (parse_warning_context): Likewise.
2300 2004-10-05 Zack Weinberg <zack@codesourcery.com>
2302 * parse.y, parse-scan.y: Add list of diagnostic messages to
2303 insulate translation template from version of yacc/bison used
2304 to compile the grammar.
2306 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
2308 Prepare for %q, %< and %> in diagnostic message strings.
2309 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
2310 Name second parameter 'msgid'.
2311 * parse.y: Additionally include pretty-print.h and diagnostic.h.
2312 (issue_warning_error_from_context): Use pretty-printer functions
2313 instead of vsprintf for constructing formatted messages. Rename
2314 parameter 'msg' to 'msgid'.
2315 (parse_error_context): Rename parameter 'msg' to 'msgid'.
2316 (parse_warning_context): Likewise.
2318 2004-10-05 Andrew Haley <aph@redhat.com>
2321 * jcf-parse.c (parse_zip_file_entries): If a class has a
2322 superclass and a TYPE_SIZE of zero, lay it out.
2324 2004-09-30 Andrew Haley <aph@redhat.com>
2327 * jcf-parse.c (compute_class_name): Rewrite.
2329 2004-10-01 Jan Hubicka <jh@suse.cz>
2331 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
2333 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
2335 * lex.c: Fix a comment typo.
2337 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
2339 * java-tree.h: Fix a comment typo.
2341 2004-09-30 Per Bothner <per@bothner.com>
2343 Simplify lexer. Implement --enable-mapped-location support.
2344 * jcf-parse.c (parse_class_file): Use linemap_line_start.
2345 (parse_source_file_1): Pass filename as extra parameter, so we can call
2346 linemap_add and set input_location here, rather than in both callers.
2347 (read_class): Pass copied filename to parse_source_file_1.
2348 Don't initialize wfl_operator - only needed for source compilation.
2349 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
2350 * lex.h: Remove a bunch of debugging macros.
2351 * lex.h (struct_java_line, struct java_error): Remove types.
2352 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
2353 (struct java_lc_s): Remove prev_col field.
2354 (struct java_lexer): New fields next_unicode, next_columns, and
2355 avail_unicode. New position field, and maybe token_start field.
2356 Don't need hit_eof field - use next_unicode == -1 instead.
2357 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
2358 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
2359 * parse.h: Various changes for USE_MAPPED_LOCATION.
2360 (EXPR_WFL_EMIT_LINE_NOTE): XXX
2361 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
2362 (struct parser_ctxt): New file_start_location field.
2363 Remove p_line, c_line fields since we no longer save lines.
2364 Remove elc, lineno, and current_jcf fields - no longer used.
2365 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
2366 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
2367 source_location and is probably not needed anymore anyway.
2368 Use new expr_add_Location function.
2369 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
2370 (java_pop_parser_context): Minor cleanup.
2371 (java_parser_context_save_global, java_parser_context_restore_global,
2372 java_pop_parser_context): Save/restore input_location as a unit.
2373 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
2374 a source_location instead of a wfl context node.
2375 (check_class_interface_creation): input_filename is not addressable.
2376 (create_artificial_method): Calling java_parser_context_save_global
2377 and java_parser_context_restore_global is overkill. Instead,
2378 temporarily set input_location from class decl.
2379 (java_layout_seen_class_methods): Set input_location from method decl.
2380 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
2381 (finish_loop_body): Likewise.
2382 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
2383 (java_sprint_unicode): Take a character, not index in line.
2384 (java_sneak_uncode): Replaced by java_peek_unicode.
2385 (java_unget_unicode): No longer used.
2386 (java_allocate_new_line. java_store_unicode): Removed, since we
2387 no longer remember "lines".
2388 (java_new_lexer): Update for new data structures.
2389 (java_read_char): Move unget_value checking to java_read_unicode.
2390 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
2391 efficient functions that are used directly when lexing.
2392 (java_read_unicode_collapsing_terminators): No longer needed.
2393 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
2394 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
2395 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
2396 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
2397 combine switch branches, and test for common token kinds earlier.
2398 (java_lex_error): Rewrite.
2399 * jv-scan.c (expand_location): New function, copied from tree.c.
2400 (main): Set ctxp->filename instead of setting input_filename directly.
2402 2004-09-30 Per Bothner <per@bothner.com>
2404 More cleanup for --enable-mapped-location.
2405 * class.c (push_class): If USE_MAPPED_LOCATION don't set
2406 input_location here. Instead do it in give_name_to_class.
2407 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
2408 * expr.c (expand_byte_code): Call linemap_line_start.
2409 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
2410 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
2411 (expr_add_location): New function, if USE_MAPPED_LOCATION.
2412 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
2413 to USE_MAPPED_LOCATION case.
2415 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
2416 * jcf-parse.c (java_parse_file): Don't set input_filename.
2417 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
2418 Create a list of TRANSLATION_UNIT_DECL.
2419 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
2420 reason is so we can set a DECL_SOURCE_LOCATION for each file.
2421 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
2422 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
2423 (file_start_location): New static.
2424 (set_source_filename): Avoid extra access to input_filename macro.
2425 Concatenate new name with class's package prefix.
2426 (set_source_filename, give_name_to_class): Update.
2427 (give_name_to_class): Set class's "line 0" input_location here.
2428 (parse_class_file): Set input_location as a unit.
2430 * jcf-parse.c (load_class): Sanity test if missing inner class file.
2432 2004-09-29 Per Bothner <per@bothner.com>
2434 * java-tree.h: Redefine some macros and add some declaration
2435 to handle the USE_MAPPED_LOCATION case.
2436 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
2437 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
2438 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
2439 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
2441 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
2442 * decl.c (finish_method, java_add_stmt): Likewise.
2443 * java-gimplify.c (java-gimplify.c): Likewise.
2444 * jcf-write.c (generate_bytecode_insns): Likewise.
2445 * lang.c (java_post_options): Likewise - call linemap_add.
2447 2004-09-29 Andrew Haley <aph@redhat.com>
2450 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
2451 result of TRUNC_MOD_EXPR.
2452 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
2453 * decl.c (java_init_decl_processing): Mark
2454 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
2456 2004-09-28 Tom Tromey <tromey@redhat.com>
2459 * class.c (add_miranda_methods): Load superinterface if not
2462 2004-09-28 Andrew Haley <aph@redhat.com>
2465 * jcf-parse.c (load_class): Don't try to read a class that we've
2468 2004-09-28 Andrew Haley <aph@redhat.com>
2470 * jcf-parse.c (load_class): Back out previous broken patch.
2472 2004-09-28 Andrew Haley <aph@redhat.com>
2475 * jcf-parse.c (load_class): Don't try to read a class that we've
2477 Check that we really did read the right class.
2479 2004-09-25 Tom Tromey <tromey@redhat.com>
2482 * parse.y (create_artificial_method): Use add_method_1.
2484 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
2486 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
2488 * gcj.texi: Fix typos.
2490 2004-09-24 Tom Tromey <tromey@redhat.com>
2493 * parse.y (class_instance_creation_expression): Set `$$' to NULL
2494 in error parts of rule.
2495 (unary_expression): Don't call error_if_numeric_overflow when $1
2498 2004-09-24 Tom Tromey <tromey@redhat.com>
2501 * parse.y (resolve_qualified_expression_name): Set
2502 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
2503 * expr.c (force_evaluation_order): Check for empty argument list
2504 after stripping COMPOUND_EXPR.
2506 2004-09-23 Andrew Haley <aph@redhat.com>
2509 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
2512 2004-09-23 Tom Tromey <tromey@redhat.com>
2515 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
2516 where operand is null.
2518 2004-09-23 Tom Tromey <tromey@redhat.com>
2521 * parse.y (not_accessible_p): Allow access to protected members
2522 even when class is not static.
2524 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
2526 * Make-lang.in: Revert the gcc-none.o change.
2528 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
2530 * parse.y (patch_anonymous_class): VEC_space returns true if there
2533 2004-09-21 Matt Austern <austern@apple.com>
2536 * gjavah.c (free_method_name_list): Fix function definition so
2537 it's a proper C prototype.
2539 2004-09-21 Tom Tromey <tromey@redhat.com>
2542 * gjavah.c (free_method_name_list): New method.
2545 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2546 Zack Weinberg <zack@codesourcery.com>
2548 * java-tree.def: Use tree_code_class enumeration constants
2549 instead of code letters.
2550 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
2551 new tree-class enumeration constants.
2553 2004-09-13 Tom Tromey <tromey@redhat.com>
2556 * class.c (layout_class_method): Put synthetic methods into the
2559 2004-09-11 Andrew Pinski <apinski@apple.com>
2561 * Make-lang.in (java/ggc-none.c): Change dependency
2562 for ggc.h into $(GGC_H).
2564 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
2566 * Make-lang.in (java/win32-host.o): Add dependency on
2568 * win32-host.c: Add includes for coretypes.h, jcf.h
2570 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
2572 * Make-lang.in (GCJH_OBJS): Change dependency from
2573 ggc-none.o to java/ggc-none.o
2574 (JCFDUMP_OBJS): Likewise.
2575 (java/ggc-none.o): New target.
2577 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2579 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
2580 * class.c (build_utf8_ref, build_static_field_ref,
2581 make_field_value, make_method_value, get_dispatch_table,
2582 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
2583 * constants.c (get_tag_node, build_ref_from_constant_pool,
2584 build_constants_constructor): Likewise.
2585 * decl.c (java_init_decl_processing): Likewise.
2586 * expr.c (build_java_array_length_access, build_newarray,
2587 expand_java_multianewarray, expand_java_pushc, expand_iinc,
2588 build_java_binop, build_field_ref, expand_java_add_case,
2589 expand_java_call, build_known_method_ref, build_invokevirtual,
2590 build_invokeinterface, build_jni_stub): Likewise.
2591 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2592 * jcf-parse.c (get_constant): Likewise.
2593 * lex.c (do_java_lex): Likewise.
2594 * parse.y (patch_binop, patch_unaryop, patch_cast,
2595 build_newarray_node, patch_newarray): Likewise.
2596 * resource.c (compile_resource_data): Likewise.
2597 * typeck.c (build_prim_array_type): Likewise.
2599 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2601 * decl.c (java_init_decl_processing): Adjust
2602 initialize_sizetypes call.
2604 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
2606 * jv-scan.c (fancy_abort): Add.
2608 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
2610 * expr.c (build_java_arrayaccess): Use convert to change
2613 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
2615 * class.c (make_local_function_alias): Allocate extra space for 'L'
2616 in name buffer. Reported by Thomas Neumann.
2618 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2620 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
2621 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
2622 * lex.c (do_java_lex): Adjust.
2623 (error_if_numeric_overflow): Likewise.
2625 2004-08-18 Andrew Pinski <apinski@apple.com>
2627 * class.c (make_local_function_alias): Only make a new decl if we
2628 support alias attribute on all decls.
2630 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
2632 * class.c (make_local_function_alias): New function. Create local
2633 alias for public method DECL.
2634 (make_method_value): Use make_local_function_alias.
2635 * parse.y (craft_constructor): Don't special-case anonymous classes.
2636 Always set ctor_name to init_identifier_node.
2637 (lookup_method_invoke): Call layout_class_method when creating
2638 anonymous class constructor.
2640 2004-08-18 Richard Henderson <rth@redhat.com>
2642 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
2643 default case. Treat '<' similarly. Update for
2644 is_gimple_formal_tmp_var name change.
2646 2004-08-17 Andrew Haley <aph@redhat.com>
2648 * lang.c (lang_printable_name): Obey verbose flag.
2649 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
2650 lang_printable_name().
2651 (verify_constructor_circularity, get_printable_method_name,
2652 check_abstract_method_definitions, java_check_regular_methods,
2653 java_check_abstract_methods, check_inner_class_access,
2654 fix_constructors, patch_method_invocation, patch_return):
2656 * expr.c (pop_type_0): Likewise.
2658 * java-tree.h (lang_printable_name_wls): Delete.
2660 2004-08-16 Tom Tromey <tromey@redhat.com>
2663 * parse.y (primary): Changed for initialized and uninitialized
2665 (array_access): Handle array_creation_initialized.
2666 (array_creation_expression): Split into
2667 array_creation_initialized and array_creation_uninitialized.
2669 2004-08-16 Andrew Haley <aph@redhat.com>
2671 * jcf-write.c (find_constant_index): Canonicalize NaNs when
2672 generating bytecode.
2674 2004-08-16 Elliot Lee <sopwith@redhat.com>
2677 * jcf-parse.c (java_parse_file): Handle filenames with embedded
2678 spaces, and quoted filelists.
2680 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2682 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
2683 * class.c (build_utf8_ref, build_static_field_ref,
2684 make_field_value, make_method_value, get_dispatch_table,
2685 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
2686 * constants.c (get_tag_node, build_ref_from_constant_pool,
2687 build_constants_constructor): Likewise.
2688 * decl.c (java_init_decl_processing): Likewise.
2689 * expr.c (build_java_array_length_access, build_newarray,
2690 expand_java_multianewarray, expand_java_pushc, expand_iinc,
2691 build_java_binop, build_field_ref, expand_java_add_case,
2692 expand_java_call, build_known_method_ref, build_invokevirtual,
2693 build_invokeinterface, build_jni_stub): Likewise.
2694 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2695 * jcf-parse.c (get_constant): Likewise.
2696 * lex.c (do_java_lex): Likewise.
2697 * parse.y (patch_binop, patch_unaryop, patch_cast,
2698 build_null_of_type, patch_newarray): Likewise.
2699 * resource.c (compile_resource_data): Likewise.
2700 * typeck.c (build_prim_array_type): Likewise.
2702 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
2704 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
2705 Don't create BLOCK here or call java_gimplify_block.
2707 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
2709 * java-tree.h (flag_deprecated): Removed.
2710 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
2711 * parse.y (check_deprecation): Check warn_deprecated instead of
2714 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
2716 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
2717 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
2718 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
2719 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
2720 flag_force_classes_archive_check, flag_optimize_sci,
2721 flag_indirect_dispatch): Remove explicit declarations.
2722 * lang.opt: Add implicit declare/define/assign. Remove obsolete
2725 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
2728 * Make-lang.in (java.install-man): Install from either build
2729 tree or source tree, whichever has the file first.
2731 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
2733 * jcf-parse.c (get_constant): Adjust force_fit_type call.
2734 * lex.h (SET_LVAL_NODE_TYPE): Remove.
2735 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
2736 (do_java_lex): Likewise. Adjust force_fit_type call.
2738 2004-08-04 Roger Sayle <roger@eyesopen.com>
2739 Andrew Haley <aph@redhat.com>
2741 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
2742 checking trees as they're being built.
2743 (convert): Call convert_ieee_real_to_integer if we're
2744 converting a constant, even if we're writing a class file.
2746 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
2749 * parse.y (fold_constant_for_init): Call resolve_field_access with
2750 correct current_class context.
2752 2004-08-01 Roger Sayle <roger@eyesopen.com>
2754 * decl.c (update_aliases, initialize_local_variable): Replace calls
2755 to build with calls to buildN.
2756 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
2757 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
2758 * parse.h (BUILD_THROW): Likewise.
2759 * parse.y (switch_expression, synchronized_statement,
2760 catch_clause_parameter, array_creation_expression,
2761 conditional_expression, make_qualified_name,
2762 resolve_qualified_expression_name, patch_method_invocation,
2763 patch_invoke, build_method_invocation, build_new_invocation,
2764 build_assignment, patch_assignment, build_binop, patch_binop,
2765 build_string_concatenation, build_incdec, patch_unaryop,
2766 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
2767 patch_return, build_if_else_statement, build_labeled_block,
2768 build_new_loop, build_loop_body, build_bc_statement,
2769 build_assertion, encapsulate_with_try_catch, build_try_statement,
2770 build_try_finally_statement, patch_synchronized_statement,
2771 emit_test_initialization): Likewise, replace build with buildN.
2773 2004-07-28 Eric Christopher <echristo@redhat.com>
2775 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2776 (java_unsafe_for_reeval): Ditto.
2778 2004-07-26 <hp@bitrange.com>
2780 * parse.y (build_super_invocation): Adjust declaration order to
2781 avoid declaration after statement.
2783 2004-07-25 Bernardo Innocenti <bernie@develer.com>
2785 * decl.c: Rename all identifiers named `class' to `cl'.
2787 2004-07-25 Richard Henderson <rth@redhat.com>
2789 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
2791 2004-07-23 Mike Stump <mrs@apple.com>
2793 * boehm.c (set_bit): Improve type safety wrt unsignedness.
2794 * gjavah.c (throwable_p, decode_signature_piece,
2795 print_full_cxx_name, print_include, add_namelet, add_class_decl,
2796 process_file): Likewise.
2797 * jcf-dump.c (main): Likewise.
2798 * jcf-io.c (read_zip_member): Likewise.
2799 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
2800 give_name_to_class, get_class_constant): Likewise.
2801 * jcf-write.c (find_constant_wide, push_long_const,
2802 generate_classfile): Likewise.
2803 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
2804 * parse.y (read_import_dir): Likewise.
2805 * typeck.c (parse_signature_type): Likewise.
2806 * verify.c (verify_jvm_instructions): Likewise.
2807 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
2809 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
2811 * Make-lang.in: Replace rmic and rmiregistry references with
2812 grmic and grmiregistry.
2813 * gcj.texi: Likewise.
2815 2004-07-20 Andrew Haley <aph@redhat.com>
2818 * verify.c (verify_jvm_instructions): Comment change only.
2820 * typeck.c (build_java_array_type): Add size field to array name.
2822 * java-tree.h (LOCAL_SLOT_P): New.
2823 (update_aliases): Add PC argument.
2824 (pushdecl_function_level): New function.
2826 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
2827 MODIFY_EXPR, and SAVE_EXPR.
2828 (java_gimplify_modify_expr): New function.
2830 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
2831 (expand_iinc): Pass PC to update_aliases().
2832 (STORE_INTERNAL): Likewise.
2833 (process_jvm_instruction): Likewise.
2835 * decl.c (base_decl_map): New variable.
2836 (uniq): New variable.
2837 (update_aliases): Rewrite with more thorough checking.
2838 (debug_variable_p): New function.
2839 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
2840 (check_local_named_variable): Delete whole function.
2841 (initialize_local_variable): New function.
2842 (check_local_unnamed_variable): Add checks and comments.
2843 (find_local_variable): Rewrite.
2844 (java_replace_reference): New function.
2845 (function_binding_level): New variable.
2846 (pushdecl_function_level): New function.
2847 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
2848 (maybe_pushlevels): Call pushdecl() on each of the new decls.
2849 (start_java_method): Reset uniq. Create base_decl_map. Set
2850 function_binding_level.
2851 (end_java_method): Null unused fields to save memory.
2853 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2855 * class.c (add_interface_do): Remove.
2856 (set_super_info, interface_of_p, maybe_add_interface,
2857 add_interface, make_class_data, layout_class,
2858 add_miranda_methods): Adjust BINFO accessors and addition.
2859 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
2861 * jcf-write.c (generate_classfile): Likewise.
2862 * parse.y (patch_anonymous_class, check_inner_circular_reference,
2863 check_circular_reference, java_complete_class,
2864 check_abstract_method_definitions,
2865 java_check_abstract_method_definitions,
2866 check_interface_throws_clauses, java_check_abstract_methods,
2867 lookup_java_interface_method2,
2868 find_applicable_accessible_methods_list): Adjust BINFO accessors
2870 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
2872 2004-07-18 Roger Sayle <roger@eyesopen.com>
2874 * builtins.c (max_builtin, min_builtin,
2875 java_build_function_call_expr): Replace calls to build with buildN.
2876 * class.c (build_class_ref, build_static_field_ref,
2877 get_dispatch_table, make_class_data, layout_class_method): Likewise.
2878 * constants.c (build_ref_from_constant_pool): Likewise.
2879 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
2880 add_stmt_to_compound): Likewise.
2881 * except.c (build_exception_object_ref, expand_end_java_handler):
2883 * java-gimplify.c (java_gimplify_case_expr,
2884 java_gimplify_default_expr, java_gimplify_block,
2885 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
2886 * jcf-write.c (generate_bytecode_insns): Likewise.
2887 * typeck.c (convert_ieee_real_to_integer): Likewise.
2889 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2891 * java-tree.h (builtin_function): Declare.
2893 2004-07-16 Steven Bosscher <stevenb@suse.de>
2895 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
2896 abuse restore_line_number_status.
2898 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
2901 * jcf-parse.c (java_emit_static_constructor): Specify default
2904 2004-07-13 Per Bothner <per@bothner.com>
2906 * java-tree.h (all_class_filename): Remove useless macro.
2907 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
2908 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
2909 * parse.y (java_parser_context_restore_global): Replace
2910 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
2911 * jcf-parse.c (read_class, java_parse_file): Likewise.
2913 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
2916 gjavah.c (print_field_info): Emit constant only if field is static.
2918 2004-07-11 Roger Sayle <roger@eyesopen.com>
2920 * expr.c (java_truthvalue_conversion, flush_quick_stack,
2921 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
2922 build_java_ret, build_java_throw_out_of_bounds_exception,
2923 build_java_array_length_access, java_check_reference,
2924 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
2925 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
2926 expand_java_arrayload, build_java_monitor, expand_java_return,
2927 expand_load_internal, expand_java_NEW, build_get_class,
2928 build_instanceof, expand_java_CHECKCAST, expand_iinc,
2929 build_java_soft_divmod, build_java_binop, build_field_ref,
2930 expand_compare, expand_java_goto, expand_java_switch,
2931 expand_java_add_case, build_class_init, build_known_method_ref,
2932 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
2933 expand_invoke, build_jni_stub, expand_java_field_op,
2934 java_expand_expr, expand_byte_code, STORE_INTERNAL,
2935 force_evaluation_order, emit_init_test_initialization): Convert
2936 calls to "build" into calls to the prefered "buildN" functions.
2938 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2940 * java-tree.h (set_block): Remove.
2941 * lang.c (java_clear_binding_stack): New.
2942 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2943 * decl.c (struct binding_level): Remove this_block.
2944 (clear_binding_level): Likewise.
2945 (poplevel): Don't handle this_block.
2946 (set_block): Remove.
2948 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
2950 * class.c (common_enclosing_context_p): Remove statement with no
2953 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
2956 * parse.y (create_anonymous_class): Remove 'location' argument. Use
2957 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
2958 (craft_constructor): Inherit access flags for implicit constructor
2959 from the enclosing class.
2960 (create_class): Fix comment typo.
2961 (resolve_qualified_expression_name): Pass type of qualifier to
2962 not_accessible_p, not the type in which target field was found.
2963 (not_accessible_p): Handle inner classes. Expand protected
2964 qualifier-subtype check to enclosing instances, but don't apply this
2965 check to static members. Allow protected access to inner classes
2966 of a subtype. Allow private access within common enclosing context.
2967 (build_super_invocation): Get WFL line number info from current
2969 (build_incomplete_class_ref): Update for new create_anonymous_class
2971 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
2972 common_enclosing_instance_p.
2973 * class.c (common_enclosing_context_p): New. Determine if types
2974 share a common enclosing context, even across static contexts.
2975 (common_enclosing_instance_p): Renamed from
2976 common_enclosing_context_p. Determines if types share a common
2977 non-static enclosing instance.
2978 * java-tree.h (common_enclosing_instance_p): Declare.
2979 * jcf-write.c (get_method_access_flags): New. Surpress private flag
2980 for inner class constructors.
2981 (generate_classfile): Use get_method_access_flags.
2983 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
2985 * class.c (interface_of_p): Check for null TYPE_BINFO.
2987 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
2989 * class.c (make_class): Do not create binfo here.
2990 (set_super_info): Create it here.
2991 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
2993 2004-07-08 Richard Henderson <rth@redhat.com>
2995 * expr.c (case_identity, get_primitive_array_vtable,
2996 java_expand_expr, emit_init_test_initialization): Remove.
2997 * java-tree.h (java_expand_expr): Remove.
2998 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
3000 2004-07-07 Per Bothner <per@bothner.com>
3002 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
3003 get internal error due to mismatched types.
3005 * gcj.texi (Invoking gij): Document new -verbose:class flag.
3007 * gcj.texi (Linking): New node. Document -lgij usage.
3009 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
3011 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
3012 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
3013 * java/class.c (set_super_info, class_depth, interface_of_p,
3014 maybe_add_interface, add_interface, make_class_data,
3015 layout_class, add_miranda_methods): Adjust BINFO macros.
3016 * expr.c (can_widen_reference_to, lookup_field): Likewise.
3017 * jcf-write.c (generate_classfile): Likewise.
3018 * parse.y (patch_anonymous_class,
3019 check_inner_circular_reference, check_circular_reference,
3020 java_complete_class, check_abstract_method_definitions,
3021 java_check_abstract_method_definitions,
3022 check_interface_throws_clauses, java_check_abstract_methods,
3023 lookup_java_interface_method2,
3024 find_applicable_accessible_methods_list): Likewise.
3025 * typeck.c (find_method_in_interface): Likewise.
3026 * verify.c (merge_types): Likewise.
3028 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
3030 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
3031 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
3033 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
3035 * class.c (make_class): Use make_tree_binfo.
3036 (set_super_info, add_interface_do): Likewise.
3037 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
3039 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
3041 * verify.c: Correct array element access formatting thinko.
3043 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
3045 * verify.c: Insert a short blurb at the start referring to the JVMS.
3046 (merge_type_state): Remove redundant nested if statement.
3047 (verify_jvm_instructions): Ensure current_subr is initialised to
3049 Minor formatting fixes all over the place.
3051 2004-07-02 Richard Henderson <rth@redhat.com>
3053 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
3055 2004-07-01 Richard Henderson <rth@redhat.com>
3057 * class.c (registerClass_libfunc): Remove.
3058 (init_class_processing): Don't set it.
3059 (emit_register_classes): Take list_p parameter. Fill it in
3060 with _Jv_RegisterClass calls.
3061 * decl.c (java_init_decl_processing): Don't call
3062 init_resource_processing.
3063 * jcf-parse.c (java_emit_static_constructor): New.
3064 (java_parse_file): Call it.
3065 * resource.c (registerResource_libfunc): Remove.
3066 (init_resource_processing): Remove.
3067 (write_resource_constructor): Take list_p parameter. Fill it in
3068 with _Jv_RegisterResource calls.
3069 * java-tree.h: Update prototypes.
3071 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
3074 * class.c (layout_class_method): Do not override package-private
3075 method if its in a different package.
3076 (split_qualified_name): Move here from parse.y. Rename from
3077 breakdown_qualified. Add comment.
3078 (in_same_package): Move here from parse.y. Add comment.
3079 * java-tree.h (break_down_qualified, in_same_package): Declare.
3080 (in_same_package): Likewise.
3081 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
3084 2004-06-29 Andrew Haley <aph@redhat.com>
3086 * except.c (expand_start_java_handler): Push a new binding level.
3087 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
3088 register_exception_range() to register where we'll do it.
3089 (expand_end_java_handler): Remove old bogus code. Replace with
3090 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3091 the top of the expression we're curently building.
3092 (maybe_end_try): Delete.
3093 * decl.c (binding_level.exception_range): New field.
3094 (clear_binding_level): Add field exception_range. Reformat.
3095 (poplevel): Call expand_end_java_handler().
3096 (poplevel): Call java_add_stmt only if functionbody is false.
3097 (maybe_poplevels): Don't call maybe_end_try() from here.
3098 (end_java_method): Clear no longer used trees in function decl.
3099 (register_exception_range): New function.
3100 * java-tree.h (register_exception_range, struct eh_range): Declare.
3102 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
3104 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
3106 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
3109 * expr.c (class_has_finalize_method): Fix method name indentation.
3110 (expand_java_call): Remove K&R style parameter declaration.
3111 (expand_invoke): Fix statement indentation.
3112 (expand_java_field_op): Likewise.
3113 * parse-scan.y: Fix typo.
3114 (reset_report): Fix method name indentation.
3115 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
3117 * verify.c (verify_jvm_instructions): Document parameters, insert
3119 * lang.c (lang_init_source): Fix method name indentation.
3120 * class.c (common_enclosing_context_p): Likewise.
3121 (emit_symbol_table): Fix parameter list indentation.
3122 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
3123 parameter declaration.
3124 * constants.c: Fix copyright notice indentation.
3125 * typeck.c (find_method_in_superclasses): Fix parameter list
3127 (find_method_in_interfaces): Likewise.
3128 * zextract.c (makelong): Fix method name indentation.
3130 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
3133 * parse.y (create_interface): Set correct access modifiers for
3135 * jcf-write.c (get_classfile_modifiers): New function.
3136 (generate_classfile): Use get_classfile_modifiers, not
3139 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
3141 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
3142 dependency to current parser context, not NULL_TREE, for top-level
3144 (jdep_resolve_class): Enable member access check for all inner
3147 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
3149 * parse.y (qualify_and_find): Pass type decl, not identifier, to
3152 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
3155 * expr.c (expand_java_field_op): Ensure that target class for static
3156 field access has been loaded.
3158 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
3159 Ranjit Mathew <rmathew@hotmail.com>
3161 PR java/1207, java/16178
3162 * jcf-parse.c (load_class): Return immediately if passed a type decl
3163 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
3164 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
3165 before calling load_class.
3166 (qualify_and_find): Likewise.
3167 (find_in_imports_on_demand): Likewise.
3168 (find_applicable_accessible_methods_list): Likewise.
3170 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
3172 * parse.y (java_layout_seen_class_methods): Don't call load_class
3173 on class defined by source parser.
3175 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
3177 * parse.y (set_nested_class_simple_name_value): Removed.
3178 (java_complete_expand_class): Remove calls to
3179 set_nested_class_simple_name_value.
3181 2004-06-22 Andrew Haley <aph@redhat.com>
3182 Ranjit Mathew <rmathew@hotmail.com>
3184 Fixes PR java/16113.
3185 * decl.c (force_poplevels): Remove call to expand_end_bindings.
3187 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
3189 * parse.y (create_class): Correct diagnostic message about
3190 java.lang.Object extending anything else.
3192 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3194 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
3195 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
3196 * constants.c (build_ref_from_constant_pool): Likewise.
3197 * expr.c (build_java_array_length_access): Likewise.
3198 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
3199 (invoke_build_dtable, build_invokevirtual): Likewise.
3200 (build_invokeinterface, java_expand_expr): Likewise.
3201 (emit_init_test_initialization): Likewise.
3202 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3203 * parse.y (make_qualifed_name, build_array_ref): Likewise.
3205 2004-06-21 Andrew Haley <aph@redhat.com>
3207 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
3210 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
3212 * jcf.h (struct JCF): Change java_source, right_zip and finished
3214 * lex.h (struct java_lexer): Change hit_eof, read_anything,
3215 byte_swap and use_fallback to unsigned int.
3216 * parse.h (struct _jdep): Change flag0 to unsigned int.
3218 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
3221 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
3222 before trying to lay out its methods.
3223 * jcf-parse.c (read_class): Track parsed files using canonical paths
3224 obtained via lrealpath from libiberty.
3225 (java_parse_file): Likewise.
3226 (parse_source_file_1): Rename formal parameter to reflect its
3227 modified purpose. Minor formatting fix.
3229 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
3231 * class.c (emit_register_classes): Make the function uninlinable,
3232 do not set current_function_cannot_inline.
3233 * resource.c (write_resource_constructor): Do not reset
3234 flag_inline_functions around rest_of_compilation.
3236 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
3239 * expr.c (java_truthvalue_conversion): Handle
3240 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
3241 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
3242 i.e. return the expression.
3244 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
3246 * gjavah.c: Include version.h
3248 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
3250 * jcf-write.c (generate_bytecode_conditional): Correct handling
3251 of unordered conditionals. Add comment.
3253 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
3254 Per Bothner <per@bothner.com>
3256 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
3257 local variable was initialised upon declaration.
3258 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
3259 variable was final and initialised upon declaration.
3260 * check-init.c (check_final_reassigned): Give error only if a blank
3261 final is not definitely unassigned or if an initialised final is
3263 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
3264 assignment expressions. Remove case MODIFY_EXPR, label do_default.
3265 (check_init): Perform initialised-variable-removing-optimisation
3266 only on non-final local variables.
3268 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
3270 * jcf-write.c (generate_bytecode_conditional): Handle binops
3271 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
3273 (generate_bytecode_insns): Likewise.
3275 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
3277 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
3278 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
3280 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
3282 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
3283 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
3285 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
3287 * decl.c (struct binding_level): Add GTY marker. Compile
3288 binding_depth unconditionally.
3289 (current_binding_level, free_binding_level, global_binding_level):
3291 (clear_binding_level): Unconditionally set binding_depth.
3292 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
3294 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
3296 * lex.c (java_new_lexer): Set 'encoding'.
3297 (java_read_char): Improve error message for unrecognized characters.
3298 * lex.h (struct java_lexer): New field 'encoding'.
3300 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
3302 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
3304 2004-05-21 Mark Wielaard <mark@klomp.org>
3306 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
3309 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
3311 * typeck.c: Remove non-printable character 160.
3313 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
3315 * check-init.c: Correct minor typos.
3317 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3319 * Make-lang.in, expr.c, java-gimplify.c: Rename
3320 tree-simple.[ch] to tree-gimple.[ch].
3322 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
3324 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
3326 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3328 Merge from tree-ssa-20020619-branch. See
3329 ChangeLog.tree-ssa for details.
3331 * Make-lang.in, builtins.c, check-init.c, class.c,
3332 constants.c, decl.c, except.c, expr.c, java-except.h,
3333 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
3334 lang.c, lang.opt, parse.y, resource.c: Merged.
3335 * java-gimplify.c: New file.
3337 2004-05-10 Andrew Haley <aph@redhat.com>
3339 * parse.y (create_class): Set TYPE_VFIELD.
3340 * decl.c (java_init_decl_processing): Likewise.
3342 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
3343 * class.c (make_method_value): Replace DECL_VINDEX with call to
3345 (get_dispatch_vector): Likewise.
3346 (layout_class_method): Likewise.
3347 Replace set of DECL_VINDEX with call to set_method_index().
3348 (set_method_index): New function.
3349 (get_method_index): New function.
3350 * java-tree.h (set_method_index): New function decl.
3351 (get_method_index): New function decl.
3353 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
3355 * parse.y (check_pkg_class_access): Add new argument
3356 and use it when cl is NULL to call lookup_cl on it.
3357 (parser_check_super_interface): Do not call lookup_cl.
3358 Pass this_decl to check_pkg_class_access and NULL
3359 instead of lookup_cl.
3360 (parser_check_super): Update for change in
3361 check_pkg_class_access.
3362 (do_resolve_class): Likewise.
3363 (process_imports): Likewise.
3364 (find_in_imports_on_demand): Likewise.
3365 (resolve_qualified_expression_name): Likewise.
3367 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
3369 Fixes PR java/9685, PR java/15073
3370 * parse.y (accessibility_string): New method.
3371 (not_accessible_field_error): Use accessibility_string()
3372 instead of java_accstring_lookup().
3373 (resolve_qualified_expression_name): Check with
3374 check_pkg_class_access() before allowing access using
3377 Use check_pkg_class_access() instead of not_accessible_p()
3378 for unqualified types.
3379 (not_accessible_p): Use DECL_CONTEXT (member) instead of
3380 REFERENCE for package-private access checking.
3381 (patch_method_invocation): Use accessibility_string() instead
3382 of java_accstring_lookup().
3384 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
3387 * gjavah.c (struct method_name): Add member is_native.
3388 (overloaded_jni_method_exists_p): Match candidate method only if
3390 (print_method_info): Initialise is_native flag from the method's
3393 2004-04-30 Roger Sayle <roger@eyesopen.com>
3395 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
3396 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
3398 2004-04-22 Roger Sayle <roger@eyesopen.com>
3400 * resource.c (write_resource_constructor): Guard call to possibly
3401 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
3403 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
3405 * class.c (make_class_data): Add new field aux_info.
3406 * decl.c (java_init_decl_processing): Push type and decl for
3409 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
3411 * expr.c (expand_java_NEW): Don't use size argument for
3412 _Jv_AllocObject calls.
3413 * parse.y (patch_invoke): Likewise.
3415 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
3417 * expr.c (build_invokeinterface): Remove unused variables to
3420 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
3422 * class.c (get_interface_method_index): New function. Return dispatch
3423 index for interface method.
3424 (make_method_value): For interface methods, set index field to
3425 iface dispatch index, not DECL_VINDEX.
3426 * expr.c (build_invokeinterface): Use get_interface_method_index.
3428 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3430 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
3432 2004-03-31 Andrew Haley <aph@redhat.com>
3435 * jcf-io.c (opendir_in_zip): Tidy up error handling.
3437 2004-03-30 Zack Weinberg <zack@codesourcery.com>
3439 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
3440 form of GTY markers.
3442 2004-03-25 Marcus Meissner <meissner@suse.de>
3445 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
3447 2004-03-23 Tom Tromey <tromey@redhat.com>
3450 * jcf-write.c (make_class_file_name): Don't report if mkdir
3453 2004-03-23 Tom Tromey <tromey@redhat.com>
3455 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
3457 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
3459 * class.c, gjavah.c, lang.c: Fix comment typos.
3460 * gcj.texi: Fix typos.
3462 2004-03-19 Per Bothner <per@bothner.com>
3464 * gcj.texi (Code Generation): Document new flags and assert defaults.
3466 * class.c (assume_compiled_node_struct): Rename type to
3467 class_flag_node_struct, as it is now also used for enable_assertions.
3468 Rename assume_compiled_node typedef. Rename excludep field to value.
3469 (find_assume_compiled_node): Rename function to find_class_flag_node.
3470 Minor optimization - avoid needless strlen.
3471 (add_assume_compiled): Some tweaking and optimization.
3472 Rename and generalize to add_class_flag takem an extra parameter.
3473 (add_assume_compled): New just calls add_class_flag.
3474 (add_enable_assert, enable_assertions): New functions.
3475 (enable_assert_tree): New static.
3476 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
3477 * lang.opt (fenable-assertions, fenable-assertions=,
3478 fdisable-assertions, fdisable-assertions=): New options.
3479 * lang.c (java_handle_option): Handle new options.
3480 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
3481 class in an interface - create helper class nested in outer interface.
3482 (build_assertion): Short-circuit if enable_assertions is false.
3484 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3486 * java-tree.h: Changes throughout to add checking to macros
3487 and numerous whitespace changes.
3488 (VAR_OR_FIELD_CHECK): New macro.
3489 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
3490 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
3492 2004-03-16 Per Bothner <per@bothner.com>
3494 * jcf-jump.c (options): New --print-constants option.
3495 * gcj.texi (Invoking jcf-dump): Document --print-constants.
3497 * jcf-dump.c (flag_print_constant_pool): Default to off.
3498 (print_constant_terse_with_index): New helper function.
3499 (various places): Check flag_print_constant_pool where missing.
3500 (main): If verbose set flag_print_constant_pool.
3501 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
3503 2004-03-15 Andrew Haley <aph@redhat.com>
3506 * parse.y (java_complete_lhs): Check that final variable has an
3509 2004-03-12 Andrew Haley <aph@redhat.com>
3512 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
3515 2004-02-29 Roger Sayle <roger@eyesopen.com>
3517 * jcf-parse.c (java_parse_file): Handle the case that input_filename
3520 2004-02-27 Per Bothner <per@bothner.com>
3522 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
3523 suggestion: Use build_incomplete_class_ref.
3524 This fixes PR java/13508, java/11714.
3526 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
3528 * java/parse.h: Update copyright.
3530 2004-02-26 Andrew Haley <aph@redhat.com>
3533 * parse.y (check_interface_throws_clauses): Check for
3534 !METHOD_INVISIBLE (iface_method).
3535 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
3536 well as CLASS_ABSTRACT.
3538 2004-02-25 Per Bothner <per@bothner.com>
3540 * parse.y (build_assertion): If we're in an inner class, create the
3541 class$ helper routine in the outer class.
3543 2004-02-19 Richard Henderson <rth@redhat.com>
3545 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
3547 2004-02-16 Geoffrey Keating <geoffk@apple.com>
3549 * Make-lang.in (java.install-man): Add extra dependencies.
3551 2004-02-13 Geoffrey Keating <geoffk@apple.com>
3553 * Make-lang.in: Install man pages under the same names
3554 (possibly transformed) as the program they document.
3556 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
3558 * gjavah.c: Include "intl.h".
3559 (error): New function.
3560 (main): Call gcc_init_libintl.
3561 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
3562 print_stub_or_jni, process_file, main): Use error rather than
3564 (print_method_info, usage, help, version, main): Mark strings for
3565 translation with _. Avoid splitting up sentences. Send
3566 information messages to stdout.
3567 * jcf-dump.c: Include "intl.h".
3568 (main): Call gcc_init_libintl.
3569 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
3570 Mark error, usage and version messages for translation with _.
3571 Avoid splitting up sentences.
3572 * jv-scan.c: Include "intl.h".
3573 (fatal_error, warning): Change parameter s to msgid. Translate
3575 (main): Call gcc_init_libintl.
3576 (usage, help, version): Mark error, usage and version messages for
3577 translation with _. Avoid splitting up sentences.
3578 * jvgenmain.c: Include "intl.h".
3579 (main): Call gcc_init_libintl.
3580 (usage, main): Mark error messages for translation with _.
3581 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
3582 JVGENMAIN_OBJS): Add intl.o.
3583 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
3584 java/jvgenmain.o): Update dependencies.
3586 2004-02-08 Per Bothner <per@bothner.com>
3588 * parse.y (resolve_qualified_expression_name): In case of inaccessible
3589 class don't use not_accessible_field_error, which can get confused.
3591 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3593 Make-lang.in (po-generated): Delete.
3595 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3597 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
3599 * decl.c: Include target.h.
3600 (start_java_method): Replace PROMOTE_PROTOTYPES with
3601 targetm.calls.promote_prototypes.
3602 * expr.c: Include target.h.
3603 (pop_arguments): Replace PROMOTE_PROTOTYPES with
3604 targetm.calls.promote_prototypes.
3605 * parse.y: Include target.h.
3606 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
3607 with targetm.calls.promote_prototypes.
3609 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3611 * typeck.c: Update copyright.
3613 2004-02-02 Tom Tromey <tromey@redhat.com>
3615 * decl.c (java_init_decl_processing): Remove duplicate
3618 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
3620 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
3622 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
3624 * expr.c (build_field_ref): Move variable
3627 2004-01-28 Andrew Haley <aph@redhat.com>
3629 * expr.c (build_field_ref): Widen field offset.
3631 2004-01-27 Andrew Haley <aph@redhat.com>
3634 * parse.y (check_interface_throws_clauses): Make sure class_decl
3637 2004-01-22 Jeff Sturm <jsturm@one-point.com>
3640 * parse.y (patch_assignment): Don't modify lhs_type for
3641 reference assignments.
3643 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3645 * Make-lang.in: Replace $(docdir) with doc.
3646 (java.info, java.srcinfo, java.man, java.srcman): New rules.
3647 (java.install-man): Revamp rule.
3649 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3651 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
3652 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
3653 instead of deferred backquote.
3655 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
3657 * typeck.c (find_method_in_interfaces): Move variable
3660 2004-01-16 Andrew Haley <aph@redhat.com>
3663 * typeck.c (shallow_find_method): New.
3664 (find_method_in_superclasses): New.
3665 (find_method_in_interfaces): New.
3666 (lookup_do): Rewrite.
3667 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
3669 * jcf-parse.c (read_class): Save and restore output_class.
3670 * decl.c (java_expand_body): Set output_class from fndecl.
3672 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
3674 * class.c (gen_indirect_dispatch_tables): Fix string length
3677 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3679 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
3680 (java.srcextra): Copy above back to source directory if requested.
3681 (po-generated): Delete reference to $(parsedir).
3682 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
3685 2004-01-14 Jan Hubicka <jh@suse.cz>
3687 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
3690 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3692 * java-tree.h (java_expand_expr): Change prototype.
3693 * expr.c (java_expand_expr): Add alt_rtl parameter.
3695 2004-01-09 Andrew Haley <aph@redhat.com>
3698 * parse.y (java_fix_constructors): Set output_class.
3699 (java_reorder_fields): Likewise.
3700 (java_layout_classes): Likewise.
3701 (java_expand_classes): Generate indirect dispatch tables.
3702 (java_expand_classes): Set output_class.
3703 (java_finish_classes): Likewise.
3704 * lang.c (java_init): Turn on always_initialize_class_p if we're
3705 using indirect dis[atch.
3706 (java_decl_ok_for_sibcall): Use output_class, not current_class.
3707 (java_get_callee_fndecl): Use class local atable.
3709 (always_initialize_class_p): Decl moved to java-tree.h.
3710 (HANDLE_CLASS_INFO): Set output_class.
3711 (read_class): Likewise.
3712 (parse_class_file): Call gen_indirect_dispatch_tables.
3713 (parse_zip_file_entries): Set output_class.
3714 (java_parse_file): Set output_class. Don't emit symbol tables.
3715 * java-tree.h (output_class): New.
3716 Remove global declarations for otable, atable, and ctable.
3717 (always_initialize_class_p): moved here from decl.c.
3719 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
3720 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
3721 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
3722 (struct lang_type): Add otable_methods, otable_decl,
3723 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
3724 ctable_decl, catch_classes, type_to_runtime_map.
3725 * expr.c (build_field_ref): Make otable, atable, and ctable class
3726 local rather than global.
3727 (build_known_method_ref): Likewise.
3728 (build_invokeinterface): Likewise.
3729 (java_expand_expr): Pass runtime type (rather than actual type) to
3731 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
3732 this class. Look up each class in that map to delete duplicates.
3733 (expand_end_java_handler): Pass runtime type (rather than actual
3734 type) to expand_start_catch.
3735 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
3737 (java_init_decl_processing): Rearrange things. Remove global
3738 declarations of otable, atable, and ctable.
3739 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
3740 (java_expand_body): Set output_class.
3741 * constants.c (build_constant_data_ref): Use output_class, not
3743 (alloc_name_constant): Likewise.
3744 * class.c (gen_indirect_dispatch_tables): New.
3745 (build_class_ref): Generate hard reference to superclass, even if
3746 using indirect dispatch.
3747 (build_static_field_ref): Use class local atable.
3748 (make_class_data): Generate hard reference to superclass, even if
3749 using indirect dispatch.
3750 Generate symbolic references to interfaces when using indirect
3752 (make_class_data): Emit otable, atable, and ctable.
3753 Make otable, atable, and ctable class local rather than global.
3754 (emit_catch_table): Make otable, atable, and ctable class local
3757 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
3759 * parse.y (catch_clause_parameter): Fix typo.
3762 * parse.y: (catch_clause_parameter): Return early if $3, aka
3763 formal_parameter, is null.
3765 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
3767 * class.c: Remove uses of "register" specifier in
3768 declarations of arguments and local variables.
3771 * gjavah.c: Likewise.
3772 * jcf-dump.c: Likewise.
3773 * jcf-io.c: Likewise.
3774 * jcf-parse.c: Likewise.
3775 * jcf-write.c: Likewise.
3776 * keyword.h: Likewise.
3777 * parse.y: Likewise.
3778 * typeck.c: Likewise.
3779 * verify.c: Likewise.
3781 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
3783 * Make-lang.in (GCJ_CROSS_NAME): Delete.
3784 (java.install_common, java.install-man): Adjust for above.
3785 (java.uninstall): Likewise.
3787 2003-12-03 Michael Koch <konqueror@gmx.de>
3789 * class.c (make_class_data):
3790 Push field value to 'hack_signers' instead of 'signers'.
3791 * decl.c (java_init_decl_processing):
3792 Push field 'hack_signers' instead of 'signers'.
3794 2003-12-03 Zack Weinberg <zack@codesourcery.com>
3796 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
3799 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
3802 * parse.y (qualify_ambiguous_name): Remove lots of broken
3803 field access processing - there's no need to do that here,
3804 because we have resolve_field_access. Remove
3805 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
3806 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
3809 2003-12-01 Jeff Sturm <jsturm@one-point.com>
3812 * parse.y (java_complete_lhs): Save location prior to patching
3815 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
3818 * resource.c (write_resource_constructor): Append
3819 "_resource" to constructor identifier name.
3821 2003-11-25 Jeff Sturm <jsturm@one-point.com>
3824 * constants.c (cpool_for_class): New function.
3825 (outgoing_cpool): Remove global variable.
3826 (alloc_name_constant): Use cpool_for_class.
3827 (build_constants_constructor): Likewise.
3828 * decl.c (java_expand_body): Set current_class.
3829 * java-tree.h (outgoing_cpool) Remove declaration.
3830 (init_outgoing_cpool): Likewise.
3831 * jcf-parse.c (init_outgoing_cpool): Remove function.
3832 (parse_class_file): Don't call init_outgoing_cpool.
3833 * parse.y (java_complete_expand_methods): Don't call
3834 init_outgoing_cpool. Don't save outgoing_cpool.
3835 (java_expand_classes): Don't restore outgoing_cpool.
3836 (java_finish_classes): Likewise.
3838 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
3840 * Make-lang.in: (java.install-common) Add
3841 symlink for $(target_noncanonical)-gcjh for
3844 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
3846 * Make-lang.in (java.extraclean): Delete.
3848 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
3850 * Make-lang.in (check-java): Add.
3852 2003-11-19 Jeff Sturm <jsturm@one-point.com>
3855 * except.c (prepare_eh_table_type): Allocate variable-sized
3856 buffer `buf' with alloca.
3858 2003-11-17 Jeff Sturm <jsturm@one-point.com>
3862 decl.c (java_init_decl_processing): Don't initialize
3863 class_not_found_type_node, no_class_def_found_type_node.
3865 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
3866 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
3867 (class_not_found_type_node, no_class_def_found_type_node):
3870 parse.y (build_dot_class_method_invocation): Add this_class
3871 argument. Qualify method invocations to a different class.
3872 (create_new_parser_context): Initialize saved_data_ctx to 0.
3873 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
3874 (build_dot_class_method): Don't load classes. Register
3876 (build_incomplete_class_ref): Special cases for interfaces
3877 and inner classes. Move build_dot_class_method call to here...
3878 (patch_incomplete_class_ref): ...from here. Pass current_class
3879 to build_dot_class_method_invocation.
3880 (build_assertion): Pass class_type to
3881 build_dot_class_method_invocation.
3882 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
3884 2003-11-17 Jeff Sturm <jsturm@one-point.com>
3887 * java-tree.h (BLOCK_EMPTY_P): Define.
3888 * parse.y (java_complete_lhs): Check for empty blocks
3889 in TRY_FINALLY_EXPR case.
3891 2003-11-17 Andrew Haley <aph@redhat.com>
3893 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
3894 (struct lang_decl_var:freed): New variable.
3895 * decl.c (poplevel): Mark local vars that have gone out of scope.
3896 (push_jvm_slot): Don't use the RTL of a var that has gone out of
3899 2003-11-16 Jason Merrill <jason@redhat.com>
3901 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
3902 and TAGS files that include them for each front end.
3904 2003-11-15 Tom Tromey <tromey@redhat.com>
3906 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
3908 2003-11-12 Jason Merrill <jason@redhat.com>
3910 PR optimization/12547
3911 * lang.c (java_tree_inlining_walk_subtrees): Just walk
3912 BLOCK_EXPR_BODY directly.
3914 2003-11-12 Andrew Haley <aph@redhat.com>
3917 * parse.y (fold_constant_for_init): Check that we really do have a
3921 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
3922 init_test_decls being inlined.
3925 * parse.y (do_resolve_class): Check return value from
3926 breakdown_qualified().
3928 2003-11-11 Tom Tromey <tromey@redhat.com>
3931 * parse.y (merge_string_cste): Handle case where we have a
3932 pointer that happens to be zero, not null_pointer_node.
3934 2003-11-10 Tom Tromey <tromey@redhat.com>
3936 * jcf-parse.c (classify_zip_file): Correctly compare
3937 filename_length against length of manifest file's name.
3939 2003-11-08 Tom Tromey <tromey@redhat.com>
3942 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
3944 2003-11-06 Andrew Haley <aph@redhat.com>
3946 * expr.c (java_stack_swap): Make sure destination stack slots are
3947 of the correct type.
3949 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
3951 * Make-lang.in (dvi): Move targets to $(docobjdir).
3952 (gcj.dvi): Simplify rule and adjust target.
3953 (gcj.info): Simplify rule.
3954 (gcj.pod): New intermediate rule.
3955 (gcjh.pod): Likewise.
3956 (jv-scan.pod): Likewise.
3957 (jcf-dump.pod): Likewise.
3958 (gij.pod): Likewise.
3959 (jv-convert.pod): Likewise.
3960 (rmic.pod): Likewise.
3961 (rmiregistry.pod): Likewise.
3964 (jv-scan.1): Delete.
3965 (jcf-dump.1): Delete.
3967 (jv-convert.1): Delete.
3969 (rmiregistry.1): Delete.
3971 2003-11-02 Jeff Sturm <jsturm@one-point.com>
3973 Fixes PR java/12866.
3974 * parse.y (resolve_qualified_expression_name): Move test
3975 for outer field access methods from here...
3976 (check_thrown_exceptions) ...to here.
3978 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
3980 * .cvsignore: Delete.
3982 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
3984 * verify.c (verify_jvm_instructions): Don't warn about legal
3985 eh binding regions generated for example by jdk 1.4.1.
3987 2003-10-24 David S. Miller <davem@redhat.com>
3989 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
3991 2003-10-22 Andrew Haley <aph@redhat.com>
3993 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
3994 (java_get_callee_fndecl): New.
3996 * jcf-parse.c (java_parse_file): Call emit_catch_table().
3998 * java-tree.h (ctable_decl): New.
3999 (catch_classes): New.
4000 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
4002 * decl.c (java_init_decl_processing): Add catch_class_type.
4004 Add catch_classes field.
4006 * class.c (build_indirect_class_ref): Break out from
4008 (make_field_value): Check flag_indirect_dispatch.
4009 (make_class_data): Ditto.
4010 Tidy uses of PUSH_FIELD_VALUE.
4011 Add field catch_classes.
4012 (make_catch_class_record): New.
4014 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
4016 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
4018 * jcf-write.c: Follow spelling conventions.
4019 * parse.y: Likewise.
4021 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
4023 * ChangeLog: Fix typos.
4024 * expr.c: Fix comment typos.
4025 * jcf-write.c: Likewise.
4028 * mangle.c: Likewise.
4029 * parse-scan.y: Likewise.
4030 * parse.y: Likewise.
4032 2003-10-22 Tom Tromey <tromey@redhat.com>