The Trunk: Environments-fbs.21.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Environments-fbs.21.mcz

commits-2
Frank Shearar uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-fbs.21.mcz

==================== Summary ====================

Name: Environments-fbs.21
Author: fbs
Time: 2 April 2013, 2:56:27.995 pm
UUID: a2afb389-193a-44a7-8664-559a4177936c
Ancestors: Environments-cwp.20

When a class removes itself from the system, we need to forget about the class... including our reference to it in our list of bindings.

=============== Diff against Environments-cwp.20 ===============

Item was changed:
  ----- Method: Environment>>forgetClass:logged: (in category 'classes and traits') -----
  forgetClass: aClass logged: aBool
  aBool ifTrue:
  [SystemChangeNotifier uniqueInstance
  classRemoved: aClass fromCategory: aClass category].
  self organization removeElement: aClass name.
  Smalltalk removeFromStartUpList: aClass.
  Smalltalk removeFromShutDownList: aClass.
  contents removeKey: aClass name ifAbsent: [].
+ bindings removeKey: aClass name ifAbsent: [].!
- !


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Environments-fbs.21.mcz

Frank Shearar-3
On 2 April 2013 14:56,  <[hidden email]> wrote:

> Frank Shearar uploaded a new version of Environments to project The Trunk:
> http://source.squeak.org/trunk/Environments-fbs.21.mcz
>
> ==================== Summary ====================
>
> Name: Environments-fbs.21
> Author: fbs
> Time: 2 April 2013, 2:56:27.995 pm
> UUID: a2afb389-193a-44a7-8664-559a4177936c
> Ancestors: Environments-cwp.20
>
> When a class removes itself from the system, we need to forget about the class... including our reference to it in our list of bindings.
>
> =============== Diff against Environments-cwp.20 ===============
>
> Item was changed:
>   ----- Method: Environment>>forgetClass:logged: (in category 'classes and traits') -----
>   forgetClass: aClass logged: aBool
>         aBool ifTrue:
>                 [SystemChangeNotifier uniqueInstance
>                         classRemoved: aClass fromCategory: aClass category].
>         self organization removeElement: aClass name.
>         Smalltalk removeFromStartUpList: aClass.
>         Smalltalk removeFromShutDownList: aClass.
>         contents removeKey: aClass name ifAbsent: [].
> +       bindings removeKey: aClass name ifAbsent: [].!
> -       !

This, I think, it the necessary fix. It looks right, I can now unload
XML-Parser and see that there are no bindings hanging around (so
"PointerFinder on: XMLWriter" correctly says "ain't no such class").
But... Colin, what do you think?

frank

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Environments-fbs.21.mcz

Eliot Miranda-2


On Tue, Apr 2, 2013 at 6:59 AM, Frank Shearar <[hidden email]> wrote:
On 2 April 2013 14:56,  <[hidden email]> wrote:
> Frank Shearar uploaded a new version of Environments to project The Trunk:
> http://source.squeak.org/trunk/Environments-fbs.21.mcz
>
> ==================== Summary ====================
>
> Name: Environments-fbs.21
> Author: fbs
> Time: 2 April 2013, 2:56:27.995 pm
> UUID: a2afb389-193a-44a7-8664-559a4177936c
> Ancestors: Environments-cwp.20
>
> When a class removes itself from the system, we need to forget about the class... including our reference to it in our list of bindings.
>
> =============== Diff against Environments-cwp.20 ===============
>
> Item was changed:
>   ----- Method: Environment>>forgetClass:logged: (in category 'classes and traits') -----
>   forgetClass: aClass logged: aBool
>         aBool ifTrue:
>                 [SystemChangeNotifier uniqueInstance
>                         classRemoved: aClass fromCategory: aClass category].
>         self organization removeElement: aClass name.
>         Smalltalk removeFromStartUpList: aClass.
>         Smalltalk removeFromShutDownList: aClass.
>         contents removeKey: aClass name ifAbsent: [].
> +       bindings removeKey: aClass name ifAbsent: [].!
> -       !

This, I think, it the necessary fix. It looks right, I can now unload
XML-Parser and see that there are no bindings hanging around (so
"PointerFinder on: XMLWriter" correctly says "ain't no such class").
But... Colin, what do you think?

Frank, Colin, what about the case of non-classes.  e.g. an Alias is created to a binding in Smalltalk, say #Foo, and then #Foo is removed from Smalltalk.  I guess the aliases to #Foo need to get moved to the relevant undeclared when that happens right?


frank




--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Environments-fbs.21.mcz

Frank Shearar-3
On 2 April 2013 16:44, Eliot Miranda <[hidden email]> wrote:

>
>
> On Tue, Apr 2, 2013 at 6:59 AM, Frank Shearar <[hidden email]>
> wrote:
>>
>> On 2 April 2013 14:56,  <[hidden email]> wrote:
>> > Frank Shearar uploaded a new version of Environments to project The
>> > Trunk:
>> > http://source.squeak.org/trunk/Environments-fbs.21.mcz
>> >
>> > ==================== Summary ====================
>> >
>> > Name: Environments-fbs.21
>> > Author: fbs
>> > Time: 2 April 2013, 2:56:27.995 pm
>> > UUID: a2afb389-193a-44a7-8664-559a4177936c
>> > Ancestors: Environments-cwp.20
>> >
>> > When a class removes itself from the system, we need to forget about the
>> > class... including our reference to it in our list of bindings.
>> >
>> > =============== Diff against Environments-cwp.20 ===============
>> >
>> > Item was changed:
>> >   ----- Method: Environment>>forgetClass:logged: (in category 'classes
>> > and traits') -----
>> >   forgetClass: aClass logged: aBool
>> >         aBool ifTrue:
>> >                 [SystemChangeNotifier uniqueInstance
>> >                         classRemoved: aClass fromCategory: aClass
>> > category].
>> >         self organization removeElement: aClass name.
>> >         Smalltalk removeFromStartUpList: aClass.
>> >         Smalltalk removeFromShutDownList: aClass.
>> >         contents removeKey: aClass name ifAbsent: [].
>> > +       bindings removeKey: aClass name ifAbsent: [].!
>> > -       !
>>
>> This, I think, it the necessary fix. It looks right, I can now unload
>> XML-Parser and see that there are no bindings hanging around (so
>> "PointerFinder on: XMLWriter" correctly says "ain't no such class").
>> But... Colin, what do you think?
>
>
> Frank, Colin, what about the case of non-classes.  e.g. an Alias is created
> to a binding in Smalltalk, say #Foo, and then #Foo is removed from
> Smalltalk.  I guess the aliases to #Foo need to get moved to the relevant
> undeclared when that happens right?

That sounds right, yes.

frank

>> frank
>>
>
>
>
> --
> best,
> Eliot
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Environments-fbs.21.mcz

Colin Putney-3
In reply to this post by Eliot Miranda-2



On Tue, Apr 2, 2013 at 8:44 AM, Eliot Miranda <[hidden email]> wrote:
 
Frank, Colin, what about the case of non-classes.  e.g. an Alias is created to a binding in Smalltalk, say #Foo, and then #Foo is removed from Smalltalk.  I guess the aliases to #Foo need to get moved to the relevant undeclared when that happens right?

Yes, you're both right. I'll write up some test cases.

Colin