[squeak-dev] thisClass

juan at jvuletich.org juan at jvuletich.org
Thu Jul 16 18:35:48 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
>
>

I believe it should be a kernel method.

Cheers,
Juan Vuletich





More information about the Squeak-dev mailing list