[Cuis-dev] method lookup
ken.dickey at whidbey.com
ken.dickey at whidbey.com
Sun Jul 14 14:38:29 PDT 2024
On 2024-07-14 14:15, Mark Volkmann via Cuis-dev wrote:
> How can I do that? I don't plan to modify them directly, but I'd like
> to examine them to solidify my understanding of how method lookup
> works.
Selector lookup mechanics are hidden within the VM and the basics
explained in https://en.wikipedia.org/wiki/Inline_caching .
Just as with any other object, you can open an Inspector on a Class.
E.g. select a Class name in a Browser and CMD-i (menu Inspect-it).
Select the #methodDict instvar of the Class to see the dictionary
bindings.
Or you can Explore-it and look within the methodDict selector bindings
to see each method's header, literals, and bytecodes.
Hey, easy peasy -- I like easy! And quite informative.
The thing about Smalltalk is taking the walls out and the blinders off.
:)
Sure, you can damage yourself (e.g. set Smalltalk to nil) but you have
much more freedom than you may be used to.
Good on ya,
-KenD
More information about the Cuis-dev
mailing list