On Wednesday, 23 May 2018 at 18:49:05 UTC, Dibyendu Majumdar
wrote:
Now that D has a better C option I was wondering if it is
possible to create a small subset of D that can be used as
embedded JIT library. I would like to trim the language to a
small subset of D/C - only primitive types and pointers - and
remove everything else. The idea is to have a high level
assembly language that is suitable for use as JIT backend by
other projects. I wanted to know if this is a feasible project
- using DMD as the starting point. Should I even think about
trying to do this?
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.
Regards
Dibyendu
You may like the project of a compiler I am doing
https://github.com/MrSmith33/tiny_jit
TLDR: fully in D. No dependencies. Currently for amd64 + Win64
calling convension.
P.S. Sorry for late response.