Possible pseudo-bug in perform: ???

Marcel Weiher marcel at metaobject.com
Wed Sep 22 11:37:00 UTC 1999


> From: "Robert M. Fuhrer" <rfuhrer at watson.ibm.com>
>
> [Pardon if any of this is newbie-speak...]
>
> Evaluate the following code fragment:
>
>   (1 to: 10) perform: #at:
>
> I get the exception: "SmallIntegers are not indexable", which is  
misleading.

I ran into this problem as well.  AFAIK, it has to do with the way  
(order) arguments are pushed onto the stack, which appears to be  
fragile in that the entire range can be shifted (push receiver  
first?).  'C' for example does it differently (push last arg first),  
so that no matter how many arguments you push on the stack, the  
called function always finds the first argument in a fixed place  
(first arg at TOS, discounting the return address).

Marcel





More information about the Squeak-dev mailing list