On Thu, Jul 8, 2010 at 5:38 AM, David T. Lewis <lewis@mail.msen.com> wrote:

On Wed, Jul 07, 2010 at 06:01:42PM -0700, Andreas Raab wrote:
>
> On 7/7/2010 3:11 PM, David T. Lewis wrote:
> >Personally, I do not have a good sense of how this should be handled.
> >I expect that we will want to keep the traditional SqueakVM alive
> >and healthy for at least a few years into the future, but I do not
> >know if it is better to merge it with the StackVM, or just let it
> >be separatedly maintained for some period of time.
>
> Eliot needs to comment on this but the intention was always to keep the
> "classic" Squeak VM working and add the context-to-stack mapping
> (StackInterpreter) and the JIT (CoInterpreter). So the real work would
> be to merge the Interpreter sources and promote any necessary changes to
> [Stack|Co]Interpreter as needed.

So possibly the common portions of Interpreter and StackInterpreter could
be moved into a shared base class? The hierarchy looks a bit tortured,
but it should keep both the simulators and the C code generator happy.

 ObjectMemory
   InterpreterBase
     NewObjectMemory


I am completly ignorant, but cannnot we have a better name than NewObjectMemory?   What if then we have a even newer one?

 
       StackInterpreter
         CoInterpreter
           CogVMSimulator ...
     Interpreter
       InterpreterSimulator ...

The above structure could be accomplished in steps as time permits,
checking at each update to ensure that the generated interp.c remains
unchanged for both Interpreter and CoInterpreter.

If it turns out that the methods in StackInterpreter are more or less
a superset of those in Interpreter (I have not checked in detail), then
the InterpreterBase class would go away:

 ObjectMemory
   Interpreter
     InterpreterSimulator ...
     NewObjectMemory
       StackInterpreter
         CoInterpreter
           CogVMSimulator ...

Dave