At 02:59 PM 10/20/2001 +0100, Simon Cozens wrote:
>On Mon, Oct 08, 2001 at 06:36:32PM -0400, Dan Sugalski wrote:
> >   num_type: 0, 1, 2, 3, 4, 5 for "same as you", native int, bigint, native
> >            float, bigfloat, object
> >
> >     P1->vtable_funcs[VTABLE_ADD + P2->num_type](P1, P2, P0);
>
>I don't understand the "same as you" thing; num_type isn't a function,
>but a part of the structure. How does P2->num_type then know that it's
>the same or different from anything else?

It doesn't, and in the general case--dispatch via opcodes--it won't matter 
or be used. (Well, unless we check, but I don't know that the cost of the 
check is worth it)

It's in there as a short-cut optimization for use when the interpreter 
*knows* that the second PMC is the same class as the first, for example if 
it's working with temps, or there's complex funkiness going on inside and 
there's sufficient information to determine that the two PMCs are the same.

If it turns out to be not used, we'll yank it.

                                        Dan

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

Reply via email to