aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
AgeCommit message (Collapse)AuthorFilesLines
2001-12-23arc.c (arc_hard_regno_mode_ok): Const-ify.Kaveh R. Ghazi7-25/+43
* arc.c (arc_hard_regno_mode_ok): Const-ify. * arc.h (arc_hard_regno_mode_ok): Likewise. * i386.c (x86_64_reg_class_name): Make static. * m68k.c (regno_reg_class): Const-ify. * m68k.h (regno_reg_class): Likewise. * mcore.c (reg_class_from_letter): Likewise. * mcore.h (reg_class_from_letter): Likewise. * sh.c (reg_class_from_letter, ashiftrt_insns, shift_insns, ext_shift_insns, ext_shift_amounts): Likewise. * sh.h (reg_class_from_letter): Likewise. * sparc.c (hard_regno_mode_classes, hard_32bit_mode_classes, hard_64bit_mode_classes): Likewise. * sparc.h (hard_regno_mode_classes): Likewise. * gcc.c (modify_target): Make static. * gengenrtl.c (defs, formats): Likewise. * reload1.c (elim_table_1, init_elim_table): Const-ify. * tradcpp.c (directive, directive_table, handle_directive, skip_if_group, run_directive): Likewise. cp: * decl2.c (lang_f_options): Const-ify. f: * com.c (ffecom_gfrt_volatile_, ffecom_gfrt_complex_, ffecom_gfrt_const_, ffecom_gfrt_type_): Const-ify. java: * 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. From-SVN: r48290
2001-12-21boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..Richard Henderson2-21/+28
* boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into .. (get_boehm_type_descriptor): ... here. Arrange for the TREE_TYPE to get set properly. From-SVN: r48261
2001-12-21class.c (compile_resource_file): Set TREE_PUBLIC on the constructor only if ↵Richard Henderson2-2/+8
the target requires collect2. * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor only if the target requires collect2. From-SVN: r48252
2001-12-21* class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.Richard Henderson2-0/+5
From-SVN: r48251
2001-12-21reverted erroneous checking -- sorry about thatTom Tromey1-12/+3
From-SVN: r48250
2001-12-21For PR java/4509:Tom Tromey1-3/+12
* 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. From-SVN: r48249
2001-12-21For PR java/4509:Tom Tromey3-3/+23
* 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. From-SVN: r48233
2001-12-21For PR java/4766:Tom Tromey2-38/+88
* jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle case where `finally' clause can't complete normally. From-SVN: r48232
2001-12-21re PR java/5057 (gcj -C erroneously omits <clinit>)Tom Tromey2-19/+27
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. From-SVN: r48231
2001-12-20decl.c (java_init_decl_processing): Don't initialize finit_leg_identifier_node.Bryce McKinlay3-16/+11
* 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. From-SVN: r48221
2001-12-20mangle.c (mangle_member_name): Don't special-case for NO_DOLLAR_IN_LABEL.Bryce McKinlay4-30/+14
* 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. From-SVN: r48220
2001-12-20expr.c (build_java_array_length_access): Don't force null pointer check ↵Bryce McKinlay2-1/+7
unless flag_check_references is set. * expr.c (build_java_array_length_access): Don't force null pointer check unless flag_check_references is set. From-SVN: r48219
2001-12-20re PR java/3417 (Downcast on integral types.)Tom Tromey2-14/+25
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'. From-SVN: r48208
2001-12-20configure.in (all_diff_excludes, [...]): Remove.Joseph Myers2-1/+4
* configure.in (all_diff_excludes, diff_excludes): Remove. * configure: Regenerate. * Makefile.in (LANG_DIFF_EXCLUDES): Remove. * objc/config-lang.in (diff_excludes): Remove. ada: * config-lang.in (diff_excludes): Remove. ch: * config-lang.in (diff_excludes): Remove. cp: * config-lang.in (diff_excludes): Remove. f: * config-lang.in (diff_excludes): Remove. java: * config-lang.in (diff_excludes): Remove. From-SVN: r48189
2001-12-17Separate user and internals manuals.Joseph Myers2-1/+5
* Makefile.in (info, $(docdir)/gcc.info, dvi, gcc.dvi): Update dependencies. ($(docdir)/gccint.info, gccint.dvi): New targets. (maintainer-clean, install-info, uninstall): Update. * doc/.cvsignore: Add gccint.info*. * doc/include/gcc-common.texi: New file. * doc/gcc.texi: Use it. Adjust to be a user-only manual. Put copyright notice in a macro. Don't include ISBN unless FSFPRINT is defined. * doc/gccint.texi: New file. * doc/configfiles.texi, doc/extend.texi, doc/invoke.texi, doc/md.texi, doc/passes.texi, doc/tm.texi, doc/trouble.texi: Update for separate user and internals manuals. f: * g77.texi, invoke.texi: Update links to GCC manual. java: * gcj.texi: Update link to GCC manual. From-SVN: r48119
2001-12-17parse.y (link_nested_class_to_enclosing): Removed useless statement.Tom Tromey2-1/+5
* parse.y (link_nested_class_to_enclosing): Removed useless statement. From-SVN: r48118
2001-12-16re PR java/5088 (Can't create a java.lang.Object from CNI)Tom Tromey2-9/+7
* mangle.c (mangle_method_decl): Never emit `C2' constructor. Fixes PR java/5088. From-SVN: r48083
2001-12-16ChangeLog, [...]: Fix spelling errors.Joseph Myers12-45/+51
* 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. From-SVN: r48075
2001-12-16c-lex.c (lex_number): Use ISXDIGIT/hex_value.Kaveh R. Ghazi2-5/+7
* c-lex.c (lex_number): Use ISXDIGIT/hex_value. * vax/xm-vms.h (FILE_NAME_NONDIRECTORY): Use ISUPPER/TOLOWER. * fold-const.c (real_hex_to_f): Use hex_value. * real.c (asctoeg): Use hex_value & ISXDIGIT. * toplev.c (toplev_main): Call hex_init. * tradcpp.c (main): Call hex_init. From-SVN: r48068
2001-12-16decl.c (java_init_decl_processing): Build otable_type correctly.Bryce McKinlay2-5/+9
* decl.c (java_init_decl_processing): Build otable_type correctly. otable_decl is an otable_type. From-SVN: r48062
2001-12-15java-tree.h (otable_methods, [...]): New field/global tree definitions.Bryce McKinlay8-27/+307
gcc/java: * 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, dont 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. libjava: * include/jvm.h (_Jv_VTable::idx_to_offset): New method. * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_MakeVTable and _Jv_LinkOffsetTable if needed. * java/lang/Class.h (_Jv_Method): Add "index" field. (_Jv_MethodSymbol): New struct type. (_Jv_LinkOffsetTable, _Jv_LayoutVTableMethods, _Jv_SetVTableEntries, _Jv_MakeVTable): Friends. (otable, otable_syms): New Class fields. * java/lang/natClass.cc (_Jv_LinkOffsetTable): New function. (isVirtualMethod): New static function. (_Jv_LayoutVTableMethods): New function. (_Jv_SetVTableEntries): New function. (_Jv_MakeVTable): New function. From-SVN: r48038
2001-12-14gcj.texi: Markup for man page generation.Matthias Klose3-13/+263
* 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. From-SVN: r48016
2001-12-14class.c (get_dispatch_table): Fix java vtable layout for ↵Hans Boehm6-12/+82
TARGET_VTABLE_USES_DESCRIPTORS. * 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. From-SVN: r48004
2001-12-11Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove whitespaceMatthias Klose2-2/+7
at end of line. From-SVN: r47903
2001-12-11lex.c (java_init_lex): Define wfl_to_string as gnu.gcj.runtime.StringBuffer ↵Tom Tromey2-1/+9
unless generating bytecode. * lex.c (java_init_lex): Define wfl_to_string as gnu.gcj.runtime.StringBuffer unless generating bytecode. From-SVN: r47882
2001-12-11class.c (make_method_value): Use null_pointer_node to represent empty ↵Jeff Sturm2-1/+6
exception table. * class.c (make_method_value): Use null_pointer_node to represent empty exception table. From-SVN: r47880
2001-12-11* check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.Tom Tromey2-13/+7
From-SVN: r47860
2001-12-10Makefile.in: Add $(OUTPUT_OPTION) to compilation rules.Douglas B Rupp2-1/+5
* Makefile.in: Add $(OUTPUT_OPTION) to compilation rules. * intl/Makefile.in (OUTPUT_OPTION): Add configure variable. (.c.o): Add $(OUTPUT_OPTION). * java/Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION). From-SVN: r47843
2001-12-09check-init.c (current_switch_has_default): New static field.Per Bothner2-1/+20
* 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. From-SVN: r47833
2001-12-09check-init.c (check_init): Don't allow pre- or post- increment or decrement ↵Tom Tromey2-5/+19
of final variable. * check-init.c (check_init): Don't allow pre- or post- increment or decrement of final variable. (final_assign_error): Minor error message rewording. From-SVN: r47821
2001-12-09* java-tree.h: Fixed typo.Tom Tromey2-1/+3
From-SVN: r47805
2001-12-09gjavah.c (decompile_method): Don't decompile to `return this' for static ↵Tom Tromey2-1/+7
methods. * gjavah.c (decompile_method): Don't decompile to `return this' for static methods. From-SVN: r47804
2001-12-09gjavah.c (cxx_keywords): Re-sorted.Tom Tromey3-4/+7
* gjavah.c (cxx_keywords): Re-sorted. * lex.c (cxx_keywords): Re-sorted. From-SVN: r47803
2001-12-09gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything else.Tom Tromey2-1/+4
* gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything else. From-SVN: r47802
2001-12-09gjavah.c (print_namelet): Clear subnamelets.Tom Tromey2-1/+8
* gjavah.c (print_namelet): Clear subnamelets. (HANDLE_METHOD): Set `method_printed' earlier. From-SVN: r47801
2001-12-07lang.c (lang_f_options): Added optimize-static-class-initialization.Tom Tromey2-10/+8
* lang.c (lang_f_options): Added optimize-static-class-initialization. (java_decode_option): Removed special case. From-SVN: r47768
2001-12-07* check-init.c (check_init): Fix typo freeing memory twice.Per Bothner2-2/+4
From-SVN: r47763
2001-12-06Restore support for static class initialization optimization.Per Bothner7-71/+93
From-SVN: r47735
2001-12-04check-init.c: Handle definite unassignment to finals in addition to definite ↵Per Bothner5-479/+446
assignment. * check-init.c: Handle definite unassignment to finals in addition to definite assignment. [see ChangeLog] From-SVN: r47619
2001-12-03parse.y (patch_binop): Minor constant folding.Per Bothner2-1/+15
* parse.y (patch_binop): Minor constant folding. * parse.y (build_current_thisn): Shorter 'buffer'. From-SVN: r47588
2001-12-03decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR instead ↵Per Bothner4-103/+14
of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR. * 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. From-SVN: r47587
2001-12-03verify.c (subroutine_nesting): New function.Per Bothner2-7/+32
* 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. From-SVN: r47572
2001-12-03jcf.h: Fix obvious typo in comment.Per Bothner3-1/+8
* jcf.h: Fix obvious typo in comment. * typeck.c (build_null_signature): Add comment. From-SVN: r47569
2001-12-03c-decl.c (grokdeclarator): Use ISO word.Neil Booth9-18/+28
* c-decl.c (grokdeclarator): Use ISO word. * cppinit.c: Remove leading capital from diagnostic messages, as per GNU coding standards. * diagnostic.c: Similarly. * emit-rtl.c: Similarly. * final.c: Similarly. * gcc.c: Similarly. * tradcpp.c: Similarly. * config/arm/arm.c: Similarly. * config/arm/arm.h: Similarly. * config/avr/avr.c: Similarly. * config/avr/avr.h: Similarly. * config/c4x/c4x.c: Similarly. * config/cris/cris.c: Similarly. * config/cris/cris.h: Similarly. * config/d30v/d30v.c: Similarly. * config/dsp16xx/dsp16xx.c: Similarly. * config/dsp16xx/dsp16xx.h: Similarly. * config/h8300/h8300.c: Similarly. * config/i386/i386.c: Similarly. * config/i386/xm-djgpp.h: Similarly. * config/i960/i960.h: Similarly. * config/m32r/m32r.c: Similarly. * config/m68hc11/m68hc11.c: Similarly. * config/m88k/m88k.c: Similarly. * config/m88k/m88k.h: Similarly. * config/mcore/mcore.c: Similarly. * config/mcore/mcore.h: Similarly. * config/mips/mips.c: Similarly. * config/mmix/mmix.c: Similarly. * config/pa/pa.c: Similarly. * config/rs6000/rs6000.c: Similarly. * config/rs6000/sysv4.h: Similarly. * config/s390/s390.c: Similarly. * config/sparc/sparc.c: Similarly. * config/v850/v850-c.c: Similarly. * config/v850/v850.c: Similarly. ch: * actions.c: Remove leading capital from diagnostic messages, as per GNU coding standards. * decl.c: Similarly. * expr.c: Similarly. * inout.c: Similarly. * lang.c: Similarly. * loop.c: Similarly. * nloop.c: Similarly. * parse.c: Similarly. * satisfy.c: Similarly. * tasking.c: Similarly. * tree.c: Similarly. * typeck.c: Similarly. cp: * typeck2.c: Remove leading capital from diagnostic messages, as per GNU coding standards. f: * com.c: Remove leading capital from diagnostic messages, as per GNU coding standards. * g77spec.c: Similarly. * lex.c: Similarly. java: * 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. From-SVN: r47558
2001-12-02Fix ChangeLog entry.Bryce McKinlay1-2/+2
From-SVN: r47526
2001-12-02re PR java/3096 (GCJ does not increment)Tang Ching-Hui3-19/+30
2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw> Alexandre Petit-Bianco <apbianco@redhat.com> * expr.c: 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. Co-Authored-By: Alexandre Petit-Bianco <apbianco@redhat.com> From-SVN: r47525
2001-12-01c-decl.c (duplicate_decls, [...]): Remove trailing period from diagnostics.Neil Booth5-6/+13
* c-decl.c (duplicate_decls, parmlist_tags_warning): Remove trailing period from diagnostics. * c-lex.c (cb_file_change): Similarly. * cppmacro.c (check_trad_stringification): Similarly. * gcc.c (do_spec_1): Similarly. * genattr.c (main): Similarly. * genattrtab.c (main, operate_exp, make_length_attrs): Similarly. * gencodes.c (main): Similarly. * genconfig.c (main): Similarly. * genconstants.c (main): Similarly. * genemit.c (main): Similarly. * genextract.c (main): Similarly. * genopinit.c (main): Similarly. * genoutput.c (main): Similarly. * genpeep.c (main): Similarly. * genrecog.c (main): Similarly. * mips-tfile.c (add_file, error): Similarly. * profile.c (init_branch_prob): Similarly. * reload1.c (spill_failure): Similarly. * stmt.c (parse_output_constraint): Similarly. * varasm.c (assemble_variable): Similarly. cp: * class.c (finish_struct): Similarly. * decl.c (check_tag_decl): Similarly. * lex.c (cxx_set_yydebug): Similarly. * typeck2.c (friendly_abort): Similarly. java: * expr.c (expand_byte_code): Similarly. * jcf-parse.c (load_class, jcf_parse): Similarly. * jcf-write.c (generate_classfile): Similarly. * lex.c (java_lex): Similarly. From-SVN: r47517
2001-11-30* class.c (add_interface_do): Set BINFO_VPTR_FIELD.Bryce McKinlay2-0/+5
From-SVN: r47480
2001-11-29configure.in (target_list): Add generated-manpages.Joseph Myers2-0/+5
* configure.in (target_list): Add generated-manpages. * configure: Regenerate. * Makefile.in (generated-manpages): Depend on lang.generated-manpages. * objc/Make-lang.in (objc.generated-manpages): New dummy target. ada: * Make-lang.in (ada.generated-manpages): New dummy target. ch: * Make-lang.in (CHILL.generated-manpages): New dummy target. cp: * Make-lang.in (c++.generated-manpages): New dummy target. f: * Make-lang.in (f77.generated-manpages): New target. ($(srcdir)/f/g77.1): Don't check $(GENERATED_MANPAGES). Allow manpage generation to fail. (f77.info): Don't depend on $(srcdir)/f/g77.1. (f77.install-man): Depend on $(GENERATED_MANPAGES) rather than directly on $(srcdir)/g77.1. java: * Make-lang.in (java.generated-manpages): New dummy target. From-SVN: r47442
2001-11-27re PR other/3968 (COLLECT_GCC_OPTIONS empty)Rainer Orth3-9/+33
* gcc.c (set_collect_gcc_options): New function, split out from main. Ignore elided switches. (do_spec): Invoke before executing command. (do_spec_1): Likewise. Fixes PR other/3968. * gcc.c (set_input): Export. Move declaration ... gcc.h (set_input): ... here. 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: r47385