[DGD] JIT compiler

Felix A. Croes felix at dworkin.nl
Tue Feb 19 22:53:27 CET 2019


Precompilation was dropped as a feature for DGD 1.5.  I want to
replace it with a JIT compiler in the near future.

JIT compilation is going to be done through an extension module.  The
extension module will communicate with another program, and that
program will do the actual compilation of LPC bytecode to machine
code.  This way, DGD will be isolated from the JIT compiler, which
could crash or have memory leaks.  The same JIT compiler module
will also work for Hydra.

The JIT compiler will produce object files (one for each LPC object)
which can be loaded at runtime into DGD's runtime process.  Since
they're saved as files, they can be cached and don't necessarily
have to be recompiled after DGD reboots.

The current state of the JIT compiler is that basic block detection
is finished, and the value type produced by every VM instruction can
be determined.  This is sufficient for conversion to LLVM code.  I
currently don't have a lot of time to work on it, but the end is in
sight.

I've pushed the current code to <https://github.com/dworkin/lpc-ext>.

Regards,
Felix Croes



More information about the DGD mailing list