[Vm-dev] mantis http://bugs.squeak.org/view.php?id=7349

Andreas Raab andreas.raab at gmx.de
Wed May 6 15:28:13 UTC 2009

David T. Lewis wrote:
> The main concern seems to be existing bugs in the code base that are
> just now being exposed. I don't know of any easy way out; as far as
> I know you have to either inspect the code manually, or wait for it
> to fail at run time.
> Note, it is common in many plugins to pop things off the stack early
> in the method, so you cannot just patch the last line of the method.
> You need to check senders to determine the expected argument count,
> then make sure that the plugin matches this.
> SmartSyntaxInterpreterPlugin automates much of this, so it's less
> of a concern for plugins that use it. Also, I think that Eliot has
> some ideas for making the problem go away entirely.

We changed our VMs to ignore push/pop requests from plugins and rather 
have the VM do the management of arguments. The VM interprets popXYZ as 
an access of method argument n-x and pushXYZ as an implicit return from 
a method and then pops the "right" number of args regardless of what the 
plugin thinks it requested. We also added more convenient (lef-to-right) 
argument accessors. This has worked very well for us.

One thing we could do is for the next generation of VMs which have a new 
image format won't be referred to as Squeak 3x etc. to up the 
interpreter proxy major number and use only that mechanism. Thoughts?

   - Andreas

More information about the Vm-dev mailing list