<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span><br></span></div><div>In fact, they are both shipped. In order to use the .d files instead of the .di files change this argument in your dmd.conf file:</div><div><br></div><div>-I%@P%/../../src/druntime/import</div><div><br></div><div>to this:</div><div><br></div><div>-I%@P%/../../src/druntime/src<br></div><div><br></div><div>Note then, you have to be wary not to try and import some of the directories. Such as rt and gc.<br></div><div><br></div><div>At least this can provide a test of how well CTFE will perform if we *did* switch to .d files.</div><div><br></div><div>Here's another idea:</div><div><br></div><div>What if .di put in a pragma indicating the original source of the file (auto generated by dmd -h)? If the original source exists, then CTFE will use it instead of the .di
file.</div><div><br></div><div>You know, thinking through this, the more I don't really understand why we are doing .di files *except* for object.di (which is hand-generated anyway).<br></div><div><br></div>-Steve<br><div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Andrew Wiley <wiley.andrew.j@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> D's runtime library developers list <d-runtime@puremagic.com><br><b><span style="font-weight: bold;">Sent:</span></b> Friday, July 15, 2011 12:31 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [D-runtime] Why does druntime us .di files instead of .d?<br></font><br><meta
http-equiv="x-dns-prefetch-control" content="off"><div id="yiv1331900096"><div class="yiv1331900096gmail_quote">On Thu, Jul 14, 2011 at 9:30 PM, Andrew Wiley <span dir="ltr"><<a rel="nofollow" ymailto="mailto:wiley.andrew.j@gmail.com" target="_blank" href="mailto:wiley.andrew.j@gmail.com">wiley.andrew.j@gmail.com</a>></span> wrote:<br><blockquote class="yiv1331900096gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="yiv1331900096gmail_quote"><div class="yiv1331900096im">On Thu, Jul 14, 2011 at 6:19 PM, Walter Bright <span dir="ltr"><<a rel="nofollow" ymailto="mailto:walter@digitalmars.com" target="_blank" href="mailto:walter@digitalmars.com">walter@digitalmars.com</a>></span> wrote:<br>
<blockquote class="yiv1331900096gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><br>
<br>
On 7/14/2011 2:40 PM, Andrew Wiley wrote:<br>
<blockquote class="yiv1331900096gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
It seems to me that a way to fix all this and guarantee CTFE-ability (which seems to be the end goal) would be to add some sort of modifier or annotation to designate that a function is CTFE-able.<br>
</blockquote>
<br>
<br></div>
Please, please, no! I hate "constexpr" in C++0x. One of the whole point of CTFE is it "just works" on regular D functions.</blockquote><div><br></div></div><div>I think that's excellent as well, and to be honest I don't think an annotation is a good solution, but we're going to have to come up with something here because it isn't "just working."</div>
<div><br></div><div>CTFE, traits, and mixins together make D a powerhouse for compile-time code generation, and that's pretty much what's kept me around here :D</div></div></blockquote><div><br></div><div><br></div>
<div>Could we just ship both d and di files, and make the frontend able to switch to the .d file when it needs the function source? </div></div><br>
</div><meta http-equiv="x-dns-prefetch-control" content="on"><br>_______________________________________________<br>D-runtime mailing list<br><a ymailto="mailto:D-runtime@puremagic.com" href="mailto:D-runtime@puremagic.com">D-runtime@puremagic.com</a><br><a href="http://lists.puremagic.com/mailman/listinfo/d-runtime" target="_blank">http://lists.puremagic.com/mailman/listinfo/d-runtime</a><br><br><br></div></div></blockquote></div></div></body></html>