[fpc-devel] New to list

Daniël Mantione daniel.mantione at freepascal.org
Sun Jul 16 14:33:41 CEST 2006



Op Sun, 16 Jul 2006, schreef Bart Hotmail:

> Hi,
> =

> Because i am very much interested in code optimization (SSA),I got the fpc
> v2.0.2 source and am reading through it & the internals doc.

Check the wiki article "Single assignment", which deals about the subject.

> For now i have the following questions/comments:
> * Are there plans to put in the missing parts of the internals doc,
> specifically "The code generator"?

What document are you referring to, Comparch.pdf? That document is indeed =

outdated. While updating is might be a good idea, I fear there are much =

higher priorities.

> * Are there plans to perform (some level of) code cleanup?
> I found that the code not always easy to follow
>    for example: there are  procedures of 100s of lines long, the compiler
> state is composed of a lot of global
>    variables spread accross several units, and there is mixed coding
> conventions (name casing, indenting).

During normal development, we are contiuously doing changes to get the =

code cleaner and actually I'm reasonably satisfied with the cleanness of th=
e =

code at the moment: We have a very clean code generator structure, the =

code is reasonably well documented, OOP is used were appropriate, etc. =

However, there is always room for improvement and indeed there exist a =

few very long procedures.

> Beforehand i expected to see the front-end and back-end loosely coupled
> (nice for putting a new front end in to make a new compiler), but i have =

> not been unable to tell yet.

The back-end has a reasonably clean interface, because the parser creates =

nodes using virtual constructors. It should therefore be possible to bolt =

a different parser on top of the backend. However, nobody has walked this =

path yet.


> Of course, I am always happy to contribute.

Sounds interresting!

Dani=EBl


More information about the fpc-devel mailing list