EGCS: pointer to member functions.

Martin v. Loewis martin@mira.isdn.cs.tu-berlin.de
Thu Jun 17 00:03:00 GMT 1999


> 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


More information about the Gcc mailing list