VM building

Brian T Rice water at tunes.org
Wed Jan 21 02:30:13 PST 2004


After many, many alterations and changes, the build process for the Pidgin
subset is coming together. You can see an example use for it in
src/mobius/vm/build.slate for the VM. The code that it is calling is in
quite a bit of flux, but is testable /right now/ (and buggy) via "Compiler
generateVM.". The source for that can be taken as a kind of template for
working with pidgin sources. To load it, you have to file in the
init.slate files from src/, src/mobius/, src/mobius/optimizer/,
src/mobius/c/, and src/mobius/vm/, in that order. It helps to save images
along the way.

The primary uses of this "pidgin compiler" would be writing VM extensions
for native calls and libraries, but it's conceivable that you could write
a non-slate-related C program (maybe re-using the GC) with this. I
mentioned in my previous article where you can find current sources in
this mode, and it's just a group of code idioms that happen to fit into
C's relatively limited semantics. I'll also do my best to fill out the
Mobius manual section for it so that there's a nice high-level map of what
to expect.

There will be many more changes before this is finalized, but the overall
architecture is there. With any luck, I will be able to have this
finalized and a reasonable amount of the VM sources compiled as C for the
0.2.2 release. This of course does not finish the bytecode compiler and
image writing and loading, but these are comparatively easy.

As a note for the future, the C generator is roughly compatible with the
IR primitiveMode and other parts of the optimizing compiler, so these may
be actually interoperable at some point.

-- 
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/



More information about the Slate mailing list