[Vm-dev] Setting the Cog bit

Eliot Miranda eliot.miranda at gmail.com
Wed Jun 23 02:07:48 UTC 2010


On Tue, Jun 22, 2010 at 6:52 PM, David T. Lewis <lewis at mail.msen.com> wrote:

>
> Does the Cog VM update to a new image format version number when
> snapshotting?


Yes it does.  It and the Stack VM set the image format to 6505.  This
reflects the platform-order floats change which is not backwards-compatible.

Note that Cog also insists on a 6504 or 6505 format image to start-u, i.e.
it won;t attempt to start-up non-closure images.



> If not, then I have the following proposal:
>
> An image that is snapshotted by a Cog VM is going to expect Cog
> support when next loaded. It would be good if the image snapshot
> declares this explicitly so the VM can exit in a controlled manner
> if unable to provide the required support.
>
> I propose that we add a Cog bit to the image format version number,
> as illustrated in the attached change set. This can be extended in
> the future such that an image that requires "foo" support from a VM
> will set the "foo bit".
>
> The original Squeak images had image format number 6502. With closure
> support, this became 6504. Requiring Cog implies a requirement for
> closure support, so an image that requires Cog support would be 6505.
> For 64-bit images, the corresponding image format numbers are 68000,
> 68002, and 68003. Note that bit 0 was previously unused, which means
> that Cog would become the recipient of the highly-coveted bit zero
> position ;)
>

:)  Looks like I accidentally chose the right bit :)


> There are plenty of free bits available to be allocated for future
> capabilities, and the high order bit would be reserved for expansion
> if the need ever arises.
>
> Dave
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20100622/c1838fa6/attachment.htm


More information about the Vm-dev mailing list