* c-decl.c (finish_enum): Simplify code to determine minimum and
maximum values of the enum, and calculate the type. Remove check
for FUNCTION_DECLs in the values list, which cannot happen. Replace
the DECL_INITIAL of each enumeration constant with a copy converted
to the enumeration type. When updating variant types, don't bother
updating the type itself.
* c-typeck.c (build_binary_op): Simplify conditional expressions
when weeding out spurious signed-unsigned warnings. Add new
spurious warning category: if the unsigned quantity is an enum
and its maximum value fits in signed_type(result_type). Update
commentary.
(build_conditional_expr): Warn here if one alternative is signed
and the other is unsigned.
Tom Tromey [Wed, 5 Jan 2000 17:23:34 +0000 (17:23 +0000)]
natMethod.cc (get_ffi_type): Test size of jboolean and select correct ffi type on that basis.
* java/lang/reflect/natMethod.cc (get_ffi_type): Test size of
jboolean and select correct ffi type on that basis.
(_Jv_CallNonvirtualMethodA): Handle `void' return type.
Constructor call always has `void' return type.
Tom Tromey [Wed, 5 Jan 2000 16:35:20 +0000 (16:35 +0000)]
Class.h (getSignature): Updated.
* java/lang/Class.h (getSignature): Updated.
* java/lang/Class.java (getSignature): Updated.
* java/lang/natClass.cc (getSignature): Added `is_constructor'
argument.
(getConstructor): Ensure constructor is public.
(_getConstructors): Check for public-ness of constructor when
`declared' is false, not when it is true.
Joel Sherrill [Wed, 5 Jan 2000 07:10:35 +0000 (07:10 +0000)]
configure.in (m68*-*-rtemscoff*): New target, formal name for old m68*-*-rtems*.
* configure.in (m68*-*-rtemscoff*): New target, formal name for
old m68*-*-rtems*.
(m68*-*-rtemself*): New target.
(mips64orion-*-rtems*): Remove duplicate definition of tm_file.
(sparc*-*-rtemsaout*): New target, formal name for old sparc*-*-rtems*.
(sparc*-*-rtemself*): New target.
(sparc*-*-rtems*): Now elf not a.out.
* config/i386/rtems.h: Include config/rtems.h.
* config/i386/rtemself.h: Include config/rtems.h.
* config/i960/rtems.h: Include config/rtems.h.
* config/m68k/rtems.h: Include config/rtems.h.
* config/m68k/rtemself.h: Include config/rtems.h.
* config/mips/rtems64.h: Include config/rtems.h.
* config/pa/rtems.h: Include config/rtems.h.
* config/rs6000/rtems.h: Include config/rtems.h.
* config/sh/rtems.h: Include config/rtems.h.
* config/sh/rtemself.h: Include config/rtems.h.
* config/sparc/rtems.h: Include config/rtems.h.
* config/sparc/rtemself.h: Include config/rtems.h
* configure.in: Add pj target.
* configure: Regenerate.
* config/pj: New directory.
* config/pj/lib1funcs.S: New file.
* config/pj/linux.h: New file.
* config/pj/pj.c: New file.
* config/pj/pj.md: New file.
* config/pj/pjl.h: New file.
* config/pj/t-pj: New file.
* config/pj/xm-pj.h: New file
Michael Hayes [Tue, 4 Jan 2000 23:57:40 +0000 (23:57 +0000)]
c4x.h (IS_XXX_REG, [...]): Swap behaviour of macros so that they're consistent with their names.
* config/c4x/c4x.h (IS_XXX_REG, IS_XXX_REGNO): Swap behaviour of
macros so that they're consistent with their names.
* config/c4x/c4x.c (IS_XXX_REG, IS_XXX_REGNO): Likewise.
* config/c4x/c4x.md (IS_XXX_REG, IS_XXX_REGNO): Likewise.
David Edelsohn [Tue, 4 Jan 2000 20:09:19 +0000 (20:09 +0000)]
expmed.c (SLOW_UNALIGNED_ACCESS): Add mode and align parameters to default definition.
* expmed.c (SLOW_UNALIGNED_ACCESS): Add mode and align parameters
to default definition.
(store_bit_field): Call SLOW_UNALIGNED_ACCESS with mode and alignment.
(store_fixed_bit_field): Call macro with word_mode and alignment.
(extract_bit_field): Call macro with relevant mode and alignment.
* expr.c (SLOW_UNALIGNED_ACCESS): Add mode and align parameters
to default definition.
(move_by_pieces): Call SLOW_UNALIGNED_ACCESS with word_mode
and alignment.
(move_by_pieces_ninsns): Likewise.
(clear_by_pieces): Likewise.
(emit_push_insn): Likewise.
(store_field): Call macro with relevant mode and alignment.
(expand_expr): Likewise.
(expand_expr_unaligned): Likewise.
* rs6000.h (HANDLE_PRAGMA_PACK): Define.
(SLOW_UNALIGNED_ACCESS): Define.
(CASE_VECTOR_MODE): Always use 32-bit offsets.
(ASM_FILE_END): Generate 64-bit symbol in 64-bit mode.
(EXTRA_SECTOIN_FUNCTIONS): Indent .csect pseudo-op.
(toc_section): Likewise and .toc pseudo-op.
(ASM_DECLARE_FUNCTION): Likewise. Align text more strictly in
64-bit mode.
(TEXT_SECTION_ASM_OP): Likewise.
(ASM_OUTPUT_ADD_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Always use
32-bit offsets.
Stan Cox [Tue, 4 Jan 2000 17:19:41 +0000 (17:19 +0000)]
haifa-sched.c (build_control_flow): Change unreachable simple loop test to check if...
2000-01-04 Stan Cox <scox@cygnus.com>
* haifa-sched.c (build_control_flow): Change unreachable simple
loop test to check if current block has only one predecessor.
(find_rgns): Initialize degree. Use dest as degree index, not src.
* calls.c (expand_call): Likewise for
`old_stack_arg_under_construction'.
* cpphash.c (macroexpand): Likewise for `args' and `rest_zero'.
* function.c (pad_to_arg_alignment): Likewise for `save_var' and
`save_constant'.
* gcc.c (execute): Likewise for `ut' and `st'.
* genattrtab.c (attr_rtx): Likewise for `rt_val'.
* genopinit.c (gen_insn): Likewise for `m1', `m2' and `op'.
* jump.c (jump_optimize_1): Likewise for `temp2'.
* local-alloc.c (block_alloc): Likewise for `r1'.
* loop.c (recombine_givs): Likewise for `life_start' and `life_end'.
* reg-stack.c (check_asm_stack_operands): Likewise for `clobber_reg'.
(subst_asm_stack_regs): Likewise for `clobber_reg' and `clobber_loc'.
* regmove.c (fixup_match_1): Likewise for `insn_const', `dst_node'
and `set2'.
* reload.c (find_reloads): Likewise for `goal_alternative_number'
and `goal_earlyclobber'.
* scan-decls.c (scan_decls): Likewise for `prev_id_end'.
* sdbout.c (sdbout_one_type): Likewise for `member_scl'.
* stupid.c (stupid_life_analysis): Likewise for `chain'.
* unroll.c (copy_loop_body): Likewise for `copy'.
* varasm.c (output_constructor): Likewise for `byte'.
ch:
* actions.c (update_else_range_for_int_const): Initialize
variables `lowval' and `highval'.
(update_else_range_for_range): Likewise for `low_range_val' and
`high_range_val'.
Jan Hubicka [Tue, 4 Jan 2000 14:44:03 +0000 (15:44 +0100)]
i386.c (ix86_expand_move): Allow pushes of memory, offload to memory all FP constants for constant->reg moves.
* i386.c (ix86_expand_move): Allow pushes of memory, offload to memory
all FP constants for constant->reg moves.
(ix86_split_to_parts): Try to convert memory address into immediate
when available in the constant pool.
* i386.h (PREFERRED_RELOAD_CLASS): Allow CONST_DOUBLE->integer reg
moves.
(LEGITIMATE_CONSTANT_P): Return 1.
* i386.md (pushsf): New splitter to convert constant pool memory
reference to immediate.
(mov?f): Likewise; do not allow CONST_DOUBLE for reg moves before
reload.
Tom Tromey [Tue, 4 Jan 2000 08:46:52 +0000 (08:46 +0000)]
[multiple changes]
2000-01-04 Tom Tromey <tromey@cygnus.com>
* java/lang/reflect/natConstructor.cc (newInstance): Pass
declaring class as return_type argument to
_Jv_CallNonvirtualMethodA.
* java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA): In
constructor case, create object and use it as `this' argument.
* java/lang/Class.h (_getConstructors): Declare.
(_getFields): Declare.
* java/lang/Class.java (getConstructors): Wrote.
(_getConstructors): New native method.
(getDeclaredConstructors): Wrote.
(_getFields): Declare new native method.
* java/lang/natClass.cc (_Jv_LookupInterfaceMethod): Removed
incorrect comment.
(getMethod): Work correctly when class is primitive.
(getDeclaredMethods): Likewise. Compute offset using `method',
not `mptr'.
(getDeclaredMethod): Likewise.
(getConstructor): Wrote.
(ConstructorClass): New define.
(getDeclaredConstructor): Wrote.
(_getConstructors): New method.
(_getFields): New method.
(getFields): Wrote.
* prims.cc (_Jv_equaln): New function.
* java/lang/Class.java (getSignature): Declare.
* resolve.cc (_Jv_LookupDeclaredMethod): Moved to natClass.cc.
* java/lang/natClass.cc (_Jv_LookupDeclaredMethod): Moved from
resolve.cc.
(getSignature): New method.
(getDeclaredMethod): Wrote.
(getMethod): Wrote.
Include StringBuffer.h.
* java/lang/Class.h (Class): Added _Jv_FromReflectedConstructor
as a friend. Unconditionally declare _Jv_LookupDeclaredMethod as
a friend.
(getSignature): Declare.
* include/jvm.h (_Jv_GetTypesFromSignature): Declare.
(_Jv_equaln): Declare.
(_Jv_CallNonvirtualMethodA): Declare.
* Makefile.in: Rebuilt.
* Makefile.am (nat_source_files): Added natConstructor.cc.
(java/lang/reflect/Constructor.h): New target.
* java/lang/reflect/natConstructor.cc: New file.
* java/lang/reflect/Constructor.java (newInstance): Now native.
(declaringClass): Renamed from decl_class.
(offset): Renamed from index.
(getType): New native method.
(getModifiers): Now native.
(getParameterTypes): Call getType if required.
(hashCode): Include hash code from declaring class.
(modifiers): Removed.
(toString): Call getType if required.
* gcj/method.h (_Jv_FromReflectedConstructor): New function.
* java/lang/reflect/natMethod.cc (hack_call): New method.
Removed `#if 0' around FFI code.
Include <gnu/gcj/RawData.h>.
(invoke): Use _Jv_CallNonvirtualMethodA. Throw
IllegalArgumentException when argument object and class disagree.
(_Jv_GetTypesFromSignature): New function.
(getType): Use it.
(ObjectClass): New define.
(_Jv_CallNonvirtualMethodA): New function.
* java/lang/reflect/Method.java (hack_trampoline): New method.
(hack_call): New native method.
1999-12-21 Per Bothner <per@bothner.com>
* java/lang/natClass.cc (getDeclaredMethods): Correctly compute
offset in new Method.
Ulrich Drepper [Mon, 3 Jan 2000 21:48:49 +0000 (21:48 +0000)]
(format_char_info): Update comment.
(format_char_info): Update comment. (check_format_info): Recognize 'z'
modifier in the same way 'Z' was recognized. Emit warning for formats
new in ISO C99 only if flag_isoc9x is not set.
* cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
* class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
or unshare_base_binfos for virtual bases here.
* search.c (dfs_get_vbase_types): Do it here.
(get_vbase_types): Adjust.
Jan Hubicka [Mon, 3 Jan 2000 15:49:51 +0000 (16:49 +0100)]
combine.c (expand_compound_operation): Do not convert ZERO_EXTEND to SIGN_EXTEND, convert SIGN_EXTEND to ZERO_EXTEND.
* combine.c (expand_compound_operation): Do not convert ZERO_EXTEND to
SIGN_EXTEND, convert SIGN_EXTEND to ZERO_EXTEND.
(make_compound_operation): Choose cheaper alternative between
ZERO_EXTEND and SIGN_EXTEND when sign bit is not set.
Jan Hubicka [Mon, 3 Jan 2000 15:23:56 +0000 (16:23 +0100)]
regclass.c (op_costs): Remove global variable.
* regclass.c (op_costs): Remove global variable.
(record_reg_classes): New parameter "op_costs" and "reg_pref".
(record_operand_costs): Break out from ...
(scan_one_insn): ... here.
(dump_regclass): Make dumps nicer.
(regclass): Dump preferrences choosed and changes done during passes.
Mark Mitchell [Sun, 2 Jan 2000 19:41:09 +0000 (19:41 +0000)]
cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
* cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
(layout_basetypes): Remove.
* class.c (propagate_binfo_offsets): Moved here from tree.c.
Update to handle primary virtual bases.
(remove_base_fields): New function, split out from
layout_basetypes.
(dfs_mark_primary_bases_and_set_vbase_offsets): New function.
(layout_virtual_bases): New function, split out from
layout_basetypes. Update to handle primary virtual bases.
(layout_basetypes): Moved here from tree.c. Use
remove_base_fields and layout_virtual_bases.
* search.c (dfs_mark_primary_bases_queue_p): New function.
(mark_primary_bases): Use it.
* tree.c (CEIL): Remove.
(propagate_binfo_offsets): Remove.
(layout_basetypes): Remove.
Mark Mitchell [Sun, 2 Jan 2000 02:13:53 +0000 (02:13 +0000)]
class.c (build_vtable): Don't return a value.
* class.c (build_vtable): Don't return a value. Don't rebuild
vtables for bases that have already been handled.
(prepare_fresh_vtable): Don't rebuild vtables for bases that have
already been handled.
(modify_one_vtable): Adjust accordingly.
(fixup_vtable_deltas1): Likewise.
(finish_struct_1): Likewise.
* class.c (assume_compiled, assume_compiled_node): Add static
prototype.
(add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
* jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
* jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
* parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
to `__modifier' to avoid stringifying it.
* parse.y (verify_constructor_circularity): Don't call a variadic
function with a non-literal format string.
(java_check_abstract_methods): Move unreachable code inside
`continue' statement.
(lookup_method_invoke): Call xstrdup, not strdup.
* expr.c (expand_java_field_op): Avoid the use of ANSI string
concatenation.
expr.c (expand_invoke): Layout the loaded class before attempting to use it.
Thu Dec 16 00:09:45 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (expand_invoke): Layout the loaded class before
attempting to use it.
(expand_java_field_op): Allow final field assignments to take
place in $finit$.
* typeck.c (convert): Return error_mark_node if expr is null.
Kaveh R. Ghazi [Fri, 31 Dec 1999 02:41:24 +0000 (02:41 +0000)]
parse.h (ABSTRACT_CHECK, [...]): Avoid the use of ANSI string concatenation.
* parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
concatenation.
* class.c (class_depth): Return -1 if the class doesn't load
properly.
* expr.c (can_widen_reference_to): Check for errors during depth
computation and return 0 accordingly.
* jcf-parse.c (parse_source_file): Call java_fix_constructors to
create default constructors and add an other error check.
* parse.h (java_fix_constructors): Prototyped.
* parse.y (java_pre_expand_clinit): Likewise.
(build_super_invocation): Re-prototyped to feature one argument.
(java_check_circular_reference): Directly use `current'.
(java_fix_constructors): New function.
(java_check_regular_methods): Don't create default constructors
here, but abort if none were found.
(java_complete_expand_methods): Pre-process <clinit> calling
java_pre_expand_clinit.
(java_pre_expand_clinit): New function.
(fix_constructors): build_super_invocation invoked with the
current method declaration as an argument.
(build_super_invocation): Use the context of the processed method
decl argument instead of current_class.
* typeck.c (lookup_java_method): Take WFLs in method names into
account.
Geoff Keating [Thu, 30 Dec 1999 19:44:13 +0000 (19:44 +0000)]
Make the Fortran front-end use garbage collection:
* com.c (ffecom_init_0): Make double_ftype_double,
float_ftype_float, ldouble_ftype_ldouble,
ffecom_tree_ptr_to_fun_type_void local.
(tracker_head): New static variable.
(mark_tracker_head): New, marker procedure for tracker_head.
(ffecom_save_tree_forever): New procedure.
(ffecom_init_zero_): Remove obstack use.
(ffecom_make_gfrt_): Remove obstack use.
(ffecom_sym_transform_): Remove obstack use, save appropriate trees.
(ffecom_transform_common_): Remove obstack use, save appropriate
trees.
(ffecom_type_namelist_): Remove obstack use, save appropriate
trees.
(ffecom_type_vardesc_): Remove obstack use, save appropriate trees.
(ffecom_lookup_label): Remove obstack use, save appropriate trees.
(duplicate_decls): Remove obstack use.
(finish_function): push & pop ggc context around
rest_of_compilation when building nested function.
(mark_binding_level): New function.
(init_decl_processing): Mark all the GC roots.
(ggc_p): Set to 1.
(lang_mark_tree): New function.
(lang_mark_false_label_stack): New trivial function.
* com.h (ffecom_save_tree_forever): Declare as external.
* lex.c (ffelex_hash_): Use GC to allocate the filename string
even when ffelex_kludge_flag_.
* ste.c (ffeste_io_ialist_): Register a static root.
(ffeste_io_inlist_): Likewise.
(ffeste_io_icilist_): Likewise.
(ffeste_io_cllist_): Likewise.
(ffeste_io_cilist_): Likewise.
(ffeste_io_olist_): Likewise.
* Makefile.in (OBJS): Don't use ggc-callbacks.o.
(OBJDEPS): Likewise.
(GGC_H): New variable.
Update dependencies.
* where.c (ffewhere_head): New global.
(mark_ffewhere_head): New marker procedure for ffewhere_head.
(ffewhere_file_kill): Use GC to do memory management.
(ffewhere_file_new): Use GC to do memory management.
* ggc.j: New file.