[squeak-dev] thisClass

Eliot Miranda eliot.miranda at gmail.com
Thu Jul 16 18:14:21 UTC 2009


Hi All,
    in working on Cog I need the concept of "here class", the class of the
current method.  Analogous to super, where a lookup starts above the class
of the current method, here class is the class of the current method.  if
you're for example collecting sets of selectors for translation to C then
you need to talk about the selectors of this method's class, not the
selectors of some subclass which may simply extend the base class a little.

One clumsy implementation is the following

    thisContext method methodClass

which one might use as in

    thisContext method methodClass theNonMetaClass selectors do: [:sel| ...
Given this isn't important enough to change the language and add a new
pseudo-variable such as hereClass I just want to add it to ContextPart, e.g.

    thisContext thisClass

Anyone done this before, and if so what did you call it?
Anyone have strong opinions on the selector (not the technique; needs must
when Slang drives)?
Anyone have strong opinions on whether I add this as a kernel method or just
keep it as a VMMaker extension?

Best
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090716/8a1fc1e5/attachment.htm


More information about the Squeak-dev mailing list