On Fri, Jun 02, 2017 at 05:22:20PM +0000, Stefan Koch via Digitalmars-d-learn wrote: > On Friday, 2 June 2017 at 16:13:03 UTC, Laeeth Isharc wrote: > > On Friday, 2 June 2017 at 02:06:27 UTC, Mike B Johnson wrote: > > > [...] > > > > Stefan Koch has written a good part of an interpreter for D AST, no? > > And I guess the lexing and parsing stage doesn't take so long, > > whereas not having to link saves much time. > > > > So is there any way to repurpose his work on ctfe to have an > > interpreter that you can call at run time, set context for and get > > return values back? > > No there is not. First it's woefully incomplete and secondly it's > tightly bound to dmd, and it's semantic phases
Hmm. I wonder if there's a way for, say, ldc to export llvm bytecode of a given D program, such that another program can load this bytecode and interpret it at runtime? Is it possible to use llvm in such a way? T -- People tell me that I'm skeptical, but I don't believe them.