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

Phil B pbpublist at gmail.com
Mon Mar 9 13:07:19 PDT 2020


Juan,

On Mon, Mar 9, 2020 at 3:30 PM Juan Vuletich <juan at jvuletich.org> wrote:

>
> 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?
>

Yes, both ivars and compiled method literals should be changed.


> Why?
>

I was using `0 at 0` as a test case for saying 'OK, I've turned some sort of
instance to a literal. Now for whatever reason, there are instances hanging
around that aren't using the literal... let's go find/fix them'.

In the case of 0 at 0 there are at least three ways I can imagine these
instances getting out there: 1) they are long-lived instances that were
created before we had the literal syntax or 2) they were created by code
that performed some computation to create a point that just ended up
resulting in 0 at 0 so there isn't static code that can be changed/recompiled
3) they were injected into the image via the VM.

What object do you want to make the methods point to?
>

In this case, the literal `0 at 0`


> Isn't it enough to just recompile the methods?
>

No, that won't address the cases described above.


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

Everything, everywhere: any instance of an object that I want to find
and/or replace.  Basically what I'm doing is turning ReferenceFinder into
grep for the image :-)


>
> Thanks,
>
> --
> Juan Vuletich
>
>
Just as an update: not being aware of any better way, I tried adding a
couple of helper methods to my 'enhanced' ReferenceFinder and it
surprisingly worked on the first try.  So far no corruption/strangeness to
report.

Thanks,
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200309/319d7722/attachment-0001.htm>


More information about the Cuis-dev mailing list