[fpc-devel] OO rewrite - first round finished

Hans-Peter Diettrich DrDiettrich1 at aol.com
Fri Aug 6 01:38:40 CEST 2010


Felipe Monteiro de Carvalho schrieb:
> What is the OO rewrite?

It's an SVN branch, aimed at making the compiler more object-oriented. 
It should simplify the maintenance of the compiler code, the test of 
different algorithms and procedures for specific parts, and finally the 
use of threads and installable front- and back-ends.

Unfortunately I killed this second approach (after the parser_rewrite 
branch), by too complex changes without detailed knowlege about the 
currently used global variables and other inobvious dependencies. Even 
if the refactored parser is still working in general, the framework 
fails in certain situations, for yet unknown reasons :-(

So I have to explore the dependencies amongst the many modules first, 
and the unexpected changes of variables from code in arbitrary places. 
Even if I can understand - to some degree - that related subroutines 
reside in different units, to avoid cyclic unit dependencies, such 
problems must be solved now in a better way (by encapsulation).

Since most compiler internals are undocumented, I appreciate any 
assistance in figuring out that puzzle. Some questions can be answered 
without detailed knowledge of the compiler, by simply collecting all 
places in the code, where certain critical variables are changed. This 
cannot be achieved by a static analysis of the code, instead chains of 
calls have to be found out, that can change variables (i.e. the state of 
the application or of its components) in an unexpected way. For that 
purpose the suspect variables can be changed into properties, of a unit 
or class, so that their use can be debugged. It would be very helpful 
when somebody could help in instrumenting the compiler code this way, 
and in finding out what's going on under the surface.

DoDi




More information about the fpc-devel mailing list