Uphill

weaselcat via Digitalmars-d digitalmars-d at puremagic.com
Mon May 25 15:46:51 PDT 2015


On Monday, 25 May 2015 at 22:27:10 UTC, ketmar wrote:
> On Mon, 25 May 2015 18:34:24 +0200, Iain Buclaw via 
> Digitalmars-d wrote:
>
>> Yes, they do.  The key difference is that GCC doesn't require 
>> you to
>> delve into it's backend, as a language implementer, you only 
>> need to
>> think of how the code should be represented in it's tree 
>> language (ie:
>> http://icps.u-strasbg.fr/~pop/gcc-ast.html) - Because of this, 
>> I never
>> need to look at assembly dumps to understand what is going on, 
>> only tree
>> dumps,
>> which are handily outputted in a C-style format with
>> -fdump-tree-original=stdout.
>
> yet there are no well-documented samples for GCC, like "let's 
> create a
> frontend for simple C-like language, step by step" (at least 
> not in the
> distribution). there are none for DMD too, but DMD code can be 
> read and
> understood enough to work with it. and reading GCC code is out 
> of
> question, it's way too huge.
>
> i once thinking about using GCC as backend for my experimental 
> language,
> and ended writing my own codegen. it does awful job, spitting 
> almost non-
> optimised code, but it was at least maintainable. with GCC i 
> never got
> far enough, it's too complex and poorly documented.
>
> sure, that is not your fault, i'm simply trying to explain why 
> there are
> almost no people working on GDC. it's just too hard. or it 
> seems to be
> hard, but without good GCC documentation it's almost the same.

then contribute to LDC?


More information about the Digitalmars-d mailing list