diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2001-07-21 09:42:21 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2001-07-21 09:42:21 +0000 |
commit | c4372ef4c6476dc6ed6da01dbe1b44564aee938f (patch) | |
tree | 600fa30db184de710e309de080b6a3ad19d82722 /gcc/cp/cp-tree.h | |
parent | f4653d92782e80a2ebceae16e81a2850452aa0c3 (diff) | |
download | gcc-c4372ef4c6476dc6ed6da01dbe1b44564aee938f.zip gcc-c4372ef4c6476dc6ed6da01dbe1b44564aee938f.tar.gz gcc-c4372ef4c6476dc6ed6da01dbe1b44564aee938f.tar.bz2 |
tm.texi: Remove DEFAULT_VTABLE_THUNKS.
gcc:
* doc/tm.texi: Remove DEFAULT_VTABLE_THUNKS.
* config/freebsd.h: Likewise.
* config/linux.h: Likewise.
* config/openbsd.h: Likewise.
* config/alpha/linux-elf.h: Likewise.
* config/arm/linux-elf.h: Likewise.
* config/d30v/d30v.h: Likewise.
* config/fr30/fr30.h: Likewise.
* config/ia64/aix.h: Likewise.
* config/ia64/ia64.h: Likewise.
* config/mips/linux.h: Likewise.
* config/pj/pj.h: Likewise.
* config/rs6000/linux.h: Likewise.
* config/sparc/linux.h: Likewise.
* config/sparc/linux64.h: Likewise.
cp:
Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
* cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
(CPTI_INDEX_IDENTIFIER): Remove.
(CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
(delta2_identifier): Remove.
(index_identifier): Remove.
(pfn_or_delta2_identifier): Remove.
(flag_vtable_thunks): Remove.
(VTABLE_DELTA2_NAME): Remove.
(VTABLE_INDEX_NAME): Remove.
(FNADDR_FROM_VTABLE_ENTRY): Adjust.
(vfunc_ptr_type_node): Adjust.
(VTABLE_NAME_PREFIX): Adjust.
(build_vfn_ref): Lose first parameter.
(fixup_all_virtual_upcast_offsets): Remove.
* decl.c (initialize_predefined_identifiers): Remove
delta2_identifier, index_identifier, pfn_or_delta2_identifier.
(init_decl_processing): Remove no-vtable-thunk code.
* decl2.c (flag_vtable_thunks): Remove.
(mark_vtable_entries): Remove no-vtable-thunk code.
* error.c (dump_decl): Remove no-vtable-thunk code.
(dump_expr): Adjust ptr to member function code.
* init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
code.
* rtti.c (build_headof): Remove no-vtable-thunk code.
(get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
* search.c (get_base_distance): Remove expand_upcast_fixups case.
(virtual_context) Remove.
(expand_upcast_fixups): Remove.
(fixup_virtual_upcast_offsets): Remove.
(fixup_all_virtual_upcast_offsets): Remove.
* typeck.c (get_member_function_from_ptrfunc): Remove
no-vtable-thunk code.
* call.c (build_over_call): Adjust call to build_vfn_ref.
* class.c (build_vfn_ref): Lose first parameter. Remove
no-vtable-thunk code.
(build_rtti_vtbl_entries): Remove no-vtable-thunk code.
(build_vtable_entry): Remove no-vtable-thunk code.
From-SVN: r44227
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 47 |
1 files changed, 14 insertions, 33 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 465ba51..e7005c7 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -552,15 +552,12 @@ enum cp_tree_index CPTI_COMPLETE_DTOR_IDENTIFIER, CPTI_BASE_DTOR_IDENTIFIER, CPTI_DELETING_DTOR_IDENTIFIER, - CPTI_DELTA2_IDENTIFIER, CPTI_DELTA_IDENTIFIER, CPTI_IN_CHARGE_IDENTIFIER, CPTI_VTT_PARM_IDENTIFIER, - CPTI_INDEX_IDENTIFIER, CPTI_NELTS_IDENTIFIER, CPTI_THIS_IDENTIFIER, CPTI_PFN_IDENTIFIER, - CPTI_PFN_OR_DELTA2_IDENTIFIER, CPTI_VPTR_IDENTIFIER, CPTI_STD_IDENTIFIER, @@ -594,8 +591,7 @@ extern tree cp_global_trees[CPTI_MAX]; #define wchar_decl_node cp_global_trees[CPTI_WCHAR_DECL] #define vtable_entry_type cp_global_trees[CPTI_VTABLE_ENTRY_TYPE] /* The type used to represent an offset by which to adjust the `this' - pointer in pointer-to-member types and, when not using vtable - thunks, in vtables. */ + pointer in pointer-to-member types. */ #define delta_type_node cp_global_trees[CPTI_DELTA_TYPE] /* The type used to represent an index into the vtable. */ #define vtable_index_type cp_global_trees[CPTI_VTABLE_INDEX_TYPE] @@ -671,20 +667,14 @@ extern tree cp_global_trees[CPTI_MAX]; /* The name of a destructor that destroys virtual base classes, and then deletes the entire object. */ #define deleting_dtor_identifier cp_global_trees[CPTI_DELETING_DTOR_IDENTIFIER] - -#define delta2_identifier cp_global_trees[CPTI_DELTA2_IDENTIFIER] #define delta_identifier cp_global_trees[CPTI_DELTA_IDENTIFIER] #define in_charge_identifier cp_global_trees[CPTI_IN_CHARGE_IDENTIFIER] - /* The name of the parameter that contains a pointer to the VTT to use for this subobject constructor or destructor. */ #define vtt_parm_identifier cp_global_trees[CPTI_VTT_PARM_IDENTIFIER] - -#define index_identifier cp_global_trees[CPTI_INDEX_IDENTIFIER] #define nelts_identifier cp_global_trees[CPTI_NELTS_IDENTIFIER] #define this_identifier cp_global_trees[CPTI_THIS_IDENTIFIER] #define pfn_identifier cp_global_trees[CPTI_PFN_IDENTIFIER] -#define pfn_or_delta2_identifier cp_global_trees[CPTI_PFN_OR_DELTA2_IDENTIFIER] #define vptr_identifier cp_global_trees[CPTI_VPTR_IDENTIFIER] /* The name of the std namespace. */ #define std_identifier cp_global_trees[CPTI_STD_IDENTIFIER] @@ -1031,11 +1021,6 @@ extern int warn_reorder; extern int flag_signed_bitfields; -/* True for more efficient but incompatible (not fully tested) - vtable implementation (using thunks). - 0 is old behavior; 1 is new behavior. */ -extern int flag_vtable_thunks; - /* INTERFACE_ONLY nonzero means that we are in an "interface" section of the compiler. INTERFACE_UNKNOWN nonzero means we cannot trust the value of INTERFACE_ONLY. If INTERFACE_UNKNOWN @@ -1180,11 +1165,9 @@ enum languages { lang_c, lang_cplusplus, lang_java }; /* Virtual function addresses can be gotten from a virtual function table entry using this macro. */ #define FNADDR_FROM_VTABLE_ENTRY(ENTRY) \ - (!flag_vtable_thunks ? \ - TREE_VALUE (TREE_CHAIN (TREE_CHAIN (CONSTRUCTOR_ELTS (ENTRY)))) \ - : !DECL_THUNK_P (TREE_OPERAND ((ENTRY), 0)) \ - ? (ENTRY) \ - : DECL_INITIAL (TREE_OPERAND ((ENTRY), 0))) + (DECL_THUNK_P (TREE_OPERAND ((ENTRY), 0)) \ + : DECL_INITIAL (TREE_OPERAND ((ENTRY), 0)) \ + ? (ENTRY)) #define FUNCTION_ARG_CHAIN(NODE) \ (TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (NODE)))) @@ -2555,9 +2538,11 @@ extern int flag_new_for_scope; ptrdiff_t __delta; }; - (As the vtable is always the first thing in the object, we don't - need an offset to it.) If the function is virtual, then PFN is one - plus twice the index into the vtable; otherwise, it is just a + If __pfn is NULL, it is a NULL pointer-to-member-function. + + (Because the vtable is always the first thing in the object, we + don't need its offset.) If the function is virtual, then PFN is + one plus twice the index into the vtable; otherwise, it is just a pointer to the function. Unfortunately, using the lowest bit of PFN doesn't work in @@ -3087,8 +3072,7 @@ extern tree error_mark_list; /* Node for "pointer to (virtual) function". This may be distinct from ptr_type_node so gdb can distinguish them. */ -#define vfunc_ptr_type_node \ - (flag_vtable_thunks ? vtable_entry_type : ptr_type_node) +#define vfunc_ptr_type_node vtable_entry_type /* For building calls to `delete'. */ @@ -3156,7 +3140,7 @@ extern varray_type local_classes; #define AUTO_TEMP_NAME "_$tmp_" #define AUTO_TEMP_FORMAT "_$tmp_%d" #define VTABLE_BASE "$vb" -#define VTABLE_NAME_PREFIX (flag_vtable_thunks ? "__vt_" : "_vt$") +#define VTABLE_NAME_PREFIX "__vt_" #define VFIELD_BASE "$vf" #define VFIELD_NAME "_vptr$" #define VFIELD_NAME_FORMAT "_vptr$%s" @@ -3178,7 +3162,7 @@ extern varray_type local_classes; #define AUTO_TEMP_NAME "_.tmp_" #define AUTO_TEMP_FORMAT "_.tmp_%d" #define VTABLE_BASE ".vb" -#define VTABLE_NAME_PREFIX (flag_vtable_thunks ? "__vt_" : "_vt.") +#define VTABLE_NAME_PREFIX "__vt_" #define VFIELD_BASE ".vf" #define VFIELD_NAME "_vptr." #define VFIELD_NAME_FORMAT "_vptr.%s" @@ -3207,7 +3191,7 @@ extern varray_type local_classes; #define AUTO_TEMP_FORMAT "__tmp_%d" #define VTABLE_BASE "__vtb" #define VTABLE_NAME "__vt_" -#define VTABLE_NAME_PREFIX (flag_vtable_thunks ? "__vt_" : "_vt_") +#define VTABLE_NAME_PREFIX "__vt_" #define VTABLE_NAME_P(ID_NODE) \ (!strncmp (IDENTIFIER_POINTER (ID_NODE), VTABLE_NAME, \ sizeof (VTABLE_NAME) - 1)) @@ -3247,9 +3231,7 @@ extern varray_type local_classes; #define VTBL_PTR_TYPE "__vtbl_ptr_type" #define VTABLE_DELTA_NAME "__delta" -#define VTABLE_INDEX_NAME "__index" #define VTABLE_PFN_NAME "__pfn" -#define VTABLE_DELTA2_NAME "__delta2" #define EXCEPTION_CLEANUP_NAME "exception cleanup" @@ -3592,7 +3574,7 @@ extern tree perform_implicit_conversion PARAMS ((tree, tree)); /* in class.c */ extern tree build_vbase_path PARAMS ((enum tree_code, tree, tree, tree, int)); extern tree build_vtbl_ref PARAMS ((tree, tree)); -extern tree build_vfn_ref PARAMS ((tree *, tree, tree)); +extern tree build_vfn_ref PARAMS ((tree, tree)); extern tree get_vtable_decl PARAMS ((tree, int)); extern void add_method PARAMS ((tree, tree, int)); extern int currently_open_class PARAMS ((tree)); @@ -4106,7 +4088,6 @@ extern tree convert_pointer_to_vbase PARAMS ((tree, tree)); extern tree find_vbase_instance PARAMS ((tree, tree)); extern tree binfo_for_vbase PARAMS ((tree, tree)); extern tree binfo_via_virtual PARAMS ((tree, tree)); -extern void fixup_all_virtual_upcast_offsets PARAMS ((tree)); /* in semantics.c */ extern void init_cp_semantics PARAMS ((void)); |