[cxx-abi-dev] Function descriptors in vtable

Mark Mitchell mark at codesourcery.com
Tue Jan 21 16:29:05 UTC 2003



--On Tuesday, January 21, 2003 06:25:11 PM +0200 Noam Lampert 
<noaml at mainsoft.com> wrote:

> This modification is very hard to do, and is also unique to this
> specific ABI. The result is that this specific ABI is designed such that
> it is very hard to get COM to work on this ABI.

Yes, this is true.

The point of this format was to save a couple of memory accesses
on a virtual call.  Your proposed alternative format (with the -1 as
a flag) would require a conditional at every call site, increasing
code size and running time.

You could, however, use the GP/Address pair like this:

  GP: Real function pointer
  Address: Pointer to stub code

The stub code would simply look like:

 (*GP)();

All virtual functions would use this same stub.

-- 
Mark Mitchell                mark at codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com



More information about the cxx-abi-dev mailing list