June 30, 2015
5:34 p.m.
Tx! Stef Le 28/6/15 17:40, Camille a écrit :
On 28 Jun 2015, at 17:25, stepharo <stepharo@free.fr <mailto:stepharo@free.fr>> wrote:
Hi I would like to study the use of super. Any idea how I can query them?
Hi Stef,
To get all methods that have a super send you can do:
superSenders := CompiledMethod allInstances select: #sendsToSuper
If you need more advanced search you can do it with RBParseTreeSearcher. For exemple to get each super message node:
superSends := OrderedCollection new. searcher := RBParseTreeSearcher new matches: 'super ``@msg: ``@args' do: [ :node :ans | superSends add: node ]. superSenders do: [ :each | searcher executeTree: each ast ]. superSends
Camille
Stef