1 2006-05-24 Tom Tromey <tromey@redhat.com>
3 * java-tree.h: Fixed flag documentation.
5 2006-05-24 Tom Tromey <tromey@redhat.com>
8 * jcf.h (ACC_INVISIBLE): Changed value.
10 2006-05-24 Andrew Haley <aph@redhat.com>
13 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
16 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
18 * lang.opt (femit-class-file): Remove VarExists.
20 2006-05-16 Tom Tromey <tromey@redhat.com>
22 * verify-impl.c (verify_instructions_0) <op_return>: Special case
25 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
28 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
31 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
33 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
34 (java/expr.o): Replace target.h with $(TARGET_H).
35 (java/parse.o): Likewise.
37 2006-05-10 Andrew Haley <aph@redhat.com>
39 * class.c (emit_indirect_register_classes): Fix comment.
41 2006-05-04 Tom Tromey <tromey@redhat.com>
43 * java-tree.h (uses_jv_markobj_p): Declare.
44 * class.c (uses_jv_markobj_p): Removed.
45 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
46 (get_boehm_type_descriptor): Use it.
47 (uses_jv_markobj_p): Moved from class.c. Return bool.
49 2006-05-04 Tom Tromey <tromey@redhat.com>
51 * java-tree.def (THIS_EXPR): Now a tcc_expression.
53 2006-05-04 Andrew Haley <aph@redhat.com>
55 * class.c (make_field_value): Always build_address_of fdecl if
56 there is an initializer.
58 2006-05-03 Andrew Haley <aph@redhat.com>
61 * expr.c (maybe_rewrite_invocation): New function.
62 (rewrite_arglist_getclass): Likewise.
64 (expand_invoke): Call maybe_rewrite_invocation.
65 * parse.y (patch_invoke): Likewise.
66 * java-tree.h: (maybe_rewrite_invocation): New function.
68 2006-04-21 Andrew Haley <aph@redhat.com>
70 * lang.c (java_init): Handle flag_indirect_classes.
71 * jvgenmain.c: Use "class$$" instead of "class$".
72 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
74 (mangle_class_field): Special case "class$$" as well as "class$".
75 * constants.c (build_ref_from_constant_pool): If
76 flag_indirect_classes, generate a ref into the heap.
77 * decl.c (constants_field_decl_node,
78 constants_data_field_decl_node): New.
79 * class.c (build_static_class_ref): New.
80 (build_classdollar_field): Factor out from build_class_ref().
81 (make_field_value): Handle static fields in heap.
82 (make_class_data): Make sure we get a static ref to class.
83 Make class initializer const if flag_indirect_classes.
84 (register_class): Build a class_ref for initialization if
85 flag_indirect_classes.
86 (emit_indirect_register_classes): New.
88 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
90 * expr.c, gjavah.c: Fix comment typos.
92 2006-04-03 Andrew Haley <aph@redhat.com>
95 * expr.c (build_field_ref): Don't check the field offset if
98 2006-03-30 Andrew Haley <aph@redhat.com>
101 * lang.c (java_attribute_table): New.
102 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
103 * expr.c (build_field_ref): Add a null pointer check for all
104 fields of offset > 4k. Don't do so for accesses via the this
105 pointer, which we know can never be null.
106 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
109 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
111 * Make-lang.in: Rename docdir to gcc_docdir.
113 2006-03-30 Tom Tromey <tromey@redhat.com>
116 * parse.y (java_reorder_fields): Reset superclass field's size as
119 2006-03-28 Tom Tromey <tromey@redhat.com>
122 * parse.y (find_most_specific_methods_list): Added 'class'
124 (lookup_method_invoke): Updated.
126 2006-03-15 Tom Tromey <tromey@redhat.com>
128 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
129 non-static method calls.
131 2006-03-15 David Daney <ddaney@avtrex.com>
133 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
136 2006-03-15 David Daney <ddaney@avtrex.com>
138 * lang.opt (-freduced-reflection): New option.
139 * lang.c (java_post_options): Generate an error if
140 -freduced-reflection used with -fjni or -findirect-dispatch.
141 * java-tree.h (flag_reduced_reflection): Declare new variable.
142 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
143 if bitmap overflows and flag_reduced_reflection set.
144 * class.c (uses_jv_markobj_p): New function.
145 (make_class_data): Moved generation of vtable to before
146 reflection data, generate less reflection data if
147 flag_reduced_reflection set.
148 * gcj.texi: Document -freduced-reflection.
150 2006-03-15 Tom Tromey <tromey@redhat.com>
153 * class.c (get_interface_method_index): Don't put <clinit> into
156 2006-03-15 Tom Tromey <tromey@redhat.com>
158 * parse.y (analyze_clinit_body): Ignore empty statements.
160 2006-03-08 David Daney <ddaney@avtrex.com>
162 * gcj.texi: Document -static-libgcj option.
164 2006-02-20 Andrew Haley <aph@redhat.com>
166 * jcf-parse.c (parse_class_file): Set input_location from
169 2006-02-15 Andrew Haley <aph@redhat.com>
171 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
172 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
173 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
175 2006-02-09 Andrew Haley <aph@redhat.com>
178 * expr.c (expand_invoke): Allow methods in arrays to be resolved
181 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
184 2006-02-08 Tom Tromey <tromey@redhat.com>
187 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
188 * builtins.c (convert_real): New function.
189 (java_builtins): Handle Float.intBitsToFloat,
190 Float.floatToRawIntBits, Double.longBitsToDouble,
191 Double.doubleToRawLongBits.
193 2006-02-07 Andrew Haley <aph@redhat.com>
195 * expr.c (expand_invoke): (BC mode.) If we find a method in a
196 class other than the one in which we expected to find it, ignore
200 * constants.c (build_constants_constructor): move initializer into
201 first halfword on a 64-bit big-endian machine.
203 2006-02-04 Tom Tromey <tromey@redhat.com>
206 * builtins.c (max_builtin): Skip floating point 'max'.
207 (min_builtin): Skip floating point 'min'.
208 (check_for_builtin): Never return NULL_TREE.
210 2006-02-04 Tom Tromey <tromey@redhat.com>
213 * expr.c (push_type): Avoid side effect in gcc_assert.
215 2006-02-04 Roger Sayle <roger@eyesopen.com>
217 * decl.c (java_init_decl_processing): Create char_type_node as a
218 regular INTEGER_TYPE node.
219 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
220 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
221 test for char_type_node and promoted_char_type_node as special
222 instances of INTEGER_TYPE tree codes.
223 (promote_type,build_java_signature): Likewise.
224 * jcf-write.c (adjust_typed_op): Likewise.
225 * mangle.c (mangle_type): Likewise.
226 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
227 * parse.h (JINTEGRAL_TYPE_P): Likewise.
229 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
231 * expr.c (java_stack_swap): Revert gcc_assert patch.
233 2006-02-03 Ben Elliston <bje@au.ibm.com>
235 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
236 * typeck.c: Likewise.
237 * verify-impl.c: Likewise.
240 * jcf-parse.c: Likewise.
241 * constants.c: Likewise.
242 * check-init.c: Likewise.
243 * jcf-write.c: Likewise.
244 * verify-glue.c: Likewise.
245 * mangle.c: Likewise.
250 2006-02-01 Jan Hubicka <jh@suse.cz>
252 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
253 * lang.c (java_init_options): Set no_unit_at_a_time_default.
255 2006-01-30 Andrew Haley <aph@redhat.com>
258 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
260 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
262 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
263 Update copyright notice dates.
265 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
267 * jvspec.c (lang_specific_spec_functions): Remove.
269 2006-01-06 Tom Tromey <tromey@redhat.com>
271 * gcj.texi (Arrays): Added more documentation for
273 (Primitive types): Correct information about primitive classes.
274 (Reference types): New node.
277 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
279 * jcf-parse.c (set_source_filename): Set the decl source location
280 even when returning early.
282 2005-12-15 Tom Tromey <tromey@redhat.com>
283 Andrew Haley <aph@redhat.com>
286 * parse.y (resolve_expression_name): Don't generate accessor
287 methods for constant fields.
289 2005-12-13 Andrew Haley <aph@redhat.com>
293 * class.c (maybe_layout_super_class): Update current_class before
294 calling do_resolve_class.
296 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
299 * jcf-write.c (write_classfile): Use PID in temporary class
300 file. Save/restore errno when reporting error.
302 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
305 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
306 to bare_function_type and including the return type
307 * builtins.c (initialize_builtins) : Change builtin mangled name
308 constants to conform to new mangling scheme
310 2005-12-08 Andrew Haley <aph@redhat.com>
313 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
314 (soft_abstractmethod_node): New.
315 * expr.c (build_field_ref): Add in-line check for missing field.
316 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
318 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
320 * Make-lang.in (java.all.build, java.install-normal): Remove.
322 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
324 * Make-lang.in: Remove all dependencies on s-gtype, except for
327 2005-12-07 Richard Sandiford <richard@codesourcery.com>
329 * class.c (build_utf8_ref, emit_register_classes): Use
330 switch_to_section and get_section.
332 2005-12-06 Tom Tromey <tromey@redhat.com>
335 * parse.y (patch_new_array_init): Revert previous patch.
336 (lookup_method_invoke): Use size-less array type when creating an
337 anonymous constructor.
339 2005-12-05 Tom Tromey <tromey@redhat.com>
341 * parse.y (patch_new_array_init): Don't set length on array.
343 2005-12-02 Richard Guenther <rguenther@suse.de>
345 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
346 buildN instead of build.
347 * class.c (finish_class): Likewise.
348 * expr.c (java_create_object): Likewise.
350 2005-11-28 Tom Tromey <tromey@redhat.com>
353 * expr.c (build_jni_stub): Unwrap the return value.
354 * java-tree.h (soft_unwrapjni_node): New define.
355 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
356 * decl.c (java_init_decl_processing): Initialize
359 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
361 * gcj.texi (gij options): Add -Xss documentation.
363 2005-11-08 Wil Mahan <wmahan@gmail.com>
366 * zextract.c (read_zip_archive): Fix out of memory error when
367 reading jar files with zip-style comments.
369 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
371 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
373 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
375 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
376 Wil Mahan <wmahan@gmail.com>
379 * class.c (make_class): Create empty binfo here.
380 (set_super_info): Only create binfo if we have superclasses.
382 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
385 * parse.y (method_header): Make the result of the rule a NULL_TREE
386 when a parsing error occurs.
388 2005-09-29 Tom Tromey <tromey@redhat.com>
391 * jcf-io.c (memoized_dirlist_hash): New function.
392 (caching_stat): Use it.
394 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
397 * class.c (inherits_from_p): Try to lay out super class
398 if it is not already laid out.
399 (maybe_layout_super_class): Handle the case where SUPER_CLASS
402 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
404 * builtins.c (max_builtin, min_builtin, abs_builtin,
405 java_build_function_call_expr): Use fold_buildN.
406 * class.c (layout_class_method): Likewise.
407 * expr.c (java_truthvalue_conversion, build_java_jsr,
408 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
409 build_java_binop, build_field_ref, expand_compare,
410 build_known_method_ref, build_invokevirtual,
411 process_jvm_instruction): Likewise.
412 * parse.y (patch_binop, patch_exit_expr): Likewise.
413 * typeck.c (convert_ieee_real_to_integer): Likewise.
414 (convert): Don't call fold after convert_ieee_real_to_integer.
416 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
419 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
420 the newly created type. Set import lists here, not in create_class.
421 (jdep_resolve_class): Set current_class.
422 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
423 the current package context, not ctxp->package.
424 (cicp_cache): Removed.
425 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
426 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
427 * java-tree.h (TYPE_PACKAGE): New macro.
428 (struct lang_type): New member 'package'.
430 2005-09-09 Andrew Haley <aph@redhat.com>
433 * expr.c (pop_type_0): If the expected type is object or ptr
434 (i.e. void*), return the type of the object we just popped from
437 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
439 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
440 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
442 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
444 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
445 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
446 typos. Follow spelling conventions.
448 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
451 * typeck.c (lookup_do): Look up interfaces for the original class,
453 * parse.y (java_check_regular_methods): Fix diagnostic message for
454 more restrictive overriding of a method from an interface.
456 2005-08-16 Tom Tromey <tromey@redhat.com>
458 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
459 class' initial state.
461 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
464 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
465 `literal_token' for large numeric input tokens.
467 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
470 * parse.y (nested_field_access_p): Rename to nested_member_access_p
471 and expand to handle method accesses across nested classes.
472 (build_outer_method_access_method): Rename to
473 build_nested_method_access_method. Minor adjustments to comments.
474 (resolve_expression_name): Use the newly-renamed
475 nested_member_access_p method.
476 (resolve_qualified_expression_name): Likewise.
477 (patch_method_invocation): Also consider static methods for access
478 method generation. Minor adjustments to comments.
479 (maybe_use_access_method): Use the more general
480 nested_memeber_access_p to determine access across nested class
481 boundaries. Allow THIS_ARG to be NULL (for static methods).
483 2005-08-15 Tom Tromey <tromey@redhat.com>
486 * expr.c (build_field_ref): Don't generate otable reference when
487 DECL_FIELD_OFFSET is 0.
488 * class.c (maybe_layout_super_class): Pass outer class to
491 2005-08-15 Tom Tromey <tromey@redhat.com>
493 * java-tree.h (LABEL_IN_SUBR): Removed.
494 (LABEL_IN_SUBR): Likewise.
495 (LABEL_IS_SUBR_START): Likewise.
496 (LABEL_SUBR_START): Likewise.
497 (LABEL_SUBR_CONTEXT): Likewise.
498 (LABEL_CHANGED): Likewise.
499 (LABEL_RETURN_LABEL): Likewise.
500 (LABEL_RETURN_TYPE_STATE): Likewise.
501 (LABEL_RETURN_LABELS): Likewise.
502 (RETURN_MAP_ADJUSTED): Likewise.
503 (LABEL_PENDING_CHAIN): Likewise.
505 2005-08-15 Tom Tromey <tromey@redhat.com>
507 * Make-lang.in (JAVA_OBJS): Removed verify.o
508 (java/verify.o): Removed.
510 * lang.c (flag_new_verifier): Removed.
511 (java_post_options): Updated.
512 * java-tree.h (flag_new_verifier): Removed.
513 (verify_jvm_instructions): Removed.
514 * expr.c (pop_type_0): Assume flag_new_verifier is true.
515 (build_java_check_indexed_type): Likewise.
516 (expand_java_arraystore): Likewise.
517 (expand_java_arrayload): Likewise.
518 (pop_arguments): Likewise.
519 (expand_byte_code): Likewise.
520 (process_jvm_instruction): Likewise.
522 2005-08-10 Andrew Haley <aph@redhat.com>
524 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
525 type mismatches to make legal GIMPLE.
527 2005-08-10 Robin Green <greenrd@greenrd.org>
530 * parse.y (maybe_use_access_method): Generalize check from
531 java.lang.Object to any superclass of current_class
533 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
535 * class.c (build_class_ref): Wrap the primary class type in a
537 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
538 primary class type from the NOP_EXPR in which it was placed.
540 2005-07-28 Diego Novillo <dnovillo@redhat.com>
542 * expr.c (expand_load_internal): Fix missing parens in
545 2005-07-28 Andrew Haley <aph@redhat.com>
547 * expr.c (expand_load_internal): Convert to destination type.
549 2005-07-22 Manfred Hollstein <mh@suse.com>
551 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
552 (check_constant): Likewise.
553 (check_wide_constant): Likewise.
555 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
557 Make CONSTRUCTOR use VEC to store initializers.
558 * check-init.c (check_init): Update to cope with VEC in
560 * class.c (make_field_value, make_method_value, get_dispatch_table,
561 make_class_data, emit_symbol_table, emit_catch_table,
562 emit_assertion_table): Use build_constructor_from_list instead of
564 * constants.c (build_constants_constructor): Likewise.
565 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
566 VEC in CONSTRUCTOR_ELTS.
567 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
568 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
570 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
572 * parse.y (build_new_array_init): Use build_constructor_from_list
573 instead of build_constructor.
574 (patch_new_array_init): Update to cope with VEC in
576 (array_constructor_check_entry): Likewise.
578 2005-07-12 Tom Tromey <tromey@redhat.com>
580 * jvspec.c (lang_specific_driver): Put filelist_filename first on
583 2005-07-12 Tom Tromey <tromey@redhat.com>
586 * parse-scan.y (interface_member_declaration): Added
589 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
591 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
592 (LABEL_PENDING_CHAIN): Ditto.
594 (DECL_BIT_INDEX): Ditto.
596 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
599 * parse.y (inner_class_accessible): New function. Logic moved from
600 check_inner_class_access.
601 (check_inner_class_access): Use inner_class_accessible.
602 (resolve_inner_class): Simplify arguments. Create circularity hash
603 here. Keep looking for classes if we found one that was inaccessible.
604 Return the inaccessible class only if there is no other match.
605 (do_resolve_class): Update for new resolve_inner_class arguments.
606 Don't create circularity_hash here.
608 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
611 * parse.y (add_exception_to_throws): New function.
612 (purge_unchecked_exceptions): Removed.
613 (get_constructor_super): Renamed from verify_constructor_super. Now
614 returns the super constructor after verification.
615 (java_complete_expand_method): Don't use purge_unchecked_exceptions
616 or save/restore the exception list.
617 (check_thrown_exceptions): Add uncaught exceptions in anonymous
618 class initializers and constructors to the throws clause of the method.
620 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
623 * parse.y (interface_member_declaration): Allow empty statements in
624 interface declarations.
626 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
628 * Makefile.in (parse.o): Adjust dependencies.
629 * parse.y: Include tree-dump.h.
631 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
633 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
636 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
638 * parse.y (issue_warning_error_from_context): Call
639 pp_output_formatted_text to be able to get the buffer.
641 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
643 * parse.y (issue_warning_error_from_context): Update for the
644 renaming of pp_format_text to pp_format.
646 2005-06-28 Paul Brook <paul@codesourcery.com>
648 * decl.c (java_init_decl_processing): Call
649 default_init_unwind_resume_libfunc.
651 2005-06-27 Tom Tromey <tromey@redhat.com>
653 PR java/21540, PR java/13788:
654 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
655 fold_constant_for_init.
656 (patch_binop): Added 'folding' argument. Updated all callers.
657 (patch_unaryop) <NOP_EXPR>: New case.
658 (fold_constant_for_init) <NOP_EXPR>: Likewise.
659 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
661 2005-06-25 Jan Hubicka <jh@suse.cz>
663 * builtins.c (define_builtin): Accept new flags parameter.
664 (initialize_builtins): Mark the builtins const and nothrow accordingly.
666 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
668 * all files: Update FSF address in copyright headers.
670 2005-06-24 Tom Tromey <tromey@redhat.com>
672 * verify-impl.c (verify_instructions_0): Correctly handle
673 situation where PC falls off end.
675 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
678 * parse.y (find_most_specific_methods_list): Remove special case for
681 2005-06-15 Tom Tromey <tromey@redhat.com>
684 * class.c (make_method_value): Use soft_abstractmethod_node for
686 * java-tree.h (soft_abstractmethod_node): New define.
687 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
688 * decl.c (java_init_decl_processing): Initialize
689 soft_abstractmethod_node.
691 2005-06-13 Geoffrey Keating <geoffk@apple.com>
693 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
695 2005-06-13 Per Bothner <per@bothner.com>
697 * expr.c (int highest_label_pc_this_method,
698 start_label_pc_this_method): New globals.
699 (lookup_label): Add start_label_pc_this_method to pc for label, and
700 update highest_label_pc_this_method. This prevents conflicts between
701 labels from different methods.
702 * java-tree.h: Declare new globals.
703 * jcf-parse.c (parse_class_file): If needed bump
704 start_label_pc_this_method and reset highest_label_pc_this_method.
706 2005-06-13 Tom Tromey <tromey@redhat.com>
709 * parse.y (nested_field_access_p): Handle case where outer field
710 is inherited by enclosing class.
712 2005-06-12 Per Bothner <per@bothner.com>
714 * class.c (inherits_from_p): Do load_class if needed.
716 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
718 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
719 * java-tree.h (parse_error_context): Move...
720 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
721 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
722 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
724 2005-06-08 Roger Sayle <roger@eyesopen.com>
726 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
728 2005-06-06 Jakub Jelinek <jakub@redhat.com>
730 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
731 msgid for argument name.
732 * gjavah.c (error): Likewise.
733 * java-tree.h (parse_error_context): Likewise.
734 * parse.y (parse_error_context, parse_warning_context,
735 issue_warning_error_from_context): Likewise.
737 2005-06-01 Tom Tromey <tromey@redhat.com>
740 * class.c (build_static_field_ref): Don't fold constant fields if
741 current class is from a .class file and we're using indirect
744 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
746 * java/verify-glue.c: Don't include errors.h and include toplev.h.
747 * java/Make-lang.in: Updates dependencies.
749 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
752 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
753 NESTED_FIELD_ACCESS_IDENTIFIER_P.
754 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
755 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
756 * jcf-write.c (generate_classfile): Use
757 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
758 OUTER_FIELD_ACCESS_IDENTIFIER_P.
759 * parse.y (build_outer_field_access): Rename to
760 build_nested_field_access. Support static fields and outer-to-inner
762 (outer_field_access_p): Rename to nested_field_access_p. Support
763 static fields and generalise to outer-to-inner class and sibling
764 inner class accesses.
765 (outer_field_expanded_access_p): Rename to
766 nested_field_expanded_access_p and support static fields.
767 (outer_field_access_fix): Rename to nested_field_access_fix and
768 support static fields.
769 (build_outer_field_access_expr): Rename to
770 build_nested_field_access_expr and support static fields.
771 (build_outer_field_access_methods): Rename to
772 build_nested_field_access_methods and support static fields. For
773 static fields, generate accessors without class instance parameters.
774 (build_outer_field_access_method): Rename to
775 build_nested_field_access_method and support static fields.
776 (build_outer_method_access_method): Use
777 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
778 OUTER_FIELD_ACCESS_IDENTIFIER_P.
779 (resolve_expression_name): Consider static field accesses across
781 (resolve_qualified_expression_name): Likewise.
782 (java_complete_lhs): Use nested_field_access_fix instead of
783 outer_field_access_fix.
784 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
785 Use nested_field_expanded_access_p instead of
786 outer_field_expanded_access_p. Use nested_field_access_fix instead
787 of outer_field_access_fix.
788 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
789 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
791 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
793 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
794 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
795 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
796 MINOR_BINARYCOMPAT_ABI_VERSION): New.
797 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
798 (parse_version): Calculate version ID using new method. Use bit-flags
799 for flag_indirect_dispatch and flag_bootstrap_classes.
801 2005-05-25 Richard Henderson <rth@redhat.com>
804 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
805 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
806 DECL_CONTEXT; avoid pushdecl_top_level.
807 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
808 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
809 (layout_class_method): Likewise.
810 * decl.c (java_mark_cni_decl_local): New.
811 (java_mark_class_local): Use it.
812 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
813 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
814 (struct lang_decl_func): Add local_cni;
815 (struct lang_decl_var): Add class_field, vtable.
816 (java_mangle_decl): Declare.
817 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
818 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
819 (mangle_obstack_1): New.
820 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
821 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
822 lhd_set_decl_assembler_name for things that don't need mangling.
823 (mangle_class_field): Rename from java_mangle_class_field, make
824 static, don't call init_mangling or finish_mangling.
825 (mangle_vtable): Similarly.
826 (mangle_local_cni_method_decl): New.
827 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
828 gcc_assert, and MANGLE_RAW_STRING.
829 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
831 2005-05-25 DJ Delorie <dj@redhat.com>
833 * class.c (set_constant_value): Move warning control from if() to
836 2005-05-24 Richard Henderson <rth@redhat.com>
838 * builtins.c (define_builtin): Don't call make_decl_rtl.
839 * constants.c (build_constant_data_ref): Likewise.
840 * class.c (build_utf8_ref): Likewise.
841 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
842 (get_dispatch_table, layout_class_method): Likewise.
843 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
845 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
846 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
847 to determine if we need a non-zero address.
848 * decl.c (builtin_function): Don't call make_decl_rtl.
849 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
850 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
851 * resource.c (compile_resource_data): Likewise.
852 * parse.y (resolve_field_access): Re-word comment to avoid
855 2005-05-24 Richard Henderson <rth@redhat.com>
857 * class.c (registered_class): Take it out of class_roots; turn into
859 (register_class): Make static. Don't duplicate decl node. Use
861 (emit_register_classes): Use VEC_iterate. Use output_constant
862 instead of assemble_integer. Don't call mark_decl_referenced
864 * java-tree.h (register_class): Remove decl.
866 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
870 * parse.y (register_package, package_list): Remove.
871 (package_declaration): Do not call register_package.
872 (do_resolve_class): Do not use package_list.
874 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
876 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
879 2005-05-15 Tom Tromey <tromey@redhat.com>
882 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
885 2005-05-12 Aaron Luchko <aluchko@redhat.com>
887 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
889 2005-05-11 Tom Tromey <tromey@redhat.com>
891 * gcj.texi (Code Generation): Document -fbootstrap-classes.
892 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
893 (parse_version): Use it.
894 * lang.opt (-fbootstrap-classes): New option.
896 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
899 * class.c (maybe_layout_super_class): Look for imports in this_class.
900 * parse.h (ctxp_for_generation_last): New.
901 (do_resolve_class): Add a parameter.
902 * parse.y (ctxp_for_generation_last): New.
903 (java_pop_parser_context): Add at end of list.
904 (find_in_imports, find_in_imports_on_demand): Look in ctxp
905 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
906 the given type are NULL.
907 (do_resolve_class): Look into the imports of the new second parameter.
908 Adjust recursive calls.
909 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
910 calls to do_resolve_class.
911 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
912 (java_complete_class): Do not do that here.
914 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
917 * Make-lang.in (java): Add gjnih.
918 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
919 (GJNIH_OBJS): New variable.
920 (gjnih$(exeext)): New target.
921 (JAVA_MANFILES): Add gjnih.1.
922 (java.uninstall): Add gjnih.1.
923 (java.mostlyclean): Add gjnih.
924 (java.maintainer-clean): Add gjnih.1.
925 (java/gjavah-jni.o): New target.
926 (.INTERMEDIATE): Add gjnih.pod.
927 (gjnih.pod): New target.
928 * config-lang.in (stagestuff): Add gjnih.
929 * gcj.texi (Top): Add gjnih node.
930 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
931 -bootclasspath options.
932 (Invoking gjnih): New node.
933 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
934 (TOOLNAME): New macro.
935 (error): Replace hard-coded gcjh with TOOLNAME.
936 (process_file): Likewise.
939 (help): Likewise. Add help output for -force, -old, -trace and -J
941 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
942 (options): Add force, old, trace and J fields.
943 (main): Handle -force, -old, -trace and -J options.
945 2005-05-03 Tom Tromey <tromey@redhat.com>
948 * gjavah.c (main): Unlink output file on error.
950 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
952 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
955 2005-04-29 Tom Tromey <tromey@redhat.com>
957 * expr.c (build_jni_stub): Updated for change to build_block.
959 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
961 * expr.c (force_evaluation_order): Declare 'saved' earlier.
963 2005-04-28 Andrew Haley <aph@redhat.com>
966 * java-tree.h (soft_resolvepoolentry_node): New.
967 (alloc_constant_fieldref): Declare.
968 * expr.c (expand_java_field_op): Don't call class_init for
969 accesses to static fields with indirect dispatch.
970 * builtins.c (initialize_builtins): Add "__builtin_expect".
971 * decl.c (soft_resolvepoolentry_node): New variable.
972 (java_init_decl_processing): Create a decl for
973 "_Jv_ResolvePoolEntry".
974 * class.c (build_fieldref_cache_entry): New function.
975 (build_static_field_ref): Rewrite for indirect dispatch.
976 * constants.c (find_name_and_type_constant_tree): New function.
977 (alloc_constant_fieldref): Likewise.
978 (build_constants_constructor): Handle CONSTANT_Fieldref and
979 CONSTANT_NameAndType.
982 * expr.c (force_evaluation_order): Convert outgoing args smaller
985 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
987 * gcj.texi (libgcj Runtime Properties): Remove obsolete
988 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
989 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
991 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
993 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
994 to `unlock_stream' with `unlock_std_streams'.
996 2005-04-25 Jakub Jelinek <jakub@redhat.com>
998 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
999 instead of just expr.h.
1001 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1003 * gjavah.c (main): Unlock the stdio streams.
1004 * jcf-dump.c (main): Likewise.
1005 * jv-scan.c (main): Likewise.
1006 * jvgenmain.c (main): Likewise.
1008 2005-04-23 DJ Delorie <dj@redhat.com>
1010 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
1011 parse.y: Adjust warning() callers.
1013 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
1015 * gcj.texi (Object fields): Change "Integer" to "Int" in example
1018 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
1020 * gcj.texi: Fix typos and bogus example.
1022 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
1024 * except.c: Fix a comment typo.
1026 2005-04-19 Julian Brown <julian@codesourcery.com>
1028 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
1029 indirect dispatch with PIC.
1031 2005-04-18 Andrew Haley <aph@redhat.com>
1033 * java-except.h (struct eh_range.handler): Remove unused field.
1034 (handle_nested_ranges): Remove function declaration.
1035 (sanity_check_exception_range): Add function declaration.
1036 * verify.c (verify_jvm_instructions): Remove call to
1037 handle_nested_ranges.
1038 * verify-glue.c (verify_jvm_instructions_new): Call
1039 sanity_check_exception_range.
1040 * except.c (link_handler, eh_range_freelist, link_handler,
1041 handle_nested_ranges): Remove.
1042 (add_handler): Rewrite.
1043 (sanity_check_exception_range): New function.
1044 (print_ranges): New function.
1046 2005-04-13 Julian Brown <julian@codesourcery.com>
1048 * decl.c (finish_method): Give methods once-only linkage.
1050 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
1052 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1054 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1056 * java-tree.h: Don't use PARAMS().
1058 2005-04-07 Per Bothner <per@bothner.com>
1060 * class.c (push_class): By default, suppress debug output.
1061 (finish_class): Enable debug output for classes we're emitting.
1063 2005-04-07 Andrew Haley <aph@redhat.com>
1065 * gcj.texi: Correct gcj-dbtool instructions.
1067 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
1069 * gcj.texi: Fix a typo.
1070 * lang.c: Fix a comment typo.
1072 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
1074 * gcj.texi (Invoking gij): Add descriptions of new -X options.
1075 Mention recognized-and-ignored compatibility options.
1076 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
1078 (About CNI): Add Memory allocation section.
1080 2005-04-01 Tom Tromey <tromey@redhat.com>
1082 * decl.c (java_init_decl_processing): Fix types of
1083 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
1084 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
1085 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
1087 2005-03-31 Jan Hubicka <jh@suse.cz>
1089 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
1090 * class.c: Include cgraph.h
1091 (make_local_functoin_alias): Mark aslias as needed.
1092 * resource.c: Include cgraph.h
1093 (compile_resource_data): Go via cgraph interface.
1095 2005-03-30 Ian Lance Taylor <ian@airs.com>
1097 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
1099 2005-03-30 Tom Tromey <tromey@redhat.com>
1101 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
1102 inner_class_info_index==0 or outer_class_info_index==0.
1104 2005-03-29 Tom Tromey <tromey@redhat.com>
1106 * gcj.texi (libgcj Runtime Properties): Document
1107 gnu.gcj.runtime.endorsed.dirs.
1109 2005-03-24 Anthony Green <green@redhat.com>
1111 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
1114 2005-03-23 Tom Tromey <tromey@redhat.com>
1116 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
1117 (parse_version): Use it.
1119 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
1121 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1123 2005-03-18 Andrew Haley <aph@redhat.com>
1126 * decl.c (update_aliases): Don't update variables that are about
1128 (maybe_poplevels): Add comment.
1130 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
1133 * jcf-parse.c (duplicate_class_warning): New function.
1134 (java_parse_file): Call duplicate_class_warning if
1135 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
1136 (parse_zip_file_entries): Likewise. Also set
1137 CLASS_FROM_CURRENTLY_COMPILED_P.
1139 2005-03-16 Andrew Haley <aph@redhat.com>
1141 * expr.c (expand_java_arrayload): Don't generate a
1142 NullPointerException based on the type of the node.
1143 (build_java_array_length_access): Likewise.
1145 2005-03-15 Zack Weinberg <zack@codesourcery.com>
1147 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
1149 2005-03-11 Tom Tromey <tromey@redhat.com>
1151 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
1152 (libgcj Runtime Properties): Document the default .db.
1154 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
1157 * parse.y (checks_throws_clauses): Check exceptions list even when
1158 the base class does not come from a source file being compiled.
1159 (java_complete_lhs): Remove unused variable 'wfl'.
1161 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
1164 * decl.c (finish_method): Emit _Jv_InitClass for private static
1165 methods inside inner classes as well.
1167 2005-03-08 Julian Brown <julian@codesourcery.com>
1168 * Revert patch from 2005-03-08 for causing bootstrap failure on
1171 2005-03-08 Julian Brown <julian@codesourcery.com>
1173 * decl.c (finish_method): Give methods once-only linkage.
1175 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
1177 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
1179 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
1181 * verify-glue.c (vfy_is_assignable_from): Perform static check using
1182 can_widen_reference_to if the C++ ABI is in use.
1183 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
1184 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
1185 type_isresolved, init_state, set_pc, state_get_pc,
1186 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
1187 (verify_fail): Report the current PC from the verifier context.
1188 (free_state): Remove #if 0 block to enable this function.
1189 (free_verifier_context): Call free_state on state_list iterator
1190 values before freeing them.
1191 * expr.c (pop_type_0): Pop correct type for error message when stack
1192 contains a multi-word type.
1194 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
1196 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
1197 for known NULL array length access.
1199 2005-03-07 Tom Tromey <tromey@redhat.com>
1201 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
1203 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
1205 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
1206 typeck.c: Update copyright.
1208 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
1211 * xref.c, xref.h: Remove file.
1212 * Make-lang.in (java/xref.o): Remove.
1213 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
1214 * lang.c (flag_emit_xref): Remove definition.
1215 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
1216 * typeck.c (convert): Remove use of do_not_fold.
1217 * parse.y (do_not_fold): Remove definition.
1218 (parser grammar): Remove xref code.
1219 (maybe_create_class_interface_decl, create_class): Likewise.
1220 (register_fields, method_header, finish_method_declaration): Likewise.
1221 (declare_local_variables, source_end_java_method): Likewise.
1222 (java_complete_expand_classes): Do not set do_not_fold.
1223 (java_complete_expand_method): Remove xref code.
1224 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
1225 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
1226 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
1227 (patch_synchronized_statement, patch_throw_statement): Likewise.
1228 (maybe_build_class_init_for_field): Likewise.
1230 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
1232 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
1233 instead of IS_NON_TYPE_CODE_CLASS.
1235 2005-03-04 Andrew Haley <aph@redhat.com>
1238 * class.c (set_method_index): Don't set method_index if it is
1240 (layout_class_method): Don't complain about "non-static method foo
1241 overrides static method" in the case of indirect dispatch.
1243 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1245 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
1247 * Make-lang.in: Don't elide warnings in jcf-io.c.
1249 2005-03-01 Per Bothner <per@bothner.com>
1252 * check-init.c (wfl): Remove static.
1253 (final_assign_error, check_init): Replace calls to parse_error_context
1255 (check_init): Save, set, and restore input_location for each exp.
1257 2005-03-01 Per Bothner <per@bothner.com>
1259 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
1260 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
1261 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
1263 2005-03-01 Per Bothner <per@bothner.com>
1265 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
1267 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
1270 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
1273 2005-02-22 Tom Tromey <tromey@redhat.com>
1276 * verify-impl.c (EITHER): New define.
1277 (types_compatible): Handle it.
1278 (check_field_constant): Use it.
1280 2005-02-18 Tom Tromey <tromey@redhat.com>
1283 * verify-impl.c (types_equal): Fixed test.
1286 * verify-glue.c (vfy_class_has_field): New function.
1287 * verify.h (vfy_class_has_field): Declare.
1288 * verify-impl.c (check_field_constant): Added 'putfield'
1290 (verify_instructions_0): Updated.
1291 (types_equal): New function.
1293 2005-02-14 Tom Tromey <tromey@redhat.com>
1296 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
1297 stack effect of multianewarray.
1299 2005-02-14 Andrew Haley <aph@redhat.com>
1302 * expr.c (expand_byte_code): Call promote_arguments().
1303 (promote_arguments): New function.
1304 * decl.c (check_local_unnamed_variable): Remove special case for
1306 (find_local_variable): Promote all boolean types to int
1307 when searching for local variable decls.
1309 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
1311 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
1312 parse-scan.y: Update copyright.
1314 2005-02-11 Per Bothner <per@bothner.com>
1317 * parse-scan.y (input_location): Remove variable.
1318 (main_input_filename): New - replaces input_filename, which isn't
1319 settable if USE_MAPPED_LOCATION.
1320 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
1321 so we don't reference input_location or wfl_operator in that case.
1322 * jv-scan.c (expand_location): Remove - no longer used.
1323 (main): Set main_input_filename rather than input_filename.
1325 2005-02-09 Richard Henderson <rth@redhat.com>
1327 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
1328 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
1330 2005-02-08 Marcin Dalecki <martin@dalecki.de>
1332 * expr.c (add_type_assertion): Use the proper enumeration type,
1333 since this is what htab_find_slot() is expecting.
1335 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
1337 * gcj.texi: Update copyright dates.
1339 2005-02-02 Tom Tromey <tromey@redhat.com>
1341 * gcj.texi (libgcj Runtime Properties): Default library_control
1344 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
1347 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
1348 (modifiers) when square brackets are present in a declaration for
1350 * jv-scan.c (main): Set input_filename and input_line.
1352 2005-02-01 Tom Tromey <tromey@redhat.com>
1355 * gjavah.c (get_field_name): Don't override name for JNI header.
1357 2005-02-01 Roger Sayle <roger@eyesopen.com>
1359 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
1360 of unsigned types using iushr and lushr JVM bytecodes.
1362 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
1365 * gjavah.c (jni_print_float): Do not emit floating-point
1366 initialiser for a static final field.
1367 (jni_print_double): Likewise.
1369 2005-02-01 Mark Mitchell <mark@codesourcery.com>
1372 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1373 * gjavah.c (print_field_info): Mark static data members of
1374 floating-point type with "__extension__".
1376 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1378 * gjavah.c (print_field_info): Mark static data members of
1379 floating-point type with "__extension__".
1381 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
1384 * parse.y (build_string_concatenation): Remove redundant if.
1385 (patch_conditional_expr): Attempt to patch_string() the condition
1386 of a ?: as well, in addition to its other operands.
1388 2005-01-25 Tom Tromey <tromey@redhat.com>
1390 * Make-lang.in (java/java-tree-inline.o): Removed.
1392 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
1395 * parse.y (patch_binop): Allow comparisons against NULL only
1396 if the other operand is of a reference type.
1398 2005-01-24 Tom Tromey <tromey@redhat.com>
1400 * java-tree.h (gcj_abi_version): Declare.
1401 * class.c (make_class_data): Push gcj_abi_version into "next"
1402 field. Renamed field.
1403 * decl.c (gcj_abi_version): New global.
1404 (parse_version): New function.
1405 (java_init_decl_processing): Call it. Renamed 'next' field.
1407 (GCJ_BINARYCOMPAT_ADDITION): New define.
1409 2005-01-24 Roger Sayle <roger@eyesopen.com>
1412 * jcf-write.c (generate_bytecode_insns): Conversions between
1413 integer types of the same precision shouldn't generate widening
1414 or narrowing conversion bytecodes.
1416 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
1418 * java-except.h, java-tree.h: Remove unused prototypes.
1420 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
1423 * jcf-write.c (perform_relocations): Don't call memcpy if source
1424 and destination are the same.
1426 2005-01-17 Tom Tromey <tromey@redhat.com>
1428 * verify-impl.c (get_short): Sign extend.
1429 (get_int): Likewise.
1431 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
1433 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
1436 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
1438 * verify.c: Revert to the version before the BC-ABI merge.
1440 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
1443 * check-init.c (check_init): Take care of references that do not
1444 have an explicit final variable declaration (e.g. array length
1445 access) for pre/post in/de-crement operators.
1447 2005-01-08 Mark Wielaard <mark@klomp.org>
1449 * parse.y (process_imports): Allocate (and free) original_name only
1450 when not already defined.
1451 * jcf-parse.c (read_class): Free results of find_class() and
1453 (java_parse_file): Keep pointer to head of file_list and free when
1454 done. Free result of lrealpath().
1456 2005-01-05 Tom Tromey <tromey@redhat.com>
1458 * gcj.texi (Standard Properties): java.ext.dirs is now used.
1460 2004-12-20 Andrew Haley <aph@redhat.com>
1462 * typeck.c: Use fold_convert for ints and booleans.
1464 2004-12-17 Andrew Haley <aph@redhat.com>
1467 * typeck.c (convert): Use a CONVERT_EXPR when converting to
1468 BOOLEAN_TYPE or CHAR_TYPE.
1469 (convert_to_boolean, convert_to_char) : Remove.
1470 * convert.h (convert_to_boolean, convert_to_char) : Remove.
1471 * expr.c (expand_load_internal): Do type conversion if type is not
1474 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
1477 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
1480 2004-12-07 Andrew Haley <aph@redhat.com>
1483 * jcf-parse.c (load_class): Remove sanity test for missing inner
1486 2004-12-06 Tom Tromey <tromey@redhat.com>
1488 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
1489 (java.uninstall): Likewise.
1490 (java.maintainer-clean): Likewise.
1491 (.INTERMEDIATE): Likewise.
1492 (java.install-man): Likewise.
1493 (gcj-dbtool.pod): New target.
1494 * gcj.texi (Code Generation): Document -findirect-dispatch.
1495 (libgcj Runtime Properties): Document
1496 gnu.gcj.precompiled.db.path.
1497 (Top): Link to "Invoking gcj-dbtool".
1499 2004-12-06 Tom Tromey <tromey@redhat.com>
1502 * java-tree.h (extract_field_decl): Declare.
1503 * parse.y (extract_field_decl): Renamed from
1504 strip_out_static_field_access_decl. No longer static.
1505 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
1507 2004-12-03 Tom Tromey <tromey@redhat.com>
1509 * lang.c (flag_new_verifier): Define.
1510 (java_post_options): Set flag_new_verifier if indirect dispatch
1512 * lang.opt (fnew-verifier): Removed.
1514 2004-12-03 Tom Tromey <tromey@redhat.com>
1517 * Make-lang.in (java.install-common): Only install transformed
1518 gcjh if gcj-cross exists.
1520 2004-12-03 Andrew Haley <aph@redhat.com>
1523 * except.c (link_handler): Patch 'outer' field of siblings of the
1524 range we're demoting.
1526 2004-12-03 Andrew Haley <aph@redhat.com>
1529 * class.c (layout_class_method): Don't fail to override a method
1530 simply because it has DECL_ARTIFICIAL set.
1532 2004-12-02 Tom Tromey <tromey@redhat.com>
1535 * parse.y (craft_constructor): Special case null_pointer_node.
1537 2004-12-02 Tom Tromey <tromey@redhat.com>
1540 * java-gimplify.c (java_gimplify_expr): Don't call
1541 SET_EXPR_LOCATION unless wrapped tree is an expression.
1543 2004-11-27 Per Bothner <per@bothner.com>
1545 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
1546 Fix fencepost error in 'i', which got executed one too many times.
1547 Also, fold memcpy into explicit loop, as originally intended.
1548 Also, free temporary 'buf' which otherwise leaks.
1550 2004-11-27 Per Bothner <per@bothner.com>
1552 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
1553 local static variables if not USE_MAPPED_LOCATION.
1555 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
1557 * class.c, decl.c, expr.c: Fix comment typos.
1559 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
1562 * decl.c (end_java_method): Call
1563 attach_init_test_initialization_flags on all the init_decls.
1564 * parse.y (attach_init_test_initialization_flags): Move to ...
1565 * expr.c (attach_init_test_initialization_flags): here and
1566 support BIND_EXPR also.
1567 * java-tree.h (attach_init_test_initialization_flags): Prototype.
1568 * jcf-parse.c (parse_class_file): Don't disable class init
1571 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1573 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
1576 2004-11-24 Richard Henderson <rth@redhat.com>
1578 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
1579 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
1581 2004-11-24 Tom Tromey <tromey@redhat.com>
1583 * verify.c (defer_merging): Don't use C++-style comment.
1584 * verify.h (java_opcode): Added java_opcode_end.
1585 * class.c (build_class_ref): Remove C++ comment and old FIXME.
1587 * verify-impl.c (vfy_push_type): Removed bogus "return".
1588 (initialize_stack): Use vfy_alloc and vfy_free.
1589 (verify_instructions_0): Likewise.
1591 * Merged gcj-abi-2-dev-branch to trunk.
1593 2004-11-24 Andrew Haley <aph@redhat.com>
1595 * jcf-parse.c (parse_class_file): Set file_start_location.
1597 2004-11-10 Tom Tromey <tromey@redhat.com>
1599 * class.c (make_field_value): Don't call build_static_field_ref.
1600 (build_static_field_ref): Don't emit direct references when using
1603 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
1604 -verbose:class into man page synopsis.
1606 2004-11-09 Tom Tromey <tromey@redhat.com>
1608 * expr.c (build_java_arraystore_check): Still generate check if
1609 element type is itself an array.
1611 2004-11-08 Tom Tromey <tromey@redhat.com>
1613 * java-tree.h (soft_check_assignment_node): Removed.
1614 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
1615 * decl.c (java_init_decl_processing): Don't initialize
1616 soft_check_assignment_node.
1618 2004-11-05 Tom Tromey <tromey@redhat.com>
1620 * class.c (layout_class_methods): Don't add Miranda methods when
1621 using indirect dispatch.
1623 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
1625 * class.c (make_class_data): Call emit_assertion_table to set the
1626 'assertion_table' field.
1627 (build_signature_for_libgcj): Move here from expr.c.
1628 (add_assertion_table_entry): New function. Callback for assertion
1629 hashtable traversal.
1630 (emit_assertion_table): New. Take class argument, and generate
1631 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
1632 * decl.c (init_decl_processing): Define assertion_entry_type record.
1633 Push 'assertion_table' class field instead of 'verify'.
1634 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
1635 (type_assertion_hash): Include 'assertion_code' in hash.
1636 (add_type_assertion): Rewritten. Take class and assertion_code
1637 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
1638 (can_widen_reference_to): Use new add_type_assertion() arguments.
1639 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
1640 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
1641 (verify_identifier_node): Removed.
1642 (assertion_entry_type, assertion_table_type): New.
1643 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
1644 assertion code definitions.
1645 (struct type_assertion): Add assertion_code. Rename 'source_type' and
1646 'target_type' to 'op1' and 'op2'.
1647 (add_type_assertion): Declare.
1648 (lang_printable_name_wls): Remove unused definition.
1649 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
1650 to emit runtime assertion.
1651 (vfy_note_stack_type): Clean up non-C90 declarations.
1652 (vfy_note_local_type): Likewise.
1653 * verify.h (vfy_is_assignable_from): Declare.
1654 * verify-impl.c (is_assignable_from_slow): Remove unused function.
1655 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
1656 instead of is_assignable_from_slow().
1657 (types_compatible): Reinstate ref_compatible() call.
1659 2004-11-04 Tom Tromey <tromey@redhat.com>
1661 * class.c (build_static_field_ref): Reverted previous patch.
1663 * class.c (build_static_field_ref): Don't emit direct references
1664 when using indirect dispatch.
1666 2004-11-03 Tom Tromey <tromey@redhat.com>
1668 * expr.c (expand_java_arrayload): Set lhs_type_node.
1669 (expand_java_arraystore): Set rhs_type_node.
1671 2004-11-02 Tom Tromey <tromey@redhat.com>
1673 * jcf-parse.c (compute_class_name): Use filename length from zip
1674 directory, not strlen.
1676 * expr.c (expand_invoke): Mark new interface methods as abstract.
1678 2004-11-01 Tom Tromey <tromey@redhat.com>
1680 * verify-impl.c (push_jump): Removed check for uninitialized
1682 (push_exception_jump): Likewise.
1683 (handle_ret_insn): Likewise.
1684 (handle_jsr_insn): Likewise.
1685 (state_check_no_uninitialized_objects): Removed.
1687 * decl.c (check_local_unnamed_variable): Recognize
1688 promoted-to-int parameters when using the new verifier.
1689 * expr.c (expand_java_arraystore): Explicitly request array type
1690 when using new verifier.
1691 (expand_java_arrayload): Likewise.
1692 (invoke_build_dtable): Don't pass object_type_node as
1693 expression argument to build_java_indirect_ref.
1694 (build_java_check_indexed_type): Do nothing.
1695 (build_java_arraystore_check): Handle case where array doesn't
1697 (build_java_array_length_access): Likewise.
1698 (expand_invoke): Handle case where interface overrides a method
1700 (pop_type_0): Always succeed for reference types.
1701 (process_jvm_instruction): Don't pop a value in a dead
1703 (pop_arguments): Convert arguments to correct types.
1705 2004-10-29 Andrew Haley <aph@redhat.com>
1707 * jcf-parse.c (give_name_to_class): Remove line that was
1710 2004-10-29 Andrew Haley <aph@redhat.com>
1712 * jcf-parse.c (set_source_filename): Add code to build new sfname.
1714 2004-10-20 Andrew Haley <aph@redhat.com>
1716 * decl.c (end_java_method): Don't expand if flag_syntax_only.
1718 2004-10-26 Tom Tromey <tromey@redhat.com>
1720 * verify.h (vfy_notify_verified): Removed.
1721 * verify-glue.c (vfy_notify_verified): Removed.
1723 2004-10-26 Tom Tromey <tromey@redhat.com>
1725 * verify-impl.c (debug_print_state): Declare `i' before code.
1726 (merge_types): Modify `t' when it is null_type.
1728 2004-10-26 Tom Tromey <tromey@redhat.com>
1730 * verify-impl.c (type_print): Renamed from print. Now static and
1732 (debug_print_state): Use type_print.
1734 2004-10-25 Tom Tromey <tromey@redhat.com>
1736 * expr.c (build_invokeinterface): Compute correct offset for
1737 index into interface methods.
1739 2004-10-20 Tom Tromey <tromey@redhat.com>
1741 * java-tree.h (verify_jvm_instructions_new): Declare.
1743 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
1746 * verify-impl.c (verify_instructions): Correctly handle wide
1748 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
1749 (vfy_get_component_type): Strip pointer types.
1750 (vfy_find_class): Use get_type_from_signature. Strip pointer
1752 Include java-except.h.
1754 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
1756 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
1757 vfy_push_type_t, set_variable, add_new_state, merge_into,
1758 handle_jsr_insn, branch_prepass, check_class_constant,
1759 check_wide_constant, get_one_type, compute_static_types,
1760 verify_instructions_0): Clean up C99 declarations after statements.
1762 2004-10-20 Tom Tromey <tromey@redhat.com>
1764 * verify-impl.c (merge_refs): Compare reference against iterator,
1767 * verify-glue.c (vfy_tag): Mask off resolved flag.
1769 2004-10-19 Tom Tromey <tromey@redhat.com>
1771 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
1772 (init_state_with_stack): Initialize `this_type' in state.
1773 (verify_method): Use debug_print.
1774 * verify-glue.c (vfy_is_primitive): Removed debugging print.
1775 (vfy_note_stack_depth): Reverted last patch.
1776 (vfy_note_stack_type): Note pointer to Object, not Object.
1777 (vfy_note_local_type): Likewise.
1779 * verify.h (vfy_note_instruction_seen): Declare.
1780 * verify-glue.c (verify_jvm_instructions_new): Set
1781 BCODE_EXCEPTION_TARGET on target instruction.
1782 (vfy_note_instruction_seen): New function.
1783 * verify-impl.c (FLAG_INSN_SEEN): New define.
1784 (verify_instructions_0): Set flag on instruction. Save state for
1786 (verify_instructions): Call vfy_note_instruction_seen.
1788 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
1789 (verify_jvm_instructions_new): Call method_init_exceptions,
1790 add_handler, and handle_nested_ranges.
1791 * verify-impl.c (verify_method): Return 1 on success.
1792 (verify_instructions_0): Save the state at PC=0.
1794 * verify-impl.c (init_type_from_class): Set is_resolved and
1795 ref_next on new ref_intersection.
1796 (init_type_from_string): Likewise.
1798 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
1800 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
1801 if flag_new_verifier is set.
1802 * java-tree.h (flag_new_verifier): Declare.
1803 * lang.opt (fnew-verifier): New option.
1804 * verify-impl.c: Work around namespace pollution by undef'ing
1806 (struct verifier_context): Make 'bytecode' const.
1807 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
1808 (types_compatible): For the BC-ABI, always consider reference types
1810 (check_class_constant): Use vfr->current_class.
1811 (check_constant): Likewise.
1812 (check_wide_constant): Likewise.
1813 (check_field_constant): Check for 'L' at start of type name.
1814 (get_one_type): Return pointer instead of type. Set type result in
1815 caller via passed type pointer.
1816 (compute_argument_types): Update to use new get_one_type arguments.
1817 (compute_return_type): Likewise.
1818 (make_verifier_context): New. Allocate and initialize 'vfr'.
1819 (free_verifier_context): New. Free 'vfr' and its contents.
1820 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
1821 and free_verifier_context.
1823 2004-10-15 Tom Tromey <tromey@redhat.com>
1825 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
1826 * verify.h (vfy_fail): Fixed formatting.
1828 * verify-impl.c (vfr): Fixed comment formatting.
1829 (collapse_type): New function.
1830 (verify_instructions): Notify compiler about type map.
1831 * verify.h (vfy_note_stack_depth): Updated.
1832 (vfy_note_stack_type): Likewise.
1833 (vfy_note_local_type): Likewise.
1834 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
1836 * verify-glue.c (vfy_note_stack_depth): Correctly size type
1837 state. Added `method' argument.
1838 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
1840 (vfy_note_local_type): New function.
1841 (vfy_unsuitable_type): Likewise.
1842 (vfy_return_address_type): Likewise.
1843 (vfy_null_type): Likewise.
1845 * verify.h (VFY_IN_GCC): Removed.
1846 (VFY_WANT_TYPEMAP): Removed.
1847 * verify-impl.c (verify_instructions_0): Removed useless "\".
1848 (struct state) <next>: Uncomment.
1850 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
1852 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
1855 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
1857 * Make-lang.in (verify.o): Re-enabled this target.
1858 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
1859 (vfy_get_interface): Likewise.
1860 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
1861 * verify.h (verify_jvm_instructions_new): Declare.
1862 * verify-impl.c (free_state): Temporarily comment out unused
1865 2004-10-06 Tom Tromey <tromey@redhat.com>
1867 * java-tree.h (JV_STATE_READ): New enum value.
1869 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
1871 * verify.h: New file.
1873 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
1875 * verify-impl.c, verify-glue.c, verify.h: New files.
1876 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
1878 2004-09-24 Andrew Haley <aph@redhat.com>
1880 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
1881 for a slot if it's of pointer type.
1883 2004-09-14 Tom Tromey <tromey@redhat.com>
1885 * class.c (make_class_data): Correctly initialize "state" field.
1886 Initialize "engine" field.
1887 * decl.c (java_init_decl_processing): Add "engine" field.
1889 2004-09-10 Andrew Haley <aph@redhat.com>
1892 * expr.c (build_invokeinterface): Use fast method for interface
1894 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
1895 JTI_ITABLE_PTR_TYPE.
1896 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
1897 (emit_symbol_table): Add new arg, element_size.
1898 * decl.c (java_init_decl_processing): Initialize Class.itable.
1899 * class.c (GEN_TABLE): New macro.
1900 (gen_indirect_dispatch_tables): Use it. Add itable.
1901 (make_class_data): Add new arg for emit_symbol_table().
1903 (add_miranda_methods): Make sure search_class has been parsed.
1904 (emit_symbol_table): Add new arg, element_size.
1906 2004-09-06 Andrew Haley <aph@redhat.com>
1908 * verify.c (merge_types): Return Object for all merges of
1910 * expr.c (add_type_assertion): Don't generate assertions when
1911 source type is array of Object.
1913 2004-09-03 Andrew Haley <aph@redhat.com>
1915 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
1917 * lang.c (java_post_options): Force flag_verify_invocations if
1918 we're not using indirect dispatch.
1920 * expr.c (pop_type_0): Move test for interfaces before call to
1921 can_widen_reference_to().
1922 (build_signature_for_libgcj): Remove generation of canonical array
1924 (add_type_assertion): Canonicalize both arrays.
1925 Don't assert that type X can be assigned to Object.
1926 Don't assert that type X an be assigned to type X.
1927 Don't assert that Object can be assigned to type X.
1928 (can_widen_reference_to): Warn whenever we generate an assertion.
1929 (process_jvm_instruction): Use throwable_type_node for the type of
1932 2004-09-01 Andrew Haley <aph@redhat.com>
1934 * decl.c (java_init_decl_processing): Change
1935 verify_identifier_node to "__verify".
1936 * expr.c (add_type_assertion): Use verify_identifier_node for name.
1937 * java-tree.h (verify_identifier_node): Change to "__verify".
1939 * expr.c (build_signature_for_libgcj): New function.
1940 (add_type_assertion): Use it to construct signatures for
1941 source_type and target_type.
1943 2004-08-27 Andrew Haley <aph@redhat.com>
1945 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
1946 (verify_identifier_node): New.
1947 (TYPE_VERIFY_METHOD): New.
1948 (struct type_assertion): New type.
1949 * expr.c (type_assertion_eq): New function.
1950 (type_assertion_hash): New function.
1951 (add_type_assertion): New function.
1952 (can_widen_reference_to): Call add_type_assertion().
1953 * decl.c (java_init_decl_processing): Add verify_identifier_node.
1954 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
1955 (finish_class): Output TYPE_VERIFY_METHOD (type).
1957 * decl.c (end_java_method): Nullify unused fields.
1959 2004-08-17 Andrew Haley <aph@redhat.com>
1961 * verify.c (defer_merging): Quieten.
1962 * jcf-parse.c (load_class): Only try to open a class file if it's
1963 java.lang.Object or if it's part of the current compilation.
1964 Check that the class we just tried to load is the class we just
1966 (java_parse_file): Set flag_verify_invocations off if we're
1967 compiling from .class.
1968 (parse_zip_file_entries): Abort if we try to read a dummy class.
1969 * expr.c (can_widen_reference_to): Quieten.
1970 (build_invokevirtual): Abort if we try to invokevirtual an
1972 (expand_invoke): Don't build a non-interface call to an interface.
1973 (build_instanceof): Don't do premature optimization if
1974 flag_verify_invocations is not set.
1975 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
1977 (build_static_field_ref): Add correct type conversion for
1979 (add_miranda_methods): Disable generation of Miranda methods for
1981 (layout_class_method): Don't complain about non-static method
1982 overrides static method with dummy classes.
1984 2004-08-13 Tom Tromey <tromey@redhat.com>
1986 * class.c (build_static_field_ref): Re-enable atable lookups for
1989 * parse.y (strip_out_static_field_access_decl): Indentation fix.
1991 2004-08-11 Tom Tromey <tromey@redhat.com>
1993 * gcj.texi (libgcj Runtime Properties): Document new properties.
1995 2004-08-06 Andrew Haley <aph@redhat.com>
1997 * jcf-parse.c (load_class): Check that we really have loaded the
1998 class we're looking for.
2000 2004-07-19 Andrew Haley <aph@redhat.com>
2002 * verify.c (verify_jvm_instructions): Comment change only.
2004 * typeck.c (build_java_array_type): Add size field to array name.
2006 * java-tree.h (LOCAL_SLOT_P): New.
2007 (update_aliases): Add PC argument.
2008 (pushdecl_function_level): New function.
2010 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
2011 MODIFY_EXPR, and SAVE_EXPR.
2012 (java_gimplify_modify_expr): New function.
2014 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
2015 (expand_iinc): Pass PC to update_aliases().
2016 (STORE_INTERNAL): Likewise.
2017 (process_jvm_instruction): Likewise.
2019 * decl.c (base_decl_map): New variable.
2020 (uniq): New variable.
2021 (update_aliases): Rewrite with more thorough checking.
2022 (debug_variable_p): New function.
2023 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
2024 (check_local_named_variable): Delete whole function.
2025 (initialize_local_variable): New function.
2026 (check_local_unnamed_variable): Add checks and comments.
2027 (find_local_variable): Rewrite.
2028 (java_replace_reference): New function.
2029 (function_binding_level): New variable.
2030 (pushdecl_function_level): New function.
2031 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
2032 (maybe_pushlevels): Call pushdecl() on each of the new decls.
2033 (start_java_method): Reset uniq. Create base_decl_map. Set
2034 function_binding_level.
2035 (end_java_method): Null unused fields to save memory.
2037 2004-06-29 Andrew Haley <aph@redhat.com>
2039 * except.c (expand_start_java_handler): Push a new binding level.
2040 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
2041 register_exception_range() to register where we'll do it.
2042 (expand_end_java_handler): Remove old bogus code. Replace with
2043 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
2044 the top of the expression we're curently building.
2045 (maybe_end_try): Delete.
2046 * decl.c (binding_level.exception_range): New field.
2047 (clear_binding_level): Add field exception_range. Reformat.
2048 (poplevel): Call expand_end_java_handler().
2049 (poplevel): Call java_add_stmt only if functionbody is false.
2050 (maybe_poplevels): Don't call maybe_end_try() from here.
2051 (end_java_method): Clear no longer used trees in function decl.
2052 (register_exception_range): New function.
2053 * java-tree.h (register_exception_range, struct eh_range): Declare.
2055 2004-06-22 Andrew Haley <aph@redhat.com>
2057 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
2059 * check-init.c (get_variable_decl): Teach check-init about
2060 FIELD_DECLs addressed via the otable.
2061 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
2064 2004-05-28 Andrew Haley <aph@redhat.com>
2066 * jcf-parse.c (load_class): Don't try to read a class that we've
2069 * expr.c (build_invokeinterface): Use the old-fashioned way of
2070 doing indirect dispatch: look up interfaces by name.
2071 * java-tree.h (enum java_tree_index): Add
2072 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
2073 * decl.c (java_init_decl_processing): Add
2074 soft_lookupinterfacemethodbyname_node.
2076 * gjavah.c (print_method_info): Final methods have vtable entries,
2077 so gjavah needs to output them.
2078 * class.c (layout_class_method): Generate vtable entries for final
2080 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
2081 dispatch, even if a method is final.
2083 2004-05-25 Andrew Haley <aph@redhat.com>
2085 * class.c (build_symbol_entry): Convert the names of constructors
2086 to init_identifier_node when generating an entry for the indirect
2089 * expr.c (build_known_method_ref): Generate indirect calls for
2090 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
2092 2004-05-24 Andrew Haley <aph@redhat.com>
2094 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
2095 atable element is of the right type.
2097 * class.c (build_static_field_ref): Cast pointer to correct type
2100 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
2102 * Merged with HEAD as of 20040514. Diff against
2103 gcj-abi-2-merge-20040514.
2105 2004-04-16 Andrew Haley <aph@redhat.com>
2107 * verify.c (check_pending_block): Disable subroutine checks.
2108 (defer_merging): New function.
2109 (merge_types): If types are dummy, use defer_merging to combine them.
2110 (verify_jvm_instructions): If invocation is invokeinterface and
2111 target is dummy, assume target really is an interface.
2113 * parse.y (patch_invoke): Break out call to java_create_object.
2115 * lang.c (flag_verify_invocations): New.
2117 * jcf-parse.c (load_class): If we've already failed to load a
2118 class, don't try again.
2119 (load_class): If we can't find a .class file, don't fail, but emit
2121 (parse_class_file): Don't act on dummy methods.
2123 * java-tree.h (flag_verify_invocations): New.
2125 (lang_type.dummy_class): New field.
2126 (java_create_object): New function.
2127 (METHOD_DUMMY): New.
2129 * expr.c (build_field_ref): Widen field offset.
2130 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
2131 that each of its elements is compatible with the one we're
2133 (pop_type_0): Issue a warning to say that we need to generate a
2135 (java_create_object): New function.
2136 (build_field_ref): Only generate hard refs if we're not using
2138 (expand_java_field_op): If we're using !verify_invocations and we
2139 see a missing field, generate a decl for it.
2141 (expand_invoke): If a class doesn't have the method we seek and
2142 we're using !flag_verify_invocations, generate a decl for the
2145 (build_known_method_ref): Always use indirect dispatch via the
2146 atable for static methods.
2148 (expand_java_NEW): Break out object creation into new function,
2151 (can_widen_reference_to): Issue a warning to say that we need to
2152 generate a runtime check.
2154 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
2155 (make_method_value): Also use index for interfaces.
2156 (make_class_data): Skip dummy field for inherited data.
2157 Don't build method array for dummy methods.
2158 Set size_in_byte to -1 when using inirect dispatch
2159 Don't build a hard class ref if we don't have a hard ref to our
2160 superclass, or if we're using inirect dispatch.
2161 Null out dispatch tables.
2163 (layout_class_method): Don't complain about non-static method
2164 overrides static method is method is artificial.
2166 (build_static_field_ref): Disable atable references to static
2167 fields for the time being.
2169 (layout_class_methods): Check for CLASS_INTERFACE as
2170 well as CLASS_ABSTRACT.
2172 2004-11-24 Steven Bosscher <stevenb@suse.de>
2174 * class.c (make_class_data): Don't check flag_inline_functions.
2175 * lang.c (flag_really_inline): Remove unused flag.
2176 (java_handle_option): Don't set it here. Remove special handling
2177 of flag_inline_functions for Java.
2178 (java_init): Don't set flag_inline_trees here. Already done...
2179 (java_post_options): ...here. Don't clear flag_inline_functions.
2181 2004-11-24 Steven Bosscher <stevenb@suse.de>
2183 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
2184 (java_gimplify_exit_block_expr): New function.
2185 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
2187 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
2188 (EXIT_BLOCK_EXPR): Likewise.
2189 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
2190 (LABELED_BLOCK_BODY): Likewise.
2191 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
2192 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
2193 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
2195 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
2196 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
2197 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
2198 second operand of EXIT_BLOCK_EXPR.
2199 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
2201 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
2203 2004-11-23 Ben Elliston <bje@au.ibm.com>
2205 * xref.h (xref_flag_value): Remove.
2206 (xref_set_data, xref_get_data): Likewise.
2207 (xref_set_current_fp): Likewise.
2208 (XREF_NONE): Likewise.
2209 (XREF_GET_DATA): Likewise.
2210 * xref.c (xref_flag_value): Remove.
2211 (xref_set_data, xref_get_data): Likewise.
2212 (xref_set_current_fp): Likewise.
2214 2004-11-23 Ben Elliston <bje@au.ibm.com>
2216 * gjavah.c (output_directory): Make static.
2217 (temp_directory): Likewise.
2219 2004-11-15 Tom Tromey <tromey@redhat.com>
2221 * decl.c (instn_ptr_type_node): Removed.
2222 (lineNumbers_ptr_type_node): Removed.
2223 (jint_type): Removed.
2224 (jint_ptr_type): Removed.
2226 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
2229 * check-init.c (check_init): Ignore DECL_EXPR.
2230 * expr.c (always_initialize_class_p): Reenable.
2231 (build_class_init): Use a variable to store the decl. Also use
2232 boolean_false_node instead of integer_zero_node.
2233 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
2236 2004-11-08 Tom Tromey <tromey@redhat.com>
2239 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
2240 generating a JNI header.
2241 (print_field_info): Handle JNI headers.
2242 (jni_print_float): Likewise.
2243 (jni_print_double): Likewise.
2245 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
2247 * decl.c (end_java_method): Remove duplicated code.
2249 2004-11-06 Zack Weinberg <zack@codesourcery.com>
2250 Gerald Pfeifer <gerald@pfeifer.com>
2252 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2255 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
2258 * class.c: Reinstate 2004-08-18 patch.
2259 (make_local_function_alias): Don't create an alias for extern (native)
2262 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
2265 * class.c (make_local_function_alias): Revert 2004-08-18 change.
2266 (make_method_value): Likewise.
2268 2004-10-21 Andrew Haley <aph@redhat.com>
2271 * jcf-parse.c (set_source_filename): Add code to build new sfname.
2273 2004-10-20 Andrew Haley <aph@redhat.com>
2275 * decl.c (end_java_method): Don't expand if flag_syntax_only.
2276 Remove duplicated code block.
2278 2004-10-18 Steven Bosscher <stevenb@suse.de>
2280 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
2281 New rules to work around old Bison warnings.
2283 2004-10-17 Steven Bosscher <stevenb@suse.de>
2285 * class.c (ident_subst): Always alloca buffer.
2286 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
2287 opcode after including javaop.def.
2288 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
2289 conditional expression that exits, to avoid warnings.
2290 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
2291 a user of an extension.
2292 * win32-host.c: Move check down to have non-empty file when
2293 WIN32 is not defined.
2295 * Make-lang.in (java-warn): Add STRICT_WARN.
2296 (java/jcf-io.o-warn): Don't have Werror for this file.
2297 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
2299 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
2301 * expr.c (expr_add_location): Move declaration to before all
2303 * parse.y (java_expand_classes): Ditto.
2304 * lex.c (java_peek_unicode): Ditto.
2306 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
2308 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
2309 if possible, else convert `foo' to 'foo'.
2310 * class.c: Likewise.
2313 * jcf-io.c: Likewise.
2314 * jcf-parse.c: Likewise.
2317 * parse.h: Likewise.
2319 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
2321 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
2322 rename parameter 'msg' to 'msgid' in function declaration.
2323 (issue_warning_error_from_context): Likewise.
2324 (yyerror): Rename parameter 'msg' to 'msgid'.
2325 (all over): Use new quoting style for diagnostics.
2327 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2329 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
2330 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
2333 2004-10-14 Matt Austern <austern@apple.com>
2335 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
2338 2004-10-13 Tom Tromey <tromey@redhat.com>
2341 * lang.opt (--extdirs): Document.
2342 * jvspec.c (lang_specific_driver): Recognize -encoding and
2345 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
2347 * parse.y (issue_warning_error_from_context): Use va_list *
2348 instead of va_list parameter.
2349 (parse_error_context): Update call.
2350 (parse_warning_context): Likewise.
2352 2004-10-05 Zack Weinberg <zack@codesourcery.com>
2354 * parse.y, parse-scan.y: Add list of diagnostic messages to
2355 insulate translation template from version of yacc/bison used
2356 to compile the grammar.
2358 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
2360 Prepare for %q, %< and %> in diagnostic message strings.
2361 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
2362 Name second parameter 'msgid'.
2363 * parse.y: Additionally include pretty-print.h and diagnostic.h.
2364 (issue_warning_error_from_context): Use pretty-printer functions
2365 instead of vsprintf for constructing formatted messages. Rename
2366 parameter 'msg' to 'msgid'.
2367 (parse_error_context): Rename parameter 'msg' to 'msgid'.
2368 (parse_warning_context): Likewise.
2370 2004-10-05 Andrew Haley <aph@redhat.com>
2373 * jcf-parse.c (parse_zip_file_entries): If a class has a
2374 superclass and a TYPE_SIZE of zero, lay it out.
2376 2004-09-30 Andrew Haley <aph@redhat.com>
2379 * jcf-parse.c (compute_class_name): Rewrite.
2381 2004-10-01 Jan Hubicka <jh@suse.cz>
2383 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
2385 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
2387 * lex.c: Fix a comment typo.
2389 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
2391 * java-tree.h: Fix a comment typo.
2393 2004-09-30 Per Bothner <per@bothner.com>
2395 Simplify lexer. Implement --enable-mapped-location support.
2396 * jcf-parse.c (parse_class_file): Use linemap_line_start.
2397 (parse_source_file_1): Pass filename as extra parameter, so we can call
2398 linemap_add and set input_location here, rather than in both callers.
2399 (read_class): Pass copied filename to parse_source_file_1.
2400 Don't initialize wfl_operator - only needed for source compilation.
2401 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
2402 * lex.h: Remove a bunch of debugging macros.
2403 * lex.h (struct_java_line, struct java_error): Remove types.
2404 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
2405 (struct java_lc_s): Remove prev_col field.
2406 (struct java_lexer): New fields next_unicode, next_columns, and
2407 avail_unicode. New position field, and maybe token_start field.
2408 Don't need hit_eof field - use next_unicode == -1 instead.
2409 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
2410 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
2411 * parse.h: Various changes for USE_MAPPED_LOCATION.
2412 (EXPR_WFL_EMIT_LINE_NOTE): XXX
2413 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
2414 (struct parser_ctxt): New file_start_location field.
2415 Remove p_line, c_line fields since we no longer save lines.
2416 Remove elc, lineno, and current_jcf fields - no longer used.
2417 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
2418 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
2419 source_location and is probably not needed anymore anyway.
2420 Use new expr_add_Location function.
2421 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
2422 (java_pop_parser_context): Minor cleanup.
2423 (java_parser_context_save_global, java_parser_context_restore_global,
2424 java_pop_parser_context): Save/restore input_location as a unit.
2425 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
2426 a source_location instead of a wfl context node.
2427 (check_class_interface_creation): input_filename is not addressable.
2428 (create_artificial_method): Calling java_parser_context_save_global
2429 and java_parser_context_restore_global is overkill. Instead,
2430 temporarily set input_location from class decl.
2431 (java_layout_seen_class_methods): Set input_location from method decl.
2432 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
2433 (finish_loop_body): Likewise.
2434 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
2435 (java_sprint_unicode): Take a character, not index in line.
2436 (java_sneak_uncode): Replaced by java_peek_unicode.
2437 (java_unget_unicode): No longer used.
2438 (java_allocate_new_line. java_store_unicode): Removed, since we
2439 no longer remember "lines".
2440 (java_new_lexer): Update for new data structures.
2441 (java_read_char): Move unget_value checking to java_read_unicode.
2442 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
2443 efficient functions that are used directly when lexing.
2444 (java_read_unicode_collapsing_terminators): No longer needed.
2445 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
2446 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
2447 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
2448 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
2449 combine switch branches, and test for common token kinds earlier.
2450 (java_lex_error): Rewrite.
2451 * jv-scan.c (expand_location): New function, copied from tree.c.
2452 (main): Set ctxp->filename instead of setting input_filename directly.
2454 2004-09-30 Per Bothner <per@bothner.com>
2456 More cleanup for --enable-mapped-location.
2457 * class.c (push_class): If USE_MAPPED_LOCATION don't set
2458 input_location here. Instead do it in give_name_to_class.
2459 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
2460 * expr.c (expand_byte_code): Call linemap_line_start.
2461 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
2462 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
2463 (expr_add_location): New function, if USE_MAPPED_LOCATION.
2464 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
2465 to USE_MAPPED_LOCATION case.
2467 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
2468 * jcf-parse.c (java_parse_file): Don't set input_filename.
2469 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
2470 Create a list of TRANSLATION_UNIT_DECL.
2471 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
2472 reason is so we can set a DECL_SOURCE_LOCATION for each file.
2473 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
2474 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
2475 (file_start_location): New static.
2476 (set_source_filename): Avoid extra access to input_filename macro.
2477 Concatenate new name with class's package prefix.
2478 (set_source_filename, give_name_to_class): Update.
2479 (give_name_to_class): Set class's "line 0" input_location here.
2480 (parse_class_file): Set input_location as a unit.
2482 * jcf-parse.c (load_class): Sanity test if missing inner class file.
2484 2004-09-29 Per Bothner <per@bothner.com>
2486 * java-tree.h: Redefine some macros and add some declaration
2487 to handle the USE_MAPPED_LOCATION case.
2488 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
2489 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
2490 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
2491 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
2493 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
2494 * decl.c (finish_method, java_add_stmt): Likewise.
2495 * java-gimplify.c (java-gimplify.c): Likewise.
2496 * jcf-write.c (generate_bytecode_insns): Likewise.
2497 * lang.c (java_post_options): Likewise - call linemap_add.
2499 2004-09-29 Andrew Haley <aph@redhat.com>
2502 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
2503 result of TRUNC_MOD_EXPR.
2504 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
2505 * decl.c (java_init_decl_processing): Mark
2506 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
2508 2004-09-28 Tom Tromey <tromey@redhat.com>
2511 * class.c (add_miranda_methods): Load superinterface if not
2514 2004-09-28 Andrew Haley <aph@redhat.com>
2517 * jcf-parse.c (load_class): Don't try to read a class that we've
2520 2004-09-28 Andrew Haley <aph@redhat.com>
2522 * jcf-parse.c (load_class): Back out previous broken patch.
2524 2004-09-28 Andrew Haley <aph@redhat.com>
2527 * jcf-parse.c (load_class): Don't try to read a class that we've
2529 Check that we really did read the right class.
2531 2004-09-25 Tom Tromey <tromey@redhat.com>
2534 * parse.y (create_artificial_method): Use add_method_1.
2536 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
2538 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
2540 * gcj.texi: Fix typos.
2542 2004-09-24 Tom Tromey <tromey@redhat.com>
2545 * parse.y (class_instance_creation_expression): Set `$$' to NULL
2546 in error parts of rule.
2547 (unary_expression): Don't call error_if_numeric_overflow when $1
2550 2004-09-24 Tom Tromey <tromey@redhat.com>
2553 * parse.y (resolve_qualified_expression_name): Set
2554 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
2555 * expr.c (force_evaluation_order): Check for empty argument list
2556 after stripping COMPOUND_EXPR.
2558 2004-09-23 Andrew Haley <aph@redhat.com>
2561 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
2564 2004-09-23 Tom Tromey <tromey@redhat.com>
2567 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
2568 where operand is null.
2570 2004-09-23 Tom Tromey <tromey@redhat.com>
2573 * parse.y (not_accessible_p): Allow access to protected members
2574 even when class is not static.
2576 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
2578 * Make-lang.in: Revert the gcc-none.o change.
2580 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
2582 * parse.y (patch_anonymous_class): VEC_space returns true if there
2585 2004-09-21 Matt Austern <austern@apple.com>
2588 * gjavah.c (free_method_name_list): Fix function definition so
2589 it's a proper C prototype.
2591 2004-09-21 Tom Tromey <tromey@redhat.com>
2594 * gjavah.c (free_method_name_list): New method.
2597 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2598 Zack Weinberg <zack@codesourcery.com>
2600 * java-tree.def: Use tree_code_class enumeration constants
2601 instead of code letters.
2602 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
2603 new tree-class enumeration constants.
2605 2004-09-13 Tom Tromey <tromey@redhat.com>
2608 * class.c (layout_class_method): Put synthetic methods into the
2611 2004-09-11 Andrew Pinski <apinski@apple.com>
2613 * Make-lang.in (java/ggc-none.c): Change dependency
2614 for ggc.h into $(GGC_H).
2616 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
2618 * Make-lang.in (java/win32-host.o): Add dependency on
2620 * win32-host.c: Add includes for coretypes.h, jcf.h
2622 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
2624 * Make-lang.in (GCJH_OBJS): Change dependency from
2625 ggc-none.o to java/ggc-none.o
2626 (JCFDUMP_OBJS): Likewise.
2627 (java/ggc-none.o): New target.
2629 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2631 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
2632 * class.c (build_utf8_ref, build_static_field_ref,
2633 make_field_value, make_method_value, get_dispatch_table,
2634 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
2635 * constants.c (get_tag_node, build_ref_from_constant_pool,
2636 build_constants_constructor): Likewise.
2637 * decl.c (java_init_decl_processing): Likewise.
2638 * expr.c (build_java_array_length_access, build_newarray,
2639 expand_java_multianewarray, expand_java_pushc, expand_iinc,
2640 build_java_binop, build_field_ref, expand_java_add_case,
2641 expand_java_call, build_known_method_ref, build_invokevirtual,
2642 build_invokeinterface, build_jni_stub): Likewise.
2643 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2644 * jcf-parse.c (get_constant): Likewise.
2645 * lex.c (do_java_lex): Likewise.
2646 * parse.y (patch_binop, patch_unaryop, patch_cast,
2647 build_newarray_node, patch_newarray): Likewise.
2648 * resource.c (compile_resource_data): Likewise.
2649 * typeck.c (build_prim_array_type): Likewise.
2651 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2653 * decl.c (java_init_decl_processing): Adjust
2654 initialize_sizetypes call.
2656 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
2658 * jv-scan.c (fancy_abort): Add.
2660 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
2662 * expr.c (build_java_arrayaccess): Use convert to change
2665 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
2667 * class.c (make_local_function_alias): Allocate extra space for 'L'
2668 in name buffer. Reported by Thomas Neumann.
2670 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
2672 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
2673 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
2674 * lex.c (do_java_lex): Adjust.
2675 (error_if_numeric_overflow): Likewise.
2677 2004-08-18 Andrew Pinski <apinski@apple.com>
2679 * class.c (make_local_function_alias): Only make a new decl if we
2680 support alias attribute on all decls.
2682 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
2684 * class.c (make_local_function_alias): New function. Create local
2685 alias for public method DECL.
2686 (make_method_value): Use make_local_function_alias.
2687 * parse.y (craft_constructor): Don't special-case anonymous classes.
2688 Always set ctor_name to init_identifier_node.
2689 (lookup_method_invoke): Call layout_class_method when creating
2690 anonymous class constructor.
2692 2004-08-18 Richard Henderson <rth@redhat.com>
2694 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
2695 default case. Treat '<' similarly. Update for
2696 is_gimple_formal_tmp_var name change.
2698 2004-08-17 Andrew Haley <aph@redhat.com>
2700 * lang.c (lang_printable_name): Obey verbose flag.
2701 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
2702 lang_printable_name().
2703 (verify_constructor_circularity, get_printable_method_name,
2704 check_abstract_method_definitions, java_check_regular_methods,
2705 java_check_abstract_methods, check_inner_class_access,
2706 fix_constructors, patch_method_invocation, patch_return):
2708 * expr.c (pop_type_0): Likewise.
2710 * java-tree.h (lang_printable_name_wls): Delete.
2712 2004-08-16 Tom Tromey <tromey@redhat.com>
2715 * parse.y (primary): Changed for initialized and uninitialized
2717 (array_access): Handle array_creation_initialized.
2718 (array_creation_expression): Split into
2719 array_creation_initialized and array_creation_uninitialized.
2721 2004-08-16 Andrew Haley <aph@redhat.com>
2723 * jcf-write.c (find_constant_index): Canonicalize NaNs when
2724 generating bytecode.
2726 2004-08-16 Elliot Lee <sopwith@redhat.com>
2729 * jcf-parse.c (java_parse_file): Handle filenames with embedded
2730 spaces, and quoted filelists.
2732 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2734 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
2735 * class.c (build_utf8_ref, build_static_field_ref,
2736 make_field_value, make_method_value, get_dispatch_table,
2737 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
2738 * constants.c (get_tag_node, build_ref_from_constant_pool,
2739 build_constants_constructor): Likewise.
2740 * decl.c (java_init_decl_processing): Likewise.
2741 * expr.c (build_java_array_length_access, build_newarray,
2742 expand_java_multianewarray, expand_java_pushc, expand_iinc,
2743 build_java_binop, build_field_ref, expand_java_add_case,
2744 expand_java_call, build_known_method_ref, build_invokevirtual,
2745 build_invokeinterface, build_jni_stub): Likewise.
2746 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2747 * jcf-parse.c (get_constant): Likewise.
2748 * lex.c (do_java_lex): Likewise.
2749 * parse.y (patch_binop, patch_unaryop, patch_cast,
2750 build_null_of_type, patch_newarray): Likewise.
2751 * resource.c (compile_resource_data): Likewise.
2752 * typeck.c (build_prim_array_type): Likewise.
2754 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
2756 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
2757 Don't create BLOCK here or call java_gimplify_block.
2759 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
2761 * java-tree.h (flag_deprecated): Removed.
2762 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
2763 * parse.y (check_deprecation): Check warn_deprecated instead of
2766 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
2768 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
2769 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
2770 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
2771 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
2772 flag_force_classes_archive_check, flag_optimize_sci,
2773 flag_indirect_dispatch): Remove explicit declarations.
2774 * lang.opt: Add implicit declare/define/assign. Remove obsolete
2777 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
2780 * Make-lang.in (java.install-man): Install from either build
2781 tree or source tree, whichever has the file first.
2783 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
2785 * jcf-parse.c (get_constant): Adjust force_fit_type call.
2786 * lex.h (SET_LVAL_NODE_TYPE): Remove.
2787 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
2788 (do_java_lex): Likewise. Adjust force_fit_type call.
2790 2004-08-04 Roger Sayle <roger@eyesopen.com>
2791 Andrew Haley <aph@redhat.com>
2793 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
2794 checking trees as they're being built.
2795 (convert): Call convert_ieee_real_to_integer if we're
2796 converting a constant, even if we're writing a class file.
2798 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
2801 * parse.y (fold_constant_for_init): Call resolve_field_access with
2802 correct current_class context.
2804 2004-08-01 Roger Sayle <roger@eyesopen.com>
2806 * decl.c (update_aliases, initialize_local_variable): Replace calls
2807 to build with calls to buildN.
2808 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
2809 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
2810 * parse.h (BUILD_THROW): Likewise.
2811 * parse.y (switch_expression, synchronized_statement,
2812 catch_clause_parameter, array_creation_expression,
2813 conditional_expression, make_qualified_name,
2814 resolve_qualified_expression_name, patch_method_invocation,
2815 patch_invoke, build_method_invocation, build_new_invocation,
2816 build_assignment, patch_assignment, build_binop, patch_binop,
2817 build_string_concatenation, build_incdec, patch_unaryop,
2818 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
2819 patch_return, build_if_else_statement, build_labeled_block,
2820 build_new_loop, build_loop_body, build_bc_statement,
2821 build_assertion, encapsulate_with_try_catch, build_try_statement,
2822 build_try_finally_statement, patch_synchronized_statement,
2823 emit_test_initialization): Likewise, replace build with buildN.
2825 2004-07-28 Eric Christopher <echristo@redhat.com>
2827 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2828 (java_unsafe_for_reeval): Ditto.
2830 2004-07-26 <hp@bitrange.com>
2832 * parse.y (build_super_invocation): Adjust declaration order to
2833 avoid declaration after statement.
2835 2004-07-25 Bernardo Innocenti <bernie@develer.com>
2837 * decl.c: Rename all identifiers named `class' to `cl'.
2839 2004-07-25 Richard Henderson <rth@redhat.com>
2841 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
2843 2004-07-23 Mike Stump <mrs@apple.com>
2845 * boehm.c (set_bit): Improve type safety wrt unsignedness.
2846 * gjavah.c (throwable_p, decode_signature_piece,
2847 print_full_cxx_name, print_include, add_namelet, add_class_decl,
2848 process_file): Likewise.
2849 * jcf-dump.c (main): Likewise.
2850 * jcf-io.c (read_zip_member): Likewise.
2851 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
2852 give_name_to_class, get_class_constant): Likewise.
2853 * jcf-write.c (find_constant_wide, push_long_const,
2854 generate_classfile): Likewise.
2855 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
2856 * parse.y (read_import_dir): Likewise.
2857 * typeck.c (parse_signature_type): Likewise.
2858 * verify.c (verify_jvm_instructions): Likewise.
2859 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
2861 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
2863 * Make-lang.in: Replace rmic and rmiregistry references with
2864 grmic and grmiregistry.
2865 * gcj.texi: Likewise.
2867 2004-07-20 Andrew Haley <aph@redhat.com>
2870 * verify.c (verify_jvm_instructions): Comment change only.
2872 * typeck.c (build_java_array_type): Add size field to array name.
2874 * java-tree.h (LOCAL_SLOT_P): New.
2875 (update_aliases): Add PC argument.
2876 (pushdecl_function_level): New function.
2878 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
2879 MODIFY_EXPR, and SAVE_EXPR.
2880 (java_gimplify_modify_expr): New function.
2882 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
2883 (expand_iinc): Pass PC to update_aliases().
2884 (STORE_INTERNAL): Likewise.
2885 (process_jvm_instruction): Likewise.
2887 * decl.c (base_decl_map): New variable.
2888 (uniq): New variable.
2889 (update_aliases): Rewrite with more thorough checking.
2890 (debug_variable_p): New function.
2891 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
2892 (check_local_named_variable): Delete whole function.
2893 (initialize_local_variable): New function.
2894 (check_local_unnamed_variable): Add checks and comments.
2895 (find_local_variable): Rewrite.
2896 (java_replace_reference): New function.
2897 (function_binding_level): New variable.
2898 (pushdecl_function_level): New function.
2899 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
2900 (maybe_pushlevels): Call pushdecl() on each of the new decls.
2901 (start_java_method): Reset uniq. Create base_decl_map. Set
2902 function_binding_level.
2903 (end_java_method): Null unused fields to save memory.
2905 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2907 * class.c (add_interface_do): Remove.
2908 (set_super_info, interface_of_p, maybe_add_interface,
2909 add_interface, make_class_data, layout_class,
2910 add_miranda_methods): Adjust BINFO accessors and addition.
2911 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
2913 * jcf-write.c (generate_classfile): Likewise.
2914 * parse.y (patch_anonymous_class, check_inner_circular_reference,
2915 check_circular_reference, java_complete_class,
2916 check_abstract_method_definitions,
2917 java_check_abstract_method_definitions,
2918 check_interface_throws_clauses, java_check_abstract_methods,
2919 lookup_java_interface_method2,
2920 find_applicable_accessible_methods_list): Adjust BINFO accessors
2922 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
2924 2004-07-18 Roger Sayle <roger@eyesopen.com>
2926 * builtins.c (max_builtin, min_builtin,
2927 java_build_function_call_expr): Replace calls to build with buildN.
2928 * class.c (build_class_ref, build_static_field_ref,
2929 get_dispatch_table, make_class_data, layout_class_method): Likewise.
2930 * constants.c (build_ref_from_constant_pool): Likewise.
2931 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
2932 add_stmt_to_compound): Likewise.
2933 * except.c (build_exception_object_ref, expand_end_java_handler):
2935 * java-gimplify.c (java_gimplify_case_expr,
2936 java_gimplify_default_expr, java_gimplify_block,
2937 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
2938 * jcf-write.c (generate_bytecode_insns): Likewise.
2939 * typeck.c (convert_ieee_real_to_integer): Likewise.
2941 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2943 * java-tree.h (builtin_function): Declare.
2945 2004-07-16 Steven Bosscher <stevenb@suse.de>
2947 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
2948 abuse restore_line_number_status.
2950 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
2953 * jcf-parse.c (java_emit_static_constructor): Specify default
2956 2004-07-13 Per Bothner <per@bothner.com>
2958 * java-tree.h (all_class_filename): Remove useless macro.
2959 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
2960 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
2961 * parse.y (java_parser_context_restore_global): Replace
2962 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
2963 * jcf-parse.c (read_class, java_parse_file): Likewise.
2965 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
2968 gjavah.c (print_field_info): Emit constant only if field is static.
2970 2004-07-11 Roger Sayle <roger@eyesopen.com>
2972 * expr.c (java_truthvalue_conversion, flush_quick_stack,
2973 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
2974 build_java_ret, build_java_throw_out_of_bounds_exception,
2975 build_java_array_length_access, java_check_reference,
2976 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
2977 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
2978 expand_java_arrayload, build_java_monitor, expand_java_return,
2979 expand_load_internal, expand_java_NEW, build_get_class,
2980 build_instanceof, expand_java_CHECKCAST, expand_iinc,
2981 build_java_soft_divmod, build_java_binop, build_field_ref,
2982 expand_compare, expand_java_goto, expand_java_switch,
2983 expand_java_add_case, build_class_init, build_known_method_ref,
2984 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
2985 expand_invoke, build_jni_stub, expand_java_field_op,
2986 java_expand_expr, expand_byte_code, STORE_INTERNAL,
2987 force_evaluation_order, emit_init_test_initialization): Convert
2988 calls to "build" into calls to the prefered "buildN" functions.
2990 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2992 * java-tree.h (set_block): Remove.
2993 * lang.c (java_clear_binding_stack): New.
2994 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2995 * decl.c (struct binding_level): Remove this_block.
2996 (clear_binding_level): Likewise.
2997 (poplevel): Don't handle this_block.
2998 (set_block): Remove.
3000 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
3002 * class.c (common_enclosing_context_p): Remove statement with no
3005 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
3008 * parse.y (create_anonymous_class): Remove 'location' argument. Use
3009 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
3010 (craft_constructor): Inherit access flags for implicit constructor
3011 from the enclosing class.
3012 (create_class): Fix comment typo.
3013 (resolve_qualified_expression_name): Pass type of qualifier to
3014 not_accessible_p, not the type in which target field was found.
3015 (not_accessible_p): Handle inner classes. Expand protected
3016 qualifier-subtype check to enclosing instances, but don't apply this
3017 check to static members. Allow protected access to inner classes
3018 of a subtype. Allow private access within common enclosing context.
3019 (build_super_invocation): Get WFL line number info from current
3021 (build_incomplete_class_ref): Update for new create_anonymous_class
3023 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
3024 common_enclosing_instance_p.
3025 * class.c (common_enclosing_context_p): New. Determine if types
3026 share a common enclosing context, even across static contexts.
3027 (common_enclosing_instance_p): Renamed from
3028 common_enclosing_context_p. Determines if types share a common
3029 non-static enclosing instance.
3030 * java-tree.h (common_enclosing_instance_p): Declare.
3031 * jcf-write.c (get_method_access_flags): New. Surpress private flag
3032 for inner class constructors.
3033 (generate_classfile): Use get_method_access_flags.
3035 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
3037 * class.c (interface_of_p): Check for null TYPE_BINFO.
3039 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
3041 * class.c (make_class): Do not create binfo here.
3042 (set_super_info): Create it here.
3043 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
3045 2004-07-08 Richard Henderson <rth@redhat.com>
3047 * expr.c (case_identity, get_primitive_array_vtable,
3048 java_expand_expr, emit_init_test_initialization): Remove.
3049 * java-tree.h (java_expand_expr): Remove.
3050 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
3052 2004-07-07 Per Bothner <per@bothner.com>
3054 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
3055 get internal error due to mismatched types.
3057 * gcj.texi (Invoking gij): Document new -verbose:class flag.
3059 * gcj.texi (Linking): New node. Document -lgij usage.
3061 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
3063 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
3064 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
3065 * java/class.c (set_super_info, class_depth, interface_of_p,
3066 maybe_add_interface, add_interface, make_class_data,
3067 layout_class, add_miranda_methods): Adjust BINFO macros.
3068 * expr.c (can_widen_reference_to, lookup_field): Likewise.
3069 * jcf-write.c (generate_classfile): Likewise.
3070 * parse.y (patch_anonymous_class,
3071 check_inner_circular_reference, check_circular_reference,
3072 java_complete_class, check_abstract_method_definitions,
3073 java_check_abstract_method_definitions,
3074 check_interface_throws_clauses, java_check_abstract_methods,
3075 lookup_java_interface_method2,
3076 find_applicable_accessible_methods_list): Likewise.
3077 * typeck.c (find_method_in_interface): Likewise.
3078 * verify.c (merge_types): Likewise.
3080 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
3082 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
3083 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
3085 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
3087 * class.c (make_class): Use make_tree_binfo.
3088 (set_super_info, add_interface_do): Likewise.
3089 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
3091 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
3093 * verify.c: Correct array element access formatting thinko.
3095 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
3097 * verify.c: Insert a short blurb at the start referring to the JVMS.
3098 (merge_type_state): Remove redundant nested if statement.
3099 (verify_jvm_instructions): Ensure current_subr is initialised to
3101 Minor formatting fixes all over the place.
3103 2004-07-02 Richard Henderson <rth@redhat.com>
3105 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
3107 2004-07-01 Richard Henderson <rth@redhat.com>
3109 * class.c (registerClass_libfunc): Remove.
3110 (init_class_processing): Don't set it.
3111 (emit_register_classes): Take list_p parameter. Fill it in
3112 with _Jv_RegisterClass calls.
3113 * decl.c (java_init_decl_processing): Don't call
3114 init_resource_processing.
3115 * jcf-parse.c (java_emit_static_constructor): New.
3116 (java_parse_file): Call it.
3117 * resource.c (registerResource_libfunc): Remove.
3118 (init_resource_processing): Remove.
3119 (write_resource_constructor): Take list_p parameter. Fill it in
3120 with _Jv_RegisterResource calls.
3121 * java-tree.h: Update prototypes.
3123 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
3126 * class.c (layout_class_method): Do not override package-private
3127 method if its in a different package.
3128 (split_qualified_name): Move here from parse.y. Rename from
3129 breakdown_qualified. Add comment.
3130 (in_same_package): Move here from parse.y. Add comment.
3131 * java-tree.h (break_down_qualified, in_same_package): Declare.
3132 (in_same_package): Likewise.
3133 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
3136 2004-06-29 Andrew Haley <aph@redhat.com>
3138 * except.c (expand_start_java_handler): Push a new binding level.
3139 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
3140 register_exception_range() to register where we'll do it.
3141 (expand_end_java_handler): Remove old bogus code. Replace with
3142 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3143 the top of the expression we're curently building.
3144 (maybe_end_try): Delete.
3145 * decl.c (binding_level.exception_range): New field.
3146 (clear_binding_level): Add field exception_range. Reformat.
3147 (poplevel): Call expand_end_java_handler().
3148 (poplevel): Call java_add_stmt only if functionbody is false.
3149 (maybe_poplevels): Don't call maybe_end_try() from here.
3150 (end_java_method): Clear no longer used trees in function decl.
3151 (register_exception_range): New function.
3152 * java-tree.h (register_exception_range, struct eh_range): Declare.
3154 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
3156 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
3158 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
3161 * expr.c (class_has_finalize_method): Fix method name indentation.
3162 (expand_java_call): Remove K&R style parameter declaration.
3163 (expand_invoke): Fix statement indentation.
3164 (expand_java_field_op): Likewise.
3165 * parse-scan.y: Fix typo.
3166 (reset_report): Fix method name indentation.
3167 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
3169 * verify.c (verify_jvm_instructions): Document parameters, insert
3171 * lang.c (lang_init_source): Fix method name indentation.
3172 * class.c (common_enclosing_context_p): Likewise.
3173 (emit_symbol_table): Fix parameter list indentation.
3174 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
3175 parameter declaration.
3176 * constants.c: Fix copyright notice indentation.
3177 * typeck.c (find_method_in_superclasses): Fix parameter list
3179 (find_method_in_interfaces): Likewise.
3180 * zextract.c (makelong): Fix method name indentation.
3182 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
3185 * parse.y (create_interface): Set correct access modifiers for
3187 * jcf-write.c (get_classfile_modifiers): New function.
3188 (generate_classfile): Use get_classfile_modifiers, not
3191 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
3193 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
3194 dependency to current parser context, not NULL_TREE, for top-level
3196 (jdep_resolve_class): Enable member access check for all inner
3199 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
3201 * parse.y (qualify_and_find): Pass type decl, not identifier, to
3204 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
3207 * expr.c (expand_java_field_op): Ensure that target class for static
3208 field access has been loaded.
3210 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
3211 Ranjit Mathew <rmathew@hotmail.com>
3213 PR java/1207, java/16178
3214 * jcf-parse.c (load_class): Return immediately if passed a type decl
3215 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
3216 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
3217 before calling load_class.
3218 (qualify_and_find): Likewise.
3219 (find_in_imports_on_demand): Likewise.
3220 (find_applicable_accessible_methods_list): Likewise.
3222 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
3224 * parse.y (java_layout_seen_class_methods): Don't call load_class
3225 on class defined by source parser.
3227 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
3229 * parse.y (set_nested_class_simple_name_value): Removed.
3230 (java_complete_expand_class): Remove calls to
3231 set_nested_class_simple_name_value.
3233 2004-06-22 Andrew Haley <aph@redhat.com>
3234 Ranjit Mathew <rmathew@hotmail.com>
3236 Fixes PR java/16113.
3237 * decl.c (force_poplevels): Remove call to expand_end_bindings.
3239 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
3241 * parse.y (create_class): Correct diagnostic message about
3242 java.lang.Object extending anything else.
3244 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3246 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
3247 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
3248 * constants.c (build_ref_from_constant_pool): Likewise.
3249 * expr.c (build_java_array_length_access): Likewise.
3250 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
3251 (invoke_build_dtable, build_invokevirtual): Likewise.
3252 (build_invokeinterface, java_expand_expr): Likewise.
3253 (emit_init_test_initialization): Likewise.
3254 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3255 * parse.y (make_qualifed_name, build_array_ref): Likewise.
3257 2004-06-21 Andrew Haley <aph@redhat.com>
3259 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
3262 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
3264 * jcf.h (struct JCF): Change java_source, right_zip and finished
3266 * lex.h (struct java_lexer): Change hit_eof, read_anything,
3267 byte_swap and use_fallback to unsigned int.
3268 * parse.h (struct _jdep): Change flag0 to unsigned int.
3270 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
3273 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
3274 before trying to lay out its methods.
3275 * jcf-parse.c (read_class): Track parsed files using canonical paths
3276 obtained via lrealpath from libiberty.
3277 (java_parse_file): Likewise.
3278 (parse_source_file_1): Rename formal parameter to reflect its
3279 modified purpose. Minor formatting fix.
3281 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
3283 * class.c (emit_register_classes): Make the function uninlinable,
3284 do not set current_function_cannot_inline.
3285 * resource.c (write_resource_constructor): Do not reset
3286 flag_inline_functions around rest_of_compilation.
3288 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
3291 * expr.c (java_truthvalue_conversion): Handle
3292 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
3293 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
3294 i.e. return the expression.
3296 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
3298 * gjavah.c: Include version.h
3300 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
3302 * jcf-write.c (generate_bytecode_conditional): Correct handling
3303 of unordered conditionals. Add comment.
3305 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
3306 Per Bothner <per@bothner.com>
3308 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
3309 local variable was initialised upon declaration.
3310 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
3311 variable was final and initialised upon declaration.
3312 * check-init.c (check_final_reassigned): Give error only if a blank
3313 final is not definitely unassigned or if an initialised final is
3315 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
3316 assignment expressions. Remove case MODIFY_EXPR, label do_default.
3317 (check_init): Perform initialised-variable-removing-optimisation
3318 only on non-final local variables.
3320 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
3322 * jcf-write.c (generate_bytecode_conditional): Handle binops
3323 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
3325 (generate_bytecode_insns): Likewise.
3327 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
3329 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
3330 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
3332 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
3334 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
3335 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
3337 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
3339 * decl.c (struct binding_level): Add GTY marker. Compile
3340 binding_depth unconditionally.
3341 (current_binding_level, free_binding_level, global_binding_level):
3343 (clear_binding_level): Unconditionally set binding_depth.
3344 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
3346 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
3348 * lex.c (java_new_lexer): Set 'encoding'.
3349 (java_read_char): Improve error message for unrecognized characters.
3350 * lex.h (struct java_lexer): New field 'encoding'.
3352 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
3354 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
3356 2004-05-21 Mark Wielaard <mark@klomp.org>
3358 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
3361 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
3363 * typeck.c: Remove non-printable character 160.
3365 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
3367 * check-init.c: Correct minor typos.
3369 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3371 * Make-lang.in, expr.c, java-gimplify.c: Rename
3372 tree-simple.[ch] to tree-gimple.[ch].
3374 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
3376 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
3378 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3380 Merge from tree-ssa-20020619-branch. See
3381 ChangeLog.tree-ssa for details.
3383 * Make-lang.in, builtins.c, check-init.c, class.c,
3384 constants.c, decl.c, except.c, expr.c, java-except.h,
3385 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
3386 lang.c, lang.opt, parse.y, resource.c: Merged.
3387 * java-gimplify.c: New file.
3389 2004-05-10 Andrew Haley <aph@redhat.com>
3391 * parse.y (create_class): Set TYPE_VFIELD.
3392 * decl.c (java_init_decl_processing): Likewise.
3394 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
3395 * class.c (make_method_value): Replace DECL_VINDEX with call to
3397 (get_dispatch_vector): Likewise.
3398 (layout_class_method): Likewise.
3399 Replace set of DECL_VINDEX with call to set_method_index().
3400 (set_method_index): New function.
3401 (get_method_index): New function.
3402 * java-tree.h (set_method_index): New function decl.
3403 (get_method_index): New function decl.
3405 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
3407 * parse.y (check_pkg_class_access): Add new argument
3408 and use it when cl is NULL to call lookup_cl on it.
3409 (parser_check_super_interface): Do not call lookup_cl.
3410 Pass this_decl to check_pkg_class_access and NULL
3411 instead of lookup_cl.
3412 (parser_check_super): Update for change in
3413 check_pkg_class_access.
3414 (do_resolve_class): Likewise.
3415 (process_imports): Likewise.
3416 (find_in_imports_on_demand): Likewise.
3417 (resolve_qualified_expression_name): Likewise.
3419 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
3421 Fixes PR java/9685, PR java/15073
3422 * parse.y (accessibility_string): New method.
3423 (not_accessible_field_error): Use accessibility_string()
3424 instead of java_accstring_lookup().
3425 (resolve_qualified_expression_name): Check with
3426 check_pkg_class_access() before allowing access using
3429 Use check_pkg_class_access() instead of not_accessible_p()
3430 for unqualified types.
3431 (not_accessible_p): Use DECL_CONTEXT (member) instead of
3432 REFERENCE for package-private access checking.
3433 (patch_method_invocation): Use accessibility_string() instead
3434 of java_accstring_lookup().
3436 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
3439 * gjavah.c (struct method_name): Add member is_native.
3440 (overloaded_jni_method_exists_p): Match candidate method only if
3442 (print_method_info): Initialise is_native flag from the method's
3445 2004-04-30 Roger Sayle <roger@eyesopen.com>
3447 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
3448 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
3450 2004-04-22 Roger Sayle <roger@eyesopen.com>
3452 * resource.c (write_resource_constructor): Guard call to possibly
3453 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
3455 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
3457 * class.c (make_class_data): Add new field aux_info.
3458 * decl.c (java_init_decl_processing): Push type and decl for
3461 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
3463 * expr.c (expand_java_NEW): Don't use size argument for
3464 _Jv_AllocObject calls.
3465 * parse.y (patch_invoke): Likewise.
3467 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
3469 * expr.c (build_invokeinterface): Remove unused variables to
3472 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
3474 * class.c (get_interface_method_index): New function. Return dispatch
3475 index for interface method.
3476 (make_method_value): For interface methods, set index field to
3477 iface dispatch index, not DECL_VINDEX.
3478 * expr.c (build_invokeinterface): Use get_interface_method_index.
3480 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3482 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
3484 2004-03-31 Andrew Haley <aph@redhat.com>
3487 * jcf-io.c (opendir_in_zip): Tidy up error handling.
3489 2004-03-30 Zack Weinberg <zack@codesourcery.com>
3491 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
3492 form of GTY markers.
3494 2004-03-25 Marcus Meissner <meissner@suse.de>
3497 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
3499 2004-03-23 Tom Tromey <tromey@redhat.com>
3502 * jcf-write.c (make_class_file_name): Don't report if mkdir
3505 2004-03-23 Tom Tromey <tromey@redhat.com>
3507 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
3509 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
3511 * class.c, gjavah.c, lang.c: Fix comment typos.
3512 * gcj.texi: Fix typos.
3514 2004-03-19 Per Bothner <per@bothner.com>
3516 * gcj.texi (Code Generation): Document new flags and assert defaults.
3518 * class.c (assume_compiled_node_struct): Rename type to
3519 class_flag_node_struct, as it is now also used for enable_assertions.
3520 Rename assume_compiled_node typedef. Rename excludep field to value.
3521 (find_assume_compiled_node): Rename function to find_class_flag_node.
3522 Minor optimization - avoid needless strlen.
3523 (add_assume_compiled): Some tweaking and optimization.
3524 Rename and generalize to add_class_flag takem an extra parameter.
3525 (add_assume_compled): New just calls add_class_flag.
3526 (add_enable_assert, enable_assertions): New functions.
3527 (enable_assert_tree): New static.
3528 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
3529 * lang.opt (fenable-assertions, fenable-assertions=,
3530 fdisable-assertions, fdisable-assertions=): New options.
3531 * lang.c (java_handle_option): Handle new options.
3532 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
3533 class in an interface - create helper class nested in outer interface.
3534 (build_assertion): Short-circuit if enable_assertions is false.
3536 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3538 * java-tree.h: Changes throughout to add checking to macros
3539 and numerous whitespace changes.
3540 (VAR_OR_FIELD_CHECK): New macro.
3541 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
3542 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
3544 2004-03-16 Per Bothner <per@bothner.com>
3546 * jcf-jump.c (options): New --print-constants option.
3547 * gcj.texi (Invoking jcf-dump): Document --print-constants.
3549 * jcf-dump.c (flag_print_constant_pool): Default to off.
3550 (print_constant_terse_with_index): New helper function.
3551 (various places): Check flag_print_constant_pool where missing.
3552 (main): If verbose set flag_print_constant_pool.
3553 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
3555 2004-03-15 Andrew Haley <aph@redhat.com>
3558 * parse.y (java_complete_lhs): Check that final variable has an
3561 2004-03-12 Andrew Haley <aph@redhat.com>
3564 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
3567 2004-02-29 Roger Sayle <roger@eyesopen.com>
3569 * jcf-parse.c (java_parse_file): Handle the case that input_filename
3572 2004-02-27 Per Bothner <per@bothner.com>
3574 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
3575 suggestion: Use build_incomplete_class_ref.
3576 This fixes PR java/13508, java/11714.
3578 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
3580 * java/parse.h: Update copyright.
3582 2004-02-26 Andrew Haley <aph@redhat.com>
3585 * parse.y (check_interface_throws_clauses): Check for
3586 !METHOD_INVISIBLE (iface_method).
3587 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
3588 well as CLASS_ABSTRACT.
3590 2004-02-25 Per Bothner <per@bothner.com>
3592 * parse.y (build_assertion): If we're in an inner class, create the
3593 class$ helper routine in the outer class.
3595 2004-02-19 Richard Henderson <rth@redhat.com>
3597 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
3599 2004-02-16 Geoffrey Keating <geoffk@apple.com>
3601 * Make-lang.in (java.install-man): Add extra dependencies.
3603 2004-02-13 Geoffrey Keating <geoffk@apple.com>
3605 * Make-lang.in: Install man pages under the same names
3606 (possibly transformed) as the program they document.
3608 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
3610 * gjavah.c: Include "intl.h".
3611 (error): New function.
3612 (main): Call gcc_init_libintl.
3613 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
3614 print_stub_or_jni, process_file, main): Use error rather than
3616 (print_method_info, usage, help, version, main): Mark strings for
3617 translation with _. Avoid splitting up sentences. Send
3618 information messages to stdout.
3619 * jcf-dump.c: Include "intl.h".
3620 (main): Call gcc_init_libintl.
3621 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
3622 Mark error, usage and version messages for translation with _.
3623 Avoid splitting up sentences.
3624 * jv-scan.c: Include "intl.h".
3625 (fatal_error, warning): Change parameter s to msgid. Translate
3627 (main): Call gcc_init_libintl.
3628 (usage, help, version): Mark error, usage and version messages for
3629 translation with _. Avoid splitting up sentences.
3630 * jvgenmain.c: Include "intl.h".
3631 (main): Call gcc_init_libintl.
3632 (usage, main): Mark error messages for translation with _.
3633 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
3634 JVGENMAIN_OBJS): Add intl.o.
3635 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
3636 java/jvgenmain.o): Update dependencies.
3638 2004-02-08 Per Bothner <per@bothner.com>
3640 * parse.y (resolve_qualified_expression_name): In case of inaccessible
3641 class don't use not_accessible_field_error, which can get confused.
3643 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3645 Make-lang.in (po-generated): Delete.
3647 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3649 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
3651 * decl.c: Include target.h.
3652 (start_java_method): Replace PROMOTE_PROTOTYPES with
3653 targetm.calls.promote_prototypes.
3654 * expr.c: Include target.h.
3655 (pop_arguments): Replace PROMOTE_PROTOTYPES with
3656 targetm.calls.promote_prototypes.
3657 * parse.y: Include target.h.
3658 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
3659 with targetm.calls.promote_prototypes.
3661 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3663 * typeck.c: Update copyright.
3665 2004-02-02 Tom Tromey <tromey@redhat.com>
3667 * decl.c (java_init_decl_processing): Remove duplicate
3670 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
3672 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
3674 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
3676 * expr.c (build_field_ref): Move variable
3679 2004-01-28 Andrew Haley <aph@redhat.com>
3681 * expr.c (build_field_ref): Widen field offset.
3683 2004-01-27 Andrew Haley <aph@redhat.com>
3686 * parse.y (check_interface_throws_clauses): Make sure class_decl
3689 2004-01-22 Jeff Sturm <jsturm@one-point.com>
3692 * parse.y (patch_assignment): Don't modify lhs_type for
3693 reference assignments.
3695 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3697 * Make-lang.in: Replace $(docdir) with doc.
3698 (java.info, java.srcinfo, java.man, java.srcman): New rules.
3699 (java.install-man): Revamp rule.
3701 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3703 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
3704 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
3705 instead of deferred backquote.
3707 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
3709 * typeck.c (find_method_in_interfaces): Move variable
3712 2004-01-16 Andrew Haley <aph@redhat.com>
3715 * typeck.c (shallow_find_method): New.
3716 (find_method_in_superclasses): New.
3717 (find_method_in_interfaces): New.
3718 (lookup_do): Rewrite.
3719 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
3721 * jcf-parse.c (read_class): Save and restore output_class.
3722 * decl.c (java_expand_body): Set output_class from fndecl.
3724 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
3726 * class.c (gen_indirect_dispatch_tables): Fix string length
3729 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3731 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
3732 (java.srcextra): Copy above back to source directory if requested.
3733 (po-generated): Delete reference to $(parsedir).
3734 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
3737 2004-01-14 Jan Hubicka <jh@suse.cz>
3739 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
3742 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3744 * java-tree.h (java_expand_expr): Change prototype.
3745 * expr.c (java_expand_expr): Add alt_rtl parameter.
3747 2004-01-09 Andrew Haley <aph@redhat.com>
3750 * parse.y (java_fix_constructors): Set output_class.
3751 (java_reorder_fields): Likewise.
3752 (java_layout_classes): Likewise.
3753 (java_expand_classes): Generate indirect dispatch tables.
3754 (java_expand_classes): Set output_class.
3755 (java_finish_classes): Likewise.
3756 * lang.c (java_init): Turn on always_initialize_class_p if we're
3757 using indirect dis[atch.
3758 (java_decl_ok_for_sibcall): Use output_class, not current_class.
3759 (java_get_callee_fndecl): Use class local atable.
3761 (always_initialize_class_p): Decl moved to java-tree.h.
3762 (HANDLE_CLASS_INFO): Set output_class.
3763 (read_class): Likewise.
3764 (parse_class_file): Call gen_indirect_dispatch_tables.
3765 (parse_zip_file_entries): Set output_class.
3766 (java_parse_file): Set output_class. Don't emit symbol tables.
3767 * java-tree.h (output_class): New.
3768 Remove global declarations for otable, atable, and ctable.
3769 (always_initialize_class_p): moved here from decl.c.
3771 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
3772 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
3773 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
3774 (struct lang_type): Add otable_methods, otable_decl,
3775 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
3776 ctable_decl, catch_classes, type_to_runtime_map.
3777 * expr.c (build_field_ref): Make otable, atable, and ctable class
3778 local rather than global.
3779 (build_known_method_ref): Likewise.
3780 (build_invokeinterface): Likewise.
3781 (java_expand_expr): Pass runtime type (rather than actual type) to
3783 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
3784 this class. Look up each class in that map to delete duplicates.
3785 (expand_end_java_handler): Pass runtime type (rather than actual
3786 type) to expand_start_catch.
3787 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
3789 (java_init_decl_processing): Rearrange things. Remove global
3790 declarations of otable, atable, and ctable.
3791 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
3792 (java_expand_body): Set output_class.
3793 * constants.c (build_constant_data_ref): Use output_class, not
3795 (alloc_name_constant): Likewise.
3796 * class.c (gen_indirect_dispatch_tables): New.
3797 (build_class_ref): Generate hard reference to superclass, even if
3798 using indirect dispatch.
3799 (build_static_field_ref): Use class local atable.
3800 (make_class_data): Generate hard reference to superclass, even if
3801 using indirect dispatch.
3802 Generate symbolic references to interfaces when using indirect
3804 (make_class_data): Emit otable, atable, and ctable.
3805 Make otable, atable, and ctable class local rather than global.
3806 (emit_catch_table): Make otable, atable, and ctable class local
3809 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
3811 * parse.y (catch_clause_parameter): Fix typo.
3814 * parse.y: (catch_clause_parameter): Return early if $3, aka
3815 formal_parameter, is null.
3817 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
3819 * class.c: Remove uses of "register" specifier in
3820 declarations of arguments and local variables.
3823 * gjavah.c: Likewise.
3824 * jcf-dump.c: Likewise.
3825 * jcf-io.c: Likewise.
3826 * jcf-parse.c: Likewise.
3827 * jcf-write.c: Likewise.
3828 * keyword.h: Likewise.
3829 * parse.y: Likewise.
3830 * typeck.c: Likewise.
3831 * verify.c: Likewise.
3833 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
3835 * Make-lang.in (GCJ_CROSS_NAME): Delete.
3836 (java.install_common, java.install-man): Adjust for above.
3837 (java.uninstall): Likewise.
3839 2003-12-03 Michael Koch <konqueror@gmx.de>
3841 * class.c (make_class_data):
3842 Push field value to 'hack_signers' instead of 'signers'.
3843 * decl.c (java_init_decl_processing):
3844 Push field 'hack_signers' instead of 'signers'.
3846 2003-12-03 Zack Weinberg <zack@codesourcery.com>
3848 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
3851 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
3854 * parse.y (qualify_ambiguous_name): Remove lots of broken
3855 field access processing - there's no need to do that here,
3856 because we have resolve_field_access. Remove
3857 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
3858 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
3861 2003-12-01 Jeff Sturm <jsturm@one-point.com>
3864 * parse.y (java_complete_lhs): Save location prior to patching
3867 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
3870 * resource.c (write_resource_constructor): Append
3871 "_resource" to constructor identifier name.
3873 2003-11-25 Jeff Sturm <jsturm@one-point.com>
3876 * constants.c (cpool_for_class): New function.
3877 (outgoing_cpool): Remove global variable.
3878 (alloc_name_constant): Use cpool_for_class.
3879 (build_constants_constructor): Likewise.
3880 * decl.c (java_expand_body): Set current_class.
3881 * java-tree.h (outgoing_cpool) Remove declaration.
3882 (init_outgoing_cpool): Likewise.
3883 * jcf-parse.c (init_outgoing_cpool): Remove function.
3884 (parse_class_file): Don't call init_outgoing_cpool.
3885 * parse.y (java_complete_expand_methods): Don't call
3886 init_outgoing_cpool. Don't save outgoing_cpool.
3887 (java_expand_classes): Don't restore outgoing_cpool.
3888 (java_finish_classes): Likewise.
3890 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
3892 * Make-lang.in: (java.install-common) Add
3893 symlink for $(target_noncanonical)-gcjh for
3896 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
3898 * Make-lang.in (java.extraclean): Delete.
3900 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
3902 * Make-lang.in (check-java): Add.
3904 2003-11-19 Jeff Sturm <jsturm@one-point.com>
3907 * except.c (prepare_eh_table_type): Allocate variable-sized
3908 buffer `buf' with alloca.
3910 2003-11-17 Jeff Sturm <jsturm@one-point.com>
3914 decl.c (java_init_decl_processing): Don't initialize
3915 class_not_found_type_node, no_class_def_found_type_node.
3917 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
3918 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
3919 (class_not_found_type_node, no_class_def_found_type_node):
3922 parse.y (build_dot_class_method_invocation): Add this_class
3923 argument. Qualify method invocations to a different class.
3924 (create_new_parser_context): Initialize saved_data_ctx to 0.
3925 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
3926 (build_dot_class_method): Don't load classes. Register
3928 (build_incomplete_class_ref): Special cases for interfaces
3929 and inner classes. Move build_dot_class_method call to here...
3930 (patch_incomplete_class_ref): ...from here. Pass current_class
3931 to build_dot_class_method_invocation.
3932 (build_assertion): Pass class_type to
3933 build_dot_class_method_invocation.
3934 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
3936 2003-11-17 Jeff Sturm <jsturm@one-point.com>
3939 * java-tree.h (BLOCK_EMPTY_P): Define.
3940 * parse.y (java_complete_lhs): Check for empty blocks
3941 in TRY_FINALLY_EXPR case.
3943 2003-11-17 Andrew Haley <aph@redhat.com>
3945 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
3946 (struct lang_decl_var:freed): New variable.
3947 * decl.c (poplevel): Mark local vars that have gone out of scope.
3948 (push_jvm_slot): Don't use the RTL of a var that has gone out of
3951 2003-11-16 Jason Merrill <jason@redhat.com>
3953 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
3954 and TAGS files that include them for each front end.
3956 2003-11-15 Tom Tromey <tromey@redhat.com>
3958 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
3960 2003-11-12 Jason Merrill <jason@redhat.com>
3962 PR optimization/12547
3963 * lang.c (java_tree_inlining_walk_subtrees): Just walk
3964 BLOCK_EXPR_BODY directly.
3966 2003-11-12 Andrew Haley <aph@redhat.com>
3969 * parse.y (fold_constant_for_init): Check that we really do have a
3973 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
3974 init_test_decls being inlined.
3977 * parse.y (do_resolve_class): Check return value from
3978 breakdown_qualified().
3980 2003-11-11 Tom Tromey <tromey@redhat.com>
3983 * parse.y (merge_string_cste): Handle case where we have a
3984 pointer that happens to be zero, not null_pointer_node.
3986 2003-11-10 Tom Tromey <tromey@redhat.com>
3988 * jcf-parse.c (classify_zip_file): Correctly compare
3989 filename_length against length of manifest file's name.
3991 2003-11-08 Tom Tromey <tromey@redhat.com>
3994 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
3996 2003-11-06 Andrew Haley <aph@redhat.com>
3998 * expr.c (java_stack_swap): Make sure destination stack slots are
3999 of the correct type.
4001 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
4003 * Make-lang.in (dvi): Move targets to $(docobjdir).
4004 (gcj.dvi): Simplify rule and adjust target.
4005 (gcj.info): Simplify rule.
4006 (gcj.pod): New intermediate rule.
4007 (gcjh.pod): Likewise.
4008 (jv-scan.pod): Likewise.
4009 (jcf-dump.pod): Likewise.
4010 (gij.pod): Likewise.
4011 (jv-convert.pod): Likewise.
4012 (rmic.pod): Likewise.
4013 (rmiregistry.pod): Likewise.
4016 (jv-scan.1): Delete.
4017 (jcf-dump.1): Delete.
4019 (jv-convert.1): Delete.
4021 (rmiregistry.1): Delete.
4023 2003-11-02 Jeff Sturm <jsturm@one-point.com>
4025 Fixes PR java/12866.
4026 * parse.y (resolve_qualified_expression_name): Move test
4027 for outer field access methods from here...
4028 (check_thrown_exceptions) ...to here.
4030 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
4032 * .cvsignore: Delete.
4034 2003-10-28 Frank Ch. Eigler <fche@redhat.com>