<br><br><div class="gmail_quote">On Wed, Apr 13, 2011 at 2:48 AM, David T. Lewis <span dir="ltr"><<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>></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>
><br>
> On Tue, Apr 12, 2011 at 2:04 PM, David T. Lewis <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br>
><br>
> ><br>
> > On Tue, Apr 12, 2011 at 01:40:22PM +0200, Mariano Martinez Peck wrote:<br>
> > ><br>
> > > So...I need to go to C, and "translate in my mind" what that part of<br>
> > SLANG<br>
> > > should look like in C, and search it in the C code. XCode is FAAAR to<br>
> > slow<br>
> > > to browe the interp.c . Morever, with inlined methods it is even more<br>
> > > difficult to find...<br>
> ><br>
> > XCode might be slow, but Squeak is fast :) Have a look at SlangBrowser<br>
> > for this. It has not been updated for either Pharo or oscog, but if<br>
> > anyone is interested maybe we can get that working too. Source is in<br>
> > the SqueakSource VMMaker project, and info at:<br>
> ><br>
> > <a href="http://wiki.squeak.org/squeak/5916" target="_blank">http://wiki.squeak.org/squeak/5916</a><br>
> ><br>
><br>
><br>
> Thanks Dave. I wasn't aware of what SlangBrowser was...I always saw it in<br>
> the VMMaker repo but I didn't know what it was until today. Cool project. I<br>
> really like the idea.<br>
> It would be awesome to extendt it so that it can not only supports<br>
> ObjectMemory/Interpreter/Plugins but also CompiledMethods of those classes<br>
> :)<br>
><br>
> For example, (Interpreter >>#lookupInMethodCacheSel:class:) asCString<br>
> 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>>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>
> Just for the record (if you want to include it in the wiki), in order to<br>
> make it work (the asCString) I needed to first load MemoryAccess because it<br>
> is used in VMMaker class >>cCodeGenerator: aClass inCache: cache inlined:<br>
> doInlining<br>
><br>
> You can...or document that on the wiki or maybe add a Smalltalk at: ?<br>
><br>
<br>
</div>Oops that's a bug, thanks.<br>
<div class="im"><br>
> Anyway, how much effort do you think it could be to adapt at least the<br>
> asCString to the new Cog versions ? because this is a nice feature for<br>
> when you are learning<br>
><br>
<br>
</div>It should not be too hard. It'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'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>