<div dir="ltr"><div dir="ltr">Juan,<div><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 9, 2020 at 3:30 PM Juan Vuletich <<a href="mailto:juan@jvuletich.org">juan@jvuletich.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div bgcolor="#ffffff"><br>
Hi Phil,<br>
<br>
I tried your code, and the references I see to objects equal to
`0@0` are from CompiledMethods. Do you want to change those?</div></blockquote><div><br></div><div>Yes, both ivars and compiled method literals should be changed.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#ffffff"> Why?</div></blockquote><div><br></div><div>I was using `0@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'.</div><div><br></div><div>In the case of 0@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@0 so there isn't static code that can be changed/recompiled 3) they were injected into the image via the VM.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#ffffff">
What object do you want to make the methods point to?</div></blockquote><div><br></div><div>In this case, the literal `0@0`</div><div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#ffffff"> Isn't it
enough to just recompile the methods?<br></div></blockquote><div><br></div><div>No, that won't address the cases described above.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#ffffff">
<br>
Or you are referring to objects other than CompiledMethods? Which,
then?<br></div></blockquote><div><br></div><div>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 :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#ffffff">
<br>
Thanks,<br>
<pre cols="72">--
Juan Vuletich</pre></div></blockquote><div><br></div><div>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.</div><div><br></div><div>Thanks,</div><div>Phil</div></div></div>