diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2001-07-21 00:03:21 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2001-07-21 00:03:21 +0000 |
commit | 3461fba7ad8292cc6bbf62d4cf0e0f8038137a30 (patch) | |
tree | fcf4022c73cb6f01329bee1631bcc45d94dff2ba /gcc/cp/cp-tree.h | |
parent | 50b996bfb88f3492796f26aad1a67901095ce4ed (diff) | |
download | gcc-3461fba7ad8292cc6bbf62d4cf0e0f8038137a30.zip gcc-3461fba7ad8292cc6bbf62d4cf0e0f8038137a30.tar.gz gcc-3461fba7ad8292cc6bbf62d4cf0e0f8038137a30.tar.bz2 |
Remove old-abi remnants.
Remove old-abi remnants. Remove comments about old abi
behaviour. Remove refences to 'new-abi' in comments.
* cp-tree.h: Adjust comments.
(vbase_offsets_in_vtable_p): Delete.
(vcall_offsets_in_vtable_p): Delete.
(vptrs_present_everywhere_p): Delete.
(all_overridden_vfuns_in_vtables_p): Delete.
(merge_primary_and_secondary_vtables_p): Delete.
(TYPE_CONTAINS_VPTR_P): Adjust.
(VTT_NAME_PREFIX): Remove.
(CTOR_VTBL_NAME_PREFIX): Remove.
(init_vbase_pointers): Remove.
* class.c: Adjust coments.
(build_vbase_pointer_fields): Delete.
(build_vbase_pointer): Remove old-abi code.
(build_secondary_vtable): Likewise.
(modify_all_vtables): Likewise.
(create_vtable_ptr): Likewise.
(layout_class_type): Likewise.
(finish_struct_1): Likewise.
(finish_vtbls): Likewise.
(dfs_finish_vtbls): Delete.
(build_vbase_offset_vtbl_entries): Remove old-abi code.
* cvt.c: Adjust comments.
* decl.c: Adjust comments.
* decl2.c: Adjust comments.
* init.c: Adjust comments.
(construct_virtual_bases): Remove old-abi code.
* lang-specs.h: Remove -fno-new-abi.
* mangle.c: Adjust comments.
* rtti.c: Adjust comments.
(get_base_offset): Remove old-abi-code.
* search.c: Adjust comments.
(dfs_init_vbase_pointers): Remove.
(dfs_vtable_path_unmark): Remove.
(init_vbase_pointers): Remove.
* semantics.c: Adjust comments.
(emit_associated_thunks): Remove old-abi code.
* typeck.c: Adjust comments.
From-SVN: r44215
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 113 |
1 files changed, 7 insertions, 106 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index b32bd0c..465ba51 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -133,11 +133,9 @@ Boston, MA 02111-1307, USA. */ The BV_FN is the declaration for the virtual function itself. BINFO_VTABLE - Sometimes this is a VAR_DECL. Under the new ABI, it is instead - an expression with POINTER_TYPE pointing that gives the value + This is an expression with POINTER_TYPE that gives the value to which the vptr should be initialized. Use get_vtbl_decl_for_binfo - to extract the VAR_DECL for the complete vtable; that macro works - in both ABIs. + to extract the VAR_DECL for the complete vtable. DECL_ARGUMENTS For a VAR_DECL this is DECL_ANON_UNION_ELEMS. @@ -224,40 +222,6 @@ extern int flag_rtti; extern int flag_huge_objects; -/* Nonzero if virtual base class offsets are stored in the virtual - function table. Zero if, instead, a pointer to the virtual base is - stored in the object itself. */ -#define vbase_offsets_in_vtable_p() (1) - -/* Nonzero if displacements to the `this' pointer to use when calling - virtual functions in a virtual base class are present in the - vtable. */ -#define vcall_offsets_in_vtable_p() (1) - -/* Nonzero if a derived class that needs a vptr should always get one, - even if a non-primary base class already has one. For example, - given: - - struct S { int i; virtual void f(); }; - struct T : virtual public S {}; - - one could either reuse the vptr in `S' for `T', or create a new - vptr for `T'. If this flag is nonzero we choose the latter - alternative; otherwise, we choose the former. */ -#define vptrs_present_everywhere_p() (1) - -/* Nonzero if the vtable for a derived class should contain the - virtual functions from the primary base and all virtual functions - present in the class itself. Zero if, instead, it should contain - only those virtual functions from the primary base together with - the functions declared in the derived class (but not in any base - class). */ -#define all_overridden_vfuns_in_vtables_p() (1) - -/* Nonzero if primary and secondary vtables are combined into a single - vtable. */ -#define merge_primary_and_secondary_vtables_p() (1) - /* Language-dependent contents of an identifier. */ @@ -2431,8 +2395,7 @@ struct lang_decl /* Nonzero if this class has a virtual function table pointer. */ #define TYPE_CONTAINS_VPTR_P(NODE) \ (TYPE_POLYMORPHIC_P (NODE) \ - || (vbase_offsets_in_vtable_p () \ - && TYPE_USES_VIRTUAL_BASECLASSES (NODE))) + || TYPE_USES_VIRTUAL_BASECLASSES (NODE)) extern int flag_new_for_scope; @@ -2587,67 +2550,15 @@ extern int flag_new_for_scope; /* A pointer-to-function member type looks like: - struct { - short __delta; - short __index; - union { - P __pfn; - short __delta2; - } __pfn_or_delta2; - }; - - where P is a POINTER_TYPE to a METHOD_TYPE appropriate for the - pointer to member. The fields are used as follows: - - If __INDEX is -1, then the function to call is non-virtual, and - is located at the address given by __PFN. - - If __INDEX is zero, then this a NULL pointer-to-member. - - Otherwise, the function to call is virtual. Then, __DELTA2 gives - the offset from an instance of the object to the virtual function - table, and __INDEX - 1 is the index into the vtable to use to - find the function. - - The value to use for the THIS parameter is the address of the - object plus __DELTA. - - For example, given: - - struct B1 { - int i; - }; - - struct B2 { - double d; - void f(); - }; - - struct S : public B1, B2 {}; - - the pointer-to-member for `&S::f' looks like: - - { 4, -1, { &f__2B2 } }; - - The `4' means that given an `S*' you have to add 4 bytes to get to - the address of the `B2*'. Then, the -1 indicates that this is a - non-virtual function. Of course, `&f__2B2' is the name of that - function. - - (Of course, the exact values may differ depending on the mangling - scheme, sizes of types, and such.). - - Under the new ABI, we do: - struct { __P __pfn; ptrdiff_t __delta; }; - (We don't need DELTA2, because the vtable is always the first thing - in the object.) 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. + (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 + pointer to the function. Unfortunately, using the lowest bit of PFN doesn't work in architectures that don't impose alignment requirements on function @@ -3342,15 +3253,6 @@ extern varray_type local_classes; #define EXCEPTION_CLEANUP_NAME "exception cleanup" -/* The name used as a prefix for VTTs. When the new ABI mangling - scheme is implemented, this should be removed. */ - -#define VTT_NAME_PREFIX "__vtt_" - -/* The name used as a prefix for construction vtables. */ - -#define CTOR_VTBL_NAME_PREFIX "__ctorvt_" - #define THIS_NAME_P(ID_NODE) (strcmp(IDENTIFIER_POINTER (ID_NODE), "this") == 0) #if !defined(NO_DOLLAR_IN_LABEL) || !defined(NO_DOT_IN_LABEL) @@ -4165,7 +4067,6 @@ extern tree lookup_fnfields PARAMS ((tree, tree, int)); extern tree lookup_member PARAMS ((tree, tree, int, int)); extern int look_for_overrides PARAMS ((tree, tree)); extern void get_pure_virtuals PARAMS ((tree)); -extern tree init_vbase_pointers PARAMS ((tree, tree)); extern void get_vbase_types PARAMS ((tree)); extern void maybe_suppress_debug_info PARAMS ((tree)); extern void note_debug_info_needed PARAMS ((tree)); |