February 07, 2004
Marcel Meyer wrote:
> Stephan Wienczny wrote:
> 
> 
>>Marcel Meyer wrote:
>>
>>>Hmm, if you don't reinvent the wheel but search for a nice existing
>>>"backend"-language, you could reuse their ports. I heard the Universität
>>>Karlsruhe created some great stuff in during the last year.
>>
>>Do you still know how it was called? Have they published something?
> 
> 
> Phew... I already searched for it. But I can't recall. Well, but that was
> just an example. There are others.

I something called Flex. Thats a project they are working on.
There has not been any documentation how it works ;-(
I want one of the best intermediate languages currently available.
What do you think, is it possible generate a syntax tree that a backend can easily convert into asm? Do you really need to have a seperate backend language? I don't think Walter's compiler generates some intermediate language.
> 
> How deep is your experience in building compilers? Did you already write
> some? Despite of some lectures in "formale Sprachen" and a (very) few
> projects in MI-assembler I don't have any clue what you really need for a
> compiler. I will start learning for my "Diplomhauptprüfung" the next
> semester - we'll see what happens ;-).

This will be my first one....
I'm quite good at designing software to be flexible and portable.
The compiler will _not_ be designed to just compile D.
It will be able to compile D, but that is not its only purpose.
To be successful we will need C and C++. Maybe Java, Object Pascal.
These are the languages I would design my abstract syntax tree for.

My current planes for a syntax tree are:

1. As many basic types as possible, defined using templates. Everything being a class in the syntaxtree. Handled by the backend.
2. Different class allocation with and without GC.
3. SSA like expression design.

> But for now I really can't give you any tips - I guess you're far more
> qualilfied if you dare to start such a project :-D

I started the project not because I'm more qualified, I started it because I wanted to have such a compiler and nobody else is writing it for me ;)
We'll see what happens.

> 
> Is the principle of GCC, source-frontend-intermediate-_language-backend-asm,
> unique to it? I've never seen any other compiler working like that.

GCC uses
source - syntax tree - RegisterTypeLanguage - symbol
the next step will be
source - syntax tree - saa representation - RTL - symbol
I don't think this will be too fast.

Stephan

February 07, 2004
Marcel Meyer wrote:
> Hmm, if you don't reinvent the wheel but search for a nice existing
> "backend"-language, you could reuse their ports. I heard the Universität
> Karlsruhe created some great stuff in during the last year.

I have searched the net up and down on intermediate representations, compiler back-ends, cross-platform low-level language compilers and so on. So far, nothing is as portable as C as an intermediate, with GCC being the second best. The great adbantage if GCC is that's a *real* compiler backend with debug information and other services and not just C. :)

One interesting option is TenDRA (www.ten15.org) which uses its binary intermediate representation. There are commercial and free back-ends, but i think i heard somewhere the free x86 back-end was... weak! Looking at c-- and others doesn't make me particularly optimistic either.

I would definately not want to start a new back-end. It would be imaginable to create a correct back-end, and maybe even some optimising back-end, but it still would be no match to current senior ones. They (GCC, DMC, OW) have optimisers with patterns developed in hard work during a decade or more. There is an interesting read from the autor of LCC-Win32 - which generates by orders of magnitude better code than original LCC, but doesn't match the other compilers. And it was 10 years of work...

>>[* Nett, das jemand dabei ist, mit dem man auch Deutsch sprechen kannn *]
> 
> och, ich bin mir sicher sollte das mit dem DCC wirklich was werden, werden
> noch viele deutschsprachige Studis hinzustossen.

Wie ich zum Beispiel?

-eye/midiclub

February 10, 2004
Marcel Meyer wrote:
> Stephan Wienczny wrote:
> 
> 
>>Marcel Meyer wrote:
>>
>>
>>>Stephan Wienczny wrote:
>>>
>>>
>>>>On the long run it might be a good idea to write an new open source
>>>>compiler supporting D using D. I've been starting such a project,
>>>
>>>
>>>Nonetheless, I would like the idea of a DCC - especially if all those
>>>conf and "make" thinks are somehow implemented. But do you think this is
>>>doable in a senseable time? I'm not yet very deep in compiler builds - so
>>>I'm quite naive. But everytime I think "what can be done" I just see sooo
>>>much work - just like making a really good GUI-toolkit (more like QT) for
>>>D - and then I just keep running away crying ;-).
>>
>>The first thing I thought when starting the project was: "There is a lot
>>of work", but I think I overestimated it. The hardest thing is the
>>backend. Do you know some ASM-Guru that could help?
How about HLA from Randall Hyde?
I am sure Jacob Navia could be told to be an ASM-Guru too. And I assume he has enough experience with Compiler development. But I'm sure you look after unsolicited co-workers....

And I disagree that you think you overestimated, you underestimated...

Regards
Friedrich



1 2
Next ›   Last »