The Do-It Yourself Guide to Squeak Primitives


8. Regenerate the Interpreter

This is where you translate the Interpreter class's instance methods to C, typically with,

	Interpreter translate: 'interp.c' doInlining: true.

This'll take a while, and will create a file named "interp.c" in the same directory as the VI. If you haven't already done so, you also need to write out all the other VM sources by executing,

	InterpreterSupportCode writeMacSourceFiles

or whatever is appropriate on your platform.

If you're new to VM-generation, you should definitely make sure you can re-create the default Squeak VM for your platform before you try adding new primitives. Test the development project or makefile and platform-specific source files first, then add your new primitive code.