Commit Graph

1049 Commits

Author SHA1 Message Date
Graham Stott
c0b65ff15c Fix date in last entry.
From-SVN: r48578
2002-01-06 08:40:36 +00:00
Graham Stott
79ab76fdf0 class.c (compile_resource_file): Update copyright date.
* class.c (compile_resource_file): Update copyright date.
	Constify filename parameter.
	(java-tree.h): Update copyright date.
	(compile_resource_file): Constify filename parameter.

From-SVN: r48577
2002-01-06 08:38:55 +00:00
Graham Stott
37b310124a class.c (compile_resource_file): Update copyright date.
* class.c (compile_resource_file): Update copyright date.
        Constify filename parameter.
        java-tree.h: Update copyright date.
        (compile_resource_file): Constify filename parameter.

From-SVN: r48503
2002-01-03 07:50:49 +00:00
Graham Stott
22e85ed463 jcf-parse.c: Update copyright date.
* gcc/jcf-parse.c: Update copyright date.
        (yyparse): Constify resource_filename.

From-SVN: r48500
2002-01-03 05:47:27 +00:00
Graham Stott
b9daac3192 tree.h: Update copyright date.
* tree.h: Update copyright date.
        (IS_EXPR_CODE_CLASS): Add parenthesis.
        (TREE_SET_CODE): Add whitespace.
        (TREE_CHECK): Add parenthesis.
        (TREE_CLASS_CODE): Add parenthesis and wrap long line.
        (CST_OR_CONSTRUCTOR_CHECK):
        (EXPR_CHECK): Add parenthis, whitespace and wrap line.
        (TREE_SYMBOL_REFERENCED): Whitespace.
        (INT_CST_LT): Likewise.
        (INT_CST_LT_UNSIGNED): Likewise.
        (tree_real_cst): Unwrap comment.
        (tree_string): Likewise.
        (tree_complex): Likewise.
        (IDENTIFIER_POINTER): correct cast.
        (SAVE_EXPR_CONTEXT): Whitespace.
        (EXPR_WFL_FILENAME_NODE): Likewise.
        (EXPR_WFL_FILENAME): Remove parenthesis.
        (DECL_ORIGIN): Add parenthesis.
        (DECL_FROM_INLINE): Use NULL_TREE.
        (build_int_2): Whitespace.
        (build_type_variant): Add parenthesis.

        * gcc/jcf-parse.c: Update copyright date.
        (yyparse): Constify resource_filename.

From-SVN: r48498
2002-01-03 05:18:25 +00:00
Kaveh R. Ghazi
5e65297bbb gcc.c (default_compilers): Const-ify.
* gcc.c (default_compilers): Const-ify.
	* mips-tdump.c (stab_names): Likewise.
	* mips-tfile.c (map_coff_types, map_coff_storage,
	map_coff_sym_type, map_coff_derived_type, stabs_symbol,
	pseudo_ops_t, pseudo_ops): Likewise.
	* protoize.c (default_include): Likewise

f:
	* com.c (clear_binding_level): Const-ify.
	(ffecom_arglist_expr_): Likewise.
	* info.c (ffeinfo_types_): Don't needlessly zero init.
	* lex.c (ffelex_hash_kludge): Const-ify.

java:
	* parse.y (src_parse_roots): Don't needlessly zero init.

libiberty:
	* cp-demangle.c (long_options): Const-ify.
	* cplus-dem.c (long_options): Likewise.

From-SVN: r48485
2002-01-02 23:18:59 +00:00
Tom Tromey
12cfb4fc72 parse.y (dump_java_tree): New function.
* 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.

From-SVN: r48439
2002-01-01 01:42:15 +00:00
Tom Tromey
dab722ee86 gen-table.pl: Don't process characters after \uffff.
* gen-table.pl: Don't process characters after \uffff.  Added
	comment pointing to input file.

From-SVN: r48359
2001-12-29 04:31:10 +00:00
Kaveh R. Ghazi
7b0295ab20 gen-table.pl: Const-ify output.
* gen-table.pl: Const-ify output.  Document the location of a
	suitable unicode input file.

	* chartables.h: Regenerate.

From-SVN: r48354
2001-12-28 22:27:29 +00:00
Kaveh R. Ghazi
c083a819b2 collect2.c (is_ctor_dtor): Const-ify.
* collect2.c (is_ctor_dtor): Const-ify.
	* m88k-protos.c (output_file_start): Likewise.
	* m88k.c (m88k_lang_independent_options, output_options,
	output_file_start): Likewise.
	* fix-header.c (files_to_ignore, std_include_entry, include_entry,
	std_include_table, main): Likewise.
	* protoize.c (longopts): Likewise.
	* regclass.c (int_reg_class_contents): Likewise.
	* toplev.c (dump_file, f_options, W_options): Make static.
	(lang_independent_options, f_options, W_options): Const-ify.
	* tree-dump.c (dump_file_info): Likewise.
	* unroll.c (_factor): Make static.

java:
	* 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.

From-SVN: r48322
2001-12-27 03:35:21 +00:00
Kaveh R. Ghazi
0b5826acc8 arc.c (arc_hard_regno_mode_ok): Const-ify.
* 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-23 16:07:16 +00:00
Richard Henderson
9a07cfaf9f boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
* 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-21 16:52:30 -08:00
Richard Henderson
ef96952567 class.c (compile_resource_file): Set TREE_PUBLIC on the constructor only if 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 11:44:06 -08:00
Richard Henderson
f44fefca1a * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
From-SVN: r48251
2001-12-21 11:26:08 -08:00
Tom Tromey
e97b32d909 reverted erroneous checking -- sorry about that
From-SVN: r48250
2001-12-21 19:18:52 +00:00
Tom Tromey
82712f8b74 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.

From-SVN: r48249
2001-12-21 19:15:36 +00:00
Tom Tromey
84a944b3ca 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.

From-SVN: r48233
2001-12-21 05:28:27 +00:00
Tom Tromey
2d93b92445 For PR java/4766:
* jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
	case where `finally' clause can't complete normally.

From-SVN: r48232
2001-12-21 05:13:43 +00:00
Tom Tromey
f2af50dbcf re PR java/5057 (gcj -C erroneously omits <clinit>)
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-21 04:37:24 +00:00
Bryce McKinlay
7899e8b9f5 decl.c (java_init_decl_processing): Don't initialize finit_leg_identifier_node.
* 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-20 22:50:21 +00:00
Bryce McKinlay
de4984af13 mangle.c (mangle_member_name): Don't special-case for NO_DOLLAR_IN_LABEL.
* 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-20 22:48:52 +00:00
Bryce McKinlay
08514ae4a5 expr.c (build_java_array_length_access): Don't force null pointer check 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-20 22:47:39 +00:00
Tom Tromey
56b8325e5b re PR java/3417 (Downcast on integral types.)
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-20 17:45:41 +00:00
Joseph Myers
38be19f603 configure.in (all_diff_excludes, [...]): Remove.
* 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-20 00:20:47 +00:00
Joseph Myers
b11cc61089 Separate user and internals manuals.
* 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-17 19:20:05 +00:00
Tom Tromey
e97562f5ce parse.y (link_nested_class_to_enclosing): Removed useless statement.
* parse.y (link_nested_class_to_enclosing): Removed useless
	statement.

From-SVN: r48118
2001-12-17 19:14:07 +00:00
Tom Tromey
2c5187c528 re PR java/5088 (Can't create a java.lang.Object from CNI)
* mangle.c (mangle_method_decl): Never emit `C2' constructor.
	Fixes PR java/5088.

From-SVN: r48083
2001-12-16 22:53:02 +00:00
Joseph Myers
a83f01f040 ChangeLog, [...]: Fix spelling errors.
* 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-16 16:23:50 +00:00
Kaveh R. Ghazi
faf318664d c-lex.c (lex_number): Use ISXDIGIT/hex_value.
* 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-16 13:58:07 +00:00
Bryce McKinlay
9a8de99886 decl.c (java_init_decl_processing): Build otable_type correctly.
* decl.c (java_init_decl_processing): Build otable_type correctly.
	otable_decl is an otable_type.

From-SVN: r48062
2001-12-16 06:09:46 +00:00
Bryce McKinlay
861ef92859 java-tree.h (otable_methods, [...]): New field/global tree definitions.
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-15 08:31:49 +00:00
Matthias Klose
f172748112 gcj.texi: Markup for man page generation.
* 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-14 22:52:17 +00:00
Hans Boehm
eec875422f class.c (get_dispatch_table): Fix java vtable layout for 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-14 19:01:02 +00:00
Matthias Klose
81deb0a3e6 Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove whitespace
at end of line.

From-SVN: r47903
2001-12-11 23:02:49 +00:00
Tom Tromey
34026199b3 lex.c (java_init_lex): Define wfl_to_string as gnu.gcj.runtime.StringBuffer 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-11 17:59:02 +00:00
Jeff Sturm
a3bcfa679b class.c (make_method_value): Use null_pointer_node to represent empty exception table.
* class.c (make_method_value): Use null_pointer_node to
	represent empty exception table.

From-SVN: r47880
2001-12-11 17:15:22 +00:00
Tom Tromey
3afdfae81c * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
From-SVN: r47860
2001-12-11 03:29:12 +00:00
Douglas B Rupp
96a9c44f09 Makefile.in: Add $(OUTPUT_OPTION) to compilation rules.
* 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-10 07:04:24 -05:00
Per Bothner
a5cb134d64 check-init.c (current_switch_has_default): New static field.
* 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-09 20:28:28 -08:00
Tom Tromey
1aca9b81eb check-init.c (check_init): Don't allow pre- or post- increment or decrement 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 23:43:19 +00:00
Tom Tromey
0854b1c4ba * java-tree.h: Fixed typo.
From-SVN: r47805
2001-12-09 06:03:42 +00:00
Tom Tromey
5fcab23524 gjavah.c (decompile_method): Don't decompile to `return this' for static methods.
* gjavah.c (decompile_method): Don't decompile to `return this'
	for static methods.

From-SVN: r47804
2001-12-09 05:14:19 +00:00
Tom Tromey
7b35f6c94f gjavah.c (cxx_keywords): Re-sorted.
* gjavah.c (cxx_keywords): Re-sorted.
	* lex.c (cxx_keywords): Re-sorted.

From-SVN: r47803
2001-12-09 05:06:45 +00:00
Tom Tromey
897c9e66de gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything else.
* gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
	else.

From-SVN: r47802
2001-12-09 01:30:00 +00:00
Tom Tromey
4440ffc4a5 gjavah.c (print_namelet): Clear subnamelets.
* gjavah.c (print_namelet): Clear subnamelets.
	(HANDLE_METHOD): Set `method_printed' earlier.

From-SVN: r47801
2001-12-09 01:26:30 +00:00
Tom Tromey
8f25dc2806 lang.c (lang_f_options): Added optimize-static-class-initialization.
* lang.c (lang_f_options): Added
	optimize-static-class-initialization.
	(java_decode_option): Removed special case.

From-SVN: r47768
2001-12-07 19:01:19 +00:00
Per Bothner
a9040c7798 * check-init.c (check_init): Fix typo freeing memory twice.
From-SVN: r47763
2001-12-07 10:16:21 -08:00
Per Bothner
5412ef6bba Restore support for static class initialization optimization.
From-SVN: r47735
2001-12-06 15:12:55 -08:00
Per Bothner
4f88ccda2d check-init.c: Handle definite unassignment to finals in addition to definite assignment.
* check-init.c:   Handle definite unassignment to finals in addition
	to definite assignment.		[see ChangeLog]

From-SVN: r47619
2001-12-04 11:30:13 -08:00
Per Bothner
87d4ad0804 parse.y (patch_binop): Minor constant folding.
* parse.y (patch_binop):  Minor constant folding.

	* parse.y (build_current_thisn):  Shorter 'buffer'.

From-SVN: r47588
2001-12-03 17:24:59 -08:00