[squeak-dev] Re: Modular Plugins

K. K. Subramaniam subbukk at gmail.com
Thu Dec 24 05:37:49 UTC 2009

On Thursday 24 December 2009 12:04:45 am Andreas Raab wrote:
> K. K. Subramaniam wrote:
> >A closer look at SVN shows
> > only  unix/src/ and Mac OS/.. contain auto-generated files. Though why
> > these intermediate files (but not their source .cs/.st files) are in SVN
> > is a mystery.
> For the same reason that these files are included in the build files on 
> Windows as well. They allow one to recompile precisely the same version 
> that was used in the binary you're using which is tremendously helpful 
> for debugging.
I find this confusing given David's earlier mail about .c files being an 
intermediate file. How is this use case different from using -E option in C 
compilers to get pre-processed output for debugging purposes? We don't put the 
.i file into SVN. We simply generate it on demand from the .c file.

>It's very simple: Make an InterpreterPlugin subclass and generate the
>empty SqueakPlugin.c file. That's your starting template. Getting it 
>compiled means your build setup is sane. Then add your stuff. Rinse and 
Thanks for the tip. You have been patient in answering my queries.

I used the following script SamplePlugin.st:
Preferences disable: #warnIfNoSourcesFile; disable: #warnIfNoChangesFile.
InterpreterPlugin subclass: #SamplePlugin instanceVariableNames: ''
  classVariableNames: '' poolDictionaries: '' category: 'VMMaker-Plugins'.
SamplePlugin translateInDirectory: (FileDirectory on: '/tmp/vmm')
   doInlining: true.
SmalltalkImage current snapshot: false andQuit: true.
and could generate the SamplePlugin.c file with:
  $ squeak -headless unix-3.11.3.image $PWD/SamplePlugin.st

The code refers to sqVirtualMachine.h, sqConfig.h, sqPlatformSpecific.h and 
sqMemoryAccess.h. I suppose I can change the script to generate these files for 
a given target platform, if necessary.

What holds us back from using vmm as a code translator tool in build scripts 
to translate .st/.cs files (checked out from Monticello or SVN) and its 
supporting header files on the fly before compilation?

What am I missing here? .. Subbu

More information about the Squeak-dev mailing list