[FIX] thisOop become: thisOop, v2
Stephan Rudlof
sr at evolgo.de
Sun Nov 25 23:48:03 UTC 2001
"Change Set: becomeFix
Date: 26 November 2001
Author: Stephan Rudlof
Version: 2
Avoids the following crash...:
a _ 'a'.
a become: a
Changes ProtoObject>>become: to be a noop if self == arg.
Also provides the save method
Array>>elementsExchangeIdentitySaveWith: otherArray
from its comment:
'This method calls #elementsExchangeIdentityWith: after a check
ensuring that no pointers occure more than once, which can lead to a
crash (don't know, if it always does).'
Note: this method *has* been called by >>become: in the original version of
this changeset: now it has been left in for the more general case of
ensuring safety for exchanging Arrays of oops. ProtoObject>>become: calls
the unsafe version again after successfully doing the check itself now: this
is for performance reasons (the check is just needed in a simplified version
here).
"
--
Stephan Rudlof (sr at evolgo.de)
"Genius doesn't work on an assembly line basis.
You can't simply say, 'Today I will be brilliant.'"
-- Kirk, "The Ultimate Computer", stardate 4731.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: becomeFix.2.cs.gz
Type: application/octet-stream
Size: 914 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20011126/f6b0ba02/becomeFix.2.cs.obj
More information about the Squeak-dev
mailing list
|