[Vm-dev] Move to Spur: how can I change WeakRegistry packages?

Eliot Miranda eliot.miranda at gmail.com
Wed Sep 30 17:15:57 UTC 2015


Hi Esteban,

On Wed, Sep 30, 2015 at 5:39 AM, Esteban Lorenzano <estebanlm at gmail.com>
wrote:

>
> Hi,
>
> I need to change the WeakRegistry, to adapt Pharo to finalisation on Spur
> and I wanted to “star over”, injecting into Pharo the packages
> Collections-Weak and System-Finalizer from Squeak.
> Now, that breaks everything, of course :)
>
> So, I wonder if there is a clean way to do this?
>

That's a great question.  A few weeks ago I implemented the Ephemeron class
for Squeak (I haven't committed it yet) and set about changing the
finalization scheme to support both ephemerons and non-weak-registry-based
weak array finalization.  The latter is where the weak array that needs
finalizing is added to the same VM queue that an ephemeron that needs
finalizing gets added to.  So instead of all WeakArrays getting finalized
via the WeakRegistry mechanism every time one or more weak arrays get
finalized, only the weak arrays that have actually lost a reference will
get finalized.  Alas, for reasons I don't understand, this broke the file
system.  I would use the system for some minutes and then suddenly source
code viewed in the browser would be decompiled, since the source file had
closed. Alas I don't have time to look at this now, but I do think very
much it is the right way to go.  Right now I'm busy with a long list of
dependent changes that I must get fixed to make progress.  So for now I
can't help other than to e.g. mail you, or post, my prototype finalization
changes and have you look at those and see if you can get them working in
Pharo.  I;m also interested in getting anyone else who would like to help
involved.  I am so overloaded right now it's not funny [right, ed :-) "Get
some rest.  If you don't have your health, you don't have anything".  Count
Rugen]

thanks,
> Esteban


_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150930/bbd00888/attachment.htm


More information about the Vm-dev mailing list