[squeak-dev] Re: Failing tests

David T. Lewis lewis at mail.msen.com
Tue Dec 15 13:06:33 UTC 2009

On Mon, Dec 14, 2009 at 08:23:27PM -0800, Andreas Raab wrote:
> Levente Uzonyi wrote:
> >Mirror primitives do not exists in the current vm. Will the vm have 
> >mirror primitives? Should we keep the tests? Removing these would "fix" 
> >6 errors.
> IIRC, the mirror primitive tests were designed to test that certain 
> primitives will be applied to the "last argument" instead of only to the 
> receiver. I.e., such that one could do both:
> Object>>class
>   "answer the class of the receiver"
>   <primitive: 1234>
> as well as:
> Mirror>>classOf: anObject
>   <primitive: 1234>
> It would be good if we could keep those working (perhaps ask Eliot for 
> an opinion).

It would also be helpful to get a brief description that can be applied
to the (missing) class comment for MirrorPrimitiveTests. I found a brief
reference on Eliot's blog, from discussion with Florin Mateoc:

  3. bytecodes for fast and guaranteed access to an object's public
     and hidden fields (size, class, and identity hash). These can be
     expressed in source code with what you already have (e.g. in VW):

       thisContext _objectClass: anObject

     and so on, but it does not have to be translated to normal
     bytecodes/message sends, as this is one of the few instances where
     things can be statically compiled (if only we had the right bytecodes)

     Right-oh. I call these Mirror Primitives after David and Gilad's
     work on Self.

But I don't understand this well enough to turn it into a class comment.


More information about the Squeak-dev mailing list