Reenabling Ada by default

Per Bothner per@bothner.com
Sun Sep 12 02:46:00 GMT 2004


Florian Weimer wrote:

> By the way, have you already decided on the implementation model for
> interfaces?  Do you plan to mirror the C++ ABI (which requires one
> word in every object for each interface it implements), a "fat
> pointers" model (where access-to-interface types include a pointer to
> an interface descriptor and the object), or a hybrid (something based
> on hashing, for example)?

You might also look at the GCJ way of implementing Java interfaces.
An object reference is a plain pointer, and there are not extra
per-object "vobject" fields as in C++.  Instead we use a kind of
double dispatch using initialization-time-computed indexin, which
yields constant-time dispatch.

The GCJ ABI is changing to support binary compatibility; I don't know
how this changes the interface implementation.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/



More information about the Gcc mailing list