Hi All,
another dubious piece of code is this:
SmallInteger>>instVarAt: i "Small integer has to be specially handled."
i = 1 ifTrue: [^self]. self error: 'argument too big for small integer instVarAt:'
Either this is important and should be replicated in Character and SmallFloat64 (the other two immediate classes) or it should be discarded. It's ancient (pre version stamps). I vote to nuke it. Opinions? _,,,^..^,,,_ best, Eliot
I went through the senders of #instVarAt: in the base image, and found that this feature is never used. Sends are guarded by #instSize, or the receiver is self or a well-known pointers object.
Levente
On Wed, 29 Mar 2017, Eliot Miranda wrote:
Hi All, another dubious piece of code is this:
SmallInteger>>instVarAt: i "Small integer has to be specially handled."
i = 1 ifTrue: [^self]. self error: 'argument too big for small integer instVarAt:'
Either this is important and should be replicated in Character and SmallFloat64 (the other two immediate classes) or it should be discarded. It's ancient (pre version stamps). I vote to nuke it. Opinions? _,,,^..^,,,_ best, Eliot
It probably made some sense in providing a uniform protocol when small integers were the only immediates, but now it is more likely to just obscure the actual implementions. If it was used in VMMaker you (Eliot) would have noticed by now, and Levente says it's not used anywhere else. I checked an old Squeak 2.0 image, and I do not see any places where it would matter even back then.
So I would say let it go.
Dave
On Wed, Mar 29, 2017 at 11:25:50PM +0200, Levente Uzonyi wrote:
I went through the senders of #instVarAt: in the base image, and found that this feature is never used. Sends are guarded by #instSize, or the receiver is self or a well-known pointers object.
Levente
On Wed, 29 Mar 2017, Eliot Miranda wrote:
Hi All, ?? ?? another dubious piece of code is this:
SmallInteger>>instVarAt: i?? "Small integer has to be specially handled."
i = 1 ifTrue: [^self]. self error: 'argument too big for small integer instVarAt:'
Either this is important and should be replicated in Character and SmallFloat64 (the other two immediate classes) or it should be discarded.?? It's ancient (pre version stamps).?? I vote to nuke it.?? Opinions? _,,,^..^,,,_ best,??Eliot
Crazy that *I* would suggest something like this but... could it have been needed for the simulator?
On Wed, Mar 29, 2017 at 1:32 PM, Eliot Miranda eliot.miranda@gmail.com wrote:
Hi All,
another dubious piece of code is this:
SmallInteger>>instVarAt: i "Small integer has to be specially handled."
i = 1 ifTrue: [^self]. self error: 'argument too big for small integer instVarAt:'
Either this is important and should be replicated in Character and SmallFloat64 (the other two immediate classes) or it should be discarded. It's ancient (pre version stamps). I vote to nuke it. Opinions? _,,,^..^,,,_ best, Eliot
Hi Chris,
On Mar 31, 2017, at 1:09 PM, Chris Muller asqueaker@gmail.com wrote:
Crazy that *I* would suggest something like this but... could it have been needed for the simulator?
Hmm, perhaps. I expect it is much more likely to do with a serialization framework in which SmallInteger is modeled as a single slot object. This approach would also bridge between the old non-immediate and new immediate Charater representations.
On Wed, Mar 29, 2017 at 1:32 PM, Eliot Miranda eliot.miranda@gmail.com wrote: Hi All,
another dubious piece of code is this:
SmallInteger>>instVarAt: i "Small integer has to be specially handled."
i = 1 ifTrue: [^self]. self error: 'argument too big for small integer instVarAt:'
Either this is important and should be replicated in Character and SmallFloat64 (the other two immediate classes) or it should be discarded. It's ancient (pre version stamps). I vote to nuke it. Opinions? _,,,^..^,,,_ best, Eliot
squeak-dev@lists.squeakfoundation.org