proposal: lazy compilation model for compiling binaries

Martin Nowak code at dawg.eu
Sun Jun 23 17:36:42 PDT 2013


On 06/22/2013 06:45 AM, Timothee Cour wrote:
> Example2:
> ----
> auto foo(){return "import std.stdio;";}
> mixin(foo);
> void fun2(){import b;}
> void main(){writeln("ok");}
> ----
> lazy semantic analysis will analyze main, foo but not fun2, which is not
> used. foo is analyzed because it is used in a module-level mixin
> declaration.
>
Overall it's a good idea. There are already some attempts to shift to 
lazy semantic analysis, mainly to solve any remaining forward reference 
issues.
Also for non-optimized builds parsing takes a huge part of the 
compilation time so that would remain, I don't have detailed numbers though.



More information about the Digitalmars-d mailing list