aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
AgeCommit message (Collapse)AuthorFilesLines
2000-05-19parse.y (block_end:): If the collected block doesn't feature a statement, ↵Alexandre Petit-Bianco3-273/+282
insert an empty statement. Thu Apr 27 17:25:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (block_end:): If the collected block doesn't feature a statement, insert an empty statement. From-SVN: r34038
2000-05-19parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be processed ↵Alexandre Petit-Bianco3-4/+5
by the method's switch statement. 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be processed by the method's switch statement. From-SVN: r34024
2000-05-19Reverted incorrectly applied changeTom Tromey2-0/+4
From-SVN: r34023
2000-05-19java-tree.h: Added init state enum.Tom Tromey4-17/+43
* java-tree.h: Added init state enum. * decl.c (emit_init_test_initialization): Initialize class initialization check variable by looking at class' state. From-SVN: r34022
2000-05-19java-tree.h (build_instanceof): Declare.Tom Tromey4-249/+261
* java-tree.h (build_instanceof): Declare. (build_get_class): Declare. * parse.y (patch_binop): Use build_instanceof. * expr.c (build_instanceof): New function. If class is final, don't make a function call. (expand_java_INSTANCEOF): Use it. (build_get_class): New function. From-SVN: r34021
2000-05-19jcf-write.c (generate_classfile): Scan the source_file for slashes with the ↵Alexandre Oliva2-1/+6
right pointer variable. 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br> * jcf-write.c (generate_classfile): Scan the source_file for slashes with the right pointer variable. From-SVN: r34006
2000-05-18Andrew's last commit changed a ChangeLog entry to say that I wrote a patch ↵Tom Tromey1-1/+1
that Zack wrote. Andrew's last commit changed a ChangeLog entry to say that I wrote a patch that Zack wrote. Oops. From-SVN: r34001
2000-05-17Add options -Wunused-variable, -Wunused-function, -Wunused-label,Andrew Cagney3-3/+9
-Wunused-parameter. Retain existing -Wunused behavour. Document. From-SVN: r33953
2000-05-09top level:Zack Weinberg13-196/+286
* Makefile.in (WARN_CFLAGS): Add -Wwrite-strings. (tree.o): Depend on output.h. * c-decl.c (pending_invalid_xref_file, current_function_prototype_file): Constify. (pushdecl): Constify a local char *. (define_label): Constify filename parameter. * c-lex.c (init_parse): Constify parameter and return value. * c-typeck.c (c_expand_asm_operands): Constify filename parameter. * c-tree.h: Update prototypes. * c-parse.in: Constify filename member of %union, and if_stmt_file. * c-parse.y, c-parse.c, c-parse.h, objc/objc-parse.y, objc/objc-parse.c: Regenerate. * dwarfout.c (dwarfout_init): Constify main_input_filename parameter. * dwarfout.h: Update prototypes. * expr.c (expand_expr): Constify a local char *. * flags.h: Constify main_input_filename. * function.c (expand_function_end): Constify filename parameter. * genrecog.c (make_insn_sequence): Use a character array for c_test_pos. (main): Remove unused variables. * input.h: Constify input_filename, main_input_filename, and file_stack.name. Update prototypes. * output.h: Declare first_global_object_name and weak_global_object_name here, as const char *. * stmt.c (expand_asm_operands): Constify filename parameter. * toplev.c (compile_file, push_srcloc, debug_start_source_file): Constify filename parameter. (input_filename, main_input_filename): Constify. * toplev.h: Update prototypes. * tree.c: Include output.h. Don't declare first_global_object_name or weak_global_object_name. Clean up string bashing in get_file_function_name_long. * tree.h (struct tree_decl): Constify filename member. (input_filename): Constify. Update prototypes. * varasm.c (first_global_object_name, weak_global_object_name): Constify. (assemble_start_function, assemble_variable): Clean up string bashing. * gcc.c: Constify all spec-related strings initialized, transitively, from string constants. Constify all strings and string variables related to multilibs. (set_spec, read_specs): Cast argument to free to PTR. (used_arg): Do not modify multilib_matches. Use strncmp plus length comparison to compare multilib switches. * genmultilib: Constify everything declared in multilib.h. ch: * ch-tree.h: Update prototypes. Remove prototypes for functions declared elsewhere. * decl.c (define_label): Constify filename parameter. * grant.c (globalize_decl, set_default_grant_file): Constify local char * variables. Don't declare first_global_object_name or asm_out_file. * lang.c (chill_real_input_filename): Constify. * lex.c (init_parse): Constify parameter and return value. * parse.c: Don't declare input_filename. (ch_expand_asm_operands): Constify filename parameter. (parse_multi_dimension_case_action): Constify local char *. * satisfy.c (safe_satisfy_decl): Constify local char *. cp: * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file, and pending_inline.filename. Update prototypes. * decl.c (define_label): Constify filename parameter. * decl2.c (warn_if_unknown_interface): Constify local char *. * input.c Constify input_source.filename. Don't declare input_filename or lineno. Constify filename parameter to feed_input. * lex.c (init_parse): Constify parameter and return value. (cp_pragma_interface, cp_pragma_implementation): Constify filename argument. (reinit_parse_for_method, reinit_parse_for_block, reinit_parse_for_expr, feed_defarg, handle_cp_pragma): Constify local char *. * pt.c: Don't declare lineno or input_filename. (print_template_context, tsubst_friend_function, tsubst_decl, tsubst, instantiate_decl): Constify local char *. * semantics.c (expand_body): Constify local char *. * tree.c (build_srcloc): Constify filename parameter. * typeck.c (c_expand_asm_operands): Constify filename parameter. f: * com.c (ffecom_subscript_check_): Constify array_name parameter. Clean up string bashing. (ffecom_arrayref_, ffecom_char_args_x_): Constify array_name parameter. (ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, ffecom_sym_transform_, ffecom_sym_transform_assign_): Constify local char *. (init_parse): Constify parameter and return value. * lex.c: Include dwarfout.h instead of prototyping dwarfout_* functions here. (ffelex_file_pop_, ffelex_file_push_): Constify filename parameter. (ffelex_hash_, ffelex_include_): Constify local char *. * std.c (ffestd_exec_end): Constify local char *. * where.c (ffewhere_file_new): Constify filename parameter. * where.h: Update prototypes. java: * check_init.c (check_init): Constify local char *. * class.c (push_class): Constify local char *. * java_tree.h: Update prototypes. * jcf-io.c (open_class): Constify filename parameter and return value. (find_class): Remove redundant string copy. Cast return from open_class. * jcf-parse.c (read_class, parse_class_file, yyparse): Constify local char *. * jcf-write.c (generate_bytecode_insns, generate_classfile): Constify local char *. * jcf.h (JCF): Constify filename and classname. (JCF_FINISH): Cast args to FREE to char * when appropriate. * lang.c (init_parse): Constify parameter and return value. * lex.c (java_get_line_col): Constify filename parameter. * parse.h: Constify parser_ctxt.filename. Update prototypes. * parse.y (java_parser_context_suspend, issue_warning_error_from_context, safe_layout_class): Constify local char *. * parse.c: Regenerate. From-SVN: r33804
2000-05-09expr.c (build_jni_stub): Cache the result of _Jv_LookupJNIMethod.Tom Tromey2-4/+25
* expr.c (build_jni_stub): Cache the result of _Jv_LookupJNIMethod. From-SVN: r33786
2000-05-06decl.c (predef_filenames_size): Now 7.Alexandre Petit-Bianco2-1/+7
2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (predef_filenames_size): Now 7. (predef_filenames): New seventh entry. (Tom's last patch was missing this bit.) From-SVN: r33734
2000-05-05boehm.c (mark_reference_fields): Don't mark RawData fields.Tom Tromey4-9/+32
* boehm.c (mark_reference_fields): Don't mark RawData fields. Keep track of when we've seen a reference field after a non-reference field. (get_boehm_type_descriptor): Handle case where we see non-reference fields but no trailing reference field. * decl.c (rawdata_ptr_type_node): Define. (init_decl_processing): Initialize rawdata_ptr_type_node. * java-tree.h (rawdata_ptr_type_node): Declare. From-SVN: r33701
2000-05-04jcf-dump.c (SPECIAL_IINC): Ensure arguments match format specifiers in calls ↵Kaveh R. Ghazi2-2/+7
to fprintf. * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format specifiers in calls to fprintf. From-SVN: r33680
2000-05-03Makefile.in (WARN_CFLAGS): Add -pedantic -Wno-long-long.Jason Merrill1-6/+6
* Makefile.in (WARN_CFLAGS): Add -pedantic -Wno-long-long. (LOOSE_CFLAGS): New: CFLAGS without -pedantic and -Wtraditional. (GCC_CFLAGS): Use it. (LANG_FLAGS_TO_PASS): New: SUBDIR_FLAGS_TO_PASS with LOOSE_CFLAGS. * cp/Make-lang.in, java/Make-lang.in, f/Make-lang.in, ch/Make-lang.in, objc/Make-lang.in: Use it. From-SVN: r33648
2000-05-03expr.c (build_java_jsr): Use emit_jump, not expand_goto.Tom Tromey5-6/+31
* expr.c (build_java_jsr): Use emit_jump, not expand_goto. * javaop.h (WORD_TO_INT): New function. (IMMEDIATE_s4): Use WORD_TO_INT. * jcf.h (JPOOL_INT): Ditto. * gjavah.c (decode_signature_piece): Don't treat `$' as namespace separator. From-SVN: r33636
2000-05-02class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE on native ↵Tom Tromey12-244/+447
function. * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE on native function. * jcf-parse.c (parse_class_file): Call build_jni_stub for native JNI methods. * expr.c (build_jni_stub): New function. * lang-specs.h: -fjni and -femit-class-file are incompatible. * parse.c: Rebuilt. * parse.y (java_complete_expand_methods): Expand a native method and call build_jni_stub if -fjni given. * lang-options.h: Document -fjni. * lang.c (flag_jni): New global. (lang_f_options): Added `jni' entry. * java-tree.h (soft_lookupjnimethod_node, soft_getjnienvnewframe_node, soft_jnipopsystemframe_node): Declare. (flag_jni): Declare. (build_jni_stub): Declare. (struct lang_decl): Added `native' flag. (METHOD_NATIVE): Redefined to use `native' field of lang specific structure. * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node, soft_jnipopsystemframe_node): New globals. (init_decl_processing): Set them. _Jv_InitClass only takes one argument. * java-tree.def: Put into `C' mode. From-SVN: r33615
2000-05-01re GNATS gcj/195: (gcj fail on code to implement an inner interface.)Alexandre Petit-Bianco2-2/+4
(This trying to counter the effect of the PR 195 check in -- this should be right now.) From-SVN: r33602
2000-05-01(The patch contained impurities -- this should fix the situation.)Alexandre Petit-Bianco2-181/+239
From-SVN: r33591
2000-05-01re GNATS gcj/195: (gcj fail on code to implement an inner interface.)Alexandre Petit-Bianco2-5/+33
2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS. (This is a fix for the Java PR #195: http://sourceware.cygnus.com/ml/java-prs/2000-q2/msg00009.html) From-SVN: r33588
2000-04-28re GNATS gcj/2 (Method call on null instance should throw NullPointerException)Tom Tromey6-251/+326
Fix for PR gcj/2: * expr.c (expand_invoke): Generate check to see if object pointer is null in nonvirtual invocation case. * java-tree.h (soft_nullpointer_node): Declare. * decl.c (soft_nullpointer_node): New global. (init_decl_processing): Initialize soft_nullpointer_node. * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final' or `private' methods. (patch_invoke): Handle INVOKE_NONVIRTUAL case. From-SVN: r33495
2000-04-27decl.c (complete_start_java_method): Don't call _Jv_InitClass from <clinit>Alexandre Petit-Bianco2-0/+6
Wed Apr 26 14:29:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (complete_start_java_method): Don't call _Jv_InitClass from <clinit> From-SVN: r33493
2000-04-27zextract.c (find_zip_file_start): New function.Tom Tromey2-7/+34
* zextract.c (find_zip_file_start): New function. (read_zip_archive): Use it. From-SVN: r33451
2000-04-25re GNATS gcj/181 (gcj crashes on inner classes/interfaces definition/usage.)Alexandre Petit-Bianco3-0/+19
Mon Apr 24 14:59:36 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (end_class_declaration): Reset the interface number counter. (This fixes the Java PR #181: http://sourceware.cygnus.com/ml/java-prs/2000-q1/msg00207.html) From-SVN: r33422
2000-04-24parse.y (lookup_field_wrapper): Search for final local aliases.Alexandre Petit-Bianco3-204/+296
2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (lookup_field_wrapper): Search for final local aliases. (resolve_expression_name): Let lookup_field_wrapper search for final local aliases. Force the value of `name' if one is found. (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have an expression name. Fixed comments. From-SVN: r33400
2000-04-24parse.y (source_start_java_method): Deleted unecessary code.Alexandre Petit-Bianco3-290/+173
2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (source_start_java_method): Deleted unecessary code. (patch_method_invocation): Fixed comment. From-SVN: r33392
2000-04-24Respective ChangeLogs for common, cp/, java/Robert Lipe2-5/+5
Respective ChangeLogs for common, cp/, java/ * tree.h (tree_decl): Member `mode' now ENUM_BITFIELD. * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD. * parse.h (_jdep): Member `kind' now ENUM_BITFIELD. From-SVN: r33378
2000-04-23* boehm.c (mark_reference_fields): Use int_byte_position.Tom Tromey2-1/+5
From-SVN: r33354
2000-04-23boehm.c (mark_reference_fields): Only call byte_position on non-static fields.Tom Tromey2-1/+7
* boehm.c (mark_reference_fields): Only call byte_position on non-static fields. From-SVN: r33351
2000-04-22Convert C++ comment to block commentZack Weinberg1-2/+2
From-SVN: r33349
2000-04-22boehm.c (mark_reference_fields): Added `last_view_index' argument.Tom Tromey2-20/+38
* boehm.c (mark_reference_fields): Added `last_view_index' argument. Use DECL_FIELD_OFFSET to determine field's offset. From-SVN: r33346
2000-04-21[multiple changes]Alexandre Petit-Bianco4-182/+331
Thu Apr 20 17:41:28 2000 Mo DeJong <mdejong@cygnus.com> * parse.h (INTERFACE_INNER_MODIFIERS): New macro. * parse.y (check_class_interface_creation): Fixed comments. Select permitted modifiers for (inner) interfaces. Changed error message to report rejected modifiers used with local classes. 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes of directly inherited type considered in scope. * parse.y (do_resolve_class): Search inherited classes for inner classes. (This fixes the PR #194 and #197: http://sourceware.cygnus.com/ml/java-prs/2000-q2/msg00008.html http://sourceware.cygnus.com/ml/java-prs/2000-q2/msg00011.html) From-SVN: r33330
2000-04-21re GNATS gcj/124 (protected constructor for InvocationTargetException still ↵Tom Tromey3-238/+178
visible) * parse.y (not_accessible_p): Use member's class, not current class, when doing inheritance check for protected reference. Fixes PR gcj/124. From-SVN: r33315
2000-04-20jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.Jason Schroeder2-1/+5
Thu Apr 20 18:20:58 2000 Jason Schroeder <shrode@subnature.com> * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction. From-SVN: r33301
2000-04-19parse.y (yyerror): `msg' can be null, don't use it in that case.Alexandre Petit-Bianco3-2/+6
2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (yyerror): `msg' can be null, don't use it in that case. From-SVN: r33270
2000-04-19* gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.Tom Tromey2-4/+11
From-SVN: r33261
2000-04-18[multiple changes]Alexandre Petit-Bianco3-180/+290
2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'. 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (java_expand_classes): Reverse the package list once. (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string reduction. (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of the `==' and `!=' operators. From-SVN: r33240
2000-04-18re GNATS gcj/211 (gcjh doesn't handle method names that are reserved C++ ↵Tom Tromey2-21/+85
keywords) PR gcj/211: * gjavah.c (utf8_cmp): Changed return value. (cxx_keyword_subst): Handle all C++ keywords. Allocate new return result. (cxx_keywords): New global. (get_field_name): Handle new result of cxx_keyword_subst. (print_method_info): Likewise. From-SVN: r33225
2000-04-17gjavah.c (print_name_for_stub_or_jni): Don't prefix method names with a ↵Bryce McKinlay2-5/+14
newline, for CNI. 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz> * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names with a newline, for CNI. (print_stub_or_jni): Print a space or newline before method name for CNI as well as JNI. (print_cxx_classname): Don't write leading "::" in CNI stub method. (process_file): Include gcj/cni.h if generating CNI stubs. From-SVN: r33213
2000-04-17re GNATS gcj/205 (gcjh confused about similar method and attribute names)Tom Tromey2-2/+7
* gjavah.c (decompile_method): Use print_field_name. Fixes PR gcj/205. From-SVN: r33198
2000-04-06re GNATS gcj/140 (gcj permits assignment to array length)Tom Tromey3-8/+26
Fix for PR gcj/140: * parse.y (check_final_assignment): Recognize assignments to the `length' field of an array when generating class files. From-SVN: r32960
2000-04-05class.c (decl_hash): Prototype removed.Alexandre Petit-Bianco2-2/+5
2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (decl_hash): Prototype removed. (decl_compare): Likewise. (Fixes a warning problem.) From-SVN: r32958
2000-04-06re GNATS gcj/164 (compiler permits "volatile final" variables)Tom Tromey4-13/+41
* parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter. * parse.y (check_modifiers_consistency): Check for final/volatile clash. Fixes PR gcj/164. From-SVN: r32955
2000-04-05class.c: (java_hash_hash_tree_node): Renamed from `decl_hash', made global.Alexandre Petit-Bianco5-259/+226
2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash', made global. (java_hash_compare_tree_node): Renamed from `decl_compare, made global. (add_method_1): Use `java_hash_hash_tree_node' and `java_hash_compare_tree_node'. * java-tree.h: (java_hash_hash_tree_node): Prototyped. (java_hash_compare_tree_node): Likewise. * parse.y (find_applicable_accessible_methods_list): Create, delete and use a hash table to remember already searched interfaces. From-SVN: r32947
2000-04-05jcf-depend.c (add_entry): Fixed bug where list was always replaced with ↵Matt Welsh2-1/+6
latest entry. 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu> * jcf-depend.c (add_entry): Fixed bug where list was always replaced with latest entry. From-SVN: r32936
2000-04-04boehm.c (mark_reference_fields, set_bit): Prototype.Kaveh R. Ghazi7-432/+466
* boehm.c (mark_reference_fields, set_bit): Prototype. (set_bit): Un-ANSI-fy definition. * class.c (init_test_hash_newfunc, decl_hash, decl_compare): Prototype. * decl.c (emit_init_test_initialization): Likewise. * gjavah.c (jni_print_char): Likewise. * parse.y (create_new_parser_context): Likewise. From-SVN: r32908
2000-03-31Fixed email address typo in Thu Mar 30, 2000 ChangeLog entry.Alexandre Petit-Bianco1-1/+1
From-SVN: r32852
2000-03-30expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000 patch missing ↵Alexandre Petit-Bianco2-5/+12
hunk. Thu Mar 30 15:26:56 2000 Alexandre Petit-Bianco <apbianco@dcygnus.com> * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000 patch missing hunk. Fixed indentation. From-SVN: r32839
2000-03-30gjavah.c (D_NAN_MASK): Only define as word-reversed when ↵Tom Tromey2-1/+6
HOST_FLOAT_WORDS_BIG_ENDIAN and... * gjavah.c (D_NAN_MASK): Only define as word-reversed when HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree. From-SVN: r32832
2000-03-28parse-scan.y (pop_class_context): Reset `inner_qualifier_length' when ↵Alexandre Petit-Bianco3-3/+9
negative *before* using it as an array index. 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse-scan.y (pop_class_context): Reset `inner_qualifier_length' when negative *before* using it as an array index. * ChangeLog: Fixed typo. (Fixes the following bogus patch: http://gcc.gnu.org/ml/gcc-patches/2000-03/msg00937.html) From-SVN: r32793
2000-03-28[multiple changes]Alexandre Petit-Bianco5-1044/+1186
2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse-scan.y (pop_class_context): Reset `inner_qualifier_length' to 0 when it reaches -1. 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-parse.c (get_constant): Properly cast `num' during the invocation of `add_double call'. * jcf-write.c (push_long_const): Properly cast `lo' before comparing it to short bounds. * parse-scan.y (interface_declaration:): Rule re-arrange so that `interface_body:' is reduced after the current interface is pushed. 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse-scan.y (inner_qualifier, inner_qualifier_length): New static globals. (push_class_context, pop_class_context): New function. (class_body:): Call pop_class_context. (interface_body:): Likewise. (INNER_QUALIFIER): New macro. (report_class_declaration): Changed output format and use INNER_QUALIFIER. Call push_class_context. From-SVN: r32779