allObjectsDo: (was Re: [squeak-dev] The Inbox: System-cwp.662.mcz)

Igor Stasenko siguctua at gmail.com
Sun Jan 12 21:02:24 UTC 2014


On 12 January 2014 21:53, Bert Freudenberg <bert at freudenbergs.de> wrote:

>
> On 12.01.2014, at 20:42, David T. Lewis <lewis at mail.msen.com> wrote:
>
> > On Sun, Jan 12, 2014 at 02:02:08PM -0500, Colin Putney wrote:
> >> On Sun, Jan 12, 2014 at 1:45 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
> >>
> >>
> >>> Say you want to wrap every object in the system in a proxy.
> >>> You would need to use #allObjectsDo:. but when we enumerate all
> >>> object, the new ones too, we end up having proxies for proxies for
> >>> proxies ad infinitum (endless non-loop?) and we can?t know it?
> >>>
> >>
> >> Yeah, that's an example of creating objects faster than we can enumerate
> >> them. (Or, exactly as fast as we can enumerate them, I suppose). It
> >> wouldn't have worked pre-closures, either.
> >>
> >> The consensus so far is that we like the safety of a sentinel object,
> as it
> >> lets us do whatever we want within the loop, and potentially not seeing
> all
> >> the objects in the image is an acceptable trade-off for that safety.
> Fair
> >> enough.
> >>
> >
> > (Changing subject line because original discussion spans commit notices)
> >
> > The most recent inbox entry System-cwp.663 seems to work fine on an
> > interpreter VM.
> >
> > For my understanding, can you clarify, with respect to the original
> concern
> > that involves MC proxies - does the problem occur with the interpreter VM
> > as well as Cog, or was it specific to one kind of VM?
> >
> > It is worth noting that allObjectsDo: relies on assumptions about how
> > the objects memory works internally. It requires that #someObject will
> > always answer the object at the lowest address in the object memory, and
> > also that a newly allocated object will always be placed at a higher
> > address location than all other objects. Either of these assumptions is
> > likely to be a problem as new and better object memories and garbage
> > collectors are implemented.
> >
> > Dave
>
> Right (as Eliot's vm-dev post shows).
>
> So IMHO the only sensible semantics of allObjectsDo: is as in "allObjects
> do:" - which might be implemented as a primitive in some VMs soonish. It
> *should not* enumerate objects created after calling the method.
>
> +1


> - Bert -
>
>
>
>


-- 
Best regards,
Igor Stasenko.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140112/3a2a3a66/attachment.htm


More information about the Squeak-dev mailing list