<br><br><div class="gmail_quote">On Tue, Jan 31, 2012 at 8:50 PM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 <br><br><br><div class="gmail_quote">On Tue, Jan 31, 2012 at 11:22 AM, Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 <br>Hi Eliot. Me again :)   I was checking the changes Igor did some time ago for the fast become where he basically swapped the bytes contents between the objects when they were the same size and same header type. He put such code in separate primtives and some changes in the image side to call them. I have just played with them and they seem to work. I have 2 questions for you:<br>


<br>1) Do you think that this new fast become can have problems when becoming CompiledMethods? I am asking because of the JIT/Pic. Maybe I need a flushCache or something? <br clear="all"></blockquote><div><br></div><div>

Yes, almost certainly.  You&#39;d want to do a flushCache on both methods.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So far, I tried for example the following:<br>


    | methods |<br>    methods := IdentitySet new.<br>    (PackageInfo allPackages select: [:each| <br>        (#( &#39;AST&#39; &#39;Autotest&#39; &#39;AutomaticMethodCategorizer&#39; &quot;&#39;Bogus&#39; &#39;CodeStats&#39;  &#39;Gofer&#39; &#39;Metacello&#39; &#39;FreeType&#39; &#39;HelpSystem&#39; &#39;ProfStef&#39; &#39;ScriptManager&#39; &#39;Zinc&#39; &#39;Sound&#39; &#39;Tests&#39; &#39;ConfigurationOf&#39; &#39;ImageForDevelopers&#39; &#39;LED&#39; &#39;MemoryMonitor&#39; &#39;SUnit&#39; &#39;TrueType&#39; &#39;Monticello&#39;  &#39;Network&#39; &#39;Refactoring&#39; &#39;Regex&#39; &#39;ToolBuilder&#39;&quot; ) anySatisfy:  [:aString  | (each packageName includesSubString: aString)]) <br>


        ] ) <br>    do: [:aPackage |<br>        aPackage classes do: [:each | methods addAll: each methods ].<br>        ].<br>    methods do: [:each |<br>    each become: each copy<br>    ]<br><br>and I run the tests of that package before and after... no crash. Is there something better I could test?<br>

</blockquote><div><br></div><div>You need to test methods that are in use. </div></div></blockquote><div><br>But if I run their tests several times before the become, shouldn&#39;t they have been jitted and in the cache?<br>
 </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><div> There&#39;s an &quot;xray&quot; primitive for peering below the line, e.g. to find out if a method exists as machine codee.  Alas I only implemented the xray primitive for contexts (see MethodContext&gt;&gt;xray in Cog-Tests).  There should be one for methods as well.  </div>

<div><br></div></div></blockquote><div><br>Ok, I will take a look after dinner :)<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote">
<div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>2) If I prepare a nice script with some small modifications to Igor&#39;s proposal  would you take a look and integrate it if it is ok?  Just to know whether I should spend time on that or not.<br></blockquote><div><br>

</div><div>yes.</div><div> </div></div></blockquote><div><br><br>Excellent.  <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>Thanks in advance,<br>
<br><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>