At 03:19 AM 12/26/2001 -0800, Boris Tschirschwitz wrote:
>Hi.
>When I am reading about Perl internal datatypes I wonder if they are going
>to be Parrot internal types, especially the BIGINTs and BIGNUMs.
>
>Will I be able to do someting like
>         mov I3,45e3
>or are the BIGs going to be implemented as PMCs?

BIGs are going to be implemented as a specialized form of a buffer, so 
that'd probably be:

   set S3, 45e3

If we were going to handle BIGs at the interpreter level. Currently I'm not 
intending on that, though. (My intentions, as always, are prone to change...)

>I ask because I have the following idea:
>I think it would be beneficial to have a vector flags for BIGINTS and
>BIGNUMS.
>If the vector flag is set, then the buffer pointer actually points to an
>array of length length.
>
>Doing this would be beneficial because we'd save a lot of instruction
>dispatches when handing arrays.
>For example I envision than a line like
>         add N3,N1,N2
>adds the BIGNUM arrays in N1 and N2 elementwise until the smaller one is
>worked through.
>This would also make it easier to use vector instructions or multiple
>processors, so I hope.

Good idea--this is actually what we're doing with PMCs. If you do:

    add P3, P2, P1

and P1 and P2 hold container PMCs (probably just arrays, but we may do 
hashes too) then we'll iterate through them and do what you're suggesting. 
(Though we may go to the end of the bigger one and pad the smaller with 
zeroes, I'm not sure)

                                        Dan

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

Reply via email to