Restricting super calls to inherited method
Jon Hylands
jon at huv.com
Sat May 19 17:16:59 UTC 2001
On Sat, 19 May 2001 12:04:40 -0400, Paul Fernhout
<pdfernhout at kurtz-fernhout.com> wrote:
> To quantify this, anyone have a snippet of code to search on calls to
> the super pseudo-variable which are not the same as the method the call
> is in? This doesn't seem like something easy to do from the browser.
This isn't exhaustive, but it shows probably most of them... In my 3.1a
image, I get the following counts:
198 - instance methods
1879 - class methods
----------------
Object withAllSubclasses do: [:eachClass |
eachClass selectors do: [:eachSelector |
| method |
method := eachClass compiledMethodAt: eachSelector.
(method sendsToSuper and: [(method messages includes:
eachSelector) not])
ifTrue: [Transcript cr; show: eachClass name, '>>',
eachSelector]].
eachClass class selectors do: [:eachSelector |
| method |
method := eachClass class compiledMethodAt: eachSelector.
(method sendsToSuper and: [(method messages includes:
eachSelector) not])
ifTrue: [Transcript cr; show: eachClass name, '>>',
eachSelector]]].
----------------
Later,
Jon
--------------------------------------------------------------
Jon Hylands Jon at huv.com http://www.huv.com/jon
Project: Micro Seeker (Micro Autonomous Underwater Vehicle)
http://www.huv.com
More information about the Squeak-dev
mailing list
|