<br><br><div class="gmail_quote">On Wed, Apr 13, 2011 at 2:48 AM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Tue, Apr 12, 2011 at 05:50:56PM +0200, Mariano Martinez Peck wrote:<br>
&gt;<br>
&gt; On Tue, Apr 12, 2011 at 2:04 PM, David T. Lewis &lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; On Tue, Apr 12, 2011 at 01:40:22PM +0200, Mariano Martinez Peck wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; So...I need to go to C, and &quot;translate in my mind&quot; what that part of<br>
&gt; &gt; SLANG<br>
&gt; &gt; &gt; should look like in C, and search it in the C code. XCode is FAAAR to<br>
&gt; &gt; slow<br>
&gt; &gt; &gt; to browe the interp.c . Morever, with inlined methods it is even more<br>
&gt; &gt; &gt; difficult to find...<br>
&gt; &gt;<br>
&gt; &gt; XCode might be slow, but Squeak is fast :) Have a look at SlangBrowser<br>
&gt; &gt; for this. It has not been updated for either Pharo or oscog, but if<br>
&gt; &gt; anyone is interested maybe we can get that working too. Source is in<br>
&gt; &gt; the SqueakSource VMMaker project, and info at:<br>
&gt; &gt;<br>
&gt; &gt;  <a href="http://wiki.squeak.org/squeak/5916" target="_blank">http://wiki.squeak.org/squeak/5916</a><br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks Dave. I wasn&#39;t aware of what SlangBrowser was...I always saw it in<br>
&gt; the VMMaker repo but I didn&#39;t know what it was until today. Cool project. I<br>
&gt; really like the idea.<br>
&gt; It would be awesome to extendt it so that it can not only supports<br>
&gt; ObjectMemory/Interpreter/Plugins  but also CompiledMethods of those classes<br>
&gt; :)<br>
&gt;<br>
&gt; For example,  (Interpreter &gt;&gt;#lookupInMethodCacheSel:class:)  asCString<br>
&gt; that would be lovely :)<br>
<br>
</div>Try this:<br>
<br>
  Transcript<br>
    open;<br>
    clear;<br>
    show: (Interpreter asCString: #lookupInMethodCacheSel:class:)<br></blockquote><div><br><br>Thanks Dave. I tried but I only got this in the Transcript: <br><br>/* Simulator subclasses with method overrides should not be translated. */<br>
/* ObjectMemory class&gt;&gt;initializeConstants */<br><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="im"><br>
&gt; Just for the record (if you want to include it in the wiki), in order to<br>
&gt; make it work (the asCString) I needed to first load MemoryAccess because it<br>
&gt; is used in VMMaker class &gt;&gt;cCodeGenerator: aClass inCache: cache inlined:<br>
&gt; doInlining<br>
&gt;<br>
&gt; You can...or document that on the wiki or maybe add a Smalltalk at:   ?<br>
&gt;<br>
<br>
</div>Oops that&#39;s a bug, thanks.<br>
<div class="im"><br>
&gt; Anyway, how much effort do you think it could be to adapt at least the<br>
&gt; asCString to the new Cog versions ?    because this is a nice feature for<br>
&gt; when you are learning<br>
&gt;<br>
<br>
</div>It should not be too hard. It&#39;s just a matter of creating the CCodeGenerator<br>
for any given class in the same way that VMMaker would have done, and using<br>
it to generate the code into strings that you can browse in the image and/or<br>
display in the browser code pane.<br>
<br></blockquote><div><br>Let&#39;s do a deal, you adapt the asCString for Cog and I build a Glamour browser for it :)<br><br></div></div><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
<br>