CTFE and DI: The Crossroads of D

Mehrdad wfunction at hotmail.com
Wed May 9 15:55:36 PDT 2012


> I am 100% for this. It would be very .NET like. In fact I'm 
> curious enough what it would take to make this work that I 
> could see myself trying. My guess is that it needs a new linker 
> with the glorious side-effect of dumping optlink! In that case 
> it would mean upgrading the D backend to emit COFF (ELF and 
> Mach-O already support custom sections), which I am fine with 
> trying to do. Then you would add your AST or other intermediate 
> representations to a custom section in the object file and the 
> linker could then link it in. D would then need a way to 
> extract said information. Which would not be terribly hard. 
> Except that you'll have to train other compilers how to read 
> that IR. Maybe we could train D to read the LLVM IR?


:O I was writing a response pretty much exactly like this (i.e. 
doing what .NET does), but then I dumped it, thinking it'd be 
dismissed as too huge of a change...


More information about the Digitalmars-d mailing list