Potential bug in becomeForward:, need help!
Bob Arning
arning at charm.net
Fri May 17 11:57:42 UTC 2002
On Thu, 16 May 2002 22:21:08 -0700 (PDT) Chris Muller <afunkyobject at yahoo.com> wrote:
>> Bob Arning wrote:
>>.. What's happening is that the pointer to String new is
>>replaced with a pointer to #MyTestClass as you would expect, but the hash
>value is
>>copied from the old String new header to the #MyTestClass header ..
>
>Say, does anyone know how other Smalltalks handle this? Just different object
>memory structures?
The major problem, AFAICT, is that the the hash is copied in the wrong direction in Squeak. This can be fixed. Otherwise, the same sorts of problems will arise in any Smalltalk, like:
s _ IdentitySet new.
s add: a; add: b.
a becomeForward: b.
Now an important invariant is violated - the same object appears twice in a set. Whose fault is this or, better, how to correct it?
Patient: Doctor, it hurts when I do this.
Doctor: Don't do that.
Cheers,
Bob
More information about the Squeak-dev
mailing list
|