digitalmars.D.learn - D compiler equivilent of "gcc -E" for debug/view template
- dangbinghoo (7/7) Jul 29 2021 hi, is there any D compiler option or other method to view the
- WebFreak001 (6/13) Jul 29 2021 Not sure if this is exactly what you want but there is a hidden
- dangbinghoo (2/8) Jul 30 2021 thanks a lot! this is truelly what I exactly want! it's great!
- dangbinghoo (6/10) Jul 30 2021 but, where's these switch option documented? it seems it not
- Mike Parker (3/6) Jul 30 2021 That's what he meant by "hidden" switch. I don't know why it
- dangbinghoo (2/12) Jul 30 2021 sorry, I just not noticed "hidden", thanks for all of you!
- Stefan Koch (4/14) Jul 30 2021 The reason why it's not documented is because we don't want
- dangbinghoo (2/17) Jul 30 2021 ok, that is reasonable. thanks!
hi, is there any D compiler option or other method to view the final template instantiation but not compiled (in asm or binary) code? if there's a way, it might be very usefull for newbies like me to learn and understand the the Meta programming of dlang. thanks! dbh
Jul 29 2021
On Friday, 30 July 2021 at 06:00:41 UTC, dangbinghoo wrote:hi, is there any D compiler option or other method to view the final template instantiation but not compiled (in asm or binary) code? if there's a way, it might be very usefull for newbies like me to learn and understand the the Meta programming of dlang. thanks! dbhNot sure if this is exactly what you want but there is a hidden switch in dmd called `-vcg-ast` that prints out all the templates instantiated. On run.dlang.io you can use the "AST" button to view this conveniently online.
Jul 29 2021
On Friday, 30 July 2021 at 06:46:18 UTC, WebFreak001 wrote:On Friday, 30 July 2021 at 06:00:41 UTC, dangbinghoo wrote: Not sure if this is exactly what you want but there is a hidden switch in dmd called `-vcg-ast` that prints out all the templates instantiated. On run.dlang.io you can use the "AST" button to view this conveniently online.thanks a lot! this is truelly what I exactly want! it's great!
Jul 30 2021
On Friday, 30 July 2021 at 06:46:18 UTC, WebFreak001 wrote:On Friday, 30 July 2021 at 06:00:41 UTC, dangbinghoo wrote:Not sure if this is exactly what you want but there is a hidden switch in dmd called `-vcg-ast` that prints out all the templates instantiated.but, where's these switch option documented? it seems it not appears in dmd --help or man dmd, or online document https://dlang.org/dmd-linux.html thanks! dbh.
Jul 30 2021
On Friday, 30 July 2021 at 08:38:24 UTC, dangbinghoo wrote:but, where's these switch option documented? it seems it not appears in dmd --help or man dmd, or online document https://dlang.org/dmd-linux.htmlThat's what he meant by "hidden" switch. I don't know why it isn't documented, but it probably should be.
Jul 30 2021
On Friday, 30 July 2021 at 09:30:13 UTC, Mike Parker wrote:On Friday, 30 July 2021 at 08:38:24 UTC, dangbinghoo wrote:sorry, I just not noticed "hidden", thanks for all of you!but, where's these switch option documented? it seems it not appears in dmd --help or man dmd, or online document https://dlang.org/dmd-linux.htmlThat's what he meant by "hidden" switch. I don't know why it isn't documented, but it probably should be.
Jul 30 2021
On Friday, 30 July 2021 at 09:30:13 UTC, Mike Parker wrote:On Friday, 30 July 2021 at 08:38:24 UTC, dangbinghoo wrote:The reason why it's not documented is because we don't want people to rely on the format of the output. I guess if we put that disclaimer in the docs we could ...but, where's these switch option documented? it seems it not appears in dmd --help or man dmd, or online document https://dlang.org/dmd-linux.htmlThat's what he meant by "hidden" switch. I don't know why it isn't documented, but it probably should be.
Jul 30 2021
On Friday, 30 July 2021 at 10:20:36 UTC, Stefan Koch wrote:On Friday, 30 July 2021 at 09:30:13 UTC, Mike Parker wrote:ok, that is reasonable. thanks!On Friday, 30 July 2021 at 08:38:24 UTC, dangbinghoo wrote:The reason why it's not documented is because we don't want people to rely on the format of the output. I guess if we put that disclaimer in the docs we could ...but, where's these switch option documented? it seems it not appears in dmd --help or man dmd, or online document https://dlang.org/dmd-linux.htmlThat's what he meant by "hidden" switch. I don't know why it isn't documented, but it probably should be.
Jul 30 2021