[Vm-dev] PrimErr* missing (standard VM)

David T. Lewis lewis at mail.msen.com
Fri Mar 18 04:11:49 UTC 2011


On Thu, Mar 17, 2011 at 12:37:50PM -0300, Javier Pim??s wrote:
>  
> I'm not sure why/when this started happening, we just tried to update to
> latests versions of Alien and standard (old) VM by loading monticello
> versions (manually).
> 
> When using PrimErr* in SqueakNOS plugin methods, they are written in red, as
> if they are globals that were not defined. On the other side, we are seeing
> that they are defined as class vars in Interpreter, so it makes sense that
> they are not found as globals, maybe they were moved in some update?
> 
> Finally, Interpreter>>initializePrimitiveErrorCodes looks at special obj
> array at: 52, which is nil, so how can I initialize it?
> 
> And also, how should we send primitiveFailFor: message?

Hi Javier,

The Squeak VM is under active development, and I think that you
are probably seeing version differences because of this.

One of the things that Eliot Miranda has introduced as part of
the Cog VM development is error codes for VM failures. These
improvements need to be added to the standard interpreter VM,
but this is not yet done. So I think that some of the problems
you see may be due to Alien, which probably uses the newer error
return mechanism.

To initialize the special objects array, see the method
SmalltalkImage>>recreateSpecialObjectsArray. But if the value
of the special objects array at 52 is nil, then I think that
you are working with an older image that does not contain the
necessary support for Alien. So possibly you are loading Alien
code that requires the newer error codes in the VM as well as
an updated special objects array.

The #primitiveFailFor: message is part of Eliot's improved
error reporting for primitives. This has not yet been added
to the standard interpreter VM. But the updated special objects
array for Alien is already supported in any recent version of
VMMaker.

I am not really familiar with the SqueakNOS plugin, but maybe this
will give you some ideas to help find the problem.

HTH,
Dave



More information about the Vm-dev mailing list