thisContext method ... can answer a compiled block

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

thisContext method ... can answer a compiled block

marcel.taeumel
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.

Best,
Marcel


Reply | Threaded
Open this post in threaded view
|

Re: thisContext method ... can answer a compiled block

Eliot Miranda-2


On Feb 18, 2021, at 6:04 AM, Marcel Taeumel <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

Re: thisContext method ... can answer a compiled block

marcel.taeumel
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 <[hidden email]>:



On Feb 18, 2021, at 6:04 AM, Marcel Taeumel <[hidden email]> 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