PrimErr* missing (standard VM)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

PrimErr* missing (standard VM)

melkyades
 
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?

Thanks!
      Javier.

--
Javier Pimás
Ciudad de Buenos Aires
Reply | Threaded
Open this post in threaded view
|

Re: PrimErr* missing (standard VM)

David T. Lewis
 
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