[Cuis-dev] Handy ReferenceFinder extension and a question...

Juan Vuletich juan at jvuletich.org
Mon Mar 9 12:28:09 PDT 2020


On 3/6/2020 4:29 AM, Phil B via Cuis-dev wrote:
> Oops... bad version of the code.  Try this one...
>
> On Thu, Mar 5, 2020 at 11:44 PM Phil B <pbpublist at gmail.com 
> <mailto:pbpublist at gmail.com>> wrote:
>
>     I created a minor extension to ReferenceFinder called, cleverly
>     enough, CustomReferenceFinder.  The idea is that you want to scan
>     the image for references not based on identity, but some other
>     criteria.  My immediate use case was for things that are equal,
>     but not identical, to the target object.  So for
>     example: CustomReferenceFinder openExplorerOn: `0 at 0`.  (i.e. to
>     clean up existing long lived instances)
>
>     So now my question is: does anyone have any clever ideas on how to
>     best replace all the found references with `0 at 0`?  I don't think
>     #become: is the answer because I want to keep all the existing
>     references to the object in question, not swap pointers around.
>

Hi Phil,

I tried your code, and the references I see to objects equal to `0 at 0` 
are from CompiledMethods. Do you want to change those? Why? What object 
do you want to make the methods point to? Isn't it enough to just 
recompile the methods?

Or you are referring to objects other than CompiledMethods? Which, then?

Thanks,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200309/27ade9ed/attachment.htm>


More information about the Cuis-dev mailing list