[virtmach] VM with garbage collection

Bart Demoen virtmach@iecc.com
Fri, 11 Jan 2002 12:53:13 +0100 (MET)


> > 4. As in 3., but observe that if the GC understands the instruction format,
> >    it doesn't need the table but can find the pointers itself. This is very complex.
> 
> This is really a just refinement of 1. It loses to 3 because for 3 you
> don't have to change the GC to accomadate new instructions or native
> code.

If you have a description of your instructions at a bit higher level,
you can use this description to generate the GC (at least the part
that is related to code) instead of writing it. We followed such an
approach for the code GC itself. As far as GC is concerned, adding an
instruction means only adding its description - the description is
also used to generate the loader, necessary tables for the compiler, a
print-code routine, a bunch of C-macros ... 
Makes us very willing any day to add new instructions or delete some :-)

Cheers

Bart Demoen