> On 25 Sep 2017, at 15:19, Steven Costiou <[email protected]> wrote:
> 
>  
> Le 2017-09-25 12:21, [email protected] wrote :
> 
>> Steven
>> 
>> You could add use a semaphore if changing code is an option.
>> We once used MethodWrappers in VAST to answer a similar question regarding 
>> whether a body of code can be removed from a system.
>> 
>> Joachim
>  
> This is exactly my usecase, i need to remove code that may be called by a 
> method on the stack - and i know exactly which method. However my base 
> hypothesis is that it is in an already running process (maybe a loop) and 
> that part i cannot change. Is there an existing Pharo implementation of 
> MethodWrappers ?
> 
> 

I do not know how MethodWrappers would solve this.. in the end, they do 
something very similar to what happens when you put a MetaLink on a methodNode…
(we do not wrap but recompile the AST instead, wrapping is used if the method 
has a primitive, though).

You can even see MetaLinks as “just” a generalisation of methodWrappers to any 
AST node.

So you would have the same problem: the wrapper is used *for the next call*.

        Marcus

Reply via email to