[fpc-devel] NoGlobals branch

Hans-Peter Diettrich DrDiettrich1 at aol.com
Tue Aug 24 13:57:00 CEST 2010


Michael Schnell schrieb:
>  On 08/20/2010 12:39 PM, Hans-Peter Diettrich wrote:
>>  The many conditional parts, which are not even properly chained by 
>> {$ELSEIF ...}, make the maintance and refactoring a mess :-(
> While moving to OO paradigms could make the code slightly slower, I 
> suppose that supporting multiple CPUs with a single compiler might be 
> possible, doing away with the "old-style" $ifdefs, by using derived 
> classes for the different CPUs ans OSes.

In the meantime I found it doable, to remove the conditional 
compilation, but at a very high price :-(

When a data structure (e.g. COFF header) differs amongst 32 and 64 bit 
versions, so that fields have different offsets, all references to such 
fields have either to become virtual, or the code has to be duplicated 
for both models. In this case I find it more efficient, with regards to 
both speed and coding efforts, to leave the conditional parts in place.

Even in a mixed-mode coding model, with such polymorphic parts moved 
into re-usable include files, the number of such files would become very 
high.


Now I'm somewhat blocked, as long as nobody reviews the current state of 
the NoGlobals branch. I understand that it's summertime (in most 
countries ;-), and many core developers are in vacancies. But if there 
is a real desire for parallel execution in the compiler, a quick review 
  would allow me to proceed in that direction.

TIA
   DoDi




More information about the fpc-devel mailing list