Re: Is there a way to "see" source code generated by templates after a compile?

2016-07-20 Thread ZombineDev via Digitalmars-d-learn
On Tuesday, 19 July 2016 at 20:19:53 UTC, WhatMeWorry wrote: On Sunday, 17 July 2016 at 05:57:52 UTC, WhatMeWorry wrote: I don't suppose there's a way to "see" source code generated by templates after a compile but before execution? Or does the compiler generate it to a lower level on the f

Re: Is there a way to "see" source code generated by templates after a compile?

2016-07-19 Thread WhatMeWorry via Digitalmars-d-learn
On Sunday, 17 July 2016 at 05:57:52 UTC, WhatMeWorry wrote: I don't suppose there's a way to "see" source code generated by templates after a compile but before execution? Or does the compiler generate it to a lower level on the fly; thus losing the source code? I'm assuming no because if

Re: Is there a way to "see" source code generated by templates after a compile?

2016-07-18 Thread Stefan Koch via Digitalmars-d-learn
On Monday, 18 July 2016 at 17:35:29 UTC, Stefan Koch wrote: I did it for function templates just now. It will the instantiated bodys to std-out. Okay here is the frist really hacky draft patch In dtemplate.d line 6691 right at the end of semantic3 insert the following code : if (au

Re: Is there a way to "see" source code generated by templates after a compile?

2016-07-18 Thread Stefan Koch via Digitalmars-d-learn
On Sunday, 17 July 2016 at 16:30:38 UTC, Stefan Koch wrote: On Sunday, 17 July 2016 at 14:54:34 UTC, zabruk70 wrote: On Sunday, 17 July 2016 at 11:14:39 UTC, Stefan Koch wrote: If you want to see template expansions you have to wait a little longer. Wow! Is this really possible?! So long time

Re: Is there a way to "see" source code generated by templates after a compile?

2016-07-18 Thread WhatMeWorry via Digitalmars-d-learn
On Monday, 18 July 2016 at 07:37:27 UTC, lobo wrote: On Sunday, 17 July 2016 at 05:57:52 UTC, WhatMeWorry wrote: [snip] Now that I think about, was there even a way to look at c/c++ code after the pre-processor step? Does this do what you want? cl.exe /E gcc -E clang -E clang-cl /E i

Re: Is there a way to "see" source code generated by templates after a compile?

2016-07-18 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 17 July 2016 at 16:30:38 UTC, Stefan Koch wrote: On Sunday, 17 July 2016 at 14:54:34 UTC, zabruk70 wrote: On Sunday, 17 July 2016 at 11:14:39 UTC, Stefan Koch wrote: If you want to see template expansions you have to wait a little longer. Wow! Is this really possible?! So long time

Re: Is there a way to "see" source code generated by templates after a compile?

2016-07-18 Thread lobo via Digitalmars-d-learn
On Sunday, 17 July 2016 at 05:57:52 UTC, WhatMeWorry wrote: [snip] Now that I think about, was there even a way to look at c/c++ code after the pre-processor step? Does this do what you want? cl.exe /E gcc -E clang -E clang-cl /E

Re: Is there a way to "see" source code generated by templates after a compile?

2016-07-17 Thread Stefan Koch via Digitalmars-d-learn
On Sunday, 17 July 2016 at 14:54:34 UTC, zabruk70 wrote: On Sunday, 17 July 2016 at 11:14:39 UTC, Stefan Koch wrote: If you want to see template expansions you have to wait a little longer. Wow! Is this really possible?! So long time several peoples asked this... I am reasonably sure that I

Re: Is there a way to "see" source code generated by templates after a compile?

2016-07-17 Thread zabruk70 via Digitalmars-d-learn
On Sunday, 17 July 2016 at 11:14:39 UTC, Stefan Koch wrote: If you want to see template expansions you have to wait a little longer. Wow! Is this really possible?! So long time several peoples asked this...

Re: Is there a way to "see" source code generated by templates after a compile?

2016-07-17 Thread WhatMeWorry via Digitalmars-d-learn
On Sunday, 17 July 2016 at 11:14:39 UTC, Stefan Koch wrote: On Sunday, 17 July 2016 at 05:57:52 UTC, WhatMeWorry wrote: I don't suppose there's a way to "see" source code generated by templates after a compile but before execution? Or does the compiler generate it to a lower level on the fl

Re: Is there a way to "see" source code generated by templates after a compile?

2016-07-17 Thread Stefan Koch via Digitalmars-d-learn
On Sunday, 17 July 2016 at 05:57:52 UTC, WhatMeWorry wrote: I don't suppose there's a way to "see" source code generated by templates after a compile but before execution? Or does the compiler generate it to a lower level on the fly; thus losing the source code? I'm assuming no because if

Re: Is there a way to "see" source code generated by templates after a compile?

2016-07-16 Thread rikki cattermole via Digitalmars-d-learn
On 17/07/2016 5:57 PM, WhatMeWorry wrote: I don't suppose there's a way to "see" source code generated by templates after a compile but before execution? Or does the compiler generate it to a lower level on the fly; thus losing the source code? I'm assuming no because if there were a way, I'd

Is there a way to "see" source code generated by templates after a compile?

2016-07-16 Thread WhatMeWorry via Digitalmars-d-learn
I don't suppose there's a way to "see" source code generated by templates after a compile but before execution? Or does the compiler generate it to a lower level on the fly; thus losing the source code? I'm assuming no because if there were a way, I'd of come across it by now :) Now th