[Dlang-internal] Proposal: New Switch -vcg-ast to output the lowered AST
Stefan Koch via Dlang-internal
dlang-internal at puremagic.com
Wed Feb 22 17:37:15 PST 2017
Hello fellow compiler hackers,
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.
I do think this is very worthwhile to have.
And would be happy to hear some opinions from you.
PS. I am aware that the printout of enum definitions is now
broken; I know howto fix it and will do so shotly.
Lastly I should like the PR:
https://github.com/dlang/dmd/pull/6556
Cheers,
Stefan
More information about the Dlang-internal
mailing list