aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
AgeCommit message (Collapse)AuthorFilesLines
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
2000-03-27jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each Java-specific ↵Tom Tromey2-1/+13
`-f' option. * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each Java-specific `-f' option. From-SVN: r32757
2000-03-26stor-layout.c (layout_type, [...]): early_type_list is now a list of ↵Richard Kenner2-7/+17
TREE_LIST entries, not types. * stor-layout.c (layout_type, set_sizetype): early_type_list is now a list of TREE_LIST entries, not types. * tree.c (build_common_tree_nodes_2): Eliminate dupliate type sets. * java/decl.c (init_decl_processing): Call initialize_sizetypes once. Adjust order of making types. Make bitsize_*_node values. From-SVN: r32751
2000-03-25* Rework fields used to describe positions of bitfields andRichard Kenner4-26/+32
modify sizes to be unsigned and use HOST_WIDE_INT. * alias.c (reg_known_value_size): Now unsigned. * c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position. (really_start_incremental_init): Use bitsize_zero_node. (push_init_level, pop_init_level, output_init_element): Likewise. Use bitsize_unit_node and bitsize_one_node. (output_pending_init_elements, process_init_element): Likewise. * combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned. (make_extraction): Position and length HOST_WIDE_INT and unsigned HOST_WIDE_INT, respectively. (get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT. (num_sign_bit_copies): Returns unsigned. BITWIDTH now unsigned; rework arithmetic. Remove recursive call from arg to MAX. (combine_instructions, init_reg_last_arrays): NREGS now unsigned. (setup_incoming_promotions, can_combine_p, try_combine, simplify_set): REGNO now unsigned. (set_nonzero_bit_and_sign_copies): NUM now unsigned. (find_split_point, expand_compound_operation, make_extraction): LEN now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT. (make_field_assignment): Likewise. (combine_simplify_rtx): Add cast. (expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic. (force_to_mode): WIDTH now unsigned; add cast. (if_then_else_cond): SIZE now unsigned. (nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned. (extended_count): Now returns unsigned. (simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT. Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned. (simplify_comparison): MODE_WIDTH now unsigned. (update_table_tick): REGNO and ENDREGNO now unsigned; new var R. (mark_used_regs_combine): Likewise; rework arithmetic. (record_value_for_reg): REGNO, ENDREGNO, and I now unsigned. (record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise. (record_promoted_value): REGNO now unsigned. (get_last_value_validate): REGNO, ENDREGNO, and J now unsigned. (get_last_value): REGNO now unsigned. (use_crosses_set_p): REGNO and ENDREGNO now unsigned. (reg_dead_regno, reg_dead_endregno): Now unsigned. (remove_death): Arg REGNO now unsigned. (move_deaths): REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned. (reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO now unsigned. * convert.c (convert_to_integer): INPREC and OUTPREC now unsigned. * cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned. (struct cse_reg_info): REGNO now unsigned. (cached_regno): Now unsigned. (REGNO_QTY_VALID_P): Add cast. (make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned. (remove_invalid_regs): Likewise. (remove_invalid_subreg_refs): Likewise; arg WORD also unsigned as are variables END and I. (get_cse_reg_info, insert): Likewise. (mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned. (canon_hash): Likewise. (insert_regs, lookup_for_remove): REGNO now unsigned. (invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned. New variable RN. * dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0. * dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast. * emit-rtl.c (subreg_realpart_p): Add cast. (operand_subword): Arg I is now unsigned as is var PARTWORDS. (operand_subword_force): Arg I is now unsigned. * except.c (eh_regs): Variable I is now unsigned. * explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT. * expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT; length is unsigned HOST_WIDE_INT; likewise for internal variables. (store_split_bit_field, extract_fixed_bit_field): Likewise. (extract_split_bit_field, store_bit_field, extract_bit_field): Likewise. * expr.c (store_constructor_fields, store_constructor, store_field): Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT. (expand_assignment, expand_expr, expand_expr_unaligned): Likewise. (do_jump): Likewise. (move_by_pieces, move_by_pieces_ninsns, clear_by_pieces): MAX_SIZE is now unsigned. (emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned. (emit_group_store): Likewise. (emit_move_insn): I now unsigned. (store_constructor): Use host_integerp, tree_low_cst, and bitsize_unit_node. (get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT. Rework all calculations to use trees and new fields. * expr.h (promoted_input_arg): Regno now unsigned. (store_bit_field, extract_bit_field): Adjust types of pos and size. (mark_seen_cases): Arg is HOST_WIDE_INT. * flow.c (verify_wide_reg_1): REGNO now unsigned. * fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT; precisions and alignments are unsigned. (optimize_bit_field_compare, fold_truthop): Likewise. (int_const_binop): Adjust threshold for size_int_type_wide call. (fold_convert): Likewise. (size_int_type_wide): Make table larger and fix thinko that only had half of table used. (all_ones_mask_p, fold): Precisions are unsigned. * function.c (put_reg_info_stack): REGNO is unsigned. (instantiate_decl): Size is HOST_WIDE_INT. (instantiate_virtual_regs): I is unsigned. (assign_parms): REGNO, REGNOI, and REGNOR are unsigned. (promoted_input_arg): REGNO is unsigned. * function.h (struct function): x_max_parm_reg is now unsigned. * gcse.c (max_gcse_regno): Now unsigned. (struct null_pointer_info): min_reg and max_reg now unsigned. (lookup_set, next_set): REGNO arg now unsigned. (compute_hash_table): REGNO and I now unsigned. (handle_avail_expr): regnum_for_replacing now unsigned. (cprop_insn): REGNO now unsigned. (delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned. * ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case. * global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned. * hard-reg-set.h (reg_class_size): Now unsigned. * integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO. * jump.c (mark_modified_reg): I now unsigned; add cast. (rtx_equal_for_thread_p): Add cast. * loop.c (max_reg_before_loop): Now unsigned. (struct_movable): REGNO now unsigned. (try_copy_prop): REGNO arg unsigned. (regs_match_p): XN and YN now unsigned. (consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned. (strength_reduce): Likewise; NREGS also unsigned. (first_increment_giv, last_increment_giv unsigned): Now unsigned. * loop.h (struct iv_class): REGNO now unsigned. (max_reg_before_loop, first_increment_giv, last_increment_giv): Now unsigned. * machmode.h (mode_size, mode_unit_size): Now unsigned. (mode_for_size, smallest_mode_for_size): Pass size as unsigned. * optabs.c (expand_binop): I and NWORDS now unsigned. (expand_unop): I now unsigned. * print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET. * real.c (significand_size): Now returns unsigned. * real.h (significand_size): Likewise. * regclass.c (reg_class_size): Now unsigned. (choose_hard_reg_mode): Both operands now unsigned. (record_reg_classes): REGNO and NR now unsigned. (reg_scan): NREGS now unsigned. (reg_scan_update): old_max_regno now unsigned. (reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned. * reload.c (find_valid_class): BEST_SIZE now unsigned. (find_dummy_reload): REGNO, NWORDS, and I now unsigned. (hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned. Likewise for variable R. (refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned, as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R. (find_equiv_reg): Add casts. (regno_clobbered_p): Arg REGNO now unsigned. * reload.h (struct reload): NREGS now unsigned. (refers_to_regno_for_reload_p): Regno args are unsigned. (regno_clobbered_p): Likewise. * reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned. (compute_use_by_pseudos): REGNO now unsigned. (find_reg): I and J now unsigned, new variable K, and change loop variables accordingly; THIS_NREGS now unsigned. (alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned. (spill_hard_reg): REGNO arg now unsigned; add casts. (forget_old_reloads_1): REGNO, NR, and I now unsigned. (mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned. (clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO, END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned. (reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned. (choose_reload_regs): MAX_GROUP_SIZE now unsigned. (emit_reload_insns): REGNO now unsigned. (reload_cse_move2add): Add cast. (move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO and rework loop. * resource.c (mark_referenced_resources, mark_set_resources): New variable R; REGNO and LAST_REGNO now unsigned. (mark_target_live_regs): J and REGNO now unsigned. * rtl.c (mode_size, mode_unit_size): Now unsigned. * rtl.h (union rtunion_def): New field rtuint. (XCUINT): New macro. (ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT. (operand_subword, operand_subword_force): Word number is unsigned. (choose_hard_reg_mode): Operands are unsigned. (refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned. (find_regno_note, find_regno_fusage, replace_regs): Likewise. (regno_use_in, combine_instructions, remove_death): Likewise. (reg_scan, reg_scan_update): Likewise. (extended_count): Return is unsigned. * rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I, INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO. (reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned. (reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned. (reg_reg_last_1): FIRS and LAST now unsigned. (dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned. (dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO now unsigned. (find_regno_note, regno_use_in): Arg REGNO now unsigned. (find_regno_fusage): Likewise; also var REGNOTE now unsigned. (find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned. (replace_regs): Arg NREGS now unsigned. * sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0. * simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned. (simplify_binary_operation): Likewise. (cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and THIS_LAST now unsigned. (cselib_record_set): Add cast. * ssa.c (ssa_max_reg_num): Now unsigned. (rename_block): REGNO now unsigned. * stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT; sizes now unsigned. (all_cases_count): Just return -1 not -2. COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT. Rework tests to use trees whenever possible. Use host_integerp and tree_low_cst. (mark_seen_cases): COUNT arg now HOST_WIDE_INT; Likewise variable NEXT_NODE_OFFSET; XLO now unsigned. (check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT. * stor-layout.c (mode_for_size): SIZE arg now unsigned. (smallest_mode_for_size): Likewise. (layout_decl): Simplify handing of a specified DECL_SIZE_UNIT. KNOWN_ALIGN is now an alignment, so simplify code. Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type. (start_record_layout): Renamed from new_record_layout_info. Update to new fields. (debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far): New functions. (place_union_field): Renamed from layout_union_field. Update to use new fields in rli. (place_field): Renamed from layout_field. Major rewrite to use new fields in rli; pass alignment to layout_decl. (finalize_record_size): Rework to use new fields in rli and handle union. (compute_record_mode): Rework to simplify and to use new DECL fields. (finalize_type_size): Make rounding more consistent. (finish_union_layout): Deleted. (layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either. (layout_type, case RECORD_TYPE): Call new function names. (initialize_sizetypes): Set TYPE_IS_SIZETYPE. (set_sizetype): Set TYPE_IS_SIZETYPE earlier. (get_best_mode): UNIT is now unsigned; remove casts. * tree.c (bit_position): Compute from new fields. (byte_position, int_byte_position): New functions. (print_type_hash_statistics): Cast to remove warning. (build_range_type): Use host_integerp and tree_low_cst to try to hash. (build_index_type): Likewise; make subtype of sizetype. (build_index_2_type): Pass sizetype to build_range_type. (build_common_tree_nodes): Use size_int and bitsize_int to initialize nodes; add bitsize_{zero,one,unit}_node. * tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK. (DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise. (DECL_PACKED, DECL_BIT_FIELD): Likewise. (DECL_FIELD_BITPOS): Deleted. (DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields. (DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK. (DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise. (DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise. (DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise. (DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise. (DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise. (DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK. (DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK. (DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise. (DECL_ALIGN): Adjust to new field in union. (DECL_OFFSET_ALIGN): New field. (DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK. (DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK. (union tree_decl): Add struct for both aligns. (enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}. (bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added. (struct record_layout_info): Rework fields to have offset alignment and byte and bit position. (start_record_layout, place_field): Renamed from old names. (rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls. (byte_position, int_byte_position): Likewise. (get_inner_reference): Change types of position and length. * unroll.c (unroll_loop): New variable R; use for some loops. MAX_LOCAL_REGNUM and MAXREGNUM now unsigned. (calculate_giv_inc): Arg REGNO now unsigned. (copy_loop_body): REGNO and SRC_REGNO now unsigned. * varasm.c (assemble_variable): Clean up handling of size using host_integerp and tree_low_cst. (decode_addr_const): Use byte, not bit, position. (output_constructor): bitpos and offsets are HOST_WIDE_INT; use tree_low_cst and int_bit_position. * objc/objc-act.c (build_ivar_list_initializer): Use byte_position. * ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT. * ch/typeck.c (expand_constant_to_buffer): Use int_byte_position. (extract_constant_from_buffer): Likewise. * cp/class.c (build_vbase_pointer_fields): layout_field now place_field. (get_vfield_offset): Use byte_position. (set_rtti_entry): Set OFFSET to ssizetype zero. (get_binfo_offset_as_int): Deleted. (dfs_record_base_offsets): Use tree_low_cst. (dfs_search_base_offsets): Likewise. (layout_nonempty_base_or_field): Reflect changes in RLI format and call byte_position. (layout_empty_base): Convert offset to ssizetype. (build_base_field): use rli_size_unit_so_far. (dfs_propagate_binfo_offsets): Do computation in proper type. (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets. (layout_class_type): Reflect changes in RLI names and fields. (finish_struct_1): Set DECL_FIELD_OFFSET. * cp/dump.c (dequeue_and_dump): Call bit_position. * cp/expr.c (cplus_expand_constant): Use byte_position. * cp/rtti.c (expand_class_desc): Use bitsize_one_node. * cp/typeck.c (build_component_addr): Use byte_position and don't special case for zero offset. * f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node. (ffecom_tree_canonize_ref_): Likewise. * java/class.c (make_field_value): Use byte_position. * java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position. (java_array_data_offset): Likewise. * java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to bzero call. From-SVN: r32742
2000-03-22[multiple changes]Alexandre Petit-Bianco8-580/+1158
2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (check_abstract_method_definitions): New local `end_type_reached'. Make sure we also consider `end_type'. (java_check_abstract_method_definitions): Make sure we also eventually consider `java.lang.Object'. (maybe_use_access_method): Don't use access method if not a pure inner class or if the method's context is right. (find_applicable_accessible_methods_list): New static `object_done'. Don't search abstract classes as interfaces. Fixed indentation. Fixed the `java.lang.Object' only search. Search class' interface(s) first, fully search enclosing contexts. (find_most_specific_methods_list): Pick closest candidates when they're all abstract. 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (check_method_types_complete): New function. (create_class): Reset anonymous class counter only when seeing an non inner classe. (java_complete_class): JDEP_METHOD: Don't recompute signature if incomplete. 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com> * class.c (build_static_ref): Fixed indentation in comment. * java-tree.def (TRY_EXPR): Fixed typo in name. (CLASS_LITERAL): Likewise. * java-tree.h: (TYPE_DOT_CLASS): New macro. (struct lang_type): New field `dot_class'. * jcf-write.c (generate_bytecode_insns): Fixed error message. (generate_classfile): Method `class$' is synthetic. * parse.y (build_do_class_method): New function. (build_dot_class_method_invocation): Likewise. (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary. (resolve_qualified_expression_name): Handle CLASS_LITERAL. (qualify_ambiguous_name): Likewise. (patch_incomplete_class_ref): Invoke synthetic method if necessary. (build_try_statement): Fixed leading comment. 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous classes. * parse.y (patch_method_invocation): Handle anonymous classes creation in static context. 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro. * parse.y (resolve_qualified_expression_name): Use it. (patch_method_invocation): Likewise. 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (register_incomplete_type): JDEP_ENCLOSING set depending on the type of dependency which dictates what the current class is. (unresolved_type_p): Resolved types limited to the current class. (For details, see: http://gcc.gnu.org/ml/gcc-patches/2000-03/msg00790.html) From-SVN: r32701
2000-03-22jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR...Alexandre Petit-Bianco2-3/+10
Mon Mar 20 08:58:51 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR: properly initialize `finished_label.' Don't emit gotos for empty try statements. (Minor fix: http://gcc.gnu.org/ml/gcc-patches/2000-03/msg00762.html) From-SVN: r32690
2000-03-19emit-rtl.c (push_to_full_sequence, [...]): New functions.Martin v. Löwis2-1/+5
* emit-rtl.c (push_to_full_sequence, end_full_sequence): New functions. * except.c (emit_cleanup_handler): Use them. (expand_end_all_catch): Likewise. * function.c (fixup_var_refs): Likewise. (expand_function_end): Clear catch_clauses_last. * rtl.h (push_to_full_sequence, end_full_sequence): Declare. * except.h (struct eh_status): New field x_catch_clauses_last. (catch_clauses_last): New define. * cp/except.c (expand_exception_blocks): Clear catch_clauses_last. * java/except.c (emit_handlers): Clear catch_clauses_last. From-SVN: r32643
2000-03-17* Clean up usages of TREE_INT_CST_LOW.Richard Kenner4-39/+49
* c-parse.in (RESTORE_WARN_FLAGS): Use tree_low_cst. * c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c: Regenerated. * c-tree.h (min_precision): Move declaration to here. * c-typeck.c (build_binary_op): Use host_integerp and tree_low_cst. (build_unary_op, add_pending_init): Use bit_position. (pending_init_member, process_init_element): Likewise. (really_start_incremental_init, push_init_level, pop_init_level): Don't make copies of nodes or modify them in place, use consistent types when tracking positions, and use tree routines computations. (set_init_index, output_init_element): Likewise. (output_pending_init_elements, process_init_element): Likewise. * dbxout.c (dbxout_type_fields): Use bit_position, host_integerp, tree_low_cst and int_bit_position; also minor cleanup. (dbxout_type_method_1, dbxout_range_type, dbxout_type): Likewise. (print_cst_octal): Precision is unsigned. (dbxout_symbol): Ensure DECL_INITIAL is in-range and use tree_low_cst. * dwarf2out.c (ceiling): Input and output are unsigned HOST_WIDE_INT. (simple_type_align_in_bits): Result is unsigned int. Use tree_int_low_cst and host_integerp. (simple_type_size_in_bits): Result is unsigned HOST_WIDE_INT. (field_byte_offset): Result is HOST_WIDE_INT. Change types of internal variables so alignments are unsigned int, offsets are HOST_WIDE_INT and sizes are unsigned HOST_WIDE_INT. Use host_integerp, tree_low_cst, and int_bit_position. (add_bit_offset_attribute): Likewise. (add_data_member_location_attribute): Use tree_cst_low. (add_bound_info): Use host_integerp, integer_zerop, and integer_onep. (add_bit_size_attribute): Use tree_low_cst. (add_pure_or_virtual_attribute, gen_enumeration_type_die): Likewise. * dwarfout.c: Similar changes to dwarf2out.c. * expr.c (expand_expr, case ARRAY_REF): Remove redundant code. * genoutput.c (n_occurences): Return -1 for null string. (strip_whitespace): Accept null string and make into function. (scan_operands): Reflect above changes. * sdbout.c (plain_type_1): Use host_integerp and tree_low_cst. (sdbout_field_types, sdbout_one_type): Likewise; also use bit_position. * ssa.c (rename_registers): Add missing cast of arg to bzero. * tree.c (int_size_in_bytes): Check for too big to represent. (bit_position, int_bit_position, host_integerp, tree_low_cst): New fns. * tree.h (host_integerp, tree_low_cst, bit_position, int_bit_position): New declarations. (min_precision): Delete from here. * varasm.c (decode_addr_const): Use host_integerp, bit_position, and int_bit_position. * objc/objc-act.c (encode_method_prototype): Sizes are HOST_WIDE_INT. (encode_method_def): Likewise. (build_ivar_list_initializer): Use int_bit_position. (generate_shared_structures): Convert size. (encode_type, encode_complete_bitfield): Use integer_zerop. (encode_bitfield): Use tree_low_cst and int_bit_position. * ch/typeck.c (min_precision): New function. (build_chill_slice): Use host_integerp and tree_low_cst. (expand_constant_to_buffer): Likewise and also int_bit_position. LO is unsigned HOST_WIDE_INT (build_chill_array_ref_1): Make `i' be HOST_WIDE_INT; use tree_low_cst. (extract_constant_from_buffer): Sizes are now HOST_WIDE_INT. Use host_integerp and tree_low_cst. (build_chill_bin_type): Use host_integerp and tree_low_cst. (layout_chill_range_type): Use tree_int_cst_sgn, compare_tree_int, tree_low_cst, and min_precision. (apply_chill_array_layout): Cleanups for types of variables and use tree_int_cst_sgn, compare_tree_int, and tree_low_cst. (apply_chill_field_layout): Likewise. * cp/class.c (build_vbase_path): Use integer_zerop. (build_vtable_entry): Use tree_low_cst. (get_vfield_offset): Use bit_position. (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT. Use tree_low_cst. (check_bitfield_decl): Set DECL_SIZE using convert. (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop. (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT. Use tree_low_cst. (finish_struct_1): Use bit_position. (dump_class_hierarchy): Use tree_low_cst. * cp/cp-tree.h (min_precision): Add declaration. * cp/decl.c (xref_tag, xref_basetypes): Use tree_low_cst. * cp/error.c (dump_type_suffix): Use host_integerp and tree_low_cst. (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst. * cp/expr.c (cplus_expand_constant): Use bit_position. * cp/init.c (build_vec_init): Use host_integerp and tree_low_cst. * cp/rtti.c (get_base_offset): Use bit_position. * cp/typeck.c (build_binary_op): Use integer_zerop, compare_tree_int, host_integerp, and tree_low_cst. (pointer_int_sum): Use integer_zerop. (build_component_addr): Use bit_position. * java/class.c (make_field_value): Properly handle sizes. (get_dispatch_vector): Use tree_low_cst and host_integerp. (layout_class_method): Count using trees. * java/decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node. * java/expr.c (java_array_data_offset): Use int_bit_position. (build_newarray, build_anewarray): Use host_integerp and tree_low_cst. (build_invokevirtual): Use tree_low_cst and do computations with trees. From-SVN: r32607
2000-03-16lang.c (flag_hash_synchronization): New global.Tom Tromey7-11/+39
* lang.c (flag_hash_synchronization): New global. (lang_f_options): Added `hash-synchronization'. * lang-options.h: Mention -fhash-synchronization. * java-tree.h (flag_hash_synchronization): Declare. * expr.c (java_lang_expand_expr): Only push `sync_info' value when hash table synchronization is disabled. * decl.c (init_decl_processing): Only push `sync_info' value when hash table synchronization is disabled. * class.c (make_class_data): Only push `sync_info' field when hash table synchronization is disabled. Removed dead code. From-SVN: r32593
2000-03-16* lang.c (lang_decode_option): Enable -Wunused when -Wall given.Tom Tromey2-0/+7
From-SVN: r32591
2000-03-16decl.c (init_decl_processing): Set type of `sync_info' to be pointer to Object.Tom Tromey3-23/+66
* decl.c (init_decl_processing): Set type of `sync_info' to be pointer to Object. * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'. Correctly compute bit number for current slot. Zero `high' and `low' in DS_LENGTH case. Don't skip inherited fields. Use mark_reference_fields. (mark_reference_fields): New function. From-SVN: r32572
2000-03-15re GNATS gcj/172 (compiler rejects inner-class argument to inner-class ↵Alexandre Petit-Bianco3-2/+9
constructor) Tue Mar 14 17:15:41 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (register_incomplete_type): Fixed initialization of JDEP_ENCLOSING. (This is a fix to the gcj PR #172: http://sourceware.cygnus.com/ml/java-prs/2000-q1/msg00169.html) From-SVN: r32556