D2 front-end for LLVM (Was: Re: Making alloca more safe)

Tomas Lindquist Olsen tomas.l.olsen at gmail.com
Tue Nov 17 10:17:47 PST 2009


On Tue, Nov 17, 2009 at 5:58 PM, bearophile <bearophileHUGS at lycos.com> wrote:
> Tomas Lindquist Olsen:
>
>> LDC requires a lot of changes to the frontend.
>>
>> * DMD is not written as a cross compiler
>> * The runtime interfaces are hardcoded into the frontend semantics
>> * The ast rewrites dmd does are destructive and buggy
>> * The dmd codegen is all over the frontend code, it wasn't meant to be
>> used with another backend
>
> LLVM is one of the best thing happened to D1, so maybe Walter can improve the situation, to allow a simpler/better attach of the D2 front-end to LLVM. If you keep your muzzle shut things will never improve. Maybe someone can write a list of all the points where D2 causes such port problems, so Walter may improve/fix them some.
>

Walter seems to be fairly rigid to work with. While the latest
improvements, like DMD in a SVN repo, is a great step, I just don't
have as much time for LDC as I used to, so the little difference it
makes doesn't really help me that much.

I agree it would be good with more developer documentation. But LDC is
really not implemented very cleanly and writing such would be a huge
amount of work. When I started on LDC I had no idea how DMD worked,
and I made a lot of mistakes along the way.

Now, since then, a lot of people have joined, and helped out. But it
still suffers from some of the issues introduced very early.

Another point is motivation. Personally, I've achieved what I
originally planned for LDC, and quite a lot more. New projects await
out there.

Don't get me wrong. I *use* D (1.0 + Tango). And I need a x86-64
compatible D compiler, so I'm not abandoning LDC. But other people
will have to step in for D2 support. Unless of course I somehow
magically convert to liking D2. But I doubt that's going to happen.

-Tomas

P.S. LDC is an open source project, and while I started it, many other
people now have write access to the repository. I'm not holding anyone
back from making the changes needed for D2 support. And in case
someone out there wants it, I'll be happy to give you access as well
(after seeing a first patch).



More information about the Digitalmars-d mailing list