Universal VM for 32/64 bit images (was: [Vm-dev] 64bit FFI?)
David T. Lewis
lewis at mail.msen.com
Fri Feb 13 03:38:43 UTC 2009
On Thu, Feb 12, 2009 at 11:18:02AM -0800, 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.
Actually, I think that it probably *is* possible to make a Squeak
VM that will run both 32 and 64 bit images, although performance may
be poor and the plugins would be problematic. The basic idea is to
move BytesPerWord and BaseHeaderSize into run time variables rather
than compile time macros (i.e. move them from class variables in
ObjectMemory to instance variables in ObjectMemory), and set the
values at image load time. Everything else should just work.
I've been meaning to do this for quite some time but have not gotten
around to trying it.
More information about the Vm-dev