The Do-It-Yourself Guide to Writing Squeak Primitives (DRAFT)

Stephen Travis Pope stp at limbo.create.ucsb.edu
Wed Apr 15 12:24:41 UTC 1998


> Is it possible to achieve Squeak's goal of doing everything in Smalltalk,
> including the writing of primitives? 

That's one of the beauties of Squeak--see the sound synthesis system
in the subclasses of AbstractSound, and the implementations of
mixSampleCount:into:startingAt:... These are all translated to C and
linked in as primitives. The method cCodeForPrimitives in
AbstractSound class described how this is translated and compiled.

> Your write up treats your C code as
> separate source code not saved with the smalltalk image. 

I did ignore how the main VM sources are stored in class
InterpreterSupportCode, but I don't think that's what you're talking
about. The example I gave--interfacing to an external API--is something
that could not be written in Squeak.

stp

_ Stephen Travis Pope
_ Center for Research in Electronic Art Technology (CREATE)
_ Department of Music, Univ. of California, Santa Barbara (UCSB)
_ stp at create.ucsb.edu, http://www.create.ucsb.edu/~stp/





More information about the Squeak-dev mailing list