Dan Sugalski <[EMAIL PROTECTED]> wrote:
> What we're going to do is have a get_temp opcode to fetch temporary PMCs.
> Where do they come from? Leave a plate of milk and cookies on your back
> porch and the Temp PMC Gnomes will bring them. :)
Ah, things are starting to make sense!
> new P0, list # New list in P0
> get_lex P1, $x # Find $x
> get_type I0, P1 # Get $x's type
> set_i I1, 1 # Set our loop var
> $10: new P2, I0 # Get a temp of the same type as $x
> add P2, P1, I1 # Add counter to $x, store result in P2
> push P0, P2 # Push it into the list
> eq I1, 65, $20, $10 # If loop counter's 65 goto $20, else $10
> $20 call foo # Call the sub
>
should "new P2, I0" be "get_temp P2, I0" given what you said on the
first line above?
Also, it would be nice to have
new P0, list, 65
to pre-extend the list, as the compiler knows in advance how many args
it's going to push. But I'm bikeshedding now :-)