On Thursday, 24 May 2018 at 20:22:15 UTC, Dibyendu Majumdar wrote:
On Wednesday, 23 May 2018 at 18:49:05 UTC, Dibyendu Majumdar
wrote:
The ultimate goal is to have JIT library that is small, has
fast compilation, and generates reasonable code (i.e. some
form of global register allocation). The options I am looking
at are a) start from scratch, b) hack LLVM, or c) hack DMD.
I have been looking at DMD code (mainly the backend stuff) for
this ... I think it will be too difficult for me to try to
modify it :-(
Regards
Dibyendu
Sad to hear. Was interested to see if this was feasible. I don't
have much experience with the backend but if you're still up for
the task, take a look at `dmd/glue.d`. I don't know how much of
the glue layer this includes but it would be a good start. DMD
does have a common "glue layer" shared by DMD, LDC and GDC, so
you'd basically need to find the API to build this glue layer and
that's what you would use.
https://github.com/dlang/dmd/blob/master/src/dmd/glue.d