xdc: A hypothetical D cross-compiler and AST manipulation tool.

Kelly wilsonk at cpsc.ucalgary.ca
Mon Nov 11 22:40:18 PST 2013


Hey Chad,

It looks like you have put a lot of thought and effort into
this from your posts. Nice work.

I am one of the developers of Amber and we do have a C backend,
as nazriel pointed out earlier in the thread. It supports
exceptions (sjlj and seh depending on the flag and platform).
We support clang, gcc, dmc, tcc and msvc...though I have really
only been testing gcc and clang lately.

I can't say we have perfect coverage of exceptions, and
templates are a little behind with the C backend when compared
to the llvm backend also, but we actually pass more tests in
our testsuite with the CBE than LLVMBE.

Amber is an offshoot of D1, with some small parts of D2 where
it made sense, so it may not be very close to what you are
looking for, but it might be worth checking out. It compiles
best on linux with dmd and ldc 1.074 and needs Tango to compile
(Tango is also our main standard lib for Amber...though we can
only compile about 25-30% of Tango with the Amber compiler right
now).

Good luck with xdc, whichever way you go with it.

Thanks,
Kelly


On Tuesday, 12 November 2013 at 03:51:21 UTC, Chad Joan wrote:
> On Saturday, 9 November 2013 at 04:46:14 UTC, Etienne wrote:
>> Many vendors would have their processors supported in D if we 
>> had
>> a D to C compiler. I feel like it would be simpler than going 
>> for
>> native code directly. Did this idea follow-through?
>>
>
> No, not yet I'm afraid.  At least not for xdc.
>
> Here's the lowdown:
> The future of xdc will be determined by whether or not I can 
> save up enough money to reliably support myself between the 
> time I would leave my current job and the time I would be 
> compensated by means of crowdsourcing.  In the middle there I 
> would need to create some kind of working demo, make a good 
> pitch, talk to a bunch of writers and programmer communities, 
> etc etc, all while burning precious savings.  If, before any of 
> that, I get recruited by another company with a non-terrible 
> (and possibly /good/) codebase (like Sociomantic or Facebook), 
> then we would be able to consider the whole idea effectively 
> cancelled before it can start.  As great for /me/ as it would 
> be to write D code for a job, I just don't see it being a boon 
> to xdc: companies usually hire folks to work on the company's 
> stuff, not the employee's stuff.  But, if I end up sticking 
> with my current job, then at some point I may just go out on my 
> own and make things happen.  Time will tell.
>
> That said, if all you want is a C/C++ backend, then Kai's 
> recent post on this thread brings up a possibility that seems 
> unexplored, as of yet:
> http://forum.dlang.org/post/psqajaggngbuctqfrrnc@forum.dlang.org
> Maybe that'll get you there in more certain terms.


More information about the Digitalmars-d mailing list