2007-05-13 Release Manager * GCC 4.2.0 released. 2007-03-16 Mark Mitchell <mark@codesourcery.com> * Make-lang.in (java.srcextra): Remove dependency. (java_parse_c): New variable. (java/parse.c): Replace with ... ($(java_parse_c)): ... this. (java/parse.o): Depend on $(java_parse_c). 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com> * gcj.texi: Standardize title page. 2006-11-12 David Daney <ddaney@avtrex.com> PR java/29805 * typeck.c (build_java_array_type): Increase buffer sizes. 2006-10-10 Brooks Moses <bmoses@stanford.edu> * Make-lang.in: Added "java.pdf", "gcj.pdf" target support. 2006-09-12 Tom Tromey <tromey@redhat.com> * expr.c (push_value): Always flush quick stack. 2006-09-12 Tom Tromey <tromey@redhat.com> PR java/29013: * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note the push of the called method's return result. 2006-09-12 Tom Tromey <tromey@redhat.com> * jvspec.c (lang_specific_driver): Read spec file even if -fsyntax-only. 2006-09-12 Tom Tromey <tromey@redhat.com> PR java/28754: * expr.c (expand_java_field_op): Initialize field's declaring interface if necessary. 2006-09-12 Tom Tromey <tromey@redhat.com> PR java/28892: * expr.c (expand_java_field_op): No error for assignments not in class initializer or constructor. 2006-08-22 Andrew Haley <aph@redhat.com> * decl.c (java_add_stmt): Give the statement list a type. 2006-08-16 Jakub Jelinek <jakub@redhat.com> Bryce McKinlay <bryce@mckinlay.net.nz> * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed. 2006-08-10 Simon Martin <simartin@users.sourceforge.net> PR java/8923 * parse.y (build_incdec): Emit an error instead of an ICE if '++' or '--' is used with a constant operand. (java_complete_lhs): When processing a '++' or '--' expression, don't call java_complete_tree but java_complete_lhs, so that a static final variable operand is never replaced by its value. This avoids an ICE later on. (patch_unaryop): Fixed typo in comment. 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de> * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies. 2006-07-12 Bryce McKinlay <mckinlay@redhat.com> * builtins.c (check_for_builtin): If a builtin could result in a direct call being generated, don't use it if flag_indirect_dispatch is set. 2006-07-12 Bryce McKinlay <mckinlay@redhat.com> * gcj.texi (Invocation): Corrections for Invocation API example. 2006-07-04 Andrew Haley <aph@redhat.com> * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the entry. 2006-06-21 Andrew Haley <aph@redhat.com> * java-tree.h (update_aliases): Remove * expr.c (expand_iinc): Remove call to update_aliases(). (STORE_INTERNAL): Likewise. * decl.c (update_aliases, initialize_local_variable) (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls. 2006-06-19 Andrew Haley <aph@redhat.com> PR java/1305 PR java/27908 * expr.c (java_modify_addr_for_volatile): New function. (expand_java_field_op): Handle volatile fields. * java-gimplify.c (java_gimplify_component_ref): Call java_modify_addr_for_volatile to give the field_ref the correct volatile type. (java_gimplify_modify_expr): Likewise. * java-tree.h (java_modify_addr_for_volatile): New decl. 2006-06-17 Karl Berry <karl@gnu.org> * gcj.texi (@dircategory): Use "Software development" instead of "Programming", following the Free Software Directory. 2006-06-16 Andrew Haley <aph@redhat.com> * class.c (make_class_data): When using flag_indirect_classes, don't initialize the vtable of Class instances. 2006-06-09 Andrew Haley <aph@redhat.com> PR java/1305 PR java/27908 * builtins.c (initialize_builtins): Add __sync_synchronize(). * class.c (add_field): Mark volatile fields. * java-gimplify.c (java_gimplify_expr): Call new functions to handle self-modifying exprs and COMPONENT_REFs. (java_gimplify_component_ref): New. (java_gimplify_modify_expr): Add handling for volatiles. 2006-06-08 Tom Tromey <tromey@redhat.com> * gcj.texi (libgcj Runtime Properties): Document gnu.gcj.user.realname. 2006-06-08 Andrew Haley <aph@redhat.com> * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to get_symbol_table_index(). (maybe_rewrite_invocation): Set SPECIAL if we need to access a private method. (build_known_method_ref): New arg: special. Pass it to get_symbol_table_index. (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of the method list. (build_invokevirtual): New arg: special. Pass it to get_symbol_table_index. (expand_invoke): New variable: special. Pass it to maybe_rewrite_invocation(). Pass it to build_known_method_ref(). * class.c (build_symbol_entry): Add new arg: special. Use it to build the symbol table conbstructor. (emit_symbol_table): Extract SPECIAL from the method list and pass it to build_symbol_entry(). * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set special accordingly. 2006-06-06 David Daney <ddaney@avtrex.com> * gcj.texi (libgcj Runtime Properties): Document gnu.gcj.runtime.NameFinder.show_raw and gnu.gcj.runtime.NameFinder.remove_unknown. 2006-06-06 Tom Tromey <tromey@redhat.com> * jcf-dump.c (print_access_flags): Handle varargs, bridge, synthetic, enum, annotation. * jcf.h (ACC_BRIDGE): New macro. (ACC_VARARGS): Likewise. (ACC_SYNTHETIC): Likewise. (ACC_ENUM): Likewise. (ACC_ANNOTATION): Likewise. 2006-06-06 Mike Stump <mrs@apple.com> * Make-lang.in: Rename to htmldir to build_htmldir to avoid installing during build. 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com> * gcj.texi (Extensions): Document the new gcj-dbtool-based classname-to-library resolution mechanism. Declare the old gnu.gcj.runtime.VMClassLoader.library_control mechanism deprecated. (libgcj Runtime Properties): Document gnu.gcj.runtime.VMClassLoader.library_control's new default. 2006-05-29 Jakub Jelinek <jakub@redhat.com> * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64) bit wide type. (jword): Define to uint64 on 64-bit arches. * jcf-dump.c (print_constant): Cast JPOOL_UINT to long. 2006-05-28 Kazu Hirata <kazu@codesourcery.com> * class.c, except.c, expr.c, java-gimplify.c: Fix comment typos. 2006-05-26 Tom Tromey <tromey@redhat.com> * expr.c (java_push_constant_from_pool): Handle 'ldc class'. * verify-glue.c (vfy_class_type): New function. * verify-impl.c (check_constant): Allow 'ldc class'. * verify.h (vfy_class_type): Declare. 2006-05-25 Andrew Haley <aph@redhat.com> PR java/27756 * decl.c (maybe_pushlevels): When variable ranges are non-nested update all lifetimes, not just the first one. 2006-05-24 Tom Tromey <tromey@redhat.com> * java-tree.h: Fixed flag documentation. 2006-05-24 Tom Tromey <tromey@redhat.com> PR libgcj/27729: * jcf.h (ACC_INVISIBLE): Changed value. 2006-05-24 Andrew Haley <aph@redhat.com> PR java/27754 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a COMPOUND_EXPR. 2006-05-16 H.J. Lu <hongjiu.lu@intel.com> * lang.opt (femit-class-file): Remove VarExists. 2006-05-16 Tom Tromey <tromey@redhat.com> * verify-impl.c (verify_instructions_0) <op_return>: Special case for Object.<init>. 2006-05-16 H.J. Lu <hongjiu.lu@intel.com> PR driver/26885 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with $(GCC_OBJS). 2006-05-14 H.J. Lu <hongjiu.lu@intel.com> * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H). (java/expr.o): Replace target.h with $(TARGET_H). (java/parse.o): Likewise. 2006-05-10 Andrew Haley <aph@redhat.com> * class.c (emit_indirect_register_classes): Fix comment. 2006-05-04 Tom Tromey <tromey@redhat.com> * java-tree.h (uses_jv_markobj_p): Declare. * class.c (uses_jv_markobj_p): Removed. * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define. (get_boehm_type_descriptor): Use it. (uses_jv_markobj_p): Moved from class.c. Return bool. 2006-05-04 Tom Tromey <tromey@redhat.com> * java-tree.def (THIS_EXPR): Now a tcc_expression. 2006-05-04 Andrew Haley <aph@redhat.com> * class.c (make_field_value): Always build_address_of fdecl if there is an initializer. 2006-05-03 Andrew Haley <aph@redhat.com> PR libgcj/27352 * expr.c (maybe_rewrite_invocation): New function. (rewrite_arglist_getclass): Likewise. (rules): New. (expand_invoke): Call maybe_rewrite_invocation. * parse.y (patch_invoke): Likewise. * java-tree.h: (maybe_rewrite_invocation): New function. 2006-04-21 Andrew Haley <aph@redhat.com> * lang.c (java_init): Handle flag_indirect_classes. * jvgenmain.c: Use "class$$" instead of "class$". * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as DECLs. (mangle_class_field): Special case "class$$" as well as "class$". * constants.c (build_ref_from_constant_pool): If flag_indirect_classes, generate a ref into the heap. * decl.c (constants_field_decl_node, constants_data_field_decl_node): New. * class.c (build_static_class_ref): New. (build_classdollar_field): Factor out from build_class_ref(). (make_field_value): Handle static fields in heap. (make_class_data): Make sure we get a static ref to class. Make class initializer const if flag_indirect_classes. (register_class): Build a class_ref for initialization if flag_indirect_classes. (emit_indirect_register_classes): New. 2006-04-08 Kazu Hirata <kazu@codesourcery.com> * expr.c, gjavah.c: Fix comment typos. 2006-04-03 Andrew Haley <aph@redhat.com> PR java/26858 * expr.c (build_field_ref): Don't check the field offset if flag_syntax_only. 2006-03-30 Andrew Haley <aph@redhat.com> PR java/26858 * lang.c (java_attribute_table): New. (LANG_HOOKS_ATTRIBUTE_TABLE): Define. * expr.c (build_field_ref): Add a null pointer check for all fields of offset > 4k. Don't do so for accesses via the this pointer, which we know can never be null. * class.c (build_java_method_type): Mark arg 1 of all nonstatic methods nonnull. 2006-03-30 Carlos O'Donell <carlos@codesourcery.com> * Make-lang.in: Rename docdir to gcc_docdir. 2006-03-30 Tom Tromey <tromey@redhat.com> PR java/26042: * parse.y (java_reorder_fields): Reset superclass field's size as well. 2006-03-28 Tom Tromey <tromey@redhat.com> PR java/26390: * parse.y (find_most_specific_methods_list): Added 'class' argument. (lookup_method_invoke): Updated. 2006-03-15 Tom Tromey <tromey@redhat.com> * jcf-write.c (generate_bytecode_insns): Use qualifying type for non-static method calls. 2006-03-15 David Daney <ddaney@avtrex.com> * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its declaration. 2006-03-15 David Daney <ddaney@avtrex.com> * lang.opt (-freduced-reflection): New option. * lang.c (java_post_options): Generate an error if -freduced-reflection used with -fjni or -findirect-dispatch. * java-tree.h (flag_reduced_reflection): Declare new variable. * boehm.c (get_boehm_type_descriptor): Indicate all pointers if bitmap overflows and flag_reduced_reflection set. * class.c (uses_jv_markobj_p): New function. (make_class_data): Moved generation of vtable to before reflection data, generate less reflection data if flag_reduced_reflection set. * gcj.texi: Document -freduced-reflection. 2006-03-15 Tom Tromey <tromey@redhat.com> PR java/26638: * class.c (get_interface_method_index): Don't put <clinit> into interface table. 2006-03-15 Tom Tromey <tromey@redhat.com> * parse.y (analyze_clinit_body): Ignore empty statements. 2006-03-08 David Daney <ddaney@avtrex.com> * gcj.texi: Document -static-libgcj option. 2006-02-20 Andrew Haley <aph@redhat.com> * jcf-parse.c (parse_class_file): Set input_location from current_class. 2006-02-15 Andrew Haley <aph@redhat.com> * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here. (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL, TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here. 2006-02-09 Andrew Haley <aph@redhat.com> PR java/26192 * expr.c (expand_invoke): Allow methods in arrays to be resolved in their superclass. * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for array types. 2006-02-08 Tom Tromey <tromey@redhat.com> PR java/22578: * check-init.c (check_init): Handle VIEW_CONVERT_EXPR. * builtins.c (convert_real): New function. (java_builtins): Handle Float.intBitsToFloat, Float.floatToRawIntBits, Double.longBitsToDouble, Double.doubleToRawLongBits. 2006-02-07 Andrew Haley <aph@redhat.com> * expr.c (expand_invoke): (BC mode.) If we find a method in a class other than the one in which we expected to find it, ignore the result. PR java/25535 * constants.c (build_constants_constructor): move initializer into first halfword on a 64-bit big-endian machine. 2006-02-04 Tom Tromey <tromey@redhat.com> PR java/25676: * builtins.c (max_builtin): Skip floating point 'max'. (min_builtin): Skip floating point 'min'. (check_for_builtin): Never return NULL_TREE. 2006-02-04 Tom Tromey <tromey@redhat.com> PR java/26097: * expr.c (push_type): Avoid side effect in gcc_assert. 2006-02-04 Roger Sayle <roger@eyesopen.com> * decl.c (java_init_decl_processing): Create char_type_node as a regular INTEGER_TYPE node. (push_promoted_type): Preserve TYPE_STRING_FLAG on types. * typeck.c (convert): No longer check for CHAR_TYPEs but instead test for char_type_node and promoted_char_type_node as special instances of INTEGER_TYPE tree codes. (promote_type,build_java_signature): Likewise. * jcf-write.c (adjust_typed_op): Likewise. * mangle.c (mangle_type): Likewise. * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE. * parse.h (JINTEGRAL_TYPE_P): Likewise. 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch> * expr.c (java_stack_swap): Revert gcc_assert patch. 2006-02-03 Ben Elliston <bje@au.ibm.com> * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout. * typeck.c: Likewise. * verify-impl.c: Likewise. * class.c: Likewise. * decl.c: Likewise. * jcf-parse.c: Likewise. * constants.c: Likewise. * check-init.c: Likewise. * jcf-write.c: Likewise. * verify-glue.c: Likewise. * mangle.c: Likewise. * expr.c: Likewise. * lang.c: Likewise. * boehm.c: Likewise. 2006-02-01 Jan Hubicka <jh@suse.cz> * decl.c (end_java_method): Kill hack disabling unit-at-a-time. * lang.c (java_init_options): Set no_unit_at_a_time_default. 2006-01-30 Andrew Haley <aph@redhat.com> PR java/21428 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this"). 2006-01-21 Joseph S. Myers <joseph@codesourcery.com> * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version): Update copyright notice dates. 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com> * jvspec.c (lang_specific_spec_functions): Remove. 2006-01-06 Tom Tromey <tromey@redhat.com> * gcj.texi (Arrays): Added more documentation for JvNewObjectArray. (Primitive types): Correct information about primitive classes. (Reference types): New node. (Index): New node. 2005-12-16 Alexandre Oliva <aoliva@redhat.com> * jcf-parse.c (set_source_filename): Set the decl source location even when returning early. 2005-12-15 Tom Tromey <tromey@redhat.com> Andrew Haley <aph@redhat.com> PR java/25429 * parse.y (resolve_expression_name): Don't generate accessor methods for constant fields. 2005-12-13 Andrew Haley <aph@redhat.com> PR java/25366 PR java/25368 * class.c (maybe_layout_super_class): Update current_class before calling do_resolve_class. 2005-12-12 H.J. Lu <hongjiu.lu@intel.com> PR java/25330 * jcf-write.c (write_classfile): Use PID in temporary class file. Save/restore errno when reporting error. 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com> PR java/9861 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J' to bare_function_type and including the return type * builtins.c (initialize_builtins) : Change builtin mangled name constants to conform to new mangling scheme 2005-12-08 Andrew Haley <aph@redhat.com> PR libgcj/25265 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE. (soft_abstractmethod_node): New. * expr.c (build_field_ref): Add in-line check for missing field. * decl.c (java_init_decl_processing): Add soft_nosuchfield_node. 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com> * Make-lang.in (java.all.build, java.install-normal): Remove. 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com> * Make-lang.in: Remove all dependencies on s-gtype, except for gt-java-parse.h. 2005-12-07 Richard Sandiford <richard@codesourcery.com> * class.c (build_utf8_ref, emit_register_classes): Use switch_to_section and get_section. 2005-12-06 Tom Tromey <tromey@redhat.com> PR java/25283: * parse.y (patch_new_array_init): Revert previous patch. (lookup_method_invoke): Use size-less array type when creating an anonymous constructor. 2005-12-05 Tom Tromey <tromey@redhat.com> * parse.y (patch_new_array_init): Don't set length on array. 2005-12-02 Richard Guenther <rguenther@suse.de> * java-gimplify.c (java_gimplify_labeled_block_expr): Use buildN instead of build. * class.c (finish_class): Likewise. * expr.c (java_create_object): Likewise. 2005-11-28 Tom Tromey <tromey@redhat.com> PR java/18278: * expr.c (build_jni_stub): Unwrap the return value. * java-tree.h (soft_unwrapjni_node): New define. (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE. * decl.c (java_init_decl_processing): Initialize soft_unwrapjni_node. 2005-11-24 Bryce McKinlay <mckinlay@redhat.com> * gcj.texi (gij options): Add -Xss documentation. 2005-11-08 Wil Mahan <wmahan@gmail.com> PR java/23617 * zextract.c (read_zip_archive): Fix out of memory error when reading jar files with zip-style comments. 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com> * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object formats. * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED 2005-10-12 Nathan Sidwell <nathan@codesourcery.com> Wil Mahan <wmahan@gmail.com> PR java/23620 * class.c (make_class): Create empty binfo here. (set_super_info): Only create binfo if we have superclasses. 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org> PR java/24127 * parse.y (method_header): Make the result of the rule a NULL_TREE when a parsing error occurs. 2005-09-29 Tom Tromey <tromey@redhat.com> PR java/24120: * jcf-io.c (memoized_dirlist_hash): New function. (caching_stat): Use it. 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org> PR java/21418 * class.c (inherits_from_p): Try to lay out super class if it is not already laid out. (maybe_layout_super_class): Handle the case where SUPER_CLASS is a NULL_TREE. 2005-09-18 James A. Morrison <phython@gcc.gnu.org> * builtins.c (max_builtin, min_builtin, abs_builtin, java_build_function_call_expr): Use fold_buildN. * class.c (layout_class_method): Likewise. * expr.c (java_truthvalue_conversion, build_java_jsr, build_java_arrayaccess, expand_java_arrayload, expand_iinc, build_java_binop, build_field_ref, expand_compare, build_known_method_ref, build_invokevirtual, process_jvm_instruction): Likewise. * parse.y (patch_binop, patch_exit_expr): Likewise. * typeck.c (convert_ieee_real_to_integer): Likewise. (convert): Don't call fold after convert_ieee_real_to_integer. 2005-09-14 Bryce McKinlay <mckinlay@redhat.com> PR java/23891 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for the newly created type. Set import lists here, not in create_class. (jdep_resolve_class): Set current_class. (do_resolve_class): Use current_class's TYPE_PACKAGE to determine the current package context, not ctxp->package. (cicp_cache): Removed. (class_in_current_package): Simplify implementation using TYPE_PACKAGE. * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE. * java-tree.h (TYPE_PACKAGE): New macro. (struct lang_type): New member 'package'. 2005-09-09 Andrew Haley <aph@redhat.com> PR libgcj/23182 * expr.c (pop_type_0): If the expected type is object or ptr (i.e. void*), return the type of the object we just popped from the stack. 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu> * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's BLOCK_EXPR_BODY before returning the new BIND_EXPR. 2005-09-06 Kazu Hirata <kazu@codesourcery.com> * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h, jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment typos. Follow spelling conventions. 2005-09-05 Ranjit Mathew <rmathew@hotmail.com> PR java/23431 * typeck.c (lookup_do): Look up interfaces for the original class, not the base class. * parse.y (java_check_regular_methods): Fix diagnostic message for more restrictive overriding of a method from an interface. 2005-08-16 Tom Tromey <tromey@redhat.com> * class.c (make_class_data): Always emit JV_STATE_PRELOADING for class' initial state. 2005-08-16 Ranjit Mathew <rmathew@hotmail.com> PR java/22113 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing `literal_token' for large numeric input tokens. 2005-08-16 Ranjit Mathew <rmathew@hotmail.com> PR java/19870 * parse.y (nested_field_access_p): Rename to nested_member_access_p and expand to handle method accesses across nested classes. (build_outer_method_access_method): Rename to build_nested_method_access_method. Minor adjustments to comments. (resolve_expression_name): Use the newly-renamed nested_member_access_p method. (resolve_qualified_expression_name): Likewise. (patch_method_invocation): Also consider static methods for access method generation. Minor adjustments to comments. (maybe_use_access_method): Use the more general nested_memeber_access_p to determine access across nested class boundaries. Allow THIS_ARG to be NULL (for static methods). 2005-08-15 Tom Tromey <tromey@redhat.com> PR java/23300. * expr.c (build_field_ref): Don't generate otable reference when DECL_FIELD_OFFSET is 0. * class.c (maybe_layout_super_class): Pass outer class to do_resolve_class. 2005-08-15 Tom Tromey <tromey@redhat.com> * java-tree.h (LABEL_IN_SUBR): Removed. (LABEL_IN_SUBR): Likewise. (LABEL_IS_SUBR_START): Likewise. (LABEL_SUBR_START): Likewise. (LABEL_SUBR_CONTEXT): Likewise. (LABEL_CHANGED): Likewise. (LABEL_RETURN_LABEL): Likewise. (LABEL_RETURN_TYPE_STATE): Likewise. (LABEL_RETURN_LABELS): Likewise. (RETURN_MAP_ADJUSTED): Likewise. (LABEL_PENDING_CHAIN): Likewise. 2005-08-15 Tom Tromey <tromey@redhat.com> * Make-lang.in (JAVA_OBJS): Removed verify.o (java/verify.o): Removed. * verify.c: Removed. * lang.c (flag_new_verifier): Removed. (java_post_options): Updated. * java-tree.h (flag_new_verifier): Removed. (verify_jvm_instructions): Removed. * expr.c (pop_type_0): Assume flag_new_verifier is true. (build_java_check_indexed_type): Likewise. (expand_java_arraystore): Likewise. (expand_java_arrayload): Likewise. (pop_arguments): Likewise. (expand_byte_code): Likewise. (process_jvm_instruction): Likewise. 2005-08-10 Andrew Haley <aph@redhat.com> * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer type mismatches to make legal GIMPLE. 2005-08-10 Robin Green <greenrd@greenrd.org> PR java/23230: * parse.y (maybe_use_access_method): Generalize check from java.lang.Object to any superclass of current_class 2005-08-08 Nathan Sidwell <nathan@codesourcery.com> * class.c (build_class_ref): Wrap the primary class type in a NOP_EXPR. * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the primary class type from the NOP_EXPR in which it was placed. 2005-07-28 Diego Novillo <dnovillo@redhat.com> * expr.c (expand_load_internal): Fix missing parens in predicate. 2005-07-28 Andrew Haley <aph@redhat.com> * expr.c (expand_load_internal): Convert to destination type. 2005-07-22 Manfred Hollstein <mh@suse.com> * verify-impl.c (check_class_constant): Fix uninitialised warnings. (check_constant): Likewise. (check_wide_constant): Likewise. 2005-07-20 Giovanni Bajo <giovannibajo@libero.it> Make CONSTRUCTOR use VEC to store initializers. * check-init.c (check_init): Update to cope with VEC in CONSTRUCTOR_ELTS. * class.c (make_field_value, make_method_value, get_dispatch_table, make_class_data, emit_symbol_table, emit_catch_table, emit_assertion_table): Use build_constructor_from_list instead of build_constructor. * constants.c (build_constants_constructor): Likewise. * java-gimplify.c (java_gimplify_new_array_init): Update to cope with VEC in CONSTRUCTOR_ELTS. * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE, PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead of a TREE_LIST. * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in CONSTRUCTOR_ELTS. * parse.y (build_new_array_init): Use build_constructor_from_list instead of build_constructor. (patch_new_array_init): Update to cope with VEC in CONSTRUCTOR_ELTS. (array_constructor_check_entry): Likewise. 2005-07-12 Tom Tromey <tromey@redhat.com> * jvspec.c (lang_specific_driver): Put filelist_filename first on command line. 2005-07-12 Tom Tromey <tromey@redhat.com> PR java/19674: * parse-scan.y (interface_member_declaration): Added empty_statement. 2005-07-08 Daniel Berlin <dberlin@dberlin.org> * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common. (LABEL_PENDING_CHAIN): Ditto. (LABEL_PC): Ditto. (DECL_BIT_INDEX): Ditto. 2005-07-07 Bryce McKinlay <mckinlay@redhat.com> PR java/18119 * parse.y (inner_class_accessible): New function. Logic moved from check_inner_class_access. (check_inner_class_access): Use inner_class_accessible. (resolve_inner_class): Simplify arguments. Create circularity hash here. Keep looking for classes if we found one that was inaccessible. Return the inaccessible class only if there is no other match. (do_resolve_class): Update for new resolve_inner_class arguments. Don't create circularity_hash here. 2005-07-07 Bryce McKinlay <mckinlay@redhat.com> PR java/21045 * parse.y (add_exception_to_throws): New function. (purge_unchecked_exceptions): Removed. (get_constructor_super): Renamed from verify_constructor_super. Now returns the super constructor after verification. (java_complete_expand_method): Don't use purge_unchecked_exceptions or save/restore the exception list. (check_thrown_exceptions): Add uncaught exceptions in anonymous class initializers and constructors to the throws clause of the method. 2005-07-05 Bryce McKinlay <mckinlay@redhat.com> PR java/19674 * parse.y (interface_member_declaration): Allow empty statements in interface declarations. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. 2005-07-02 Joseph S. Myers <joseph@codesourcery.com> * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q' flag for quoting. 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu> * parse.y (issue_warning_error_from_context): Call pp_output_formatted_text to be able to get the buffer. 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu> * parse.y (issue_warning_error_from_context): Update for the renaming of pp_format_text to pp_format. 2005-06-28 Paul Brook <paul@codesourcery.com> * decl.c (java_init_decl_processing): Call default_init_unwind_resume_libfunc. 2005-06-27 Tom Tromey <tromey@redhat.com> PR java/21540, PR java/13788: * parse.y (java_complete_lhs) <CASE_EXPR>: Use fold_constant_for_init. (patch_binop): Added 'folding' argument. Updated all callers. (patch_unaryop) <NOP_EXPR>: New case. (fold_constant_for_init) <NOP_EXPR>: Likewise. (fold_constant_for_init) <COND_EXPR>: Fix sense of test. 2005-06-25 Jan Hubicka <jh@suse.cz> * builtins.c (define_builtin): Accept new flags parameter. (initialize_builtins): Mark the builtins const and nothrow accordingly. 2005-06-25 Kelley Cook <kcook@gcc.gnu.org> * all files: Update FSF address in copyright headers. 2005-06-24 Tom Tromey <tromey@redhat.com> * verify-impl.c (verify_instructions_0): Correctly handle situation where PC falls off end. 2005-06-23 Bryce McKinlay <mckinlay@redhat.com> PR java/20697 * parse.y (find_most_specific_methods_list): Remove special case for inner classes. 2005-06-15 Tom Tromey <tromey@redhat.com> PR libgcj/21906: * class.c (make_method_value): Use soft_abstractmethod_node for abstract method. * java-tree.h (soft_abstractmethod_node): New define. (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant. * decl.c (java_init_decl_processing): Initialize soft_abstractmethod_node. 2005-06-13 Geoffrey Keating <geoffk@apple.com> * Make-lang.in (rule for installing gcj.1): Depends on installdirs. 2005-06-13 Per Bothner <per@bothner.com> * expr.c (int highest_label_pc_this_method, start_label_pc_this_method): New globals. (lookup_label): Add start_label_pc_this_method to pc for label, and update highest_label_pc_this_method. This prevents conflicts between labels from different methods. * java-tree.h: Declare new globals. * jcf-parse.c (parse_class_file): If needed bump start_label_pc_this_method and reset highest_label_pc_this_method. 2005-06-13 Tom Tromey <tromey@redhat.com> PR java/21844: * parse.y (nested_field_access_p): Handle case where outer field is inherited by enclosing class. 2005-06-12 Per Bothner <per@bothner.com> * class.c (inherits_from_p): Do load_class if needed. 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gjavah.c (error): Add ATTRIBUTE_PRINTF_1. * java-tree.h (parse_error_context): Move... * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG. * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG. * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1. 2005-06-08 Roger Sayle <roger@eyesopen.com> * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes. 2005-06-06 Jakub Jelinek <jakub@redhat.com> * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of msgid for argument name. * gjavah.c (error): Likewise. * java-tree.h (parse_error_context): Likewise. * parse.y (parse_error_context, parse_warning_context, issue_warning_error_from_context): Likewise. 2005-06-01 Tom Tromey <tromey@redhat.com> PR java/21722: * class.c (build_static_field_ref): Don't fold constant fields if current class is from a .class file and we're using indirect dispatch. 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * java/verify-glue.c: Don't include errors.h and include toplev.h. * java/Make-lang.in: Updates dependencies. 2005-05-26 Ranjit Mathew <rmathew@hotmail.com> PR java/19870. * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to NESTED_FIELD_ACCESS_IDENTIFIER_P. (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS. (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P. * jcf-write.c (generate_classfile): Use NESTED_FIELD_ACCESS_IDENTIFIER_P instead of OUTER_FIELD_ACCESS_IDENTIFIER_P. * parse.y (build_outer_field_access): Rename to build_nested_field_access. Support static fields and outer-to-inner class accesses. (outer_field_access_p): Rename to nested_field_access_p. Support static fields and generalise to outer-to-inner class and sibling inner class accesses. (outer_field_expanded_access_p): Rename to nested_field_expanded_access_p and support static fields. (outer_field_access_fix): Rename to nested_field_access_fix and support static fields. (build_outer_field_access_expr): Rename to build_nested_field_access_expr and support static fields. (build_outer_field_access_methods): Rename to build_nested_field_access_methods and support static fields. For static fields, generate accessors without class instance parameters. (build_outer_field_access_method): Rename to build_nested_field_access_method and support static fields. (build_outer_method_access_method): Use NESTED_FIELD_ACCESS_IDENTIFIER_P instead of OUTER_FIELD_ACCESS_IDENTIFIER_P. (resolve_expression_name): Consider static field accesses across nested classes. (resolve_qualified_expression_name): Likewise. (java_complete_lhs): Use nested_field_access_fix instead of outer_field_access_fix. (patch_unary_op): Rename outer_field_flag to nested_field_flag. Use nested_field_expanded_access_p instead of outer_field_expanded_access_p. Use nested_field_access_fix instead of outer_field_access_fix. (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P instead of OUTER_FIELD_ACCESS_IDENTIFIER_P. 2005-05-26 Bryce McKinlay <mckinlay@redhat.com> * decl.c (GCJ_BINARYCOMPAT_ADDITION, GCJ_BOOTSTRAP_LOADER_ADDITION): Removed. (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER, MINOR_BINARYCOMPAT_ABI_VERSION): New. (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID. (parse_version): Calculate version ID using new method. Use bit-flags for flag_indirect_dispatch and flag_bootstrap_classes. 2005-05-25 Richard Henderson <rth@redhat.com> PR libgcj/21692 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H. * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and DECL_CONTEXT; avoid pushdecl_top_level. (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT. (layout_class): Don't SET_DECL_ASSEMBLER_NAME. (layout_class_method): Likewise. * decl.c (java_mark_cni_decl_local): New. (java_mark_class_local): Use it. * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New. (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New. (struct lang_decl_func): Add local_cni; (struct lang_decl_var): Add class_field, vtable. (java_mangle_decl): Declare. * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New. * mangle.c: Remove dup obstack.h; include langhooks-def.h. (mangle_obstack_1): New. (java_mangle_decl): Remove obstack argument. Call mangle_class_field, mangle_vtable, and mangle_local_cni_method_decl. Fall back to lhd_set_decl_assembler_name for things that don't need mangling. (mangle_class_field): Rename from java_mangle_class_field, make static, don't call init_mangling or finish_mangling. (mangle_vtable): Similarly. (mangle_local_cni_method_decl): New. (init_mangling): Remove obstack argument. Use &mangle_obstack_1, gcc_assert, and MANGLE_RAW_STRING. (finish_mangling): Use gcc_assert, remove if 0 debugging code. 2005-05-25 DJ Delorie <dj@redhat.com> * class.c (set_constant_value): Move warning control from if() to warning(OPT_*). 2005-05-24 Richard Henderson <rth@redhat.com> * builtins.c (define_builtin): Don't call make_decl_rtl. * constants.c (build_constant_data_ref): Likewise. * class.c (build_utf8_ref): Likewise. (build_fieldref_cache_entry, build_static_field_ref): Likewise. (get_dispatch_table, layout_class_method): Likewise. (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT by hand. (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME. (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P to determine if we need a non-zero address. * decl.c (builtin_function): Don't call make_decl_rtl. (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME. * expr.c (build_known_method_ref): Don't call make_decl_rtl. * resource.c (compile_resource_data): Likewise. * parse.y (resolve_field_access): Re-word comment to avoid building DECL_RTL. 2005-05-24 Richard Henderson <rth@redhat.com> * class.c (registered_class): Take it out of class_roots; turn into a vec of trees. (register_class): Make static. Don't duplicate decl node. Use VEC_safe_push. (emit_register_classes): Use VEC_iterate. Use output_constant instead of assemble_integer. Don't call mark_decl_referenced directly. * java-tree.h (register_class): Remove decl. 2005-05-19 Paolo Bonzini <bonzini@gnu.org> PR java/17845 * parse.y (register_package, package_list): Remove. (package_declaration): Do not call register_package. (do_resolve_class): Do not use package_list. 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com> * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove unused variable. 2005-05-15 Tom Tromey <tromey@redhat.com> PR java/21519: * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call NOTE_PUSH. 2005-05-12 Aaron Luchko <aluchko@redhat.com> * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'. 2005-05-11 Tom Tromey <tromey@redhat.com> * gcj.texi (Code Generation): Document -fbootstrap-classes. * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro. (parse_version): Use it. * lang.opt (-fbootstrap-classes): New option. 2005-05-10 Paolo Bonzini <bonzini@gnu.org> PR java/21436 * class.c (maybe_layout_super_class): Look for imports in this_class. * parse.h (ctxp_for_generation_last): New. (do_resolve_class): Add a parameter. * parse.y (ctxp_for_generation_last): New. (java_pop_parser_context): Add at end of list. (find_in_imports, find_in_imports_on_demand): Look in ctxp if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of the given type are NULL. (do_resolve_class): Look into the imports of the new second parameter. Adjust recursive calls. (resolve_class, resolve_inner_class, find_as_inner_class): Adjust calls to do_resolve_class. (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST. (java_complete_class): Do not do that here. 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com> PR java/20309 * Make-lang.in (java): Add gjnih. (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise. (GJNIH_OBJS): New variable. (gjnih$(exeext)): New target. (JAVA_MANFILES): Add gjnih.1. (java.uninstall): Add gjnih.1. (java.mostlyclean): Add gjnih. (java.maintainer-clean): Add gjnih.1. (java/gjavah-jni.o): New target. (.INTERMEDIATE): Add gjnih.pod. (gjnih.pod): New target. * config-lang.in (stagestuff): Add gjnih. * gcj.texi (Top): Add gjnih node. (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and -bootclasspath options. (Invoking gjnih): New node. * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined. (TOOLNAME): New macro. (error): Replace hard-coded gcjh with TOOLNAME. (process_file): Likewise. (usage): Likewise. (version): Likewise. (help): Likewise. Add help output for -force, -old, -trace and -J options. (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros. (options): Add force, old, trace and J fields. (main): Handle -force, -old, -trace and -J options. 2005-05-03 Tom Tromey <tromey@redhat.com> PR java/21245: * gjavah.c (main): Unlink output file on error. 2005-05-03 Kazu Hirata <kazu@cs.umass.edu> * constants.c, jvgenmain.c, lang.opt, resource.c: Update copyright. 2005-04-29 Tom Tromey <tromey@redhat.com> * expr.c (build_jni_stub): Updated for change to build_block. 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org> * expr.c (force_evaluation_order): Declare 'saved' earlier. 2005-04-28 Andrew Haley <aph@redhat.com> PR java/19285 * java-tree.h (soft_resolvepoolentry_node): New. (alloc_constant_fieldref): Declare. * expr.c (expand_java_field_op): Don't call class_init for accesses to static fields with indirect dispatch. * builtins.c (initialize_builtins): Add "__builtin_expect". * decl.c (soft_resolvepoolentry_node): New variable. (java_init_decl_processing): Create a decl for "_Jv_ResolvePoolEntry". * class.c (build_fieldref_cache_entry): New function. (build_static_field_ref): Rewrite for indirect dispatch. * constants.c (find_name_and_type_constant_tree): New function. (alloc_constant_fieldref): Likewise. (build_constants_constructor): Handle CONSTANT_Fieldref and CONSTANT_NameAndType. PR java/21115 * expr.c (force_evaluation_order): Convert outgoing args smaller than integer. 2005-04-27 Bryce McKinlay <mckinlay@redhat.com> * gcj.texi (libgcj Runtime Properties): Remove obsolete gnu.gcj.runtime.NameFinder.* system properties. Update documentation for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname. 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls to `unlock_stream' with `unlock_std_streams'. 2005-04-25 Jakub Jelinek <jakub@redhat.com> * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H) instead of just expr.h. 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gjavah.c (main): Unlock the stdio streams. * jcf-dump.c (main): Likewise. * jv-scan.c (main): Likewise. * jvgenmain.c (main): Likewise. 2005-04-23 DJ Delorie <dj@redhat.com> * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c, parse.y: Adjust warning() callers. 2005-04-21 Bryce McKinlay <mckinlay@redhat.com> * gcj.texi (Object fields): Change "Integer" to "Int" in example contructor. 2005-04-20 Bryce McKinlay <mckinlay@redhat.com> * gcj.texi: Fix typos and bogus example. 2005-04-19 Kazu Hirata <kazu@cs.umass.edu> * except.c: Fix a comment typo. 2005-04-19 Julian Brown <julian@codesourcery.com> * decl.c (finish_method): Revert patch from 2005-04-13 for breaking indirect dispatch with PIC. 2005-04-18 Andrew Haley <aph@redhat.com> * java-except.h (struct eh_range.handler): Remove unused field. (handle_nested_ranges): Remove function declaration. (sanity_check_exception_range): Add function declaration. * verify.c (verify_jvm_instructions): Remove call to handle_nested_ranges. * verify-glue.c (verify_jvm_instructions_new): Call sanity_check_exception_range. * except.c (link_handler, eh_range_freelist, link_handler, handle_nested_ranges): Remove. (add_handler): Rewrite. (sanity_check_exception_range): New function. (print_ranges): New function. 2005-04-13 Julian Brown <julian@codesourcery.com> * decl.c (finish_method): Give methods once-only linkage. 2005-04-11 Richard Sandiford <rsandifo@redhat.com> * lang.opt: Refer to the GCC internals documentation instead of c.opt. 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * java-tree.h: Don't use PARAMS(). 2005-04-07 Per Bothner <per@bothner.com> * class.c (push_class): By default, suppress debug output. (finish_class): Enable debug output for classes we're emitting. 2005-04-07 Andrew Haley <aph@redhat.com> * gcj.texi: Correct gcj-dbtool instructions. 2005-04-04 Kazu Hirata <kazu@cs.umass.edu> * gcj.texi: Fix a typo. * lang.c: Fix a comment typo. 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com> * gcj.texi (Invoking gij): Add descriptions of new -X options. Mention recognized-and-ignored compatibility options. (Memory allocation): Add descriptions of JvMalloc, JvRealloc and JvFree. (About CNI): Add Memory allocation section. 2005-04-01 Tom Tromey <tromey@redhat.com> * decl.c (java_init_decl_processing): Fix types of _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject, _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray, _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ. 2005-03-31 Jan Hubicka <jh@suse.cz> * Make-lang.in (class.o, decl.o): Depend on cgraph.h. * class.c: Include cgraph.h (make_local_functoin_alias): Mark aslias as needed. * resource.c: Include cgraph.h (compile_resource_data): Go via cgraph interface. 2005-03-30 Ian Lance Taylor <ian@airs.com> * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL. 2005-03-30 Tom Tromey <tromey@redhat.com> * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where inner_class_info_index==0 or outer_class_info_index==0. 2005-03-29 Tom Tromey <tromey@redhat.com> * gcj.texi (libgcj Runtime Properties): Document gnu.gcj.runtime.endorsed.dirs. 2005-03-24 Anthony Green <green@redhat.com> * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to 'gcj-dbtool -p'. 2005-03-23 Tom Tromey <tromey@redhat.com> * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define. (parse_version): Use it. 2005-03-23 Joseph S. Myers <joseph@codesourcery.com> * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove. 2005-03-18 Andrew Haley <aph@redhat.com> PR java/20522 * decl.c (update_aliases): Don't update variables that are about to die. (maybe_poplevels): Add comment. 2005-03-17 Bryce McKinlay <mckinlay@redhat.com> PR java/20502 * jcf-parse.c (duplicate_class_warning): New function. (java_parse_file): Call duplicate_class_warning if CLASS_FROM_CURRENTLY_COMPILED_P is already set. (parse_zip_file_entries): Likewise. Also set CLASS_FROM_CURRENTLY_COMPILED_P. 2005-03-16 Andrew Haley <aph@redhat.com> * expr.c (expand_java_arrayload): Don't generate a NullPointerException based on the type of the node. (build_java_array_length_access): Likewise. 2005-03-15 Zack Weinberg <zack@codesourcery.com> * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi. 2005-03-11 Tom Tromey <tromey@redhat.com> * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'. (libgcj Runtime Properties): Document the default .db. 2005-03-10 Ranjit Mathew <rmathew@hotmail.com> PR java/20312 * parse.y (checks_throws_clauses): Check exceptions list even when the base class does not come from a source file being compiled. (java_complete_lhs): Remove unused variable 'wfl'. 2005-03-09 Ranjit Mathew <rmathew@hotmail.com> PR java/20338 * decl.c (finish_method): Emit _Jv_InitClass for private static methods inside inner classes as well. 2005-03-08 Julian Brown <julian@codesourcery.com> * Revert patch from 2005-03-08 for causing bootstrap failure on ppc-darwin. 2005-03-08 Julian Brown <julian@codesourcery.com> * decl.c (finish_method): Give methods once-only linkage. 2005-03-07 Ranjit Mathew <rmathew@hotmail.com> * lang.c (flag_new_verifier): Enable by default, regardless of ABI. 2005-03-07 Bryce McKinlay <mckinlay@redhat.com> * verify-glue.c (vfy_is_assignable_from): Perform static check using can_widen_reference_to if the C++ ABI is in use. (vfy_get_interface_count, vfy_get_interface): Remove unused functions. * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type, type_isresolved, init_state, set_pc, state_get_pc, _Jv_BytecodeVerifier): Clean up unused and disabled functions. (verify_fail): Report the current PC from the verifier context. (free_state): Remove #if 0 block to enable this function. (free_verifier_context): Call free_state on state_list iterator values before freeing them. * expr.c (pop_type_0): Pop correct type for error message when stack contains a multi-word type. 2005-03-07 Ranjit Mathew <rmathew@hotmail.com> * expr.c (build_java_array_length_access): Remove !flag_new_verifier for known NULL array length access. 2005-03-07 Tom Tromey <tromey@redhat.com> * gcj.texi (Invoking gcj-dbtool): Document '-f'. 2005-03-06 Kazu Hirata <kazu@cs.umass.edu> * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h, typeck.c: Update copyright. 2005-03-06 Ranjit Mathew <rmathew@hotmail.com> Remove xref code. * xref.c, xref.h: Remove file. * Make-lang.in (java/xref.o): Remove. * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration. * lang.c (flag_emit_xref): Remove definition. * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove. * typeck.c (convert): Remove use of do_not_fold. * parse.y (do_not_fold): Remove definition. (parser grammar): Remove xref code. (maybe_create_class_interface_decl, create_class): Likewise. (register_fields, method_header, finish_method_declaration): Likewise. (declare_local_variables, source_end_java_method): Likewise. (java_complete_expand_classes): Do not set do_not_fold. (java_complete_expand_method): Remove xref code. (java_expand_classes, resolve_field_access, patch_invoke): Likewise. (java_complete_tree, java_complete_lhs, patch_assignment): Likewise. (patch_binop, build_string_concatenation, patch_array_ref): Likewise. (patch_synchronized_statement, patch_throw_statement): Likewise. (maybe_build_class_init_for_field): Likewise. 2005-03-05 Kazu Hirata <kazu@cs.umass.edu> * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P instead of IS_NON_TYPE_CODE_CLASS. 2005-03-04 Andrew Haley <aph@redhat.com> PR java/18362 * class.c (set_method_index): Don't set method_index if it is NULL_TREE. (layout_class_method): Don't complain about "non-static method foo overrides static method" in the case of indirect dispatch. 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic warning. * Make-lang.in: Don't elide warnings in jcf-io.c. 2005-03-01 Per Bothner <per@bothner.com> PR java/8608 * check-init.c (wfl): Remove static. (final_assign_error, check_init): Replace calls to parse_error_context by plain error. (check_init): Save, set, and restore input_location for each exp. 2005-03-01 Per Bothner <per@bothner.com> * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45) if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined. * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents. 2005-03-01 Per Bothner <per@bothner.com> * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro. 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com> PR libgcj/16923 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and JvVMOption. 2005-02-22 Tom Tromey <tromey@redhat.com> PR java/20056: * verify-impl.c (EITHER): New define. (types_compatible): Handle it. (check_field_constant): Use it. 2005-02-18 Tom Tromey <tromey@redhat.com> PR java/20056: * verify-impl.c (types_equal): Fixed test. PR java/20056: * verify-glue.c (vfy_class_has_field): New function. * verify.h (vfy_class_has_field): Declare. * verify-impl.c (check_field_constant): Added 'putfield' argument. (verify_instructions_0): Updated. (types_equal): New function. 2005-02-14 Tom Tromey <tromey@redhat.com> PR java/19921: * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the stack effect of multianewarray. 2005-02-14 Andrew Haley <aph@redhat.com> PR java/19907 * expr.c (expand_byte_code): Call promote_arguments(). (promote_arguments): New function. * decl.c (check_local_unnamed_variable): Remove special case for new verifier. (find_local_variable): Promote all boolean types to int when searching for local variable decls. 2005-02-12 Kazu Hirata <kazu@cs.umass.edu> * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c, parse-scan.y: Update copyright. 2005-02-11 Per Bothner <per@bothner.com> PR java/15543 * parse-scan.y (input_location): Remove variable. (main_input_filename): New - replaces input_filename, which isn't settable if USE_MAPPED_LOCATION. * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE, so we don't reference input_location or wfl_operator in that case. * jv-scan.c (expand_location): Remove - no longer used. (main): Set main_input_filename rather than input_filename. 2005-02-09 Richard Henderson <rth@redhat.com> * builtins.c (initialize_builtins): Call build_common_builtin_nodes. * decl.c (java_init_decl_processing): Initialize const_ptr_type_node. 2005-02-08 Marcin Dalecki <martin@dalecki.de> * expr.c (add_type_assertion): Use the proper enumeration type, since this is what htab_find_slot() is expecting. 2005-02-06 Joseph S. Myers <joseph@codesourcery.com> * gcj.texi: Update copyright dates. 2005-02-02 Tom Tromey <tromey@redhat.com> * gcj.texi (libgcj Runtime Properties): Default library_control to 'cache'. 2005-02-02 Ranjit Mathew <rmathew@hotmail.com> PR java/15543 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$ (modifiers) when square brackets are present in a declaration for a final paramter. * jv-scan.c (main): Set input_filename and input_line. 2005-02-01 Tom Tromey <tromey@redhat.com> PR java/19742: * gjavah.c (get_field_name): Don't override name for JNI header. 2005-02-01 Roger Sayle <roger@eyesopen.com> * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR of unsigned types using iushr and lushr JVM bytecodes. 2005-02-01 Ranjit Mathew <rmathew@hotmail.com> PR java/19738 * gjavah.c (jni_print_float): Do not emit floating-point initialiser for a static final field. (jni_print_double): Likewise. 2005-02-01 Mark Mitchell <mark@codesourcery.com> Revert: 2005-01-31 Mark Mitchell <mark@codesourcery.com> * gjavah.c (print_field_info): Mark static data members of floating-point type with "__extension__". 2005-01-31 Mark Mitchell <mark@codesourcery.com> * gjavah.c (print_field_info): Mark static data members of floating-point type with "__extension__". 2005-02-01 Ranjit Mathew <rmathew@hotmail.com> PR java/9157 * parse.y (build_string_concatenation): Remove redundant if. (patch_conditional_expr): Attempt to patch_string() the condition of a ?: as well, in addition to its other operands. 2005-01-25 Tom Tromey <tromey@redhat.com> * Make-lang.in (java/java-tree-inline.o): Removed. 2005-01-25 Ranjit Mathew <rmathew@hotmail.com> PR java/19070 * parse.y (patch_binop): Allow comparisons against NULL only if the other operand is of a reference type. 2005-01-24 Tom Tromey <tromey@redhat.com> * java-tree.h (gcj_abi_version): Declare. * class.c (make_class_data): Push gcj_abi_version into "next" field. Renamed field. * decl.c (gcj_abi_version): New global. (parse_version): New function. (java_init_decl_processing): Call it. Renamed 'next' field. Include version.h. (GCJ_BINARYCOMPAT_ADDITION): New define. 2005-01-24 Roger Sayle <roger@eyesopen.com> PR java/19295 * jcf-write.c (generate_bytecode_insns): Conversions between integer types of the same precision shouldn't generate widening or narrowing conversion bytecodes. 2005-01-22 Kazu Hirata <kazu@cs.umass.edu> * java-except.h, java-tree.h: Remove unused prototypes. 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org> PR java/18091: * jcf-write.c (perform_relocations): Don't call memcpy if source and destination are the same. 2005-01-17 Tom Tromey <tromey@redhat.com> * verify-impl.c (get_short): Sign extend. (get_int): Likewise. 2005-01-12 Ranjit Mathew <rmathew@hotmail.com> * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT with TYPE_SIZE. 2005-01-10 Ranjit Mathew <rmathew@hotmail.com> * verify.c: Revert to the version before the BC-ABI merge. 2005-01-10 Ranjit Mathew <rmathew@hotmail.com> PR java/19277 * check-init.c (check_init): Take care of references that do not have an explicit final variable declaration (e.g. array length access) for pre/post in/de-crement operators. 2005-01-08 Mark Wielaard <mark@klomp.org> * parse.y (process_imports): Allocate (and free) original_name only when not already defined. * jcf-parse.c (read_class): Free results of find_class() and lrealpath(). (java_parse_file): Keep pointer to head of file_list and free when done. Free result of lrealpath(). 2005-01-05 Tom Tromey <tromey@redhat.com> * gcj.texi (Standard Properties): java.ext.dirs is now used. 2004-12-20 Andrew Haley <aph@redhat.com> * typeck.c: Use fold_convert for ints and booleans. 2004-12-17 Andrew Haley <aph@redhat.com> PR java/18931 * typeck.c (convert): Use a CONVERT_EXPR when converting to BOOLEAN_TYPE or CHAR_TYPE. (convert_to_boolean, convert_to_char) : Remove. * convert.h (convert_to_boolean, convert_to_char) : Remove. * expr.c (expand_load_internal): Do type conversion if type is not as required. 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net> PR target/18459 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION. Update comment. 2004-12-07 Andrew Haley <aph@redhat.com> PR java/18811: * jcf-parse.c (load_class): Remove sanity test for missing inner class file. 2004-12-06 Tom Tromey <tromey@redhat.com> * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool. (java.uninstall): Likewise. (java.maintainer-clean): Likewise. (.INTERMEDIATE): Likewise. (java.install-man): Likewise. (gcj-dbtool.pod): New target. * gcj.texi (Code Generation): Document -findirect-dispatch. (libgcj Runtime Properties): Document gnu.gcj.precompiled.db.path. (Top): Link to "Invoking gcj-dbtool". 2004-12-06 Tom Tromey <tromey@redhat.com> PR java/14853: * java-tree.h (extract_field_decl): Declare. * parse.y (extract_field_decl): Renamed from strip_out_static_field_access_decl. No longer static. * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs. 2004-12-03 Tom Tromey <tromey@redhat.com> * lang.c (flag_new_verifier): Define. (java_post_options): Set flag_new_verifier if indirect dispatch is being used. * lang.opt (fnew-verifier): Removed. 2004-12-03 Tom Tromey <tromey@redhat.com> PR bootstrap/14614: * Make-lang.in (java.install-common): Only install transformed gcjh if gcj-cross exists. 2004-12-03 Andrew Haley <aph@redhat.com> PR java/18812 * except.c (link_handler): Patch 'outer' field of siblings of the range we're demoting. 2004-12-03 Andrew Haley <aph@redhat.com> PR java/18697 * class.c (layout_class_method): Don't fail to override a method simply because it has DECL_ARTIFICIAL set. 2004-12-02 Tom Tromey <tromey@redhat.com> PR java/16675: * parse.y (craft_constructor): Special case null_pointer_node. 2004-12-02 Tom Tromey <tromey@redhat.com> PR java/18741: * java-gimplify.c (java_gimplify_expr): Don't call SET_EXPR_LOCATION unless wrapped tree is an expression. 2004-11-27 Per Bothner <per@bothner.com> * jcf-parse.c (set_source_filename): Improvement to Andrew's fix: Fix fencepost error in 'i', which got executed one too many times. Also, fold memcpy into explicit loop, as originally intended. Also, free temporary 'buf' which otherwise leaks. 2004-11-27 Per Bothner <per@bothner.com> * expr.c (build_expr_wfl): Only declare last_file and last_filenode local static variables if not USE_MAPPED_LOCATION. 2004-11-27 Kazu Hirata <kazu@cs.umass.edu> * class.c, decl.c, expr.c: Fix comment typos. 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu> PR java/18305 * decl.c (end_java_method): Call attach_init_test_initialization_flags on all the init_decls. * parse.y (attach_init_test_initialization_flags): Move to ... * expr.c (attach_init_test_initialization_flags): here and support BIND_EXPR also. * java-tree.h (attach_init_test_initialization_flags): Prototype. * jcf-parse.c (parse_class_file): Don't disable class init optimization. 2004-11-25 Joseph S. Myers <joseph@codesourcery.com> * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote in diagnostics. 2004-11-24 Richard Henderson <rth@redhat.com> * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type, vfy_string_type, vfy_throwable_type): Use ANSI declaration form. 2004-11-24 Tom Tromey <tromey@redhat.com> * verify.c (defer_merging): Don't use C++-style comment. * verify.h (java_opcode): Added java_opcode_end. * class.c (build_class_ref): Remove C++ comment and old FIXME. * verify-impl.c (vfy_push_type): Removed bogus "return". (initialize_stack): Use vfy_alloc and vfy_free. (verify_instructions_0): Likewise. * Merged gcj-abi-2-dev-branch to trunk. 2004-11-24 Andrew Haley <aph@redhat.com> * jcf-parse.c (parse_class_file): Set file_start_location. 2004-11-10 Tom Tromey <tromey@redhat.com> * class.c (make_field_value): Don't call build_static_field_ref. (build_static_field_ref): Don't emit direct references when using indirect dispatch. * gcj.texi (Invoking gij): Document -verbose. Put -verbose and -verbose:class into man page synopsis. 2004-11-09 Tom Tromey <tromey@redhat.com> * expr.c (build_java_arraystore_check): Still generate check if element type is itself an array. 2004-11-08 Tom Tromey <tromey@redhat.com> * java-tree.h (soft_check_assignment_node): Removed. (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE. * decl.c (java_init_decl_processing): Don't initialize soft_check_assignment_node. 2004-11-05 Tom Tromey <tromey@redhat.com> * class.c (layout_class_methods): Don't add Miranda methods when using indirect dispatch. 2004-11-05 Bryce McKinlay <mckinlay@redhat.com> * class.c (make_class_data): Call emit_assertion_table to set the 'assertion_table' field. (build_signature_for_libgcj): Move here from expr.c. (add_assertion_table_entry): New function. Callback for assertion hashtable traversal. (emit_assertion_table): New. Take class argument, and generate assertion table DECL based on the TYPE_ASSERTIONS hashtable. * decl.c (init_decl_processing): Define assertion_entry_type record. Push 'assertion_table' class field instead of 'verify'. * expr.c (type_assertion_eq): Compare 'assertion_code' field. (type_assertion_hash): Include 'assertion_code' in hash. (add_type_assertion): Rewritten. Take class and assertion_code arguments. Add assertions to the TYPE_ASSERTIONS hashtable. (can_widen_reference_to): Use new add_type_assertion() arguments. * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE, JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE. (verify_identifier_node): Removed. (assertion_entry_type, assertion_table_type): New. (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type assertion code definitions. (struct type_assertion): Add assertion_code. Rename 'source_type' and 'target_type' to 'op1' and 'op2'. (add_type_assertion): Declare. (lang_printable_name_wls): Remove unused definition. * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion to emit runtime assertion. (vfy_note_stack_type): Clean up non-C90 declarations. (vfy_note_local_type): Likewise. * verify.h (vfy_is_assignable_from): Declare. * verify-impl.c (is_assignable_from_slow): Remove unused function. (ref_compatible): Rename arguments. Call vfy_is_assignable_from() instead of is_assignable_from_slow(). (types_compatible): Reinstate ref_compatible() call. 2004-11-04 Tom Tromey <tromey@redhat.com> * class.c (build_static_field_ref): Reverted previous patch. * class.c (build_static_field_ref): Don't emit direct references when using indirect dispatch. 2004-11-03 Tom Tromey <tromey@redhat.com> * expr.c (expand_java_arrayload): Set lhs_type_node. (expand_java_arraystore): Set rhs_type_node. 2004-11-02 Tom Tromey <tromey@redhat.com> * jcf-parse.c (compute_class_name): Use filename length from zip directory, not strlen. * expr.c (expand_invoke): Mark new interface methods as abstract. 2004-11-01 Tom Tromey <tromey@redhat.com> * verify-impl.c (push_jump): Removed check for uninitialized objects. (push_exception_jump): Likewise. (handle_ret_insn): Likewise. (handle_jsr_insn): Likewise. (state_check_no_uninitialized_objects): Removed. * decl.c (check_local_unnamed_variable): Recognize promoted-to-int parameters when using the new verifier. * expr.c (expand_java_arraystore): Explicitly request array type when using new verifier. (expand_java_arrayload): Likewise. (invoke_build_dtable): Don't pass object_type_node as expression argument to build_java_indirect_ref. (build_java_check_indexed_type): Do nothing. (build_java_arraystore_check): Handle case where array doesn't have array type. (build_java_array_length_access): Likewise. (expand_invoke): Handle case where interface overrides a method from Object. (pop_type_0): Always succeed for reference types. (process_jvm_instruction): Don't pop a value in a dead exception handler. (pop_arguments): Convert arguments to correct types. 2004-10-29 Andrew Haley <aph@redhat.com> * jcf-parse.c (give_name_to_class): Remove line that was incorrectly merged. 2004-10-29 Andrew Haley <aph@redhat.com> * jcf-parse.c (set_source_filename): Add code to build new sfname. 2004-10-20 Andrew Haley <aph@redhat.com> * decl.c (end_java_method): Don't expand if flag_syntax_only. 2004-10-26 Tom Tromey <tromey@redhat.com> * verify.h (vfy_notify_verified): Removed. * verify-glue.c (vfy_notify_verified): Removed. 2004-10-26 Tom Tromey <tromey@redhat.com> * verify-impl.c (debug_print_state): Declare `i' before code. (merge_types): Modify `t' when it is null_type. 2004-10-26 Tom Tromey <tromey@redhat.com> * verify-impl.c (type_print): Renamed from print. Now static and takes an argument. (debug_print_state): Use type_print. 2004-10-25 Tom Tromey <tromey@redhat.com> * expr.c (build_invokeinterface): Compute correct offset for index into interface methods. 2004-10-20 Tom Tromey <tromey@redhat.com> * java-tree.h (verify_jvm_instructions_new): Declare. * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1 command line. * verify-impl.c (verify_instructions): Correctly handle wide types on the stack. * verify-glue.c (vfy_get_class_name): Use DECL_NAME. (vfy_get_component_type): Strip pointer types. (vfy_find_class): Use get_type_from_signature. Strip pointer types. Include java-except.h. 2004-10-20 Bryce McKinlay <mckinlay@redhat.com> * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t, vfy_push_type_t, set_variable, add_new_state, merge_into, handle_jsr_insn, branch_prepass, check_class_constant, check_wide_constant, get_one_type, compute_static_types, verify_instructions_0): Clean up C99 declarations after statements. 2004-10-20 Tom Tromey <tromey@redhat.com> * verify-impl.c (merge_refs): Compare reference against iterator, not ref2. * verify-glue.c (vfy_tag): Mask off resolved flag. 2004-10-19 Tom Tromey <tromey@redhat.com> * verify-impl.c (verify_instructions): Call vfy_note_local_type. (init_state_with_stack): Initialize `this_type' in state. (verify_method): Use debug_print. * verify-glue.c (vfy_is_primitive): Removed debugging print. (vfy_note_stack_depth): Reverted last patch. (vfy_note_stack_type): Note pointer to Object, not Object. (vfy_note_local_type): Likewise. * verify.h (vfy_note_instruction_seen): Declare. * verify-glue.c (verify_jvm_instructions_new): Set BCODE_EXCEPTION_TARGET on target instruction. (vfy_note_instruction_seen): New function. * verify-impl.c (FLAG_INSN_SEEN): New define. (verify_instructions_0): Set flag on instruction. Save state for PC=0 later. (verify_instructions): Call vfy_note_instruction_seen. * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error. (verify_jvm_instructions_new): Call method_init_exceptions, add_handler, and handle_nested_ranges. * verify-impl.c (verify_method): Return 1 on success. (verify_instructions_0): Save the state at PC=0. * verify-impl.c (init_type_from_class): Set is_resolved and ref_next on new ref_intersection. (init_type_from_string): Likewise. 2004-10-15 Bryce McKinlay <mckinlay@redhat.com> * expr.c (expand_bytecode): Use verify_jvm_instructions_new if flag_new_verifier is set. * java-tree.h (flag_new_verifier): Declare. * lang.opt (fnew-verifier): New option. * verify-impl.c: Work around namespace pollution by undef'ing 'current_class'. (struct verifier_context): Make 'bytecode' const. (verify_fail_pc): Pass -1 PC argument to vfy_fail. (types_compatible): For the BC-ABI, always consider reference types compatible. (check_class_constant): Use vfr->current_class. (check_constant): Likewise. (check_wide_constant): Likewise. (check_field_constant): Check for 'L' at start of type name. (get_one_type): Return pointer instead of type. Set type result in caller via passed type pointer. (compute_argument_types): Update to use new get_one_type arguments. (compute_return_type): Likewise. (make_verifier_context): New. Allocate and initialize 'vfr'. (free_verifier_context): New. Free 'vfr' and its contents. (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context and free_verifier_context. 2004-10-15 Tom Tromey <tromey@redhat.com> * verify-glue.c (vfy_note_local_type): Mark argument as unused. * verify.h (vfy_fail): Fixed formatting. * verify-impl.c (vfr): Fixed comment formatting. (collapse_type): New function. (verify_instructions): Notify compiler about type map. * verify.h (vfy_note_stack_depth): Updated. (vfy_note_stack_type): Likewise. (vfy_note_local_type): Likewise. (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type): Declare. * verify-glue.c (vfy_note_stack_depth): Correctly size type state. Added `method' argument. (vfy_note_stack_type): Renamed from vfy_note_type. Added `method' argument. (vfy_note_local_type): New function. (vfy_unsuitable_type): Likewise. (vfy_return_address_type): Likewise. (vfy_null_type): Likewise. * verify.h (VFY_IN_GCC): Removed. (VFY_WANT_TYPEMAP): Removed. * verify-impl.c (verify_instructions_0): Removed useless "\". (struct state) <next>: Uncomment. 2004-10-13 Bryce McKinlay <mckinlay@redhat.com> * verify-impl.c: Formatting fixes. Reformat C++-style comments to C-style. 2004-10-06 Bryce McKinlay <mckinlay@redhat.com> * Make-lang.in (verify.o): Re-enabled this target. * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED. (vfy_get_interface): Likewise. (verify_jvm_instructions_new): Renamed from verify_jvm_instructions. * verify.h (verify_jvm_instructions_new): Declare. * verify-impl.c (free_state): Temporarily comment out unused function. 2004-10-06 Tom Tromey <tromey@redhat.com> * java-tree.h (JV_STATE_READ): New enum value. 2004-10-06 Bryce McKinlay <mckinlay@redhat.com> * verify.h: New file. 2004-10-05 Bryce McKinlay <mckinlay@redhat.com> * verify-impl.c, verify-glue.c, verify.h: New files. * Make-lang.in: Add rules for verify-impl.o and verify-glue.o. 2004-09-24 Andrew Haley <aph@redhat.com> * decl.c (check_local_unnamed_variable): Always use the PARM_DECL for a slot if it's of pointer type. 2004-09-14 Tom Tromey <tromey@redhat.com> * class.c (make_class_data): Correctly initialize "state" field. Initialize "engine" field. * decl.c (java_init_decl_processing): Add "engine" field. 2004-09-10 Andrew Haley <aph@redhat.com> PR java/12760 * expr.c (build_invokeinterface): Use fast method for interface dispatch. * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE, JTI_ITABLE_PTR_TYPE. (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl. (emit_symbol_table): Add new arg, element_size. * decl.c (java_init_decl_processing): Initialize Class.itable. * class.c (GEN_TABLE): New macro. (gen_indirect_dispatch_tables): Use it. Add itable. (make_class_data): Add new arg for emit_symbol_table(). Emit itable. (add_miranda_methods): Make sure search_class has been parsed. (emit_symbol_table): Add new arg, element_size. 2004-09-06 Andrew Haley <aph@redhat.com> * verify.c (merge_types): Return Object for all merges of interfaces. * expr.c (add_type_assertion): Don't generate assertions when source type is array of Object. 2004-09-03 Andrew Haley <aph@redhat.com> * class.c (finish_class): Nullify TYPE_VERIFY_METHOD. * lang.c (java_post_options): Force flag_verify_invocations if we're not using indirect dispatch. * expr.c (pop_type_0): Move test for interfaces before call to can_widen_reference_to(). (build_signature_for_libgcj): Remove generation of canonical array type. (add_type_assertion): Canonicalize both arrays. Don't assert that type X can be assigned to Object. Don't assert that type X an be assigned to type X. Don't assert that Object can be assigned to type X. (can_widen_reference_to): Warn whenever we generate an assertion. (process_jvm_instruction): Use throwable_type_node for the type of an exception class. 2004-09-01 Andrew Haley <aph@redhat.com> * decl.c (java_init_decl_processing): Change verify_identifier_node to "__verify". * expr.c (add_type_assertion): Use verify_identifier_node for name. * java-tree.h (verify_identifier_node): Change to "__verify". * expr.c (build_signature_for_libgcj): New function. (add_type_assertion): Use it to construct signatures for source_type and target_type. 2004-08-27 Andrew Haley <aph@redhat.com> * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE. (verify_identifier_node): New. (TYPE_VERIFY_METHOD): New. (struct type_assertion): New type. * expr.c (type_assertion_eq): New function. (type_assertion_hash): New function. (add_type_assertion): New function. (can_widen_reference_to): Call add_type_assertion(). * decl.c (java_init_decl_processing): Add verify_identifier_node. * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type). (finish_class): Output TYPE_VERIFY_METHOD (type). * decl.c (end_java_method): Nullify unused fields. 2004-08-17 Andrew Haley <aph@redhat.com> * verify.c (defer_merging): Quieten. * jcf-parse.c (load_class): Only try to open a class file if it's java.lang.Object or if it's part of the current compilation. Check that the class we just tried to load is the class we just loaded. Quieten. (java_parse_file): Set flag_verify_invocations off if we're compiling from .class. (parse_zip_file_entries): Abort if we try to read a dummy class. * expr.c (can_widen_reference_to): Quieten. (build_invokevirtual): Abort if we try to invokevirtual an interface. (expand_invoke): Don't build a non-interface call to an interface. (build_instanceof): Don't do premature optimization if flag_verify_invocations is not set. * class.c (set_super_info): Disable code that inherits TYPE_DUMMY from superclass. (build_static_field_ref): Add correct type conversion for field_address. (add_miranda_methods): Disable generation of Miranda methods for dummy classes. (layout_class_method): Don't complain about non-static method overrides static method with dummy classes. 2004-08-13 Tom Tromey <tromey@redhat.com> * class.c (build_static_field_ref): Re-enable atable lookups for static fields. * parse.y (strip_out_static_field_access_decl): Indentation fix. 2004-08-11 Tom Tromey <tromey@redhat.com> * gcj.texi (libgcj Runtime Properties): Document new properties. 2004-08-06 Andrew Haley <aph@redhat.com> * jcf-parse.c (load_class): Check that we really have loaded the class we're looking for. 2004-07-19 Andrew Haley <aph@redhat.com> * verify.c (verify_jvm_instructions): Comment change only. * typeck.c (build_java_array_type): Add size field to array name. * java-tree.h (LOCAL_SLOT_P): New. (update_aliases): Add PC argument. (pushdecl_function_level): New function. * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL, MODIFY_EXPR, and SAVE_EXPR. (java_gimplify_modify_expr): New function. * expr.c (push_type_0): Call find_stack_slot() to create temporary. (expand_iinc): Pass PC to update_aliases(). (STORE_INTERNAL): Likewise. (process_jvm_instruction): Likewise. * decl.c (base_decl_map): New variable. (uniq): New variable. (update_aliases): Rewrite with more thorough checking. (debug_variable_p): New function. (push_jvm_slot): Don't initialize local variable. Don't pushdecl. (check_local_named_variable): Delete whole function. (initialize_local_variable): New function. (check_local_unnamed_variable): Add checks and comments. (find_local_variable): Rewrite. (java_replace_reference): New function. (function_binding_level): New variable. (pushdecl_function_level): New function. (maybe_pushlevels): Set DECL_LOCAL_END_PC. (maybe_pushlevels): Call pushdecl() on each of the new decls. (start_java_method): Reset uniq. Create base_decl_map. Set function_binding_level. (end_java_method): Null unused fields to save memory. 2004-06-29 Andrew Haley <aph@redhat.com> * except.c (expand_start_java_handler): Push a new binding level. Don't build a TRY_CATCH_EXPR now, we'll do it later. Call register_exception_range() to register where we'll do it. (expand_end_java_handler): Remove old bogus code. Replace with new logic that simply builds TRY_CATCH_EXPRs and inserts them at the top of the expression we're curently building. (maybe_end_try): Delete. * decl.c (binding_level.exception_range): New field. (clear_binding_level): Add field exception_range. Reformat. (poplevel): Call expand_end_java_handler(). (poplevel): Call java_add_stmt only if functionbody is false. (maybe_poplevels): Don't call maybe_end_try() from here. (end_java_method): Clear no longer used trees in function decl. (register_exception_range): New function. * java-tree.h (register_exception_range, struct eh_range): Declare. 2004-06-22 Andrew Haley <aph@redhat.com> * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of the otable. * check-init.c (get_variable_decl): Teach check-init about FIELD_DECLs addressed via the otable. * jcf-parse.c (load_class): Check CLASS_LOADED_P, not CLASS_PARSED_P. 2004-05-28 Andrew Haley <aph@redhat.com> * jcf-parse.c (load_class): Don't try to read a class that we've already read. * expr.c (build_invokeinterface): Use the old-fashioned way of doing indirect dispatch: look up interfaces by name. * java-tree.h (enum java_tree_index): Add JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE * decl.c (java_init_decl_processing): Add soft_lookupinterfacemethodbyname_node. * gjavah.c (print_method_info): Final methods have vtable entries, so gjavah needs to output them. * class.c (layout_class_method): Generate vtable entries for final methods. * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect dispatch, even if a method is final. 2004-05-25 Andrew Haley <aph@redhat.com> * class.c (build_symbol_entry): Convert the names of constructors to init_identifier_node when generating an entry for the indirect dispatch table. * expr.c (build_known_method_ref): Generate indirect calls for all methods marked DECL_EXTERNAL or TREE_PUBLIC. 2004-05-24 Andrew Haley <aph@redhat.com> * expr.c (build_known_method_ref): Make sure ARRAY_REF access to atable element is of the right type. * class.c (build_static_field_ref): Cast pointer to correct type for field. 2004-04-20 Bryce McKinlay <mckinlay@redhat.com> * Merged with HEAD as of 20040514. Diff against gcj-abi-2-merge-20040514. 2004-04-16 Andrew Haley <aph@redhat.com> * verify.c (check_pending_block): Disable subroutine checks. (defer_merging): New function. (merge_types): If types are dummy, use defer_merging to combine them. (verify_jvm_instructions): If invocation is invokeinterface and target is dummy, assume target really is an interface. * parse.y (patch_invoke): Break out call to java_create_object. * lang.c (flag_verify_invocations): New. * jcf-parse.c (load_class): If we've already failed to load a class, don't try again. (load_class): If we can't find a .class file, don't fail, but emit a warning. (parse_class_file): Don't act on dummy methods. * java-tree.h (flag_verify_invocations): New. (TYPE_DUMMY): New. (lang_type.dummy_class): New field. (java_create_object): New function. (METHOD_DUMMY): New. * expr.c (build_field_ref): Widen field offset. (pop_type_0): If the type in stack_type_map is a TREE_LIST, check that each of its elements is compatible with the one we're popping. (pop_type_0): Issue a warning to say that we need to generate a runtime check. (java_create_object): New function. (build_field_ref): Only generate hard refs if we're not using indirect dispatch. (expand_java_field_op): If we're using !verify_invocations and we see a missing field, generate a decl for it. (expand_invoke): If a class doesn't have the method we seek and we're using !flag_verify_invocations, generate a decl for the method now. (build_known_method_ref): Always use indirect dispatch via the atable for static methods. (expand_java_NEW): Break out object creation into new function, java_create_object. (can_widen_reference_to): Issue a warning to say that we need to generate a runtime check. * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass. (make_method_value): Also use index for interfaces. (make_class_data): Skip dummy field for inherited data. Don't build method array for dummy methods. Set size_in_byte to -1 when using inirect dispatch Don't build a hard class ref if we don't have a hard ref to our superclass, or if we're using inirect dispatch. Null out dispatch tables. (layout_class_method): Don't complain about non-static method overrides static method is method is artificial. (build_static_field_ref): Disable atable references to static fields for the time being. (layout_class_methods): Check for CLASS_INTERFACE as well as CLASS_ABSTRACT. 2004-11-24 Steven Bosscher <stevenb@suse.de> * class.c (make_class_data): Don't check flag_inline_functions. * lang.c (flag_really_inline): Remove unused flag. (java_handle_option): Don't set it here. Remove special handling of flag_inline_functions for Java. (java_init): Don't set flag_inline_trees here. Already done... (java_post_options): ...here. Don't clear flag_inline_functions. 2004-11-24 Steven Bosscher <stevenb@suse.de> * java-gimplify.c (java_gimplify_labeled_block_expr): New function. (java_gimplify_exit_block_expr): New function. (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and LABELED_BLOCK_EXPR. * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def. (EXIT_BLOCK_EXPR): Likewise. * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h. (LABELED_BLOCK_BODY): Likewise. (EXIT_BLOCK_LABELED_BLOCK): Likewise. * jcf-write.c (generate_bytecode_insns): Don't handle the unused EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR. (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the second operand of EXIT_BLOCK_EXPR. * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of TREE_OPERAND. (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes. 2004-11-23 Ben Elliston <bje@au.ibm.com> * xref.h (xref_flag_value): Remove. (xref_set_data, xref_get_data): Likewise. (xref_set_current_fp): Likewise. (XREF_NONE): Likewise. (XREF_GET_DATA): Likewise. * xref.c (xref_flag_value): Remove. (xref_set_data, xref_get_data): Likewise. (xref_set_current_fp): Likewise. 2004-11-23 Ben Elliston <bje@au.ibm.com> * gjavah.c (output_directory): Make static. (temp_directory): Likewise. 2004-11-15 Tom Tromey <tromey@redhat.com> * decl.c (instn_ptr_type_node): Removed. (lineNumbers_ptr_type_node): Removed. (jint_type): Removed. (jint_ptr_type): Removed. 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu> PR java/15576 * check-init.c (check_init): Ignore DECL_EXPR. * expr.c (always_initialize_class_p): Reenable. (build_class_init): Use a variable to store the decl. Also use boolean_false_node instead of integer_zero_node. * parse.y (attach_init_test_initialization_flags): Add a decl_expr to the block. 2004-11-08 Tom Tromey <tromey@redhat.com> PR java/16843: * gjavah.c (HANDLE_END_FIELD): Call print_field_info when generating a JNI header. (print_field_info): Handle JNI headers. (jni_print_float): Likewise. (jni_print_double): Likewise. 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu> * decl.c (end_java_method): Remove duplicated code. 2004-11-06 Zack Weinberg <zack@codesourcery.com> Gerald Pfeifer <gerald@pfeifer.com> * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H as well. 2004-11-02 Bryce McKinlay <mckinlay@redhat.com> PR java/17265 * class.c: Reinstate 2004-08-18 patch. (make_local_function_alias): Don't create an alias for extern (native) functions. 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr> PR java/17265 * class.c (make_local_function_alias): Revert 2004-08-18 change. (make_method_value): Likewise. 2004-10-21 Andrew Haley <aph@redhat.com> PR java/18091: * jcf-parse.c (set_source_filename): Add code to build new sfname. 2004-10-20 Andrew Haley <aph@redhat.com> * decl.c (end_java_method): Don't expand if flag_syntax_only. Remove duplicated code block. 2004-10-18 Steven Bosscher <stevenb@suse.de> * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn): New rules to work around old Bison warnings. 2004-10-17 Steven Bosscher <stevenb@suse.de> * class.c (ident_subst): Always alloca buffer. * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy opcode after including javaop.def. * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the conditional expression that exits, to avoid warnings. * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as a user of an extension. * win32-host.c: Move check down to have non-empty file when WIN32 is not defined. * Make-lang.in (java-warn): Add STRICT_WARN. (java/jcf-io.o-warn): Don't have Werror for this file. * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use. 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com> * expr.c (expr_add_location): Move declaration to before all statements. * parse.y (java_expand_classes): Ditto. * lex.c (java_peek_unicode): Ditto. 2004-10-16 Ranjit Mathew <rmathew@hotmail.com> * check-init.c: Use %<, %> and %q for quoting in diagnostics, if possible, else convert `foo' to 'foo'. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * lang.c: Likewise. * lex.c: Likewise. * parse.h: Likewise. 2004-10-16 Ranjit Mathew <rmathew@hotmail.com> * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and rename parameter 'msg' to 'msgid' in function declaration. (issue_warning_error_from_context): Likewise. (yyerror): Rename parameter 'msg' to 'msgid'. (all over): Use new quoting style for diagnostics. 2004-10-15 Kazu Hirata <kazu@cs.umass.edu> * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c, jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c: Update copyright. 2004-10-14 Matt Austern <austern@apple.com> * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct pointer_set_t* now. 2004-10-13 Tom Tromey <tromey@redhat.com> PR java/15578: * lang.opt (--extdirs): Document. * jvspec.c (lang_specific_driver): Recognize -encoding and -extdirs. 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com> * parse.y (issue_warning_error_from_context): Use va_list * instead of va_list parameter. (parse_error_context): Update call. (parse_warning_context): Likewise. 2004-10-05 Zack Weinberg <zack@codesourcery.com> * parse.y, parse-scan.y: Add list of diagnostic messages to insulate translation template from version of yacc/bison used to compile the grammar. 2004-10-05 Ranjit Mathew <rmathew@hotmail.com> Prepare for %q, %< and %> in diagnostic message strings. * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2. Name second parameter 'msgid'. * parse.y: Additionally include pretty-print.h and diagnostic.h. (issue_warning_error_from_context): Use pretty-printer functions instead of vsprintf for constructing formatted messages. Rename parameter 'msg' to 'msgid'. (parse_error_context): Rename parameter 'msg' to 'msgid'. (parse_warning_context): Likewise. 2004-10-05 Andrew Haley <aph@redhat.com> PR java/17779 * jcf-parse.c (parse_zip_file_entries): If a class has a superclass and a TYPE_SIZE of zero, lay it out. 2004-09-30 Andrew Haley <aph@redhat.com> PR java/17733 * jcf-parse.c (compute_class_name): Rewrite. 2004-10-01 Jan Hubicka <jh@suse.cz> * java.c (java_expand_body): Update call of tree_rest_of_compilation. 2004-10-01 Kazu Hirata <kazu@cs.umass.edu> * lex.c: Fix a comment typo. 2004-10-01 Kazu Hirata <kazu@cs.umass.edu> * java-tree.h: Fix a comment typo. 2004-09-30 Per Bothner <per@bothner.com> Simplify lexer. Implement --enable-mapped-location support. * jcf-parse.c (parse_class_file): Use linemap_line_start. (parse_source_file_1): Pass filename as extra parameter, so we can call linemap_add and set input_location here, rather than in both callers. (read_class): Pass copied filename to parse_source_file_1. Don't initialize wfl_operator - only needed for source compilation. (read_class, jcf_parse): Call linemap_add with LC_LEAVE. * lex.h: Remove a bunch of debugging macros. * lex.h (struct_java_line, struct java_error): Remove types. (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead. (struct java_lc_s): Remove prev_col field. (struct java_lexer): New fields next_unicode, next_columns, and avail_unicode. New position field, and maybe token_start field. Don't need hit_eof field - use next_unicode == -1 instead. (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR. (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly. * parse.h: Various changes for USE_MAPPED_LOCATION. (EXPR_WFL_EMIT_LINE_NOTE): XXX (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros. (struct parser_ctxt): New file_start_location field. Remove p_line, c_line fields since we no longer save lines. Remove elc, lineno, and current_jcf fields - no longer used. * parse.y: Updates for USE_MAPPED_LOCATION and new lexer. Don't use EXPR_WFL_ADD_COL since that isn't trivial with source_location and is probably not needed anymore anyway. Use new expr_add_Location function. (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro. (java_pop_parser_context): Minor cleanup. (java_parser_context_save_global, java_parser_context_restore_global, java_pop_parser_context): Save/restore input_location as a unit. (issue_warning_error_from_context): If USE_MAPPED_LOCATION take a source_location instead of a wfl context node. (check_class_interface_creation): input_filename is not addressable. (create_artificial_method): Calling java_parser_context_save_global and java_parser_context_restore_global is overkill. Instead, temporarily set input_location from class decl. (java_layout_seen_class_methods): Set input_location from method decl. (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION. (finish_loop_body): Likewise. * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl. (java_sprint_unicode): Take a character, not index in line. (java_sneak_uncode): Replaced by java_peek_unicode. (java_unget_unicode): No longer used. (java_allocate_new_line. java_store_unicode): Removed, since we no longer remember "lines". (java_new_lexer): Update for new data structures. (java_read_char): Move unget_value checking to java_read_unicode. (java_get_unicode, java_peek_unicode, java_next_unicode): New more efficient functions that are used directly when lexing. (java_read_unicode_collapsing_terminators): No longer needed. (java_parse_end_comment, java_parse_escape_sequence, do_java_lex): Re-organize to use java_peek_unicode to avoid java_unget_unicode. (java_parse_escape_sequence): Rewrite to be simpler / more efficient. (do_java_lex): Lots of movings around to avoid java_unget_unicode, combine switch branches, and test for common token kinds earlier. (java_lex_error): Rewrite. * jv-scan.c (expand_location): New function, copied from tree.c. (main): Set ctxp->filename instead of setting input_filename directly. 2004-09-30 Per Bothner <per@bothner.com> More cleanup for --enable-mapped-location. * class.c (push_class): If USE_MAPPED_LOCATION don't set input_location here. Instead do it in give_name_to_class. (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out. * expr.c (expand_byte_code): Call linemap_line_start. * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE. (expr_add_location): New function, if USE_MAPPED_LOCATION. * class.c (maybe_layout_super_class): Adjust build_expr_wfl call to USE_MAPPED_LOCATION case. * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros. * jcf-parse.c (java_parse_file): Don't set input_filename. Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames. Create a list of TRANSLATION_UNIT_DECL. (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The reason is so we can set a DECL_SOURCE_LOCATION for each file. (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P.. Create line-map LC_ENTER/LC_LEAVE entries for archive itself. (file_start_location): New static. (set_source_filename): Avoid extra access to input_filename macro. Concatenate new name with class's package prefix. (set_source_filename, give_name_to_class): Update. (give_name_to_class): Set class's "line 0" input_location here. (parse_class_file): Set input_location as a unit. * jcf-parse.c (load_class): Sanity test if missing inner class file. 2004-09-29 Per Bothner <per@bothner.com> * java-tree.h: Redefine some macros and add some declaration to handle the USE_MAPPED_LOCATION case. * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2. * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1. * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone. * check-init.c (check_init): Handle USE_MAPPED_LOCATION case. * decl.c (finish_method, java_add_stmt): Likewise. * java-gimplify.c (java-gimplify.c): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * lang.c (java_post_options): Likewise - call linemap_add. 2004-09-29 Andrew Haley <aph@redhat.com> PR java/17007 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the result of TRUNC_MOD_EXPR. (patch_unaryop): Likewise for CONVERT_EXPR, which may throw. * decl.c (java_init_decl_processing): Mark soft_lookupinterfacemethod_node and soft_instanceof_node pure. 2004-09-28 Tom Tromey <tromey@redhat.com> PR java/15710: * class.c (add_miranda_methods): Load superinterface if not already loaded. 2004-09-28 Andrew Haley <aph@redhat.com> PR java/17586 * jcf-parse.c (load_class): Don't try to read a class that we've already read. 2004-09-28 Andrew Haley <aph@redhat.com> * jcf-parse.c (load_class): Back out previous broken patch. 2004-09-28 Andrew Haley <aph@redhat.com> PR java/17586 * jcf-parse.c (load_class): Don't try to read a class that we've already read. Check that we really did read the right class. 2004-09-25 Tom Tromey <tromey@redhat.com> PR java/17500: * parse.y (create_artificial_method): Use add_method_1. 2004-09-25 Kazu Hirata <kazu@cs.umass.edu> * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix comment typos. * gcj.texi: Fix typos. 2004-09-24 Tom Tromey <tromey@redhat.com> PR java/15656: * parse.y (class_instance_creation_expression): Set `$$' to NULL in error parts of rule. (unary_expression): Don't call error_if_numeric_overflow when $1 is NULL. 2004-09-24 Tom Tromey <tromey@redhat.com> PR java/16789: * parse.y (resolve_qualified_expression_name): Set CAN_COMPLETE_NORMALLY on first call when chaining static calls. * expr.c (force_evaluation_order): Check for empty argument list after stripping COMPOUND_EXPR. 2004-09-23 Andrew Haley <aph@redhat.com> PR java/16927: * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of COND_EXPRs. 2004-09-23 Tom Tromey <tromey@redhat.com> PR java/17329: * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case where operand is null. 2004-09-23 Tom Tromey <tromey@redhat.com> PR java/17380: * parse.y (not_accessible_p): Allow access to protected members even when class is not static. 2004-09-22 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in: Revert the gcc-none.o change. 2004-09-22 Nathan Sidwell <nathan@codesourcery.com> * parse.y (patch_anonymous_class): VEC_space returns true if there is space. 2004-09-21 Matt Austern <austern@apple.com> Fix bootstrap. * gjavah.c (free_method_name_list): Fix function definition so it's a proper C prototype. 2004-09-21 Tom Tromey <tromey@redhat.com> PR java/17575: * gjavah.c (free_method_name_list): New method. (main): Call it. 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com> Zack Weinberg <zack@codesourcery.com> * java-tree.def: Use tree_code_class enumeration constants instead of code letters. * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for new tree-class enumeration constants. 2004-09-13 Tom Tromey <tromey@redhat.com> PR java/17216: * class.c (layout_class_method): Put synthetic methods into the vtable. 2004-09-11 Andrew Pinski <apinski@apple.com> * Make-lang.in (java/ggc-none.c): Change dependency for ggc.h into $(GGC_H). 2004-09-11 Mohan Embar <gnustuff@thisiscool.com> * Make-lang.in (java/win32-host.o): Add dependency on coretypes.h. * win32-host.c: Add includes for coretypes.h, jcf.h 2004-09-11 Mohan Embar <gnustuff@thisiscool.com> * Make-lang.in (GCJH_OBJS): Change dependency from ggc-none.o to java/ggc-none.o (JCFDUMP_OBJS): Likewise. (java/ggc-none.o): New target. 2004-08-25 Nathan Sidwell <nathan@codesourcery.com> * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls. * class.c (build_utf8_ref, build_static_field_ref, make_field_value, make_method_value, get_dispatch_table, make_class_data, emit_symbol_table, emit_catch_table): Likewise. * constants.c (get_tag_node, build_ref_from_constant_pool, build_constants_constructor): Likewise. * decl.c (java_init_decl_processing): Likewise. * expr.c (build_java_array_length_access, build_newarray, expand_java_multianewarray, expand_java_pushc, expand_iinc, build_java_binop, build_field_ref, expand_java_add_case, expand_java_call, build_known_method_ref, build_invokevirtual, build_invokeinterface, build_jni_stub): Likewise. * java-gimplify.c (java_gimplify_new_array_init): Likewise. * jcf-parse.c (get_constant): Likewise. * lex.c (do_java_lex): Likewise. * parse.y (patch_binop, patch_unaryop, patch_cast, build_newarray_node, patch_newarray): Likewise. * resource.c (compile_resource_data): Likewise. * typeck.c (build_prim_array_type): Likewise. 2004-08-24 Nathan Sidwell <nathan@codesourcery.com> * decl.c (java_init_decl_processing): Adjust initialize_sizetypes call. 2004-08-23 Nathan Sidwell <nathan@codesourcery.com> * jv-scan.c (fancy_abort): Add. 2004-08-20 Nathan Sidwell <nathan@codesourcery.com> * expr.c (build_java_arrayaccess): Use convert to change len's type. 2004-08-19 Bryce McKinlay <mckinlay@redhat.com> * class.c (make_local_function_alias): Allocate extra space for 'L' in name buffer. Reported by Thomas Neumann. 2004-08-19 Nathan Sidwell <nathan@codesourcery.com> * parse.h (JAVA_RADIX10_FLAG): Rename to ... (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning. * lex.c (do_java_lex): Adjust. (error_if_numeric_overflow): Likewise. 2004-08-18 Andrew Pinski <apinski@apple.com> * class.c (make_local_function_alias): Only make a new decl if we support alias attribute on all decls. 2004-08-18 Bryce McKinlay <mckinlay@redhat.com> * class.c (make_local_function_alias): New function. Create local alias for public method DECL. (make_method_value): Use make_local_function_alias. * parse.y (craft_constructor): Don't special-case anonymous classes. Always set ctor_name to init_identifier_node. (lookup_method_invoke): Call layout_class_method when creating anonymous class constructor. 2004-08-18 Richard Henderson <rth@redhat.com> * java-gimplify.c (java_gimplify_expr): Move '2' handling into default case. Treat '<' similarly. Update for is_gimple_formal_tmp_var name change. 2004-08-17 Andrew Haley <aph@redhat.com> * lang.c (lang_printable_name): Obey verbose flag. * parse.y (constructor_circularity_msg): Set VERBOSE arg for lang_printable_name(). (verify_constructor_circularity, get_printable_method_name, check_abstract_method_definitions, java_check_regular_methods, java_check_abstract_methods, check_inner_class_access, fix_constructors, patch_method_invocation, patch_return): Likewise. * expr.c (pop_type_0): Likewise. * java-tree.h (lang_printable_name_wls): Delete. 2004-08-16 Tom Tromey <tromey@redhat.com> PR java/8473: * parse.y (primary): Changed for initialized and uninitialized array creations. (array_access): Handle array_creation_initialized. (array_creation_expression): Split into array_creation_initialized and array_creation_uninitialized. 2004-08-16 Andrew Haley <aph@redhat.com> * jcf-write.c (find_constant_index): Canonicalize NaNs when generating bytecode. 2004-08-16 Elliot Lee <sopwith@redhat.com> PR java/9677 * jcf-parse.c (java_parse_file): Handle filenames with embedded spaces, and quoted filelists. 2004-08-15 Nathan Sidwell <nathan@codesourcery.com> * boehm.c (get_boehm_type_descriptor): Use build_int_cst. * class.c (build_utf8_ref, build_static_field_ref, make_field_value, make_method_value, get_dispatch_table, make_class_data, emit_symbol_table, emit_catch_table): Likewise. * constants.c (get_tag_node, build_ref_from_constant_pool, build_constants_constructor): Likewise. * decl.c (java_init_decl_processing): Likewise. * expr.c (build_java_array_length_access, build_newarray, expand_java_multianewarray, expand_java_pushc, expand_iinc, build_java_binop, build_field_ref, expand_java_add_case, expand_java_call, build_known_method_ref, build_invokevirtual, build_invokeinterface, build_jni_stub): Likewise. * java-gimplify.c (java_gimplify_new_array_init): Likewise. * jcf-parse.c (get_constant): Likewise. * lex.c (do_java_lex): Likewise. * parse.y (patch_binop, patch_unaryop, patch_cast, build_null_of_type, patch_newarray): Likewise. * resource.c (compile_resource_data): Likewise. * typeck.c (build_prim_array_type): Likewise. 2004-08-10 Bryce McKinlay <mckinlay@redhat.com> * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var. Don't create BLOCK here or call java_gimplify_block. 2004-08-09 H.J. Lu <hongjiu.lu@intel.com> * java-tree.h (flag_deprecated): Removed. * lang.opt (Wdeprecated): Use existing Var(warn_deprecated). * parse.y (check_deprecation): Check warn_deprecated instead of flag_deprecated. 2004-08-06 Kelley Cook <kcook@gcc.gnu.org> * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant, flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check, flag_hash_synchronization, flag_assert, flag_jni, flag_newer, flag_check_references, flag_extraneous_semicolon, flag_deprecated, flag_force_classes_archive_check, flag_optimize_sci, flag_indirect_dispatch): Remove explicit declarations. * lang.opt: Add implicit declare/define/assign. Remove obsolete final comment. 2004-08-05 Michael Chastain <mec.gnu@mindspring.com> PR bootstrap/14893 * Make-lang.in (java.install-man): Install from either build tree or source tree, whichever has the file first. 2004-08-05 Nathan Sidwell <nathan@codesourcery.com> * jcf-parse.c (get_constant): Adjust force_fit_type call. * lex.h (SET_LVAL_NODE_TYPE): Remove. * lex.c (java_perform_atof): Use SET_LVAL_NODE directly. (do_java_lex): Likewise. Adjust force_fit_type call. 2004-08-04 Roger Sayle <roger@eyesopen.com> Andrew Haley <aph@redhat.com> * typeck.c (convert_ieee_real_to_integer): Call fold on the range checking trees as they're being built. (convert): Call convert_ieee_real_to_integer if we're converting a constant, even if we're writing a class file. 2004-08-02 Bryce McKinlay <mckinlay@redhat.com> PR java/16701 * parse.y (fold_constant_for_init): Call resolve_field_access with correct current_class context. 2004-08-01 Roger Sayle <roger@eyesopen.com> * decl.c (update_aliases, initialize_local_variable): Replace calls to build with calls to buildN. * java-gimplify.c (java_gimplify_modify_expr): Likewise. * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise. * parse.h (BUILD_THROW): Likewise. * parse.y (switch_expression, synchronized_statement, catch_clause_parameter, array_creation_expression, conditional_expression, make_qualified_name, resolve_qualified_expression_name, patch_method_invocation, patch_invoke, build_method_invocation, build_new_invocation, build_assignment, patch_assignment, build_binop, patch_binop, build_string_concatenation, build_incdec, patch_unaryop, patch_cast, build_array_ref, build_newarray_node, patch_newarray, patch_return, build_if_else_statement, build_labeled_block, build_new_loop, build_loop_body, build_bc_statement, build_assertion, encapsulate_with_try_catch, build_try_statement, build_try_finally_statement, patch_synchronized_statement, emit_test_initialization): Likewise, replace build with buildN. 2004-07-28 Eric Christopher <echristo@redhat.com> * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete. (java_unsafe_for_reeval): Ditto. 2004-07-26 <hp@bitrange.com> * parse.y (build_super_invocation): Adjust declaration order to avoid declaration after statement. 2004-07-25 Bernardo Innocenti <bernie@develer.com> * decl.c: Rename all identifiers named `class' to `cl'. 2004-07-25 Richard Henderson <rth@redhat.com> * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P. 2004-07-23 Mike Stump <mrs@apple.com> * boehm.c (set_bit): Improve type safety wrt unsignedness. * gjavah.c (throwable_p, decode_signature_piece, print_full_cxx_name, print_include, add_namelet, add_class_decl, process_file): Likewise. * jcf-dump.c (main): Likewise. * jcf-io.c (read_zip_member): Likewise. * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant, give_name_to_class, get_class_constant): Likewise. * jcf-write.c (find_constant_wide, push_long_const, generate_classfile): Likewise. * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise. * parse.y (read_import_dir): Likewise. * typeck.c (parse_signature_type): Likewise. * verify.c (verify_jvm_instructions): Likewise. * zextract.c (find_zip_file_start, read_zip_archive): Likewise. 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com> * Make-lang.in: Replace rmic and rmiregistry references with grmic and grmiregistry. * gcj.texi: Likewise. 2004-07-20 Andrew Haley <aph@redhat.com> PR java/16431. * verify.c (verify_jvm_instructions): Comment change only. * typeck.c (build_java_array_type): Add size field to array name. * java-tree.h (LOCAL_SLOT_P): New. (update_aliases): Add PC argument. (pushdecl_function_level): New function. * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL, MODIFY_EXPR, and SAVE_EXPR. (java_gimplify_modify_expr): New function. * expr.c (push_type_0): Call find_stack_slot() to create temporary. (expand_iinc): Pass PC to update_aliases(). (STORE_INTERNAL): Likewise. (process_jvm_instruction): Likewise. * decl.c (base_decl_map): New variable. (uniq): New variable. (update_aliases): Rewrite with more thorough checking. (debug_variable_p): New function. (push_jvm_slot): Don't initialize local variable. Don't pushdecl. (check_local_named_variable): Delete whole function. (initialize_local_variable): New function. (check_local_unnamed_variable): Add checks and comments. (find_local_variable): Rewrite. (java_replace_reference): New function. (function_binding_level): New variable. (pushdecl_function_level): New function. (maybe_pushlevels): Set DECL_LOCAL_END_PC. (maybe_pushlevels): Call pushdecl() on each of the new decls. (start_java_method): Reset uniq. Create base_decl_map. Set function_binding_level. (end_java_method): Null unused fields to save memory. 2004-07-20 Nathan Sidwell <nathan@codesourcery.com> * class.c (add_interface_do): Remove. (set_super_info, interface_of_p, maybe_add_interface, add_interface, make_class_data, layout_class, add_miranda_methods): Adjust BINFO accessors and addition. * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO accessors. * jcf-write.c (generate_classfile): Likewise. * parse.y (patch_anonymous_class, check_inner_circular_reference, check_circular_reference, java_complete_class, check_abstract_method_definitions, java_check_abstract_method_definitions, check_interface_throws_clauses, java_check_abstract_methods, lookup_java_interface_method2, find_applicable_accessible_methods_list): Adjust BINFO accessors and addition. * typeck.c (find_method_in_interfaces): Adjust BINFO accessors. 2004-07-18 Roger Sayle <roger@eyesopen.com> * builtins.c (max_builtin, min_builtin, java_build_function_call_expr): Replace calls to build with buildN. * class.c (build_class_ref, build_static_field_ref, get_dispatch_table, make_class_data, layout_class_method): Likewise. * constants.c (build_ref_from_constant_pool): Likewise. * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method, add_stmt_to_compound): Likewise. * except.c (build_exception_object_ref, expand_end_java_handler): Likewise. * java-gimplify.c (java_gimplify_case_expr, java_gimplify_default_expr, java_gimplify_block, java_gimplify_new_array_init, java_gimplify_try_expr): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * typeck.c (convert_ieee_real_to_integer): Likewise. 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk> * java-tree.h (builtin_function): Declare. 2004-07-16 Steven Bosscher <stevenb@suse.de> * parse.y (java_complete_expand_methods, java_expand_classes): Don't abuse restore_line_number_status. 2004-07-15 Frank Ch. Eigler <fche@redhat.com> g++/15861 * jcf-parse.c (java_emit_static_constructor): Specify default priority. 2004-07-13 Per Bothner <per@bothner.com> * java-tree.h (all_class_filename): Remove useless macro. (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant. (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro. * parse.y (java_parser_context_restore_global): Replace BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier. * jcf-parse.c (read_class, java_parse_file): Likewise. 2004-07-12 Bryce McKinlay <mckinlay@redhat.com> PR java/16474 gjavah.c (print_field_info): Emit constant only if field is static. 2004-07-11 Roger Sayle <roger@eyesopen.com> * expr.c (java_truthvalue_conversion, flush_quick_stack, java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr, build_java_ret, build_java_throw_out_of_bounds_exception, build_java_array_length_access, java_check_reference, build_java_arrayaccess, build_java_arraystore_check, build_newarray, build_anewarray, expand_java_multianewarray, expand_java_arraystore, expand_java_arrayload, build_java_monitor, expand_java_return, expand_load_internal, expand_java_NEW, build_get_class, build_instanceof, expand_java_CHECKCAST, expand_iinc, build_java_soft_divmod, build_java_binop, build_field_ref, expand_compare, expand_java_goto, expand_java_switch, expand_java_add_case, build_class_init, build_known_method_ref, invoke_build_dtable, build_invokevirtual, build_invokeinterface, expand_invoke, build_jni_stub, expand_java_field_op, java_expand_expr, expand_byte_code, STORE_INTERNAL, force_evaluation_order, emit_init_test_initialization): Convert calls to "build" into calls to the prefered "buildN" functions. 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk> * java-tree.h (set_block): Remove. * lang.c (java_clear_binding_stack): New. (LANG_HOOKS_CLEAR_BINDING_STACK): Define. * decl.c (struct binding_level): Remove this_block. (clear_binding_level): Likewise. (poplevel): Don't handle this_block. (set_block): Remove. 2004-07-10 Bryce McKinlay <mckinlay@redhat.com> * class.c (common_enclosing_context_p): Remove statement with no side-effects. 2004-07-09 Bryce McKinlay <mckinlay@redhat.com> PR java/8618 * parse.y (create_anonymous_class): Remove 'location' argument. Use the WFL from TYPE_NAME to get line number for the decl. Fix comment. (craft_constructor): Inherit access flags for implicit constructor from the enclosing class. (create_class): Fix comment typo. (resolve_qualified_expression_name): Pass type of qualifier to not_accessible_p, not the type in which target field was found. (not_accessible_p): Handle inner classes. Expand protected qualifier-subtype check to enclosing instances, but don't apply this check to static members. Allow protected access to inner classes of a subtype. Allow private access within common enclosing context. (build_super_invocation): Get WFL line number info from current class decl. (build_incomplete_class_ref): Update for new create_anonymous_class signature. * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use common_enclosing_instance_p. * class.c (common_enclosing_context_p): New. Determine if types share a common enclosing context, even across static contexts. (common_enclosing_instance_p): Renamed from common_enclosing_context_p. Determines if types share a common non-static enclosing instance. * java-tree.h (common_enclosing_instance_p): Declare. * jcf-write.c (get_method_access_flags): New. Surpress private flag for inner class constructors. (generate_classfile): Use get_method_access_flags. 2004-07-09 Bryce McKinlay <mckinlay@redhat.com> * class.c (interface_of_p): Check for null TYPE_BINFO. 2004-07-09 Nathan Sidwell <nathan@codesourcery.com> * class.c (make_class): Do not create binfo here. (set_super_info): Create it here. * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo. 2004-07-08 Richard Henderson <rth@redhat.com> * expr.c (case_identity, get_primitive_array_vtable, java_expand_expr, emit_init_test_initialization): Remove. * java-tree.h (java_expand_expr): Remove. * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove. 2004-07-07 Per Bothner <per@bothner.com> * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we get internal error due to mismatched types. * gcj.texi (Invoking gij): Document new -verbose:class flag. * gcj.texi (Linking): New node. Document -lgij usage. 2004-07-07 Nathan Sidwell <nathan@codesourcery.com> * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros. (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise. * java/class.c (set_super_info, class_depth, interface_of_p, maybe_add_interface, add_interface, make_class_data, layout_class, add_miranda_methods): Adjust BINFO macros. * expr.c (can_widen_reference_to, lookup_field): Likewise. * jcf-write.c (generate_classfile): Likewise. * parse.y (patch_anonymous_class, check_inner_circular_reference, check_circular_reference, java_complete_class, check_abstract_method_definitions, java_check_abstract_method_definitions, check_interface_throws_clauses, java_check_abstract_methods, lookup_java_interface_method2, find_applicable_accessible_methods_list): Likewise. * typeck.c (find_method_in_interface): Likewise. * verify.c (merge_types): Likewise. 2004-07-06 Nathan Sidwell <nathan@codesourcery.com> * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1. * class.c (add_interface_do): Use BINFO_VIRTUAL_P. 2004-07-05 Nathan Sidwell <nathan@codesourcery.com> * class.c (make_class): Use make_tree_binfo. (set_super_info, add_interface_do): Likewise. * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO. 2004-07-04 Ranjit Mathew <rmathew@hotmail.com> * verify.c: Correct array element access formatting thinko. 2004-07-04 Ranjit Mathew <rmathew@hotmail.com> * verify.c: Insert a short blurb at the start referring to the JVMS. (merge_type_state): Remove redundant nested if statement. (verify_jvm_instructions): Ensure current_subr is initialised to NULL_TREE. Minor formatting fixes all over the place. 2004-07-02 Richard Henderson <rth@redhat.com> * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite. 2004-07-01 Richard Henderson <rth@redhat.com> * class.c (registerClass_libfunc): Remove. (init_class_processing): Don't set it. (emit_register_classes): Take list_p parameter. Fill it in with _Jv_RegisterClass calls. * decl.c (java_init_decl_processing): Don't call init_resource_processing. * jcf-parse.c (java_emit_static_constructor): New. (java_parse_file): Call it. * resource.c (registerResource_libfunc): Remove. (init_resource_processing): Remove. (write_resource_constructor): Take list_p parameter. Fill it in with _Jv_RegisterResource calls. * java-tree.h: Update prototypes. 2004-06-29 Bryce McKinlay <mckinlay@redhat.com> PR java/1262 * class.c (layout_class_method): Do not override package-private method if its in a different package. (split_qualified_name): Move here from parse.y. Rename from breakdown_qualified. Add comment. (in_same_package): Move here from parse.y. Add comment. * java-tree.h (break_down_qualified, in_same_package): Declare. (in_same_package): Likewise. * parse.y (breakdown_qualified, in_same_package): Moved to class.c. Callers updated. 2004-06-29 Andrew Haley <aph@redhat.com> * except.c (expand_start_java_handler): Push a new binding level. Don't build a TRY_CATCH_EXPR now, we'll do it later. Call register_exception_range() to register where we'll do it. (expand_end_java_handler): Remove old bogus code. Replace with new logic that simply builds TRY_CATCH_EXPRs and inserts them at the top of the expression we're curently building. (maybe_end_try): Delete. * decl.c (binding_level.exception_range): New field. (clear_binding_level): Add field exception_range. Reformat. (poplevel): Call expand_end_java_handler(). (poplevel): Call java_add_stmt only if functionbody is false. (maybe_poplevels): Don't call maybe_end_try() from here. (end_java_method): Clear no longer used trees in function decl. (register_exception_range): New function. * java-tree.h (register_exception_range, struct eh_range): Declare. 2004-06-28 Bryce McKinlay <mckinlay@redhat.com> * jcf-write.c (get_classfile_modifiers): Formatting fixes. 2004-06-27 Ranjit Mathew <rmathew@hotmail.com> Formatting fixes. * expr.c (class_has_finalize_method): Fix method name indentation. (expand_java_call): Remove K&R style parameter declaration. (expand_invoke): Fix statement indentation. (expand_java_field_op): Likewise. * parse-scan.y: Fix typo. (reset_report): Fix method name indentation. * parse.y (unresolved_type_p, build_expr_block): Remove extra blank line. Fix typos. * verify.c (verify_jvm_instructions): Document parameters, insert page break. * lang.c (lang_init_source): Fix method name indentation. * class.c (common_enclosing_context_p): Likewise. (emit_symbol_table): Fix parameter list indentation. * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style parameter declaration. * constants.c: Fix copyright notice indentation. * typeck.c (find_method_in_superclasses): Fix parameter list indentation. (find_method_in_interfaces): Likewise. * zextract.c (makelong): Fix method name indentation. 2004-06-26 Bryce McKinlay <mckinlay@redhat.com> PR java/15715. * parse.y (create_interface): Set correct access modifiers for interfaces. * jcf-write.c (get_classfile_modifiers): New function. (generate_classfile): Use get_classfile_modifiers, not get_access_flags. 2004-06-26 Bryce McKinlay <mckinlay@redhat.com> * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super" dependency to current parser context, not NULL_TREE, for top-level classes. (jdep_resolve_class): Enable member access check for all inner class dependencies. 2004-06-26 Bryce McKinlay <mckinlay@redhat.com> * parse.y (qualify_and_find): Pass type decl, not identifier, to load_class. 2004-06-26 Bryce McKinlay <mckinlay@redhat.com> PR java/15734 * expr.c (expand_java_field_op): Ensure that target class for static field access has been loaded. 2004-06-26 Bryce McKinlay <mckinlay@redhat.com> Ranjit Mathew <rmathew@hotmail.com> PR java/1207, java/16178 * jcf-parse.c (load_class): Return immediately if passed a type decl where CLASS_FROM_SOURCE_P is set. Remove FIXME. * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P before calling load_class. (qualify_and_find): Likewise. (find_in_imports_on_demand): Likewise. (find_applicable_accessible_methods_list): Likewise. 2004-06-24 Bryce McKinlay <mckinlay@redhat.com> * parse.y (java_layout_seen_class_methods): Don't call load_class on class defined by source parser. 2004-06-23 Bryce McKinlay <mckinlay@redhat.com> * parse.y (set_nested_class_simple_name_value): Removed. (java_complete_expand_class): Remove calls to set_nested_class_simple_name_value. 2004-06-22 Andrew Haley <aph@redhat.com> Ranjit Mathew <rmathew@hotmail.com> Fixes PR java/16113. * decl.c (force_poplevels): Remove call to expand_end_bindings. 2004-06-22 Ranjit Mathew <rmathew@hotmail.com> * parse.y (create_class): Correct diagnostic message about java.lang.Object extending anything else. 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * class.c (build_class_ref): Add new operand for COMPONENT_REF. (build_static_field_ref): Likewise and add new operands for ARRAY_REF. * constants.c (build_ref_from_constant_pool): Likewise. * expr.c (build_java_array_length_access): Likewise. (build_get_class, build_field_ref, build_known_method_ref): Likewise. (invoke_build_dtable, build_invokevirtual): Likewise. (build_invokeinterface, java_expand_expr): Likewise. (emit_init_test_initialization): Likewise. * java-gimplify.c (java_gimplify_new_array_init): Likewise. * parse.y (make_qualifed_name, build_array_ref): Likewise. 2004-06-21 Andrew Haley <aph@redhat.com> * java-gimplify.c (java_gimplify_block): set TREE_USED on the new block. 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk> * jcf.h (struct JCF): Change java_source, right_zip and finished to unsigned int. * lex.h (struct java_lexer): Change hit_eof, read_anything, byte_swap and use_fallback to unsigned int. * parse.h (struct _jdep): Change flag0 to unsigned int. 2004-06-17 Ranjit Mathew <rmathew@hotmail.com> Fixes PR java/13948 * parse.y (java_layout_seen_class_methods): Ensure class is loaded before trying to lay out its methods. * jcf-parse.c (read_class): Track parsed files using canonical paths obtained via lrealpath from libiberty. (java_parse_file): Likewise. (parse_source_file_1): Rename formal parameter to reflect its modified purpose. Minor formatting fix. 2004-06-15 Paolo Bonzini <bonzini@gnu.org> * class.c (emit_register_classes): Make the function uninlinable, do not set current_function_cannot_inline. * resource.c (write_resource_constructor): Do not reset flag_inline_functions around rest_of_compilation. 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu> PR java/15769 * expr.c (java_truthvalue_conversion): Handle UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR, ORDERED_EXPR, and UNORDERED_EXPR as comparison operators, i.e. return the expression. 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca> * gjavah.c: Include version.h 2004-05-31 Bryce McKinlay <mckinlay@redhat.com> * jcf-write.c (generate_bytecode_conditional): Correct handling of unordered conditionals. Add comment. 2004-05-29 Ranjit Mathew <rmathew@hotmail.com> Per Bothner <per@bothner.com> * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a local variable was initialised upon declaration. * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if variable was final and initialised upon declaration. * check-init.c (check_final_reassigned): Give error only if a blank final is not definitely unassigned or if an initialised final is reassigned. (check_bool_init): Respect JLS2 16.1.7 requirements for boolean assignment expressions. Remove case MODIFY_EXPR, label do_default. (check_init): Perform initialised-variable-removing-optimisation only on non-final local variables. 2004-05-28 Bryce McKinlay <mckinlay@redhat.com> * jcf-write.c (generate_bytecode_conditional): Handle binops UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR. (generate_bytecode_insns): Likewise. 2004-05-28 Bryce McKinlay <mckinlay@redhat.com> * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR. 2004-05-28 Bryce McKinlay <mckinlay@redhat.com> * gcj.texi (Object allocation): Remove _Jv_AllocBytes. (Mixing with C++): Document JvAllocBytes and RawDataManaged. 2004-05-26 Bryce McKinlay <mckinlay@redhat.com> * decl.c (struct binding_level): Add GTY marker. Compile binding_depth unconditionally. (current_binding_level, free_binding_level, global_binding_level): Likewise. (clear_binding_level): Unconditionally set binding_depth. (make_binding_level): Use ggc_alloc_cleared, not xmalloc. 2004-05-26 Bryce McKinlay <mckinlay@redhat.com> * lex.c (java_new_lexer): Set 'encoding'. (java_read_char): Improve error message for unrecognized characters. * lex.h (struct java_lexer): New field 'encoding'. 2004-05-23 Paolo Bonzini <bonzini@gnu.org> * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o. 2004-05-21 Mark Wielaard <mark@klomp.org> * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not extern. 2004-05-19 Paolo Bonzini <bonzini@gnu.org> * typeck.c: Remove non-printable character 160. 2004-05-17 Ranjit Mathew <rmathew@hotmail.com> * check-init.c: Correct minor typos. 2004-05-13 Diego Novillo <dnovillo@redhat.com> * Make-lang.in, expr.c, java-gimplify.c: Rename tree-simple.[ch] to tree-gimple.[ch]. 2004-05-14 Ranjit Mathew <rmathew@hotmail.com> * java-gimplify.c (java_gimplify_expr): Correct minor typos. 2004-05-13 Diego Novillo <dnovillo@redhat.com> Merge from tree-ssa-20020619-branch. See ChangeLog.tree-ssa for details. * Make-lang.in, builtins.c, check-init.c, class.c, constants.c, decl.c, except.c, expr.c, java-except.h, java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c, lang.c, lang.opt, parse.y, resource.c: Merged. * java-gimplify.c: New file. 2004-05-10 Andrew Haley <aph@redhat.com> * parse.y (create_class): Set TYPE_VFIELD. * decl.c (java_init_decl_processing): Likewise. * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment. * class.c (make_method_value): Replace DECL_VINDEX with call to get_method_index(). (get_dispatch_vector): Likewise. (layout_class_method): Likewise. Replace set of DECL_VINDEX with call to set_method_index(). (set_method_index): New function. (get_method_index): New function. * java-tree.h (set_method_index): New function decl. (get_method_index): New function decl. 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu> * parse.y (check_pkg_class_access): Add new argument and use it when cl is NULL to call lookup_cl on it. (parser_check_super_interface): Do not call lookup_cl. Pass this_decl to check_pkg_class_access and NULL instead of lookup_cl. (parser_check_super): Update for change in check_pkg_class_access. (do_resolve_class): Likewise. (process_imports): Likewise. (find_in_imports_on_demand): Likewise. (resolve_qualified_expression_name): Likewise. 2004-05-06 Ranjit Mathew <rmathew@hotmail.com> Fixes PR java/9685, PR java/15073 * parse.y (accessibility_string): New method. (not_accessible_field_error): Use accessibility_string() instead of java_accstring_lookup(). (resolve_qualified_expression_name): Check with check_pkg_class_access() before allowing access using qualified names. Fix comment typo. Use check_pkg_class_access() instead of not_accessible_p() for unqualified types. (not_accessible_p): Use DECL_CONTEXT (member) instead of REFERENCE for package-private access checking. (patch_method_invocation): Use accessibility_string() instead of java_accstring_lookup(). 2004-04-30 Ranjit Mathew <rmathew@hotmail.com> Fixes PR java/15133 * gjavah.c (struct method_name): Add member is_native. (overloaded_jni_method_exists_p): Match candidate method only if it is native. (print_method_info): Initialise is_native flag from the method's access flags. 2004-04-30 Roger Sayle <roger@eyesopen.com> * builtins.c (java_builtins): Add acos, asin, ceil and floor. (initialize_builtins): Likewise, define acos, asin, ceil and floor. 2004-04-22 Roger Sayle <roger@eyesopen.com> * resource.c (write_resource_constructor): Guard call to possibly NULL targetm.asm_out.constructor with targetm.have_ctors_dtors. 2004-04-19 Bryce McKinlay <mckinlay@redhat.com> * class.c (make_class_data): Add new field aux_info. * decl.c (java_init_decl_processing): Push type and decl for `aux_info'. 2004-04-15 Bryce McKinlay <mckinlay@redhat.com> * expr.c (expand_java_NEW): Don't use size argument for _Jv_AllocObject calls. * parse.y (patch_invoke): Likewise. 2004-04-12 Bryce McKinlay <mckinlay@redhat.com> * expr.c (build_invokeinterface): Remove unused variables to fix warnings. 2004-04-12 Bryce McKinlay <mckinlay@redhat.com> * class.c (get_interface_method_index): New function. Return dispatch index for interface method. (make_method_value): For interface methods, set index field to iface dispatch index, not DECL_VINDEX. * expr.c (build_invokeinterface): Use get_interface_method_index. 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED. 2004-03-31 Andrew Haley <aph@redhat.com> PR java/14104 * jcf-io.c (opendir_in_zip): Tidy up error handling. 2004-03-30 Zack Weinberg <zack@codesourcery.com> * builtins.c, expr.c, jcf.h, parse.h: Use new shorter form of GTY markers. 2004-03-25 Marcus Meissner <meissner@suse.de> PR java/14689: * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir. 2004-03-23 Tom Tromey <tromey@redhat.com> PR java/14315: * jcf-write.c (make_class_file_name): Don't report if mkdir failed with EEXIST. 2004-03-23 Tom Tromey <tromey@redhat.com> * gcj.texi (Extensions): Document GCJ_PROPERTIES. 2004-03-20 Kazu Hirata <kazu@cs.umass.edu> * class.c, gjavah.c, lang.c: Fix comment typos. * gcj.texi: Fix typos. 2004-03-19 Per Bothner <per@bothner.com> * gcj.texi (Code Generation): Document new flags and assert defaults. * class.c (assume_compiled_node_struct): Rename type to class_flag_node_struct, as it is now also used for enable_assertions. Rename assume_compiled_node typedef. Rename excludep field to value. (find_assume_compiled_node): Rename function to find_class_flag_node. Minor optimization - avoid needless strlen. (add_assume_compiled): Some tweaking and optimization. Rename and generalize to add_class_flag takem an extra parameter. (add_assume_compled): New just calls add_class_flag. (add_enable_assert, enable_assertions): New functions. (enable_assert_tree): New static. * java-tree.h (add_enable_assert, enable_assertions): New declarations. * lang.opt (fenable-assertions, fenable-assertions=, fdisable-assertions, fdisable-assertions=): New options. * lang.c (java_handle_option): Handle new options. * parse.y (build_incomplete_class_ref): Handle class$ in an inner class in an interface - create helper class nested in outer interface. (build_assertion): Short-circuit if enable_assertions is false. 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * java-tree.h: Changes throughout to add checking to macros and numerous whitespace changes. (VAR_OR_FIELD_CHECK): New macro. * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC, FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL. 2004-03-16 Per Bothner <per@bothner.com> * jcf-jump.c (options): New --print-constants option. * gcj.texi (Invoking jcf-dump): Document --print-constants. * jcf-dump.c (flag_print_constant_pool): Default to off. (print_constant_terse_with_index): New helper function. (various places): Check flag_print_constant_pool where missing. (main): If verbose set flag_print_constant_pool. (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous. 2004-03-15 Andrew Haley <aph@redhat.com> PR java/14581 * parse.y (java_complete_lhs): Check that final variable has an initializer. 2004-03-12 Andrew Haley <aph@redhat.com> PR java/14551 * typeck.c (convert): Clear TREE_OVERFLOW after an integer conversion. 2004-02-29 Roger Sayle <roger@eyesopen.com> * jcf-parse.c (java_parse_file): Handle the case that input_filename is NULL. 2004-02-27 Per Bothner <per@bothner.com> * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm suggestion: Use build_incomplete_class_ref. This fixes PR java/13508, java/11714. 2004-02-27 Kazu Hirata <kazu@cs.umass.edu> * java/parse.h: Update copyright. 2004-02-26 Andrew Haley <aph@redhat.com> PR java/14231: * parse.y (check_interface_throws_clauses): Check for !METHOD_INVISIBLE (iface_method). * class.c (layout_class_methods): Check for CLASS_INTERFACE as well as CLASS_ABSTRACT. 2004-02-25 Per Bothner <per@bothner.com> * parse.y (build_assertion): If we're in an inner class, create the class$ helper routine in the outer class. 2004-02-19 Richard Henderson <rth@redhat.com> * parse.y (switch_label): Use make_node for DEFAULT_EXPR. 2004-02-16 Geoffrey Keating <geoffk@apple.com> * Make-lang.in (java.install-man): Add extra dependencies. 2004-02-13 Geoffrey Keating <geoffk@apple.com> * Make-lang.in: Install man pages under the same names (possibly transformed) as the program they document. 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk> * gjavah.c: Include "intl.h". (error): New function. (main): Call gcc_init_libintl. (get_field_name, throwable_p, print_c_decl, print_full_cxx_name, print_stub_or_jni, process_file, main): Use error rather than fprintf. (print_method_info, usage, help, version, main): Mark strings for translation with _. Avoid splitting up sentences. Send information messages to stdout. * jcf-dump.c: Include "intl.h". (main): Call gcc_init_libintl. (process_class, usage, help, version, main, CHECK_PC_IN_RANGE): Mark error, usage and version messages for translation with _. Avoid splitting up sentences. * jv-scan.c: Include "intl.h". (fatal_error, warning): Change parameter s to msgid. Translate messages. (main): Call gcc_init_libintl. (usage, help, version): Mark error, usage and version messages for translation with _. Avoid splitting up sentences. * jvgenmain.c: Include "intl.h". (main): Call gcc_init_libintl. (usage, main): Mark error messages for translation with _. * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS, JVGENMAIN_OBJS): Add intl.o. (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o, java/jvgenmain.o): Update dependencies. 2004-02-08 Per Bothner <per@bothner.com> * parse.y (resolve_qualified_expression_name): In case of inaccessible class don't use not_accessible_field_error, which can get confused. 2004-02-05 Kelley Cook <kcook@gcc.gnu.org> Make-lang.in (po-generated): Delete. 2004-02-05 Kazu Hirata <kazu@cs.umass.edu> * Make-lang.in (java/decl.o, java/expr.o, java/parse.o): Depend on target.h. * decl.c: Include target.h. (start_java_method): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. * expr.c: Include target.h. (pop_arguments): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. * parse.y: Include target.h. (start_complete_expand_method): Replace PROMOTE_PROTOTYPES with targetm.calls.promote_prototypes. 2004-02-04 Kazu Hirata <kazu@cs.umass.edu> * typeck.c: Update copyright. 2004-02-02 Tom Tromey <tromey@redhat.com> * decl.c (java_init_decl_processing): Remove duplicate gnu/gcj/RawData. 2004-01-30 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir). 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu> * expr.c (build_field_ref): Move variable definition up. 2004-01-28 Andrew Haley <aph@redhat.com> * expr.c (build_field_ref): Widen field offset. 2004-01-27 Andrew Haley <aph@redhat.com> java/13273 * parse.y (check_interface_throws_clauses): Make sure class_decl has been loaded. 2004-01-22 Jeff Sturm <jsturm@one-point.com> PR java/13733 * parse.y (patch_assignment): Don't modify lhs_type for reference assignments. 2004-01-20 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in: Replace $(docdir) with doc. (java.info, java.srcinfo, java.man, java.srcman): New rules. (java.install-man): Revamp rule. 2004-01-20 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME, GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell) instead of deferred backquote. 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu> * typeck.c (find_method_in_interfaces): Move variable definition up. 2004-01-16 Andrew Haley <aph@redhat.com> PR java/13273: * typeck.c (shallow_find_method): New. (find_method_in_superclasses): New. (find_method_in_interfaces): New. (lookup_do): Rewrite. * java-tree.h (SEARCH_ONLY_INTERFACE): Delete. * jcf-parse.c (read_class): Save and restore output_class. * decl.c (java_expand_body): Set output_class from fndecl. 2004-01-15 Michael Chastain <mec.gnu@mindspring.com> * class.c (gen_indirect_dispatch_tables): Fix string length calculations. 2004-01-15 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory. (java.srcextra): Copy above back to source directory if requested. (po-generated): Delete reference to $(parsedir). (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir). Use implicit rule. 2004-01-14 Jan Hubicka <jh@suse.cz> * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost estimation. 2004-01-09 Mark Mitchell <mark@codesourcery.com> * java-tree.h (java_expand_expr): Change prototype. * expr.c (java_expand_expr): Add alt_rtl parameter. 2004-01-09 Andrew Haley <aph@redhat.com> PR java/12755: * parse.y (java_fix_constructors): Set output_class. (java_reorder_fields): Likewise. (java_layout_classes): Likewise. (java_expand_classes): Generate indirect dispatch tables. (java_expand_classes): Set output_class. (java_finish_classes): Likewise. * lang.c (java_init): Turn on always_initialize_class_p if we're using indirect dis[atch. (java_decl_ok_for_sibcall): Use output_class, not current_class. (java_get_callee_fndecl): Use class local atable. * jcf-parse.c (always_initialize_class_p): Decl moved to java-tree.h. (HANDLE_CLASS_INFO): Set output_class. (read_class): Likewise. (parse_class_file): Call gen_indirect_dispatch_tables. (parse_zip_file_entries): Set output_class. (java_parse_file): Set output_class. Don't emit symbol tables. * java-tree.h (output_class): New. Remove global declarations for otable, atable, and ctable. (always_initialize_class_p): moved here from decl.c. (DECL_OWNER): New. (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL, TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL, TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New. (struct lang_type): Add otable_methods, otable_decl, otable_syms_decl, atable_methods, atable_decl, atable_syms_decl, ctable_decl, catch_classes, type_to_runtime_map. * expr.c (build_field_ref): Make otable, atable, and ctable class local rather than global. (build_known_method_ref): Likewise. (build_invokeinterface): Likewise. (java_expand_expr): Pass runtime type (rather than actual type) to expand_start_catch. * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for this class. Look up each class in that map to delete duplicates. (expand_end_java_handler): Pass runtime type (rather than actual type) to expand_start_catch. * decl.c: (always_initialize_class_p): Decl moved to java-tree.h. (do_nothing): New. (java_init_decl_processing): Rearrange things. Remove global declarations of otable, atable, and ctable. (java_init_decl_processing): Make lang_eh_runtime_type do_nothing. (java_expand_body): Set output_class. * constants.c (build_constant_data_ref): Use output_class, not current_class. (alloc_name_constant): Likewise. * class.c (gen_indirect_dispatch_tables): New. (build_class_ref): Generate hard reference to superclass, even if using indirect dispatch. (build_static_field_ref): Use class local atable. (make_class_data): Generate hard reference to superclass, even if using indirect dispatch. Generate symbolic references to interfaces when using indirect dispatch. (make_class_data): Emit otable, atable, and ctable. Make otable, atable, and ctable class local rather than global. (emit_catch_table): Make otable, atable, and ctable class local rather than global. 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu> * parse.y (catch_clause_parameter): Fix typo. PR java/13404 * parse.y: (catch_clause_parameter): Return early if $3, aka formal_parameter, is null. 2003-12-20 Kazu Hirata <kazu@cs.umass.edu> * class.c: Remove uses of "register" specifier in declarations of arguments and local variables. * decl.c: Likewise. * expr.c: Likewise. * gjavah.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jcf-write.c: Likewise. * keyword.h: Likewise. * parse.y: Likewise. * typeck.c: Likewise. * verify.c: Likewise. 2003-12-06 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in (GCJ_CROSS_NAME): Delete. (java.install_common, java.install-man): Adjust for above. (java.uninstall): Likewise. 2003-12-03 Michael Koch <konqueror@gmx.de> * class.c (make_class_data): Push field value to 'hack_signers' instead of 'signers'. * decl.c (java_init_decl_processing): Push field 'hack_signers' instead of 'signers'. 2003-12-03 Zack Weinberg <zack@codesourcery.com> * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before including iconv.h. 2003-12-03 Ralph Loader <rcl@ihug.co.nz> PR java/12374: * parse.y (qualify_ambiguous_name): Remove lots of broken field access processing - there's no need to do that here, because we have resolve_field_access. Remove RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else. * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't used. 2003-12-01 Jeff Sturm <jsturm@one-point.com> Fix PR java/13237 * parse.y (java_complete_lhs): Save location prior to patching CALL_EXPR. 2003-11-25 Mohan Embar <gnustuff@thisiscool.com> PR java/12548 * resource.c (write_resource_constructor): Append "_resource" to constructor identifier name. 2003-11-25 Jeff Sturm <jsturm@one-point.com> Fix PR java/13183. * constants.c (cpool_for_class): New function. (outgoing_cpool): Remove global variable. (alloc_name_constant): Use cpool_for_class. (build_constants_constructor): Likewise. * decl.c (java_expand_body): Set current_class. * java-tree.h (outgoing_cpool) Remove declaration. (init_outgoing_cpool): Likewise. * jcf-parse.c (init_outgoing_cpool): Remove function. (parse_class_file): Don't call init_outgoing_cpool. * parse.y (java_complete_expand_methods): Don't call init_outgoing_cpool. Don't save outgoing_cpool. (java_expand_classes): Don't restore outgoing_cpool. (java_finish_classes): Likewise. 2003-11-24 Mohan Embar <gnustuff@thisiscool.com> * Make-lang.in: (java.install-common) Add symlink for $(target_noncanonical)-gcjh for native builds. 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk> * Make-lang.in (java.extraclean): Delete. 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk> * Make-lang.in (check-java): Add. 2003-11-19 Jeff Sturm <jsturm@one-point.com> Fix PR java/13024. * except.c (prepare_eh_table_type): Allocate variable-sized buffer `buf' with alloca. 2003-11-17 Jeff Sturm <jsturm@one-point.com> Fix PR java/12857. decl.c (java_init_decl_processing): Don't initialize class_not_found_type_node, no_class_def_found_type_node. java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE, JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index. (class_not_found_type_node, no_class_def_found_type_node): Don't define. parse.y (build_dot_class_method_invocation): Add this_class argument. Qualify method invocations to a different class. (create_new_parser_context): Initialize saved_data_ctx to 0. (java_parser_context_save_global): Initialize saved_data_ctx to 1. (build_dot_class_method): Don't load classes. Register incomplete types. (build_incomplete_class_ref): Special cases for interfaces and inner classes. Move build_dot_class_method call to here... (patch_incomplete_class_ref): ...from here. Pass current_class to build_dot_class_method_invocation. (build_assertion): Pass class_type to build_dot_class_method_invocation. (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node. 2003-11-17 Jeff Sturm <jsturm@one-point.com> Fix PR java/12739. * java-tree.h (BLOCK_EMPTY_P): Define. * parse.y (java_complete_lhs): Check for empty blocks in TRY_FINALLY_EXPR case. 2003-11-17 Andrew Haley <aph@redhat.com> * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New. (struct lang_decl_var:freed): New variable. * decl.c (poplevel): Mark local vars that have gone out of scope. (push_jvm_slot): Don't use the RTL of a var that has gone out of scope. 2003-11-16 Jason Merrill <jason@redhat.com> * Make-lang.in (java.tags): Create TAGS.sub files in each directory and TAGS files that include them for each front end. 2003-11-15 Tom Tromey <tromey@redhat.com> * gjavah.c (print_stub_or_jni): Pass `env' to FatalError. 2003-11-12 Jason Merrill <jason@redhat.com> PR optimization/12547 * lang.c (java_tree_inlining_walk_subtrees): Just walk BLOCK_EXPR_BODY directly. 2003-11-12 Andrew Haley <aph@redhat.com> PR java/11045 * parse.y (fold_constant_for_init): Check that we really do have a constant. PR java/11533 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for init_test_decls being inlined. PR java/12890: * parse.y (do_resolve_class): Check return value from breakdown_qualified(). 2003-11-11 Tom Tromey <tromey@redhat.com> PR java/12915: * parse.y (merge_string_cste): Handle case where we have a pointer that happens to be zero, not null_pointer_node. 2003-11-10 Tom Tromey <tromey@redhat.com> * jcf-parse.c (classify_zip_file): Correctly compare filename_length against length of manifest file's name. 2003-11-08 Tom Tromey <tromey@redhat.com> PR java/12894: * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file. 2003-11-06 Andrew Haley <aph@redhat.com> * expr.c (java_stack_swap): Make sure destination stack slots are of the correct type. 2003-11-03 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in (dvi): Move targets to $(docobjdir). (gcj.dvi): Simplify rule and adjust target. (gcj.info): Simplify rule. (gcj.pod): New intermediate rule. (gcjh.pod): Likewise. (jv-scan.pod): Likewise. (jcf-dump.pod): Likewise. (gij.pod): Likewise. (jv-convert.pod): Likewise. (rmic.pod): Likewise. (rmiregistry.pod): Likewise. (gcj.1): Delete. (gcjh.1): Delete. (jv-scan.1): Delete. (jcf-dump.1): Delete. (gij.1): Delete. (jv-convert.1): Delete. (rmic.1): Delete. (rmiregistry.1): Delete. 2003-11-02 Jeff Sturm <jsturm@one-point.com> Fixes PR java/12866. * parse.y (resolve_qualified_expression_name): Move test for outer field access methods from here... (check_thrown_exceptions) ...to here. 2003-11-01 Kelley Cook <kcook@gcc.gnu.org> * .cvsignore: Delete. 2003-10-28 Frank Ch. Eigler <fche@redhat.com> * verify.c (verify_jvm_instructions): Don't warn about legal eh binding regions generated for example by jdk 1.4.1. 2003-10-24 David S. Miller <davem@redhat.com> * jcf-parse.c (jcf_parse): Fix args to fatal_error(). 2003-10-22 Andrew Haley <aph@redhat.com> * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New. (java_get_callee_fndecl): New. * jcf-parse.c (java_parse_file): Call emit_catch_table(). * java-tree.h (ctable_decl): New. (catch_classes): New. (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES. * decl.c (java_init_decl_processing): Add catch_class_type. Add ctable_decl. Add catch_classes field. * class.c (build_indirect_class_ref): Break out from build_class_ref. (make_field_value): Check flag_indirect_dispatch. (make_class_data): Ditto. Tidy uses of PUSH_FIELD_VALUE. Add field catch_classes. (make_catch_class_record): New. * java-tree.h (PUSH_FIELD_VALUE): Tidy. 2003-10-22 Kazu Hirata <kazu@cs.umass.edu> * jcf-write.c: Follow spelling conventions. * parse.y: Likewise. 2003-10-22 Kazu Hirata <kazu@cs.umass.edu> * ChangeLog: Fix typos. * expr.c: Fix comment typos. * jcf-write.c: Likewise. * lang.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * parse-scan.y: Likewise. * parse.y: Likewise. 2003-10-22 Tom Tromey <tromey@redhat.com> * expr.c (expand_byte_code): Only warn about dead bytecode when extra_warnings is set. 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz> Fix for PR java/12586. * mangle.c (find_compression_record_match): Don't iterate through package namespace elements unless they all match compression_table entries. 2003-10-20 Kelley Cook <kcook@gcc.gnu.org> * Make-lang.in (info): Honor $(parsedir) and $(docobjdir). (generate-manpages): Likewise. (java.maintainer-clean): Likewise. (gcj.info): Likewise. (gcj.1): Likewise. (gcjh.1): Likewise. (jv-scan.1): Likewise. (jcf-dump.1): Likewise. (gij.1): Likewise. (jv-convert.1): Likewise. (rmic.1): Likewise. (rmiregistry.1): Likewise. (java.install-man): Likewise. (parse-scan.o): Move and define complete compile line. (parse.o): Likewise. (jcf-tree-inline.o): Move. 2003-10-20 Mark Mitchell <mark@codesourcery.com> * Make-lang.in (info): Update dependencies. (java.install-info): Remove. ($(srcdir)/java/gcj.info): Replace with ... ($(docobjdir)/gcj.info): ... this. 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org> * Make-lang.in: Replace uses of $(target_alias) with $(target_noncanonical). 2003-10-09 Tom Tromey <tromey@redhat.com> * decl.c (java_init_decl_processing): Declare signers field. * class.c (make_class_data): Set signers field. 2003-10-09 Jason Merrill <jason@redhat.com> * parse.y (patch_assignment): Use make_node to create a BLOCK. * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a POINTER_TYPE. 2003-10-06 Mark Mitchell <mark@codesourcery.com> * Make-lang.in (java.info): Replace with ... (info): ... this. (java.dvi): Replace with ... (dvi): ... this. (java.generated-manpages): Replace with ... 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com> * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros. 2003-10-01 Andrew Haley <aph@redhat.com> * jcf-parse.c (java_parse_file): Write otable and atable. * java-tree.h (atable_methods): New. (atable_decl): New. (atable_syms_decl): New. (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL, JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*. (symbol_*type): Rename method_symbol* to symbol*type. (emit_offset_symbol_table): Delete. (emit_symbol_table): New. (get_symbol_table_index): New. (atable_type): New. * expr.c (build_field_ref): Handle flag_indirect_dispatch. (build_known_method_ref): Likewise. (get_symbol_table_index): Rename from get_offset_table_index. Parameterize to allow re-use by differing types of symbol table. (build_invokevirtual): Pass table to get_offset_table_index. * decl.c (java_init_decl_processing): Push types and decls for atable and atable_syyms. * class.c (build_static_field_ref): Handle flag_indirect_dispatch. (make_class_data): Add new fields atable and atable_syms. (emit_symbol_table): Rename from emit_offset_symbol_table. Parameterize to allow re-use by different types of symbol table. (build_symbol_entry): Renamed from build_method_symbols_entry. 2003-09-30 Roger Sayle <roger@eyesopen.com> * jcf-write.c (generate_bytecode_insns): Implement evaluate-once semantics for SAVE_EXPR, by caching the result in a temporary. 2003-09-28 Richard Henderson <rth@redhat.com> * check-init.c (check_init): Save and restore input_location instead of file and line separately. * decl.c (java_expand_body): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * parse.y (safe_layout_class): Likewise. * jcf-parse.c (read_class, parse_class_file): Likewise. (java_parse_file): Use %H for warning locator. 2003-09-28 Roger Sayle <roger@eyesopen.com> * expr.c (java_check_reference): Use the semantics of COND_EXPRs with void-type branches instead of using a COMPOUND_EXPR. 2003-09-28 Jeff Sturm <jsturm@one-point.com> * decl.c (java_optimize_inline, dump_function): Remove. * java-tree.h (java_optimize_inline): Remove declaration. * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set. * parse.y (source_end_java_method, java_expand_classes): Likewise. Remove dead code. 2003-09-27 Roger Sayle <roger@eyesopen.com> * lang.c (java_init_options): Set flag_evaluation_order. * expr.c (force_evaluation_order): Don't attempt to force evaluation order of binary operations using save_expr. * parse.y (java_complete_lhs): No longer need to call force_evaluation_order when constructing binary operators. 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com> Bryce McKinlay <bryce@mckinlay.net.nz> PR java/1333: * parse.y (not_accessible_field_error): New function. (resolve_expression_name): Check field access permissions. (resolve_qualified_expression_name): Use not_accessible_field_error. (resolve_qualified_expression_name): Likewise. 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value. 2003-09-23 Roger Sayle <roger@eyesopen.com> * jcf-write.c (generate_bytecode_insns): Optimize binary operations with equal operands without side-effects. 2003-09-22 Jeff Sturm <jsturm@one-point.com> * decl.c (java_init_decl_processing): Don't emit otable decls if flag_indirect_dispatch is not set. 2003-09-21 Richard Henderson <rth@redhat.com> * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, resource.c: Revert. 2003-09-21 Richard Henderson <rth@redhat.com> * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, resource.c: Update for DECL_SOURCE_LOCATION rename and change to const. 2003-09-20 Richard Henderson <rth@redhat.com> * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics. 2003-09-18 Roger Sayle <roger@eyesopen.com> * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case. * check-init.c (check_init): Likewise. 2003-09-18 Roger Sayle <roger@eyesopen.com> * jcf-write.c (generate_bytecode_insns): Add support for fconst_2. 2003-09-16 Andrew Haley <aph@redhat.com> * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR. 2003-09-17 Ranjit Mathew <rmathew@hotmail.com> Fixes PR java/9577 * mangle.c (find_compression_record_match): Skip over a "6JArray" (the array template mangled string) IDENTIFIER_NODE. (mangle_array_type): Correct minor typo. (atms): Move definition to the beginning. 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz> * class.c (add_miranda_methods): Ensure super-interfaces are laid out. Fix for PR java/12254. 2003-09-11 Richard Henderson <rth@redhat.com> * parse.y (source_end_java_method): Update for new cgraph_finalize_function argument. 2003-09-09 Richard Henderson <rth@redhat.com> * parse.y (source_end_java_method): Update call to cgraph_finalize_function. 2003-09-03 Jeff Sturm <jsturm@one-point.com> * decl.c (java_expand_body): New function. * expr.c (build_class_init): Set DECL_IGNORED_P. * java-tree.h (start_complete_expand_method, java_expand_body): Declare. * jcf-parse.c (cgraph.h): Include. (java_parse_file): Handle flag_unit_at_a_time. * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING, LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define. (java_estimate_num_insns): Use walk_tree_without_duplicates. (java_start_inlining): New function. * parse.h (java_finish_classes): Declare. * parse.y: Include cgraph.h. (block): Don't special-case empty block production. (craft_constructor): Set DECL_INLINE. (source_end_java_method): Handle flag_unit_at_a_time. Replace inline code with call to java_expand_body. (start_complete_expand_method): Remove static modifier. (java_expand_method_bodies): Patch function tree for class initialization and/or synchronization as needed. Don't begin RTL expansion yet. (java_expand_classes): Check flag_unit_at_a_time before calling finish_class. (java_finish_classes): New function. (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type. (patch_assignment): Set DECL_CONTEXT on temporary variable. (emit_test_initialization): Set DECL_IGNORED_P. 2003-09-03 Roger Sayle <roger@eyesopen.com> * builtins.c (enum builtin_type): Delete unused enumeration. * Make-lang.in (java/builtins.o): Remove built-types.def dependency. 2003-08-28 Tom Tromey <tromey@redhat.com> * gcj.texi (Extensions): Document gcjlib URLs. 2003-08-20 Tom Tromey <tromey@redhat.com> * gcj.texi (Extensions): Added xref. (libgcj Runtime Properties): Document gnu.gcj.runtime.VMClassLoader.library_control. 2003-08-20 Andrew Haley <aph@redhat.com> * except.c (prepare_eh_table_type): Use new encoding for exception handlers when using -fno-assume-compiled. 2003-08-13 Tom Tromey <tromey@redhat.com> * gcj.texi (Invoking gij): Document -X and -?. 2003-08-13 Mohan Embar <gnustuff@thisiscool.com> * Make-lang.in: Added missing win32-host.o to JAVA_OBJS, GCJH_OBJS, JCFDUMP_OBJS * win32-host.c: Removed the unnecessary and broken dependency on jcf.h 2003-08-11 Tom Tromey <tromey@redhat.com> * parse.y (java_check_regular_methods): Typo fixes. Call check_interface_throws_clauses. Use check_concrete_throws_clauses. (check_interface_throws_clauses): New function. (check_concrete_throws_clauses): New function. (hack_is_accessible_p): New function. (find_most_specific_methods_list): Added FIXME. * typeck.c (lookup_do): Use `flags' argument to decide what to do. Reimplemented. (lookup_argument_method_generic): New function. (lookup_argument_method2): Removed. * jcf.h (ACC_INVISIBLE): New define. * jcf-write.c (generate_classfile): Skip invisible methods. * class.c (add_miranda_methods): New function. (layout_class_methods): Use it. (get_access_flags_from_decl): Use ACC_INVISIBLE. * java-tree.h (METHOD_INVISIBLE): New define. (lang_decl_func) [invisible]: New field. (lookup_argument_method_generic): Declare. (SEARCH_INTERFACE): New define. (SEARCH_SUPER): Likewise. (SEARCH_ONLY_INTERFACE): Likewise. (SEARCH_VISIBLE): Likewise. (lookup_argument_method2): Removed declaration. 2003-08-05 Tom Tromey <tromey@redhat.com> Fix for PR java/11600: * parse.y (java_complete_lhs): See whether we're calling a method on an array. (check_thrown_exceptions): Added `is_array_call' argument; fixed `clone' checking; updated all callers. 2003-08-05 Steven Bosscher <steven@gcc.gnu.org> * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h). 2003-08-03 Tom Tromey <tromey@redhat.com> * java-tree.h (METHOD_TRANSIENT): Removed. * decl.c (pushdecl): Removed some dead code. * class.c (get_access_flags_from_decl): Can't have transient method. (add_method_1): Can't have a transient method. 2003-07-28 Andreas Jaeger <aj@suse.de> * jvspec.c: Convert to ISO C90 prototypes. 2003-07-25 Nathan Sidwell <nathan@codesourcery.com> * decl.c (force_poplevels): Fix warning call. 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net> * expr.c (expand_java_field_op): Don't use xxx_with_decl (expand_java_field_op): Likewise. * class.c (layout_class_method): Likewise (emit_register_classes): Likewise. * decl.c (pushdecl): Likewise. (poplevel): Likewise. (force_poplevels): Likewise. (give_name_to_locals): Likewise. * check-init.c (check_for_initialization): Likewise. 2003-07-24 Jason Merrill <jason@redhat.com> * java-tree.h: Move boolean_type_node et al to the back end. 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary casts. 2003-07-19 Neil Booth <neil@daikokuya.co.uk> * lang.opt: Don't show -MD_ and -MDD_. 2003-07-18 Neil Booth <neil@daikokuya.co.uk> * lang-options.h: Remove. * lang.opt: Add help text. 2003-07-15 Kazu Hirata <kazu@cs.umass.edu> * expr.c: Remove the last argument to expand_assignment(). 2003-07-09 Jan Hubicka <jh@suse.cz> * java-tree.h (DECL_NUM_STMTS): Rename to... (DECL_ESTIMATED_INSNS): ... this. * lang.c (java_estimate_num_insns, java_estimate_num_insns_1): New static functions. (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define. * parser.y (add_stmt_to_compound): Do not account statements. 2003-07-08 Mark Wielaard <mark@klomp.org> * gcj.texi: CNI now expands to Compiled Native Interface. 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND. 2003-07-07 Nathan Sidwell <nathan@codesourcery.com> * expr.c (expand_byte_code): Adjist emit_line_note call. 2003-07-06 Neil Booth <neil@daikokuya.co.uk> * lang.c (java_handle_option): Don't handle filenames. 2003-07-02 Zack Weinberg <zack@codesourcery.com> * jcf-path.c: Don't default-define PATH_SEPARATOR nor DIR_SEPARATOR. Use FILENAME_CMP. * jcf-write.c: Don't default-define DIR_SEPARATOR. * jcf.h: Delete COMPARE_FILENAMES definition. 2003-07-02 Neil Booth <neil@daikokuya.co.uk> * lang.c (java_init_options): Update prototype. 2003-07-01 Nathan Sidwell <nathan@codesourcery.com> * decl.c (poplevel): Adjust define_label call. 2003-06-27 Zack Weinberg <zack@codesourcery.com> * gjavah.c (flag_jni): Make non-static. * parse-scan.y (ctxp): Make non-static. * class.c (build_method_symbols_entry) * expr.c (get_offset_table_index) * jcf-parse.c (jcf_parse): Mark the definition static, matching the forward declaration. 2003-06-26 Neil Booth <neil@daikokuya.co.uk> * lang.c (java_handle_option): Don't check for missing arguments. 2003-06-20 Nathan Sidwell <nathan@codesourcery.com> * class.c (push_class): Use a location_t to save place. (emit_register_classes): Set input_location. Adjust expand_function_end call. * resource.c (write_resource_constructor): Likewise. * decl.c (end_java_method): Adjust expand_function_end call. * parse.y (source_end_java_method): Likewise. 2003-06-17 Robert Abeles <rabeles@archaelogic.com> * lang.c (java_handle_option): Likewise. 2003-06-16 Neil Booth <neil@daikokuya.co.uk> * lang.c (java_handle_option): Special-casing of optional joined arguments no longer needed. * lang.opt: Update switches that take optional argument. 2003-06-15 Neil Booth <neil@daikokuya.co.uk> * lang.opt: Declare Java. * lang.c (java_init_options): Update. 2003-06-15 Neil Booth <neil@daikokuya.co.uk> * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h. 2003-06-14 Neil Booth <neil@daikokuya.co.uk> * lang-specs.h: Rewrite -MD and -MMD to append an underscore. * lang.c (java_handle_option): -MD and -MMD have an underscore. * lang.opt: -MD and -MMD have an underscore. 2003-06-14 Nathan Sidwell <nathan@codesourcery.com> * class.c (emit_register_classes): Adjust init_function_start call. * decl.c (complete_start_java_method): Likewise. * resource.c (write_resource_constructor): Likewise. 2003-06-14 Neil Booth <neil@daikokuya.co.uk> * Make-lang.in: Update to use options.c and options.h. * lang.c: Include options.h not j-options.h. (java_handle_option): Abort on unrecognized option. (java_init_options): Request Java switches. 2003-06-11 Neil Booth <neil@daikokuya.co.uk> * Make-lang.in: Handle mostlyclean. 2003-06-11 Tom Tromey <tromey@redhat.com> * lang.c (java_handle_option): Update dependency_tracking for OPT_MF case. * lang.c (java_handle_option): OPT_fbootclasspath_ can take an empty argument. 2003-06-10 Andrew Haley <aph@redhat.com> * resource.c (write_resource_constructor): Use expand_expr to generate the address of the label attached to a resource. * Make-lang.in (java/resource.o): Add expr.h 2003-06-10 Andrew Haley <aph@redhat.com> * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New. (java_decl_ok_for_sibcall): New. 2003-06-09 Neil Booth <neil@daikokuya.co.uk> * Make-lang.in (JAVA_OBJS, java/lang.o): Update. (java/j-options.c, java/j-options.h): New. * java-tree.h (resource_name, compile_resource_file, compile_resource_data): Constify. * jcf-write.c (jcf_write_base_directory): Similarly. * jcf.h (jcf_write_base_directory): Similarly. * lang.c: Include j-options.h. (cl_options_count, cl_options, string_option, java_decode_option, lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION, process_option_with_no): Remove. (resource_name): Constify. (LANG_HOOKS_HANDLE_OPTION): Override. (java_handle_option): New. (java_init): Don't call jcf_path_init. (java_init_options): Call jcf_path_init. * lang.opt: New. * resource.c (compile_resource_data, compile_resource_file): Constify. 2003-06-09 Nathan Sidwell <nathan@codesourcery.com> * java-tree.h (DECL_FUNCTION_LAST_LINE): New. (struct lang_decl_func): Add last_line field. * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST, DECL_SOURCE_LINE_LAST): Remove. * parse.y (missing_return_error, finish_method_declaration, lookup_cl, start_artificial_method_body, source_end_java_method, start_complete_expand_method): Adjust. 2003-06-08 Tom Tromey <tromey@redhat.com> * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and fno-assume-compiled. 2003-06-08 Roger Sayle <roger@eyesopen.com> * builtins.c (define_builtin_type, builtin_types): Delete. (define_builtin): Rewritten to take just the built-in code, the function's name, type and fallback library function name. All built-ins used by Java are implicit and BUILT_IN_NORMAL. (initialize_builtins): Overhaul to define the GCC builtins used by gcj manually, providing the Java run-time's implementations as the fallback library function. 2003-06-08 Anthony Green <green@redhat.com> * parse.y (patch_cast): Fix conversions from floating-point to integral types. 2003-06-08 Neil Booth <neil@daikokuya.co.uk> * Make-lang.in: Update. * lang.c: Include opts.h. Define cl_options_count and cl_options. 2003-06-07 Neil Booth <neil@daikokuya.co.uk> * lang.c (java_init_options): Update. 2003-06-05 Jan Hubicka <jh@suse.cz> * Make-lang.in: Add support for stageprofile and stagefeedback 2003-05-31 Roger Sayle <roger@eyesopen.com> * lang.c (java_init_options): Prescribe wrap-around two's complement arithmetic overflow by setting flag_wrapv. 2003-05-29 Roger Sayle <roger@eyesopen.com> * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete. (builtin_record): Add an additional builtin_code field to record which GCC built-in corresponds to the Java function. (java_builtins): Add new entries for atan, atan2, exp, log, pow and tan. (max_builtin, min_builtin, abs_builtin): Perform constant folding on the resulting tree. (java_build_function_call_expr): Likewise, perform constant folding on the resulting tree. (initialize_builtins): The NULL creators are now allowed in the java_builtins table, which is now terminated by an entry with builtin_code == END_BUILTINS. (check_for_builtin): Likewise. If the matching creator is NULL, construct the call using java_build_function_call_expr directly with the decl for the corresponding builtin_code. 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org> * win32-host.c: Normalize copyright boilerplate. 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * parse.y (print_int_node): Use string concatentation on HOST_WIDE_INT_PRINT_* format specifier to collapse multiple function calls into one. 2003-05-13 Zack Weinberg <zack@codesourcery.com> * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to fatal_io_error with calls to fatal_error; add ": %m" to the end of all the affected error messages. 2003-05-13 Richard Henderson <rth@redhat.com> * class.c (layout_class_method): Set DECL_EXTERNAL. * decl.c (java_mark_decl_local, java_mark_class_local): New. * java-tree.h (java_mark_class_local): Declare. * jcf-parse.c (parse_class_file): Use it. * parse.y (java_expand_classes): Likewise. 2003-05-04 Nathan Sidwell <nathan@codesourcery.com> * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h. * lex.h: #include input.h. * jv-scan.c (input_filename): Remove. 2003-05-02 Tom Tromey <tromey@redhat.com> PR java/10491: * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro. (handle_inner_classes): New function. 2003-05-01 Tom Tromey <tromey@redhat.com> PR java/10459: * parse.y (finish_for_loop): Do nothing if update expression is a EXPR_WFL_NODE wrapping nothing. (java_complete_lhs) <COMPOUND_EXPR>: Likewise. 2003-05-02 Nathan Sidwell <nathan@codesourcery.com> * lex.h (input_lineno): Remove declaration. * parse-scan.y: #include input.h. (input_filename): Remove declaration. (input_location): Add definition. (input_line): Remove definition. 2003-05-01 Nathan Sidwell <nathan@codesourcery.com> * lex.h (lineno): Rename to ... (input_line): ... here * parse-scan.y (lineno): Rename to ... (input_line): ... here. (reset_report): Rename lineno to input_line. * check-init.c (check_init): Likewise. * class.c (push_class): Likewise. * decl.c (complete_start_java_method, end_java_method): Likewise. * expr.c (expand_byte_code): Likewise. * jcf-parse.c (give_name_to_class, parse_class_file): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * lex.c (java_init_lex, java_allocate_new_line, do_java_lex): Likewise. * parse.h (YYNOT_TWICE): Likewise. * parse.y (empty_statement, expression_statement, java_pop_parser_context, java_parser_context_save_global, yyerror, register_fields, method_header, safe_layout_class, find_in_imports_on_demand, create_artificial_method, source_end_java_method, start_complete_expand_method, build_thisn_assign, java_complete_lhs, maybe_absorb_scoping_block): Likewise. 2003-04-20 Mohan Embar <gnustuff@thisiscool.com> * jcf-io.c (find_class): use DIR_SEPARATOR instead of '/' when computing java source filename 2003-04-13 Tom Tromey <tromey@redhat.com> * gjavah.c (print_c_decl): Indentation fix. 2003-04-12 Zack Weinberg <zack@codesourcery.com> * class.c (make_field_value, make_method_value, get_dispatch_table) (make_class_data, emit_offset_symbol_table) * constants.c (build_constants_constructor) * java-tree.h (START_RECORD_CONSTRUCTOR) * parse.y (maybe_build_array_element_wfl): Use build_constructor. 2003-04-10 Eric Blake <ebb9@email.byu.edu> PR java/10253: * parse.y (string_convert_int_cst): Always use at least one digit in string conversion. Remove ASCII dependence. (merge_string_cste): Fix merging of 3-byte UTF-8 characters. 2003-03-16 Mohan Embar <gnustuff@thisiscool.com> * Make-lang.in: added win32-host.c * jcf.h: defined macro JCF_OPEN_EXACT_CASE which resolves to open() on non-Win32 platforms and Win32-specific jcf_open_exact_case() on Win32 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE when trying .java and .class files * win32-host.c: added to repository. Defines Win32-specific jcf_open_exact_case() 2003-04-10 Andrew Haley <aph@redhat.com> * jcf-write.c (struct jcf_partial): num_jsrs: new field. (maybe_free_localvar): Renamed from localvar_free. Add new arg, really. (generate_bytecode_insns): Set new variable, jsrs. Only free local vars if no jsr insns have been emittted. Call maybe_free_localvar, not localvar_free. 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk> * gcj.texi: Remove @ at start of file. 2003-03-25 Tom Tromey <tromey@redhat.com> * parse.y (create_interface): Call CHECK_DEPRECATED. 2003-03-23 Zack Weinberg <zack@codesourcery.com> * Make-lang.in: Link jcf-dump against $(LDEXP_LIB). 2003-03-21 Zack Weinberg <zack@codesourcery.com> * javaop.h (jfloat, jdouble): Make them structures mirroring the bit fields of IEEE float and double respectively. (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS, JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New. (union Word, union DWord): Delete. (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match. * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK, D_NAN_MASK): Delete. (jni_print_float, jni_print_double): New. Generate hexadecimal floating constants. (print_field_info): Use jni_print_float/double. * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble finite floating point numbers for output; special case non-finite floats. 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org> * lang.c (java_dump_tree): Change return type from 'int' to 'bool'. Replace 0 and 1 with true and false in return statements. 2003-03-19 Tom Tromey <tromey@redhat.com> * lex.c (do_java_lex): Renamed from java_lex. (java_lex): New function. Include timevar.h. 2003-03-13 Tom Tromey <tromey@redhat.com> * parse.y (resolve_inner_class): Error if qualifier is a primitive type. 2003-03-04 Andrew Haley <aph@redhat.com> * gjavah.c (is_first_data_member): New global variable. (print_c_decl): If it's the first data member, align it as the superclass. (process_file): Set is_first_data_member. 2003-03-11 Tom Tromey <tromey@redhat.com> * parse.y (resolve_field_access): Initialize class if field is found in another static field. * expr.c (build_class_init): Don't optimize out initialization of implemented interface. 2003-03-11 Andrew Haley <aph@redhat.com> * jcf-io.c (caching_stat): Initialize origsep to remove compiler warning. 2003-03-10 Ranjit Mathew <rmathew@hotmail.com> * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR and DIR_SEPARATOR_2 for a target. Correct minor typos. * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR and DIR_SEPARATOR_2 for a target into account. 2003-03-08 Neil Booth <neil@daikokuya.co.uk> * lang.c (java_init): Update prototype, move code to java_post_options. (java_post_options): Similarly. 2003-03-05 Ranjit Mathew <rmathew@hotmail.com> * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to compare file name components depending on the case-sensitivity or otherwise of the host file system. * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of "strcmp" to compare file name components. Use IS_DIR_SEPARATOR instead of comparing directly against DIR_SEPARATOR. (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of comparing directly against DIR_SEPARATOR. 2003-03-04 Tom Tromey <tromey@redhat.com> * Make-lang.in (java.tags): New target. 2003-03-01 Roger Sayle <roger@eyesopen.com> * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3. (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3. 2003-03-01 Tom Tromey <tromey@redhat.com> * parse.y (jdep_resolve_class): Only check deprecation if we found a decl. 2003-02-28 Tom Tromey <tromey@redhat.com> PR java/9695: * class.c (maybe_layout_super_class): Always pass a WFL to do_resolve_class. * parse.y (do_resolve_class): Updated comment to explain parameters. 2003-02-26 Tom Tromey <tromey@redhat.com> * jcf-write.c (generate_classfile): Check whether class is deprecated before writing attribute count. 2003-02-25 Roger Sayle <roger@eyesopen.com> * java/decl.c (java_init_decl_processing): Get soft_fmod_node from built_in_decls[BUILT_IN_FMOD] rather than define it ourselves. 2003-02-23 Tom Tromey <tromey@redhat.com> * lang-options.h: Added -Wdeprecated. * gcj.texi (Warnings): Document -Wdeprecated. * java-tree.h (flag_deprecated): Declare. * lang.c (lang_W_options): Added deprecated. (flag_deprecated): New global. * chartables.h: Rebuilt. * gen-table.pl (process_one): Look at whitespace. (print_tables): Define LETTER_SPACE, LETTER_MASK. * parse.h (CLEAR_DEPRECATED): New macro. (CHECK_DEPRECATED_NO_RESET): New macro. * jcf-parse.c (handle_deprecated): New function. (HANDLE_DEPRECATED_ATTRIBUTE): New define. * jcf-reader.c (get_attribute): Handle Deprecated attribute. * parse.y (resolve_type_during_patch): Check deprecation. (jdep_resolve_class): Likewise. (process_imports): Likewise. (resolve_expression_name): Likewise. (check_deprecation): Strip arrays from decl. Check flag_deprecated. (patch_method_invocation): Also check the particular constructor for deprecation. (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop. * jcf-write.c (append_deprecated_attribute): New function. (generate_classfile): Generate deprecated attribute when appropriate. * lex.c (java_parse_doc_section): Return type now void. Rewrote. (java_lex) [case '*']: Simplify logic. (java_start_char_p): Use LETTER_MASK. (java_part_char_p): Likewise. (java_space_char_p): New function. 2003-02-20 Nathan Sidwell <nathan@codesourcery.com> Change base class access representation. * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC. (add_interface_do): Likewise. 2003-02-12 Ranjit Mathew <rmathew@hotmail.com> * decl.c (java_init_decl_processing): Change soft_lookupjnimethod_node to reflect the change in signature of _Jv_LookupJNIMethod in libjava/jni.cc * expr.c (build_jni_stub): Calculate and pass the size on the stack of the arguments to a JNI function. Use new target macro MODIFY_JNI_METHOD_CALL to allow a target to modify the call to a JNI method. 2003-02-08 Roger Sayle <roger@eyesopen.com> * jcf-io.c (java_or_class_file): Use libiberty's lbasename instead of basename to avoid compiler warnings on Tru64. 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk> * gcj.texi: Update to GFDL 1.2. 2003-01-31 Andrew Haley <aph@redhat.com> * parse.y (java_expand_classes): Scan the whole class list looking for access methods that haven't yet been expanded. 2003-01-31 Adrian Bunk <bunk@fs.tum.de> Fix for java/4269: * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO to fix bootstrap on sparc-unknown-netbsdelf1.5. * jcf-parse.c: Likewise. 2003-01-31 Mark Wielaard <mark@klomp.org> * gjavah.c (throwable_p): Allocate 1 more byte for string. 2003-01-31 Nathan Sidwell <nathan@codesourcery.com> * class.c (make_class): Use BINFO_ELTS. (set_super_info): Likewse. (add_interface_do): Likewise. 2003-01-30 Tom Tromey <tromey@redhat.com> * jcf-parse.c (read_class): Update identifier's class value if it changed during parsing. 2003-01-30 Loren James Rittle <ljrittle@acm.org> * Make-lang.in (po-generated): Find the targets in $(parsedir). Propagate change to all other rules as required. (java/parse-scan.o): Add explicit dependency on $(parsedir)/java/parse-scan.c . 2003-01-29 Tom Tromey <tromey@redhat.com> * parse.y (patch_assignment): Only transform the rhs of an assignment when compiling to native. 2003-01-28 Tom Tromey <tromey@redhat.com> * jcf-write.c (generate_bytecode_conditional): Typo fixes. 2003-01-28 Tom Tromey <tromey@redhat.com> * lex.c (java_lex): Don't include UEOF as part of token. (java_read_unicode): Error if \u sequence prematurely terminated. 2003-01-27 Tom Tromey <tromey@redhat.com> * parse.y (java_check_regular_methods): Check for construct after checking types in throws clause. 2003-01-24 Tom Tromey <tromey@redhat.com> * class.c (build_static_field_ref): Only a String or numeric field can fold to a constant. 2003-01-23 Tom Tromey <tromey@redhat.com> * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of file name in resource buffer. 2003-01-23 Tom Tromey <tromey@redhat.com> * expr.c (build_known_method_ref): Use method's context to find method table index. 2003-01-23 Tom Tromey <tromey@redhat.com> * constants.c (set_constant_entry): Allocated cleared memory. 2003-01-22 Tom Tromey <tromey@redhat.com> * java-tree.h: Don't use PARAMS. * resource.c: Add prototypes for all functions. (write_resource_constructor): Use `const char *' to avoid warning. 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org> * jcf-parse.c (process_zip_dir): Remove unused variable. 2003-01-22 Tom Tromey <tromey@redhat.com> * expr.c (build_invokeinterface): Abort if method's context is not an interface. 2003-01-22 Tom Tromey <tromey@redhat.com> * gcj.texi (Input and output files): Mention non-class entries. * decl.c (java_init_decl_processing): Call init_resource_processing. * java-tree.h (compile_resource_data, write_resource_constructor, compile_resource_file, init_resource_processing): Declare. * config-lang.in (gtfiles): Added resource.c. * Make-lang.in (gt-java-resource.h): New target. (JAVA_OBJS): Added resource.o. (java/resource.o): New target. * resource.c: New file. * class.c (compile_resource_file): Moved to resource.c. (registerResource_libfunc): Likewise. (utf8_decl_list): Mark with GTY; now static. * jcf-parse.c (classify_zip_file): New function. (parse_zip_file_entries): Use it; compile .properties files. (process_zip_dir): Use classify_zip_file and compute_class_name. Don't write class name into zip directory. (java_parse_file): Call write_resource_constructor. (compute_class_name): New function. * jcf-io.c (read_zip_member): Reindented. 2003-01-21 Tom Tromey <tromey@redhat.com> * class.c (supers_all_compiled): New function. (make_class_data): Use it. 2003-01-21 Tom Tromey <tromey@redhat.com> * parse.y (method_header): Native method can't be strictfp. No method can be transient or volatile. 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Make-lang.in (jvspec.o-warn): Add -Wno-error. 2003-01-18 Kazu Hirata <kazu@cs.umass.edu> * check-init.c: Fix comment typos. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-except.h: Likewise. * java-tree.h: Likewise. * javaop.h: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jcf-write.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * typeck.c: Likewise. * verify.c: Likewise. 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H). * jcf-write.c: Include "tm_p.h". 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*. 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * builtins.c (java_build_function_call_expr): Renamed from build_function_call_expr. All callers changed. * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H). * jcf-parse.c: Include tm_p.h. * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned warning. 2003-01-14 Tom Tromey <tromey@redhat.com> * class.c (make_class_data): Check that super is compiled before building class reference to it. 2003-01-14 Andrew Haley <aph@redhat.com> * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a varargs function -- correct. 2003-01-14 Andrew Haley <aph@redhat.com> * decl.c (java_init_decl_processing): Temporarily back out previous patch. 2003-01-14 Andrew Haley <aph@redhat.com> * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a varargs function -- correct. * parse.y (patch_assignment): Copy the rhs of an assignment into a temporary if the RHS is a reference. 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf. * keyword.h: Regenerated. * All Files: Convert to ISO C style function definitions. 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org> * parse.y (check_pkg_class_access): ANSIfy definition. 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * decl.c, parse-scan.y, parse.y: Don't cast return value of xmalloc et al. * class.c, gjavah.c, parse.y, verify.c: Don't use PTR. 2003-01-09 Geoffrey Keating <geoffk@apple.com> Merge from pch-branch: 2002-12-02 Geoffrey Keating <geoffk@apple.com> * Make-lang.in (java/gjavah.o): Update dependencies. * gjavah.c: Include ggc.h. 2002-08-16 Geoffrey Keating <geoffk@redhat.com> * Make-lang.in (GCJH_OBJS): Add ggc-none.o. (JCFDUMP_OBJS): Add ggc-none.o. (java/jcf-dump.o): Depend on GGC_H. * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate CPool substructures. * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs. * jcf-dump.c: Include ggc.h. 2002-08-08 Geoffrey Keating <geoffk@redhat.com> * jcf.h (union cpool_entry): New. (struct CPool): Use gengtype to mark. Change field 'data' to be an array of unions. (struct JCF): Use gengtype to mark. (CPOOL_UINT): Update for new cpool_entry type. (CPOOL_USHORT1): Likewise. (CPOOL_USHORT2): Likewise. (CPOOL_FINISH): Use GC to free cpool subfields. * parse.h (struct parser_ctxt): Mark field current_jcf. * lex.c (java_init_lex): Use GC to allocate struct JCF. * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type. (main_jcf): Use gengtype to mark. (ggc_mark_jcf): Delete. (get_constant): Update for new cpool_entry type. (give_name_to_class): Likewise. (get_class_constant): Likewise. (init_outgoing_cpool): Use GGC to allocate struct CPool. (java_parse_file): Use GGC to allocate struct JCF. (init_jcf_parse): Don't call ggc_add_root. * jcf-reader.c (jcf_parse_constant_pool): Update for new cpool_entry type. * java-tree.h (current_jcf): Use gengtype to mark. (CPOOL_UTF): Update for new cpool_entry type. (outgoing_cpool): Use gengtype to mark. (struct lang_type): GC struct JCF and struct CPool. * config-lang.in (gtfiles): Add jcf.h. * constants.c (find_tree_constant): New. (set_constant_entry): Allocate cpool subfields using GGC. Update for new cpool_entry type. (find_constant1): Update for new cpool_entry type. (find_constant2): Likewise. (find_utf8_constant): Use find_tree_constant. (find_class_or_string_constant): Remove unnecessary cast to jword. Update for new cpool_entry type. (count_constant_pool_bytes): Update for new cpool_entry type. (write_constant_pool): Likewise. (alloc_name_constant): Use find_tree_constant. (build_constants_constructor): Update for new cpool_entry type. 2002-08-08 Geoffrey Keating <geoffk@redhat.com> * parse.y (mark_parser_ctxt): Delete. (goal): Don't use ggc_add_root. (create_new_parser_context): Use GC to allocate struct parser_ctxt. (java_pop_parser_context): Let GC free parser_ctxt. (java_parser_context_resume): Likewise. * parse.h (struct parser_ctxt): Use gengtype to mark. (ctxp): Likewise. (ctxp_for_generation): Likewise. * lex.h (struct java_lc_s): Mark for gengtype. (java_lexer): Rearrange for gengtype. * config-lang.in (gtfiles): Add lex.h, parse.h. 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * All Files: Remove PARAMS macro. * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c, jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or `__STDC__' macros. * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and VA_CLOSE. 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de> * Make-lang.in (java.install-common, java.uninstall, java.install-info, java.install-man): Prepend $(DESTDIR) to destination paths in all (un)installation commands. (java.install-common): Rewrite $(LN) command to support DESTDIR with "ln" as well as with "ln -s". 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org> * java-tree.h: Protect against multiple inclusion. 2003-01-07 Tom Tromey <tromey@redhat.com> * class.c (add_assume_compiled): Don't adjust parent if we're already at the root of tree. 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * lang.c (dump_compound_expr): Prototype. 2003-01-03 Tom Tromey <tromey@redhat.com> Fix for PR java/8712: * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR, when simply checking against `null'. 2003-01-03 Tom Tromey <tromey@redhat.com> * gcj.texi (Standard Properties): Document http.proxyHost and http.proxyPort. * gcj.texi (GNU Classpath Properties): Document new properties. 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl> * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf, java/lang-options.h, java/mangle.c, java/mangle_name.c, java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years. 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl> * Make-lang.in, boehm.c, buffer.c, buffer.h, builtins.c, class.c, config-lang.in, constants.c, convert.h, decl.c, except.c, expr.c, java-except.h, java-tree.h, javaop.def, jcf-parse.c, jcf-write.c, jv-scan.c, jvgenmain.c, jvspec.c, keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c, lex.c, lex.h, mangle.c, mangle_name.c, parse-scan.y, parse.h, parse.y, typeck.c, verify.c, xref.c, xref.h: Replace "GNU CC" with "GCC" in the copyright header. * check-init.c, gjavah.c, javaop.h, jcf-depend.c, jcf-dump.c, jcf-io.c, jcf-path.c, jcf-reader.c, jcf.h, zextract.c, zipfile.h: These files are "part of GCC". Also say "GCC" not "GNU CC". 2002-12-30 DJ Delorie <dj@redhat.com> * Make-lang.in: Protect against texi2pod/pod2man failing. 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk> * gcj.texi: Use @copying. 2002-12-27 Mark Mitchell <mark@codesourcery.com> * gjavah.c (print_name_for_stub_or_jni): Adjust call to print_cxx_classname. (print_cxx_classname): Add add_scope parameter. (print_class_decls): Do not emit a semicolon after the extern "Java" block. (process_file): Adjust calls to print_cxx_classname. 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk> * gcj.texi: Include Cover Texts in man page. 2002-12-23 Jeff Sturm <jsturm@one-point.com> * class.c (build_static_field_ref): Check FIELD_FINAL. * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF instead of current_constant_pool_data_ref. * java-tree.h (current_constant_pool_data_ref): Undefine. (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove. * jcf-parse.c (init_outgoing_cpool): Don't initialize current_constant_pool_data_ref. * except.c (prepare_eh_table_type ): Use DECL_NAME of class type, not build_internal_class_name. * parse.y (patch_incomplete_class_ref): Always emit `class$' method. Use it when class ref isn't certain to be compiled. 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk> * gcj.texi: Include gcc-common.texi. * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on $(srcdir)/doc/include/gcc-common.texi. 2002-12-22 Anthony Green <green@redhat.com> * gcj.texi (Limitations): Add note about org.xml.sax and org.w3c.dom. 2002-12-20 Tom Tromey <tromey@redhat.com> * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case where minimum case value is Integer.MIN_VALUE. Fixes PR java/8955. 2002-12-18 Andrew Haley <aph@redhat.com> * parse.y (patch_invoke): Force evaluation order when `check' is set. For PR libgcj/8945. 2002-12-16 Mark Mitchell <mark@codesourcery.com> * gcj.texi: Change version number to 3.4. 2002-12-05 Ranjit Mathew <rmathew@hotmail.com> Andrew Haley <aph@redhat.com> * parse.y (source_end_java_method): Remove custom encoding of line numbers for a function decl before passing it to the back end. 2002-12-03 Andrew Haley <aph@redhat.com> * class.c (make_class_data): New field, "chain". * decl.c (java_init_decl_processing): Likewise. 2002-12-02 Tom Tromey <tromey@redhat.com> For PR java/8740: * parse.y (do_resolve_class): Handle qualified name via recursion. 2002-11-30 Zack Weinberg <zack@codesourcery.com> * boehm.c, buffer.c, builtins.c, check-init.c, class.c, constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c, jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c, jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c, parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c: Include coretypes.h and tm.h. * Make-lang.in: Update dependencies. 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant. 2002-11-25 Diego Novillo <dnovillo@redhat.com> * jcf-reader.c: Don't expand JCF_readu4 inside the expansion of JCF_SKIP. 2002-11-25 Diego Novillo <dnovillo@redhat.com> * jcf-reader.c: Don't expand JCF_readu4 inside the expansion of JCF_SKIP. 2002-11-22 Tom Tromey <tromey@redhat.com> * parse.y (patch_binop): Cast right hand side of shift expression to `int'. Fixes PR java/8676. 2002-11-22 Ranjit Mathew <rmathew@hotmail.com> Andrew Haley <aph@redhat.com> * gcc/java/jcf-write.c (write_classfile): Remove target class file, if it exists, before renaming the temporary class file to it. 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com> * jvspec.c (lang_specific_spec_functions): New. 2002-11-18 Tom Tromey <tromey@redhat.com> Fix for PR java/7912: * expr.c (can_widen_reference_to): Allow cast of array to Cloneable or Serializable. * java-tree.h (java_lang_cloneable_identifier_node): Declare. (java_io_serializable_identifier_node): Likewise. * parse.y (java_lang_cloneable, java_io_serializable): Removed. (valid_ref_assignconv_cast_p): Use new identifier nodes. * lex.c (java_init_lex): Don't initialize java_lang_cloneable and java_io_serializable. * decl.c (java_init_decl_processing): Initialize java_lang_cloneable_identifier_node and java_io_serializable_identifier_node. (java_lang_cloneable_identifier_node): New global. (java_io_serializable_identifier_node): Likewise. 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de> * buffer.c: Remove unnecessary casts. * check-init.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * gjavah.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jcf-path.c: Likewise. * jvspec.c: Likewise. * lang.c: Likewise. * lex.c: Likewise. * verify.c: Likewise. 2002-11-06 Tom Tromey <tromey@redhat.com> * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in a JNI header. 2002-11-05 Tom Tromey <tromey@redhat.com> Fix for PR java/6388. * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while. * java-tree.h (enum java_tree_index): New values JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE. (decimal_int_max, decimal_long_max): New defines. * lex.c (yylex): Rewrote range checking. Sign extend literals. (error_if_numeric_overflow): Rewrote range checking. * decl.c (java_init_decl_processing): Initialize decimal_int_max, decimal_long_max. 2002-11-02 Tom Tromey <tromey@redhat.com> * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE. * class.c (make_method_value): Put class name, not signature, into `throws' field. For PR java/8415. 2002-10-24 Tom Tromey <tromey@redhat.com> * gcj.texi (Invoking gij): Document --showversion. (Standard Properties): java.library.path now set. 2002-10-23 Tom Tromey <tromey@redhat.com> * gjavah.c (decode_signature_piece): In JNI mode, print `jobjectArray' when array depth is nonzero. Fixes PR java/8296. 2002-10-15 Andrew Haley <aph@redhat.com> * parse.y (patch_invoke): Call force_evaluation_order on a static arg list. (resolve_qualified_expression_name): Call force_evaluation_order on a arg list that is part of a Qualified Expression Name. * lang.c (dump_compound_expr): New. (java_dump_tree): New. 2002-10-20 Ranjit Mathew <rmathew@hotmail.com> * gcj.texi: Added item describing the GCJ runtime property "gnu.gcj.progname". 2002-10-15 Richard Henderson <rth@redhat.com> * jcf-parse.c (get_constant): Fix type warning. 2002-10-15 Andrew Haley <aph@redhat.com> * java-tree.h (java_inlining_merge_static_initializers): Declare. (java_inlining_map_static_initializers): Declare. 2002-10-14 Andrew Haley <aph@redhat.com> * tree-inline.c (remap_block): All local class initialization flags go in the outermost scope. (expand_call_inline): Call java_inlining_map_static_initializers. (expand_call_inline): Call java_inlining_merge_static_initializers. * java/lang.c (merge_init_test_initialization): New. (java_inlining_merge_static_initializers): New. (inline_init_test_initialization): New. (java_inlining_map_static_initializers): New. 2002-10-11 Mark Wielaard <mark@klomp.org> * gcj.texi (Compatibility): Add Limitations and Extensions section. 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer. 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * parse.y (merge_string_cste): Add parentheses around & within |. 2002-10-08 Tom Tromey <tromey@redhat.com> * parse.y (variable_declarator_id): Simplify error path for array declarator error. For PR java/8003. 2002-10-08 Zack Weinberg <zack@codesourcery.com> * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with bug_report_url. 2002-10-08 Andrew Haley <aph@redhat.com> * parse.y (attach_init_test_initialization_flags): Check for error_mark_node. 2002-10-07 Anthony Green <green@redhat.com> * parse.y (merge_string_cste): Fix bug in string concatenation. 2002-10-03 Michael Koch <konqueror@gmx.de> * gcj.texi (Standard properties): Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit. 2002-10-02 Roger Sayle <roger@eyesopen.com> PR optimization/6627 * lang.c (java_init): If storing the vbit in function pointers, ensure that force_align_functions_log is atleast one to aid compatability with g++ vtables. 2002-10-01 Nathan Sidwell <nathan@codesourcery.com> * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall foul of type-based aliasing. 2002-09-30 Anthony Green <green@redhat.com> * gcj.texi (Invoking jv-scan): Fix texinfo. 2002-09-28 Anthony Green <green@redhat.com> * gcj.texi (Invoking jv-scan): Add --no-assert documentation. (Code Generation): Add -fno-assert documentation. * jv-scan.c (flag_assert): New global. (options): Add assert option. (help): Add --no-assert documentation. * parse-scan.y (flag_assert): New global. * lang.c (lang_f_options): Add -fassert/-fno-assert support. (flag_assert): New global. * java-tree.h (flag_assert): New global. * lex.c (java_lex): Obey flag_assert. * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when calling cc1. 2002-09-26 Andrew Haley <aph@redhat.com> * expr.c (build_java_array_length_access): Check for null pointer. * expr.c (expand_java_arrayload): Likewise. 2002-09-21 Richard Henderson <rth@redhat.com> * jcf-parse.c (get_constant): Decode from IEEE no matter what the target format. 2002-09-20 Kazu Hirata <kazu@cs.umass.edu> * ChangeLog: Follow spelling conventions. * class.c: Likewise. * decl.c: Likewise. * expr.c: Likewise. * gjavah.c: Likewise. * java-tree.h: Likewise. * jcf-dump.c: Likewise. * jcf-parse.c: Likewise. * jvspec.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * parse.y: Likewise. 2002-09-17 Tom Tromey <tromey@redhat.com> * lex.c (java_read_unicode_collapsing_terminators): Handle case where \r appears at EOF. Fixes PR java/7950. 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de> * jvspec.c (lang_specific_driver): Remove unused variable. 2002-09-16 Geoffrey Keating <geoffk@apple.com> * java-tree.h (union lang_tree_node): Add chain_next option. 2002-09-16 Richard Henderson <rth@redhat.com> * jcf-parse.c (get_constant): Runtime check for IEEE format; use new real.h interface. * jcf-write.c (find_constant_index): Use new real.h interface. * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL. 2002-09-15 Kazu Hirata <kazu@cs.umass.edu> * lang.c: Follow spelling conventions. 2002-09-11 Per Bothner <per@bothner.com> * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical constant to the type of the field. (java_complete_tree): Remove now-redundant code. * parse.y (fold_constant_for_init): 'null' is not a constant expr. 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu> For PR java/5794: * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the return label if a ret instruction for the jsr has been reached. 2002-09-09 Ranjit Mathew <rmathew@hotmail.com> * parse.y (DIR_SEPARATOR): Don't define. (check_class_interface_creation): Use IS_DIR_SEPARATOR. 2002-08-28 Andrew Haley <aph@redhat.com> * verify.c (verify_jvm_instructions): Allow exception handler inside code that is being protected, but generate a warning. * except.c (link_handler): Initialize `expanded' in new eh_range. (binding_depth, is_class_level, current_pc): Declare extern. 2002-09-01 Mark Wielaard <mark@klomp.org> * gcj.texi: Add chapter about system properties. Fixed some typos. 2002-08-26 Tom Tromey <tromey@redhat.com> * parse.y (try_builtin_assignconv): Allow narrowing primitive conversion if RHS_TYPE is byte, short, or char. 2002-08-22 Tom Tromey <tromey@redhat.com> * gcj.texi (Invoking gij): Document -cp and -classpath. 2002-08-21 Tom Tromey <tromey@redhat.com> * Make-lang.in (java/jcf-path.o): Use $(datadir), not $(prefix)/share. For PR libgcj/7633. For PR java/6005 and PR java/7611: * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define. (java_can_use_bit_fields_p): New function. 2002-08-16 Tom Tromey <tromey@redhat.com> * gcj.texi (Class Initialization): Mention class initialization of arrays. 2002-07-30 Andrew Haley <aph@cambridge.redhat.com> * Make-lang.in (java-tree-inline.o): New. (JAVA_OBJS): Add java-tree-inline.o. * parse.y (source_end_java_method): Call java_optimize_inline. (java_expand_method_bodies): Save method's tree in DECL_SAVED_TREE. (add_stmt_to_compound): Keep track of the number of statments. * lang.c (java_init): Enable flag_inline_trees. (java_post_options): If flag_inline_functions is on, enable flag_inline_trees instread. (decl_constant_value): New. (java_tree_inlining_walk_subtrees): New. * java-tree.h (DECL_NUM_STMTS): New macro. (java_optimize_inline): Declare. * expr.c (java_expand_expr): Allow a BLOCK to return a value. Handle a LABEL_EXPR. * decl.c (build_result_decl): If we already have a DECL_RESULT don't make another. (dump_function): New. (java_optimize_inline): New. (dump_function): New. 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com> For PR java/7483: * parse.y (build_assertion): Invert return from desiredAssertionStatus. 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * jcf-write.c (get_access_flags): Return correct access flags for private and protected inner classes. 2002-08-08 Nathan Sidwell <nathan@codesourcery.com> * java/Make-lang.in (java.mostlyclean): Remove coverage files. 2002-08-05 Geoffrey Keating <geoffk@redhat.com> * mangle_name.c: Don't include obstack.h twice. * xref.c: Don't include obstack.h. 2002-08-04 Geoffrey Keating <geoffk@redhat.com> * class.c: (permanent_obstack): Delete declaration. * constants.c: (permanent_obstack): Delete declaration. * except.c: (permanent_obstack): Delete declaration. * expr.c: (permanent_obstack): Delete declaration. * jcf-parse.c: (permanent_obstack): Delete declaration. (saveable_obstack): Delete declaration. * parse.h: (permanent_obstack): Delete declaration. * typeck.c: (permanent_obstack): Delete declaration. 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk> * gcj.texi (version-gcc): Increase to 3.3. 2002-07-22 Tom Tromey <tromey@redhat.com> * lex.c (java_lex): Check for `e' or `E' after 0. 2002-07-21 Richard Henderson <rth@redhat.com> * lang.c (java_unsafe_for_reeval): New. (LANG_HOOKS_UNSAFE_FOR_REEVAL): New. 2002-07-21 Neil Booth <neil@daikokuya.co.uk> * jcf-path.c (GET_ENV_PATH_LIST): Remove. (jcf_path_init): Use GET_ENVIRONMENT. 2002-07-10 Roger Sayle <roger@eyesopen.com> Zack Weinberg <zack@codesourcery.com> * builtins.c (initialize_builtins): Remove defines that handled C/C++ specific junk hereby removed from builtins.def. 2002-07-07 Neil Booth <neil@daikokuya.co.uk> * lang.c (java_post_options): Update prototype. 2002-07-05 Roger Sayle <roger@eyesopen.com> * builtins.c (initialize_builtins): Ignore the additional parameter to DEF_BUILTIN. Handle more C/C++ specific junk in the builtins.def file. 2002-07-01 Tom Tromey <tromey@redhat.com> For PR libgcj/7073: * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE specially. 2002-07-01 Roger Sayle <roger@eyesopen.com> * java/decl.c (builtin_function): Accept additional parameter. (java_init_decl_processing): Pass an additional NULL_TREE argument to builtin_function. 2002-06-29 T.J. Mather <tjmather@maxmind.com> * gcj.texi: Fixed gcj invocation example so that it compiles. 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11. * parse.y (mark_parser_ctxt): Likewise. (check_modifiers, declare_local_variables): Avoid incorrect hardcoded constant 10. * lex.c (java_read_char): Avoid "comparison is always true" warning. 2002-06-25 Andreas Schwab <schwab@suse.de> * expr.c (JSR): Avoid undefined operation on PC. 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * decl.c (clear_binding_level): Const-ify. 2002-06-13 Akim Demaille <akim@epita.fr> * parse.y (class_declaration, interface_declaration): Make sure all their rules have an action, in order to avoid meaningless `$$ = $1' and their type clashes. 2002-06-11 Tom Tromey <tromey@redhat.com> * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC. * parse-scan.y (statement_without_trailing_substatement): Added assert_statement. (assert_statement): New rule. * java-tree.h (struct lang_type) [assertions]: New field. (TYPE_USES_ASSERTIONS): New macro. (CLASS_USES_ASSERTIONS): Likewise. (FIELD_SYNTHETIC): New define. * lex.c (java_lval;): Added ASSERT_TK. * parse.y (ASSERT_TK): Added. (statement_without_trailing_substatement): Added assert_statement. (assert_statement): New rule. (build_assertion): New function. (maybe_generate_pre_expand_clinit): Create and initialize $assertionsDisabled. (lookup_package_type): Removed decl. * keyword.h: Rebuilt. * keyword.gperf (assert): New token. 2002-06-10 Akim Demaille <akim@epita.fr> * parse.y (interface_type_list, class_member_declaration) (unary_expression_not_plus_minus): Remove duplicate %type. Whitespace changes. 2002-06-09 Tom Tromey <tromey@redhat.com> * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H. * parse.y (method_header): Give error message in all cases. Fixes PR java/6865. 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz> Don't use RTL inlining. Fix for PR java/6820. * lang.c (LANG_HOOKS_POST_OPTIONS): Define. (flag_really_inline): New. (java_decode_option): Set flag_really_inline if -finline-functions is seen. (java_post_options): New function. Turn off inlining unless flag_really_inline is set. 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * gjavah.c (throwable_p): Accept argument as either a classname or signature fragment. Create null-terminated classname string for super when calling itself recursively. (decode_signature_piece): Skip first character from class name signature when calling throwable_p. 2002-06-08 H.J. Lu (hjl@gnu.org) * jcf-path.c (jcf_path_init): Allocate 1 more byte for string. 2002-06-04 Tom Tromey <tromey@redhat.com> * jcf-write.c (perform_relocations): Optmize a goto to a goto. 2002-06-04 Michael Koch <konqueror@gmx.de> * gcj.texi (Input Options): Fixed typo. 2002-06-04 Zack Weinberg <zack@codesourcery.com> * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y, typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks, all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE, and all now-pointless local variables. Rename other local variables to reflect their not being handles. * java-tree.h, jcf-dump.c, jcf-io.c: Remove all #if JCF_USE_STDIO blocks. * parse.y: Add missing semicolon at end of rule. 2002-06-03 Geoffrey Keating <geoffk@redhat.com> * check-init.c (attach_initialized_static_class): Delete, unused. * parse.y: Use htab_t instead of struct hashtable, update all uses. * java-tree.h: Include hashtab.h instead of hash.h. (struct lang_decl_func): Use htab_t, set up for gengtype. (struct init_test_hash_entry): Delete. (struct treetreehash_entry): New. (java_treetreehash_find): New (java_treetreehash_new): New prototype. (java_treetreehash_create): New prototype. (java_mark_tree): Delete prototype. (java_hash_hash_tree_node): Delete prototype. (java_hash_compare_tree_node): Delete prototype. (attach_initialized_static_class): Delete prototype. * expr.c (build_class_init): Update to use java_treetreehash functions. (java_expand_expr): Update to use htab_t. (emit_init_test_initialization): Likewise. * decl.c (java_mark_tree): Delete. * class.c (init_test_hash_newfunc): Delete. (java_hash_hash_tree_node): Delete. (java_hash_compare_tree_node): Delete. (add_method_1): Update to use java_treetreehash functions. (JAVA_TREEHASHHASH_H): New macro. (java_treetreehash_hash): New function. (java_treetreehash_compare): New function. (java_treetreehash_find): New function. (java_treetreehash_new): New function. (java_treetreehash_create): New function. * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H. * Make-lang.in (java/parse.o): Depend on debug.h. * java-tree.h (struct lang_identifier): Use gengtype. (union lang_tree_node): New. (struct lang_decl_func): Use gengtype. (struct lang_decl_var): Likewise. (struct lang_decl): Likewise. * parse.y: Include debug.h. * lang.c (LANG_HOOKS_MARK_TREE): Delete. * lang.c (struct language_function): New dummy structure. * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set descriminator for DECL_LANG_SPECIFIC. (struct lang_decl_func): Rename from struct lang_decl. (enum lang_decl_desc): New. (struct lang_decl): Make it a union. Update all the accessor macros. (struct lang_type): Use gengtype. * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC. * decl.c (java_dup_lang_specific_decl): All lang_decl structures are now the same size. (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC; use discriminator to mark DECL_LANG_SPECIFIC. * Make-lang.in (gt-java-builtins.h): New rule. (java/builtins.o): Add dependency on gt-<filename>.h. * builtins.c: Use gengtype for roots. (union string_or_tree): Use gengtype. (struct builtin_record): Use gengtype. * config-lang.in (gtfiles): Add builtins.c. * Make-lang.in (gt-java-class.h, gt-java-constants.h, gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h, gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h, gt-java-parse.h, gtype-java.h): Add rules to generate. (parse.o): Add dependency on gt-java-parse.h, gt-java.h. (class.o): Add dependency on gt-*.h. (constants.o): Likewise. (decl.o): Likewise. (expr.o): Likewise. (jcf-parse.o): Likewise. (jcf-write.o): Likewise. (lang.o): Likewise. * config-lang.in (gtfiles): New. * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. * constants.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. * java-tree.h: Replace uses of ggc_add_* with GTY markers. * jcf-parse.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. * jcf-write.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. * mangle.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h. Include gtype-java.h. 2002-06-02 Tom Tromey <tromey@redhat.com> Fix for PR java/5913: * parse.y (patch_binop): Call patch_string on op1. 2002-06-02 Tom Tromey <tromey@redhat.com> Fix for PR java/1343, PR java/6336: * parse.y (make_nested_class_name): Remove extraneous `else'; fix formatting. Changed return type. (anonymous_class_counter): Moved to top of file. (maybe_make_nested_class_name): Append number to class name for function-local classes. 2002-05-28 Zack Weinberg <zack@codesourcery.com> * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h. * Make-lang.in: Update dependency lists. 2002-05-18 Mark Mitchell <mark@codesourcery.com> * gjavah.c (throwable_p): Do not free the name of the class after passing it to find_class. * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition. * jcf-io.c (dirent.h): Include it. (fnmatch.h): Likewise. (compare_path): New function. (java_or_class_file): Likewise. (memoized_dirlist_entry): New type. (memoized_dirlist_lookup_eq): New function. (memoized_dirlists): New variable. (caching_stat): New function. (memoized_class_lookup_eq): New function. (memoized_class_lookups): Likewise. (find_class): Use memoized_class_lookups and caching_stat. * jcf.h (JCF_USE_SCANDIR): Define. * parse.y (java_expand_classes): Write the class files in reverse order. 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * Make-lang.in: Allow for PWDCMD to override hardcoded pwd. 2002-05-13 Mark Mitchell <mark@codesourcery.com> * jcf-write.c (write_classfile): Unlink the temporary file if it cannot be renamed. Use concat to build up the name of the temporary file. 2002-05-08 Mark Mitchell <mark@codesourcery.com> * jcf-write.c (write_classfile): Write the file to a temporary file and then rename it. 2002-05-07 Tom Tromey <tromey@redhat.com> * gjavah.c (throwable_p): Use xstrdup, not strdup. Fix for PR java/1200: * gjavah.c (throwable_p): New function. (decode_signature_piece): Use it. A `WeakReference' isn't the same as a `jweak'. Include hashtab.h. (gcjh_streq): New function. 2002-05-07 Andreas Jaeger <aj@suse.de> * parse.y (finish_for_loop): Fix if statement. 2002-05-06 Tom Tromey <tromey@redhat.com> Fix for PR java/5941: * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for loop update expression. (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR. * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro. 2002-05-04 Mark Wielaard <mark@klomp.org> For PR java/6519: * parse.y (build_string_concatenation): Return just op1 only when op2 is null and op1 is a STRING_CST, otherwise always construct a StringBuffer. 2002-04-27 Tom Tromey <tromey@redhat.com> For PR java/6382: * parse.y (string_convert_int_cst): New function. (merge_string_cste): Use it. 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk> * java-tree.h (java_parse_file): Update. (java_set_yydebug): Remove. * jcf-parse.c (yydebug): Remove. (java_set_yydebug): Die. (java_parse_file): Update. * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove. 2002-04-24 Tom Tromey <tromey@redhat.com> For PR java/6425: * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose EXPR_WFL_QUALIFICATION of qual_wfl. 2002-04-23 Per Bothner <per@bothner.com> * expr.c (PRE_JSR): Call NOTE_LABEL for return address. * java-tree.h (BCODE_RETURN_TARGET): Removed - never set. (BCODE_TARGET): Remove BCODE_RETURN_TARGET. 2002-04-23 Tom Tromey <tromey@redhat.com> For PR java/6314: * jvspec.c (lang_specific_driver): Use --resource, not -R. Also recognize `-fcompile-resource='. * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text a bit. 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com> * jcf-parse.c: (yyparse): Don't prepend "./" to relative paths. Fixes PR java/2791. 2002-04-19 Andrew Haley <aph@redhat.com> * jcf-write.c (push_long_const): lo, hi: New variables. Use rshift_double to extract the high part of a 64-bit long. Use WORD_TO_INT to extract the low part. * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned HOST_WIDE_INT for num. Use JPOOL_UINT to get it. CONSTANT_Double: Use JPOOL_UINT to get both halve of a double. 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk> * typeck.c (incomplete_type_error): Remove. 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * class.c (make_class_data): Set DECL_ALIGN on static class data, for hash synchronization. * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects. * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for class_type_node. 2002-04-16 Mark Wielaard <mark@klomp.org> * jcf-write.c (generate_bytecode_insns): Only write const_0 if not negative zero. 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz> Fix for PR java/6294: * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner interfaces. 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> Fix for PR java/6085: * parse.y (patch_method_invocation): Always use build_access_to_thisn to get enclosing "this" argument for inner-class constructor invocation. Pass correct arguments to build_access_to_thisn. 2002-04-10 Andreas Jaeger <aj@suse.de> * gcj.texi (Input Options): Fix extdirs patch. 2002-04-10 Anthony Green <green@redhat.com> * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration. 2002-04-09 Anthony Green <green@redhat.com> * gcj.texi (Input Options): Add --extdirs documentation. * jcf-dump.c (OPT_extdirs): New macro. (options): Add extdirs option. (help): Describe --extdirs. (main): Handle OPT_extdirs. * gjavah.c (OPT_extdirs): New macro. (options): Add extdirs option. (help): Describe --extdirs. (main): Handle OPT_extdirs. * jcf-path.c (jcf_path_init): Add extdirs support. (jcf_path_extdirs_arg): New function. (extensions): New variable to hold extensions path entries. * jvspec.c: Remove -fextdirs= when compiling main(). * lang.c (java_decode_option): Handle -fextdirs=. * jcf.h (jcf_path_extdirs_arg): Declare new function. * Make-lang.in: Compile jcf-path with version info for use in identifying the appropriate libgcj.jar. 2002-04-08 Tom Tromey <tromey@redhat.com> For PR libgcj/5303: * .cvsignore: Added rmic.1 and rmiregistry.1. * gcj.texi (Top): Link to new nodes. (Invoking rmic): New node. (Invoking rmiregistry): Likewise. * Make-lang.in (java.generated-manpages): Added rmic.1 and rmiregistry.1. (java.maintainer-clean): Likewise. ($(srcdir)/java/rmic.1): New target. ($(srcdir)/java/rmiregistry.1): Likewise. (java.install-man): Handle rmic.1 and rmiregistry.1. 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * gcj.texi (Invocation): Update JvAttachCurrentThread documentation. Add note about handling uncaught exceptions. Add an exception handler to example. 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * parse.y (resolve_qualified_expression_name): Clear "from_super" flag after using it to patch CALL_EXPR. 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * gcj.texi (Invocation): Document CNI invocation API. 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk> * expr.c (truthvalue_conversion): Rename. Update. (expand_compare): Update. * java-tree.h (java_truthvalue_conversion): New. * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine. 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk> * java-tree.h (java_mark_addressable): New. * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine. * typeck.c (mark_addressable): Rename, update. 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk> * expr.c (build_java_binop): Update. * java-tree.h (java_signed_type, java_unsigned_type, java_signed_or_unsigned_type): Update. * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * parse.y (patch_binop): Update. * typeck.c (signed_or_unsigned_type, unsigned_type, signed_type): Update. 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk> * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine. (java_dummy_print): Remove. (lang_print_error): Rename. Exit early if inhibiting output. (inhibit_error_printing_function): New. (java_init): Don't set hook. (lang_init_source): Use new boolean. 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com> * parse.y (do_resolve_class): Fix infinite recursion. 2002-03-29 Tom Tromey <tromey@redhat.com> * parse.y (check_inner_circular_reference): Ignore incomplete types. 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk> * Make-lang.in (builtins.o): Update. * boehm.c (get_boehm_type_descriptor): Update. * builtins.c: Include langhooks.h. * decl.c (java_init_decl_processing): Update. * java-tree.h (java_type_for_mode, java_type_for_size): New. * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. * typeck.c (type_for_mode, type_for_size): Update. 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com> * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING. 2002-03-28 Tom Tromey <tromey@redhat.com> * except.c (expand_end_java_handler): If the handler type is NULL, use java.lang.Throwable. Fixes PR java/5986. 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com> Fix for PR java/4715: * jcf-parse.c (parse_source_file_3): New function. (read_class): Call it. (java_parse_file): Likewise. 2002-03-28 Jan Hubicka <jh@suse.cz> * java/lang.c (java_init_options): Set flag_trapping_math to 0. 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * parse.y (resolve_package): Initialize "decl". (lookup_package_type): Remove unused function. 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz> Fix for PR java/5993: * parse.y (resolve_package): Return the decl if resolution was successful. Don't special case "java.lang" and "java.lang.reflect" packages. Set type_name to the merged identifier. (resolved_qualified_expression_name): Print error using "name" if resolve_package returns NULL_TREE. 2002-03-27 Tom Tromey <tromey@redhat.com> * expr.c (expand_invoke): Don't generate null pointer check if we're calling <init>. 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk> * expr.c (java_lang_expand_expr): Rename java_expand_expr, fix prototype. * java-tree.h (java_lang_expand_expr): Similarly. * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. (java_init): Don't set hook. 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz> Fix for PR java/5850: * parse.y (lookup_field_wrapper): Call itself recursively for enclosing context if field was not found in the current scope. * expr.c (lookup_field): Don't look in enclosing contexts. 2002-03-26 Tom Tromey <tromey@redhat.com> Fix for PR java/5942: * parse.y (init_src_parse): Added sanity check. * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12 elements, not 11. 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk> * decl.c (lang_mark_tree): Rename java_mark_tree. * java-tree.h (java_mark_tree): New. * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine. 2002-03-25 Zack Weinberg <zack@codesourcery.com> * lex.c: Change java_perform_atof to take normal parameters instead of a pointer to a parameter block. Call it directly from java_lex. 2002-03-22 Mark Wielaard <mark@klomp.org> Fix for PR java/5368: * parse.y (resolve_qualified_expression_name): Use decl not field_decl when printing error message. 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk> * decl.c (maybe_build_cleanup): Remove. 2002-03-22 Tom Tromey <tromey@redhat.com> Andrew Haley <aph@cambridge.redhat.com> * expr.c (build_field_ref): Don't build a check if the field is a member of `this'. 2002-03-21 Eric Blake <ebb9@email.byu.edu> Fix for PR java/6026: * lex.c (java_lex): Fix parsing of consecutive floats. 2002-03-21 Tom Tromey <tromey@redhat.com> * parse.y (build_access_to_thisn): Stop when FROM is not an inner class. 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk> * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk> * gcj.texi: @code{gcj} becomes @command{gcj}. @code{gcc} becomes @command{gcc}. GcjRaw changed to gnu.gcc.RawData. 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk> * decl.c (start_java_method): Use new hook. * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine. (java_init): Remove old hook. 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com> * builtins.c (define_builtin): Do nothing if `type' is null. Fixes PR java/5876. 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * parse.y (parser_check_super_interface): Fix error message grammar/order. 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * jcf-parse.c (get_constant): Delete unused variables. 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk> * java-tree.h (java_parse_file): New. * jcf-parse.c (yyparse): Rename java_parse_file. * lang.c (LANG_HOOKS_PARSE_FILE): Redefine. 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * parse.y (craft_constructor): Return the constructor decl. (java_expand_classes): Update comments. (lookup_method_invoke): Call fix_constructors immediately for anonymous class. Fixes PR java/5935. 2002-03-15 Anthony Green <green@redhat.com> * jcf-parse.c (yyparse): Don't emit class registration constructor when compiling resource files. 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * lang.c (java_tree_code_type, java_tree_code_length, tree_code_name): Delete. (tree_code_type, tree_code_length, tree_code_name): Define. (java_init): Don't try to copy into the various tree_code arrays. 2002-03-12 Tom Tromey <tromey@redhat.com> * jcf-parse.c (get_constant) [CONSTANT_String]: String values are UTF-8, not UCS-2. Fixes PR java/5923. * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is a call_expr wrapped in a convert. Fixes PR java/5848. 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * jcf-write.c (write_classfile): Improve error strings. 2002-03-11 Eric Blake <ebb9@email.byu.edu> * lex.c: Adjust comments to GNU standards. 2002-03-11 Eric Blake <ebb9@email.byu.edu> Fix for PR java/5902: * lex.c (java_lex): Fix parsing of literals. 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr to prevent it getting evaluated twice in the store checking case. * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when examining OBJECT. 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * decl.c (java_init_decl_processing): Make sure class_type_node alignment is not less than 64 bits if hash synchronization is enabled. 2002-03-08 Per Bothner <per@bothner.com> * parse.y (java_complete_lhs): Check if patch_assignment returned an error-mark. * parse.y (try_builtin_assignconv): Don't special-case zero. 2002-03-08 Per Bothner <per@bothner.com> Fix for PR java/5812. * expr.c (build_java_jsr): Take pc arguments, and do lookup_label here instead of in JSR macro. Likewise with load_type_state call. Do the latter on if the return_pc has been verified (the jsr returns). (JSR): Now just call build_java_jsr. 2002-03-07 Jeff Sturm <jsturm@one-point.com> * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define. (java.install-common): Link native driver to JAVA_TARGET_INSTALL_NAME. 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com> * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED * builtins.c(sin_builtin): Likewise * builtins.c(sqrt_builtin): Likewise 2002-03-03 Zack Weinberg <zack@codesourcery.com> * java/expr.c, java/jcf-parse.c, java/lex.c: Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef REAL_ARITHMETIC blocks unconditional. Delete some further #ifdef blocks predicated on REAL_ARITHMETIC. 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * class.c (init_class_processing): Use ARRAY_SIZE in lieu of explicit sizeof/sizeof. * decl.c (java_init_decl_processing): Likewise. * jcf-parse.c (init_jcf_parse): Likewise. * parse.y (init_src_parse): Likewise. 2002-03-02 Per Bothner <per@bothner.com> Make --CLASSPATH by a synonym for --classpath and -classpath. Implement --bootclasspath. * jcf-path.c (classpath_u): Rename static variable to classpath_user. (classpath_l): Remove. (jcf_path_CLASSPATH_arg): Remove. (jcf_path_bootclasspath_arg): New function. (jcf_path_seal): Simplify accordingly. * jcf.h (jcf_path_bootclasspath_arg): New declarations. (jcf_path_CLASSPATH): Remove declaration. * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*. (lang_specific_driver): Translate -bootclasspath. * lang-options.h: Add --bootclasspath. Update --CLASSPATH. * lang.c (decode_lang_options): Do jcf_path_init first. Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath. * gjavah.c: Also handle --bootclasspath. Handle --CLASSPATH as a synonum for --classpath. * jcf-dump.c: Likewise. "." is not part of system path, but is the default for --classpath. * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs. (jcf_path_seal): Add "." if no CLASSPATH specified. * gcj.texi: Document changes. 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * expr.c (build_java_arraystore_check): Fix formatting. 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com> Fix for PR java/5758, java/5632: * jcf-parse.c (load_class): Renamed local variable, consider `.' an inner-class separator too. * parse.y (do_resolve_class): New local `decl_result.' Progressively build a name for what can have been loaded. 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * expr.c (java_array_data_offset): Removed function. (JAVA_ARRAY_LENGTH_OFFSET): Removed macro. (build_java_array_length_access): Obtain "length" value using a COMPONENT_REF, instead of INDIRECT_REF and arithmetic. (build_java_arrayaccess): Correct comment. Access "data" using a COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF. (build_java_arraystore_check): New function. (expand_java_arraystore): Use build_java_arraystore_check. * parse.y (patch_assignment): Simplify code to insert a store check when lvalue is an ARRAY_REF. Use build_java_arraystore_check. * check-init.c (check_init): Update to reflect that an array length access is now a COMPONENT_REF. * gcj.texi (Code Generation): Improve documentation of -fno-bounds-check. Add documentation for -fno-store-check. * java-tree.h (flag_store_check): Declare. (build_java_arraystore_check): Declare. * lang.c (flag_store_check): Initialize to 1. (lang_f_options): Add store-check option. * jvspec.c: Don't pass store-check option to jvgenmain. * lang-options.h: Add help string for -fno-store-check. 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk> * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl. * java-tree.h (java_dup_lang_specific_decl): New. * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine. 2002-02-27 Zack Weinberg <zack@codesourcery.com> * builtins.c, decl.c: Delete traditional-mode-related code copied from the C front end but not used, or used only to permit the compiler to link. 2002-02-22 Tom Tromey <tromey@redhat.com> Fix for PR java/2369: * jvspec.c (verify_class_name): New function. (lang_specific_driver): Call it. (JAVA_START_CHAR_P): New macro. (JAVA_PART_CHAR_P): Likewise. 2002-02-22 Per Bothner <per@bothner.com> * class.c: Change vtable to be more compatible with g++ v3 abi. (get_dispatch_table): Prepend offset-to-top (always 0) and type_info pointer (currently unimplemented hence NULL) to vtable. Specifically, prepend offset-to-top and typeinfo ptr (currently null). (make_class_data): Variable dtable_start_offset is sizeof 2 pointers. Adjust vtable pointers by dtable_start_offse - i.e. skip new words. (build_dtable_decl): Add declarations for new fields. 2002-02-20 Per Bothner <per@bothner.com> * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call to finit$ (otherwise generate_bytecode_insns drops it). However, we don't need to set it on the COMPOUND_EXPR - the caller does that. 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk> * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option `--CLASSPATH' becomes `--classpath.' * gjavah.c: Likewise. * jcf-dump.c: Likewise. * lang-options.h: Likewise. * lang.c: Likewise. * jcf-path.c: Updated comment. (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.' (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.' * jcf.h (jcf_path_CLASSPATH_arg): Ditto. (jcf_path_CLASSPATH_arg): Ditto. (classpath_u): Updated leading comment. 2002-02-20 Per Bothner <per@bothner.com> * builtins.c (check_for_builtin): New function. (build_call_or_builtin): Remove. * java-tree.h: Update accordingly. * expr.c (expand_invoke): Use build + check_for_builtin instead of build_call_or_builtin. * parse.y (patch_invoke): Likewise. This avoids needlessly creating a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER flag (which had caused jcf-write to incorrectly emit invokevirtual). 2002-02-17 Tom Tromey <tromey@redhat.com> * java-tree.h (TYPE_STRICTFP): New macro. (struct lang_type) [strictfp]: New field. (CLASS_STRICTFP): New macro. (METHOD_STRICTFP): New macro. (struct lang_decl) [strictfp]: New field. * parse.y (method_header): Disallow strictfp constructor or abstract method. (STRICT_TK): Move before MODIFIER_TK. * parse.h (CLASS_MODIFIERS): Added ACC_STRICT. (METHOD_MODIFIERS): Likewise. (INTERFACE_MODIFIERS): Likewise. * jcf-write.c (get_access_flags): Likewise. * class.c (set_class_decl_access_flags): Recognize ACC_STRICT. (add_method_1): Likewise. (get_access_flags_from_decl): Likewise. * jcf-dump.c (print_access_flags): Print in standard order. Also, recognize strictfp flag. * jcf.h (ACC_STRICT): New define. 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com> * class.c(build_utf8_ref): Move declaration of decl_size 2002-02-07 Tom Tromey <tromey@redhat.com> * gcj.texi (Input Options): --CLASSPATH does not suppress system path. 2002-02-04 Anthony Green <green@redhat.com> * class.c (build_utf8_ref): Put UTF-8 constants into merged sections if available. 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * parse.y (java_expand_classes): Fix typo in static field loop. 2002-02-02 Richard Henderson <rth@redhat.com> * class.c (add_field): Mark static fields external. (build_class_ref): Remove redundant set. * parse.y (java_expand_classes): Mark static fields of classes to be compiled as local. * jcf-parse.c (parse_class_file): Likewise. 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk> * gcj.texi (About CNI): New node. 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org> PR java/5080 * jcf-parse.c : Check for HAVE_LOCALE_H before using setlocale() with LC_CTYPE as a parameter. * jv-scan.c: Same. 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk> * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version): Follow GNU Coding Standards for --version. 2002-01-28 Tom Tromey <tromey@redhat.com> * expr.c (build_jni_stub): Ensure storage for `meth' is generated. * parse.y (java_complete_expand_methods): Set current_function_decl before building JNI stub. 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch> * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not BUILT_IN_SQRTF. 2002-01-22 Tom Tromey <tromey@redhat.com> * decl.c (java_init_decl_processing): Use add_predefined_file. Predefine RawData.java. (predef_filenames): Removed. (java_init_decl_processing): Don't register predef_filenames. * jcf-parse.c (add_predefined_file): New function. (predefined_filename_p): Rewrote. (predefined_filename_p): No longer static. * decl.c (java_init_decl_processing): Call initialize_builtins. * Make-lang.in (JAVA_OBJS): Added builtins.o. (java/builtins.o): New target. * builtins.c: New file. * parse.y (patch_invoke): Use build_call_or_builtin. * java-tree.h (build_call_or_builtin): Declare. (initialize_builtins): Declare. (java_set_exception_lang_code): Removed unused declaration. (PREDEF_FILENAMES_SIZE): Removed. (java_tree_index): Added JTI_PREDEF_FILENAMES. (predef_filenames): New define. (add_predefined_file): Declare. (predefined_filename_p): Declare. * expr.c (expand_invoke): Use build_call_or_builtin. 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * parse.y (patch_switch_statement): Fix format specifier. 2002-01-16 Tom Tromey <tromey@redhat.com> More for PR java/5365: * gjavah.c (print_stub_or_jni): Cause exception to be thrown by default. (process_file): Generate include for java.lang.UnsupportedOperationExceptions. 2002-01-15 Andreas Jaeger <aj@suse.de> * .cvsignore: Add man pages. 2002-01-15 Tom Tromey <tromey@redhat.com> Fix for PR java/5365: * gjavah.c (process_file): Turn class name into a file name. 2002-01-14 Matthias Klose <doko@debian.org> * gcj.texi: Fix whitespace and formatting errors in the synopsis of the man pages. Update copyright. 2002-01-14 Tom Tromey <tromey@redhat.com> For PR libgcj/5303: * Make-lang.in (java.install-man): Handle jv-convert man page. (java.generated-manpages): Added jv-convert.1. (java.uninstall): Remove jv-convert.1. (java.maintainer-clean): Likewise. ($(srcdir)/java/jv-convert.1): New target. * gcj.texi (Top): Link to jv-convert node. (Individual utilities): Likewise. (Invoking jv-convert): New node. 2001-01-10 Jeff Sturm <jsturm@one-point.com> Martin Kahlert <martin.kahlert@infineon.com> * jcf-parse.c (get_constant): Don't swap lo/hi for big endian targets when HOST_BITS_PER_WIDE_INT >= 64. 2002-01-03 Graham Stott <grahams@redhat.com> * class.c (compile_resource_file): Update copyright date. Constify filename parameter. (java-tree.h): Update copyright date. (compile_resource_file): Constify filename parameter. 2002-01-03 Graham Stott <grahams@redhat.com> * gcc/jcf-parse.c: Update copyright date. (yyparse): Constify resource_filename. 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * parse.y (src_parse_roots): Don't needlessly zero init. 2001-12-31 Tom Tromey <tromey@redhat.com> * parse.y (dump_java_tree): New function. (source_end_java_method): Call it. (end_class_declaration): Likewise. * lang.c (java_decode_option): Call dump_switch_p. 2001-12-28 Tom Tromey <tromey@redhat.com> * gen-table.pl: Don't process characters after \uffff. Added comment pointing to input file. 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gen-table.pl: Const-ify output. Document the location of a suitable unicode input file. * chartables.h: Regenerate. 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * chartables.h: Const-ify. * gjavah.c (options): Likewise. * jcf-dump.c (options): Likewise. * jv-scan.c (options): Likewise. * lex.c (java_start_char_p, java_part_char_p): Likewise. * parse.y (binop_lookup): Likewise. 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Make-lang.in (keyword.h): Pass -C to gperf to const-ify the static arrays that are output. * jvspec.c (jvgenmain_spec): Make static. * keyword.gperf (struct java_keyword, java_keyword): Const-ify. * keyword.h: Regenerate. * lang.c (string_option, process_option_with_no, lang_f_options, lang_W_options): Const-ify. * lex.c (java_lex): Likewise. 2001-12-21 Richard Henderson <rth@redhat.com> * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into .. (get_boehm_type_descriptor): ... here. Arrange for the TREE_TYPE to get set properly. 2001-12-21 Richard Henderson <rth@redhat.com> * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor only if the target requires collect2. * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL. 2001-12-20 Tom Tromey <tromey@redhat.com> For PR java/4509: * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute CAN_COMPLETE_NORMALLY for the node. * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't generate code for second branch if first branch can't complete normally. (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to the loop head if the loop body can't complete normally. 2001-12-20 Tom Tromey <tromey@redhat.com> For PR java/4766: * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle case where `finally' clause can't complete normally. 2001-12-20 Tom Tromey <tromey@redhat.com> Fixes PR java/5057: * parse.y (analyze_clinit_body): Added this_class parameter. Check for more cases where we must keep <clinit>. (maybe_yank_clinit): Cleaned up flow control. 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * decl.c (java_init_decl_processing): Don't initialize finit_leg_identifier_node. * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE. (finit_leg_identifier_node): Remove. (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE. 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * mangle.c (mangle_member_name): Don't special-case for NO_DOLLAR_IN_LABEL. * mangle_name.c (unicode_mangling_length): Likewise. (append_unicode_mangled_name): Likewise. * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL code. 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * expr.c (build_java_array_length_access): Don't force null pointer check unless flag_check_references is set. 2001-12-20 Tom Tromey <tromey@redhat.com> Fix for PR java/3417: * parse.y (patch_assignment): Added special processing for `return'. (patch_return): Don't convert booleans to integers, and don't special-case `null'. 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk> * config-lang.in (diff_excludes): Remove. 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk> * gcj.texi: Update link to GCC manual. 2001-12-17 Tom Tromey <tromey@redhat.com> * parse.y (link_nested_class_to_enclosing): Removed useless statement. 2001-12-16 Tom Tromey <tromey@redhat.com> * mangle.c (mangle_method_decl): Never emit `C2' constructor. Fixes PR java/5088. 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk> * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h, jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix spelling errors. 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value. 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * decl.c (java_init_decl_processing): Build otable_type correctly. otable_decl is an otable_type. 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java-tree.h (otable_methods, otable_decl, otable_syms_decl, otable_type, otable_ptr_type, method_symbol_type, method_symbols_array_type, method_symbols_array_ptr_type): New field/global tree definitions. (flag_indirect_dispatch): New flag. * decl.c (java_init_decl_processing): Initialize new otable and otable_syms type nodes and decls. Add new field "index" to method_type_node. * class.c (build_method_symbols_entry): New function. (make_method_value): Set "index" to to method's vtable index for virtual methods when indirect-dispatch is not used. (make_class_data): For indirect-dispatch, don't emit the dtable_decl, and set vtable_method_count to -1. Set otable and otable_syms field if indirect-dispatch is used and there was something to put in them. (build_method_symbols_entry): New function. (emit_offset_symbol_table): New function. * expr.c (get_offset_table_index): New function. (build_invokevirtual): Build array reference to otable at the index returned by get_offset_table_index, and use the result as the vtable offset. (build_invokeinterface): Similar. * jcf-parse.c (yyparse): If indirect-dispatch, call emit_offset_symbol_table at the end of compilation, after all classes have been generated. * jvspec.c: Don't pass findirect-dispatch to jvgenmain. * lang.c (flag_indirect_dispatch): Define. (lang_f_options): Add indirect-dispatch flag. 2001-12-14 Matthias Klose <doko@debian.org> * gcj.texi: Markup for man page generation. Document missing options printed by <tool> --help. Terminate description of gij's -ms option with a dot. * Make-lang.in ($(srcdir)/java/*.1): New targets. (java.generated-manpages java.install-man, java.uninstall, java-maintainer-clean) Updated. 2001-12-14 Hans Boehm <Hans_Boehm@hp.com> * class.c (get_dispatch_table): Fix java vtable layout for TARGET_VTABLE_USES_DESCRIPTORS. * decl.c (java_init_decl_processing): Initialize alloc_no_finalizer_node, finalize_identifier_node. * expr.c (class_has_finalize_method): New function. (expand_java_NEW): Generate calls for finalizer-free allocation. (build_invokevirtual): Fix java vtable layout for TARGET_VTABLE_USES_DESCRIPTORS. * java-tree.h (enum java_tree_index): New entries: JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE. (alloc_no_finalizer_node, finalize_deintifier_node): New macros. (class_has_finalize_method): declare. (HAS_FINALIZER_P): New macro. * parse.y (patch_invoke): Generate calls for finalizer-free allocation. 2001-12-12 Matthias Klose <doko@debian.org> * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove whitespace at end of line. 2001-12-11 Tom Tromey <tromey@redhat.com> * lex.c (java_init_lex): Define wfl_to_string as gnu.gcj.runtime.StringBuffer unless generating bytecode. 2001-12-11 Jeff Sturm <jsturm@one-point.com> * class.c (make_method_value): Use null_pointer_node to represent empty exception table. 2001-12-10 Tom Tromey <tromey@redhat.com> * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT. 2001-12-10 Douglas B. Rupp <rupp@gnat.com> * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION). 2001-12-09 Per Bothner <per@bothner.com> * check-init.c (current_switch_has_default): New static field. (check_init): Case DEFAULT_EXPR: Set current_switch_has_default. Case SWITCH_EXPR: Save/restore current_switch_has_default. If no DEFAULT_EXPR seen, simulate a default alternative that copies state. 2001-12-09 Tom Tromey <tromey@redhat.com> * check-init.c (check_init): Don't allow pre- or post- increment or decrement of final variable. (final_assign_error): Minor error message rewording. 2001-12-08 Tom Tromey <tromey@redhat.com> * java-tree.h: Fixed typo. * gjavah.c (decompile_method): Don't decompile to `return this' for static methods. * gjavah.c (cxx_keywords): Re-sorted. * lex.c (cxx_keywords): Re-sorted. * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything else. * gjavah.c (print_namelet): Clear subnamelets. (HANDLE_METHOD): Set `method_printed' earlier. 2001-12-07 Tom Tromey <tromey@redhat.com> * lang.c (lang_f_options): Added optimize-static-class-initialization. (java_decode_option): Removed special case. 2001-12-07 Per Bothner <per@bothner.com> * check-init.c (check_init): Fix typo freeing memory twice. 2001-12-05 Per Bothner <per@bothner.com> Restore support for static class initialization optimization. * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable. * check-init.c (check_int): At end of BLOCK handle initialization blocks, which used to be done in java_complete_expand_method but did not handle the case where check_for_initialization might allocate more than a word of bits. * decl.c (lang_make_tree): The smic field is now a tree. * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field. * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro. * parse.y (emit_test_initialization): Combine hash_lookup calls. * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Change from a hash table to a list. (struct_lang_decl): Change field 'smic' to match. * class.c (add_method_1): Initialize DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list. * parse.y (adjust_init_test_initialization): Removed - inlined into - (java_expand_method_bodies): -here, since 'smic' is now a list. (patch_invoke): Add to 'smic' list, instead of hash_lookup. * check-init.c (WORD_SIZE): Use BITS_PER_UNIT. * class.c (java_hash_compare_tree_node): Fix casts. 2001-12-04 Per Bothner <per@bothner.com> * check-init.c: Handle definite unassignment to finals in addition to definite assignment. (loop_current_locals): New field. (num_current_locals, int start_current_locals, num_current_words): Make static. (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses. (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED, CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros. (get_variable_decl, check_final_reassigned): New functions. (check_init, check_bool_init): Modify as needed for checking finals. (check_for_initialization): Take extra parameter and return void. Do extra start-up logic to check final fields for assignment. * parse.y (check_static_final_variable_assignment_flag, reset_static_final_variable_assignment_flag, check_final_assignment, check_final_variable_local_assignment_flag, reset_final_variable_indirect_assignment_flag, reset_final_variable_global_assignment_flag): Remove functions. (java_complete_expand_methods, outer_field_access_fix, patch_assignment): Remove no-longer used logic. * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments. * parse.y (register_fields, java_complete_tree): Update accordingly. * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca. (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New. (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS. * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off. * java-tree.h (DECL FINAL): New bit-field. (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL. (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL. (DECL_INIT_CALLS_THIS): New macro. (struct lang_decl): New bit-field init_calls_this. (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC, DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE (DECL_BIT_INDEX): Change to use pointer_alias_set since we now use it for both local variables and final fields. (struct lang_decl_var): Remove bit-fields final_liic, final_ierr, and local_final. (struct lang_type): Remove hfv bit-field. (check_for_initialization): Change to return void. * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros. * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS. * check-init.c (final_assign_error): New helper function. (check_final_reassigned, check_init): Use it. (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length. * java-tree.h (struct lang_decl, struct lang_decl_var): Change all bit-fields to unsigned. 2001-12-03 Per Bothner <per@bothner.com> * parse.y (patch_binop): Minor constant folding. * parse.y (build_current_thisn): Shorter 'buffer'. 2001-12-03 Per Bothner <per@bothner.com> * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR. * jcf-write.c (generate_bytecode_insns): Remove support for CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used. * check-init.c (check_init): Likewise. 2001-12-03 Per Bothner <per@bothner.com> * verify.c (subroutine_nesting): New function. (verify_jvm_instructions): Use it to fix logic for checking that we're done with the current subroutine. * verify.c (verify_jvm_instruction): For OPCODE_checkcast and OPCODE_instanceof use POP_TYPE macro for better diagnostics. 2001-12-03 Per Bothner <per@bothner.com> * jcf.h: Fix obvious typo in comment. * typeck.c (build_null_signature): Add comment. 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk> * expr.c: Remove leading capital from diagnostic messages, as per GNU coding standards. * jcf-io.c: Similarly. * jcf-parse.c: Similarly. * jv-scan.c: Similarly. * jvspec.c: Similarly. * mangle.c: Similarly. 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw> Alexandre Petit-Bianco <apbianco@redhat.com> * expr.c (build_java_arrayaccess): Call save_expr on array for correct evaluation order, modified comment, fixed indentation. * parse.y: (patch_assignment): Correctly extract the array base from the tree generate by build_java_arrayaccess, added comments. (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF. Fixes PR java/3096, PR java/3803, PR java/3965. 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk> * expr.c (expand_byte_code): Remove trailing periods from messages. * jcf-parse.c (load_class, jcf_parse): Similarly. * jcf-write.c (generate_classfile): Similarly. * lex.c (java_lex): Similarly. 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * class.c (add_interface_do): Set BINFO_VPTR_FIELD. 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk> * Make-lang.in (java.generated-manpages): New dummy target. 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks ASM_FINAL_SPEC. (lang_specific_pre_link): Use set_input to set input_filename. Append `main' here. * jvgenmain.c (usage): Append literal `main' to CLASSNAME. (main): Fix definition. Strip `main' from classname. Fixes PR java/227. 2001-11-18 Roger Sayle <roger@eyesopen.com> * parse.h (java_expand_switch): Remove old prototype. 2001-11-18 Tom Tromey <tromey@redhat.com> Fix for PR java/1401: * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where arg0 is null. (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case correctly. 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk> * lang.c (finish_parse): Rename to java_finish. (LANG_HOOKS_FINISH, java_finish): New. 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk> * decl.c (init_decl_processing): Rename java_init_decl_processing. * java-tree.h: New prototype. * lang.c (java_init): Update prototype. Combine with old init_parse. 2001-11-13 Tom Tromey <tromey@redhat.com> * gjavah.c (method_signature): New global. (HANDLE_METHOD): Set it. (decompile_return_statement): New function. (decompile_method): Use it. (print_method_info): Removed `synth' argument. 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk> * java-tree.h (java_set_yydebug): New. * jcf-parse.c (set_yydebug): Rename java_set_yydebug. * lang.c (LANG_HOOKS_SET_YYDEBUG): Override. (print_lang_decl, print_lang_type, print_lang_identifier, print_lang_statistics, lang_print_xnode): Remove. 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk> * jcf-parse.c (init_lex): Remove. * lang.c (language_string, lang_identify): Remove. (struct lang_hooks): Constify. (LANG_HOOKS_NAME): Override. (init_parse): Update. 2001-11-08 Andreas Franck <afranck@gmx.de> * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle program_transform_name the way suggested by autoconf. (java.install-common): Also transform auxiliary program names with program_transform_name. 2001-11-08 Tom Tromey <tromey@cygnus.com> * parse.y (trap_overflow_corner_case): New rule. (unary_expression): Use it. * lex.c (java_init_lex): Don't set minus_seen. (yylex): Don't use minus_seen. Communicate overflow to parser for it to handle. (error_if_numeric_overflow): New function. * parse.h (minus_seen): Removed field. (JAVA_RADIX10_FLAG): New define. 2001-11-07 Tom Tromey <tromey@redhat.com> Patch for PR java/1414: * parse.y (case_label_list): New global. (goal): Register case_label_list with GC. (java_complete_lhs): Save new case on case_label_list. (patch_switch_statement): Check for duplicate case labels. 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (patch_assignment): Removed unused third argument. (java_complete_lhs): Removed unused third argument to patch_assignment. 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk> * lang.c: Include langhooks-def.h. * Make-lang.in: Update. 2001-10-31 Zack Weinberg <zack@codesourcery.com> * Make-lang.in: Replace $(INTL_TARGETS) with po-generated. 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * mangle.c (find_compression_record_match): Don't match compression records for package name elements unless they occur at the start of the name. Fix for PR java/4717. 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * expr.c (expand_java_field_op): Don't special-case references to java.lang.PRIMTYPE.TYPE. (build_primtype_type_ref): Removed. * java-tree.h (build_primtype_type_ref): Remove prototype. * parse.y (maybe_build_primttype_type_ref): Removed. (complete_function_arguments): Don't special-case references to java.lang.PRIMTYPE.TYPE. (patch_assignment): Likewise. (array_constructor_check_entry): Likewise. 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com> * mangle.c (static tree compression_table): Fixed leading comment. * parse.h (struct parser_ctxt): Fixed field comment. * parse.y (check_pkg_class_access): New prototype, fixed leading comment, new parameter used to emit error only if passed as true. (parse_check_super): Pass extra argument to check_pkg_class_access. (do_resolve_class): Likewise. (process_imports): Likewise. (read_import_dir): Fixed indentation. (find_in_imports_on_demand): New local class_type_name. Local node_to_use deleted. while loop changed into for loop. Report multiple definition only for accessible classes. Improved error message. (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS assigned to parameter list, fixed indentation. while loop changed into for loop, restore TREE_CHAIN on local `tem' before the next iteration. 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * lang.c (lang_get_alias_set): Deleted. 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gjavah.c (jni_print_char): Fix thinko in last change. * gjavah.c (jni_print_char, decode_signature_piece): Use safe-ctype macros and/or fold extra calls into fewer ones. * lex.c (java_read_unicode, java_lex): Likewise. * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT, JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise. * mangle_name.c (append_unicode_mangled_name, unicode_mangling_length): Likewise. 2001-10-17 Richard Henderson <rth@redhat.com> * Make-lang.in (java/lang.o): Depend on langhooks.h. 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com> * lang.c (langhooks.h): Included. (LANG_HOOKS_INIT): Redefined. (LANG_HOOKS_INIT_OPTIONS): Likewise. (LANG_HOOKS_DECODE_OPTION): Likewise. (struct lang_hooks lang_hooks): New initialization. 2001-10-11 Per Bothner <per@bothner.com> * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair. The former is simpler, and jcf-write.c handles it better. (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR or WITH_CLEANUP_EXPR. * jcf-write.c: Revert Alex's change from 2000-10-18. It is no longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine. * parse.y (patch_if_else_statement): If the condition is constant, optimize away the test. 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (patch_cast): Call patch_string on the first operand of the incoming node, update it if necessary. Fixes PR java/4510. 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * parse.y (find_as_inner_class): Don't disregard the enclosing scope when name qualifier matches a package name. 2001-10-08 Tom Tromey <tromey@redhat.com> Fix for PR java/4489: * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always force a new label when computing `body_block'. 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * jcf-io.c (format_uint): Const-ify. * lang.c (java_tree_code_type, java_tree_code_length): Likewise. * lex.c (java_get_line_col): Likewise. * parse.y (build_incdec): Likewise. 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (register_incomplete_type): Set JDEP_SUPER to be given a NULL enclosing context if appropriate. Fixes PR java/4466. 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (patch_assignment): Use lvalue's original TYPE when building the final COMPOUND_EXPR. (try_reference_assignconv): Fixed leading comment. 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (check_final_variable_indirect_assignment): For COMPOUND_EXPR, return only if finals were found initialized properly, if not, keep on checking. (check_final_variable_global_assignment_flag): New local error_found, set when appropriate and used to decide whether to report uninitialized finals. Fixed typo in comment. 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com> * decl.c (init_decl_processing): Fixed typo in predef_filenames last three initializations. Fixes PR java/4360. 2001-09-21 Richard Henderson <rth@redhat.com> * class.c (get_dispatch_table): Handle function descriptors. (build_dtable_decl): Likewise. * expr.c (build_invokevirtual): Likewise. 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (patch_method_invocation): Build class initialization when static finals are used to qualify method invocation. Fixes PR java/4366. 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.h: (WFL_STRIP_BRACKET): Re-written using build_type_name_from_array_name. (STRING_STRIP_BRACKETS): New macro. * parse.y (build_type_name_from_array_name): New function. (array_creation_expression:): Accumulate []s instead of [s. (cast_expression:): Accumulate []s instead of [s after cast type name. (build_array_from_name): Local string deleted, use build_type_name_from_array_name. (build_unresolved_array_type): Accumulate []s instead of [s after type name. (register_fields): Fixed comment. (resolve_class): Local name, base deleted, new locals tname and array_dims. Use build_type_name_from_array_name. Use array_dims to build array type. (purify_type_name): Use STRING_STRIP_BRACKETS. 2001-09-18 Andreas Jaeger <aj@suse.de> * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout. * jv-scan.c: Likewise. 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (patch_method_invocation): Inner class creation context check not enforced within constructors. Fixes PR java/1873. 2001-09-16 Tom Tromey <tromey@redhat.com> * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call NOTE_PUSH for single-case push. Fixes PR java/4189. 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com> * java-tree.h (TYPE_IMPORT_LIST): New macro. (TYPE_IMPORT_DEMAND_LIST): Likewise. (struct lang_type): New fields import_list and import_demand_list. * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST with ctxp counterparts. (do_resolve_class): New local saved_enclosing_type, initialized, passed as parameter to find_in_imports and find_in_imports_on_demand. (find_in_imports): Added paramater enclosing_type, use its TYPE_IMPORT_LIST when applicable. (find_in_imports_on_demand): Added parameter enclosing_type, use its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals declaration and initialization. (fold_constant_for_init): Switch/restore current_class to the appropriate context. 2001-09-13 Mark Mitchell <mark@codesourcery.com> * verify.c (verify_jvm_instructions): Fix typo. 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * expr.c (expand_invoke): Const-ification. * parse.y (patch_method_invocation): Likewise. 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gjavah.c (cxx_keywords): Const-ification. * keyword.gperf (java_keyword): Likewise. * lang.c (java_tree_code_name): Likewise. * lex.c (cxx_keywords): Likewise. * parse.y (java_parser_context_suspend, merge_string_cste): Likewise. 2001-09-11 Richard Henderson <rth@redhat.com> * parse.h (ctxp_for_generation): Mark extern. 2001-09-10 Richard Henderson <rth@redhat.com> * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl. 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu> * typeck.c (java_array_type_length, build_prim_array_type): Represent empty arrays by NULL index. 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com> * java-tree.h (compile_resource_file): Grouped with other prototypes. * jvspec.c (lang_specific_driver): Removed unused local `ptr.' 2001-09-06 Anthony Green <green@redhat.com> * class.c (O_BINARY): Define if necessary. (registerResource_libfunc): Declare. (init_class_processing): Initilize registerResource_libfunc. (compile_resource_file): New function. * java-tree.h (resource_name): Declare. (compile_resource_file): Declare. * jcf-parse.c (yyparse): Handle compiling java resource files. * lang.c (java_decode_option): Handle -fcompile-resource option. * jvspec.c (lang_specific_driver): Handle -R flag for compiling resource files. * gcj.texi (Code Generation): Add documentation for -R flag. 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com> * jcf-write.c (generate_classfile): Issue an error in case of field/initial value mismatch. * parse.y (analyze_clinit_body): Keep <clinit> if an array is being initialized and we're generating bytecode. (java_complete_lhs): In MODIFY_EXPR section: added comments, set DECL_INITIAL properly when appropriate. Fixes PR java/4230 Fixes PR java/4204 2001-09-01 Per Bothner <per@bothner.com> * parse.y (maybe_yank_clinit): A field without an initializer is not relevant. All initializers except static final and constant require <clinit>, regardless of flag_emit_class_files. 2001-08-31 Per Bothner <per@bothner.com> * class.c (set_constant_value): When not emitting class files, then a String ConstantValue is a utf8const_ptr_type. 2001-08-30 Per Bothner <per@bothner.com> * jcf-write.c (generate_classfile): Check that field is primitive or string before emitting ConstantValue attribute. 2001-08-30 Per Bothner <per@bothner.com> * parse.y (resolve_qualified_expression_name): If creating a COMPOUND_EXPR, set it's type correctly. 2001-08-30 Per Bothner <per@bothner.com> * jcf-io.c (open_class): Set filename field. * jcf-parse,c (parse_class_file): Set current_function_decl for better error message when Code attribute is missing. * lang.c (put_decl_node, lang_print_error): Re-arrange for better diagnostics, especially for constructors. 2001-08-30 Per Bothner <per@bothner.com> * jcf-write.c (generate_classfile): Don't write ConstantValue attribute if field is not final, for compatibility with jdk. * jcf-write.c (generate_classfile): Convert ConstantValue values to correct type. Work-around for front-end bug. * class.c (set_constant_value): Error if constant has wrong type. 2001-08-30 Per Bothner <per@bothner.com> * jcf-dump.c (print_constant): Fix fencepost error so "Float" and "Double" are printed at verbosity 1. * jcf-dump.c (main): Disable flag_print_attributes if --javap. * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long. 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (patch_assignment): Don't verify final re-assignment here. (java_complete_lhs): Verify assignments to finals calling patch_assignment. Verify re-assignments to finals before calling patch_assignment. 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs. Fixes PR java/1413 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com> * lex.c (java_lex): new local found_hex_digits. Set and then used in test to reject invalid hexadecimal numbers. * parse.y (java_complete_tree): Prevent unwanted cast with initialized floating point finals. (patch_binop): Emit a warning when detecting a division by zero, mark result not constant, don't simplify non integer division. 2001-08-28 Per Bothner <per@bothner.com> * jcf-write.c (generate_bytecode_insns): For increments and decrements just recurse to push constant. Improvement on Mark's patch. 2001-08-28 Mark Mitchell <mark@codesourcery.com> * jcf-write.c (generate_bytecode_insns): Generate an integer to real conversion for increments and decrements of reals. 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (resolve_qualified_expression_name): Handle unresolved qualified expressions, prevent numerical qualifiers, fixed typo. Fixes PR java/4141 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (check_deprecation): Handle TYPE_DECL in a special case, don't report anything but deprecated class when marked so. Handle VAR_DECL. (patch_method_invocation): Check deprecation on methods and types. (patch_binop): code becomes an enum tree_code, added default: to switch to handle that. Detect division by zero, try to fold and return before using a subroutine. 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com> * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a file smaller than 4 bytes. * parse.y (check_inner_circular_reference): New function. (check_circular_reference): Likewise. (array_initializer:): Accept {,}. (java_check_circular_reference): Rewritten using check_circular_reference and check_inner_circular_reference. (java_complete_expand_method): Unconditionally save and restore the unpurged exception list. (build_dot_class_method_invocation): Unmangle signature parameter. 2001-08-21 Tom Tromey <tromey@redhat.com> * decl.c (init_decl_processing): Add `throws' field to method descriptor. * class.c (make_method_value): Compute `throws' field for method. 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (resolve_inner_class): Keep local_enclosing to NULL if circularity is detected. (ctors_unchecked_throws_clause_p): Fixed leading comment. 2001-08-17 Richard Henderson <rth@redhat.com> * class.c (emit_register_classes): Add align parameter to call to assemble_integer. 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com> * jcf-parse.c (load_class): New locals saved and class_loaded. If loading a class_or_name fails, try considering an innerclass name and load the enclosing context. * parse.y (resolve_inner_class): New function. (find_as_inner_class): Added leading comment. (register_incomplete_type): Keep the current context as enclosing context for JDEP_FIELD dependencies. (do_resolve_class): Locals new_class_decl and super initialized to NULL. Call resolve_inner_class, explore the enclosing context superclass if necessary. Fixes PR java/4007 2001-08-16 Tom Tromey <tromey@redhat.com> * jcf-dump.c (main): Updated for change to jcf_path_seal. * gjavah.c (main): Updated for change to jcf_path_seal. * lang.c (version_flag): New global. (java_decode_option): Recognize `-version'. (java_init): Update for change to jcf_path_seal. * jcf.h (jcf_path_seal): Added `print' argument. * jcf-path.c (jcf_path_seal): Added `print' argument. 2001-08-13 Zack Weinberg <zackw@panix.com> * Make-lang.in (java/decl.o): Update dependencies. * decl.c: Include libfuncs.h, don't include toplev.h. 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com> * decl.c (init_decl_processing): exception_type_node, class_not_found_type_node, and no_class_def_found_type_node initialized. predef_filenames augmented accordingly. instinit_identifier_node initialized. * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed. * java-tree.h (enum java_tree_index): New entries JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE, JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE. (exception_type_node): New macro. (class_not_found_type_node): Likewise. (no_class_def_found_type_node): Likewise. (instinit_identifier_node): Likewise. (PREDEF_FILENAMES_SIZE): Adjusted. (TYPE_HAS_FINAL_VARIABLE): Fixed typo. (struct lang_type): Fixed typo in bitfield name. (DECL_INSTINIT_P): New macro. (ID_INSTINIT_P): Likewise. * jcf-write.c (generate_classfile): instinit$ bears the Synthetic attribute. * parse.y (encapsulate_with_try_catch): New function. (generate_instinit): Likewise. (build_instinit_invocation): Likewise. (ctors_unchecked_throws_clause_p): Likewise. (add_instance_initializer): Deleted. (build_instance_initializer): Likewise. (in_instance_initializer): Likewise. (check_method_redefinition): instinit$ not to be verified. (java_complete_expand_methods): Generate instinit$, simplified code. (build_dot_class_method): Eliminated unnecessary locals. Use encapsulate_with_try_catch, removed unnecessary code. (fix_constructors): New local iii. Use build_instinit_invocation. (patch_method_invocation): Added comment. (maybe_use_access_method): Don't consider instinit$. (find_applicable_accessible_methods_list): Shorten the search for instinit$ too. (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed. (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer. (patch_throw_statement): Likewise. Fixed typo. 2001-08-12 David Edelsohn <edelsohn@gnu.org> Revert: 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks ASM_FINAL_SPEC. (lang_specific_pre_link): Use set_input to set input_filename. Append `main' here. * jvgenmain.c (usage): Append literal `main' to CLASSNAME. (main): Fix definition. Strip `main' from classname. Fixes PR java/227. 2001-08-11 Zack Weinberg <zackw@panix.com> * lex.h: Don't include setjmp.h. Don't define SET_FLOAT_HANDLER or prototype set_float_handler. 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com> * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and `poplevel' in the right order. 2001-08-09 Richard Henderson <rth@redhat.com> * Make-lang.in (class.o): Depend on TARGET_H. * class.c (emit_register_classes): Use target hooks instead of assemble_constructor and assemble_destructor. 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com> * check-init.c (flags.h): Include (check_init): Don't report uninitialized static class initialization flags, don't free bit index when doing static class initialization optimization. (check_for_initialization): Return type changed to `unsigned int.' (attach_initialized_static_class): New function. * class.c (add_method_1): Create the initialized static class table if necessary. (finish_class): Always emit deferred inline methods. * decl.c (emit_init_test_initialization): Moved to expr.c (complete_start_java_method): Don't traverse DECL_FUNCTION_INIT_TEST_TABLE. (lang_mark_tree): Mark hash tables in function decls. * expr.c (emit_init_test_initialization): Moved from decl.c. (build_class_init): Create LAG_DECL_SPECIFIC for the static class initialization flag, set DECL_CONTEXT and LOCAL_CLASS_INITIALIZATION_FLAG. (java_lang_expand_expr): Emit initialization code for static class initialized flags when entering block, if necessary. * gcj.texi (-fno-optimize-static-class-initialization): Documented. * java-tree.h (flag_optimize_sci): New global variable declaration. (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro. (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise. (LOCAL_FINAL_P): Fixed typo in comment. (FINAL_VARIABLE_P): Likewise. (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro. (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise. (struct lang_decl): New fields `ict', `smic' and `cif.' (check_for_initialization): New returned value for global. (attach_initialized_static_class): New global function. (STATIC_CLASS_INIT_OPT_P): New macro. * lang-options.h (-fno-optimize-static-class-initialization): New flag. * lang.c (java_decode_option): Handle `-fno-optimize-static-class-initialization' * parse.y (start_complete_expand_method): New function. (java_expand_method_bodies): Likewise. (attach_init_test_initialization_flags): Likewise. (adjust_init_test_initialization): Likewise. (emit_test_initialization): Likewise. (java_complete_expand_methods): Nullify abstract and native method bodies. (java_complete_expand_method): New locals `fbody', `block_body' and `exception_copy.' Reorganized: directly return on empty method bodies, call `start_complete_expand_method', remember definitely initialized static class in function, don't expand method bodies. (java_expand_classes): Call `java_expand_method_bodies' before `finish_class' when compiling to native. (resolve_expression_name): Use `orig' after building outer class field access. (patch_invoke): Remember static method invocations. 2001-08-06 Richard Henderson <rth@redhat.com> * class.c (emit_register_classes): Pass a symbol_ref and priority to assemble_constructor. 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com> * java-tree.h (all_class_filename): New macro. (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.' (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link newly created IDENTIFIER_NODE to `all_class_filename.' 2001-08-01 Jeff Sturm <jsturm@one-point.com> * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): Use ggc_add_tree_root to register roots. 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com> * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its second operand calling check_init. * decl.c (complete_start_java_method): Swaped second and third arguments while creating WITH_CLEANUP_EXPR node. * jcf-write.c (generate_bytecode_insns): Use second operand instead of third when handling WITH_CLEANUP_EXPR. * parse.y (java_complete_lhs): Expand second operand of WITH_CLEANUP_EXPR nodes. (patch_synchronized_statement): Swaped second and third arguments while creating WITH_CLEANUP_EXPR node. 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (create_interface): Avoid cyclic inheritance report when syntax error encountered during class definition. Fixes PR java/2956 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks ASM_FINAL_SPEC. (lang_specific_pre_link): Use set_input to set input_filename. Append `main' here. * jvgenmain.c (usage): Append literal `main' to CLASSNAME. (main): Fix definition. Strip `main' from classname. Fixes PR java/227. 2001-07-18 Tom Tromey <tromey@redhat.com> For PR java/2812: * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H. * lex.c (java_new_lexer): Use ICONV_CONST. (java_read_char): Likewise. * Make-lang.in (jc1$(exeext)): Link against LIBICONV. (jv-scan$(exeext)): Likewise. 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.' * parse.y (check_class_interface_creation): Allow `private' if the enclosing is not an interface. (create_interface): Interface tagged public if the enclosing context is an interface. (create_class): Class tagged public if the enclosing context is an interface. Fixes PR java/2959 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com> * class.c (push_class): Set DECL_SIZE to `integer_zero_node.' Fixes PR java/2665 2001-07-14 Tim Josling <tej@melbpc.org.au> * check-init.c (check_init): Remove references to EXPON_EXPR. 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset TREE_CONSTANT_OVERFLOW of CASE_EXPR value. Fixes PR java/3602 2001-07-13 Tom Tromey <tromey@redhat.com> * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1 invocation. 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (patch_method_invocation): Don't override primary if one is already provided, but let this$<n> be built. Fixed comment. 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (empty_statement:): Report empty statement error only when found at class declaration level. Fixes PR java/3635 2001-07-12 Tom Tromey <tromey@redhat.com> * expr.c (expand_load_internal): New function. (LOAD_INTERNAL): Use it. 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (verify_constructor_super): Compare anonymous class ctor args with `valid_method_invocation_conversion_p.' Fixes PR java/3285 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com> * lang-specs.h: Forbit the use if `-femit-class-file{s}' without `-fsyntax-only.' Fixes PR java/3248 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com> * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the current function is static. Fixes PR java/1970 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (patch_method_invocation): Add enclosing context to ctor calls if necessary. Fixes PR java/2953 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (resolve_package): Abort if qualified expression member isn't right. (qualify_ambiguous_name): Don't qualify as type if `this' in use. Fixes PR java/1391 2001-07-07 Zack Weinberg <zackw@stanford.edu> * verify.c: Don't use // comments. 2001-07-05 Tom Tromey <tromey@redhat.com> * lang.c (flag_assume_compiled): Removed. * java-tree.h (flag_assume_compiled): Removed. * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc, -fhash-synchronization, -fuse-divide-subroutine, -fcheck-references, -femit-class-file, -femit-class-files, -fassume-compiled. Updated --encoding information. Changed -foutput-class-dir to `-d'. 2001-07-04 Daniel Berlin <dan@cgsoftware.com> * jcf-parse.c (parse_class_file): Add lineno parameter to debug_start_source_file call. 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk> * gcj.texi: Use gpl.texi. * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update dependencies and use doc/include in search path. 2001-07-03 Jeff Sturm <jsturm@one-point.com> * parse.y (fix_constructors): Test if a CALL_EXPR invokes `this'. If so, don't build instance initializers. 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (resolve_expression_name): Improved error message for inner class cases. Fixes PR java/1958 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com> * lang.c: #include diagnostic.h (lang_print_error): Add a `diagnostic_context *' parameter. (java_dummy_print): Likewise. * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com> * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF. * jcf.h (typedef struct JCF): New bitfield `finished.' (JCF_FINISH): Set `finished.' (JCF_ZERO): Reset `finished.' Fixes PR java/2633 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (class_body_declaration:): Don't install empty instance initializers. Fixes PR java/1314 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com> * class.c (set_super_info): Call `set_class_decl_access_flags.' (set_class_decl_access_flags): New function. * java-tree.h (set_class_decl_access_flags): New prototype. * jcf-parse.c (handle_innerclass_attribute): Read and set access flags. (parse_class_file): New local `decl_max_locals.' Take wide types into account to compute DECL_MAX_LOCALS. * parse.y (type_import_on_demand_declaration:): Ignore duplicate imports on demand. 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl> * zipfile.h: Use GCC_JCF_H instead of JCF_H. 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com> * class.c (java_hash_tree_node): Fixed indentation in leading comment. * parse.y (do_resolve_class): Moved comments out to leading comment section. Removed local `start', New local `_ht' and `circularity_hash.' Record `enclosing' in hash table and search it to detect circularity. Use `enclosing' as an argument to `lookup_cl.' Free the hash table when done. 2001-06-19 Tom Tromey <tromey@redhat.com> * lex.c (java_read_char): Disallow invalid and overlong sequences. Fixes PR java/2319. 2001-06-05 Jeff Sturm <jsturm@one-point.com> * decl.c (create_primitive_vtable): Don't call make_decl_rtl. 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com> * expr.c (force_evaluation_order): Match wrapped ctor calls, locate arguments accordingly. 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk> * gcj.texi: Move contents to just after title page. 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (type_literals:): Use `build_incomplete_class_ref' with builtin type. (patch_incomplete_class_ref): Build the class ref, build the class init if necessary, complete the tree. Fixes PR java/2605 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (lookup_field_wrapper): Test `name' code. (resolve_qualified_expression_name): Test `qual_wfl' code. (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation, handle `qual_wfl' by code. (maybe_build_primttype_type_ref): Test `wfl' code. 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on fdl.texi. (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create the dvi file in the java directory. 2001-05-25 Sam TH <sam@uchicago.edu> * gen-table.pl javaop.h jcf.h lex.h, parse.h: Fix header include guards. 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk> * jv-scan.c (version): Update copyright year. 2001-05-21 Per Bothner <per@bothner.com> * jcf-parse.c (read_class): If class is from .class or .zip file and it's already been read, don't push/pop parser context. 2001-05-18 Per Bothner <per@bothner.com> * jvspec.c (lang_specific_pre_link): Re-arrange the linker command line so the jvgenmain-generated main program comes first. 2001-05-15 Tom Tromey <tromey@redhat.com> * class.c (build_utf8_ref): Don't generate identifier based on utf8const contents. 2001-05-12 Richard Henderson <rth@redhat.com> * java-tree.def (JAVA_EXC_OBJ_EXPR): New. * expr.c (java_lang_expand_expr): Expand it. (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of calling build_exception_object_ref. * parse.y (catch_clause_parameter): Likewise. (build_dot_class_method): Likewise. (try_reference_assignconv): Likewise. * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR. * jcf-write.c (generate_bytecode_insns): Likewise. 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (build_unresolved_array_type): Set EXPR_WFL_QUALIFICATION on the newly created wfl. Fixes PR java/2538. Fixes PR java/2535. 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (fix_constructors): Removed unnecessary assignment to local. Moved assignment to `this$<n>', fixed comments and indentation. (build_wfl_wrap): Fixed indentation. Fixes PR java/2598, java/2579 and java/2658. 2001-05-03 Mo DeJong <mdejong@redhat.com> * lex.c (java_new_lexer): Call iconv_close on temp handle used to check for byte swap. 2000-05-02 Jeff Sturm <jsturm@one-point.com> * expr.c (build_class_init): Move MODIFY_EXPR outside of COND_EXPR. Remove variable `call'. 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * decl.c: NULL_PTR -> NULL. * jcf-write.c: Likewise. 2001-05-01 Tom Tromey <tromey@redhat.com> * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'. (java/gcj.dvi): Added $(srcdir) to TEXINPUTS. * gcj.texi: Updated copyright text. Include fdl.texi. (Top): Link to new node. 2001-05-01 Per Bothner <per@bothner.com> * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon. 2001-05-01 Per Bothner <per@bothner.com> * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the import_list contains the name, not the TREE_PURPOSE. 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * jcf-io.c (read_zip_member): Cast to long in comparison with signed value. * jvspec.c (lang_specific_driver): Initialize variables. * mangle.c (find_compression_record_match): Likewise. * typeck.c (build_null_signature): Provide static prototype. Mark parameter with ATTRIBUTE_UNUSED. * verify.c (verify_jvm_instructions): Initialize variable. 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * parse.y (do_resolve_class): Check for cyclic inheritance during inner class resolution. 2001-04-27 Per Bothner <per@bothner.com> * parse.y (java_expand_classes): Don't change ctxp_for_generation while iterating, since that could cause gc to lose stuff. 2001-04-26 Per Bothner <per@bothner.com> Fix method search wrt scope of inner classes to match JLS2. * typeck.c (build_null_signature): New static function. (has_method): New function. Uses build_null_signature and lookup_do. * java-tree.h (has_method): New declaration. * parse.y (find_applicable_accessible_methods_list): Do not search context of inner classes here. (patch_method_invocation): Search scope, ie. current and outer clases, for method matching simple name, to find class. 2001-04-26 Per Bothner <per@bothner.com> * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR): Fix thinko: If a single case, use if_icmpeq, not ifeq. * constants.c (find_methodref_with_class_index): New function. (find_methodref_index): Use find_methodref_with_class_index. * java-tree.h (find_methodref_with_class_index): New declaration. * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change DECL_CONTEXT, instead use new find_methodref_with_class_index function. If context changed from interface to class, don't use invokeinterface. 2001-04-25 Per Bothner <per@bothner.com> * verify.c (verify_jvm_instructions): For field instructions, check that field index is valid. For invoke instructions, check that method index is valid. 2001-04-25 Alexandre Oliva <aoliva@redhat.com> * config-lang.in (target_libs): Copy from $libgcj_saved. 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * decl.c (init_decl_processing): Add new class "protectionDomain" field. * class.c (make_class_data): Set initial value for "protectionDomain". 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * jvspec.c (lang_specific_driver): Fix memory allocation deficit, by using concat in lieu of xmalloc/sprintf. 2001-04-20 Per Bothner <per@bothner.com> Fixes to compile multiple .class files at once. * decl.c (init_decl_processing): Don't set CLASS_LOADED_P. * java-tree.h (CLASS_PARSED_P): New macro. (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P. * jcf-parse.c (jcf_parse_source): Inline into read_class. (read_class): Avoid some code duplication. Don't call JCF_FINISH for a .class file - might be needed later. (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P rather than CLASS_LOADED_P, since latter implies class laid out. (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2. * parse.y: Don't need to set CLASS_LOADED_P for array types. 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Make-lang.in (java/boehm.o): Depend on toplev.h. * boehm.c: Include toplev.h. 2001-04-06 Tom Tromey <tromey@redhat.com> Alexandre Petit-Bianco <apbianco@redhat.com> Fix for PR gcj/1404 and PR gcj/2332: * parse.y (build_array_from_name): If we use the type_wfl then accumulate dimensions from the original type as well. (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place. 2001-04-06 Tom Tromey <tromey@redhat.com> * parse.y (analyze_clinit_body): Return true if the second operand of a METHOD_EXPR is nonzero. 2001-04-06 Tom Tromey <tromey@redhat.com> * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build directory. ($(srcdir)/java/parse.c): Likewise. 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com> * gcj.texi: Use `which-gcj' instead of `which-g77.' (version-gcc): Initialized. (which-gcj): Likewise. 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com> * java-tree.h (struct lang_decl): New macro `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.' * parse.y (build_instance_initializer): New function. (add_instance_initializer): Use it. (java_fix_constructors): Set `current_class' before fix pass. (fix_constructors): Just return if already fixed. Move `super()' invocation ahead. Use `build_instance_initializer.' Fixes PR java/1315. 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (resolve_qualified_expression_name): Pass field's DECL_CONTEXT to `not_accessible_p.' (not_accessible_p): Changed parameters order in `inherits_from_p' invocation. 2001-03-27 Andrew Haley <aph@cambridge.redhat.com> * lang-options.h: Add flag_check_references. 2001-04-04 Per Bothner <per@bothner.com> * java-tree.h (CONSTANT_VALUE_P): New macro. * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P. * parse.y (maybe_build_class_init_for_field): New static function. (resolve_expression_name, resolve_field_access): Use maybe_build_class_init_for_field instead of build_class_init This does not do the init if the field is compile-time-constant. (resolve_field_access): Simplify. * parse.y (fold_constant_for_init): Merge test into switch. 2001-04-03 Zack Weinberg <zackw@stanford.edu> * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend on gansidecl.h. * buffer.c, jvgenmain.c: Don't include gansidecl.h. 2001-04-02 Zack Weinberg <zackw@stanford.edu> * expr.c (pop_type_0): Save the result of the first lang_printable_name call in a scratch buffer, so it won't be clobbered by the second call. 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com> * parse-scan.y (array_type:): Rewritten. (type_declaration:): `empty_statement' replaces `SC_TK.' (class_member_declaration:): `empty statement' added. (method_body:): Simplified. (static_initializer:): Likewise. (primary_no_new_array:): Use `type_literals.' (type_literals:): New rule. (dims:): Set and update `bracket_count.' Fixes PR java/1074. Fixes PR java/2412. 2001-03-28 Hans Boehm <boehm@acm.org> * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.' (get_boehm_type_descriptor): Set type on returned value to be a pointer length integer. 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * expr.c (pop_type_0): Call `concat' rather than building the string manually. (pop_type): Add format specifier in call to `error'. * parse.y (patch_method_invocation): Avoid casting away const-ness. 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com> * jvgenmain.c (do_mangle_classname): End string constant with '\0'. 2001-03-28 Richard Henderson <rth@redhat.com> IA-64 ABI Exception Handling: * Make-lang.in (except.o): Don't depend on eh-common.h. * check-init.c (check_init): Handle EXC_PTR_EXPR. * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw. [soft_exceptioninfo_call_node]: Remove. [eh_personality_libfunc, lang_eh_runtime_type]: New. (end_java_method): No emit_handlers. * except.c (java_set_exception_lang_code): Remove. (method_init_exceptions): Don't call it. (prepare_eh_table_type): No CATCH_ALL_TYPE. (build_exception_object_ref): New. (expand_end_java_handler): Update for except.h name changes. (emit_handlers, expand_resume_after_catch): Remove. * expr.c (java_lang_expand_expr): Update for except.h name changes. (process_jvm_instruction): Use build_exception_object_ref. * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove. (soft_exceptioninfo_call_node): Remove. (build_exception_object_ref): Declare. * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No soft_exceptioninfo_call_node. Move processing ... [EXC_PTR_EXPR]: ... here. * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code. * parse.y (catch_clause_parameter): Use build_exception_object_ref. (source_end_java_method): No java_set_exception_lang_code or emit_handlers. (build_dot_class_method): Use build_exception_object_ref. (try_reference_assignconv): Check EXC_PTR_EXPR not soft_exceptioninfo_call_node. 2001-03-28 Richard Henderson <rth@redhat.com> * java-tree.h (throw_node): Define as a single member of java_global_trees instead of a separate array. (JTI_THROW_NODE): New. * decl.c (throw_node): Don't declare. (init_decl_processing): Init a scalar throw_node. Don't register it for gc. * check-init.c (check_init): Reference scalar throw_node. * expr.c (build_java_athrow): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * parse.h (BUILD_THROW): Likewise. 2001-03-28 Richard Henderson <rth@redhat.com> * decl.c (end_java_method): Do not save and restore flag_non_call_exceptions. * parse.y (source_end_java_method): Likewise. * lang.c (flag_exceptions): Don't declare. (java_init_options): Set flag_non_call_exceptions. Set flag_exceptions here ... (java_init): ... not here. 2001-03-27 Richard Henderson <rth@redhat.com> * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of exceptions_via_longjmp. * lang.c (flag_new_exceptions): Don't declare it. (java_init_options): Or set it. 2001-03-27 Richard Henderson <rth@redhat.com> * decl.c (end_java_method): Rename asynchronous_exceptions to flag_non_call_exceptions. * parse.y (source_end_java_method): Likewise. 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Make-lang.in: Depend on $(SYSTEM_H), not system.h. 2001-03-26 Mark Mitchell <mark@codesourcery.com> * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE. 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (find_as_inner_class): Follow current package indications not to mistakingly load an unrelated class. 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * constants.c (PUTN): Use memcpy, not bcopy. * lex.c (java_read_char): Use memmove, not bcopy. * parse.y (java_parser_context_resume): Use memcpy, not bcopy. 2001-03-23 Per Bothner <per@bothner.com> * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE macro for better error pin-pointing. * java-tree.h: Fix typo in comment. * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR. Don't include jsr/goto in exception range. Check if start and end of exception range are the same (also TRY_EXPR). Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false. However, do emit the following goto even if try_block is empty. Defer freeing exception_decl until after the finalizer, to make sure the local isn't reused in the finalizer. Fixes PR java/1208. * parse.y (java_complete_lhs): If the try-clause is empty, just return the finally-clause and vice versa. 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com> * gcj.texi (Input Options): documented the check for attribute `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag. * java-tree.h (flag_force_classes_archive_check): Declared extern. * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro. (jcf_parse): Check for the right classes archive if necessary. * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it. (jcf_parse_fields): Fixed indentation. * jcf-write.c (append_gcj_attribute): New function. (generate_classfile): Compute the attribute count, invoke `append_gcj_attribute'. * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source' turned into bit-fields. New bit-field `right_zip.' (JCF_ZERO): Set `right_zip' to zero. * lang-options.h (-fforce-classes-archive-check): Added flag. * lang.c (flag_force_classes_archive_check): New flag. (lang_f_options): New entry `force-classes-archive-check.' Fixes PR java/1213. 2001-02-07 Andrew Haley <aph@redhat.com> * gcj.texi (Configure-time Options): Add -fcheck-references. * expr.c (build_java_indirect_ref): New function. (java_check_reference): New function. (build_java_array_length_access): Use build_java_indirect_ref to check for null references. (build_java_arrayaccess): Likewise. (build_get_class): Likewise. (build_field_ref): Likewise. (invoke_build_dtable): Likewise. (build_invokeinterface): Likewise. * lang.c (lang_f_options): Add flag_check_references. * jvspec.c (jvgenmain_spec): Add flag_check_references. * java-tree.h (flag_check_references): New variable. * lang.c (flag_check_references): Likewise. * parse.y (patch_invoke): Use java_check_reference. (patch_assignment): Allow for extra nesting in _Jv_CheckArrayStore. 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz> * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c. * lex.c (cxx_keywords): Likewise. 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (qualify_ambiguous_name): Broaden `length' recognition. Help MODIFY_EXPR be resolved as expression names. Fixes PR java/2066. Fixes PR java/2400. 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz> * gjavah.c (process_file): Mark interface definitions with "__attribute__ ((java_interface))". 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com> * class.c (layout_class): Fixed push_super_field's second argument. Fixes PR java/2333. (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's too early to lay innerclasses out. 2001-03-20 Tom Tromey <tromey@redhat.com> Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (patch_assignment): Handle the case of a SAVE_EXPR inside an array reference. Insertion of the array store check rewritten. Fixes PR java/2299. 2001-03-20 Tom Tromey <tromey@redhat.com> * lex.c (java_read_unicode): Only accept leading `u's. 2001-03-20 Tom Tromey <tromey@redhat.com> * jcf-parse.c (read_class): Initialize `class'. 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu> * jcf_parse.c (jcf_parse): Eliminate unused variable. 2001-03-19 Mark Mitchell <mark@codesourcery.com> * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME. (layout_class): Likewise. (layout_class_method): Likewise. (emit_register_classes): Likewise. * decl.c (builtin_function): Likewise. (give_name_to_locals): Likewise. 2001-03-19 Per Bothner <per@bothner.com> * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P before trying to load an inner class. Fixes to process to command-line .class files in two passes. * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags. (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to .. (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now. * class.c (is_compiled_class): Fix for renamed flag. * parse.y (maybe_create_class_interface_decl): Likewise. * jcf-parse.c (yyparse): Also set if compiling .class files. * jcf-parse.c (read_class); Read current_class. (jcf_parse): Make static. (load_inner_classes): New function, with code moved from jcf_parse, because we need to inner classes after the command-line files are read. (yyparse): Set finput to NULL when it doesn't need to be closed. Reduce use of main_jcf (basically only for archive) and use finput instead of main_jcf->read_state. Inline jcf_figure_file_type into yyparse. Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name. Defer load_inner_classes and parse_class_file to a second pass, after we've correctly mapped command-line .clas fiels to classes. (jcf_figure_file_type): Removed. * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags. (JCF_ZERO): Also clear zipd field. * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP. 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu> * jcf-parse.c (yyparse): Change ch from char * to char. 2001-03-19 Per Bothner <per@bothner.com> * jvspec.c (lang_specific_driver): Check for .zip and .jar files. Add constructed filelist-file at end, following -xjava. Thus any .o and library files are not affected by the -xjava. Also wrap explicit @FILE with -xjava and -xnone. 2001-03-19 Andrew Haley <aph@cambridge.redhat.com> * class.c (build_static_field_ref): Call make_decl_rtl() after setting the DECL_EXTERNAL flag. 2001-03-17 Per Bothner <per@bothner.com> * decl.c (clear_binding_level): Fix initializer (broke 03-15). * jcf-write.c (generate_bytecode_insns): Handle emitting iinc when result is is needed (target is STACK_TARGET). * parse.h (JDEP_SOLV): Removed. * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead. * parse.y (incomplete_class_list): Removed. (obtain_incomplete_type): Don't use or set incomplete_class_list. It doesn't work if resolve_class changes the name of an array type that is on the list and then someone else looks for the modified name. Also, seems liable to break when compiling multiple source files at once. So the simplest is to just remove incomplete_class_list - it is only a minor space win and it is not even clear it saves time. * parse.y (resolve_class): Remove unneeded promote_type. 2001-03-15 Per Bothner <per@bothner.com> * java-tree.h (BLOCK_IS_IMPLICIT): New flag. * parse.h (BLOCK_EXPR_ORIGIN): Removed macro. * parse.y (declare_local_variables, maybe_absorb_scoping_blocks): Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN. * jcf-parse.c (yyparse): Set/reset input_filename for source file. * parse.y (java_expand_classes): Likewise. * parse.y (expand_start_java_method): Was only called once and had a misleading name, so inline in caller java_complete_expand_method. (enter_a_block): Likewise inline in enter_block and remove. Remove junk from when gcc/java was created (by copying from C/C++). * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove. (struct binding_level): Remove fields keep, keep_if_subblocks, more_cleanups_ok, have_cleanups (which have never been used). (pushlevel, poplevel): Remove related useless code. * class.c (make_class_data): The class_dtable_decl (i.e. the vtable for Class) should be external, except when compiling Class. * jvspec.c (lang_specific_driver): Fix -C handling. Check -save-temps to see if temp @FILE should be deleted. Follow-up to/fix for February 16 patch. * verify.c (verify_jvm_instructions): Better error msgs for dup. (type_stack_dup): Remove no-longer neded error check. 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz> * mangle.c (mangle_record_type): Rename 'from_pointer' argument to 'for_pointer'. If this type is for a pointer (argument) mangling, don't surround the element with 'N..E' if the type name is unqualified. 2001-03-14 Mark Mitchell <mark@codesourcery.com> * class.c (build_static_field_ref): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. (make_method_value): Likewise. (get_dispatch_table): Likewise. * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. 2001-03-07 Tom Tromey <tromey@redhat.com> * config-lang.in (lang_requires): Define. 2001-03-07 Brad Lucier <lucier@math.purdue.edu> * typeck.c (convert): Check flag_unsafe_math_optimizations, not flag_fast_math. 2001-03-05 Per Bothner <per@bothner.com> Fix a problem where rest_of_decl_compilation applied to class_dtable_decl causes problems because it was done too early, before output file was opened. * decl.c (init_decl_processing): Remove init of class_dtable_decl. * class.c (class_dtable_decl): Add macro - element of class_roots. (make_class_data): Define class_dtable_decl. * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed. 2001-03-01 Zack Weinberg <zackw@stanford.edu> * java/class.c, java/decl.c, java/java-tree.h: Replace all uses of 'boolean' with 'bool'. 2001-03-01 Zack Weinberg <zackw@stanford.edu> * lang-specs.h: Add zero initializer for cpp_spec field to all array elements. 2001-02-16 Per Bothner <per@bothner.com> Handle compiling multiple input files at once, and @FILE syntax. * gcj.texi: Updated documentation to match. * java-tree.h (flag_filelist_file, init_src_parse): New declarations. * jcf-parse.c (parse_source_file): Split into ... (parse_source_file_1): New function - and: (parse_source_file_2): New function. (yyparse): On -ffilelist-file, open and scan named file. On first pass over files, only do parse_source_file_1. A new second pass calls parse_source_file_2 for each file to compile. (init_jcf_parse): Call init_src_parse. * jvspec.c (INDIRECT_FILE_ARG): New flag. (lang_specific_driver): Support @FILELIST-FILE syntax, as well as multiple input file combined in one compilation. * lang-options.h: Add -ffilelist-file * lang.c (flag_filelist_file): New flag variable. (lang_f_options): Handle -ffilelist-file. * lex.c (java_init_lex): Don't clear ctxp->incomplete_class. * parse.h (struct parse_ctxt): Remove fields incomplete_class and gclass_list - use global fields of src_parse_roots instead. * parse.y (src_parse_roots): New array. (incomplete_class_list, gclass_list): New macros. (push_parser_context, java_pop_parser_context, java_parser_context_resume): Don't fiddle with deleted fields. (various): Use incomplete_class gclass_list and global macros instead of parse_ctxt fields - the lists are global. (init_src_parse): New function. 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * decl.c (set_block): Set NAMES and BLOCKS from BLOCK. 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (check_inner_class_access): Moved declaration of local `enclosing_decl_type' to the right location. 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz> * parse.y (parser_check_super_interface): Don't call check_pkg_class_access for an inner interface. (parser_check_super): Don't call check_pkg_class_access for inner class. (do_resolve_class): Simplify enclosing type loop. Don't call check_pkg_class_access if CL and DECL are not set. (find_in_imports_on_demand): Set DECL if class_type needed to be loaded. Don't call check_pkg_class_access for an inner class. (check_inner_class_access): Rewritten to implement member access rules as per spec 6.6.1. (check_pkg_class_access): Handle the empty package correctly. (in_same_package): New function. Determine if two classes are in the same package. 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz> * typeck.c (build_java_array_type): Don't try to poke a public `clone' method into array types. * parse.y (patch_method_invocation): Bypass access check on clone call to array instance. 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com> * expr.c (build_instanceof): Check for arrays when trying fold to false. 2001-02-15 Jim Meyering <meyering@lucent.com> * Make-lang.in (java.install-common): Depend on `installdirs'. (java.install-info): Likewise. 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz> * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o. 2001-02-14 Tom Tromey <tromey@redhat.com> Alexandre Petit-Bianco <apbianco@cygnus.com> Fix for PR java/1261. * typeck.c (build_java_array_type): Add public `clone' method to arrays. * parse.y (resolve_qualified_expression_name): Use current_class when checking for inaccessibility. (patch_method_invocation): Fixed error message when accessibility denied. Added `from_super' argument. 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (resolve_class): Don't build a fake decl. Use the one already built. * typeck.c (build_java_array_type): Build and assign decl to array type. 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (not_accessible_p): Changed leading comment. Added extra `where' argument. Use it to enforce protected access rules. (resolve_qualified_expression_name): Added extra argument to not_accessible_p. (patch_method_invocation): Use argument `primary' to provide not_accessible_p with an extra argument. (lookup_method_invoke): Added extra argument to not_accessible_p. (search_applicable_method_list): Likewise. 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com> * parse.y (resolve_qualified_expression_name): Try to resolve as an inner class access only if `decl' is a TYPE_DECL. 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (classdollar_identifier_node): Initialize. * java-tree.h (enum java_tree_index): New entry `JTI_CLASSDOLLAR_IDENTIFIER_NODE.' (classdollar_identifier_node): New macro. (ID_CLASSDOLLAR_P): Likewise. * parse.y (build_dot_class_method): Use `classdollar_identifier_node.' (build_dot_class_method_invocation): Likewise. (find_applicable_accessible_methods_list): `class$' can't be inherited. 2001-02-09 Raja R Harinath <harinath@cs.umn.edu> * Make-lang.in (java/mangle_name.o): Add 'make' prereqs. 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com> * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o' * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now gone. 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com> * mangle_name (append_unicode_mangled_name): Emit `_' or `U' outside of the `__U' sequence too. (unicode_mangling_length): Count `_' or `U' outside of the `__U' sequence too. 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com> * jvgenmain.c (error): Reversed 2001-02-01 deletion. 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com> * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o (JVGENMAIN_OBJS): Likewise. * java-tree.h (append_gpp_mangled_name): New prototype. * jcf-parse.c (ggc_mark_jcf): Argument now `void *.' Removed cast calling `gcc_add_root.' * jvgenmain.c (mangle_obstack): New global, initialized. (main): Use it. (do_mangle_class): Constify local `ptr.' Removed macro `MANGLE_NAME.' Removed cast in `for.' Call append_gpp_mangle_name and update `count' if necessary. Use `mangle_obstack.' * mangle.c (append_unicode_mangled_name): Removed. (append_gpp_mangled_name): Likewise. (unicode_mangling_length): Likewise. (mangle_member_name): Return type set to `void.' (mangle_field_decl): Don't append `U' in escaped names. (mangle_method_decl): Likewise. (mangle_member_name): Just use `append_gpp_mangled_name.' * mangle_name.c: New file. 2001-02-07 Per Bothner <per@bothner.com> * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic. * check-init.c (check_init): Don't call done_alternative after processing loop code, as a LOOP_EXPR never terminates normally. 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk> * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org. 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field DECLs. 2001-02-06 Tom Tromey <tromey@redhat.com> * lex.c (java_new_lexer): Longer error message. 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com> Alexandre Petit-Bianco <apbianco@cygnus.com> * typeck.c (build_prim_array_type): Added leading comment. (build_java_array_type): Moved locals out of block. Always create the `data' field, fixed alignment to match C++. 2001-02-04 Tom Tromey <tromey@redhat.com> * expr.c (java_lang_expand_expr): Don't bother recomputing `length'. Use rest_of_decl_compilation, not make_decl_rtl. Fixes PR java/1866. 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (process_imports): Save the original name of the import for better error report. 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz> * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list of macros used when compiling jvspec.c. * jvspec.c (lang_specific_driver): Link with the shared libgcc by default. 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * check-init.c (check_init): Call internal_error instead of fatal. * expr.c (java_lang_expand_expr): Likewise. * jcf-parse.c (get_constant): Likewise. * mangle.c (java_mangle_decl): Likewise. * parse.y (make_nested_class_name, java_complete_lhs): Likewise. (operator_string): Likewise. * check-init.c (check_init): Call abort instead of fatal. * class.c (build_class_ref): Likewise. * constants.c (write_constant_pool): Likewise. * decl.c (start_java_method): Likewise. * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise. (java_stack_dup, encode_newarray_type): Likewise. (build_java_array_length_access): Likewise. (build_java_check_indexed_type, expand_java_pushc): Likewise. (build_java_soft_divmod, build_invokeinterface): Likewise. * java-tree.h (INNER_CLASS_P): Likewise. * jcf-parse.c (parse_signature, get_name_constant): Likewise. (give_name_to_class, get_class_constant): Likewise. * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise. (find_constant_index, generate_bytecode_conditional): Likewise. (generate_bytecode_insns, perform_relocations): Likewise. * lex.c (java_unget_unicode, java_lex): Likewise. * mangle.c (mangle_type, mangle_record_type): Likewise. (mangle_pointer_type, mangle_array_type, init_mangling): Likewise. (finish_mangling): Likewise. * parse.h (MARK_FINAL_PARMS): Likewise. * parse.y (pop_current_osb, unreachable_stmt_error): Likewise. (obtain_incomplete_type, java_complete_class): Likewise. (java_check_regular_methods, java_complete_expand_method): Likewise. (cut_identifier_in_qualified, check_deprecation): Likewise. (patch_invoke, find_applicable_accessible_methods_list): Likewise. (java_complete_lhs, lookup_name_in_blocks): Likewise. (check_final_variable_indirect_assignment, build_unaryop): Likewise. * typeck.c (set_local_type, parse_signature_type): Likewise. (parse_signature_string, build_java_signature): Likewise; (set_java_signature): Likewise. * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise. * class.c (add_method): Call fatal_error instead of fatal. (build_static_field_ref): Likewise. * expr.c (build_known_method_ref, expand_invoke): Likewise. * jcf-parse.c (get_constant, jcf_parse): Likewise. * lex.c (java_new_new_lexer): Likewise. * jv-scan.c (main): Likewise. (fatal_error): Renamed from fatal. * jcf-parse.c (yyparse): Call fatal_io_error instead of pfatal_with_name. * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal. (yyparse): Likewise. * jcf-write.c (make_class_file_name, write_classfile): Likewise. * lex.c (java_get_line_col): Likewise. * jcf-parse.c (load_class): Make errors non-fatal. * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV. 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz> * jvgenmain.c (class_mangling_suffix): Remove unused string. (error): Remove unused function. (main): Don't use "__attribute__ alias" on generated class symbol. 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last argument. * parse.y (finish_method_declaration): Code accounting for WFLed method DECL_NAMEs deleted. (check_abstract_method_definitions): Likewise. (resolve_type_during_patch): Layout resolved type. * typeck.c (lookup_do): Removed unused local. 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz> * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE. * decl.c (init_decl_processing): Use integer_minus_one_node, not integer_negative_one_node. * expr.c (build_java_binop): Likewise. 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com> * zextract.c (read_zip_archive): Read file_offset before writing zipd and consequently clobbering the header contents. 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Make-lang.in: Remove all dependencies on defaults.h. * decl.c: Don't include defaults.h. * expr.c: Likewise. * parse.y: Likewise. 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * ChangeLog (2001-01-21): Fixed typo. * class.c (layout_class_method): Code accounting for WFLed method DECL_NAMEs deleted. * constant.c (find_methodref_index): Likewise. * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl. * java-tree.h (DECL_FUNCTION_WFL): New macro. (struct lang_decl): New field `wfl'. (java_get_real_method_name): Prototype deleted. * mangle.c (mangle_method_decl): Code accounting for WFLed method DECL_NAMEs deleted. * parse.h (GET_METHOD_NAME): Macro deleted. * parse.y (reset_method_name): Deleted. (method_header): Set DECL_FUNCTION_WFL. (check_abstract_method_header): Code accounting for WFLed method DECL_NAMEs deleted. (java_get_real_method_name): Deleted. (check_method_redefinition): Code accounting for WFLed method DECL_NAMEs deleted. Use DECL_FUNCTION_WFL. (java_check_regular_methods): Likewise. (java_check_abstract_methods): Likewise. (java_expand_classes): Don't call `reset_method_name.' (search_applicable_method_list): Use DECL_NAMEs instead of GET_METHOD_NAME. * typeck.c (lookup_do): Code accounting for WFLed method DECL_NAMEs deleted. 2001-01-25 Richard Earnshaw <rearnsha@arm.com> * lex.c (java_read_char): Check for EOF from getc first. 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (layout_class): Don't lay the superclass out if it's already being laid out. * jcf-parse.c (handle_innerclass_attribute): New function. (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke handle_innerclasses_attribute. (jcf_parse): Don't load an innerclasses if it's already being laid out. * jcf-write.c (append_innerclass_attribute_entry): Static `anonymous_name' and its initialization deleted. `ocii' and `ini' to be zero for anonymous classes. 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if necessary. * jcf-parse.c (set_source_filename): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary. 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it gets a unique asm name. 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method. (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary. (HANDLE_SYNTHETIC_ATTRIBUTE): New macro. * jcf-reader.c (get_attribute): Handle `Synthetic' attribute. * parse.y (lookup_package_type_and_set_next): Deleted. (resolve_package): Removed unnecessary code. (find_applicable_accessible_methods_list): `finit$' can't be inherited. * verify.c (pop_argument_types): Added missing prototype. 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz> * config-lang.in: Disable java by default. 2001-01-23 Tom Tromey <tromey@redhat.com> * gcj.texi (Copying): New node. Added copyright information. 2001-01-21 Per Bothner <per@bothner.com> Various fixes to allow compiling a compressed .jar/.zip archive. * zipfile.h (struct ZipFileCache): Replace by struct ZipFile. (struct ZipFile): Add fields name and next (from ZipFileCache). (struct ZipDirectory): New field zipf points to owning ZipFile. * jcf.h (struct ZipDirectory): Add forward declaration. (struct JCF): Declare zipd field to have type struct ZipDirectory. Remove seen_in_zip and zip_offset fields. (JCF_SEEN_IN_ZIP): New macro. * zextract.c (read_zip_archive): Set ZipDirectory's zipf field. * jcf-io.c: Change all ZipFileCache to ZipFile. (read_zip_member): New function. (open_in_zip): Call read_zip_member. * jcf-parse.c (find_in_current_zip): Remove function. (read_class): Merge in find_in_current_zip functionality. Call read_zip_member if needed. (parse_zip_file_entries): Use read_zip_member. (process_zip_dir): Update for removed and added JCF fields. (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct. 2001-01-21 Per Bothner <per@bothner.com> Minor optimization of static ggc roots. * jcf-parse.c (parse_roots): New static field. (current_field, current_method, current_file_list): Replace by macros naming fields of parse_roots. (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1. * class.c (class_roots): New static field. (registered_class, fields_ident, info_ident, class_list): New macros naming fields of parse_roots. (build_static_field_ref): Don't register roots here. (layout_class): Static field list replaced by macro class_list. (init_class_processing): Call ggc_add_tree_root for 4 roots. Initialize fields_ident and info_ident here. 2001-01-21 Per Bothner <per@bothner.com> * jcf-parse.c (ggc_mark_jcf): New function. (init_jcf_parse): Register current_jcf as ggc root. 2001-01-21 Per Bothner <per@bothner.com> * lang.c (put_decl_node): Print method's name. 2001-01-21 Per Bothner <per@bothner.com> * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro. (verify_jvm_instructions): Use it, for better error messages on loads. 2001-01-21 Per Bothner <per@bothner.com> * verify.c (merge_type_state): Still may have to merge even if LABEL_VERIFIED (label). 2001-01-21 Per Bothner <per@bothner.com> * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong. 2001-01-19 Per Bothner <per@bothner.com> * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch if expeting an interface type. Refines Tom's change of 2000-09-12. 2001-01-18 Per Bothner <per@bothner.com> * gcj.texi (Input Options): Mention .java files. 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * lang-options.h (-Wunsupported-jdk11): Removed. * lang.c (flag_not_overriding): Deleted. (flag_static_local_jdk1_1): Likewise. (lang_W_options): Removed "unsupported-jdk11" entry. * parse.y (java_check_methods): Removed dead code. 2001-01-17 Tom Tromey <tromey@redhat.com> Changes suggested by Per Bothner: * gcj.texi (Input Options): Don't mention input files. (Code Generation): Updated --main information. (Invoking jcf-dump): Mention that --javap is incomplete. From Alexandre Petit-Bianco: (Warnings): Don't mention -Wunsupported-jdk11. My stuff: (Compatibility): Mention JDK 1.2-ness of libraries. (Resources): Mention resources used when writing gcj. 2001-01-17 Tom Tromey <tromey@redhat.com> * gcj.texi: New file. * Make-lang.in ($(srcdir)/java/gcj.info): New target. (java.info): Depend on gcj.info. (java/gcj.dvi): New target. (java.dvi): Depend on gcj.dvi. (java.install-info): Wrote. 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com> * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after having called make_decl_rtl. 2001-01-14 Per Bothner <per@bothner.com> Various patches to emit better messages on verification errors. * expr.c (push_type_0): Return error indication on stack overflow, instead of callinfg fatal. (push_type): Now just call push_type_0 (nd fatal on overflow). (pop_type_0): Return detailed error message (in a char** argument). (pop_type): If pop_type_0 fails, print error message. (pop_argument_types): Moved to verify.c. * verify.c (pop_argument_types): Moved from expr.c. Return a (possible) error message, rather than void. (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros. (verify_jvm_instruction): Use new macros, improving error messages. For case OPCODE_astore use object_ptr_type_node. * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros. (pop_type_0, push_type_0, pop_argument_types): Update accordingly. * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is constant, return body without wrapper. (Improves constant folding.) * lex.c (build_wfl_node): Clear TREE_TYPE from returned node. 2001-01-13 Per Bothner <per@bothner.com> * expr.c (expand_java_field_op): Assigning to a final field outside an initializer does not violate JVM spec, so should be warning, not error. (Sun's verifier does not complain - though MicroSoft's does.) 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk> * gjavah.c (version), jcf-dump.c (version): Update copyright year to 2001. 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz> * parse.y (resolve_expression_name): Permit instance variables from enclosing context in super constructor call. (resolve_qualified_expression_name): Permit enclosing class's qualified "this" in super constructor call. 2001-01-10 Mark Mitchell <mark@codesourcery.com> * class.c (build_utf8_ref): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. (build_class_ref): Likewise. (build_static_field_ref): Likewise. (get_dispatch_table): Likewise. (layout_class_method): Likewise. (emit_register_classes): Likewise. * constants.c (build_constant_data_ref): Likewise. * decl.c (builtin_function): Likewise. (create_primitive_vtable): Likewise. * expr.c (build_known_method_def): Likewise. (build_jni_stub): Likewise. (java_lang_expand_expr): Likewise. 2001-01-10 Tom Tromey <tromey@redhat.com> * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation. 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (lang_printable_name_wls): New prototype. * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT rather than `current_class' to print type name. Don't prepend type names when printing constructor names. (lang_printable_name_wls): New function. * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE. * parse.y (patch_method_invocation): Message tuned for constructors. (not_accessible_p): Grant `private' access from within enclosing contexts. 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com> All files with updated copyright when applicable. * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o. * class.c (mangle_class_field): Function removed. (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise. (utf8_cmp, cxx_keyword_p): Moved to lex.c. (build_class_ref): Call `java_mangle_class_field' instead of `mangle_class_field.' (build_dtable_decl): Rewritten to call `java_mangle_vtable.' (layout_class): Call `java_mangle_decl' instead of `mangle_static_field.' (cxx_keywords): Initialized static array moved to `lex.c.' (layout_class_method): Changed leading comment. Simplified to call `java_mangle_decl.' Local `ptr' moved in for loop body. * decl.c (lang_mark_tree): Mark field `package_list.' * java-tree.h (TYPE_PACKAGE_LIST): New macro. (struct lang_type): New field `package_list.' (unicode_mangling_length): Prototype removed. (append_gpp_mangled_name, append_gpp_mangled_classtype, emit_unicode_mangled_name): Likewise. (cxx_keyword_p): New prototype. (java_mangle_decl, java_mangle_class_field, java_mangle_class_field_from_string, java_mangle_vtable): Likewise. * jcf-parse.c (jcf_parse_source): Constify `file' argument to `build_expr_wfl.' * jvgenmain.c (main_method_prefix): Global variable removed. (main_method_suffix): Likewise. (do_mangle_classname): New function. (main): Call it. Format changed to accommodate new mangling scheme. * lex.c: (utf8_cmp): Conditionally prototyped. (cxx_keywords): Moved from class.c, conditionally defined. (utf8_cmp, cxx_keyword_p): Likewise. * mangle.c (obstack.h, ggc.h): Included. (mangle_field_decl): New function. (mangle_method_decl, mangle_type, mangle_pointer_type, mangle_array_type, mangle_record_type, find_compression_pointer_match, find_compression_array_match, find_compression_record_match, find_compression_array_template_match, set_type_package_list, entry_match_pointer_p, emit_compression_string, init_mangling, finish_mangling, compression_table_add, mangle_member_name): Likewise. (mangle_obstack): New global. (MANGLE_RAW_STRING): New macro. (unicode_mangling_length): Turned static. (append_unicode_mangled_name): Renamed from `emit_unicode_mangled_name.' Turned static. `mangle_obstack' replaces `obstack', removed from the parameter list. (append_gpp_mangled_name): Turned static. `mangle_obstack' replaces parameter `obstack', removed from the parameter list. Call `append_unicode_mangled_name' instead of `emit_unicode_mangled_name. (append_gpp_mangled_classtype): Removed. (compression_table, compression_next): New static variables. * parse.y (temporary_obstack): Extern declaration removed. 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (patch_binop): Compute missing type in error situations. 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz> * class.c (make_class_data): Push initial value for "arrayclass". * decl.c (init_decl_processing): Add new class field "arrayclass". 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz> From patha@softlab.ericsson.se: * parse.y (switch_label): Use build, not build1, to construct DEFAULT_EXPR. 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk> * lang.c (lang_decode_option): Change -MA to -MP. * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target): Update to new prototype; do quote targets. (jcf_dependency_write): Update. 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz> Shorten primitive array allocation path: * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray to create new primitive arrays. * expr.c (build_newarray): If generating native code, call soft_newarray_node with a reference to the primitive TYPE identifier instead of type_value. 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz> Fix for PRs gcj/312 and gcj/253: * parse.y (valid_ref_assignconv_cast_p): Load classes for source and dest if they arn't already. * class.c (layout_class): Call maybe_layout_super_class on superinterfaces also, but only if compiling from bytecode. Fix for PR gcj/373: * parse.y (create_class): Set ACC_STATIC if class is declared in an interface. 2000-12-15 Tom Tromey <tromey@redhat.com> * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already set. 2000-12-14 Andrew Haley <aph@redhat.com> * boehm.c (mark_reference_fields): Change test to correctly detect bitmap overflow. 2000-12-15 Andreas Jaeger <aj@suse.de> * config-lang.in (lang_dirs): Added. 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (end_artificial_method_body): Fixed undefined behavior. Credits go to rth for finding it. 2000-12-13 Mike Stump <mrs@wrs.com> * parse.y (check_static_final_variable_assignment_flag): Fix spelling. 2000-11-07 Tom Tromey <tromey@cygnus.com> * Make-lang.in (JAVA_LEX_C): Added chartables.h. * lex.c (java_ignorable_control_p): Removed. (java_letter_or_digit_p): Removed. (java_start_char_p): New function. (java_read_char): Return `int', not `unicode_t'. Changed callers. (java_read_unicode): Likewise. (java_read_unicode_collapsing_terminators): Likewise. (java_get_unicode): Likewise. (java_new_lexer): Initialize hit_eof. (java_parse_end_comment): Take `int' argument. (java_parse_doc_section): Likewise. (java_parse_escape_sequence): Don't allow backlash-newline. Return `int'. * lex.h (JAVA_DIGIT_P): Removed. (_JAVA_LETTER_OR_DIGIT_P): Removed. (_JAVA_IDENTIFIER_IGNORABLE): Removed. (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P. (JAVA_PART_CHAR_P): New macro. (UEOF): Now -1. (JAVA_CHAR_ERROR): Now -2. (java_lexer): New field `hit_eof'. * chartables.h: New file. * gen-table.pl: new file. 2000-11-20 Tom Tromey <tromey@cygnus.com> Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_complete_lhs): Only allow compound assignment of reference type if type is String. 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com> * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip. jcf-path.c: Likewise. 2000-12-09 Anthony Green <green@redhat.com> * zipfile.h (ZipDirectory): Declare size, uncompressed_size, filestart and filename_length as int values. 2000-12-07 Mo DeJong <mdejong@redhat.com> * jcf-io.c (find_class): Correct the logic that tests to see if a .java file is newer than its .class file. The compiler was incorrectly printing a warning when file mod times were equal. 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu> * jvgenmain.c: Use ISPRINT not isascii. 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (end_artificial_method_body): Fixed typo. 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (patch_method_invocation): Pick the correct enclosing context when creating inner class instances. Fixes gcj/332. 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk> * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version): Update copyright year to 2000. 2000-11-23 Anthony Green <green@redhat.com> * jcf-parse.c (init_jcf_parse): Register current_file_list root. Move current_file_list out of yyparse and make it static. * expr.c: Declare quick_stack and tree_list_free_list as static (init_expr_processing): Register quick_stack and tree_list_free_list roots. 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (build_outer_field_access): New local `decl_ctx', use it. Check for field's context and current class immediate outer context inheritance. (outer_field_access_p): Consider fields inherited from the last enclosing context. (build_access_to_thisn): Stop at the last enclosing context if necessary. Fixes gcj/367. 2000-11-23 J"orn Rennecke <amylaar@redhat.com> * Make-lang.in (jvspec.o): Depend on $(CONFIG_H). 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz> * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the scratch buffer. 2000-11-20 Tom Tromey <tromey@cygnus.com> * jv-scan.c (help): Document --complexity. (options): Added --complexity. (flag_complexity): New global. (main): Call `report'. * parse-scan.y (complexity): New global. (if_then_statement, if_then_else_statement, if_then_else_statement_nsi, switch_block_statement_group, while_expression, do_statement, for_begin, continue_statement, throw_statement, catch_clause, finally, method_invocation, conditional_and_expression, conditional_or_expression, conditional_expression): Update complexity. (reset_report): Reset complexity. (report): New function. 2000-11-20 Tom Tromey <tromey@cygnus.com> * lex.c (yylex): Added STRICT_TK case. * parse.y (STRICT_TK): Added. * parse-scan.y (STRICT_TK): Added. * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and `;'. Use 4, not 3, with -k option. Correctly rename resulting file. * keyword.h: Rebuilt. * keyword.gperf (strictfp): Added. 2000-11-20 Tom Tromey <tromey@cygnus.com> * lex.c (yylex): Recognize floating point constants with leading 0. 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * java-tree.h (cyclic_inheritance_report): Constify. * parse.y (cyclic_inheritance_report): Likewise. 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu> * parse.y (goal): Remove call to ggc_add_string_root. 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu> * jcf-parse.c (get_constant), parse.y (do_merge_string_cste): Create string in scratch buffer, then pass to build_string. 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk> * parse.y (issue_warning_error_from_context): Add ATTRIBUTE_PRINTF. 2000-11-11 Anthony Green <green@redhat.com> * jcf-parse.c (process_zip_dir): Add finput parameter. (jcf_figure_file_type): Call process_zip_dir with appropriate argument. 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * decl.c (copy_lang_decl): Use memcpy, not bcopy. * jcf-parse.c (jcf_figure_file_type): Likewise. 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk> * parse.y (create_new_parser_context): Use memset () instead of bzero (). 2000-11-08 Tom Tromey <tromey@cygnus.com> * gjavah.c (process_file): Only include gcj/cni.h when generating CNI stubs. 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk> * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c (init_outgoing_cpool), lex.c (java_init_lex): Use memset () instead of bzero (). 2000-11-05 Tom Tromey <tromey@cygnus.com> * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix. * lex.c (IS_ZERO): New define. (java_perform_atof): Error on floating point underflow. 2000-11-04 Tom Tromey <tromey@cygnus.com> * lex.c (java_parse_escape_sequence): Only read two octal characters if the first one is greater than 3. Don't allow "octal" numbers to include the digits 8 or 9. 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk> * Make-lang.in (java.distdir): Remove. 2000-11-03 Tom Tromey <tromey@cygnus.com> * Make-lang.in (java.dvi): New target. Partial fix for PR other/567. * lang-options.h: Mention -Wout-of-date. * jcf-dump.c (flag_newer): New global. * gjavah.c (flag_newer): New global. * jcf-io.c (find_class): Only warn when flag_newer set. * lang.c (flag_newer): New global. (struct string_option): New declaration. (lang_W_options): New global. (process_option_with_no): New function. (lang_decode_option): Use it. * class.c (cxx_keyword_p): Accept keywords with trailing `$'s. * gjavah.c (cxx_keyword_subst): Handle any number of trailing `$'. * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro. (JAVA_ID_CHAR_P): Also try java_ignorable_control_p. * lex.c (java_read_unicode): Removed `term_context' argument. Recognize any number of `u' in `\u'. (java_read_unicode_collapsing_terminators): New function. (java_get_unicode): Use it. (java_lineterminator): Removed. (yylex): Produce error if character literal is newline or single quote. Return if eof found in middle of `//' comment. EOF in `//' comment is only an error if pedantic. (java_ignorable_control_p): New function. (java_parse_end_comment): Return if eof found in middle of comment. Include flags.h. * jv-scan.c (pedantic): New global. 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (outer_field_access_p): Inherited fields aren't consider outer fields. (maybe_build_thisn_access_method): Use PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P. (resolve_expression_name): Trigger an error if a static field is being accessed as an outer field. 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com> * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'. Fixes gcj/365. 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu> * Make-lang.in: Move all build rules here from Makefile.in, adapt to new context. Wrap all rules that change the current directory in parentheses. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add OUTPUT_OPTION to all object-file generation rules. Delete obsolete variables. * Makefile.in: Delete. * config-lang.in: Delete outputs= line. 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (patch_method_invocation): NULLify this_arg when already inserted. (maybe_use_access_method): Handle call to methods unrelated to the current class. Fixed comment. Fixes gcj/361. 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in scope. 2000-10-24 Tom Tromey <tromey@cygnus.com> * lex.c (java_new_lexer): Initialize new fields. Work around broken iconv() implementations. (java_read_char): Swap bytes if required. Use fallback decoder if required. (byteswap_init, need_byteswap): New globals. (java_destroy_lexer): Only close iconv handle if it is in use. * lex.h (java_lexer): New fields read_anything, byte_swap, use_fallback. Made out_buffer unsigned. 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (register_incomplete_type): Include JDEP_FIELD as a case where an enclosing context can be set on the jdep. (do_resolve_class): Fixed identation. 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define * jcf-reader.c (peek_attribute, skip_attribute): Only define when requested. * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN. * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void. 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (OP1): Update `last_bc'. (struct jcf_block): Fixed indentation and typo in comments. New field `last_bc'. (generate_bytecode_insns): Insert `nop' if `jsr' immediately follows `monitorenter'. * parse.y (patch_synchronized_statement): New local `tmp'. Call `patch_string'. Fixes gcj/232. 2000-10-16 Tom Tromey <tromey@cygnus.com> * jvspec.c (lang_specific_driver): Recognize -MF and -MT. * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}. * lang-options.h: Added -MA, -MT, -MF.. * lang.c (lang_decode_option): Recognize -MA, -MT, -MF. (DEPEND_TARGET_SET): New macro. (DEPEND_FILE_ALREADY_SET): Likewise. (init_parse): Handle new flags. * jcf.h (jcf_dependency_print_dummies): Declare. * Make-lang.in (s-java): Added mkdeps.o. * Makefile.in (BACKEND): Added mkdeps.o. (../gcjh$(exeext)): Added mkdeps.o. (../jcf-dump$(exeext)): Added mkdeps.o. * jcf-depend.c: Include mkdeps.h. (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS, add_entry): Removed. (jcf_dependency_reset): Rewrote. (dependencies): New global. (jcf_dependency_set_target): Rewrote. (jcf_dependency_add_target): Likewise. (jcf_dependency_add_file): Likewise. (munge): Removed. (print_ents): Removed. (jcf_dependency_write): Rewrote. (print_dummies): New global. (jcf_dependency_print_dummies): New function (jcf_dependency_write): Call deps_dummy_targets if required. 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com> * gjavah.c (add_class_decl): Removed unused variables `tname', `tlen' and `name_index'. * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro. * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME in `wfl_operator' with value. (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE. (jcf_figure_file_type): Fixed identation. * lex.c (java_get_line_col): Use EOF. Tuned `^' placement. * parse.y (analyze_clinit_body): New function. (static_initializer:): Reset `current_static_block'. (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in `wfl_operator' with new value. (lookup_cl): Use EXPR_WFL_FILENAME. (maybe_yank_clinit): Handle bogus <clinit> bodies, call analyze_clinit_body. (build_outer_field_access): Access to this$<n> built from current_class, not its outer context. (build_access_to_thisn): Fixed leading comment. Tidied things up. (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'. (patch_method_invocation): Use `is_static_flag' when already initialized. (patch_newarray): Removed assignment in ternary operator. 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * except.c (free_eh_ranges): Don't free `whole_range'. 2000-10-15 Anthony Green <green@redhat.com> * decl.c (init_decl_processing): Call init_class_processing before anything else. 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (check_init): Fixed leading comment. Use LOCAL_FINAL_P. * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. (give_name_to_locals): Likewise. (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl' fields in lang_decl_var. * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR, DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros. (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten. (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC, DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros. (LOCAL_FINAL): Rewritten. (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros. (struct lang_decl): Fixed comments. Added `synthetic_ctor' and `init_final' fields. (struct lang_decl_var): Fixed leading comment. Added `am', `wfl', `final_uid', `final_liic', `final_ierr' and `local_final' fields. (TYPE_HAS_FINAL_VARIABLE): New macro. (struct lang_type): Added `afv' field. * parse.y (check_static_final_variable_assignment_flag): New function. (reset_static_final_variable_assignment_flag): Likewise. (check_final_variable_local_assignment_flag): Likewise. (reset_final_variable_local_assignment_flag): Likewise. (check_final_variable_indirect_assignment): Likewise. (check_final_variable_global_assignment_flag): Likewise. (add_inner_class_fields): Use LOCAL_FINAL_P. (register_fields): Handle local finals and final variables. (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR. (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC on local finals. (java_complete_expand_methods): Loop to set TYPE_HAS_FINAL_VARIABLE. Call `reset_final_variable_local_assignment_flag' and `check_final_variable_local_assignment_flag' accordingly before and after constructor expansion. Call `reset_static_final_variable_assignment_flag' before expanding <clinit> and after call `check_static_final_variable_assignment_flag' if the current_class isn't an interface. After all methods have been expanded, call `check_final_variable_global_assignment_flag' and `check_static_final_variable_assignment_flag' if the current class is an interface. (maybe_yank_clinit): Fixed typo in comment. (build_outer_field_access_methods): Removed old sanity check. Use FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. Don't create access methods for finals. (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'. (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if existing DECL_INIT has been processed. (java_complete_lhs): Likewise. (check_final_assignment): Filter input on `lvalue''s TREE_CODE. Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new logic. (patch_assignment): Use LOCAL_FINAL_P. (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if DECL_INITIAL is nullified. Fixes gcj/163. 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Make-lang.in (parse.c, parse-scan.c): Create atomically. * Makefile.in (parse.c, parse-scan.c): Likewise. 2000-10-12 Mark Mitchell <mark@codesourcery.com> * class.c (temporary_obstack): Remove. (make_class): Don't mess with obstascks. (push_class): Likewise. (set_super_info): Likewise. (add_method_1): Likewise. (add_method): Likewise. (add_field): Likewise. (build_utf8_ref): Likewise. (build_class_ref): Likewise. (build_static_field_ref): Likewise. (finish_class): Likewise. (push_super_field): Likewise. (layout_class): Likewise. (layout_class_methods): Likewise. (init_class_processing): Likewise. * constants.c (get_tag_node): Likewise. (build_constant_data_ref): Likewise. * decl.c (ggc_p): Remove. (copy_lang_decl): Use ggc_alloc. (complete_start_java_method): Don't mess with obstacks. (start_java_method): Likewise. (end_java_method): Likewise. * except.c (link_handler): Use xmalloc. (free_eh_ranges): New function. (method_init_exceptions): Use it. (add_handler): Use xmalloc. (expand_start_java_handler): Don't mess with obstacks. (prepare_eh_table_type): Likewise. (expand_end_java_handler): Likewise. * expr.c (push_value): Likewise. (create_label_decl): Likewise. (build_jni_stub): Likewise. (java_lang_expand_expr): Likewise. (note_instructions): Use xrealloc. (java_push_constant_from_pool): Don't mess with obstacks. (process_jvm_instruction): Likewise. * java-tree.h (cyclic_inheritance_report): Remove duplicate declaration. * jcf-parse.c (get_constant): Don't mess with obstacks. (read_class): Likewise. (jcf_parse): Likewise. * lex.c (expression_obstack): Remove. (java_lex): Don't use obstack_free. * parse.h (exit_java_complete_class): Don't mess with obstacks. (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust. (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise. (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise. * parse.y (gaol): Add more GC roots. (add_inner_class_fields): Adjust calls to MANGLE_* macros. (lookup_field_wrapper): Likewise. (obtain_incomplete_type): Don't mess with obstacks. (build_alias_initializer_parameter_list): Adjust calls to MANGLE_* macros. (craft_constructor): Don't mess with obstacks. (safe_layout_class): Likewise. (java_complete_class): Likewise. (source_end_java_method): Likewise. (build_outer_field_access_methods): Likewise. (build_outer_method_access_method): Likewise. (maybe_build_thisn_access_method): Likewise. (build_dot_class_method_invocation): Likewise. (java_complete_tree): Likewise. (java_complete_lhs): Likewise. (do_merge_string_cste): Likewise. (patch_string_cst): Likewise. (array_constructor_check_entry): Likewise. * typeck.c (build_java_array_type): Likewise. (parse_signature_string): Likewise. (build_java_signature): Likewise. 2000-10-12 Tom Tromey <tromey@cygnus.com> Fix for PR gcj/356: * gjavah.c (add_class_decl): Don't special-case inner classes. (add_namelet): Likewise. 2000-10-11 Rodney Brown <RodneyBrown@mynd.com> * java-tree.h: Constify current_encoding. * lang.c: Constify current_encoding. 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com> * jvgenmain.c (class_mangling_suffix): Omit `.'. (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'. 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's patch. Fixes gcj/340. 2000-10-10 Tom Tromey <tromey@cygnus.com> * lex.c (java_new_lexer): Initialize out_first and out_last fields. * lex.h (java_lexer): Added out_buffer, out_first, out_last. 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (pop_current_osb): New function. (array_type:): Use `dims:', changed actions accordingly. Suggested by Anthony Green. (array_creation_expression:): Used pop_current_osb. (cast_expression:): Likewise. (search_applicable_method_list): Fixed indentation. 2000-10-08 Anthony Green <green@redhat.com> * parse.y (array_type_literal): Remove production. (type_literals): Refer to array_type, not array_type_literal. 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com> Patch contributed by Corey Minyard. * decl.c (check_local_named_variable): New function. (tree check_local_unnamed_variable): Likewise. (find_local_variable): Splitted. Call check_local_{un}named_variable. 2000-10-07 Anthony Green <green@redhat.com> * class.c (layout_class): Handle case where superclass can't be layed out yet. 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk> * Makefile.in (keyword.h): Refer to GNU FTP site for updated gperf. 2000-10-05 Tom Tromey <tromey@cygnus.com> * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'. * jvgenmain.c (class_mangling_prefix): Removed. (class_mangling_suffix): New global. (main): Use it. * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending `$'. (print_method_info): Handle overrides for static and final methods. (process_file): Generate declaration for class object field. * class.c (cxx_keywords): New array. (utf8_cmp): New function. (cxx_keyword_p): New function. (layout_class_method): Mangle C++ keywords by appending `$'. (mangle_field): New function. (mangle_class_field): Use mangle_field. Mangle class name as `class$'. (mangle_static_field): Use mangle_field. 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (find_local_variable): Removed uncessary type check and fixed range check typo. From Corey Minyard. 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (give_name_to_locals): New local `code_offset'. Call `maybe_adjust_start_pc'. * expr.c (note_instructions): New function. (expand_byte_code): Don't collect insn starts here. (peek_opcode_at_pc): New function. (maybe_adjust_start_pc): Likewise. * java-tree.h (maybe_adjust_start_pc): Declare. (note_instructions): Likewise. * jcf-parse.c (parse_class_file): Call `note_instructions'. 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (field_access:): Fixed indentation. (qualify_ambiguous_name): Properly qualify `this.a[b].c'. 2000-09-07 Tom Tromey <tromey@cygnus.com> Fix for PR gcj/307: * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not JPRIMITIVE_TYPE_P, for arithmetic operators. (patch_method_invocation): Indentation fix. (try_builtin_assignconv): Handle boolean specially. Fixed typo. (valid_builtin_assignconv_identity_widening_p): Handle boolean. (do_unary_numeric_promotion): Cleaned up code. (valid_cast_to_p): Handle boolean correctly. 2000-09-27 Tom Tromey <tromey@cygnus.com> * lex.c (java_read_unicode): Reset bs_count when finished with `\u' sequence. 2000-10-01 Mark Mitchell <mark@codesourcery.com> Convert to GC. * Make-lang.in (s-java): Don't depend on ggc-callbacks.o. * Makefile.in (BACKEND): Don't include ggc-callbacks.o. (typeck.o): Depend on ggc.h. * class.c (add_method_1): Use GC functions for allocation. (init_class_processing): Register roots. * decl.c (ggc_p): Set to 1. (pending_local_decls): Make it static. (push_jvm_slot): Use GC functions for allocation. (init_decl_processing): Register roots. (give_name_to_locals): Use GC functions for allocation. (lang_mark_tree): New function. * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC functions for allocation. * jcf-parse.c (jcf_parse_source): Use ggc_strdup. * lex.c (java_lex): Use build_string, rather than replicating it inline. * parse.y (goal): Add more roots. (mark_parser_ctxt): New function. * typeck.c: Include ggc.h. 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (maybe_yank_clinit): Also keep <clinit> if its body contains something else than MODIFY_EXPR. 2000-09-23 Mark Mitchell <mark@codesourcery.com> * Make-lang.in (JAVA_SRCS): Include java-tree.h. * Makefile.in (parse.o): Depend on ggc.h. (class.o): Likewise. (constants.o): Likewise. (decl.o): Likewise. (expr.o): Likewise. (jcf-parse.o): Likewise. (jcf-write.o): Likewise. (mangle.o): Likewise. * class.c: Include ggc.h. (build_static_field_ref): Register GC roots. (layout_class): Likewise. (init_class_processing): Likewise. * constants.c: Include ggc.h. (current_constant_pool_data_ref): Remove. (tag_nodes): Move it to ... (get_tag_node): ... here. Register GC roots. * decl.c: Include ggc.h. Remove many global tree definitions. (throw_node): Define. (java_global_trees): Likewise. (predef_filenames): Make the size a constant. (init_decl_processing): Adjust accordingly. (init_decl_processing): Call init_jcf_parse. Register GC roots. * expr.c: Include ggc.h. (init_expr_processing): Register GC roots. (build_invokeinterface): Likewise. * java-tree.h: Replace extern tree declarations with macros. (java_global_trees): New variable. (java_tree_index): New enumeration. (init_jcf_parse): Declare. * jcf-parse.c: Include ggc.h. (current_class): Remove declaration. (main_class): Likewise. (all_class_list): Likewise. (predefined_filename_p): Adjust for constant size of predef_filenames. (init_jcf_parse): New function. * jcf-write.c: Include ggc.h. (generate_classfile): Register GC roots. (append_synthetic_attribute): Likewise. (append_innerclass_attribute_entry): Likewise. * lang.c: Include ggc.h. (lang_print_error): Register GC roots. * parse.h (struct parser_ctxt): Rename fields to avoid conflicts with macros. * parse.y: Include ggc.h. (wfl_operator): Remove. (goal): Register GC roots. (java_pop_parser_context): Adjust for new field names. (java_parser_context_save_global): Likewse. (java_parser_context_restore_global): Likewise. (java_parser_context_suspend): Likewise. (java_parser_context_resume): Likewise. (verify_constructor_circularity): Register GC roots. (lookup_cl): Likewise. (java_reorder_fields): Likewise. (build_current_this): Likewise. (class_in_current_package): Likewise. (argument_types_convertible): Likewise. (patch_cast): Rename wfl_op parameter to avoid macro conflicts. 2000-09-14 Tom Tromey <tromey@cygnus.com> * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV. 2000-09-13 Tom Tromey <tromey@cygnus.com> * jcf-parse.c: Include <locale.h>. * jv-scan.c: Include <locale.h>. 2000-09-12 Tom Tromey <tromey@cygnus.com> * expr.c (pop_type_0): Return `Object' if trying to merge two interface types. * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for interface types; `Object' is always a valid supertype. 2000-09-12 Tom Tromey <tromey@cygnus.com> Fix for PR gcj/33: * jv-scan.c (help): Document --encoding. (options): Added `encoding' entry. (OPT_ENCODING): New define. (main): Handle --encoding. Include <langinfo.h> if nl_langinfo exists. * lang-options.h: Document --classpath, --CLASSPATH, --main, and --encoding. * jcf-parse.c Include <langinfo.h> if we have nl_langinfo. (parse_source_file): Correctly call java_init_lex. Added `finput' argument. Use nl_langinfo to determine default encoding. * java-tree.h (current_encoding): Declare. * parse.y (java_parser_context_restore_global): Don't restore `finput'. (java_parser_context_save_global): Don't set `finput' field. (java_pop_parser_context): Don't restore `finput'. Free old lexer if required. * lang.c (current_encoding): New global. (lang_decode_option): Recognize `-fencoding='. (finish_parse): Don't close finput. * parse.h (struct parser_ctxt): Removed `finput' and `unget_utf8_value' fields. Added `lexer' field. (java_init_lex): Fixed declaration. * lex.c (java_new_lexer): New function. (java_destroy_lexer): Likewise. (java_read_char): Added `lex' argument. Handle iconv case. (java_read_unicode): Added `lex' argument. Count backslashes in lexer structure. (java_init_lex): Added `finput' and `encoding' arguments. Set `lexer' field in ctxp. (BAD_UTF8_VALUE): Removed. (java_lex): Handle seeing UEOF in the middle of a string literal. * lex.h: Include <iconv.h> if HAVE_ICONV defined. (java_lexer): New structure. (UNGETC): Removed. (GETC): Removed. (DEFAULT_ENCODING): New define. (java_destroy_lexer): Declare. 2000-09-12 Tom Tromey <tromey@cygnus.com> Fix for PR gcj/343: * lex.c (java_init_lex): Initialize java_io_serializable. * parse.y (java_io_serializable): New global. (valid_ref_assignconv_cast_p): An array can be cast to serializable. 2000-09-10 Zack Weinberg <zack@wolery.cumb.org> * decl.c, expr.c: Include defaults.h if not already included. Don't define the *_TYPE_SIZE macros. 2000-09-09 Geoffrey Keating <geoffk@cygnus.com> * typeck.c (build_java_array_type): Correct first parameter in ADJUST_FIELD_ALIGN invocation. 2000-09-06 Tom Tromey <tromey@cygnus.com> * lang-specs.h: Also recognize `-femit-class-files'. 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * verify.c (merge_types): Load the types to merge if necessary. 2000-09-02 Anthony Green <green@redhat.com> * jcf-io.c: Include zlib.h. (open_in_zip): Read compressed class file archives. * zipfile.h (ZipDirectory): Add uncompressed_size and compression_method fields. * zextract.c (read_zip_archive): Collect file compression info. 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz> * parse.y (do_resolve_class): Also explore superclasses of intermediate enclosing contexts when searching for inner classes. 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (variable_declarator_id:): Better error message. (expression_statement:): Use YYNOT_TWICE. (cast_expression:): Likewise. (assignment:): Likewise. 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (do_merge_string_cste): New locals. Create new STRING_CSTs each time, use memcpy. Fixes gcj/311. 2000-08-07 Hans Boehm <boehm@acm.org> * boehm.c (mark_reference_fields): Set marking bits for all words in a multiple-word record. (get_boehm_type_descriptor): Use the procedure marking descriptor for java.lang.Class. 2000-08-31 Mike Stump <mrs@wrs.com> * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext), jcf-dump$(exeext)): Make parallel safe. 2000-08-29 Zack Weinberg <zack@wolery.cumb.org> * jcf-parse.c (set_source_filename): Constify a char *. * jcf-write.c (append_innerclasses_attribute, make_class_file_name): Constify a char *. Don't recycle a variable for an unrelated purpose. * parse.y: (build_alias_initializer_parameter_list): Constify a char *. (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings. 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (can_widen_reference_to): Fixed indentation. * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment. * parse.y: `finit$' replaces `$finit$' in comments. (try_builtin_assignconv): Fixed leading comment. 2000-08-25 Greg McGary <greg@mcgary.org> * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE. 2000-08-24 Greg McGary <greg@mcgary.org> * lang.c (lang_decode_option): Use ARRAY_SIZE. * parse.y (BINOP_LOOKUP): Likewise. 2000-08-22 Andrew Haley <aph@cygnus.com> * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before sign extending. Fixes gcj/321. * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before combining to make a jlong. Fixes gcj/321. 2000-08-21 Nix <nix@esperi.demon.co.uk> * lang-specs.h: Do not process -o or run the assembler if -fsyntax-only. 2000-08-16 Andrew Haley <aph@cygnus.com> * typeck.c (build_java_array_type): Rewrite code to do array alignment. Take into account back-end macros when aligning array data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the user to set alignment. Fixes gcj/252 and 160. 2000-08-09 Tom Tromey <tromey@cygnus.com> * parse.y (check_abstract_method_definitions): Now return `int'. Check implemented interfaces. Fixes PR gcj/305. * parse.y (patch_switch_statement): Disallow `long' in switch expressions. Fixes PR gcj/310. 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (finit_leg_identifier_node): New global. (init_decl_processing): Use `finit$' to initialize finit_identifier_node. Use `$finit$' to initialize finit_leg_identifier_node. * expr.c (expand_java_field_op): Use ID_FINIT_P. * java-tree.h (finit_identifier_node): Changed attached comment. (finit_leg_identifier_node): New declaration. (ID_FINIT_P): Take finit_identifier_node and finit_leg_identifier_node into account. This is a backward compatibility hack. 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_bytecode_conditional): Re-installed lost Jan 6 2000 patch. (generate_bytecode_insns): Check `nargs' before emitting it. * verify.c (merge_type_state): Fixed typo. * ChangeLog: Fixed typo in some jcf-write.c entries mentioning generate_bytecode_{conditional,insns}. 2000-08-13 Anthony Green <green@redhat.com> * check-init.c (check_init): Add case for BIT_FIELD_REF (required for -pg builds). 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (maybe_layout_super_class): Fixed indentation. * java-tree.h (CLASS_METHOD_CHECKED_P): New macro. (java_check_methods): New function declaration. * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str' instead of `str_ptr'. * jcf-write.c (generate_bytecode_insns): Emit number the of args of a `invokeinterface' at the right time. * parse.h (WFL_STRIP_BRACKET): New macro. (SET_TYPE_FOR_RESOLUTION): Use it. * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'. (check_class_interface_creation): Don't check for cross package innerclass name clashes. (method_header): Behave properly if MDECL is `error_mark_node'. (method_declarator): Return `error_mark_node' if bogus current class. (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary. (resolve_and_layout): New local `decl_type', set and used. Call java_check_methods. (java_check_methods): New method. (java_layout_classes): Use it. (resolve_qualified_expression_name): No EH check necessary in access$<n>. (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating `case' statement. (patch_assignment): Set DECL_INITIAL on integral final local. 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (flag_extraneous_semicolon): New extern. * lang-options.h: (-Wextraneous-semicolon): New option. * lang.c (flag_redundant): Fixed typo in leading comment. (flag_extraneous_semicolon): New global. (lang_decode_option): Set `flag_extraneous_semicolon' when -Wall. Decode `-Wextraneous-semicolon'. * parse.y (type_declaration:): Removed `SC_TK' hack, added `empty_statement' rule. (class_body_declaration): Likewise. (method_body:): Accept `;' as a method body. (static_initializer:): Removed `SC_TK' hack. (constructor_block_end:): Likewise. (empty_statement:): Report deprecated empty declaration. Fixes gcj/295 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (build_dot_class_method_invocation): Changed parameter name to `type'. Build signature from `type' and convert it to a STRING_CST if it's an array. (patch_incomplete_class_ref): `build_dot_class_method_invocation' to use `ref_type' directly. 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com> * lang-options.h: Added a comma after the last element to avoid syntax errors when other languages define additional options. 2000-08-04 Zack Weinberg <zack@wolery.cumb.org> * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist. * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS. (jc1): Link with $(BACKEND). (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND). 2000-08-02 Zack Weinberg <zack@wolery.cumb.org> * jvspec.c: Adjust type of second argument to lang_specific_driver, and update code as necessary. * class.c (build_dtable_decl): Initialize dummy. 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (maybe_yank_clinit): When generating bytecode: non empty method bodies not to rule out discarding `<clinit>'; don't use <clinit> to initialize static fields with constant initializers. 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * gjavah.c (print_method_info): Added `synth' parameter. Skip synthetic methods. (method_synthetic): New global. (HANDLE_METHOD): Recognize synthetic method and tell `print_method_info' about it. (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're processing a synthetic method. * jcf-reader.c (skip_attribute): New function. ( skip_attribute): Likewise. 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (build_outer_field_access): Fixed comments. (fix_constructors): Emit the initialization of this$<n> before calling $finit$. (resolve_qualified_expression_name): Build an access to `decl' if necessary. 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse-scan.y (curent_class): Non longer const. (inner_qualifier, inner_qualifier_length): Deleted. (current_class_length): New global. (bracket_count): Fixed typo in leading comment. (anonymous_count): New global. (class_instance_creation_expression:): Handle anonymous classes. (anonymous_class_creation:): New rule. (push_class_context): Rewritten. (pop_class_context): Likewise. (INNER_QUALIFIER): Macro deleted. (report_class_declaration): call `push_class_context' when entering the function. `fprintf' format modified not to use INNER_QUALIFIER. (report_class_declaration): Assign `package_name' and `current_class' to NULL separately. 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (build_invokeinterface): Call layout_class_methods on target interface. 2000-07-27 Tom Tromey <tromey@cygnus.com> Anthony Green <green@cygnus.com> Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (make_class_data): Create vtable for abstract classes. (get_dispatch_table): Changed to cope with abstract classes. 2000-07-27 Tom Tromey <tromey@cygnus.com> * parse.y (patch_method_invocation): Don't reverse the argument list when dealing with anonymous class constructors. Fixed typo in comment. 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (build_alias_initializer_parameter_list): Reverse crafted list when building aliases for anonymous class constructors. 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (jdep_resolve_class): Don't bother checking potential innerclass access if `decl' is NULL. (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the WFL. 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.c: Remove (again.) 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (find_as_inner_class): Removed 2000-07-19 patches. * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved outside the `if' statement, alias to innerclass removed, `decl' used to mark the class complete. 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (simple_name:): Fixed typo in error message. 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node or its first operand can be error marks. 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC. * parse.y (method_header): Likewise. 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (process_imports): Consider that one might be trying to import an innerclass. Fixes gcj/254 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (find_as_inner_class): Handle the case where the enclosing context of an innerclass has been loaded as bytecode. 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (simple_name:): Reject `$' in type names. (resolve_type_during_patch): Use `type' as a second argument to resolve_no_layout. Fixes gcj/257. 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz> * parse.y (find_most_specific_methods_list): Select the only non-abstract method even if max has been set. Fixes gcj/285, gcj/298. 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com> * lang-specs.h: Added %(jc1) to java compiler options. 2000-07-14 Zack Weinberg <zack@wolery.cumb.org> * .cvsignore: New file. 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (not_accessible_p): Access granted to innerclasses (indirectly) extending the reference type. Fixes gcj/249. 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (patch_method_invocation): Fixed comment. (maybe_use_access_method): Build this$<n>s to the context of the target method, or a type that extends it. Fixes gcj/242. 2000-07-13 Mark Mitchell <mark@codesourcery.com> * parse.c: Remove. 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (fold_constant_for_init): Avoid bullish conversion. 2000-07-13 Tom Tromey <tromey@cygnus.com> * lang-specs.h: Added %{I*}. 2000-07-13 Zack Weinberg <zack@wolery.cumb.org> * lang-specs.h: Use the new named specs. Remove unnecessary braces. 2000-07-12 Mark Mitchell <mark@codesourcery.com> * parse-scan.c: Remove. 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (set_super_info): Handled protected inner classes. (common_enclosing_context_p): Bail early if arguments aren't both inner classes. (get_access_flags_from_decl): Handle private and protected inner classes. * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro. (CLASS_PROTECTED): Likewise. (struct lang_type): New bitfield `poic'. * parse.y (jdep_resolve_class): Call check_inner_class_access on inner classes only. (check_inner_class_access): Renamed arguments, added comments. Handles protected inner classes (fixes gcj/225) (not_accessible_p): Fixed comments. Avoid handling inner classes. 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_qualified_expression_name): Verify qualified access to `this'. Fixes gcj/239. 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_classfile): Don't install ConstantValue for null pointers. 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_qualified_expression_name): Handle inner class access. Fixes gcj/256. 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_classfile): Properly install the ConstantValue attribute and the initial value constant pool index on string constants. * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting class files. 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while construct. * parse.y (find_as_inner_class): Fixed typo. (do_resolve_class): Explore enclosing contexts when searching for innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME. (check_inner_class_access): Check `decl' which can be null in case of previous errors. 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (java_debug_context): Declared `extern'. (safe_layout_class): Likewise. * parse.y (resolve_field_access): Field must be `static' in order to be replaced by its initial value. Added comments. (find_applicable_accessible_methods_list): Fixed typo. (find_most_specific_methods_list): Methods found in innerclasses take over methods founds in the enclosing contexts. (java_complete_tree): Loosen restrictions on the type of DECLs that can be replaced by their initialization values. (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'. 2000-07-05 Tom Tromey <tromey@cygnus.com> * Make-lang.in (PARSE_DIR): New macro. (PARSE_RELDIR): Likewise. (PARSE_C): Likewise. (PARSE_SCAN_C): Likewise. ($(PARSE_C)): New target. ($(PARSE_SCAN_C)): Likewise. (SET_BISON): New macro. (BISONFLAGS): Likewise. (JAVABISONFLAGS): Likewise. 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz> * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream argument on the first pass for CNI as well as JNI. (print_method_info): Set up method name on the first pass only. 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (parser_qualified_classname): Removed parameter `is_static'. (create_interface): Removed first passed parameter to parser_qualified_classname. (create_class): Likewise. Don't install alias on static innerclasses. Fixes gcj/275. 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (maybe_generate_pre_expand_clinit): Don't build a debugable statement with empty_stmt_node. Fixes gcj/272 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (build_instanceof): Layout type after it's loaded. Fixes gcj/271. 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (push_long_const): Appropriately cast short negative constant to jword. 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (verify_constructor_super): Use loop variable `m_arg_type' initialized with `mdecl_arg_type'. 2000-06-29 Tom Tromey <tromey@cygnus.com> * parse.y (resolve_field_access): Handle case where `type_found' is NULL. 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (lookup_field): The same field can be found through two different interface. Don't declare it ambiguous in that case. 2000-06-27 Tom Tromey <tromey@cygnus.com> * lex.c (java_lineterminator): Don't recognize \r after \n. If \r follows \r, then unget it at a lower level. 2000-06-26 Tom Tromey <tromey@cygnus.com> * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to java_complete_tree. 2000-06-25 Tom Tromey <tromey@cygnus.com> * parse.y (for_statement): Wrap expression in a WFL if it is a constant. For PR gcj/268. 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (do_resolve_class): Minor optimiztion in the package list search. Removed unnecessary test and return statement. (valid_ref_assignconv_cast_p): Order of arguments to enclosing_context_p fixed. 2000-06-24 Tom Tromey <tromey@cygnus.com> * expr.c (lookup_field): Print error and return error_mark_node if field reference is ambiguous. * parse.y (check_abstract_method_definitions): Also check if `other_method' is abstract. 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (set_super_info): Handle ACC_PRIVATE for (inner) classes. * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro. (struct lang_type): New field `pic'. (CLASS_PRIVATE): New macro. * parse.y (check_inner_class_access): New function. (jdep_resolve_class): Call it. 2000-06-23 Tom Tromey <tromey@cygnus.com> * parse.y (patch_incomplete_class_ref): Initialize the returned class. For PR gcj/260. 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com> * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'. 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for Java specific checks. * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage screened by DECL_P. * java-tree.def (CASE_EXPR): Marked 'e'. (DEFAULT_EXPR): Likewise. * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage screened by DECL_P. * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for Java specific checks. (generate_bytecode_insns): Test try_block for BLOCK before using BLOCK_EXPR_BODY. * parse.y (build_wfl_wrap): Added `location' argument. Set EXPR_WFL_LINECOL accordingly. (dim_expr:): Wrap constants with WFLs. (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC. (resolve_package): Check for `stmt' not being a BLOCK before building a debuggable statement with it. (make_qualified_primary): Added extra parameter to build_wfl_wrap invocation. (resolve_field_access): Make sure `decl' is a DECL before treating it as such. (maybe_build_primttype_type_ref): Make sure `wfl''s node is an IDENTIFIER_NODE before treating it as such. (patch_new_array_init): Make sure `elt' is a TREE_LIST before treating it as such. (find_applicable_accessible_methods_list): CLASS_INTERFACE macro to be applied only on non array types. 2000-06-16 Per Bothner <per@bothner.com> * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't define in terms of DECL_RESULT, as that fails when --enable-checking. 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer types the same in comparison. (CHECK_OP): Add static prototype. 2000-06-13 Jakub Jelinek <jakub@redhat.com> * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN. * parse.y (java_complete_class): Set DECL_USER_ALIGN. * parse.c: Rebuilt. 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * decl.c (create_primitive_vtable): Prototype. * jcf-write.c (generate_bytecode_insns): Initialize variable `saved_context'. * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz> * parse.y (find_applicable_accessible_methods_list): Use a hashtable to track searched classes, and do not search the same class more than once. Call find_applicable_accessible_methods_list on immediate superclass, instead of search_applicable_method_list on all ancestors. Fix for PR gcj/238. 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz> * parse.y (register_fields): Permit static fields in inner classes if they are final. Fix for PR gcj/255. 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries. * parse.y (find_in_imports): Returned type changed to void, leading comment fixed. (register_package): New function. (qualify_and_find): Likewise. (package_declaration:): Use `register_package'. (single_type_import_declaration:): Removed local variable `node'. Added missing `;' for consistency. (type_import_on_demand_declaration:): Use `chainon' to link new entries. (lookup_field_wrapper): Lookup local variables defined in outer contexts first. (java_complete_class): Don't reverse the list of imported on demand. (do_resolve_class): Reorganized. Removed local variable `original_name'. Call `qualify_and_find' with the current package name, invoke `find_in_imports_on_demand' right after. Call `qualify_and_find' with the packages we've seen so far. Fixed operations numbering in comments. (java_expand_class): Don't reverse `package_list'. (find_most_specific_methods_list): New local variables `abstract' and `candidates'. Use them to pick the right method. 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com> * parse.y (check_modifiers_consistency): Don't subtract out `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY. 2000-06-04 Philipp Thomas <pthomas@suse.de> * Makefile.in (INTLLIBS): New. (LIBS): Add above. (DEPLIBS): Ditto. 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (get_dispatch_table): Build the vtable dummy entry list element with a null purpose. Fixed leading comment. (build_dtable_decl): Build an accurate dtable type when appropriate and use it. 2000-06-02 Richard Henderson <rth@cygnus.com> * lang.c (lang_get_alias_set): New. 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_field_access): Complete the DECL_INITIAL tree before using it as the accessed field. 2000-05-31 Tom Tromey <tromey@cygnus.com> * java-tree.h (boolean_array_vtable, byte_array_vtable, char_array_vtable, short_array_vtable, int_array_vtable, long_array_vtable, float_array_vtable, double_array_vtable): Declare. * expr.c (get_primitive_array_vtable): New function. (create_primitive_vtable): New function. (java_lang_expand_expr): Enable code to statically generate arrays. * decl.c (init_decl_processing): Create primitive vtables. (boolean_array_vtable, byte_array_vtable, char_array_vtable, short_array_vtable, int_array_vtable, long_array_vtable, float_array_vtable, double_array_vtable): Define. 2000-05-26 Zack Weinberg <zack@wolery.cumb.org> * java/parse.y (find_applicable_accessible_methods_list): Don't add an uninitialized value to the list. 2000-05-25 Tom Tromey <tromey@cygnus.com> * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC when trying to see if field's class should be initialized. Always initialize field's declaring class, not qualified class. For PR gcj/162. * parse.y (array_constructor_check_entry): Pass `wfl_value', not `wfl_operator', to maybe_build_primttype_type_ref. Fixes PR gcj/235. 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz> * parse.y (patch_method_invocation): Don't try to lookup methods in primitive types. 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_field_access): Call the appropriate <clinit> before accessing the length of a static array. Craft a decl for the field while its time. Fixes PR gcj/129. 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_package): Correctly set `*next' (was off by one.) (resolve_qualified_expression_name): Fixed comment. 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-parse.c (jcf_parse_source): Reset current_class and current_function_decl to NULL before parsing a new file. 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (block_end:): If the collected block doesn't feature a statement, insert an empty statement. 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (maybe_yank_clinit): New function. (maybe_generate_pre_expand_clinit): Always link <clinit> at the end of the list of methods belonging to a class. (java_complete_expand_method): Check whether <clinit> is really necessary and expand it accordingly. 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be processed by the method's switch statement. 2000-05-19 Tom Tromey <tromey@cygnus.com> * java-tree.h: Added init state enum. * decl.c (emit_init_test_initialization): Initialize class initialization check variable by looking at class' state. 2000-05-19 Tom Tromey <tromey@cygnus.com> * java-tree.h (build_instanceof): Declare. (build_get_class): Declare. * parse.y (patch_binop): Use build_instanceof. * expr.c (build_instanceof): New function. If class is final, don't make a function call. (expand_java_INSTANCEOF): Use it. (build_get_class): New function. 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br> * jcf-write.c (generate_classfile): Scan the source_file for slashes with the right pointer variable. 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com> * lang.c (lang_decode_option): Update -Wunused flags by calling set_Wunused. * decl.c (poplevel): Replace warn_unused with warn_unused_label. 2000-05-09 Zack Weinberg <zack@wolery.cumb.org> * check_init.c (check_init): Constify local char *. * class.c (push_class): Constify local char *. * java_tree.h: Update prototypes. * jcf-io.c (open_class): Constify filename parameter and return value. (find_class): Remove redundant string copy. Cast return from open_class. * jcf-parse.c (read_class, parse_class_file, yyparse): Constify local char *. * jcf-write.c (generate_bytecode_insns, generate_classfile): Constify local char *. * jcf.h (JCF): Constify filename and classname. (JCF_FINISH): Cast args to FREE to char * when appropriate. * lang.c (init_parse): Constify parameter and return value. * lex.c (java_get_line_col): Constify filename parameter. * parse.h: Constify parser_ctxt.filename. Update prototypes. * parse.y (java_parser_context_suspend, issue_warning_error_from_context, safe_layout_class): Constify local char *. * parse.c: Regenerate. 2000-05-08 Tom Tromey <tromey@cygnus.com> * expr.c (build_jni_stub): Cache the result of _Jv_LookupJNIMethod. 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (predef_filenames_size): Now 7. (predef_filenames): New seventh entry. 2000-05-04 Tom Tromey <tromey@cygnus.com> * boehm.c (mark_reference_fields): Don't mark RawData fields. Keep track of when we've seen a reference field after a non-reference field. (get_boehm_type_descriptor): Handle case where we see non-reference fields but no trailing reference field. * decl.c (rawdata_ptr_type_node): Define. (init_decl_processing): Initialize rawdata_ptr_type_node. * java-tree.h (rawdata_ptr_type_node): Declare. 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format specifiers in calls to fprintf. 2000-05-03 Andrew Haley <aph@cygnus.com> * expr.c (build_java_jsr): Use emit_jump, not expand_goto. * javaop.h (WORD_TO_INT): New function. (IMMEDIATE_s4): Use WORD_TO_INT. * jcf.h (JPOOL_INT): Ditto. * gjavah.c (decode_signature_piece): Don't treat `$' as namespace separator. 2000-04-19 Tom Tromey <tromey@cygnus.com> * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE on native function. * jcf-parse.c (parse_class_file): Call build_jni_stub for native JNI methods. * expr.c (build_jni_stub): New function. * lang-specs.h: -fjni and -femit-class-file are incompatible. * parse.c: Rebuilt. * parse.y (java_complete_expand_methods): Expand a native method and call build_jni_stub if -fjni given. * lang-options.h: Document -fjni. * lang.c (flag_jni): New global. (lang_f_options): Added `jni' entry. * java-tree.h (soft_lookupjnimethod_node, soft_getjnienvnewframe_node, soft_jnipopsystemframe_node): Declare. (flag_jni): Declare. (build_jni_stub): Declare. (struct lang_decl): Added `native' flag. (METHOD_NATIVE): Redefined to use `native' field of lang specific structure. * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node, soft_jnipopsystemframe_node): New globals. (init_decl_processing): Set them. _Jv_InitClass only takes one argument. * java-tree.def: Put into `C' mode. 2000-04-27 Tom Tromey <tromey@cygnus.com> Fix for PR gcj/2: * expr.c (expand_invoke): Generate check to see if object pointer is null in nonvirtual invocation case. * java-tree.h (soft_nullpointer_node): Declare. * decl.c (soft_nullpointer_node): New global. (init_decl_processing): Initialize soft_nullpointer_node. * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final' or `private' methods. (patch_invoke): Handle INVOKE_NONVIRTUAL case. 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (complete_start_java_method): Don't call _Jv_InitClass from <clinit> 2000-04-26 Tom Tromey <tromey@cygnus.com> * zextract.c (find_zip_file_start): New function. (read_zip_archive): Use it. 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS. 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (common_enclosing_context_p): New function. * java-tree.h (common_enclosing_context_p): Added prototype. * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow classes sharing an outer context with the current instance. * parse.y (build_access_to_thisn): Fixed leading comment. (verify_constructor_super): New local `supper_inner'. Skip enclosing context argument in the case of inner class constructors. (patch_method_invocation): Insert proper context as second parameter to pure inner class constructor super invocations. 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (end_class_declaration): Reset the interface number counter. 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (source_start_java_method): Deleted unnecessary code. (patch_method_invocation): Fixed comment. 2000-04-24 Robert Lipe <robertlipe@usa.net> * parse.h (_jdep): Member `kind' now ENUM_BITFIELD. 2000-04-23 Tom Tromey <tromey@cygnus.com> * boehm.c (mark_reference_fields): Use int_byte_position. 2000-04-22 Tom Tromey <tromey@cygnus.com> * boehm.c (mark_reference_fields): Only call byte_position on non-static fields. 2000-04-22 Tom Tromey <tromey@cygnus.com> * boehm.c (mark_reference_fields): Added `last_view_index' argument. Use DECL_FIELD_OFFSET to determine field's offset. 2000-04-20 Mo DeJong <mdejong@cygnus.com> * parse.h (INTERFACE_INNER_MODIFIERS): New macro. * parse.y (check_class_interface_creation): Fixed comments. Select permitted modifiers for (inner) interfaces. Changed error message to report rejected modifiers used with local classes. 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes of directly inherited type considered in scope. * parse.y (do_resolve_class): Search inherited classes for inner classes. 2000-04-20 Tom Tromey <tromey@cygnus.com> * parse.y (not_accessible_p): Use member's class, not current class, when doing inheritance check for protected reference. Fixes PR gcj/124. 2000-04-20 Jason Schroeder <shrode@subnature.com> * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction. 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (lookup_field_wrapper): Search for final local aliases. (resolve_expression_name): Let lookup_field_wrapper search for final local aliases. Force the value of `name' if one is found. (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have an expression name. Fixed comments. 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (yyerror): `msg' can be null, don't use it in that case. 2000-04-19 Tom Tromey <tromey@cygnus.com> * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop. 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'. 2000-04-18 Tom Tromey <tromey@cygnus.com> PR gcj/211: * gjavah.c (utf8_cmp): Changed return value. (cxx_keyword_subst): Handle all C++ keywords. Allocate new return result. (cxx_keywords): New global. (get_field_name): Handle new result of cxx_keyword_subst. (print_method_info): Likewise. 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz> * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names with a newline, for CNI. (print_stub_or_jni): Print a space or newline before method name for CNI as well as JNI. (print_cxx_classname): Don't write leading "::" in CNI stub method. (process_file): Include gcj/cni.h if generating CNI stubs. 2000-04-16 Tom Tromey <tromey@cygnus.com> * gjavah.c (decompile_method): Use print_field_name. Fixes PR gcj/205. 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_expand_classes): Reverse the package list once. (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string reduction. (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of the `==' and `!=' operators. 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_bytecode_insns): At invocation time, always relate an interface method to the type of its selector. 2000-04-05 Tom Tromey <tromey@cygnus.com> Fix for PR gcj/2: * expr.c (expand_invoke): Generate check to see if object pointer is null in nonvirtual invocation case. * java-tree.h (soft_nullpointer_node): Declare. * decl.c (soft_nullpointer_node): New global. (init_decl_processing): Initialize soft_nullpointer_node. * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final' or `private' methods. (patch_invoke): Handle INVOKE_NONVIRTUAL case. 2000-04-05 Tom Tromey <tromey@cygnus.com> Fix for PR gcj/140: * parse.y (check_final_assignment): Recognize assignments to the `length' field of an array when generating class files. 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (decl_hash): Prototype removed. (decl_compare): Likewise. 2000-04-05 Tom Tromey <tromey@cygnus.com> * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter. * parse.y (check_modifiers_consistency): Check for final/volatile clash. Fixes PR gcj/164. 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash', made global. (java_hash_compare_tree_node): Renamed from `decl_compare, made global. (add_method_1): Use `java_hash_hash_tree_node' and `java_hash_compare_tree_node'. * java-tree.h: (java_hash_hash_tree_node): Prototyped. (java_hash_compare_tree_node): Likewise. * parse.y (find_applicable_accessible_methods_list): Create, delete and use a hash table to remember already searched interfaces. 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu> * jcf-depend.c (add_entry): Fixed bug where list was always replaced with latest entry. 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * boehm.c (mark_reference_fields, set_bit): Prototype. (set_bit): Un-ANSI-fy definition. * class.c (init_test_hash_newfunc, decl_hash, decl_compare): Prototype. * decl.c (emit_init_test_initialization): Likewise. * gjavah.c (jni_print_char): Likewise. * parse.y (create_new_parser_context): Likewise. 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000 patch missing hunk. Fixed indentation. 2000-03-30 Tom Tromey <tromey@cygnus.com> * gjavah.c (D_NAN_MASK): Only define as word-reversed when HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree. 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse-scan.y (pop_class_context): Reset `inner_qualifier_length' when negative *before* using it as an array index. * ChangeLog: Fixed typo. 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse-scan.y (pop_class_context): Reset `inner_qualifier_length' to 0 when it reaches -1. 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-parse.c (get_constant): Properly cast `num' during the invocation of `add_double'. * jcf-write.c (push_long_const): Properly cast `lo' before comparing it to short bounds. * parse-scan.y (interface_declaration:): Rule re-arrange so that `interface_body:' is reduced after the current interface is pushed. 2000-03-26 Tom Tromey <tromey@cygnus.com> * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each Java-specific `-f' option. 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * decl.c (init_decl_processing): Only call initialize_sizetypes once. Adjust order of making types. Make bitsize_*_node values. 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * class.c (make_field_value): Use byte_position. * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (check_abstract_method_definitions): New local `end_type_reached'. Make sure we also consider `end_type'. (java_check_abstract_method_definitions): Make sure we eventually consider `java.lang.Object'. (maybe_use_access_method): Don't use access method if not in the context of a pure inner class or if the method's context is right. (find_applicable_accessible_methods_list): New static flag `object_done'. Don't search abstract classes as interfaces. Fixed indentation. Fixed the `java.lang.Object' only search. Search class interface(s) first, then fully search enclosing contexts. (find_most_specific_methods_list): Pick the closest candidate when they're all abstract. 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR: properly initialize `finished_label'. Don't emit gotos for empty try statements. 2000-03-19 Martin v. Loewis <loewis@informatik.hu-berlin.de> * except.c (emit_handlers): Clear catch_clauses_last. 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (check_method_types_complete): New function. (create_class): Reset anonymous class counter only when seeing an non inner classe. (java_complete_class): JDEP_METHOD: Don't recompute signature if incomplete. 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (build_static_ref): Fixed indentation in comment. * java-tree.def (TRY_EXPR): Fixed typo in name. (CLASS_LITERAL): Likewise. * java-tree.h: (TYPE_DOT_CLASS): New macro. (struct lang_type): New field `dot_class'. * jcf-write.c (generate_bytecode_insns): Fixed error message. (generate_classfile): Method `class$' is synthetic. * parse.y (build_do_class_method): New function. (build_dot_class_method_invocation): Likewise. (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary. (resolve_qualified_expression_name): Handle CLASS_LITERAL. (qualify_ambiguous_name): Likewise. (patch_incomplete_class_ref): Invoke synthetic method if necessary. (build_try_statement): Fixed leading comment. 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * class.c (make_field_value): Properly handle sizes. (get_dispatch_vector): Use tree_low_cst and host_integerp. (layout_class_method): Count using trees. * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node. * expr.c (java_array_data_offset): Use int_bit_position. (build_newarray, build_anewarray): Use host_integerp and tree_low_cst. (build_invokevirtual): Use tree_low_cst and do computations with trees. 2000-03-16 Tom Tromey <tromey@cygnus.com> * lang.c (flag_hash_synchronization): New global. (lang_f_options): Added `hash-synchronization'. * lang-options.h: Mention -fhash-synchronization. * java-tree.h (flag_hash_synchronization): Declare. * expr.c (java_lang_expand_expr): Only push `sync_info' value when hash table synchronization is disabled. * decl.c (init_decl_processing): Only push `sync_info' value when hash table synchronization is disabled. * class.c (make_class_data): Only push `sync_info' field when hash table synchronization is disabled. Removed dead code. 2000-03-16 Tom Tromey <tromey@cygnus.com> * lang.c (lang_decode_option): Enable -Wunused when -Wall given. 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous classes. * parse.y (patch_method_invocation): Handle anonymous classes creation in static context. 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro. * parse.y (resolve_qualified_expression_name): Use it. (patch_method_invocation): Likewise. 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (register_incomplete_type): JDEP_ENCLOSING set depending on the type of dependency which dictates what the current class is. (unresolved_type_p): Resolved types limited to the current class. 2000-03-15 Tom Tromey <tromey@cygnus.com> * decl.c (init_decl_processing): Set type of `sync_info' to be pointer to Object. * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'. Correctly compute bit number for current slot. Zero `high' and `low' in DS_LENGTH case. Don't skip inherited fields. Use mark_reference_fields. (mark_reference_fields): New function. 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (register_incomplete_type): Fixed initialization of JDEP_ENCLOSING. 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse-scan.y (inner_qualifier, inner_qualifier_length): New static globals. (push_class_context, pop_class_context): New function. (class_body:): Call pop_class_context. (interface_body:): Likewise. (INNER_QUALIFIER): New macro. (report_class_declaration): Changed output format and use INNER_QUALIFIER. Call push_class_context. 2000-02-14 Andrew Haley <aph@cygnus.com> * check-init.c (check_init): Add new cases for unary and binary tree nodes. 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_package): Set `next' once a type name has been progressively discovered. (resolve_qualified_expression_name): Propagate resolution only if there are remaining qualifiers. Take into account `q' might have been cleared after re-qualification. * parse.y (patch_method_invocation): New local `resolved'. Section dealing with qualified expression rewritten to use resolve_field_access. 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (PUSH_CPC): Fixed indentation. (DEBUG_CPC): New macro. (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT, SET_CPC_INSTANCE_INITIALIZER_STMT): New macros. * parse.y (class_body_declaration:): Use SET_CPC_INSTANCE_INITIALIZER_STMT. (method_declaration:): Check for null current_function_decl. (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT. (java_parser_context_pop_initialized_field): Better handling of empty lists. (maybe_make_nested_class_name): Mark nested class name as qualified when necessary. (end_class_declaration): Don't call java_parse_context_resume when one or more error occurred. (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT. (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and SET_CPC_INITIALIZER_STMT. (method_header): Check for inner classes declaring static methods. (resolve_qualified_expression_name): Handle situation where `this' is implied. 2000-03-13 Hans Boehm <boehm@acm.org> * typeck.c (build_prim_array_type): Correctly set the high word too. 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_complete_expand_methods): Leave <clinit> out of ordinary methods. (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the list of methods for interfaces. 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (qualify_ambiguous_name): Properly handle expressions using `null'. 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (check_final_assignment): Extended to process COMPOUND_EXPR. (patch_assignment): Have check_final_assignment called only once. 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (IS_INIT_CHECKED): New flag. * check-init.c (check_init): Test and set IS_INIT_CHECKED. * parse.y (patch_string): Call force_evaluation_order on the completed string concatenation tree. * expr.c (force_evaluation_order): Call force_evaluation_order on function's arguments too. 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * decl.c (emit_init_test_initialization): Mark KEY as unused. * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. (build_anewarray): Likewise. * parse.y (patch_newarray): Likewise. * parse.c: Regenerated. 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz> * decl.c (init_decl_processing): Added new class fields `depth', `ancestors', and `idt' to class_type_node. Use _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node. * class.c (make_class_data): Push initial values for new fields. * java-tree.h: Updated prototype for `build_invokeinterface'. * expr.c (build_invokeinterface): Changed parameters to accept `method' tree. Calculate index of `method' in its declaring interface. Build call to _Jv_LookupInterfaceMethodIdx. (expand_invoke): Call `build_invokeinterface' with new parameters. * parse.y (patch_invoke): Call `build_invokeinterface' with new parameters. 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz> * typeck.c (lookup_do): Search superinterfaces first when looking up an interface method. From Godmar Back <gback@cs.utah.edu> 2000-03-06 Tom Tromey <tromey@cygnus.com> * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c. 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (lookup_argument_method2): Declared. (safe_layout_class): Prototype moved from parse.h. * parse.h (safe_layout_class): Prototype moved to java-tree.h. * parse.y (java_check_regular_methods): Local `super_class' gone. Call lookup_argument_method2 instead of lookup_argument_method. Perform modifier match for methods found declared in implemented interfaces. Fixed indentation problem. Overriding/hiding error report to take place only for methods found in classes. * typeck.c (lookup_argument_method): Changed leading comment. Re-written by calling lookup_do. (lookup_argument_method2): New function. (lookup_java_method): Re-written by calling lookup_do. (lookup_do): New function. 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (check_init): Removed dead code. Handle (blank) final variables. * parse.y (declare_local_variables): New local `final_p', set it and use it to initialize LOCAL_FINAL. (check_final_assignment): Only check FIELD_DECLs. 2000-02-17 Tom Tromey <tromey@cygnus.com> * Makefile.in (JAVA_OBJS): Added boehm.o. (boehm.o): New target. * Make-lang.in (JAVA_SRCS): Added boehm.c. * java-tree.h (flag_use_boehm_gc): Declare. (get_boehm_type_descriptor): Declare. * lang.c (lang_f_options): Added `use-boehm-gc'. (flag_use_boehm_gc): New global. * lang-options.h: Added -fuse-boehm-gc. * boehm.c: New file. * class.c (get_dispatch_table): If class uses a Boehm type descriptor, put it in the vtable. (make_class_data): Removed dead code. 2000-03-03 Per Bothner <per@bothner.com> * decl.c (init_decl_processing): Initialize sizetype properly. 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (LOCAL_CLASS_P): New flag usage and macro. (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros. * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro. * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise. (jcf_parse): New local `current'. Load innerclasses seen in outer context being processed. * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro. * jcf-write.c (append_innerclasses_attribute): New function. (append_innerclasses_attribute_entry): Likewise. (get_access_flags): Handle static classes. Set anonymous and local classes to be private. (generate_classfile): Attribute count adjusted. Call append_innerclasses_attribute. * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use PURE_INNER_CLASS_TYPE_P. * parse.y (parser_qualified_classname): New parameter `is_static', produce non qualified name accordingly. (block_statement:): Set LOCAL_CLASS_P when declaring local class. (create_interface): Added argument to parser_qualified_classname. (create_class): Added argument to parser_qualified_classname. Setup alias for top level classes. Use PURE_INNER_CLASS_DECP_P. (add_inner_class_fields): Fixed indentation. (method_declarator): Use PURE_INNER_CLASS_DECP_P. (method_declarator): Fixed typo in comment. (craft_constructor): Use PURE_INNER_CLASS_DECP_P. (build_current_thisn): Likewise. (patch_method_invocation): Likewise. 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de> * decl.c (current_function_decl): Move to toplev.c. 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * java-tree.h (LABEL_PC): Relect name changes in ../tree.h. (DECL_BIT_INDEX): Use underlying representation. * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise. 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * expr.c (build_java_ret): Pass proper type to size_binop. 2000-02-25 Anthony Green <green@cygnus.com> * expr.c (build_class_init): Mark the decl to be ignored by check_init. * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c * check-init.c: Move DECL_BIT_INDEX to java-tree.h * class.c (init_test_hash_newfunc): New function. (decl_hash): New function. (decl_compare): New function. * decl.c (emit_init_test_initialization): New function. (complete_start_java_method): Traverse the init test hashtable, calling emit_init_test_initialization. (always_initialize_class_p): Define. * expr.c (build_class_init): Use initialization tests when emitting class initialization code. (always_initialize_class_p): Declare. * jcf-parse.c (parse_class_file): Set always_initialize_class_p to 1. * java-tree.h: Include hash.h. (DECL_FUNCTION_INIT_TEST_TABLE): Define. (struct lang_decl): Add init_test_table field. (init_test_hash_entry): Define. 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * gjavah.c (main): Avoid using `argi' to report unimplemented options. 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR: initialize locals to avoid warnings. Local `exception_type' moved into if statement. 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_expression_name): Use `orig' as a second argument to resolve_field_access. (resolve_field_access): Removed unnecessary code when dealing with static fields. 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (push_super_field): Don't push the field twice. * jcf-parse.c (parse_source_file): Call java_reorder_fields. * parse.h (java_reorder_fields): Prototyped. * parse.y (java_reorder_fields): New function. (java_layout_class): Simplified not to worry about re-ordering. 2000-02-23 Tom Tromey <tromey@cygnus.com> * gjavah.c (print_name): In JNI case, correctly quote string. (print_method_info): Don't handle overrides in JNI mode. 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned value type set to `boolean_type_node'. 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de> * jcf-dump.c (main): Test for correct condition after output file creation. 2000-02-19 Anthony Green <green@cygnus.com> * jcf-depend.c (add_entry): Fix test for first list entry. 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT. * constants.c (build_constants_constructor): Likewise. 2000-02-19 Anthony Green <green@cygnus.com> * jcf-depend.c (add_entry): Add entries to the end of the list. 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi> * decl.c (INT_TYPE_SIZE): Define if necessary. (expand_java_return): Handle the case of a native integer smaller than a JVM integer. 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de> * gjavah.c (help): Use GCCBUGURL. * jv-scan.c (help): Likewise. * jcf-dump.c (help): Likewise. 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_bytecode_insns): Don't generate empty `finally' clauses. 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-parse.c (load_class): Call `fatal' if no file containing the target class are found. 2000-02-16 Zack Weinberg <zack@wolery.cumb.org> * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on lex.c, lex.h, and PARSE_H to... (parse.o, parse-scan.o): ...here, respectively. * lex.c: Split out code that may trigger SIGFPE from yylex() to its own function. * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value. 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h. 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (outer_field_access_p): Stop in time when outer contexts are exhausted. (resolve_qualified_expression_name): Properly qualify *everything* after a package.type to be resoled as expression names. (find_applicable_accessible_methods_list): Save/restore `class' to isolate it from a possible outer context search. 2000-02-15 Tom Tromey <tromey@cygnus.com> * gjavah.c (jni_print_char): New function. (print_full_cxx_name): Use it. (decode_signature_piece): Likewise. (print_cxx_classname): Likewise. 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with version.o. (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h. * gjavah.c: Include version.h. * jcf-dump.c: Likewise. * jv-scan.c: Likewise. 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (outer_field_access_fix): First parameter now a tree node. Check for assignment to final. First argument to build_outer_field_access_fix modified to accommodate prototype. (build_outer_field_access): Don't check for assignment to final here. (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node' possibly returned by outer_field_access_fix. Changed outer_field_access_fix's first argument. (check_final_assignment): $finit$'s context is OK. (patch_unaryop): Use node instead of its line/column value when calling outer_field_access_fix. 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (interface_declaration:): No longer tagged <node>. Re-installed default action. (class_member_declaration:): Handle inner interfaces. (interface_member_declaration): Handle inner interfaces and classes. (create_interface): Push error if one seen. Suspend parsing context when processing an inner interface. (register_fields): Inner class static field limitations not to apply to inner interfaces. 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-parse.c (load_class): Update `java_error_count' when a class' file can't be found. (parse.y): Avoid (byte)code generation when errors seen. 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal' decodes a valid node. (patch_binop): Handle TRUNC_DIV_EXPR. 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_package): New local `acc'. Try to progressively build and guess a package and type name. 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (find_applicable_accessible_methods_list): Load and layout the search class if necessary. (java_complete_tree): Keep to original type of the folded initial value. 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT. Generate error message if circularity is detected. New static local `list'. * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. * * jcf-write.c (generate_bytecode_insns): Very simply handle SAVE_EXPR. * parse.y (java_check_circular_reference): Use `cyclic_inheritance_report' during report, if necessary. (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid walking NEW_ARRAY_INIT twice. 2000-02-09 Tom Tromey <tromey@cygnus.com> * parse.y (check_class_interface_creation): Allow inner classes to be `private' or `protected', check modifiers' consistency. Prevent block local classes from bearing any modifiers. 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * except.c (check_start_handlers): Re-add prototype lost in last patch. (maybe_start_try): Remove excess argument to `check_start_handlers'. 2000-02-09 Andrew Haley <aph@cygnus.com> * decl.c (clear_binding_level): Remove excess initializer. (maybe_poplevels): Remove unused variable. (force_poplevels): Ditto. (struct binding_level): Add comment. 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_classfile): Don't consider pre-initialization with reference value (use <clinit> instead.) * parse.y (java_fix_constructors): No generated constructor for interfaces. (build_outer_field_access): Removed debug message. (outer_field_expanded_access_p): Adapted to bytecode generation. (build_outer_field_access_method): Use fix_method_argument_names. (build_outer_method_access_method): Fixed indentation. Added comment. Handle access method generation for static and also void methods. (build_access_to_thisn): Inserted debug message. (maybe_build_thisn_access_method): Use fix_method_argument_names. (resolve_qualified_expression_name): Fixed comment. (not_accessible_p): Adapted to bytecode generation. Added comment. (patch_method_invocation): Added comment. (maybe_use_access_method): Fixed leading comment. Handle static methods. (java_complete_lhs): Don't shortcut handling of initialized upon declaration String type static fields when generating bytecode. (patch_unaryop): Handle outer field access when generating bytecode. 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (FIELD_THISN): New macro. * jcf-write.c (append_synthetic_attribute): New function. (generate_classfile): Set "Synthetic" attribute on this$<n>, val$<name> fields, access$<n> and $finit$ methods. Fixed indentation. * parse.y (add_inner_class_fields): Set FIELD_THISN for created this$<n> fields. (build_outer_field_access): Turned on access functions usage and generation when compiling to bytecode. (maybe_use_access_method): Likewise. 2000-01-25 Andrew Haley <aph@cygnus.com> * java-except.h (struct eh_range): Add `expanded' field. (maybe_start_try): Add end_pc arg. (maybe_end_try): Ditto. * java-tree.h (force_poplevels): new function. * expr.c (expand_byte_code): Don't call maybe_start_try or maybe_end_try. * except.c (add_handler): Reset expanded. (expand_start_java_handler): Set expanded. (check_start_handlers): Don't expand a start handler that's already been expanded. (maybe_start_try): Add end_pc arg. Only expand a handler which ends after end_pc. (expand_end_java_handler): call force_poplevels. (force_poplevels): new function. * decl.c (binding_level): Add start_pc of binding level. (maybe_pushlevels): Call maybe_start_try when pushing binding levels. (maybe_poplevels): Call maybe_end_try when popping binding levels. (LARGEST_PC): Define. (clear_binding_level): Use LARGEST_PC. * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define. * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define. (binding_depth, is_class_level, current_pc): new variables. (struct binding_level): ditto. (indent): new function. (push_jvm_slot): add debugging info. (maybe_pushlevels): ditto. (maybe_poplevels): ditto. (pushlevel): ditto. (poplevel): ditto. (start_java_method): ditto. (give_name_to_locals): comment only. * except.c (binding_depth, is_class_level, current_pc): new variables. (expand_start_java_handler): add debugging info. (expand_end_java_handler): ditto. 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gjavah.c (overloaded_jni_method_exists_p): Add prototype. (print_name_for_stub_or_jni, process_file): Constify a char*. 2000-02-03 Tom Tromey <tromey@cygnus.com> * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input. 2000-01-31 Scott Bambrough <scottb@netwinder.org> * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1. 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code. * java-tree.h (TYPE_II_STMT_LIST): New macro. (struct lang_type): New field `ii_block'. * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST. * parse.h (struct parser_ctxt): New field `instance_initializers'. (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New macros. * parse.y (add_instance_initializer): New function. (in_instance_initializer): New static global. (class_body_declaration:): Link instance initializer block. (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT. (array_creation_expression:): Remove unused local. (java_parser_context_push_initialized_field): Fixed leading comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST. (java_parser_context_pop_initialized_field): Likewise. (add_inner_class_fields): Use CPC_INITIALIZER_STMT. (register_fields): Use CPC_STATIC_INITIALIZER_STMT and CPC_INITIALIZER_STMT. (fix_constructors): New local `class_type'. Use it. Call add_instance_initializer. (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR. (patch_return): Forbid return in instance initializers. (patch_throw_statement): Enforce exception handling in the context of instance initializers. 2000-02-03 Tom Tromey <tromey@cygnus.com> * Make-lang.in (java.mostlyclean): Remove executables in `mostlyclean'. 2000-01-31 Scott Bambrough <scottb@netwinder.org> * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1. (java_float_finite): Convert to use union Word from javaop.h. (java_double_finite): Convert to use union DWord from javaop.h. 2000-02-02 Tom Tromey <tromey@cygnus.com> * gjavah.c (options): Added `jni' entry. (help): Document -jni. (flag_jni): New global. (process_file): Handle JNI output. Don't print text from -prepend, -add, etc, when generating stubs. Only remove `.class' suffix if it actually exists. (main): Create a `.c' file when run with `--jni --stubs'. Create correct output file name with `--jni'. (print_include): Mangle header name differently in JNI case. (HANDLE_METHOD): In JNI mode, call print_method_info to generate method list. (print_method_info): Handle JNI case. Put signature info into method name. Handle case when STREAM is NULL. (print_name_for_stub_or_jni): New function. (print_stub_or_jni): Renamed from `print_stub'. Handle JNI. (print_cxx_classname): Handle JNI. (print_full_cxx_name): Likewise. (decode_signature_piece): Likewise. (overloaded_jni_method_exists_p): New function. (struct method_name): Added `signature' and `sig_length' fields. (HANDLE_END_FIELD): Do nothing in JNI mode. 2000-02-02 Tom Tromey <tromey@cygnus.com> * jv-scan.c: Include version.c, <getopt.h>. (LONG_OPT, OPT_HELP, OPT_VERSION): New macros. (options): New array. (usage): New function. (version): New function. (main): Use getopt_long to parse command line. * jcf-dump.c: Include version.c, <getopt.h>. (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION, OPT_JAVAP): New macros. (options): New array. (usage): Return `void'. Changed message. (help): New function. (version): New function. (main): Use getopt_long_only to parse command line. * gjavah.c: Include <getopt.h>. (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP, OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M, OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros. (options): New array. (java_no_argument): Removed. (help): Updated with missing options. (main): Use getopt_long_only to parse command line. (usage): Changed message. 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code. * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER): New access macros. * parse.y (array_creation_expression:): Handle anonymous arrays. (build_array_from_name): Don't set `ret_name' if null. (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR. (qualify_ambiguous_name): Likewise. (java_complete_expand_class): Likewise. 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo. * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro. (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise. (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P. (AIPL_FUNCTION_FINIT_INVOCATION): Replaces AIPL_FUNCTION_COMPLETED_INVOCATION. (AIPL_FUNCTION_CTOR_INVOCATION): Replaces AIPL_FUNCTION_INVOCATION_READY. (AIPL_FUNCTION_DECLARATION): New enum entry. * parse.y (reorder_static_initialized): New function. (java_parser_context_pop_initialized_field): Use it. (add_inner_class_fields): Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment augmented. Install marker after last alias initializer, if any. (generate_finit): Fixed typo. Don't try to retain only the used fields. (method_header): Compute and set DECL_FUNCTION_NAP. (method_declarator): Fixed comment. Insert alias initializer in parameter list. (build_alias_initializer_parameter_list): Fixed leading comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. (java_complete_expand_class): Code to retain only used aliases removed. (java_complete_expand_methods): New local `first_decl'. Generate $finit$ first, then expand the constructors, regular methods and <clinit>. (java_complete_expand_method): Don't report error on missing return statement if previously detected bogus. (fix_constructors): Don't patch constructor parameters list. (patch_method_invocation): Use new AIPL enum values. Reverse alias initializer list for anonymous classes. 2000-01-30 Anthony Green <green@redhat.com> * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to determine how many stack slots to pop. 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better error handling/recovery. * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment. 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS, FIELD_LOCAL_ALIAS_USED): New macros. (DECL_FUNCTION_NAP): New macro. (struct lang_decl): New field `nap'. (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros. (struct lang_type): New fields `finit_stmt_list' and `clinit_stmt_list'. (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST. * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro. (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS, UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros. (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION, AIPL_FUNCTION_INVOCATION_READY): New enum fields. (BUILD_THROW): Macro line separator re-indented. * parse.y (end_class_declaration): New function. (maybe_generate_pre_expand_clinit): New name for java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST, pre-expand static fields. (maybe_generate_clinit): Function deleted. (check_for_static_method_reference): Prototype's parameter list indented. (generate_finit): New name for maybe_generate_finit. Changed leading comment. Function rewritten to use TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list. (build_alias_initializer_parameter_list): New function. (java_parser_context_pop_initialized_field): Likewise. (add_inner_class_fields): Likewise. (type_declaration:): Call end_class_declaration. (class_member_declaration:): Likewise. (formal_parameter_list:): Fixed typos. (formal_parameter:): Use ARG_FINAL_P to mark created tree list element. Improved error handling. (block_statement:): Call end_class_declaration. (anonymous_class_creation:): Likewise. (create_anonymous_class): Fixed comments. (create_class): Call add_inner_class_fields. (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P. (method_header): Use MARK_FINAL_PARMS. (finish_method_declaration): Use UNMARK_FINAL_PARMS. (method_declarator): Propagate final argument flag. (craft_constructor): New local `artificial'. Call build_alias_initializer_parameter_list. Use CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP. (source_start_java_method): Mark parm decls with LOCAL_FINAL if necessary. (complete_expand_class): Get rid of unused outer context local alias fields. (java_complete_expand_methods): Fixed leading comment. Generate/pre-expand <clinit> first. Changed method expansion order to regular, $finit$, constructors, <clinit>. (java_complete_expand_method): Set current_function_decl. (fix_constructors): Fix constructor parameter list to account for outer context local alias initializers. (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS. (resolve_expression_name): Lookup outer context local aliases. New local `access', use it. (patch_method_invocation): Patch inner class ctor invocation with outer context local aliases initialization values. $finit$ invocation patching now includes things generated with build_alias_initializer_parameter_list. (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS. (build_super_invocation): Likewise. (patch_assignment): Changed comment. 2000-01-27 Andrew Haley <aph@cygnus.com> * jcf-write.c (emit_goto): RESERVE 3 bytes for insn. (emit_if): Ditto. (emit_jsr): Ditto. 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string concatenation. (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args. * parse.y (register_fields): Don't pass a format specifier to OBSOLETE_MODIFIER_WARNING. (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format specifier. (check_modifiers): Change function into a macro. (check_class_interface_creation): Pass a literal format string. 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * buffer.h: PROTO -> PARAMS. * check-init.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * convert.h: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * gjavah.c: Likewise. * java-except.h: Likewise. * java-tree.h: Likewise. * jcf-depend.c: Likewise. * jcf-dump.c: Likewise. * jcf-parse.c: Likewise. * jcf-path.c: Likewise. * jcf-reader.c: Likewise. * jcf-write.c: Likewise. * jcf.h: Likewise. * jv-scan.c: Likewise. * jvgenmain.c: Likewise. * jvspec.c: Likewise. * lang.c: Likewise. * lex.c: Likewise. * lex.h: Likewise. * parse-scan.y: Likewise. * parse.h: Likewise. * parse.y: Likewise. * typeck.c: Likewise. * verify.c: Likewise. * xref.c: Likewise. * xref.h: Likewise. * zextract.c: Likewise. * zipfile.h: Likewise. 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC. (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF. * constants.c (build_constant_data_ref): Check for cached current_constant_pool_data_ref. Cache current_constant_pool_data_ref in TYPE_CPOOL_DATE_REF. * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF, MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros. (struct lang_type): New fields `cpool' and `cpool_data_ref'. (LOCAL_FINAL): New macro. * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing constant pool -- don't try to reuse. (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate TYPE_LANG_SPECIFIC. (find_in_current_zip): Use TYPE_JCF. * parse.h (java_check_final): Prototype removed. * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch. (maybe_create_class_interface_decl, check_class_interface_creation): Likewise. (java_expand_finals): Function removed. (class_declaration:): Reversed Jan 12, 2000 extra argument patch. (block_statement:): Fixed comment. (anonymous_class_creation:): Likewise. (check_class_interface_creation): Reversed Jan 12, 2000 extra argument patch. (check_class_interface_creation): Loosened error report on (inner) public class declarations. CPC_INNER_P replaces GET_CPC_LIST. (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch. (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra argument patch. (create_interface): Likewise. (anonymous_class_counter): New static global. (create_anonymous_class): Reversed Jan 12, 2000 extra argument patch. Fixed comments. (create_class): Reversed Jan 12, 2000 extra argument patch. Reset anonymous_class_counter when declaring a toplevel class. (craft_constructor): Fixed constructor name when handling anonymous classes. Anonymous class constructors to feature hidden this$<n> parameter. (java_fix_constructors): Added comment. (java_check_final): Function removed. (java_complete_expand_methods): Fixed comment. Don't generate class data, save its outgoing constant pool instead. (verify_constructor_super): Skip anonymous class constructor hidden this$<n> parameter. (java_expand_classes): New local `saved_ctxp'. Removed call to java_expand_finals and java_check_final. Expand anonymous class constructors. Generate class data. (build_super_invocation): Skip anonymous class hidden this$<n> parameter. * typeck.c (build_java_signature): Use TYPE_SIGNATURE and MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC. (set_java_signature): Likewise. 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de> * gjavah.c: Delete ACC_VISIBILITY define. * jcf.h: Add ACC_VISIBILITY define. * parse.y: final: rule tagged <value>. (java_check_regular_methods): Use ACC_VISIBILITY define for default package access check. (local_variable_declaration_statement): Use final: rule. 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de> * parse.y (format_parameter:): Use final: rule instead of modifiers:. (final:): New rule. 2000-01-17 Tom Tromey <tromey@cygnus.com> * gjavah.c (print_field_info): Allow non-static final fields. 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'. * parse.y (patch_anonymous_class): New function. (create_anonymous_class): Register incomplete type when the class/interface to extends/implement isn't known yet. (parser_check_super_interface): Simplify argument to CLASS_INTERFACE. (verify_constructor_super): Tuned error message. 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P. (ANONYMOUS_CLASS_P): New macro. (TYPE_SIGNATURE, TYPE_JCF): New macros. (INNER_CLASS_TYPE_P): Fixed typo in leading comment. * parse.y (create_class): Added leading argument. (maybe_create_class_interface_decl, check_class_interface_creation): Likewise. (craft_constructor): New function. (verify_constructor_super): Added argument in prototype. (class_declaration:): Inserted leading argument. (for_begin:): Use FOR_LOOP_P. (anonymous_class_creation): Create WFL of the anonymous class to instantiate. Call build_new_invocation. Added comments. (check_class_interface_creation): Handle parameter `anonymous' in verbose mode class creation announce. (link_nested_class_to_enclosing): Exclude anonymous classes. (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on anonymous class, even though they appear to have an enclosing context. (create_interface): Pass extra argument to check_class_interface_creation. (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1. (create_class): Call check_class_interface_creation and maybe_create_class_interface_decl with extra new argument. Don't add private this$<n> to anonymous classes. (method_declarator): Insert hidden this$<n> to anonymous class constructors. (java_fix_constructors): Deleted code creating default constructor. Call craft_constructor instead. (java_check_regular_methods): Set `saw_constructor' to 1 for anonymous classes. (fix_constructors): Pass extra argument to verify_constructor_super. (verify_constructor_super): New local `sdecl', use it. Search for matching constructor (possibly featuring arguments) in super class. (lookup_method_invoke): Craft constructor according to arguments list when dealing with anonymous class constructors. (build_super_invocation): Pass arguments to anonymous class super constructors. (search_loop): Use FOR_LOOP_P. (labeled_block_contains_loop_p): Likewise. 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (set_super_info): Set CLASS_STATIC when appropriate. (enclosing_context_p): New function. (get_access_flags_from_decl): Handle CLASS_STATIC. (maybe_layout_super_class): Extra first argument passed to do_resolve_class. (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and ID_INIT_P. * decl.c (access0_identifier_node): New global. (init_decl_processing): access0_identifier_node initialized. (pushdecl): Set DECL_CONTEXT only on non type decls. * expr.c (lookup_field): Lookup inner class fields in enclosing contexts. (expand_invoke): Use ID_INIT_P. (expand_java_field_op): Use DECL_CLINIT_P. * java-tree.def (CLASS_LITERAL): New tree code. * java-tree.h (DECL_FUNCTION_ACCESS_DECL, DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros. (struct lang_decl): New field `inner_access'. (enclosing_context_p): Prototyped. (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P, ID_CLINIT_P): New macros. (CLASS_STATIC): New macro. (CLASS_ACCESS0_GENERATED_P): New macro. (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P, TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P, INNER_CLASS_P): New macros. (DECL_INNER_CLASS_LIST): New macro. * jcf-parse.c (yyparse): Avoid the use of ANSI string concatenation. * jcf-write.c (generate_bytecode_insns): binop: Change the type of the shift value to int. Fixed typo in comment. * lex.c (inst_id, wpv_id): Initialize. * mangle.c (unicode_mangling_length): Take `$' into account. * parse.h (DRECOVER, RECOVER): Terminate properly. (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro. (typedef struct _jdep): New field `enclosing'. (JDEP_ENCLOSING): New macro. (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.) (struct parser_ctxt): New fields `marker_beginning', `marked_end'. (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC, GET_ENCLOSING_CPC_CONTEXT): New macros. (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros. (do_resolve_class): Added extra argument in prototype. * parse.y (resolve_class): Added extra argument in prototype. (maybe_create_class_interface_decl): Likewise. (maybe_use_access_method, build_wfl_wrap): New functions. (java_complete_expand_classes, java_complete_expand_class): Likewise. (java_parser_context_push_initialized_field, java_parser_context_suspend, java_parser_context_resume): Likewise. (maybe_make_nested_class_name, make_nested_class_name, set_nested_class_simple_name_value, link_nested_class_to_enclosing, find_as_inner_class, find_as_inner_class_do, check_inner_class_redefinition, build_thisn_assign, build_current_thisn, build_access_to_thisn, maybe_build_thisn_access_method, build_outer_field_access, build_outer_field_access_methods, build_outer_field_access_expr, build_outer_method_access_method, build_new_access_id, build_outer_field_access_method, outer_field_access_p, outer_field_expanded_access_p, outer_field_access_fix, build_incomplete_class_ref, patch_incomplete_class_ref, create_anonymous_class): Likewise. (inst_id, wpv_id): New static global variables. (synchronized:): New rule, tagged <node>. (type_declaration:): No longer tagged <node>. Call POP_CPC in sub rules. (anonymous_class_creation:): New rule, tagged <node>. (NEW_TK): Tagged <node>. (type_literals, array_type_literal): New rules, tagged <node>. (class_declaration:): Removed action when reducing by class_body: (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value using GET_CPC in sub-rules. (class_member_declaration): Handle inner classes. (method_declaration): When reducing method_header:, reset current_function_decl when appropriate. (method_declarator:): Set the number of formal parameter to 0 for method declared without arguments. (constructor_declarator:): Likewise. (static_initializer:): List of elements kept in a list. (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct use of the keyword `static' for type declarations. (block_statement:): Handle inner class declarations. (primary_no_new_array:): Use type_literals:. Fixed comment. Handle type qualified `this'. (class_instance_creation_expression): Use anonymous_class_creation: to handle inner class instances creation. Handle qualified `new'. (something_dot_new): Added appropriate actions. (create_new_parser_context): New function. (java_push_parser_context, java_parser_context_save_global, java_parser_context_suspend): Use create_new_parser_context. (check_modifiers): Changed leading comment. (check_class_interface_creation): Handle interclasses. (add_superinterfaces): Fixed comment. (create_interface): Build qualified name from the raw_name instead of its matching WFL. Push the initialized fields list. raw_name added as an extra argument to maybe_create_class_interface_decl. (create_class): Build qualified name from the raw_name instead of its matching WFL. Removed assignment to current_parsed_class_un. Call PUSH_ERROR before returning an error. Suspend the current parser context when processing an inner class. Push the initialized fields list. raw_name added as an extra argument to maybe_create_class_interface_decl. Add the private this$<n> field. (duplicate_declaration_error_p): Use GET_CPC when calling find_field. (register_fields): Get the class type from GET_CPC and handle previous errors. Added code to handle the creation of static fields in inner classes. Initialized fields initialization statements kept in a list of lists. (maybe_generate_finit): Initialized fields initialization statements kept in a list of lists. Use GET_CPC. (maybe_generate_clinit): Likewise. (method_header): Use GET_CPC and GET_CPC_UN. (parser_qualified_classname): Handle inner classes. (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC. (java_fix_constructors): Hide pointer to enclosing context instance in constructor list when dealing with inner classes. (jdep_resolve_class): Call resolve_class with extra first argument JDEP_ENCLOSING. (resolve_class): Add enclosing context as a first extra argument to do_resolve_class. (do_resolve_class): Call find_as_inner_class. Handle WFLs properly. (resolve_no_layout): Extra argument added to resolve_class invocation. (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P. (java_get_real_method_name): Use GET_CPC_UN. (check_abstract_method_definitions): Use DECL_CLINIT_P. (java_check_abstract_methods): Handle static method declared in inner classes by an error. (java_check_regular_methods): Use DECL_CLINIT_P. (source_start_java_method): Also set DECL_MAX_LOCALS. (create_artificial_method): Call java_parser_context_save_global and java_parser_context_restore_global instead of saving/restoring the context by hand. (expand_start_java_method): Improved verbose mode message. (java_complete_expand_methods): Fixed leading comment. Use DECL_CLINIT_P. (fix_constructors): Added assignment to this$<n> if necessary. (java_expand_classes): Call java_complete_expand_classes instead of java_complete_expand_methods. (make_qualified_primary): Simplified. (merge_qualified_name): Optimized for missing left or right parts. (resolve_expression_name): Handle access to outer class fields from interclasses. (resolve_qualified_expression_name): New macro RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner classes. Report error on non appropriate qualification of `new'. Handle qualified `this'. (not_accessible_p): Allow access to outer class private fields from inner classes. (patch_method_invocation): Handle method invocations through access methods and inner class constructor invocations. (find_applicable_accessible_methods_list): Search enclosing contexts of an inner class. (search_applicable_methods_list): Fixed typo. (argument_types_convertible): Handle inner class constructors' hidden outer context reference argument. (qualify_ambiguous_name): Handle qualified `this'. (java_complete_lhs): Handle use of field accessed through artificial access methods in various cases of assignments. Handle CLASS_LITERAL node. (check_final_assignment): Use DECL_CLINIT_P. (valid_ref_assignconv_cast_p): Handle the destination being an enclosing context of the source. (patch_unaryop): Handle use of field accessed through artificial access methods. (patch_return): Use DECL_CLINIT_P. (patch_throw_statement): Use DECL_CLINIT_P. (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P. * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and ID_INIT_P. 2000-01-16 Anthony Green <green@cygnus.com> * parse.y (build_string_concatenation): Only use StringBuffer(String) shortcut if String arg is constant. 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_bytecode_insns): binop: Change the type of the shift value to int. Fixed typo in comment. 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu> * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros. * jcf-write.c: Likewise. * parse.y: Likewise. * parse.c: Regenerate. 2000-01-09 Anthony Green <green@cygnus.com> * jcf-write.c (generate_bytecode_insns): Emit invokeinterface bytecodes in the correct order. 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS). 2000-01-06 Anthony Green <green@cygnus.com> * expr.c (java_lang_expand_expr): Switch to permanent obstack before building constant array decl. 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_bytecode_conditional): Fixed indentation in method invocation and typo in conditional expression. (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue the appropriate NOTE_POP. * parse.y (patch_binop): Shift value mask to feature the right type. 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * class.c (assume_compiled, assume_compiled_node): Add static prototype. (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup. * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch. * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN. * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier' to `__modifier' to avoid stringifying it. * parse.y (verify_constructor_circularity): Don't call a variadic function with a non-literal format string. (java_check_abstract_methods): Move unreachable code inside `continue' statement. (lookup_method_invoke): Call xstrdup, not strdup. * expr.c (expand_java_field_op): Avoid the use of ANSI string concatenation. * jcf-parse.c (yyparse): Likewise. * jv-scan.c (main): Likewise. 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string concatenation. * parse.y (synchronized, variable_redefinition_error, check_class_interface_creation, create_interface, create_class, method_header, finish_method_declaration, check_modifiers_consistency, method_declarator, complete_class_report_errors, check_abstract_method_definitions, java_check_regular_methods, check_throws_clauses, java_check_abstract_methods, read_import_dir, check_pkg_class_access, declare_local_variables, fix_constructors, cut_identifier_in_qualified, resolve_expression_name, resolve_qualified_expression_name, patch_method_invocation, java_complete_lhs, patch_assignment, try_builtin_assignconv, patch_binop, patch_array_ref, patch_newarray, build_labeled_block, patch_exit_expr, patch_exit_expr, patch_switch_statement, patch_try_statement, patch_synchronized_statement, patch_throw_statement, check_thrown_exceptions, patch_conditional_expr): Likewise. 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com> * Makefile.in (LIBDEPS): Added gcc's errors.o (../jcf-dump$(exeext):): Link with gcc's errors.o (../gcjh$(exeext):): Likewise. * expr.c (expand_java_NEW): Layout the entire target type instead of laying out its methods only. (lookup_field): Layout the class after having loaded it. * java-tree.h (java_debug_context): Declared. * jcf-io.c (toplev.h): Included. (find_class): Removed assignment to jcf's outofsynch field. Force source file to be read if newer than its matching class file. Tweaked debug messages. * jcf-parse.c (jcf_out_of_synch): Deleted. (read_class): Call to jcf_out_of_synch removed. * jcf.h (typedef struct JCF): Field `outofsynch' deleted. (jcf_out_of_synch): Prototype deleted. * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag', `deprecated' and `class_err': integer turned into bit-fields. New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments. * parse.y (package_list): New global. (package_declaration:): Record newly parsed package name. (extra_ctxp_pushed_p): Static global deleted. (java_parser_context_save_global): Create buffer context for the purpose of saving globals, if necessary. (java_parser_context_restore_global): Pop context pushed for the purpose of saving globals, if necessary. (java_debug_context_do): New prototype and function. (java_debug_context): Likewise. (do_resolve_class): Use already parsed package names to qualify and lookup class candidate. (java_pre_expand_clinit): Removed unnecessary local variable. 1999-12-17 Tom Tromey <tromey@cygnus.com> * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This fixes PR gcj/119. (process_file): Use `\n\' at end of each line in string. 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (expand_invoke): Layout the loaded class before attempting to use it. (expand_java_field_op): Allow final field assignments to take place in $finit$. * typeck.c (convert): Return error_mark_node if expr is null. 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (class_depth): Return -1 if the class doesn't load properly. * expr.c (can_widen_reference_to): Check for errors during depth computation and return 0 accordingly. * jcf-parse.c (parse_source_file): Call java_fix_constructors to create default constructors and add an other error check. * parse.h (java_fix_constructors): Prototyped. * parse.y (java_pre_expand_clinit): Likewise. (build_super_invocation): Re-prototyped to feature one argument. (java_check_circular_reference): Directly use `current'. (java_fix_constructors): New function. (java_check_regular_methods): Don't create default constructors here, but abort if none were found. (java_complete_expand_methods): Pre-process <clinit> calling java_pre_expand_clinit. (java_pre_expand_clinit): New function. (fix_constructors): build_super_invocation invoked with the current method declaration as an argument. (build_super_invocation): Use the context of the processed method decl argument instead of current_class. * typeck.c (lookup_java_method): Take WFLs in method names into account. 1999-12-14 Per Bothner <per@bothner.com> * class.c (make_class_data): flag_keep_inline_functions to keep private methods in the method array. 1999-12-15 Anthony Green <green@cygnus.com> * check-init.c (check_init): Take into account both types of `throw's when checking for uninitialized variables. 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_complete_lhs): Force conversion of array dimensions to int_type_node, that's what runtime's ABI expects. 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third operand of a WFL, until the Java front-end gets fixed with regard to Mark Mitchell's gcc/tree.h patch (1999-12-04.) 1999-12-10 Andrew Haley <aph@cygnus.com> * parse.h (BUILD_THROW): Add support for sjlj-exceptions. decl.c (init_decl_processing): Add _Jv_Sjlj_Throw. expr.c (build_java_athrow): Add support for sjlj-exceptions. java-tree.h: Ditto. jcf-write.c: Ditto. 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (java_lang_expand_expr): Switch to permanent obstack before calling expand_eh_region_start and expand_start_all_catch. * except.c (expand_start_java_handler): Switch to permanent obstack before calling expand_eh_region_start. (expand_end_java_handler): Switch to permanent obstack before calling expand_start_all_catch. 1999-12-5 Anthony Green <green@cygnus.com> * decl.c (init_decl_processing): Mark throw_node as a noreturn function with side effects. (init_decl_processing): Mark all memory allocating DECLs with DECL_IS_MALLOC. 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * except.c (expand_end_java_handler): Call expand_resume_after_catch and end_catch_handler. 1999-11-30 Anthony Green <green@cygnus.com> * verify.c (verify_jvm_instructions): Create new return label chain if non existent (don't rely on the verified state of the jsr target.) 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_bytecode_insns): Fixed indentation for COMPOUND_EXPR and FIX_TRUNC_EXPR cases. * parse.y (patch_assignment): Removed bogus final class test on lhs when checking on whether to emit an ArrayStoreException runtime check. * expr.c (expand_java_arraystore): Likewise. 1999-11-28 Anthony Green <green@cygnus.com> * decl.c (find_local_variable): Reuse single slot decls when appropriate. 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-parse.c (saw_java_source): Global variable removed. (read_class): Don't use `saw_java_source'. Added extra braces. (yyparse): Code setting `saw_java_source' removed. 1999-11-24 Mark Mitchell <mark@codesourcery.com> * except.c (emit_handlers): Zero catch_clauses after emitting them. 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com> * verify.c (merge_type_state): Non verified subroutines being considered more than once to trigger passive type merge. 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE in case of error. Error message tuned. 1999-11-21 Anthony Green <green@cygnus.com> * constants.c (find_methodref_index): Unwrap method names before inserting them in the constant pool. * jcf-parse.c (jcf_parse): Display `interface' when appropriate. * class.c (assume_compiled_node): New typedef. (assume_compiled_tree): New static data. (find_assume_compiled_node): New function. (add_assume_compiled): New function. (assume_compiled): New function. * class.c (make_class_data): Use assume_compiled. (is_compiled_class): Use assume_compiled. * java-tree.h (add_assume_compiled): Declare. * lang.c (lang_decode_option): Parse new options. 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (layout_class): Always convert TYPE_SIZE_UNIT to int_type_node: that's what `_Jv_AllocObject' expects. 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (lookup_method_invoke): Use lang_printable_name to reliably build the type name during error report. Fixes PR gcj/97. 1999-11-09 Tom Tromey <tromey@cygnus.com> * jcf-path.c: Include <sys/stat.h>. (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84. (DIR_UP): New macro. 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (source_end_java_method): Resume permanent allocation, reversing Apr 27 1998 patch. (patch_string_cst): Pop obstacks after having pushed the permanent ones. 1999-11-05 Tom Tromey <tromey@cygnus.com> * class.c (finish_class): Emit inlined methods if any native methods exist in the class. Fixes PR gcj/85. 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR. (qualify_ambiguous_name): Likewise. 1999-11-03 Godmar Back <gback@cs.utah.edu> * typeck.c: (lookup_java_method): search all inherited interfaces when looking up interface method. 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (method_header:): Issue error message for rule `type error'. (synchronized:): Error report when not using synchronized. 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_qualified_expression_name): Prevent `this' from being used before the superclass constructor has been called. (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P instead of `CALL_THIS_CONSTRUCTOR_P'. 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net> * check-init.c: Fix typo in comment. 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (add_method_1): Set DECL_INLINE to 1 for private, static and final method. 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (expression_statement:): Call function to report improper invocation of a constructor. (parse_ctor_invocation_error): New function. 1999-10-26 Mark Mitchell <mark@codesourcery.com> * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call remember_end_note. 1999-10-21 Tom Tromey <tromey@cygnus.com> * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set in generated `main'. 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR. (qualify_ambiguous_name): Likewise. 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_complete_tree): fold_constant_for_init to work on permanent_obstack. (java_complete_lhs): Likewise. (array_constructor_check_entry): Complete an initializer element on permanent_obstack. 1999-10-19 Tom Tromey <tromey@cygnus.com> * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file. From Mike Moreton <mike@pillim.demon.co.uk>. 1999-10-15 Greg McGary <gkm@gnu.org> * java-tree.h (flag_bounds_check): Remove extern decl. * lang.c (flag_bounds_check): Remove global variable. (lang_f_options): Remove "bounds-check" entry. (lang_init_options): Default flag_bounds_check to "on". 1999-10-14 Tom Tromey <tromey@cygnus.com> * jvgenmain.c (usage): New function. (main): Use it. Also, handle `-D' options. * jvspec.c (lang_specific_driver): Recognize -D. (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation. * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'. 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * jcf-dump.c (print_constant, disassemble_method): Don't call a variadic function with a non-literal format string. * parse-scan.y (report_main_declaration): Likewise. * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise. * parse.y (read_import_dir, patch_assignment, patch_binop, patch_array_ref): Likewise. * typeck.c (build_java_array_type): Likewise. * verify.c (verify_jvm_instructions): Likewise. 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1. 1999-10-07 Anthony Green <green@cygnus.com> * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases where CHECK_PUT may fail for valid reasons. * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3, UNSAFE_PUTN): New macros. 1999-10-04 Tom Tromey <tromey@cygnus.com> * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as well. Fixes Java PR gcj/59. * parse-scan.y (yyerror): Report errors. 1999-09-24 Glenn Chambers <GChambers@provsol.com> * decl.c (insert_block): Remove unconditional `abort'. 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk> * decl.c (builtin_function): No longer static. New arg CLASS. Arg FUNCTION_CODE now of type int. All callers changed. Set the builtin's DECL_BUILT_IN_CLASS. 1999-09-23 Tom Tromey <tromey@cygnus.com> * jvspec.c (lang_specific_driver): Don't read spec file if -fsyntax-only given. 1999-09-22 Tom Tromey <tromey@cygnus.com> * lang-specs.h: Added `%(jc1)' to the jc1 spec. * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally. (WORDS_TO_LONG): Likewise. (WORDS_TO_DOUBLE): Likewise. 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (RELOCATION_VALUE_0): New macro. (RELOCATION_VALUE_1): Likewise. (emit_iinc, emit_reloc, push_constant1, push_constant2, push_in_const, push_long_const): Prototyped. (push_constant1): Argument `index' is of type HOST_WIDE_INT. (push_constant2): Likewise. (push_int_const): Cast find_constant1's integer arguments to `jword'. (find_constant_wide): Cast find_constant2's integer arguments to `jword'. (find_constant_index): Cast find_constant2's and find_constant2's integer arguments to `jword'. (emit_pop): Argument `value' is of type HOST_WIDE_INT. (emit_switch_reloc): Use RELOCATION_VALUE_0. (emit_if): Use RELOCATION_VALUE_1. (emit_goto): Likewise. (emit_jsr): Likewise. (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second argument to push_long_const to HOST_WIDE_INT. 1999-09-15 Andreas Schwab <schwab@suse.de> * Makefile.in (parse.o): Depend on $(JAVA_TREE_H). 1999-09-20 Nick Clifton <nickc@cygnus.com> * lang.c (lang_decode_option): Extend comment. 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK instead of fndecl. 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gjavah.c (get_field_name, print_method_info, print_include, add_namelet): Use xmalloc, not malloc. * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup. (munge): Use xrealloc, not realloc, trust xrealloc to handle a NULL pointer. * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup. * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise. * jcf-path.c (add_entry): Likewise. * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc. * jv-scan.c (xmalloc): Remove definition. * jvgenmain.c (xmalloc): Likewise. * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero. * lex.c (java_store_unicode): Use xrealloc, not realloc. * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use concat, not xmalloc/sprintf. (java_push_parser_context): Use xcalloc, not xmalloc/bzero. (xstrdup): Remove definition. * parse.y (duplicate_declaration_error_p, constructor_circularity_msg, verify_constructor_circularity, check_abstract_method_definitions, java_check_regular_methods, java_check_abstract_methods, patch_method_invocation, check_for_static_method_reference, patch_assignment, patch_binop, patch_cast, array_constructor_check_entry, patch_return, patch_conditional_expr): Use xstrdup, not strdup. * zextract.c (ALLOC): Use xmalloc, not malloc. 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Make-lang.in (jvspec.o): Depend on system.h and gcc.h. * jvspec.c: Include gcc.h. Don't include gansidecl.h. (do_spec, lang_specific_pre_link, lang_specific_driver, input_filename, input_filename_length): Don't declare. (main_class_name, jvgenmain_spec, lang_specific_driver): Constify a char*. (lang_specific_driver): All calls to the function pointer parameter now explicitly call `fatal'. 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (find_applicable_accessible_methods_list): Search abstract classes as interfaces. 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (finish_class): We're now outside a valid method declaration. Tell the rest of gcc so. 1999-09-08 Bruce Korb autogen@linuxbox.com * Makefile.in: Give the gperf user a hint about why "gperf -F" fails. 19