[Lazarus] Parser
Florian Klämpfl
florian at freepascal.org
Wed Jun 30 23:18:18 CEST 2010
Hans-Peter Diettrich schrieb:
>>> There should exist a
>>> method/procedure in the CPU specific code, that is called to create the
>>> binary code for a procedure, but I could not yet locate it.
>>
>> psub.pas: tcgprocinfo.generate_code, it is generic.
>
> I couldn't find out how the code generator is involved. Most methods are
> non-virtual...
In the typical case the node tree codegenerator( ncg*.pas/n<cpu>*.pas)
calls the methods in cgcpu.pas.
>
>> - reduced readability of the parser code because the code for handling
>> something will be spread over different locations resulting also in
>> reduced maintainability: just look at the code generator code, to
>> support different architectures fpc the code generator is split at
>> several levels making it very hard to get an overview on it and even
>> more get into it.
>
> Yes and no. A good separation will help to clarify much.
See above, the whole back end stuff is separated very well but diving
into it is hell :)
More information about the Lazarus
mailing list