[Vm-dev] Re: allObjectsDo:

Bert Freudenberg bert at freudenbergs.de
Tue Jan 14 13:27:11 UTC 2014

On 14.01.2014, at 01:36, David T. Lewis <lewis at mail.msen.com> wrote:

> On Mon, Jan 13, 2014 at 12:28:33PM +0100, Bert Freudenberg wrote:
>> I'd fill the remaining slots with 0 instead of nil. Even
>> better: allocate the array as object count + 1 and *always* put a 0 last.
>> That way the image code cannot ever "forget" to check for 0.
> Attached is an implementation of Bert's proposal. There is at least one integer
> zero at the end of the result array, or more if the primitive caused a GC.
> I sort of like this idea now that I understand the rational for using integer
> zero as the fill. 
> But Eliot is right, it would be better to answer only the objects that still
> exist after any possible GC.
> Dave
> <InterpreterPrimitives-primitiveAllObjects-dtl.2.cs>

Nice. Now we just need the same for allInstances :)

- Bert -

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4142 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140114/83f01008/smime.bin

More information about the Vm-dev mailing list