Commit Graph

25 Commits

Author SHA1 Message Date
Kelley Cook
f12c30a8f1 Update FSF address.
From-SVN: r101309
2005-06-25 00:33:05 +00:00
Kazu Hirata
1ddc032813 jcf-dump.c, [...]: Update copyright.
* jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
	typeck.c: Update copyright.

From-SVN: r95967
2005-03-06 12:57:57 +00:00
Per Bothner
837491bcc8 jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45) if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE...
* jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
	if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.

From-SVN: r95748
2005-03-01 09:03:45 -08:00
Tom Tromey
f94ae54025 lang-options.h: Added -Wdeprecated.
* lang-options.h: Added -Wdeprecated.
	* gcj.texi (Warnings): Document -Wdeprecated.
	* java-tree.h (flag_deprecated): Declare.
	* lang.c (lang_W_options): Added deprecated.
	(flag_deprecated): New global.
	* chartables.h: Rebuilt.
	* gen-table.pl (process_one): Look at whitespace.
	(print_tables): Define LETTER_SPACE, LETTER_MASK.
	* parse.h (CLEAR_DEPRECATED): New macro.
	(CHECK_DEPRECATED_NO_RESET): New macro.
	* jcf-parse.c (handle_deprecated): New function.
	(HANDLE_DEPRECATED_ATTRIBUTE): New define.
	* jcf-reader.c (get_attribute): Handle Deprecated attribute.
	* parse.y (resolve_type_during_patch): Check deprecation.
	(jdep_resolve_class): Likewise.
	(process_imports): Likewise.
	(resolve_expression_name): Likewise.
	(check_deprecation): Strip arrays from decl.  Check
	flag_deprecated.
	(patch_method_invocation): Also check the particular constructor
	for deprecation.
	(register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
	* jcf-write.c (append_deprecated_attribute): New function.
	(generate_classfile): Generate deprecated attribute when
	appropriate.
	* lex.c (java_parse_doc_section): Return type now void.  Rewrote.
	(java_lex) [case '*']: Simplify logic.
	(java_start_char_p): Use LETTER_MASK.
	(java_part_char_p): Likewise.
	(java_space_char_p): New function.

From-SVN: r63350
2003-02-24 02:14:49 +00:00
Kaveh R. Ghazi
0a2f0c5497 * All Files: Convert to ISO C style function definitions.
From-SVN: r61218
2003-01-12 02:14:56 +00:00
Geoffrey Keating
17211ab553 Merge from pch-branch.
From-SVN: r61136
2003-01-10 02:22:34 +00:00
Kaveh R. Ghazi
d2097937c5 * All Files: Remove PARAMS macro.
From-SVN: r61133
2003-01-09 23:16:56 +00:00
Kaveh R. Ghazi
6ff2fe3933 expr.c, [...]: Don't rely on the DEFUN', AND' or `__STDC__' macros.
* expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
	jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
	`__STDC__' macros.

From-SVN: r61131
2003-01-09 23:13:02 +00:00
Steven Bosscher
43c6a96ab2 except.c, [...]: Fix Copyright years.
2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>

	* cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
	  cp/lang-options.h, cp/lang-specs.h, cp/lex.h,
	  cp/ptree.c, cp/repo.c,
	  java/jcf-reader.c, java/jvgenmain.c,
	  java/keyword.gperf, java/lang-options.h,
	  java/mangle.c, java/mangle_name.c,
	  java/xref.c, java/zextract.c,java/zipfile.h,
	  objc/Make-lang.in, objc/config-lang.in,
	  objc/lang-specs.h, objc/objc-act.h: Fix
	  Copyright years.

From-SVN: r60783
2003-01-02 12:39:56 +01:00
Steven Bosscher
f309ff0a12 Make-lang.in, [...]: Replace "GNU CC" with "GCC" in the copyright header.
* Make-lang.in, boehm.c, buffer.c,
	  buffer.h, builtins.c, class.c,
	  config-lang.in, constants.c,
	  convert.h, decl.c, except.c,
	  expr.c, java-except.h,
	  java-tree.h, javaop.def,
	  jcf-parse.c, jcf-write.c,
	  jv-scan.c, jvgenmain.c,
	  jvspec.c, keyword.gperf,
	  keyword.h, lang-options.h,
	  lang-specs.h, lang.c, lex.c,
	  lex.h, mangle.c, mangle_name.c,
	  parse-scan.y, parse.h, parse.y,
	  typeck.c, verify.c, xref.c,
	  xref.h: Replace "GNU CC" with
	  "GCC" in the copyright header.

	* check-init.c, gjavah.c, javaop.h,
	  jcf-depend.c, jcf-dump.c, jcf-io.c,
	  jcf-path.c, jcf-reader.c, jcf.h,
	  zextract.c, zipfile.h: These files are
	  "part of GCC". Also say "GCC" not "GNU CC".

From-SVN: r60747
2003-01-01 15:10:03 +00:00
Diego Novillo
b4bbc8b7d3 jcf-reader.c: Don't expand JCF_readu4 inside the expansion of JCF_SKIP.
* jcf-reader.c: Don't expand JCF_readu4 inside the
	expansion of JCF_SKIP.

From-SVN: r59459
2002-11-25 09:22:06 -05:00
Alexandre Petit-Bianco
b124f72e29 re PR java/1213 (gcj should check for incorrect CLASSPATH)
2001-03-22  Alexandre Petit-Bianco  <apbianco@redhat.com>

	* gcj.texi (Input Options): documented the check for attribute
	`gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
	* java-tree.h (flag_force_classes_archive_check): Declared extern.
	* jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
	(jcf_parse): Check for the right classes archive if necessary.
	* jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
	(jcf_parse_fields): Fixed indentation.
	* jcf-write.c (append_gcj_attribute): New function.
	(generate_classfile): Compute the attribute count, invoke
	`append_gcj_attribute'.
	* jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
	turned into bit fields. New bit field `right_zip.'
	(JCF_ZERO): Set `right_zip' to zero.
	* lang-options.h (-fforce-classes-archive-check): Added flag.
	* lang.c (flag_force_classes_archive_check): New flag.
	(lang_f_options): New entry `force-classes-archive-check.'
	Fixes PR java/1213.

(http://gcc.gnu.org/ml/gcc-patches/2001-03/msg01662.html)

From-SVN: r40788
2001-03-23 11:42:25 -08:00
Alexandre Petit-Bianco
493d561d62 class.c (layout_class): Don't lay the superclass out if it's already being laid out.
2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* class.c (layout_class): Don't lay the superclass out if it's
	already being laid out.
	* jcf-parse.c (handle_innerclass_attribute): New function.
	(HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
	handle_innerclasses_attribute.
	(jcf_parse): Don't load an innerclasses if it's already being
	laid out.
	* jcf-write.c (append_innerclass_attribute_entry): Static
	`anonymous_name' and its initialization deleted. `ocii' and `ini'
	to be zero for anonymous classes.

2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
	necessary.
	* jcf-parse.c (set_source_filename): Use
	MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.

2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
	gets a unique asm name.

2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
	(HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
	if necessary.
	(HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
	* jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
	* parse.y (lookup_package_type_and_set_next): Deleted.
	(resolve_package): Removed unnecessary code.
	(find_applicable_accessible_methods_list): `finit$' can't be
 	inherited.
	* verify.c (pop_argument_types): Added missing prototype.

(http://gcc.gnu.org/ml/gcc-patches/2001-01/msg01812.html)

From-SVN: r39230
2001-01-24 00:08:36 -08:00
Kaveh R. Ghazi
80393943c7 Warning fixes:
* gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define

	* jcf-reader.c (peek_attribute, skip_attribute): Only define
	when requested.

	* parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.

	* verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.

From-SVN: r36994
2000-10-21 15:10:38 +00:00
Alexandre Petit-Bianco
f0f3a77740 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com
* parse.y (build_dot_class_method_invocation): Changed parameter
	name to `type.' Build signature from `type' and convert it to a
	STRING_CST if it's an array.
	(patch_incomplete_class_ref): `build_dot_class_method_invocation'
	to use `ref_type' directly.

2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* parse.y (maybe_yank_clinit): When generating bytecode: non empty
	method bodies not to rule out discarding `<clinit>'; don't use
	<clinit> to initialize static fields with constant initializers.

2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* gjavah.c (print_method_info): Added `synth' parameter. Skip
	synthetic methods.
	(method_synthetic): New global.
	(HANDLE_METHOD): Recognize synthetic method and tell
	`print_method_info' about it.
	(HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
	processing a synthetic method.
	* jcf-reader.c (skip_attribute): New function.
	( skip_attribute): Likewise.

2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* parse.y (build_outer_field_access): Fixed comments.
	(fix_constructors): Emit the initialization of this$<n> before
	calling $finit$.
	(resolve_qualified_expression_name): Build an access to `decl' if
	necessary.

2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* parse-scan.y (curent_class): Non longer const.
	(inner_qualifier, inner_qualifier_length): Deleted.
	(current_class_length): New global.
	(bracket_count): Fixed typo in leading comment.
	(anonymous_count): New global.
	(class_instance_creation_expression:): Handle anonymous classes.
	(anonymous_class_creation:): New rule.
	(push_class_context): Rewritten.
	(pop_class_context): Likewise.
	(INNER_QUALIFIER): Macro deleted.
	(report_class_declaration): call `push_class_context' when
	entering the function. `fprintf' format modified not to use
	INNER_QUALIFIER.
	(report_class_declaration): Assign `package_name' and
	`current_class' to NULL separatly.

2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* expr.c (build_invokeinterface): Call layout_class_methods on
	target interface.

(http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00339.html)

From-SVN: r35560
2000-08-07 20:33:36 -07:00
Alexandre Petit-Bianco
c2952b018a Added Java 1.1 language features.
From-SVN: r32517
2000-03-13 21:01:05 -08:00
Jeff Law
3852e8afcc Fix copyrights
From-SVN: r32182
2000-02-26 13:02:01 -07:00
Kaveh R. Ghazi
df32d2ce42 buffer.h: PROTO -> PARAMS.
* buffer.h: PROTO -> PARAMS.
        * check-init.c: Likewise.
        * class.c: Likewise.
        * constants.c: Likewise.
        * convert.h: Likewise.
        * decl.c: Likewise.
        * except.c: Likewise.
        * expr.c: Likewise.
        * gjavah.c: Likewise.
        * java-except.h: Likewise.
        * java-tree.h: Likewise.
        * jcf-depend.c: Likewise.
        * jcf-dump.c: Likewise.
        * jcf-parse.c: Likewise.
        * jcf-path.c: Likewise.
        * jcf-reader.c: Likewise.
        * jcf-write.c: Likewise.
        * jcf.h: Likewise.
        * jv-scan.c: Likewise.
        * jvgenmain.c: Likewise.
        * jvspec.c: Likewise.
        * lang.c: Likewise.
        * lex.c: Likewise.
        * lex.h: Likewise.
        * parse-scan.y: Likewise.
        * parse.h: Likewise.
        * parse.y: Likewise.
        * typeck.c: Likewise.
        * verify.c: Likewise.
        * xref.c: Likewise.
        * xref.h: Likewise.
        * zextract.c: Likewise.
        * zipfile.h: Likewise.

From-SVN: r31550
2000-01-21 20:57:00 +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
b4b63e32e6 expr.c (expand_invoke): Mark parameter `nargs' with ATTRIBUTE_UNUSED.
* expr.c (expand_invoke): Mark parameter `nargs' with
        ATTRIBUTE_UNUSED.
        (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
        * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
        ATTRIBUTE_UNUSED.
        * jcf-reader.c (get_attribute): Cast a value to long
        when comparing against a signed expression.  Likewise.

From-SVN: r26907
1999-05-12 17:04:30 +00:00
Kaveh R. Ghazi
7e21fe59b2 Warning fixes:
* constants.c (find_class_or_string_constant): Cast variable `j'
        to a `jword' when comparing against one.
        * expr.c (java_lang_expand_expr): Remove unused variables
        `has_finally_p' and `op0'.
        * gjavah.c (print_field_info): Cast a value to jint when comparing
        against one.  Likewise for a jlong.
        (add_namelet): Likewise cast a `sizeof' to an int when comparing
        against a signed quantity.
        * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
        (print_signature): Don't needlessly dereference variable `str'
        * jcf-reader.c (get_attribute): Mark variables `max_stack' and
        `max_locals' with ATTRIBUTE_UNUSED.
        (jcf_parse_class): Likewise for variable `index'.
        * parse.h (reverse_jdep_list): Remove static prototype.
        * parse.y (build_jump_to_finally): Remove prototype and definition.
        (reverse_jdep_list): Add static prototype.
        * typeck.c (convert_ieee_real_to_integer): Remove unused variables
        `assignment' and `expr_decl'.
        * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.

From-SVN: r25731
1999-03-12 17:13:24 +00:00
Kaveh R. Ghazi
8e1f2d4c56 Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
* Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
        (parse-scan.o): Depend on toplev.h.
        * class.c (make_method_value): Add prototype.  Make it static.
        Remove unused second argument, caller changed.
        * expr.c (java_lang_expand_expr): Remove unused variable
        `return_label'.
        * java-tree.h: Don't prototype find_in_current_zip.
        Add prototypes for verify_constant_pool, start_java_method,
        end_java_method, give_name_to_locals, expand_byte_code,
        open_in_zip, set_constant_value, find_constant1, find_constant2,
        find_utf8_constant, find_string_constant, find_class_constant,
        find_fieldref_index, find_methodref_index, write_constant_pool,
        count_constant_pool_bytes and encode_newarray_type.
        * jcf-dump.c: Remove unused variable `LONG_temp'.
        * jcf-parse.c: Include parse.h.
        (jcf_parse_source): Remove unused parameter, all callers changed.
        (jcf_figure_file_type): Add static prototype.
        (find_in_current_zip): Likewise.  Also remove unused parameter,
        all callers changed.
        (read_class): Initialize variable `saved_pos'.
        * jcf-reader.c (jcf_parse_preamble): Mark variables
        `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
        * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
        (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
        (java_parse_doc_section): Initialize variable `seen_star'.
        (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
        (java_lex_error): Mark parameters `msg' and `forward' with
        ATTRIBUTE_UNUSED.
        (java_get_line_col): Mark parameters `filename' and `line' with
        ATTRIBUTE_UNUSED.
        * parse-scan.y: Include toplev.h.
        (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
        * parse.h: use `struct JCF', not plain `JCF'.
        (java_parser_context_save_global, java_expand_classes
        java_parser_context_restore_global, java_parse): Add prototypes.
        * typeck.c (convert_ieee_real_to_integer): Remove unused variable
        `node'.

From-SVN: r25616
1999-03-06 08:35:49 +00:00
Tom Tromey
92c068d1dc jcf-reader.c (jcf_parse_one_method): Recognize HANDLE_END_METHOD.
* jcf-reader.c (jcf_parse_one_method): Recognize
	HANDLE_END_METHOD.
	* gjavah.c (HANDLE_END_METHOD): New macro.
	(HANDLE_CODE_ATTRIBUTE): New macro.
	(decompile_method): New function.
	(print_method_info): Don't print `;\n' at end of function decl.
	Include java-opcodes.h.
	(decompiled): New global.

From-SVN: r24295
1998-12-13 13:29:08 +00:00
Per Bothner
8376a32eb1
Merge from Cygnus internal source tree.

From-SVN: r23024
1998-10-12 05:43:52 -07:00
Anthony Green
e04a16fbee Initial revision
From-SVN: r22299
1998-09-06 15:36:06 +00:00