I'll answer to both messages in one.
3. superclasses Make the method set of Behavior more consistent and
predictable.
I don't like this very much and did not apply it. Everything else is a
nice addition, but I'd be grateful if you move #printSuperclasses:using:
and #printSubclasses:using: into a "private" category since you're
touching this file.
This patch provides some extensions to Parser package of
packages/stinst/parser.
Extensions to Behavior: 1. lookupFormattedSourceString: aSelector
Lookup and return the formatted source codes of a method.
That should be #formattedSourceStringAt:, no? Also, it could be in
kernel/Behavior.st since the #methodFormattedSourceString is present in
kernel/CompildMeth.st (though disabled until Parser is loaded). Right
now, however, I'm inclined to omit this.
Extensions to Symbol: 2. implementors and printImplementors
Method implementors returns all the compiled method which implements
the selector named by the receiver, printImplementors print these
compiled methods to the stdout.
#implementors is a nice addition, but you're missing class methods and
subclasses of nil. Also there's nothing in it that requires Parser, or
am I wrong?
You would need something like this:
Class allSubclassesDo: [:c | | m |
m := c compiledMethodAt: self ifAbsent: [nil].
m ifNotNil: [ implementors add: m].
m := c asClass compiledMethodAt: self ifAbsent: [nil].
m ifNotNil: [ implementors add: m]].
#printImplementors is not very useful. A method like this in Collection
(#printLines for example) would be useful instead:
self implementors do: [:each | Transcript display: each; nl ]
You could add that instead.
Also, please include a ChangeLog entry with your patches.
Thanks in advance! Don't be put off by the comments, it's good stuff.
Paolo
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk