[squeak-dev] thisContext method ... can answer a compiled block

Marcel Taeumel marcel.taeumel at hpi.de
Fri Feb 19 08:12:22 UTC 2021


Hi Eliot.

> I think thisContext method *must* answer the method object thisContext is referring to [...]

Agreed. Hmm... why not having #code instead of #method in Context? Or #compiledCode? I suppose that this would leak the parallel structure (or "nature") of CompiledBlock and CompiledMethod too much?

> We could, indeed should, provide thisContext homeMethod.

Yes, #homeMethod is what I was looking for. :-)

Best,
Marcel
Am 18.02.2021 18:19:59 schrieb Eliot Miranda <eliot.miranda at gmail.com>:


On Feb 18, 2021, at 6:04 AM, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:



Hi all --

Looking at the implementation of CompiledBlock >> #method and CompiledMethod >> #method, I wonder whether the implementation of Context >> #method is correct.

What should be the answer of
   [ thisContext method ] value

An instance of CompiledMethod or an instance of CompiledBlock? If the latter is okay, then "thisContext method method" would be the necessary idiom to support lookup in the underlying behavior.

thisContext home method
thisContext method home

I think thisContext method *must* answer the method object thisContext is referring to, and hence will refer to a CompiledBlock fir a lock activation when using SistaV1. thisContext home method or thisContext method home will answer the CompiledMethod.

We could, indeed should, provide thisContext homeMethod.


Best,
Marcel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210219/f48c77ae/attachment.html>


More information about the Squeak-dev mailing list