Inlining of immediately called function literals

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 27 01:35:28 PDT 2014


"Marc Schütz" " wrote in message 
news:gefktpkzfnlryljvwmqa at forum.dlang.org...

> IIRC the core reason is that expression nodes in the AST cannot contain 
> statements. Isn't it possible to create a "bridge" node type that is 
> allowed to appear in expressions, but may also contain statements?

Sure, but that would be horrible (from an implementation point of view). 
The better way is to use an ir/backend inliner, ie use gdc or ldc. 



More information about the Digitalmars-d mailing list