On Sunday, 1 July 2018 at 12:04:06 UTC, Basile B. wrote:
I've recently ported libfirm to D.
This nice C library, developed at the Karlsruhe university,
allows to build compiler back-ends, using the SSA intermediate
representation.
In theory it could even be used to make a new D compiler
version, e.g "FDC", although this is obviously of no interest ;)
So this is mostly to make JIT scripting engines or back-ends
for toy languages...
See:
- https://github.com/BBasile/libfirm-d
- https://code.dlang.org/packages/firm-d
- https://pp.ipd.kit.edu/firm/
Note that unfortunately this library is LGPL2 licensed, so much
less usable than LLVM-d, which is a similar but a more
mainstream library.
With the recent release of dstep 1.0.0 I've managed to make a new
minor release that only auto generate the sources (v0.1.0). It
was obviously not a good idea to maintain all the headers up to
date manually, although this permitted to learn a bit the API.
Note that building must be done at least twice the first time
because of a DUB limitation.
other changes :
- dub package on code dlang is gone, it must really be a git
stuff now
- it's much faster because build is optimized using git hashes.
- location changed due to GH account renaming
https://github.com/Basile-z/libfirm-d