[squeak-dev] Re: New Cog VMs available

Eliot Miranda eliot.miranda at gmail.com
Sun Dec 7 03:17:19 UTC 2014


Oops, for http://www.mirandabanda.org/files/Cog/VM/VM.r3163/ read
http://www.mirandabanda.org/files/Cog/VM/VM.r3164

On Sat, Dec 6, 2014 at 1:53 PM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:

> ... at http://www.mirandabanda.org/files/Cog/VM/VM.r3163/.
>
> CogVM binaries as per VMMaker.oscog-eem.972/r3163
>
> Fix a devilishly tricky bug with 32-bit Spur and PICs in the Cogit.  In
> 32-bit
> Spur only zero is a valid cache tag, that for Characters, due to
> SmallIntegers
> having both 2r11 and 2r01 as valid tags.  The cache check prolog collapses
> these down onto 1 by anding with 1 and hence collapses Character's 2r10 to
> 0.
>
> The cache tag is also tested in the PIC abort routine to distinguish
> between
> an MNU abort and an interpret abort.  A PIC MNU entry jumps to code that
> first
> zeros the cache tag (held in ClassReg) before calling the abort routine,
> which
> tests ClassReg and selects the relevant abort processing.
>
> Hence in 32-bit Spur if a send site is linked for Character and later
> extended
> to a PIC with an interpret case, that interpret case will instead invoke
> MNU
> processing.  This is rare; first there needs to be a send to a CHaracter,
> then
> a send to something else which binds to something that must be interpreted.
> Ouch.
>
> The fix is simple; if a send site that was linked with a zero cache tag
> (which
> can only happen in 32-bit Spur) link to an open PIC instead of to a closed
> PIC,
> or in the case of an MNU do not link.
>
> Add a debug lookup routine that only looks up (and follows forwarding
> pointers).
>
> Add a -breakmnu vm argument that calls warning on an mnu of a specific
> selector.
>
> Fix SmartSyntaxPlugin code generation for Spur of
>
> - asOop: old code assumed 4 byte oops & headers
> - Unsigned old code assumed 32-bit oops
>
>
> Affects AsyncFilePlugin, BochsIA32Plugin & FT2Plgin.
>
> Avoid duplication of effort in special selector send forwarding fault
> handling.
>
> Improve stack trace printing for Newspeak and Glue by providing something
> that
> assumes the penultimate literal is the selector or an
> AdditionalMethodState-like
> thing containing it.
>
> Reimplement primitiveCopyObject to work for both pointer and bits objects.
> This to support a good Object>>clone for Spur.
>
> Fix Spur's isWordsOrBytes[NonImm]:.  Old code answered true for
> CompiledMethods.
> --
> best,
> Eliot
>



-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20141206/6b4ffa0b/attachment.htm


More information about the Squeak-dev mailing list