Official DMD compiler written in D

Dmitry Olshansky dmitry.olsh at gmail.com
Thu Jan 10 11:52:59 PST 2013


09-Jan-2013 15:05, Timon Gehr пишет:
> On 01/08/2013 10:06 PM, Philippe Sigaud wrote:
>> ...
>>
>> Isn't SDC also in D? (Bernard Helyer and friends)
>> https://github.com/bhelyer/SDC
>>
>>
>> Also, Timon Gehr spoke of his own front-end (assumed to be in D) in the
>> past, but did not provide any link to it.
>>
>
> Yes, it is in D. Nothing is released yet. It needs to be polished a
> little so that there are no known embarrassing shortcomings anymore.
> (eg. the parser cannot parse extern(...) declarations in alias
> declarations yet, and I need to finish making a minor tweak to how
> template instances are analyzed in order to get circular dependency
> detection to work reliably. Furthermore, examples like the following are
> currently rejected, while I want it to work:

[snip]

> CTFE is basically done (as a portable byte code interpreter, but other
> strategies, such as JIT, could be easily plugged). This is a snippet of
> my regression test suite:
>
> auto dynRangePrimes(){
>      DynRange!int impl(int start)=>
>
> dynRange(cons(start,delay(()=>filter!(a=>a%start)(impl(start+1)))));
>      return impl(2);
> }
>
> static assert(array(take(dynRangePrimes(), 20)) ==
> [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71]);
>
> )

Cool! I'd love to take even the very preliminary peek at the speed 
profile of this CTFE engine.

If you are interested I'd love to test a small (the code though contains 
a lot of static data) CTFE benchmark that is the bottleneck in the 
compilation of current ctRegex.

See the attachment here:
http://d.puremagic.com/issues/show_bug.cgi?id=7442

would be nice to see some rough numbers for this vs DMD.

> I also need to decide on a licence. I assume that the alpha will be out
> in late spring. (I am busy until early spring.)
>
Eagerly waiting to play with it.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list