[Vm-dev] About StackInterpreter VM

David T. Lewis lewis at mail.msen.com
Fri Jan 7 03:55:14 UTC 2011


On Fri, Jan 07, 2011 at 02:47:59AM +0100, Igor Stasenko wrote:
>  
> Hello, VM hackers
> 
> i just want to ask, how well StackVM could replace original Squeak VM?
> If that's only image format aspect, then i think we can deal with that
> and forget about it once and for all.
> Also, i suspect that stack-interpreter VMs will be much more stable
> (because not including JIT), so people can always
> use it as a fallback solution if they can't make own code running stable on Cog.
> 
> But if there are more issues than just image format, then please let me know.
> Because maintaining two different VMs is too much, especially that we
> don't have enough human resources for that.
> And so, we must choose. And choice is obvious, as to me.  :)

With respect to work and human resources, by far the largest part of
the work will be in merging and reconciling the code bases. This needs
to be done carefully and is therefore time consuming, and to to be honest
not very enjoyable work so I suspect that it may take longer than any
of us might like. Aside from that, I see no reason that the StackInterpreter
would not become a replacement for the standard interpreter.

Near term, StackInterpreter cannot support pre-closure images, which
affects a large community of users. Currently it does not support
the 64 bit image or the ability to create 32 and 64 bit image VMs from
a single code base, although I know of no obstacles here other than
somebody doing the work.

So in summary, no real technical obstacles, just some work and
dedication to make it happen.

> 
> P.S. Can you please remind me, what conversion is needed between old
> image format and one which is edible by stack-based VM?
> And why just don't add it by default, so Stack VMs (and Cog) can read
> old image format (closure one)?

Cog can read any image that includes closure support.

The traditional interpreter can read all known image formats, including
Cog. StackInterpreter and Cog require images with closure support. Cog
is currently limited to 32-bit image and 32-bit host. StackInterpreter
is limited to 32-bit image, and I don't know if it can be compiled
for 32-bit host. For most users, "limited to 32-bit" is no real limitation,
since all practical images are 32-bit, and all widely used VMs are
32-bit host anyway.

Currently allocated image formats are documented in the ImageFormat
package on SqueakSource/VMMaker, see unit tests in ImageFormatTest.

Dave



More information about the Vm-dev mailing list