AST to AST JIT Backend

Atila Neves atila.neves at gmail.com
Thu Sep 3 16:29:50 UTC 2020


On Tuesday, 1 September 2020 at 00:15:24 UTC, James Lu wrote:
> I have an idea, one way we can get faster compiles for Dlang is 
> by compiling to an existing JITted language, which could be 
> easier to build a proof of concept for than a full optimizing 
> JIT compiler.
>
> Perhaps we could compile Dlang to Lua, targeting LuaJIT or 
> JavaScript, targeting V8.
>
> I personally know to write highly performant JavaScript very 
> well. Combined with Dlang's natural type information, it could 
> result in fast machine code, fast. Backends for the Nim 
> language tend to output poor (slow) JavaScript code.
>
> In an earlier thread, I showed that the V8 JavaScript engine 
> could generate decent quality machine code much faster than 
> LLVM D Compiler.

What you're talking about is exactly what I've wanted to do for 
about a year now, with the addition of a focus on running unit 
tests. My goal is to experiment and find out what is the fastest 
way to get results from tests, which is tricky since it's a 
balancing act between interpreting/compiling/executing. I'm fed 
up of paying the linker tax.

I wish I had the time.


More information about the Digitalmars-d mailing list