On 06/12/2012 03:54 PM, deadalnix wrote:
Le 12/06/2012 12:23, Tobias Pankrath a écrit :
Currently .di-files are compiler independent. If this should hold for
dib-files, too, we'll need a standard ast structure, won't we?


We need it anyway at some point.

Plain D code is already a perfectly fine standard AST structure.

 AST macro is another example.


AST macros may refer to AST structures by their representations as D code.

It would also greatly simplify compiler writing if the D interpreter
could be provided as lib (and so run on top of dib file).


I don't think so. Writing the interpreter is a rather straightforward part of the compiler implementation. Why would you want to run it on top of a '.dib' file anyway? Serializing/deserializing the AST is too much overhead.

I want to mention that LLVM IR + metadata can do a really good job here.
In addition, LLVM people are working on a JIT backend, if you know what
I mean ;)

Interpreting manually is not harder than CTFE-compatible LLVM IR code generation, but the LLVM JIT could certainly be leveraged to improve compilation speeds.

Reply via email to