[BUG] Behavior>>allSharedPools is broken

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

[BUG] Behavior>>allSharedPools is broken

Lee Duhem
Hi all,

It looks like Behavior>>allSharedPools is broken:

    st> Array allSharedPools
    Object: Dictionary new: 1024 "<-0x4cf02048>" error: did not
understand #nameIn:
    MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
    Dictionary(Object)>>doesNotUnderstand: #nameIn: (SysExcept.st:1408)
    [] in Array class(Behavior)>>allSharedPools (Behavior.st:808)
    OrderedCollection>>do: (OrderColl.st:67)
    Class class>>allPoolDictionaries:except:do: (Class.st:70)
    Object class(Class)>>allLocalSharedPoolDictionariesExcept:do: (Class.st:703)
    [] in Array
class(Class)>>allSharedPoolDictionariesDo:overrideEnvironment:
(Class.st:679)
    Array class(Behavior)>>withAllSuperclassesDo: (Behavior.st:1146)
    Array class(Class)>>allSharedPoolDictionariesDo:overrideEnvironment:
(Class.st:662)
    Array class(Class)>>allSharedPoolDictionariesDo: (Class.st:652)
    Array class(Behavior)>>allSharedPools (Behavior.st:809)
    UndefinedObject>>executeStatements (a String:1)
    nil
    st> Array allSharedPoolDictionariesDo: [:e | e class printNl ]
    BindingDictionary
    BindingDictionary
    BindingDictionary
    BindingDictionary
    BindingDictionary
    BindingDictionary
    Dictionary
    SystemDictionary
    Array
    st>

This Dictionary which cannot understand #nameIn: is VMPrimitives. Should it
also be a BindingDictionary?

Anyway, the attached patch makes VMPrimitives a BindingDictionary, fixes the
Behavior>>allSharedPools, and does not introduce any regression error.

BTW, I would like to provide a test case for Behavior>>allSharedPools, but
I am not sure what to expect.

lee

ChangeLog

2013-12-16  Lee Duhem <[hidden email]>

    * libgst/dict.c: Make VMPrimitives a BindingDictionary.

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Make-VMPrimitives-BindingDictionary.patch (550 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [BUG] Behavior>>allSharedPools is broken

Holger Freyther
On Mon, Dec 16, 2013 at 10:10:56AM +0800, Lee Duhem wrote:
> Hi all,

Hi!

> It looks like Behavior>>allSharedPools is broken:
>
>     st> Array allSharedPools

> This Dictionary which cannot understand #nameIn: is VMPrimitives. Should it
> also be a BindingDictionary?
>
> Anyway, the attached patch makes VMPrimitives a BindingDictionary, fixes the
> Behavior>>allSharedPools, and does not introduce any regression error.

Paolo knows this code better than I do but based on the other Pool being
a BindingDictionary and the code using nameIn I would go with your patch.

> BTW, I would like to provide a test case for Behavior>>allSharedPools, but
> I am not sure what to expect.

I think a test that makes sure that no exception is thrown is already progress.


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk