[squeak-dev] primitives
David T. Lewis
lewis at mail.msen.com
Sat Nov 1 17:52:07 UTC 2008
On Sat, Nov 01, 2008 at 08:41:16AM -0700, Yoshiki Ohshima wrote:
> At Sat, 1 Nov 2008 10:17:38 -0500,
> Mark Volkmann wrote:
> >
> > Is there an easy way to find the
> > corresponding C source code?
>
> The best thing is to generate the C code by yourself from VMMaker,
> but just to get the feel of it, go to:
>
> http://squeakvm.org/cgi-bin/viewcvs.cgi/trunk/platforms/unix/src/vm/interp.c?rev=1870&view=auto
>
> and search for primitiveNew.
>
Also, if you want to browse the generated C code within the image, you can use
SlangBrowser:
http://wiki.squeak.org/squeak/5916
This will let you view the C code directly in Squeak browsers, with and without
method inlining. In other words, you can look at the #primitiveNew method as it
is written in Smalltalk, switch to a "translate to C" view to see the same
method translated to C, then switch to a "translate inlined C" view to see the
effect of method inlining (this is how the function will appear in the generated
interp.c file).
Dave
More information about the Squeak-dev
mailing list
|