[squeak-dev] The Inbox: Kernel-cmm.831.mcz

Eliot Miranda eliot.miranda at gmail.com
Fri Jan 10 22:27:57 UTC 2014


Hi Chris,


On Wed, Jan 8, 2014 at 8:24 AM, <commits at source.squeak.org> wrote:

> A new version of Kernel was added to project The Inbox:
> http://source.squeak.org/inbox/Kernel-cmm.831.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-cmm.831
> Author: cmm
> Time: 8 January 2014, 10:24:39.553 am
> UUID: 7cc78def-6be9-4aec-b2f1-08d8f7e66910
> Ancestors: Kernel-fbs.829
>
> - Factor the actual removal of individual classes into
> primRemoveFromSystem: to make Frank happy.
> - SystemChangeNotifier, no more notifications for Obsolete classes please.
> - Because we're modifying a collection while enumerating it, enumerate a
> copy of it instead.
>
> =============== Diff against Kernel-fbs.829 ===============
>
> Item was added:
> + ----- Method: Class>>primRemoveFromSystem: (in category
> 'initialize-release') -----
> + primRemoveFromSystem: logged
>

The convention is to use prim or primitive for VM things, and basic for
image things.  So basicRemoveSelector: and removeSelector: etc.  So this is
better-named basicRemoveFromSystem: [ irrespective of whether you decide to
keep this code or not ;-) ].

HTH,
Eliot

+       "Forget the receiver from the Smalltalk global dictionary. Any
> existing
> +       instances will refer to an obsolete version of the receiver."
> +
> +       "keep the class name and category for triggering the system change
> message. If we wait to long, then we get obsolete information which is not
> what we want."
> +
> +       "tell class to deactivate and unload itself-- two separate events
> in the module system"
> +       self deactivate; unload.
> +       self superclass ifNotNil:
> +               ["If we have no superclass there's nothing to be
> remembered"
> +               self superclass addObsoleteSubclass: self].
> +       self environment forgetClass: self logged: logged.
> +       SystemChangeNotifier uniqueInstance noMoreNotificationsFor: self.
> +       self obsolete.!
>
> Item was changed:
>   ----- Method: Class>>removeFromSystem: (in category
> 'initialize-release') -----
> + removeFromSystem: logged
> - removeFromSystem: logged
>         "Forget the receiver from the Smalltalk global dictionary. Any
> existing
>         instances will refer to an obsolete version of the receiver."
> -
>         "keep the class name and category for triggering the system change
> message. If we wait to long, then we get obsolete information which is not
> what we want."
> -
>         "tell class to deactivate and unload itself-- two separate events
> in the module system"
> +       subclasses ifNotNil:
> +               [ subclasses copy do:
> +                       [ : each | each removeFromSystem: logged ] ].
> +       self primRemoveFromSystem: logged!
> -       self deactivate; unload.
> -       self superclass ifNotNil:
> -               ["If we have no superclass there's nothing to be
> remembered"
> -               self superclass addObsoleteSubclass: self].
> -       self environment forgetClass: self logged: logged.
> -       self obsolete.!
>
>
>


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


More information about the Squeak-dev mailing list