At 03:21 PM 10/6/2001 +0100, Simon Cozens wrote:
>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.

I'd rather external code leave the guts of the PMCs alone, but I'm not sure 
how likely that'll end up being.

> > 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. :)

Yup, feel free to blame this one on me. :-)

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to