Does the Cog VM update to a new image format version number when
snapshotting? 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 ;)
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