[Vm-dev] questions about a couple of primitives

Florin Mateoc florin.mateoc at gmail.com
Mon Aug 31 14:30:03 UTC 2020


I had some unexpected results while looking at some primitives in the
system, and I wanted to ask if they are expected/intentional:

1. 'ab' instVarAt: 1    =>    97    (and 'ab' instVarAt: 2    =>    98)
    I would have thought that #instVarAt: has pointer granularity, so I am
curious if the observed behavior is an accident or intentional (and maybe
even used somewhere)

2. | o | o := Object new. (WeakArray with: o) pointsTo: o    =>    true
    I thought the main use case for #pointsTo: was to find hard references
(e.g. for chasing memory leaks). The current behavior actually makes that
use case a little more difficult to implement, since you have to special
case weak references. When would one be interested in finding weak

3. The comment and the primitive used in #ensure: and #ifCurtailed: are the
same, but the primitive failure code is different - the one for
#ifCurtailed seems buggy, it never evaluates the argument

None of the above are critical, but I am curious about them.
Thank you in advance for any clarifications,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20200831/8216b5af/attachment.html>

More information about the Vm-dev mailing list