Thanks henrik this is cool and now I can do diffs and other. I started to get the list of sender of setProperty:toValue: and one by one analyse them. Le 3/11/16 à 21:25, Henrik Nergaard a écrit :
| dct arr |
dct := IdentityDictionary new.
arr := #( #valueOfProperty: #valueOfProperty:ifAbsent: #valueOfProperty:ifAbsentPut: #setProperty:toValue: #hasProperty: ).
Morph withAllSubclasses do: [ :class | class methods do: [ :each | each ast allChildren select: [ :c | c isMessage and: [ arr includes: c selector ] ] thenDo: [ :c | dct at: c selector ifPresent: [ :col | col add: c ] ifAbsentPut: [ OrderedCollection with: c ] ] ] ].
dct
------------------
Best regards, Henrik
-----Original Message----- From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of stepharo Sent: Thursday, November 3, 2016 8:48 PM To: Pharo Development List <pharo-dev@lists.pharo.org> Subject: [Pharo-dev] About setProperty:toValue: vs. valueOfProperty:
I would like to be able to compare the **arguments** passed to
setProperty:toValue:
and
the ones of valueOfProperty:, valueOfProperty:ifAbsent:, valueOfProperty:ifAbsentPut:,
and
hasProperty:
I quite sure that we will discover more deadcode in morphic.
Any ideas?
PS: I hope (but I cannot read the code of Bloc because it crashes my vm at startup) that Bloc and Brick will not use such patterns.
There are plague and lead to shitty and crappy code.
Stef