ldc2: Current State?

Iain Buclaw ibuclaw at ubuntu.com
Tue Dec 7 13:13:52 PST 2010


== Quote from Robert Clipsham (robert at octarineparrot.com)'s article
> On 06/12/10 18:27, dsimcha wrote:
> > Apparently LDC2 is being actively worked on
> > (http://bitbucket.org/prokhin_alexey/ldc2/) and is up to date with the latest
> > D2 reference compiler.  I have not been able to get it to actually work,
> > though I haven't tried very hard and don't remember the details of why it
> > didn't work.  Is LDC2 in a mature enough state that people should actually try
> > to use it?  (I know the main LDC page says it isn't, but that seems rather
> > outdated, since it hasn't been updated in ages.)  Has anyone else used it at
> > all successfully yet?
> Without having used it, I can guarantee it is not - I was the last
> person to work on it while it was in the main ldc branch, and have been
> following its development in the new repository - there simply hasn't
> been enough (commit wise) for it to be workable yet. This said, it is
> possible that it's on par with D1, I haven't looked in enough detail to
> see if that is the case though.
> If you're looking for a non-dmd D2 compiler, GDC is currently the
> closest, I'm not sure what its current status is (I'm sure Iain will
> know) - I'm led to believe it can already compile a nice chunk of (its
> own branch of) phobos though.

Phobos2 in GDC is mostly a mirror of phobos hosted on dsource, with some GDC-specific changes here and there to emphasize on the
different implementation details ie: most functions in core.stdc.math are all aliases to GCC builtins. A recent changeset made it
possible for all GCC builtins to be CTFE'able now too, so as well as enum FOO = sqrt(2) now working (thus meeting an expected
requirement), you can go a little more wild and throw other functions into the mix: enum BAR = lround(sqrt(2)).
To note some of the bad things. Varargs are still a problem. And though InlineAsm is getting there, with most problems with codegen
pretty much sorted, we still suck at outputting labels. As far as I'm aware, Phobos will be 64bit-friendly in time for the 2.051
roll out. But that is no good when other architectures still bare the brunt of things. :~)

Regards


More information about the Digitalmars-d mailing list