This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: EGCS: pointer to member functions.
- To: oliva at dcc dot unicamp dot br
- Subject: Re: EGCS: pointer to member functions.
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Thu, 17 Jun 1999 08:55:25 +0200
- CC: mrs at wrs dot com, brendan at dgs dot monash dot edu dot au, egcs at egcs dot cygnus dot com
- References: <199906162318.QAA14187@kankakee.wrs.com> <or7lp3cpw4.fsf@saci.lsd.dcc.unicamp.br>
> Opinions?
Generating pointer-to-member thunks for all member functions seems
like a big overhead to me. In my experience, pointer-to-members are
infrequently used, not justifying the overhead. But then, I thought
that virtual bases are also infrequently used, until I saw the CORBA
Objects-by-value mapping ...
I'll throw some other alternatives into the discussion:
1. the thunk could receive another implicit parameter, which is the
type_info of the static type of the target object. It could then
cast this to the right type, and invoke the target method.
2. if code size is the problem, we don't have to do the
pointer-to-member evaluation inline. It could be a libgcc
function. If course, that would not improve speed, only size -
perhaps done with -Os only.
Regards,
Martin