On 12.02.2009, at 20:18, Eliot Miranda wrote:
AFAICT you can produce a 64-bit VM that runs a 32-bit image with this technique, but you can't get a VM that runs both.
That's exactly as stated in the FAQ. Any given VM can run *either* 32- bit images *or* 64-bit images. It's a compile-time choice.
On the other hand, start-up code that reads a 32-bit image and swizzles it to a full 64-bit image is perfectly sensible and quite easy in the Squeak context because (IIRC) the 64-bit format doesn't do things like widen the SmallInteger range, implement immediate Floats, etc. Its simply a matter of reading the data, writing two words for each oop and scaling each non-SmallInteger oop appropriately. But as I said I don't see this code anywhere.
This is not the job of the VM. You have to manually create a 64 bit image.
- Bert -