aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
AgeCommit message (Collapse)AuthorFilesLines
2001-01-14Various patches to emit better messages on verification errors.Per Bothner4-78/+171
From-SVN: r39019
2001-01-14parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is ↵Per Bothner3-3/+12
constant, return body without wrapper. * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is constant, return body without wrapper. (Improves constant folding.) * lex.c (build_wfl_node): Clear TREE_TYPE from returned node. From-SVN: r39017
2001-01-14expr.c (expand_java_field_op): Assigning to a final field outside an ↵Per Bothner2-2/+8
initializer does not violate JVM spec... * expr.c (expand_java_field_op): Assigning to a final field outside an initializer does not violate JVM spec, so should be warning, not error. (Sun's verifier does not complain - though MicroSoft's does.) From-SVN: r39013
2001-01-12g77spec.c (lang_specific_driver): Update copyright year to 2001.Joseph Myers3-2/+7
f: * g77spec.c (lang_specific_driver): Update copyright year to 2001. java: * gjavah.c (version), jcf-dump.c (version): Update copyright year to 2001. From-SVN: r38951
2001-01-11parse.y (resolve_expression_name): Permit instance variables from enclosing ↵Bryce McKinlay2-2/+11
context in super constructor call. * parse.y (resolve_expression_name): Permit instance variables from enclosing context in super constructor call. (resolve_qualified_expression_name): Permit enclosing class's qualified "this" in super constructor call. From-SVN: r38892
2001-01-10output.h (make_function_rtl): Remove prototype.Mark Mitchell5-18/+34
* output.h (make_function_rtl): Remove prototype. (make_decl_rtl): Likewise. * varasm.c (make_function_rtl): Remove. (make_decl_rtl): Determine top-levelness from DECL_CONTEXT, rather than from a third parameter. * tree.h (make_decl_rtl): Remove last parameter. * c-decl.c (builtin_function): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. (start_function): Likewise. * except.c (call_get_eh_context): Likewise. * expr.c (emit_block_move): Likewise. (clear_storage): Likewise. * profile.c (output_func_start_profiler): Likewise. * toplev.c (rest_of_decl_compilation): Likewise. * objc/objc-act.c (create_builtin_decl): Likewise. (synth_module_prologue): Likewise. (generate_static_reference): Likewise. (build_selector_reference_decl): Likewise. (build_class_reference_decl): Likewise. (build_objc_string_decl): Likewise. (build_protocol_reference): Likewise. * class.c (finish_struct_1): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. * decl.c (builtin_function): Likewise. (build_cp_library_fn): Likewise. (check_initializer): Likewise. (make_rtl_for_nonlocal_decl): Likewise. (cp_finish_decl): Likewise. (start_function): Likewise. * decl2.c (finish_anon_union): Likewise. * friend.c (do_friend): Likewise. * init.c (build_java_class_ref): Likewise. * method.c (make_thunk): Likewise. * pt.c (tsubst_friend_function): Likewise. * semantics.c (expand_body): Likewise. * com.c (ffecom_init_zero_): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. (ffecom_lookup_label_): Likewise. (builtin_function): Likewise. (start_function): Likewise. * class.c (build_utf8_ref): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. (build_class_ref): Likewise. (build_static_field_ref): Likewise. (get_dispatch_table): Likewise. (layout_class_method): Likewise. (emit_register_classes): Likewise. * constants.c (build_constant_data_ref): Likewise. * decl.c (builtin_function): Likewise. (create_primitive_vtable): Likewise. * expr.c (build_known_method_def): Likewise. (build_jni_stub): Likewise. (java_lang_expand_expr): Likewise. From-SVN: r38884
2001-01-10* jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.Tom Tromey2-1/+5
From-SVN: r38874
2001-01-10[multiple changes]Alexandre Petit-Bianco5-20/+75
2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com> * java-tree.h (lang_printable_name_wls): New prototype. * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT rather than `current_class' to print type name. Don't prepend type names when printing constructor names. (lang_printable_name_wls): New function. * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE. * parse.y (patch_method_invocation): Message tuned for constructors. (not_accessible_p): Grant `private' access from within enclosing contexts. 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (patch_binop): Compute missing type in error situations. (http://gcc.gnu.org/ml/gcc-patches/2001-01/msg00752.html) From-SVN: r38870
2001-01-10c-lang.c (lang_hooks): Update.Neil Booth1-4/+8
* c-lang.c (lang_hooks): Update. (lang_decode_option): Remove. (lang_init_options): Rename c_init_options. * toplev.c (main): Use lang_hooks for lang_init_options and lang_decode_option. * toplev.h (lang_hooks): Add 2 new hooks. * tree.h: Remove lang_init_options and lang_decode_option. * cp/cp-tree.h (lang_decode_option): Rename cxx_decode_option. * cp/decl2.c: Similarly. * cp/lex.c (lang_init_options): Rename cxx_init_options. (lang_hooks): Update. * f/com.c (f_init, f_finish): Rename ffe_init, ffe_finish for consistency. (lang_init_options): Rename ffe_init_options. (lang_hooks): Update. (lang_decode_option): Remove. * java/lang.c (lang_init_options): Rename java_init_options. (lang_decode_option): Rename java_decode_option. (lang_hooks): Update. * objc/objc-act.c (lang_init_options): Rename objc_init_options. (lang_decode_option): Rename objc_decode_option. (lang_hooks): Update. From-SVN: r38856
2001-01-09c-lang.c (lang_hooks): Update.Neil Booth1-8/+6
* c-lang.c (lang_hooks): Update. (lang_init): Rename c_init. (lang_finish): Remove. * toplev.c (compile_file): Use lang_hooks for lang_init () and lang_finish (). * toplev.h (lang_hooks): Add init () and finish (). * tree.h (lang_init, lang_finish): Remove. * cp/tree.h (lang_init, lang_finish): Remove. * cp/decl2.c (cxx_post_options, lang_hooks): Move to cp/lex.c. * cp/lex.c (cxx_init, cxx_finish, cxx_post_options, lang_hooks): New. (lang_init, lang_finish): Remove. * f/com.c (lang_init, lang_finish): Rename f_init, f_finish. (lang_hooks): Update. * java/lang.c (lang_init): Rename java_init. (lang_finish): Remove. (lang_hooks): Update. * objc/objc-act.c (lang_init): Rename objc_init. (lang_finish): Remove. (lang_hoooks): Update. From-SVN: r38828
2001-01-08In gcc/java:Bryce McKinlay3-0/+7
* class.c (make_class_data): Push initial value for "arrayclass". * decl.c (init_decl_processing): Add new class field "arrayclass". In libjava: * java/lang/Class.h (_Jv_InitClass): Use __builtin_expect. (_Jv_NewArrayClass): Renamed from _Jv_FindArrayClass. (_Jv_GetArrayClass): New inline function. (arrayclass): New field. * prims.cc (_Jv_NewObjectArray): Use _Jv_GetArrayClass. Don't use _Jv_GetArrayElementFromElementType. (_Jv_NewPrimArray): Ditto. (_Jv_PrimClass constructor): Initialize "depth", "ancestors", and "idt" for completeness. Initialze "arrayclass" using _Jv_NewArrayClass. Set Modifier::ABSTRACT. * java/lang/natClassLoader.cc (_Jv_NewClass): Initialize "arrayclass". (_Jv_NewArrayClass): Renamed from _Jv_FindArrayClass. Now void. Now synchronized. Array classes are now referenced from elementClass->arrayclass. Don't use _Jv_FindClassInCache. Set array classes' accessibility flags correctly. Optimize so that all array classes share the same IDT. * java/lang/reflect/natArray.cc (newInstance): Use _Jv_GetArrayClass. * java/lang/reflect/natMethod.cc (_Jv_GetTypesFromSignature): Ditto. * java/lang/natClass.cc (_getFields): Increment offset. Prevent fields in superclasses from overwriting classes own fields. (_Jv_IsAssignableFrom): Check for NULL source idt instead of calling Modifier::isAbstract(). (null_idt): New static field. (_Jv_PrepareConstantTimeTables): Optimize case where class implements no interfaces. (_Jv_IndexOf): Made inline. * boehm.cc (_Jv_MarkObj): Mark "arrayclass" field. From-SVN: r38808
2001-01-07toplev.c (main): Call the front-end specific post_options hook if one is given.Neil Booth1-0/+3
* toplev.c (main): Call the front-end specific post_options hook if one is given. * toplev.h (struct_lang_hooks, lang_hooks): New. * c-lang.c (c_post_options, lang_hooks): Implement lang_hooks for the C front end. * cp/decl2.c (cxx_post_options, lang_hooks): Implement lang_hooks for the C++ front end. * objc/objc-act.c (objc_post_options, lang_hooks): Implement lang_hooks for the ObjC front end. * f/com.c (lang_hooks): Hooks for the Fortran front end. * java/lang.c (lang_hooks): Hooks for the Java front end. From-SVN: r38757
2001-01-06From patha@softlab.ericsson.se:Bryce McKinlay2-1/+7
* parse.y (switch_label): Use build, not build1, to construct DEFAULT_EXPR. From-SVN: r38745
2001-01-05lang-options.h: Bring comment in line with reality.Phil Edwards1-2/+2
2001-01-05 Phil Edwards <pme@sources.redhat.com> * cp/lang-options.h: Bring comment in line with reality. * f/lang-options.h: Likewise. * java/lang-options.h: Likewise. * objc/lang-options.h: Likewise. * ch/lang-options.h: Likewise. * f/g77.texi: And update the manual. From-SVN: r38719
2001-01-05cpp.texi: Update for -MP.Neil Booth3-6/+14
* cpp.texi: Update for -MP. Clarify behaviour of -MT. * cppinit.c (initialize_dependency_output): Update. (cpp_finish): Output dummy targets for -MP. (OPT_MP): New. (cpp_handle_option): Handle -MP. Don't quote -MT options. * cpplib.h (struct cpp_options): Add deps_phony_targets. * gcc.c (cpp_options): Update to handle -MP. * mkdeps.c (deps_add_target, deps_add_default_target): Update to quote only the default target. (deps_phony_targets): Insert a preceding newline. Rename from deps_dummy_targets for consistency. * mkdeps.h: Update java: * lang.c (lang_decode_option): Change -MA to -MP. * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target): Update to new prototype; do quote targets. (jcf_dependency_write): Update. From-SVN: r38707
2000-12-24Shorten primitive array allocation path:Bryce McKinlay3-6/+26
* decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray to create new primitive arrays. * expr.c (build_newarray): If generating native code, call soft_newarray_node with a reference to the primitive TYPE identifier instead of type_value. From-SVN: r38482
2000-12-18re GNATS gcj/373: (interface inner classes are implicitly static)Bryce McKinlay2-1/+12
Fix for PR gcj/373: * parse.y (create_class): Set ACC_STATIC if class is declared in an interface. From-SVN: r38365
2000-12-18Fix for PRs gcj/312 and gcj/253:Bryce McKinlay3-0/+51
* parse.y (valid_ref_assignconv_cast_p): Load classes for source and dest if they arn't already. * class.c (layout_class): Call maybe_layout_super_class on superinterfaces also, but only if compiling from bytecode. From-SVN: r38363
2000-12-16jcf-parse.c (jcf_parse_source): Set wfl_operator if not already set.Tom Tromey2-1/+9
* jcf-parse.c (jcf_parse_source): Set wfl_operator if not already set. From-SVN: r38295
2000-12-15boehm.c (mark_reference_fields): Change test to correctly detect bitmap ↵Andrew Haley2-1/+6
overflow. 2000-12-14 Andrew Haley <aph@redhat.com> * boehm.c (mark_reference_fields): Change test to correctly detect bitmap overflow. From-SVN: r38293
2000-12-15config-lang.in (lang_dirs): Added.Andreas Jaeger2-0/+5
2000-12-15 Andreas Jaeger <aj@suse.de> * config-lang.in (lang_dirs): Added. From-SVN: r38280
2000-12-15parse.y (end_artificial_method_body): Fixed undefined behavior.Alexandre Petit-Bianco2-1/+10
2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (end_artificial_method_body): Fixed undefined behavior. Credits go to rth for finding it. (http://gcc.gnu.org/ml/gcc/2000-12/msg00495.html) From-SVN: r38278
2000-12-14* parse.y (check_static_final_variable_assignment_flag): Fix spelling.Mike Stump2-1/+5
From-SVN: r38241
2000-12-13Make-lang.in (JAVA_LEX_C): Added chartables.h.Tom Tromey6-364/+3616
* Make-lang.in (JAVA_LEX_C): Added chartables.h. * lex.c (java_ignorable_control_p): Removed. (java_letter_or_digit_p): Removed. (java_start_char_p): New function. (java_read_char): Return `int', not `unicode_t'. Changed callers. (java_read_unicode): Likewise. (java_read_unicode_collapsing_terminators): Likewise. (java_get_unicode): Likewise. (java_new_lexer): Initialize hit_eof. (java_parse_end_comment): Take `int' argument. (java_parse_doc_section): Likewise. (java_parse_escape_sequence): Don't allow backlash-newline. Return `int'. * lex.h (JAVA_DIGIT_P): Removed. (_JAVA_LETTER_OR_DIGIT_P): Removed. (_JAVA_IDENTIFIER_IGNORABLE): Removed. (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P. (JAVA_PART_CHAR_P): New macro. (UEOF): Now -1. (JAVA_CHAR_ERROR): Now -2. (java_lexer): New field `hit_eof'. * chartables.h: New file. * gen-table.pl: new file. From-SVN: r38237
2000-12-13parse.y (java_complete_lhs): Only allow compound assignment of reference ↵Tom Tromey2-0/+14
type if type is String. * parse.y (java_complete_lhs): Only allow compound assignment of reference type if type is String. Co-Authored-By: Alexandre Petit-Bianco <apbianco@cygnus.com> From-SVN: r38236
2000-12-12configure.in: Simplify language enabling/disabling code.Alexandre Oliva1-1/+3
* configure.in: Simplify language enabling/disabling code. * configure: Rebuilt. * ch/config-lang.in (target_libs): Set. (build_by_default): Set to no. * cp/config-lang.in (target_libs): Set. * f/config-lang.in (target_libs): Set. * java/config-lang.in (target_libs): Set. * objc/config-lang.in (target_libs): Set. From-SVN: r38207
2000-12-10jcf-io.c (find_class): Correct the logic that tests to see if a .java file ↵Mo DeJong2-1/+7
is newer than its .class file. 2000-12-07 Mo DeJong <mdejong@redhat.com> * jcf-io.c (find_class): Correct the logic that tests to see if a .java file is newer than its .class file. The compiler was incorrectly printing a warning when file mod times were equal. (http://gcc.gnu.org/ml/gcc-patches/2000-12/msg00530.html) From-SVN: r38177
2000-12-09Top level ChangeLog:Alexandre Petit-Bianco3-5/+10
2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com> * libjava: Imported from /cvs/java. * libffi: Likewise. * Boehm-gc: Likewise. libjava/ChangeLog: 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com> * Makefile.am (data_DATA): libgcj.jar replaces libgcj.zip. (ZIP): Points at fastjar instead of zip. (libgcj_la_DEPENDENCIES): libgcj.jar replaces libgcj.zip. (libgcj_la_LDFLAGS): Correctly point at libsupc++. (libgcjx_la_DEPENDENCIES): libgcj.jar replaces libgcj.zip. (libgcjx_la_LDFLAGS): Correctly point at libsupc++. ($(java_source_files:.java=.class):): libgcj.jar replaces libgcj.zip. ($(x_java_source_files:.java=.class):): Likewise. (libgcj.jar:): Replaces libgcj.zip:, builds libgcj.jar and uses fastar's flags. (CLEANFILES): libgcj.jar replaces libgcj.zip. (java/lang/ClassLoader.h:): Depends on libgcj.jar. (gnu/gcj/runtime/FirstThread.h:, java/lang/Thread.h:, java/lang/String.h:, java/lang/reflect/Constructor.h:, java/lang/reflect/Field.h:, java/lang/reflect/Method.h:, gnu/gcj/runtime/VMClassLoader.h:, java/io/ObjectInputStream$$GetField.h:, java/io/ObjectOutputStream$$PutField.h:, header-check:): Likewise. (Makefile.in): Rebuilt. gcc/java/ChangeLog: 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com> * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip. jcf-path.c: Likewise. From-SVN: r38167
2000-12-10zipfile.h (ZipDirectory): Declare size, uncompressed_size, filestart and ↵Anthony Green2-4/+9
filename_length as int values. * zipfile.h (ZipDirectory): Declare size, uncompressed_size, filestart and filename_length as int values. From-SVN: r38165
2000-12-08safe-ctype.h: New file.Zack Weinberg2-368/+372
include: * safe-ctype.h: New file. libiberty: * safe-ctype.c: New file. * Makefile.in (CFILES): Add safe-ctype.c. (REQUIRED_OFILES): Add safe-ctype.o. * argv.c: Define ISBLANK and use it, not isspace. * basename.c, cplus-dem.c, fnmatch.c, pexecute.c, strtod.c, strtol.c, strtoul.c: Include safe-ctype.h, not ctype.h. Use uppercase ctype macros. Don't test ISUPPER(c)/ISLOWER(c) before calling TOLOWER(c)/TOUPPER(c). gcc: * Makefile.in (HOST_RTL): Add safe-ctype.o. (safe-ctype.o): New rule. * system.h: Include safe-ctype.h, not ctype.h. No need to wrap ctype macros. * cpphash.h: Zap IStable and related macros. Define is_* in terms of safe-ctype.h macros. * cppinit.c: Delete the IStable and all related code. * tradcpp.c: Delete is_idchar, is_idstart, is_hor_space, and is_space arrays. Delete initialize_char_syntax. Change all references to the above arrays to use macros instead. * tradcpp.h: Define is_idchar, is_idstart, is_space, and is_nvspace in terms of safe_ctype.h's macros. * tradcif.y: is_idchar, is_idstart are macros not arrays. * config/i370/i370.c, config/winnt/dirent.c, config/winnt/fixinc-nt.c, config/winnt/ld.c: Use uppercase ctype macros. If we included ctype.h, include safe-ctype.h instead. * fixinc/fixfixes.c: Use uppercase ctype macros. Don't test ISLOWER(c) before calling TOUPPER(c). * fixinc/fixincl.c (extract_quoted_files): Simplify out some gunk. * fixinc/gnu-regex.c: Include safe-ctype.h, not ctype.h. No need to wrap ctype macros. Don't test ISUPPER(x) before calling TOLOWER(x). gcc/ch: * lex.c: Don't bother checking whether ISUPPER(c) before calling TOLOWER(c). Don't bother checking whether isascii(c) before testing ISSPACE(c); ISSPACE(c) includes '\n'. gcc/f: * Make-lang.in: Link f/fini with safe-ctype.o. * bad.c: Don't test ISUPPER(c) || ISLOWER(c) before calling TOUPPER(c). * com.c: Use TOUPPER, not ffesrc_toupper. * fini.c: Don't test ISALPHA(c) before calling TOUPPER(c)/TOLOWER(c). * intrin.c: Don't test IN_CTYPE_DOMAIN(c). * src.c: Delete ffesrc_toupper_ and ffesrc_tolower_ and their initializing code; use TOUPPER and TOLOWER instead of ffesrc_toupper and ffesrc_tolower. * src.h: Don't declare ffesrc_toupper_ or ffesrc_tolower_. Don't define ffesrc_toupper or ffesrc_tolower. gcc/java: * jvgenmain.c: Use ISPRINT not isascii. From-SVN: r38124
2000-12-06parse.y (end_artificial_method_body): Fixed typo.Alexandre Petit-Bianco2-1/+5
2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (end_artificial_method_body): Fixed typo. (http://gcc.gnu.org/ml/gcc-patches/2000-12/msg00320.html) From-SVN: r38071
2000-12-06[multiple changes]Alexandre Petit-Bianco6-114/+573
2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (OP1): Update `last_bc'. (struct jcf_block): Fixed indentation and typo in comments. New field `last_bc'. (generate_bytecode_insns): Insert `nop' if `jsr' immediately follows `monitorenter'. * parse.y (patch_synchronized_statement): New local `tmp'. Call `patch_string'. Fixes gcj/232. 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (check_init): Fixed leading comment. Use LOCAL_FINAL_P. * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. (give_name_to_locals): Likewise. (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl' fields in lang_decl_var. * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR, DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros. (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten. (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC, DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros. (LOCAL_FINAL): Rewritten. (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros. (struct lang_decl): Fixed comments. Added `synthetic_ctor' and `init_final' fields. (struct lang_decl_var): Fixed leading comment. Added `am', `wfl', `final_uid', `final_liic', `final_ierr' and `local_final' fields. (TYPE_HAS_FINAL_VARIABLE): New macro. (struct lang_type): Added `afv' field. * parse.y (check_static_final_variable_assignment_flag): New function. (reset_static_final_variable_assignment_flag): Likewise. (check_final_variable_local_assignment_flag): Likewise. (reset_final_variable_local_assignment_flag): Likewise. (check_final_variable_indirect_assignment): Likewise. (check_final_variable_global_assignment_flag): Likewise. (add_inner_class_fields): Use LOCAL_FINAL_P. (register_fields): Handle local finals and final variables. (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR. (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC on local finals. (java_complete_expand_methods): Loop to set TYPE_HAS_FINAL_VARIABLE. Call `reset_final_variable_local_assignment_flag' and `check_final_variable_local_assignment_flag' accordingly before and after constructor expansion. Call `reset_static_final_variable_assignment_flag' before expanding <clinit> and after call `check_static_final_variable_assignment_flag' if the current_class isn't an interface. After all methods have been expanded, call `check_final_variable_global_assignment_flag' and `check_static_final_variable_assignment_flag' if the current class is an interface. (maybe_yank_clinit): Fixed typo in comment. (build_outer_field_access_methods): Removed old sanity check. Use FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC. Don't create access methods for finals. (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'. (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if existing DECL_INIT has been processed. (java_complete_lhs): Likewise. (check_final_assignment): Filter input on `lvalue''s TREE_CODE. Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new logic. (patch_assignment): Use LOCAL_FINAL_P. (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if DECL_INITIAL is nullified. Fixes gcj/163. 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (pop_current_osb): New function. (array_type:): Use `dims:', changed actions accordingly. Suggested by Anthony Green. (array_creation_expression:): Used pop_current_osb. (cast_expression:): Likewise. (search_applicable_method_list): Fixed indentation. 2000-10-08 Anthony Green <green@redhat.com> * parse.y (array_type_literal): Remove production. (type_literals): Refer to array_type, not array_type_literal. (http://gcc.gnu.org/ml/gcc-patches/2000-12/msg00317.html) From-SVN: r38070
2000-12-04parse.y (patch_method_invocation): Pick the correct enclosing context when ↵Alexandre Petit-Bianco2-1/+33
creating inner class instances. 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (patch_method_invocation): Pick the correct enclosing context when creating inner class instances. Fixes gcj/332. (http://gcc.gnu.org/ml/gcc-patches/2000-12/msg00217.html) From-SVN: r38026
2000-11-26g77spec.c (lang_specific_driver): Update copyright year to 2000.Joseph Myers4-3/+8
f: * g77spec.c (lang_specific_driver): Update copyright year to 2000. java: * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version): Update copyright year to 2000. From-SVN: r37765
2000-11-25c-common.c: Remove USE_CPPLIB conditional inclusions.Neil Booth1-9/+0
* c-common.c: Remove USE_CPPLIB conditional inclusions. * c-common.h: Similarly. * c-decl.c: Similarly. * c-lang.c: Similarly. * c-lex.c: Similarly. * c-parse.in: Similarly. * c-pragma.c: Similarly. * c-pragma.h: Similarly. * gcc.c: Similarly. * toplev.c: Similarly. * cp/cp-tree.h: Similarly. * cp/decl2.c: Similarly. * cp/lang-specs.h: Similarly. * cp/lex.c: Similarly. * cp/lex.h: Similarly. * cp/spew.c: Similarly. * java/lang-options.h: Similarly. * objc/lang-specs.h: Similarly. * objc/objc-act.c: Similarly. * configure.in: Remove configure option. * config.in: Regenerate. * configure: Regenerate. From-SVN: r37742
2000-11-24jcf-parse.c (init_jcf_parse): Register current_file_list root.Anthony Green3-16/+31
* jcf-parse.c (init_jcf_parse): Register current_file_list root. Move current_file_list out of yyparse and make it static. * expr.c: Declare quick_stack and tree_list_free_list as static (init_expr_processing): Register quick_stack and tree_list_free_list roots. From-SVN: r37708
2000-11-22parse.y (build_outer_field_access): New local `decl_ctx', use it.Alexandre Petit-Bianco2-9/+34
2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (build_outer_field_access): New local `decl_ctx', use it. Check for field's context and current class immediate outer context inheritance. (outer_field_access_p): Consider fields inherited from the last enclosing context. (build_access_to_thisn): Stop at the last enclosing context if necessary. Fixes gcj/367. (http://gcc.gnu.org/ml/gcc-patches/2000-11/msg01335.html) From-SVN: r37689
2000-11-23gcc toplevel:J"orn Rennecke2-1/+5
* Makefile.in (HOST_CFLAGS): Add -DGENERATOR_FILE. (rtl.o, print-rtl.o, bitmap.o, obstack.o): Build with -DGENERATOR_FILE. (alloca.o, vfprintf.o, ggc-none.o, errors.o): Likewise. (splay-tree.o, hash.o): Likewise. GCONFIG_H: New. (rtl.o, print-rtl.o): Depend on $(GCONFIG_H) instead of $(CONFIG_H). (bitmap.o, obstack.o, vfprintf.o, ggc-none.o, errors.o): Likewise. (hashtab.o): Likewise. (gcov.o): Depend on $(CONFIG_H). * configure.in: #include insn-codes.h in tm.h. f: * Make-lang.in (g77spec.o): Depend on $(CONFIG_H). java: * Make-lang.in (jvspec.o): Depend on $(CONFIG_H). cp: * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H). From-SVN: r37680
2000-11-22jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the scratch ↵Bryce McKinlay2-1/+6
buffer. 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz> * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the scratch buffer. From-SVN: r37646
2000-11-21[multiple changes]Alexandre Petit-Bianco3-3/+34
2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (outer_field_access_p): Inherited fields aren't consider outer fields. (maybe_build_thisn_access_method): Use PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P. (resolve_expression_name): Trigger an error if a static field is being accessed as an outer field. 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in scope. (http://gcc.gnu.org/ml/gcc-patches/2000-11/msg01217.html) From-SVN: r37645
2000-11-20jv-scan.c (help): Document --complexity.Tom Tromey3-17/+63
* jv-scan.c (help): Document --complexity. (options): Added --complexity. (flag_complexity): New global. (main): Call `report'. * parse-scan.y (complexity): New global. (if_then_statement, if_then_else_statement, if_then_else_statement_nsi, switch_block_statement_group, while_expression, do_statement, for_begin, continue_statement, throw_statement, catch_clause, finally, method_invocation, conditional_and_expression, conditional_or_expression, conditional_expression): Update complexity. (reset_report): Reset complexity. (report): New function. From-SVN: r37595
2000-11-20lex.c (yylex): Added STRICT_TK case.Tom Tromey7-86/+102
* lex.c (yylex): Added STRICT_TK case. * parse.y (STRICT_TK): Added. * parse-scan.y (STRICT_TK): Added. * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and `;'. Use 4, not 3, with -k option. Correctly rename resulting file. * keyword.h: Rebuilt. * keyword.gperf (strictfp): Added. From-SVN: r37594
2000-11-20lex.c (yylex): Recognize floating point constants with leading 0.Tom Tromey2-1/+10
* lex.c (yylex): Recognize floating point constants with leading 0. From-SVN: r37593
2000-11-19java-tree.h (cyclic_inheritance_report): Constify.Kaveh R. Ghazi3-2/+7
* java-tree.h (cyclic_inheritance_report): Constify. * parse.y (cyclic_inheritance_report): Likewise. From-SVN: r37564
2000-11-17ggc.h: Delete ggc_add_string_root and ggc_mark_string.Zack Weinberg2-1/+4
* ggc.h: Delete ggc_add_string_root and ggc_mark_string. Add digit_vector and digit_string. * stringpool.c (digit_vector): New. (ggc_alloc_string): Use digit_string. * stmt.c (digit_strings): Delete. (init_stmt): Do not initialize digit_strings. (expand_asm_operands): Use ggc.h's digit_string macro. * toplev.c (mark_file_stack): Delete. (compile_file): Don't call init_tree_codes. (main): No need to make the file stack a GC root. * tree.c (init_tree_codes): Delete. * tree.h (init_tree_codes): Delete. * c-lex.c: Don't include ggc.h. (mark_splay_tree_node, mark_splay_tree): Delete. (init_c_lex): No need to ggc_strdup string constant. Don't add file_info_tree to GGC roots. (cb_enter_file, cb_rename_file): No need to ggc_strdup ip->nominal_fname. * Makefile.in (c-lex.o): No longer depends on $(GGC_H). * dbxout.c (dbxout_init), dwarf2out.c (dwarf2out_line), ggc-common.c (ggc_mark_rtx_children, ggc_mark_trees), varasm.c (mark_const_hash_entry, mark_pool_constant, init_varasm_once), xcoffout.c (xcoffout_source_file), i386.c (load_pic_register): Delete call(s) to ggc_add_string_root and/or ggc_mark_string. * except.c (create_rethrow_ref), profile.c (init_edge_profiler), toplev.c (compile_file), varasm.c (named_section, assemble_static_space, assemble_trampoline_template, output_constant_def, force_const_mem), i386.c (load_pic_register), ia64.c (ia64_encode_section_info), rs6000.c (rs6000_emit_load_toc_table, create_TOC_reference, rs6000_emit_prologue, rs6000_emit_epilogue), rs6000.md (load_toc_aix_si, load_toc_aix_di): Change ggc_alloc_string (var, -1) to ggc_strdup (var). * profile.c (output_func_start_profiler), tree.c (make_node), i386.c (load_pic_register): No need to ggc_strdup string constant. cp: * lex.c (mark_impl_file_chain): Delete. (init_parse): Remove call to ggc_add_string_root. No need to ggc_strdup a string constant. Do not add impl_file_chain to GC roots. (handle_pragma_implementation): No need to ggc_strdup main_filename. f: * lex.c (ffelex_hash_): Change ggc_alloc_string (var, -1) to ggc_strdup (var). java: * parse.y (goal): Remove call to ggc_add_string_root. From-SVN: r37522
2000-11-17stringpool.c: New file.Zack Weinberg3-29/+36
* stringpool.c: New file. * ggc-common.c (ggc_mark_string_ptr, ggc_add_string_root): Delete. (ggc_alloc_string): Now in stringpool.o. * ggc-page.c, ggc-simple.c: Do not define or allocate empty_string. * ggc.h: Delete prototype of ggc_add_string_root. #define ggc_add_string_root and ggc_mark_string to nothing. Prototype init_stringpool and stringpool_statistics. (ggc_alloc_string): Returns a const char *. * tree.c (hash_table, do_identifier_warnings): Delete. (init_obstacks): Don't initialize the identifier hash table. (get_identifier, maybe_get_identifier, start_identifier_warnings, set_identifier_size): Now in stringpool.c. * tree.h (struct tree_string): Constify pointer field. (approx_sqrt): Prototype. * Makefile.in (stringpool.o): Add rule, mention in OBJS. * toplev.c (approx_sqrt): New function. (compile_file): Call stringpool_statistics if mem_report is on. (main): Call init_stringpool. * builtins.c (c_strlen), c-decl.c (finish_decl), c-lex.c (process_directive), c-typeck.c (constructor_asmspec, struct initializer_stack, start_init), except.c (create_rethrow_ref), stmt.c (digit_strings), toplev.c (decode_f_option), tree.c (built_in_filename), varasm,c (in_named_name, assemble_static_space, struct constant_descriptor, struct deferred_string, struct pool_constant, force_const_mem), i386.c (pic_label_name, global_offset_table_name), rs6000.c (rs6000_emit_prologue, rs6000_emit_epilogue) : Constify a char *. * c-common.c (combine_strings): Combine strings in scratch buffer, then pass to build_string. * optabs.c (init_libfuncs), profile.c (init_edge_profiler, output_func_start_profiler), stmt.c (init_stmt), alpha.c (alpha_need_linkage), arm.c (arm_encode_call_attribute), i386.c (load_pic_register), ia64.c (ia64_encode_section_info), rs6000.c (rs6000_encode_section_info): Create string in scratch buffer, then pass to ggc_alloc_string. * stmt.c (expand_asm_operands): If we must adjust the constraint strings, do so by creating a new one, not by modifying the old one in place. Constify some char *s. * config/pa/pa.c (hppa_encode_label): Drop unnecessary second argument. Create string in scratch buffer, then pass to ggc_alloc_string. * config/pa/pa-protos.h: Update prototype. * config/pa/elf.h, config/pa/pa.h, config/pa/som.h: hppa_encode_label takes only one argument. * c-parse.in (if_prefix): Find the filename and line number at $-2 and $-1 respectively. * diagnostic.c (error_recursion): Add missing newline, use fputs, translate string. cp: * lex.c (struct impl_files, internal_filename): Constify a char *. java: * jcf-parse.c (get_constant), parse.y (do_merge_string_cste): Create string in scratch buffer, then pass to build_string. From-SVN: r37514
2000-11-13diagnostic.c (vbuild_message_string, [...]): Add ATTRIBUTE_PRINTF.Joseph Myers2-1/+7
* diagnostic.c (vbuild_message_string, output_do_printf, vnotice): Add ATTRIBUTE_PRINTF. * tradcpp.c (v_message, warning, error, fatal, error_with_line): Add ATTRIBUTE_PRINTF*. java: * parse.y (issue_warning_error_from_context): Add ATTRIBUTE_PRINTF. From-SVN: r37419
2000-11-11jcf-parse.c (process_zip_dir): Add finput parameter.Anthony Green2-3/+11
2000-11-11 Anthony Green <green@redhat.com> * jcf-parse.c (process_zip_dir): Add finput parameter. (jcf_figure_file_type): Call process_zip_dir with appropriate argument. From-SVN: r37390
2000-11-10alpha.c (check_float_value): Use memcpy, not bcopy.Kaveh R. Ghazi3-3/+7
* alpha.c (check_float_value): Use memcpy, not bcopy. * arm.c (output_move_double): Likewise. * arm.md: Likewise. * m88k.c (legitimize_operand): Likewise. * m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise. * m88k.md: Likewise. * mips.c (override_options): Likewise. * mips.md: Likewise. * romp.c (output_fpops): Likewise. * rs6000.c (rs6000_override_options): Likewise. * sh.md: Likewise. * vax.c (check_float_value): Likewise. * emit-rtl.c (copy_rtx_if_shared, init_emit_once): Likewise. * expmed.c (synth_mult): Likewise. * final.c (add_bb_string): Likewise. * genattr.c (main): Likewise. * genattrtab.c (attr_string, simplify_cond, copy_rtx_unchanging): Likewise. * jump.c (thread_jumps): Likewise. * prefix.c (save_string): Likewise. * real.h (REAL_VALUE_FROM_CONST_DOUBLE): Likewise. * regclass.c (init_reg_sets, init_reg_sets_1): Likewise. * reload1.c (reload, eliminate_regs): Likewise. cp: * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy. * lex.c (copy_lang_decl): Likewise. java: * decl.c (copy_lang_decl): Use memcpy, not bcopy. * jcf-parse.c (jcf_figure_file_type): Likewise. From-SVN: r37367
2000-11-09calls.c (expand_call, [...]): Use memcpy () instead of bcopy ().Joseph Myers2-1/+6
* calls.c (expand_call, emit_library_call_value_1), collect2.c (scan_prog_file), config/a29k/a29k.c (print_operand), config/sparc/sparc.c (order_regs_for_local_alloc): Use memcpy () instead of bcopy (). * real.h: Use memcmp () instead of bcmp (). * config/m88k/m88k.c (m88k_layout_frame), config/sh/sh.c (split_branches), config/sparc/sparc.c (ultra_flush_pipeline, ultrasparc_sched_init, ultrasparc_sched_reorder), config/sparc/sparc.h (CONDITIONAL_REGISTER_USAGE): Use memset () instead of bzero (). * config/vax/xm-xms.h (FILE_NAME_NONDIRECTORY): Use strrchr () instead of rindex (). * configure.in: Don't check for bzero, bcmp, index or rindex. * configure, config.in: Regenerate. * system.h: Don't include declarations for bzero, bcmp, index or rindex. * config/i386/xm-beos.h, config/rs6000/xm-beos.h: Don't define bzero, bcmp, index or rindex. java: * parse.y (create_new_parser_context): Use memset () instead of bzero (). From-SVN: r37334