Ellery Newcomer wrote:
On 04/16/2010 03:13 PM, eles wrote:

PS2 What does really means to use LLVM or GCC backends for dmd? Is a front-end somewhat like a parser (or bytecode compiler) and the back-end something like
an assembler?


Pretty much.

Except in the case of D, the front end also requires a backend of sorts (for ctfe),

 and from what I understand, DMD's frontend and backend are
kind of squooshed together.

Not really, the frontend compiles everything to an intermediate form, and then the backend converts the intermediate form into native code. There's not much interaction between them. In particular, the backend is the same backend used for C++. It doesn't have anything which is D-specific.

(Like certain errors don't get caught unless
and until the backend's optimizer gets run)
That behaviour is fairly common in C++ compilers.

Reply via email to