Wasn't someone trying to work on a C backend for DMD?

Daniel Murphy yebblies at nospamgmail.com
Sat Apr 28 22:53:46 PDT 2012


"Chad J" <chadjoan at __spam.is.bad__gmail.com> wrote in message 
news:jniju1$1pf7$1 at digitalmars.com...
>
> Bummer, no commits in the last 3 months or so.
>

It was never a serious project unfortunately, just an experiment.

> At any rate, I almost wonder if I can compile the output C code on the 
> OpenVMS system at work.  I have a project in C I work on from time to 
> time, but it's an uncomfortable (to say the least) environment to work 
> with.  There is stuff like this:
> http://h30499.www3.hp.com/t5/Languages-and-Scripting/How-do-I-get-C-program-tracebacks-to-print-SOURCE-line-numbers/td-p/5570015
> If I had DMD with C-backend at my disposal, then maybe I could instrument 
> it with a calling convention that gives me exception handling and proper 
> debug information.  Then I'd also get arrays and various other really nice 
> D features, even with just the basics.  I wouldn't bother getting the GC 
> to work, but it'd make me consider implementing some kind of reference 
> counting.  Even without ref counting I'd have way more at that point than 
> what I have currently with straight C code.
>
> And if I /could/ get reference counting, and if the backend were solid 
> enough, then the thing could probably be used for writing games.  I'd have 
> the ability to output extremely portable C code to pretty much any target 
> except the web, and there's the JS backend for that.  Very enticing!
>

It is a loooong way from being able to do that.  Your best bet is probably 
to try and configure gdc or ldc to output c or compiled code for your 
platform.  Completing MicroD would require porting most of druntime as well.

> I wonder what it would take to get this sort of thing merged into 
> mainline.

A huge amount of work. 




More information about the Digitalmars-d mailing list