[squeak-dev] Using #= for integer comparison instead of #==

Levente Uzonyi leves at elte.hu
Tue Nov 16 05:00:12 UTC 2010


Hi,

I'm mostly ready with this cleanup, only a few methods left in the image 
that use #== for integer comparison. Some of them must use #==, others 
may be changed, but I wasn't sure if the code will work if it's changed 
or not. If you'd like to check these methods, then evaluate the following 
in a workspace:

| hasMatch visitor |
hasMatch := false.
visitor := ParseNodeEnumerator
 	ofBlock: [ :node |
 		(node isMessageNode and: [
 			((#(== ~~) identityIncludes: node selector key) and: [
 			node receiver isConstantNumber or: [
 				node arguments first isConstantNumber ] ]) ]) ifTrue: [
 					hasMatch := true ] ]
 	select: [ :node | hasMatch not ].
SystemNavigation default browseAllSelect: [ :method |
 		hasMatch := false.
 		method decompile accept: visitor.
 		hasMatch ]


Cheers,
Levente



More information about the Squeak-dev mailing list