[VMM] Inspect generated C from SLANG (was: [Vm-dev] An issue with Slang, the interpreter & the VM, and a period in biasToGrow.)

David T. Lewis lewis at mail.msen.com
Thu Jan 25 12:15:09 UTC 2007


On Tue, Jan 23, 2007 at 06:54:43AM -0500, Jon Hylands wrote:
> On Tue, 23 Jan 2007 05:59:48 -0500, "David T. Lewis" <lewis at mail.msen.com>
> wrote:
> 
> > Another thing that might help is to have some simple way to show
> > generated C code for a method, perhaps right in a browser.
> 
> With Pic/Smalltalk, which is sorta-like slang (but for PIC assembler), I
> added this capability - you can generate the PIC assembler for any method
> from the browser, and it pops a workspace with the assembler code. You
> can't do anything useful with that code, but it is good to look at to
> ensure it is doing what you think it should be doing.

The attached change set adds #asCString and #asCString: for object memory,
interpreter, and plugin classes.

For example, in a browser source window for ObjectMemory>>growObjectMemory:,
you can inspect the generated C source code by evaluating:
  "self asCString: #growObjectMemory:"

To look at the C code for a plugin method:
  "OSProcessPlugin concreteClass asCString: #forkSqueak:"

I did not try to incorporate this into any of the browsers.

Dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CStringForSlang-dtl.2.cs.gz
Type: application/octet-stream
Size: 1549 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070125/90d19bdb/CStringForSlang-dtl.2.cs.obj


More information about the Squeak-dev mailing list