aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/jcf-reader.c
AgeCommit message (Collapse)AuthorFilesLines
2001-03-23re PR java/1213 (gcj should check for incorrect CLASSPATH)Alexandre Petit-Bianco1-9/+19
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-01-24class.c (layout_class): Don't lay the superclass out if it's already being ↵Alexandre Petit-Bianco1-0/+7
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
2000-10-21Warning fixes:Kaveh R. Ghazi1-2/+10
* 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-08-072000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.comAlexandre Petit-Bianco1-0/+60
* 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-03-13Added Java 1.1 language features.Alexandre Petit-Bianco1-0/+8
From-SVN: r32517
2000-02-26Fix copyrightsJeff Law1-1/+1
From-SVN: r32182
2000-01-21buffer.h: PROTO -> PARAMS.Kaveh R. Ghazi1-9/+9
* 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
1999-08-10check-init.c (check_bool2_init, [...]): Add static prototypes.Kaveh R. Ghazi1-9/+18
* 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-05-12expr.c (expand_invoke): Mark parameter `nargs' with ATTRIBUTE_UNUSED.Kaveh R. Ghazi1-2/+2
* 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-03-12Warning fixes:Kaveh R. Ghazi1-3/+3
* 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-06Makefile.in (jcf-parse.o): Depend on $(PARSE_H).Kaveh R. Ghazi1-2/+2
* 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
1998-12-13jcf-reader.c (jcf_parse_one_method): Recognize HANDLE_END_METHOD.Tom Tromey1-0/+3
* 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-10-12Per Bothner1-0/+3
Merge from Cygnus internal source tree. From-SVN: r23024
1998-09-06Initial revisionAnthony Green1-0/+352
From-SVN: r22299