[Dlang-internal] Proposal: New Switch -vcg-ast to output the lowered AST

Martin Nowak via Dlang-internal dlang-internal at puremagic.com
Fri Feb 24 03:58:54 PST 2017


On Thursday, 23 February 2017 at 01:37:15 UTC, Stefan Koch wrote:
> In order to debug the inliner I have implemented a switch that 
> prints out the AST after all semantic processing is done.
> Using the infra-structure that is already provided by hdrgen.
> This has already let me to make a few improvements to the 
> hdrgen.
> For example if-else chains will no longer infinitely indent to 
> the left.
> Or Literals of EnumType will be printed by name rather then as 
> cast(MyEnum)38943U.

It might be helpful for dmd, but actually inlining doesn't belong 
into the frontend, so this is a very specific tool. Also haven't 
seen many inline bugs lately.


More information about the Dlang-internal mailing list