[C++ PATCH] Vaporize FNADDR_FROM_VTABLE_ENTRY
Stan Shebs
shebs@apple.com
Tue Jul 31 17:52:00 GMT 2001
Garbage collection in the mean streets of G++. Passes build, etc.
OK to commit?
Stan
2001-07-31 Stan Shebs <shebs@apple.com>
* cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
(fnaddr_from_vtable_entry): Remove decl.
* method.c (use_thunk): Update comment.
Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.633
diff -c -3 -p -r1.633 cp-tree.h
*** cp-tree.h 2001/07/31 16:12:03 1.633
--- cp-tree.h 2001/08/01 00:44:06
*************** enum languages { lang_c, lang_cplusplus,
*** 1158,1170 ****
((CP_TYPE_QUALS (NODE) & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE)) \
== TYPE_QUAL_CONST)
- /* Virtual function addresses can be gotten from a virtual function
- table entry using this macro. */
- #define FNADDR_FROM_VTABLE_ENTRY(ENTRY)
\
- (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))))
--- 1158,1163 ----
*************** extern int bound_pmf_p PARAMS ((tree)
*** 4197,4203 ****
extern tree ovl_cons PARAMS ((tree, tree));
extern int ovl_member PARAMS ((tree, tree));
extern tree build_overload PARAMS ((tree, tree));
- extern tree fnaddr_from_vtable_entry PARAMS ((tree));
extern tree function_arg_chain PARAMS ((tree));
extern int promotes_to_aggr_type PARAMS ((tree, enum tree_code));
extern int is_aggr_type_2 PARAMS ((tree, tree));
--- 4190,4195 ----
Index: method.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/method.c,v
retrieving revision 1.207
diff -c -3 -p -r1.207 method.c
*** method.c 2001/07/31 16:12:03 1.207
--- method.c 2001/08/01 00:44:06
*************** use_thunk (thunk_fndecl, emit_p)
*** 387,395 ****
fnaddr = DECL_INITIAL (thunk_fndecl);
if (TREE_CODE (DECL_INITIAL (thunk_fndecl)) != ADDR_EXPR)
/* We already turned this thunk into an ordinary function.
! There's no need to process this thunk again. (We can't just
! clear DECL_THUNK_P because that will confuse
! FNADDR_FROM_VTABLE_ENTRY and friends.) */
return;
/* Thunks are always addressable; they only appear in vtables. */
--- 387,393 ----
fnaddr = DECL_INITIAL (thunk_fndecl);
if (TREE_CODE (DECL_INITIAL (thunk_fndecl)) != ADDR_EXPR)
/* We already turned this thunk into an ordinary function.
! There's no need to process this thunk again. */
return;
/* Thunks are always addressable; they only appear in vtables. */
More information about the Gcc-patches
mailing list