Re: Introspection API



On Fri, 2005-02-25 at 09:51 -0800, Dave Benson wrote:
> On Fri, Feb 25, 2005 at 12:12:30PM -0500, John Ehresman wrote:
> > Dave Benson wrote:
> > >a small c program to generate GValue marshallers from the metadata
> > >seems pretty straightforward.  such marshallers should probably
> > >be compiled at the same time as the metadata... i think.
> > 
> > Yes, but what's the advantage of using compiled marshallers over using 
> > libffi?  Are you concerned about portability?  I wonder if mozilla uses 
> > libffi or if they have their own mechanism for foreign calls.

Mozilla has it's own mechanism (though I think there is a version
of it that uses libffi as the backend).

> yeah, portability.
> 
> it's not very encouraging that everyone seems to adopt
> their own local copy of libffi.  it means trying out
> glib on new platforms is going to be a pain, subject to
> bugs, etc.  by contrast, generating marshallers is totally
> portable, and we do it anyways, i believe, for signals.

I'd love to get rid of marshaler generation for signals ...
something we could make optional if we had a libffi dependency
or equivalent.

Dynamic marshaling code is available for an extremely wide
range of platforms and new architectures don't pop up every
day... and I think our emphasis has to be on making GTK+ work
well on the architectures where people actually run it.

The amount of marshalers generated for something the size of
GTK+ would be non-trivial. I'd guess somewhere in the 200k-500k
of object code range.

And for demarshalers (calling from C into non-native code) it 
gets worse, since the main ways I know of doing that
require multiple copies of each demarshaler. (How do you tell
if widget_class->expose_event or widget_class->button_press_event
was called if they are the same demarshaler?)

Regards,
						Owen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]