On Sat, Oct 06, 2001 at 09:01:34AM -0500, Gibbs Tanton - tgibbs wrote:
> which doesn't look that bad.  Really, I would imagine all of this would be
> autogenerated by process_opfunc.pl so it doesn't matter what the longhand
> looks like.

Not really; I expect that "external" code will also manipulate PMCs.

> Also, how will adds of different types be handled.  In the above if pmc2 is
> an int and pmc3 is a float we're going to have to know that and do a switch
> or something to convert to/create the right type.

There'll actually (and I need to change my vtable code to reflect this) be
several versions of each vtable function, depending on the relative type of
each PMC. Basically, there'll be two easily optimizable versions (i.e. types
are the same, or types can be easily converted with a cast or simple function)
and a non-optimized version, which would actually be the naive implementation
in many cases. ("These types are way out of my depth - call ->get_integer on
each one, and add the result.")

I didn't think that up, by the way, it was Dan's idea. :)

-- 
Oh dear. I've just realised that my fvwm config lasted longer than my
marriage, in that case.
    - Anonymous

Reply via email to