What is CompiledMethod>>replace:with:in: meant for?

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

What is CompiledMethod>>replace:with:in: meant for?

timrowledge
This method seems to be used in the context of  
CompiledMethod>>getSourceFor:in: as part of some handling of cases  
where the selector in there found source string doesn't match the  
selector passed in to the method.

Can anyone offer a scenario where this could  happen and where using  
replace:with:in: might actually have some use? The version info  
claims 'md 8/2/2006' so it has been touched recently, though of  
course not necessarily deliberately.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- Looks for the "Any" key.



Reply | Threaded
Open this post in threaded view
|

Re: What is CompiledMethod>>replace:with:in: meant for?

Marcus Denker

On 10.10.2006, at 08:22, tim Rowledge wrote:

> This method seems to be used in the context of  
> CompiledMethod>>getSourceFor:in: as part of some handling of cases  
> where the selector in there found source string doesn't match the  
> selector passed in to the method.
>
> Can anyone offer a scenario where this could  happen and where  
> using replace:with:in: might actually have some use? The version  
> info claims 'md 8/2/2006' so it has been touched recently, though  
> of course not necessarily deliberately.

This is used when a Traits-Method is installed (and shared) under a  
different name in a Class.

     Marcus

Reply | Threaded
Open this post in threaded view
|

Re: What is CompiledMethod>>replace:with:in: meant for?

Klaus D. Witzel
On Tue, 10 Oct 2006 09:14:57 +0200, Marcus Denker wrote:

> On 10.10.2006, at 08:22, tim Rowledge wrote:
>
>> This method seems to be used in the context of  
>> CompiledMethod>>getSourceFor:in: as part of some handling of cases  
>> where the selector in there found source string doesn't match the  
>> selector passed in to the method.
>>
>> Can anyone offer a scenario where this could  happen and where using  
>> replace:with:in: might actually have some use? The version info claims  
>> 'md 8/2/2006' so it has been touched recently, though of course not  
>> necessarily deliberately.
>
> This is used when a Traits-Method is installed (and shared) under a  
> different name in a Class.

I thought over this, a while ago. Isn't this a typical case for what  
method properties where invented for "my method shares  
otherClass>>#otherMethod".

So every method has its own method properties, and then the properties are  
definitely not sharable.

/Klaus

>      Marcus
>
>