* cp-tree.h (build_shared_int_cst): New function.
* call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
* class.c (modify_vtable_entry): Likewise.
(add_virtual_function): Split out code to generated shared
INTEGER_CSTs to build_share_int_cst.
(modify_all_vtables): Handle all the overridden functions here.
Add overridden functions from non-primary virtual bases to the
primary vtable.
(finish_struct_1): Adjust call to modify_all_vtables. Add
overridden functions from non-primary bases to the vtable.
* tree.c (build_shared_int_cst): New function.
From-SVN: r31476
2000-01-14 Andrew Haley <aph@cygnus.com>
* java/lang/natThrowable.cc: New file.
* java/lang/Throwable.java (fillInStackTrace): Make native.
(printStackTrace): Call native method to do this.
(Throwable): Call fillInStackTrace.
(stackTrace): New variable.
* include/jvm.h: Add _Jv_ThisExecutable functions.
* prims.cc: (_Jv_execName): New variable.
(catch_segv): Call fillInStackTrace.
(catch_fpe): Ditto.
(_Jv_ThisExecutable): New functions.
(JvRunMain): Set the name of this executable.
* Makefile.am: Add java/lang/natThrowable.cc.
Add name-finder.cc.
* Makefile.in: Rebuilt.
* acconfig.h: Add HAVE_PROC_SELF_EXE.
* configure.in: Force link with __frame_state_for in
FORCELIBGCCSPEC. Add new checks for backtrace.
* include/config.h.in: Rebuilt.
* name-finder.cc: New file.
* include/name-finder.h: New file.
From-SVN: r31460
* cp-tree.h (flag_new_abi): Move.
(flag_use_cxa_atexit): Likewise.
(flag_honor_std): Likewise.
(flag_rtti): Likewise.
(vbase_offsets_in_vtable_p): Define.
(vptrs_present_everywhere_p): Likewise.
(TYPE_CONTAINS_VPTR_P): Likewise.
(dfs_walk_real): Declare.
* class.c (build_vbase_pointer_fields): Check
vbase_offsets_in_vtable_p.
(dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
BINFO_VPTR_FIELD.
(build_vbase_offset_vtbl_entries): Simplify.
(build_vbase_offset_vtbl_entries): Adjust.
(build_vbase_pointer): Add ability to look up vbase offsets in
vtable.
(start_vtable): New function.
(add_virtual_function): Use it.
(determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
(num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
(build_vtbl_initializer): Take the type of the complete object as
input. Use it to correctly calculate vbase offsets.
(dfs_finish_vtbls): Pass the complete type to
build_vtbl_initializer.
(check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
(create_vtable_ptr): Create a vtable even if there are no
new virtual functions, under the new ABI.
(finish_struct_1): Likewise.
(get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
* decl.c (exapnd_static_init): Remove call to
preserve_initializer.
* decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
vtables.
* init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
(expand_virtual_init): Use vbase_offsets_in_vtable_p.
(construct_virtual_bases): Don't initialize virtual base pointers
under the new ABI.
(build_aggr_init): Clean up comment.
(expand_aggr_init_1): Likewise.
* rtti.c (expand_class_desc): Store the virtual function table
index where the vbase offset lives in the offset field.
* search.c (dfs_walk_real): Make it global.
(dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
* tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
* tinfo.h (USItype): Make it signed under the new ABI.
* tinfo.cc (convert_to_base): New function. Encapsulate base
conversion logic here.
(__class_type_info::do_upcast): Use it.
(__class_type_info::do_dyncast): Likewise.
(__class_type_info::do_find_public_subobj): Likewise.
From-SVN: r31452
2000-01-16 Anthony Green <green@cygnus.com>
* parse.y (build_string_concatenation): Only use
StringBuffer(String) shortcut if String arg is constant.
From-SVN: r31450
* libjava.lang/pr83.out: New file.
* libjava.lang/pr83.java: New file.
* libjava.lang/pr109.out: New file.
* libjava.lang/pr109.java: New file.
From-SVN: r31446
* cp-tree.h (num_extra_vtbl_entries): New function.
(size_extra_vtbl_entries): Likewise.
(dfs_vtable_path_unmark): Likewise.
(dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
(dfs_vtable_path_marked_real_bases_queue_p): Likewise.
* class.c (num_extra_vtbl_entries): New function.
(size_extra_vtbl_entries): Likewise.
(dfs_build_vbase_offset_vtbl_entries): New function.
(build_vbase_offset_vtbl_entries): Likewise.
(build_vtbl_initializer): Use it.
(finish_struct_1): Adjust vtable sizes (using
num_extra_vtbl_entries).
* expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
THUNK_DECL is non-NULL before expanding it.
* init.c (expand_virtual_init): Adjust the vtable pointer by
size_extra_vtbl_entries before storing it.
* search.c (get_shared_vase_if_not_primary): Adjust prototype.
Handle TREE_LIST parameters here, not in the dfs_* functions.
(dfs_unmarked_real_bases_queue_p): Adjust.
(dfs_marked_real_bases_queue_p): Likewise.
(dfs_vtable_path_unmarked_real_bases_queue_p): New function.
(dfs_vtable_path_marked_real_bases_queue_p): New function.
(dfs_vtable_path_unmark): Likewise.
From-SVN: r31439
* gcse.c (insert_insn_end_bb): Use emit_block_insn_before
instead of emit_insn_before. Also handle NOTE_INSN_BASIC_BLOCK
when walking backwards to find all the parameter loads when
the basic block ends in a call.
From-SVN: r31437