I'm experimenting in Pharo and I was wondering how class, instance variable scope is achieved.
More to the point, instance variables can be accessed by all the methods of that instance of a class, also class instance variables can be accessed by all the methods of the class and so on.
Where does the depth of this scope get defined in code? Can one see where and how this takes place, Smalltalk being fully Object Oriented?
I presume you are in Pharo >= 4.0, in which case you have the so called OpalCompiler
.
In OpalCompiler
, the variable scope is reified (see OCAbstractScope
and subclasses), the scope being used during semantic analysis of the Abstract Syntax Tree (see OCASTSemanticAnalyzer
).
You now have an entry point, and should follow message senders, class refs, instance variable refs, ... from this starting point.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With