[fpc-devel] Patches

Adem listmember at letterboxes.org
Thu Sep 30 16:49:51 CEST 2010


  On 2010-09-30 16:07, Jonas Maebe wrote:
>
> On 30 Sep 2010, at 14:43, Adem wrote:
>
>> On 2010-09-30 15:03, Jonas Maebe wrote:
>>> And the reason I said that is because Hans-Peter's wants to move it 
>>> inside the compiler so that making ppudump depend on the code 
>>> generator would no longer break the build.
>>> The basic problem is that his rewrite made ppudump dependent on the 
>>> code generator, not that ppudump's independence of the code 
>>> generator is enforced by the build system.
>> Could it not be the other way around?
>> That, it turned out that ppudump wasn't as independent as had been 
>> thought?
>
> The compiler doesn't think, it just gives an error when a unit is not 
> found.
>
> Hans-Peter tried putting global variables from all over the compiler 
> into a single unit, so it's logical that this makes everything 
> dependent on everything (because that single globals unit has to 
> import type definitions from all over the compiler).
I don't see why bringing together all the globals together should make 
everything dependent on everything else; after all 'globals' are those 
variables/routines that are common to all.

Actually, if I were DoDi, I'd probably bring all those units (that do 
nothing but declare various types and constants) in the uses secions of 
globals.pas into globals.pas.

Such as version.pas, globtype.pas, systems.pas, cpuinfo.pas, and 
probably a few more.

These units either use no other units, or use no units that globals.pas 
doesn't.

In order for globals.pas to be a proper global unit, I'd bring copy 
paste those units into globals.pas.

And then remove/delete tose superfluous units.



More information about the fpc-devel mailing list