[Vm-dev] isSelfPseudoVariable
Hernan Wilkinson
hernan.wilkinson at 10pines.com
Wed Jun 12 22:15:18 UTC 2019
Hi!
does anybody know why isSelfPseudoVariable checks for name = '{{self}}'?
I wrote an script to get the method node of all the methods in the image
and no one sets {{self}} as name of a VariableNode, the key = 'self' if the
one used to identify a VariableNode as a self pseudo var.
Here is the current implementation:
isSelfPseudoVariable
"Answer if this ParseNode represents the 'self' pseudo-variable."
^ key = 'self' or: [name = '{{self}}']
And here the script I wrote:
| method methodNode |
ProtoObject withAllSubclassesDo: [ :aClass |
aClass selectors do: [ :aSelector |
method := aClass >> aSelector.
methodNode := method methodNode.
methodNode nodesDo: [ :node |
(node isSelfPseudoVariable and: [ node name = '{{self}}'])
ifTrue: [self halt].
]]]
Thanks!
Hernan.
--
*HernĂ¡n WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20190612/ef03e072/attachment.html>
More information about the Vm-dev
mailing list