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 <[email protected]>

    * libgst/dict.c: Make VMPrimitives a BindingDictionary.
diff --git a/libgst/dict.c b/libgst/dict.c
index 0b4ddb9..8b37f0f 100644
--- a/libgst/dict.c
+++ b/libgst/dict.c
@@ -1225,7 +1225,7 @@ init_c_symbols ()
 void
 init_primitives_dictionary ()
 {
-  OOP primDictionaryOOP = _gst_dictionary_new (512);
+  OOP primDictionaryOOP = _gst_binding_dictionary_new (512, _gst_smalltalk_dictionary);
   int i;
 
   add_smalltalk ("VMPrimitives", primDictionaryOOP);
_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to