[Vm-dev] goto instruction with Cog VM

Colin Putney colin at wiresong.com
Mon Nov 3 21:11:53 UTC 2014

On Mon, Nov 3, 2014 at 11:34 AM, Eliot Miranda <eliot.miranda at gmail.com>

> If the bytecode is one that takes an integer on top of stack, and an Array
> literal containing bytecode pcs, falling through on out of range, then
> nothing other than the index need be pushed on top of stack.  That would be
> my preference.

I think Levante's suggestion for jumpToTop was just to take the pc from the
top of the stack, with no indirection through an Array literal. Then
jumping to a pc in an array would be

- push the array
- push the index of the pc you want
- send #at:
- jumpToTop

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20141103/01c750eb/attachment.htm

More information about the Vm-dev mailing list