aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
AgeCommit message (Collapse)AuthorFilesLines
2001-09-27parse.y (check_final_variable_indirect_assignment): For COMPOUND_EXPR...Alexandre Petit-Bianco2-8/+20
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. ( http://gcc.gnu.org/ml/gcc-patches/2001-09/msg01160.html ) From-SVN: r45844
2001-09-22re PR java/4360 (libjava fails to compile on i686-pc-linux-gnu ↵Alexandre Petit-Bianco2-3/+10
(AttributedString)) 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. ( http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00903.html ) From-SVN: r45756
2001-09-21re PR java/4366 (java class initialization bug)Alexandre Petit-Bianco2-0/+12
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. ( http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00880.html ) From-SVN: r45743
2001-09-21tree.def (FDESC_EXPR): New.Richard Henderson3-15/+81
gcc/ * tree.def (FDESC_EXPR): New. * expr.c (expand_expr): Handle it. * varasm.c (initializer_constant_valid_p): Likewise. (output_constant): Likewise. * defaults.h (TARGET_VTABLE_USES_DESCRIPTORS): New. * config/ia64/ia64.h (TARGET_VTABLE_USES_DESCRIPTORS): New. (ASM_OUTPUT_FDESC): New. * doc/tm.texi: Document the new macros. gcc/cp/ * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS. (build_vtbl_initializer): Likewise. (build_vfn_ref): New. * cp-tree.h: Declare it. * call.c (build_over_call): Use it. * decl2.c (mark_vtable_entries): Mark FDESC_EXPR. * typeck.c (get_member_function_from_ptrfunc): Mind descriptors. gcc/java/ * class.c (get_dispatch_table): Handle function descriptors. (build_dtable_decl): Likewise. * expr.c (build_invokevirtual): Likewise. gcc/testsuite/ * g++.old-deja/g++.abi/ptrmem.C: Update for ia64 c++ abi. * g++.old-deja/g++.abi/vtable2.C: Likewise. From-SVN: r45733
2001-09-21parse.h: (WFL_STRIP_BRACKET): Re-written using build_type_name_from_array_name.Alexandre Petit-Bianco3-58/+104
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. ( http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00779.html ) From-SVN: r45732
2001-09-18parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.Andreas Jaeger3-1457/+1430
* parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout. * jv-scan.c: Likewise. From-SVN: r45671
2001-09-17re PR java/4189 (gcj generates bytecode for switch stmt that doesn't verify)Tom Tromey2-0/+6
* jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call NOTE_PUSH for single-case push. Fixes PR java/4189. From-SVN: r45655
2001-09-14java-tree.h (TYPE_IMPORT_LIST): New macro.Alexandre Petit-Bianco3-17/+61
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. ( http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00563.html ) From-SVN: r45619
2001-09-14* verify.c (verify_jvm_instructions): Fix typo.Mark Mitchell2-1/+5
From-SVN: r45586
2001-09-13c-parse.in (yyerror): Const-ification and/or static-ization.Kaveh R. Ghazi3-8/+13
* c-parse.in (yyerror): Const-ification and/or static-ization. * c-typeck.c (push_member_name): Likewise. * collect2.c (main): Likewise. * dbxout.c (dbxout_parms): Likewise. * diagnostic.c (format_with_decl): Likewise. * dwarf2out.c (output_ranges): Likewise. * dwarfout.c (fundamental_type_code): Likewise. * except.c (dw2_output_call_site_table): Likewise. * gcc.c (do_spec_1): Likewise. * genopinit.c (optabs): Likewise. * objc/objc-act.c (synth_id_with_class_suffix, start_class, gen_declaration_1, handle_impent): Likewise. * protoize.c (default_include, in_system_include_dir, abspath): Likewise. * sched-vis.c (visualize_stall_cycles): Likewise. * sdbout.c (plain_type_1, sdbout_end_function, sdbout_end_epilogue): Likewise. * varasm.c (decode_reg_name): Likewise. * 1750a.c (mod_regno_adjust): Likewise. * alpha.c (alpha_write_one_linkage, unicosmk_output_default_externs): Likewise. * arm.c (arm_condition_codes): Likewise. * arm.h (arm_condition_codes): Likewise. * avr.c (output_movsisf, encode_section_info): Likewise. * darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL): Likewise. * i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. * i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise. * m88k.c (output_function_profiler): Likewise. * mips.c (mips_output_conditional_branch): Likewise. * ns32k.c (ns32k_out_reg_names): Likewise. * ns32k.h (ns32k_out_reg_names): Likewise. * pj.c (pj_output_rval): Likewise. * rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise. * sparc.c (sparc_flat_function_prologue, sparc_flat_function_epilogue): Likewise. cp: * decl.c (warn_extern_redeclared_static, cp_make_fname_decl): Const-ification. * pt.c (tsubst_decl): Likewise. f: * bad.c (ffebad_finish): Const-ification and/or static-ization. * intrin.c (ffeintrin_cmp_name_): Likewise. * stc.c (ffestc_R904): Likewise. java: * expr.c (expand_invoke): Const-ification. * parse.y (patch_method_invocation): Likewise. From-SVN: r45581
2001-09-12gjavah.c (cxx_keywords): Const-ification.Kaveh R. Ghazi7-9/+17
* 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. From-SVN: r45564
2001-09-11* parse.h (ctxp_for_generation): Mark extern.Richard Henderson2-1/+5
From-SVN: r45552
2001-09-10* class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.Richard Henderson2-2/+6
From-SVN: r45500
2001-09-07java-tree.h (compile_resource_file): Grouped with other prototypes.Alexandre Petit-Bianco3-4/+6
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.' (http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00249.html ) From-SVN: r45475
2001-09-07re PR java/4230 (gcj -C segfaults on static string continuation '+' in gcj ↵Alexandre Petit-Bianco3-4/+46
3.1 expermental.) 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 (http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00247.html ) From-SVN: r45474
2001-09-07typeck.c (java_array_type_length, [...]): Represent empty arrays by NULL index.Matt Kraai2-6/+20
* java/typeck.c (java_array_type_length, build_prim_array_type): Represent empty arrays by NULL index. * stor-layout.c (compute_record_mode): Check DECL_SIZE is set. From-SVN: r45460
2001-09-06gcj -R patchesAnthony Green1-0/+14
From-SVN: r45449
2001-09-06class.c (O_BINARY): Define if necessary.Anthony Green6-3/+195
* 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. From-SVN: r45448
2001-09-04parse.y (maybe_yank_clinit): A field without an initializer is not relevant.Per Bothner2-12/+14
* 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. From-SVN: r45388
2001-08-31[multiple changes]Alexandre Petit-Bianco3-14/+53
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. (http://gcc.gnu.org/ml/java-patches/2001-q3/msg00343.html ) From-SVN: r45345
2001-08-31class.c (set_constant_value): When not emiting class files, then a String ↵Per Bothner2-2/+9
ConstantValue is a utf8const_ptr_type. * class.c (set_constant_value): When not emiting class files, then a String ConstantValue is a utf8const_ptr_type. From-SVN: r45333
2001-08-30Temporaily change error to wanring to hopefully allow boostrap.Per Bothner1-1/+1
From-SVN: r45311
2001-08-30jcf-write.c (generate_classfile): Check that field is primitive or string ↵Per Bothner2-1/+8
before emitting ConstantValue attribute. * jcf-write.c (generate_classfile): Check that field is primitive or string before emitting ConstantValue attribute. From-SVN: r45306
2001-08-30parse.y (resolve_qualified_expression_name): If creating a COMPOUND_EXPR, ↵Per Bothner2-1/+7
set it's type correctly. * parse.y (resolve_qualified_expression_name): If creating a COMPOUND_EXPR, set it's type correctly. From-SVN: r45305
2001-08-30jcf-io.c (open_class): Set filename field.Per Bothner4-24/+45
* 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. From-SVN: r45299
2001-08-30jcf-write.c (generate_classfile): Don't write ConstantValue attribute if ↵Per Bothner3-1/+19
field is not final... * 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. From-SVN: r45298
2001-08-30jcf-dump.c (print_constant): Fix fencepost error so "Float" and "Double" are ↵Per Bothner2-5/+15
printed at verbosity 1. * 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. From-SVN: r45296
2001-08-28Removing conflict indicators. Oops.Alexandre Petit-Bianco1-2/+0
From-SVN: r45252
2001-08-28re PR java/4141 (GCJ compiles illegal code without complaining.)Alexandre Petit-Bianco2-4/+21
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 (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01644.html) From-SVN: r45251
2001-08-28jcf-write.c (generate_bytecode_insns): For increments and decrements just ↵Per Bothner2-14/+11
recurse to push constant. * jcf-write.c (generate_bytecode_insns): For increments and decrements just recurse to push constant. Improvement on Mark's patch. From-SVN: r45241
2001-08-28jcf-write.c (generate_bytecode_insns): Generate an integer to real ↵Mark Mitchell2-2/+14
conversion for increments and decrements of reals. * jcf-write.c (generate_bytecode_insns): Generate an integer to real conversion for increments and decrements of reals. From-SVN: r45230
2001-08-27parse.y (check_deprecation): Handle TYPE_DECL in a special case...Alexandre Petit-Bianco2-8/+54
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. (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01495.html) From-SVN: r45187
2001-08-24jcf-parse.c (yyparse): Set magic to 0, don't issue error for a file smaller ↵Alexandre Petit-Bianco3-35/+113
than 4 bytes. 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. (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01417.html) From-SVN: r45156
2001-08-24decl.c (init_decl_processing): Add `throws' field to method descriptor.Tom Tromey3-0/+46
* decl.c (init_decl_processing): Add `throws' field to method descriptor. * class.c (make_method_value): Compute `throws' field for method. From-SVN: r45152
2001-08-22parse.y (resolve_inner_class): Keep local_enclosing to NULL if circularity ↵Alexandre Petit-Bianco2-2/+9
is detected. 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. (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01283.html) From-SVN: r45109
2001-08-17defaults.h (UNALIGNED_SHORT_ASM_OP, [...]): Move from ...Richard Henderson2-1/+6
* defaults.h (UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP, UNALIGNED_DOUBLE_INT_ASM_OP, ASM_BYTE_OP): Move from ... * dwarf2asm.c: ... here. * dwarfout.c: Remove them. * varasm.c (assemble_integer): Add align parameter. (assemble_real, output_constant, output_constructor): Likewise. * output.h: Update decls. * dwarf2asm.c, final.c, varasm.c, config/darwin.c, config/nextstep.c, config/alpha/alpha.c, config/arm/arm.md, config/clipper/clipper.c, config/m88k/m88k.c, config/mcore/mcore.md, config/mips/mips.h, config/mips/mips.md, config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.md: Update all callers. * final.c (end_final): Abort profile block generation if we havn't layed it out properly. * output.h (assemble_eh_integer): Remove stale decl. * varasm.c (assemble_zeros): Tidy; use assemble_integer. (min_align): New. (assemble_integer): Handle unaligned data. (assemble_real): Abort on unaligned data. (output_constructor): Don't assume ASM_OUTPUT_ALIGN 0 does anything useful. (default_dtor_section_asm_out_destructor): Use assemble_align. (default_named_section_asm_out_constructor): Likewise. (default_ctor_section_asm_out_constructor): Likewise. * config/darwin.c (machopic_asm_out_constructor): Likewise. (machopic_asm_out_destructor): Likewise. * config/nextstep.c (nextstep_asm_out_constructor): Likewise. (nextstep_asm_out_destructor): Likewise. * config/alpha/alpha.c (vms_asm_out_constructor): Likewise. (vms_asm_out_destructor): Likewise. * java/class.c (emit_register_classes): Add align parameter to call to assemble_integer. From-SVN: r44992
2001-08-17[multiple changes]Alexandre Petit-Bianco8-157/+371
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-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-09 Alexandre Petit-Bianco <apbianco@redhat.com> * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and `poplevel' in the right order. (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01061.html ) From-SVN: r44982
2001-08-16varasm.c (named_section_flags): Remove align parameter.Richard Henderson1-2/+2
* varasm.c (named_section_flags): Remove align parameter. * varasm.c, dwarf2out.c: Update all callers. * output.h: Update prototypes. * target.h (target.asm_out.named_section): Remove align parameter. * varasm.c, config/a29k/a29k.c, config/alpha/alpha.c, config/arm/arm.c, config/c4x/c4x.c, config/h8300/h8300.c, config/i386/i386.c, config/i386/winnt.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c, config/rs6000/rs6000.c, config/sh/sh.c, config/sparc/sparc.c: Update implementations to match. * varasm.c (in_named_entry_eq, in_named_entry_hash): New. (get_named_section_flags, set_named_section_flags): New. (named_section_flags): Use them. (named_section): Do decl vs section flags check here... (default_section_type_flags): ... not here. (init_varasm_once): Create in_named_htab. (resolve_unique_section): Mark reloc unused. From-SVN: r44953
2001-08-16jcf-dump.c (main): Updated for change to jcf_path_seal.Tom Tromey6-10/+47
* 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. From-SVN: r44946
2001-08-13expr.h: Split out optab- and libfunc-related code to...Zack Weinberg3-4/+10
* expr.h: Split out optab- and libfunc-related code to... * optabs.h, libfuncs.h: ... these new headers. * Makefile.in (CONFIG_H, EXPR_H): Take out insn-codes.h. (OPTABS_H): New. (various .o rules): Add $(OPTABS_H) and/or libfuncs.h to dependencies. * mkconfig.sh: Don't include insn-codes.h from config.h. * reload.h: Use #ifdef GCC_INSN_CODES_H to decide whether enum insn_code is available. Move reload_in_optab and reload_out_optab array declarations to optabs.h. * regmove.c (gen_add3_insn): Move to optabs.c, export from there, prototype in expr.h. * gencodes.c: Cleanup: zap global variables, don't use printf where puts will do, don't bother defining MAX_INSN_CODE which nothing uses, let CODE_FOR_nothing get its value implicitly. * genemit.c, genopinit.c: Include optabs.h in generated file. * genoutput.c: Include insn-codes.h in generated file. * builtins.c, caller-save.c, combine.c, doloop.c, explow.c, expmed.c, expr.c, function.c, ifcvt.c, loop.c, optabs.c, profile.c, reload1.c, simplify-rtx.c, stmt.c, unroll.c, config/alpha/alpha.c, config/arm/arm.c, config/c4x/c4x.c, config/clipper/clipper.c, config/i386/i386.c, config/ia64/ia64.c, config/mn10300/mn10300.c, config/pj/pj.c, config/sh/sh.c, config/sparc/sparc.c: Include optabs.h. * builtins.c, calls.c, dwarf2out.c, except.c, expr.c, function.c, optabs.c, stmt.c, config/c4x/c4x.c, config/clipper/clipper.c, config/m88k/m88k.c, config/sparc/sparc.c: Include libfuncs.h. * reload.c: Include expr.h and optabs.h before reload.h. * config/alpha/alpha.c: Include tree.h before reload.h. * config/pa/pa.c: Include expr.h, optabs.h, libfuncs.h, and reload.h in that order. * config/sparc/sparc.c: Include debug.h. * recog.c: Include insn-codes.h. cp: * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies. * except.c: Include libfuncs.h. java: * Make-lang.in (java/decl.o): Update dependencies. * decl.c: Include libfuncs.h, don't include toplev.h. From-SVN: r44858
2001-08-12Revert Rainer Orth's Java and gcc.c patch.David Edelsohn3-22/+22
From-SVN: r44834
2001-08-12toplev.c (set_float_handler): Make static.Zack Weinberg2-5/+5
* toplev.c (set_float_handler): Make static. * toplev.h: Don't prototype set_float_handler. * simplify-rtx.c: Don't include setjmp.h. (simplify_unary_real, simplify_binary_real, simplify_binary_is2orm1): New functions. (simplify_unary_operation, simplify_binary_operation): Use them, via do_float_handler. * fold-const.c: Don't include setjmp.h. (exact_real_inverse_1): New function. (exact_real_inverse): Use it, via do_float_handler. * varasm.c: Don't include setjmp.h. (assemble_real_1): New function. (assemble_real): Use it, via do_float_handler. Call internal_error if we get a trap here. * c-parse.in, cse.c, cselib.c, ch/lex.c, config/i386/i386.c, config/pj/pj.c, config/s390/s390.c: Don't include setjmp.h. * java/lex.h: Don't include setjmp.h. Don't define SET_FLOAT_HANDLER or prototype set_float_handler. From-SVN: r44815
2001-08-10Restore HPUX gcj bootstrap.Anthony Green1-0/+4
From-SVN: r44758
2001-08-09Move constructor/destructor handling into target hooks.Richard Henderson3-13/+31
From-SVN: r44747
2001-08-08check-init.c (flags.h): IncludeAlexandre Petit-Bianco10-153/+541
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 invokations. (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg00454.html) From-SVN: r44733
2001-08-08class.c (emit_register_classes): Use assemble_jcr if possible.Anthony Green1-36/+53
2001-08-08 Anthony Green <green@redhat.com> * java/class.c (emit_register_classes): Use assemble_jcr if possible. Keep the original mechanism as a fallback. * defaults.h (JCR_SECTION_NAME): Define if we have named section and weak symbol support. * crtstuff.c (__JCR_LIST__): Define. (__JCR_END__): Define. (_Jv_RegiserClasses): Define weak symbol if possible. (__do_global_ctors_aux): Register classes for ELF targets with weak symbol support. From-SVN: r44731
2001-08-06varasm.c (assemble_constructor): Take a symbol_ref and a priority instead of ↵Richard Henderson2-1/+6
a bare string. * varasm.c (assemble_constructor): Take a symbol_ref and a priority instead of a bare string. Move priority handling here from cp/decl2.c. * output.h: Update decls. * c-decl.c (c_expand_body): Update calls to assemble_constructor and assemble_destructor. * profile.c (output_func_start_profiler): Likewise. * objc/objc-act.c (finish_objc): Likewise. (build_module_descriptor): Return the symbol not the symbol name. * ch/grant.c (chill_finish_compile): Pass a symbol_ref and priority to assemble_constructor. * cp/decl2.c (finish_objects): Pass a symbol_ref and priority to assemble_{constructor,destructor}. Remove priority handling. * java/class.c (emit_register_classes): Pass a symbol_ref and priority to assemble_constructor. From-SVN: r44678
2001-08-02java-tree.h (all_class_filename): New macro.Alexandre Petit-Bianco2-8/+19
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.' (http://gcc.gnu.org/ml/gcc-patches/2001-08/msg00093.html) Proxima Estacion Esperanza From-SVN: r44588
2001-08-02re PR java/227 (mips-tfile:internal error (when compiling java code))Rainer Orth3-9/+33
* gcc.c (set_collect_gcc_options): New function, split out from main. Ignore elided switches. (do_spec_1): Invoke before executing command. (set_input): Export. Move declaration ... * gcc.h (set_input): ... here. * config/alpha/osf.h (ASM_FINAL_SPEC): Use %U.s to refer to input file. java: * 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. From-SVN: r44572
2001-08-01java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): Use ggc_add_tree_root to ↵Jeff Sturm2-1/+6
register roots. * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): Use ggc_add_tree_root to register roots. From-SVN: r44530