(Moved over to -internals, since it's not really a parser API thing)

At 11:06 AM 11/30/00 -0600, Jarkko Hietaniemi wrote:
>Presumably.  But why are you then still talking about "the IV slot in
>a scalar"...?  I'm slow today.  Show me how
>
>         $a = 1.2; $b = 3; $c = $a + $b;
>
>is going to work, what kind of opcodes do you see being used?
>(for the purposes of this exercise, you may not assume the optimizer
>  doing $c = (1.2+3) behind the curtains :-)

Okay, assuming $a, $b, and $c alread exist, in pseudo-opcodes:

         newscalar       t1, num, 1.2
         newscalar       t2, int, 3
         scalar_assign   a, t1
         scalar_assign   b, t2
         newscalar       t3, num, 0
         add             t3, a, b
         scalar_assign   c, t3

If they don't exist already, then something like:

         newscalar       a, num, 1.2
         newscalar       b, int, 3
         newscalar       c, num, 0
         add             t3, a, b

But that probably doesn't help much. Let me throw together something more 
detailed and we'll see where we go from there.

                                        Dan

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

Reply via email to