Goods + TreeSet>>keyForValue: problems: Bug?

Avi Bryant avi.bryant at gmail.com
Sat Feb 19 23:28:50 UTC 2005


On Sat, 19 Feb 2005 16:12:55 +0000, David Shaffer <cdshaffer at acm.org> wrote:

> I think I found a fix...in TreeSet:
> 
> keyForValue: anObject
>     ^ anObject perform: sortKey yourself
> 
> Seems that a proxy was being passed as the argument to perform:.  That
> was causing the problem.  Making this change causes my tests to pass
> (and fixes this problem in my own code).

Ok, yeah - that's something that people are running into a lot,
passing proxies into prims.  At some point it would probably be useful
to go through the image and find all prims that take arguments that
are non-immediate in GOODS, and maybe construct a set of wrappers for
them.  There seem to be about 450 prims in the stock image that take
args at all, but I suspect that many of those expect SmallIntegers or
other values that wouldn't be proxied anyway, or have useable
Smalltalk fallback code, in which case we can safely ignore them.

Avi



More information about the Squeak-dev mailing list