Commit Graph

371 Commits

Author SHA1 Message Date
Bruce Korb
98cc505096 Hapless User Hint for gperf
From-SVN: r29207
1999-09-08 14:08:26 +00:00
Jeff Law
c5c7673583 Merge in gcc2-ss-010999
From-SVN: r29150
1999-09-06 23:49:18 -06:00
Mark Mitchell
6308c57495 Make-lang.in (f771): Depend on ggc-callbacks.o.
* Make-lang.in (f771): Depend on ggc-callbacks.o.
	* Makefile.in (OBJS): Add ggc-callbacks.o.
	(OBJDEPS): Likewise.

From-SVN: r29116
1999-09-05 00:59:59 +00:00
Mark Mitchell
03705c9588 Makefile.in (C_AND_C_OBJS): Add gcc-callbacks.o.
GCC:

Sat Sep  4 13:44:01 1999  Mark Mitchell  <mark@codesourcery.com>

	* Makefile.in (C_AND_C_OBJS): Add gcc-callbacks.o.
	(OBJS): Add $(GCC).
	(ggc-callbacks.o): New target.
	* ggc-callbacks.c: New file.

Chill:

1999-09-04  Mark Mitchell  <mark@codesourcery.com>

	* Make-lang.in (cc1chill): Depend on ggc-callbacks.o.
	* Makefile.in (CHILL_OBJS): Add ggc-callbacks.o.

C++:

1999-09-04  Mark Mitchell  <mark@codesourcery.com>

	* Make-lang.in (cc1plus): Remove dependency on GGC.
	* Makefile.in (OBJS): Don't mention ggc-simple.o.
	(OBJDEPS): Don't mention ggc-simple.o.

F77:

Sat Sep  4 13:46:27 1999  Mark Mitchell  <mark@codesourcery.com>

	* Make-lang.in (f771): Depend on ggc-callbacks.o.
	* Makefile.in (OBJS): Add ggc-callbacks.o.
	(OBJDEPS): Likewise.

Objc:

1999-09-04  Mark Mitchell  <mark@codesourcery.com>

	* Make-lang.in (jc1): Depend on ggc-callbacks.o.
	* Makefile.in (OBJS): Add ggc-callbacks.o.
	(OBJDEPS): Likewise.

From-SVN: r29111
1999-09-04 22:24:18 +00:00
Tom Tromey
2f11d4079a parse.y (strip_out_static_field_access_decl): Return operand if it satisfies JDECL_P.
* parse.y (strip_out_static_field_access_decl): Return operand if
	it satisfies JDECL_P.

From-SVN: r29086
1999-09-03 17:18:11 +00:00
Tom Tromey
3a5395a311 gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
* gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
	Handle nested arrays, like `[[I'.

From-SVN: r29067
1999-09-02 23:44:04 +00:00
Kaveh R. Ghazi
d593dd8c6a class.c (finish_class): Remove unused parameter, all callers changed.
* class.c (finish_class): Remove unused parameter, all callers
	changed.

	* expr.c (build_java_athrow): Change return type to void.
	(java_lang_expand_expr): Make sure each case in switch returns a
	value.

	* java-tree.h (finish_class): Fix prototype to take void args.

	* jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
	(main): Issue return from main, not exit.

	* jcf-parse.c (parse_class_file): Fix call to `finish_class'.

	* jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.

	* jv-scan.c (main): Issue return from main, not exit.

	* parse.y (check_abstract_method_definitions,
	java_check_abstract_method_definitions): Add static prototypes.
	(java_complete_expand_methods): Fix call to `finish_class'.

	* verify.c (verify_jvm_instructions): Initialize variables `oldpc'
	and `prevpc'.

From-SVN: r29065
1999-09-02 21:57:09 +00:00
Kaveh R. Ghazi
f425a8879b c-parse.in (language_string): Constify.
* c-parse.in (language_string): Constify.

	* dwarf2out.c (language_string): Remove declaration.

	* dwarfout.c (language_string): Likewise.

	* toplev.c (language_string, init_parse, finish_parse): Likewise.

	* tree.h (language_string, init_parse, finish_parse): Declare.

	* i386/sun386.h (language_string): Remove declaration.

	* mips.h (language_string): Likewise.

	* nextstep.h (language_string): Likewise.

	* nextstep21.h (language_string): Likewise.

	* rs6000.c (language_string): Likewise.

In ch:
	* parse.c (language_string): Constify.
In cp:
	* parse.y (language_string): Constify.
In f:
	* com.c (language_string): Constify.
In java:
	* lang.c (language_string): Constify.

From-SVN: r29000
1999-08-31 02:16:34 +00:00
Kaveh R. Ghazi
00d30284b8 Makefile.in (LIBS): Fix definition so we link with $(CLIB).
* Makefile.in (LIBS): Fix definition so we link with $(CLIB).
	Remove hacks for stuff which comes from libiberty.

	* Make-lang.in: Likewise.

From-SVN: r28995
1999-08-31 00:34:22 +00:00
Hans-Peter Nilsson
24c30b28cd * Makefile.in (xref.o): Depend on xref.c explicitly.
From-SVN: r28988
1999-08-30 16:42:01 -06:00
Kaveh R. Ghazi
1b93a502f9 java-tree.h (lang_printable_name): Constify a char*.
* java-tree.h (lang_printable_name): Constify a char*.

	* lang.c (lang_printable_name): Likewise.

From-SVN: r28970
1999-08-29 13:51:39 +00:00
Jeffrey A Law
5f9ee6953e gjavah.c, [...]: Do not use C++ style comments in C code.
* gjavah.c, jcf-write.c, verify.c: Do not use C++ style
        comments in C code.

From-SVN: r28940
1999-08-27 23:33:02 -06:00
Tom Tromey
12207a8790 gjavah.c (print_cxx_classname): Print "::" before qualified name.
* gjavah.c (print_cxx_classname): Print "::" before qualified
	name.

http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&database=java&pr=36

From-SVN: r28902
1999-08-26 18:23:33 +00:00
Gregg Townsend
ee5cd6389e verify.c (verify_jvm_instructions): Don't check instruction validity beyond end of method.
Wed Aug 25 15:37:15 1999  Gregg Townsend  <gmt@cs.arizona.edu>

        * verify.c (verify_jvm_instructions): Don't check instruction
        validity beyond end of method.

From-SVN: r28897
1999-08-26 10:00:57 -07:00
Alexandre Petit-Bianco
f441f67120 re GNATS gcj/32 (A boolean expression containing two qualified expressions makes jc1 die.)
Thu Aug 26 09:10:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * parse.y (lookup_cl): Changed leading comment. Now does its best
        to set the column number.
        (qualify_ambiguous_name): Take WFL wrappers into account.

This patch fixes the Java net PR #32.

From-SVN: r28894
1999-08-26 09:51:49 -07:00
Tom Tromey
20c96b2a12 * jvspec.c (lang_specific_driver): Correctly handle --help again.
From-SVN: r28869
1999-08-25 18:37:05 +00:00
Kaveh R. Ghazi
be245ac0a0 gjavah.c (print_name, [...]): Add static prototype.
* gjavah.c (print_name, print_base_classname, utf8_cmp,
	cxx_keyword_subst, generate_access, name_is_method_p,
	get_field_name, print_field_name, super_class_name, print_include,
	decode_signature_piece, print_class_decls, usage, help,
	java_no_argument, version, add_namelet, print_namelet): Add static
	prototype.
	(print_base_classname, utf8_cmp, cxx_keyword_subst,
	name_is_method_p): Constify a char*.
	(get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
	Provide a final else clause in an if-else-if.
	(print_field_info): Add missing final arg in function call to
	`print_field_name'.
	(print_method_info, decompile_method, decode_signature_piece,
	print_c_decl, print_full_cxx_name, print_stub,
	print_mangled_classname, super_class_name, print_include,
	add_namelet, add_class_decl, print_class_decls, process_file,
	help): Constify a char*.

	* jcf-write.c (jcf_handler, push_constant1, push_constant2,
	push_int_const, find_constant_wide, find_constant_index,
	push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
	emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
	emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
	emit_if, emit_goto, emit_jsr, call_cleanups,
	make_class_file_name): Add static prototypes.
	(generate_bytecode_return, generate_bytecode_insns): Pass a
	NULL_PTR, not a NULL_TREE.

	* jv-scan.c: Include "jcf.h".
	(main): Declare using DEFUN macro.

	* jvspec.c (find_spec_file, lang_specific_pre_link,
	lang_specific_driver): Add prototypes.
	(find_spec_file): Constify a char*.

	* keyword.gperf (hash, java_keyword): Add prototypes.

	* lang.c (lang_print_error): Add static prototype.
	(lang_init): Prefer memcpy over bcopy to avoid casts.

	* lex.c (yylex): Add static prototype.

	* parse-scan.y: Include "lex.c" earlier.

	* parse.h: Remove redundant declaration for `yylex'.

	* parse.y (java_decl_equiv, binop_compound_p, search_loop,
	labeled_block_contains_loop_p): Add static prototypes.
	(not_accessible_p): Make static to match prototype.

	* verify.c (start_pc_cmp): Don't needlessly cast away const.

From-SVN: r28862
1999-08-25 13:59:28 +00:00
Alexandre Petit-Bianco
d77613be8b re GNATS gcj/30 (gcj not reporting unimplemented methods)
Sun Aug 22 11:07:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* parse.y (check_method_redefinition): Changed leading comment.
	(check_abstract_method_definitions): New function.
	(java_check_abstract_method_definitions): New function.
	(java_check_regular_methods): Call it.
	(verify_constructor_super): Fixed indentation.
	(lookup_method_invoke): Likewise.

(This fixes the Java net PR #30,
 http://sourceware.cygnus.com/ml/java-prs/1999-q3/msg00034.html)

From-SVN: r28805
1999-08-22 11:38:07 -07:00
Alexandre Petit-Bianco
79d133336a re GNATS gcj/17 (Internal error: segfault on import-classname clash)
Thu Aug 19 10:26:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * parse.y (method_header): Return a null pointer if the current
        class node is null.
        (finish_method_declaration): Return if the current function decl
        is null.
        (source_start_java_method): Likewise.
        (java_method_add_stmt): Likewise.

This fixes the net PR #17.

From-SVN: r28765
1999-08-19 13:37:04 -07:00
Alexandre Petit-Bianco
5cbdba6424 [multiple changes]
Wed Aug 18 13:17:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* class.c (emit_register_class): Removed unnecessary call to
 	start_sequence.
	* parse.y (labeled_block_contains_loop_p): Removed unused local
 	variable.

Tue Aug 17 22:51:44 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * parse.y (java_refold): Added prototype.

Tue Aug 17 21:48:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
        (java_stabilize_reference): Removed unnecessary `else'.
        (java_complete_lhs): Set flag to remember boolean. Call
        java_refold. Added comments.
        (java_decl_equiv): New function.
        (binop_compound_p): Likewise.
        (java_refold): Likewise.
        (patch_unaryop): Striped static field access assigned to decl and
        op. Changed promotion scheme for ++/-- operators.
        (search_loop): New function.
        (labeled_block_contains_loop_p): Likewise.
        (patch_loop_statement): Call labeled_block_contains_loop_p. Added
        comment.
        (patch_bc_statement): Call search_loop. Fixed comment.

Mostly bug fixes in some forms of compound expressions and
break/continue target lookup.

From-SVN: r28758
1999-08-18 17:53:20 -07:00
Anthony Green
66e064294f expr.c (java_lang_expand_expr): Mark static array data as referenced.
* expr.c (java_lang_expand_expr): Mark static array data as
        referenced.

From-SVN: r28714
1999-08-15 08:31:56 +00:00
Rainer Orth
9a81650073 * jvgenmain.c (main): NUL-terminate name_obstack.
From-SVN: r28655
1999-08-11 05:03:11 +00:00
Kaveh R. Ghazi
c8e7d2e632 check-init.c (check_bool2_init, [...]): Add static prototypes.
* check-init.c (check_bool2_init, done_alternative): Add static
	prototypes.

	* class.c (add_interface_do, maybe_layout_super_class): Likewise.
	(add_method, build_utf8_ref, build_class_ref,
	append_gpp_mangled_type, layout_class_method): Constify a char*.

	* decl.c (push_promoted_type, make_binding_level): Add static
	prototypes.
	(push_promoted_type, pushdecl): Constify a char*.

	* except.c (find_handler_in_range, link_handler,
	check_start_handlers): Add static prototypes.

	* expr.c (process_jvm_instruction): Constify a char*.

	* gjavah.c (main): Constify a char*.

	* java-tree.h (verify_jvm_instructions, process_jvm_instruction):
	Constify a char*.

	* jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
	static prototypes.
	(add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
	munge, print_ents): Constify a char*.

	* jcf-dump.c (disassemble_method): Constify a char*.
	(print_constant_pool, print_exception_table): Add static prototypes.
	(print_constant, print_exception_table, main, disassemble_method):
	Constify a char*.

	* jcf-io.c (find_classfile, find_class): Likewise.

	* jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
	(set_source_filename, predefined_filename_p): Add static prototypes.
	(set_source_filename, get_constant, get_class_constant,
	find_in_current_zip): Constify a char*.

	* jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
	static prototypes.
	(add_entry, add_path, jcf_path_classpath_arg,
	jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.

	* jcf-reader.c (get_attribute, jcf_parse_preamble,
	jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
	jcf_parse_one_method, jcf_parse_methods,
	jcf_parse_final_attributes): Add static prototypes.
	(get_attribute): Constify a char*.

	* jcf.h (find_class, find_classfile, jcf_dependency_set_target,
	jcf_dependency_add_target, jcf_path_classpath_arg,
	jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.

	* jv-scan.c (main): Constify a char*.
	(gcc_obstack_init): Add prototype arguments.

	* jvgenmain.c (gcc_obstack_init): Likewise.
	(main): Constify a char*.

	* lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
	static prototypes.
	(put_decl_string, lang_print_error): Constify a char*.
	(lang_init): Remove redundant extern prototype.

	* mangle.c (emit_unicode_mangled_name): Constify a char*.

	* typeck.c (convert_ieee_real_to_integer, parse_signature_type):
	Add static prototypes.
	(get_type_from_signature): Constify a char*.

	* verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
	Add static prototypes.
	(start_pc_cmp): Prefer PTR over GENERIC_PTR.
	(verify_jvm_instructions): Constify a char*.

	* xref.c (xref_flag_value): Likewise.

	* xref.h (xref_flag_value): Likewise.

	* zextract.c (makeword, makelong): Add static prototypes.
	(makeword, makelong): Constify a uch*.

From-SVN: r28648
1999-08-10 16:58:13 +00:00
Kaveh R. Ghazi
0070eeda65 lang.c (java_dummy_print): Constify a char*.
* lang.c (java_dummy_print): Constify a char*.
        (lang_print_error): Likewise.
        (lang_init): Remove redundant prototype for `print_error_function'.
        (lang_init_source): Likewise.
        (lang_identify): Constify a char*.

From-SVN: r28635
1999-08-09 23:52:36 +00:00
Tom Tromey
63ac1f08b7 javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
* javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
	(WORDS_TO_LONG): Likewise.
	(WORDS_TO_DOUBLE): Likewise.

From-SVN: r28630
1999-08-09 21:14:12 +00:00
Kaveh R. Ghazi
49f48c719e Warning fixes:
* Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).

        * expr.c (java_stack_pop, java_array_data_offset,
        build_java_throw_out_of_bounds_exception, case_identity,
        build_java_check_indexed_type): Add static prototypes.
        (linenumber_table, expand_invoke, expand_java_field_op,
        build_primtype_type_ref, expand_byte_code): Constify a char*.

        * java-tree.h (build_primtype_type_ref, linenumber_table):
        Constify a char*.
        (java_lang_expand_expr): Add prototype.

        * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
        `java_lang_expand_expr'.

        * lex.c (java_lex_error): Constify a char*.
        (java_get_unicode, java_read_char, java_allocate_new_line,
        java_unget_unicode, java_sneak_unicode): Prototype.

        * parse-scan.y (current_class, package_name, method_declarator,
        report_class_declaration, yyerror): Constify a char*.

        * parse.h (java_report_errors): Prototype.
        (yyerror): Constify a char*.

        * parse.y (classitf_redefinition_error, check_modifiers,
        parse_jdk1_1_error, lookup_package_type,
        lookup_package_type_and_set_next, get_printable_method_name,
        purify_type_name): Constify a char*.
        (build_super_invocation, maybe_generate_finit,
        verify_constructor_super, parser_add_interface,
        add_superinterfaces, jdep_resolve_class, note_possible_classname,
        java_complete_expand_methods, java_expand_finals,
        cut_identifier_in_qualified, java_stabilize_reference,
        do_unary_numeric_promotion, operator_string, do_merge_string_cste,
        merge_string_cste): Prototype.
        (single_type_import_declaration, yyerror,
        variable_redefinition_error, build_array_from_name,
        build_unresolved_array_type, check_class_interface_creation,
        resolve_class, complete_class_report_errors,
        note_possible_classname, read_import_dir,
        find_in_imports_on_demand, resolve_package, fix_constructors,
        check_deprecation, lookup_method_invoke,
        maybe_build_primttype_type_ref, array_constructor_check_entry):
        Constify a char*.
        (java_complete_expand_methods, java_expand_finals): Make static.
        (convert_narrow): Remove static prototype.

From-SVN: r28498
1999-08-04 13:30:51 +00:00
J"orn Rennecke
02edc62b77 Makefile.in (c-decl.o): Depends on defaults.h.
* Makefile.in (c-decl.o): Depends on defaults.h.
	* java/Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.

From-SVN: r28479
1999-08-03 23:01:21 +01:00
Richard Henderson
0ae70c6a94 decl.c: Include defaults.h instead of expr.h.
* decl.c: Include defaults.h instead of expr.h.
        * parse.y: Likewise.

From-SVN: r28431
1999-08-02 17:57:50 -07:00
Jakub Jelinek
e438e1b788 Jakub Jelinek <jj@ultra.linux.cz>
* java/decl.c (start_java_method): Change all uses of
        PROMOTE_PROTOTYPES, so that it tests it as a C expression.
        Ensure expr.h is included.
        * java/expr.c (pop_arguments): Ditto.
        * java/parse.y (expand_start_java_method): Ditto.

From-SVN: r28419
1999-08-02 16:14:31 -07:00
Kaveh R. Ghazi
9490b7d6af * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
From-SVN: r28372
1999-08-01 04:26:47 +00:00
Bernd Schmidt
b384405b34 Backport of GC branch patches part 1: kill eh status saving.
From-SVN: r28357
1999-07-31 12:46:53 +00:00
Kaveh R. Ghazi
cd531a2edd Warning fixes:
* expr.c (build_java_soft_divmod): Provide a default case in switch.
        (java_lang_expand_expr): Mark parameters `target', `tmode' and
        `modifier' with ATTRIBUTE_UNUSED.

        * gjavah.c (process_file): Add braces around ambiguous `else'.

        * jcf-dump.c (print_access_flags, localvar_free): Change return
        type to void.

        * parse.y (java_complete_expand_method): Initialize variable
        `exception_copy'.
        (resolve_qualified_expression_name): Likewise for `field_decl'.
        (patch_method_invocation): Likewise for `class_to_search'.
        (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
        (patch_assignment): Likewise for `lhs_type'.

        * verify.c (verify_jvm_instructions): Remove unused variable
        `caller'.

From-SVN: r28344
1999-07-30 18:31:34 +00:00
Richard Henderson
8824cf7e49 * decl.c (va_list_type_node): New.
From-SVN: r28240
1999-07-25 18:19:02 -07:00
Anthony Green
6c9c5c1f7a gjavah.c (print_stub): New function.
* gjavah.c (print_stub): New function.
        (METHOD_IS_NATIVE): New macro.
        (print_mangled_classname): Make static.
        (HANDLE_END_FIELD): Don't emit fields during stub generation.
        (process_file): Perform stub generation.
        (HANDLE_METHOD): Don't emit class decls during stub
        generation.
        (HANDLE_END_METHOD): Take into account stub generation.
        (print_method_info): Handle stub generation.
        (print_stub): New function.
        (print_cxx_classname): Make signature consistant with others.
        (help): Describe -stubs option.
        (main): Create stub file.
        (version): Use version.c.
        (print_full_cxx_name): New function.
        (print_c_decl): Use print_full_cxx_name.

From-SVN: r28236
1999-07-25 10:12:49 +00:00
Alexandre Petit-Bianco
ac1d97ceb6 re GNATS gcj/14 (Conditional expression in method call doesn't compile)
Thu Jul 22 12:41:12 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* check-init.c (check_init): Handle MAX_EXPR.

(Fix to net PR #14.)

From-SVN: r28220
1999-07-22 12:29:56 -07:00
Andrew Haley
0b094f655a lang.c (flag_use_divide_subroutine): New variable.
1999-07-15  Andrew Haley  <aph@cygnus.com>

        * lang.c (flag_use_divide_subroutine): New variable.
        * typeck.c: (convert_ieee_real_to_integer): Bounds check
        fp-to-integer conversion.
        (convert): Call convert_ieee_real_to_integer when flag_fast_math
        is not set.

        * expr.c (build_java_soft_divmod): New function.
        (build_java_binop): Call build_java_soft_divmod if
        flag_use_divide_subroutine is set.
        * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
        soft_lrem_node: new builtin functions.
        (init_decl_processing) Initialize the new builtins.
        * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
        soft_lrem_node: new builtin functions.
        (build_java_soft_divmod): New function.
        * parse.y: Call build_java_soft_divmod if
        flag_use_divide_subroutine is set.
        * parse.c: Rebuilt.

        * jvspec.c (lang_specific_driver): Always allow an extra arg (for
        a --specs= arg) even if not linking.
        * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
        -fuse-divide-subroutine

From-SVN: r28209
1999-07-21 14:51:24 +00:00
Andrew Haley
aa4759c11c lang.c (flag_use_divide_subroutine): New variable.
1999-07-15  Andrew Haley  <aph@cygnus.com>

        * lang.c (flag_use_divide_subroutine): New variable.
        * typeck.c: (convert_ieee_real_to_integer): Bounds check
        fp-to-integer conversion.
        (convert): Call convert_ieee_real_to_integer when flag_fast_math
        is not set.

        * expr.c (build_java_soft_divmod): New function.
        (build_java_binop): Call build_java_soft_divmod if
        flag_use_divide_subroutine is set.
        * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
        soft_lrem_node: new builtin functions.
        (init_decl_processing) Initialize the new builtins.
        * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
        soft_lrem_node: new builtin functions.
        (build_java_soft_divmod): New function.
        * parse.y: Call build_java_soft_divmod if
        flag_use_divide_subroutine is set.

From-SVN: r28208
1999-07-21 14:28:33 +00:00
Alexandre Petit-Bianco
7705e9db01 re GNATS gcj/12 (gcj accepts invalid code where an exception must be caught/thrown)
Tue Jul 20 13:20:05 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * parse.y (resolve_and_layout): Check methods only once.
        (resolve_qualified_expression_name): Verify thrown exceptions
        compatibility.
        (check_thrown_exceptions): Reject exceptions thrown in
        initializer. Error message tuned.

(This fixes PR #12. Libgcj's java/net must be updated in order to compiles
 with a patch at this URL:
 http://sourceware.cygnus.com/ml/java-patches/1999-q3/msg00048.html)

From-SVN: r28196
1999-07-20 13:56:10 -07:00
Andrew Haley
e533f648af expr.c (expand_expr): Do not return the last statement in a block as the block's value.
1999-07-14  Andrew Haley  <aph@cygnus.com>
        * expr.c (expand_expr): Do not return the last statement in a
        block as the block's value.

From-SVN: r28112
1999-07-15 05:17:08 +00:00
Alexandre Petit-Bianco
1a6d4fb73c [multiple changes]
Sat Jul  3 22:26:32 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
 	CALL_EXPR, to avoid order of evaluation changes.
Fri Jul  2 17:44:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* parse.y (qualify_ambiguous_name): Do not use
 	IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
Thu Jul  1 23:31:16 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* check-init.c (check_init): Handle MAX_EXPR.
	* expr.c (force_evaluation_order): Force method call arguments to
 	be evaluated in left-to-right order.
	* parse.y (qualify_ambiguous_name): Loop again to qualify
 	NEW_ARRAY_EXPR properly.
Wed Jun 30 17:27:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* parse.y (patch_invoke): Resolve unresolved invoked method
 	returned type.
	(qualify_ambiguous_name): STRING_CST to qualify expression for
 	type name resolution.

From-SVN: r27998
1999-07-07 06:11:03 -07:00
Andrew Haley
ac8f5d48cb class.c (finish_class): Whenever a deferred method is output...
1999-06-24  Andrew Haley  <aph@cygnus.com>
        * class.c (finish_class): Whenever a deferred method is
        output, rescan the list of methods to see if a new candidate for
        output can be found.

From-SVN: r27872
1999-07-01 06:03:28 +00:00
Tom Tromey
4198d73419 * jvspec.c (lang_specific_driver): Recognize --help.
From-SVN: r27814
1999-06-28 11:34:35 +00:00
Alexandre Petit-Bianco
2c56429a68 [multiple changes]
Fri Jun 25 13:35:19 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* parse.y (resolve_package): Fixed bogus return statement.
	(patch_method_invocation): Resolve method invocation beginning with
 	a package name qualifier.
Thu Jun 24 13:12:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* parse.y (java_complete_lhs): When doing cross referencing, don't
 	try to keep file location on a WFL expanded as a CALL_EXPR.
Wed Jun 23 14:37:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* parse.y (finish_method_declaration): Insert a RETURN_EXPR when
 	compiling to class file a void method with an empty method body.
  	As a side effect, the bytecode backend will generate the
 	appropriate `return' instruction.
Tue Jun 22 20:43:49 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* parse.y (lookup_package_type_and_set_next): New function prototype.
	(resolve_package): Search current and imported packages.
	(lookup_package_type_and_set_next): New function.

From-SVN: r27773
1999-06-25 09:33:20 -07:00
Kaveh R. Ghazi
58ec428559 SMP bootstrap fixes for chill:
* Make-lang.in (CHILL.stage1): Depend on stage1-start.
        (CHILL.stage2): Likewise for stage2-start.
        (CHILL.stage3): Likewise for stage3-start.
        (CHILL.stage4): Likewise for stage4-start.
SMP bootstrap fixes for java:
        * Make-lang.in (java.stage1): Depend on stage1-start.
        (java.stage2): Likewise for stage2-start.
        (java.stage3): Likewise for stage3-start.
        (java.stage4): Likewise for stage4-start.

From-SVN: r27766
1999-06-25 08:21:47 +00:00
Andrew Haley
45b0aa3189 verify.c (verify_jvm_instructions): Check for pending blocks before invalid PC test and opcode switch, not after.
1999-06-22  Andrew Haley  <aph@cygnus.com>
	* verify.c (verify_jvm_instructions): Check for pending blocks
	before invalid PC test and opcode switch, not after.

From-SVN: r27710
1999-06-22 23:22:13 +00:00
Andrew Haley
44d7502b78 except.c (find_handler_in_range): The upper limit for exception ranges is exclusive, not inclusive...
1999-06-21  Andrew Haley  <aph@cygnus.com>
        * except.c (find_handler_in_range): The upper limit for exception
        ranges is exclusive, not inclusive: (start <= pc < end).
        (link_handler): find child pointer which points to outer by
        searching sibling list: previous code incorrectly assumed that
        outer->outer->first_child must point to outer.
        * verify.c (verify_jvm_instructions): FIXME added to code for
        `athrow'.
        (verify_jvm_instructions): Do not assume that the last block
        processed in a subroutine is a block which ends with a `ret'
        instruction.  With some control flows it is possible that the last
        block ends with an `athrow'.

From-SVN: r27658
1999-06-21 09:18:50 +00:00
Alexandre Petit-Bianco
8576f0942e [multiple changes]
Mon Jun 14 13:13:39 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* parse.y (qualify_ambiguous_name): Reorganized the post
 	evaluation of non WFL leading expression nodes.
Fri Jun 11 21:37:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
 	CONVERT_EXPR.
Thu Jun 10 22:26:17 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* parse.y (qualify_ambiguous_name): Handle qualified expression
 	beginning with a STRING_CST.
Thu Jun 10 20:27:25 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* parse.y (register_fields): Set DECL_INITIAL on both
 	pre-initialized static and public fields.
	(resolve_field_access): Static field access expressions to always
 	use pointer types.
	(qualify_ambiguous_name): Work out buried CALL_EXPR for proper
 	qualification. CONVERT_EXPR to be resolved as an expression name.
	(java_complete_lhs): Identify and access qualified final
 	initialized field in switch statement case expression.
	(fold_constant_for_init): Pre-initialized field decl constant to
 	be folded.

From-SVN: r27523
1999-06-14 10:15:35 -07:00
Alexandre Petit-Bianco
fe0e4d76c2 parse.y (note_possible_classname): Mark returned node with QUALIFIED_P only if the original class name contained a '/'.
Mon Jun  7 16:09:51 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
	* parse.y (note_possible_classname): Mark returned node with
 	QUALIFIED_P only if the original class name contained a '/'.

From-SVN: r27396
1999-06-07 10:08:34 -07:00
Anthony Green
db1421c77b [multiple changes]
Sat Jun  5 11:46:59 1999  Anthony Green  <green@cygnus.com>
        * Make-lang.in (gcjh): More parallel build fixes.
1999-06-03  Mike Stump  <mrs@wrs.com>
        * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.

From-SVN: r27373
1999-06-05 15:06:44 +00:00
Anthony Green
99fd3aa538 [multiple changes]
Wed Jun  2 10:44:38 1999  Anthony Green  <green@cygnus.com>
	* except.c (link_handler): Chain exception handlers in order.
Wed Jun  2 10:41:24 1999  Anthony Green  <green@cygnus.com>
	* expr.c (expand_byte_code): Fill unreachable bytecode regions
 	with nops and process as usual in order to always set correct EH
 	ranges.  Emit detailed warnings about unreachable bytecodes.
Wed Jun  2 10:35:13 1999  Anthony Green  <green@cygnus.com>
	* class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
 	constant.
(From egcs posted patches.)

From-SVN: r27314
1999-06-02 04:00:44 -07:00