On 04 Mar 2013, at 13:38, Daniël Mantione wrote:

> 2. Layered code generation
> 
> The split of the code generation in a high-level and low-level layer, means 
> that for every node that is processed, first the high-level virtual method is 
> called, which in turn calls the lower level virtual method. Thus you have an 
> addition virtual method call for evey node processed.
> 
> The low level code generator, which is still mostly CPU independent, again 
> calls virtual methods from the abstract assembler layer to generate the 
> actual opcodes.
> 
> The abstract assembler in turn, has again to worry about multiple assemblers 
> which can emit the final object file.

Note that the release compilers are compiled with WPO and those optimizations 
change most of those virtual calls into static calls. Not all of them, but e.g. 
the entire code generator (both high and low level) does get devirtualized for 
most platforms (except for ARM, because it contains multiple low level code 
generators).


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to