swap doesn't work in CTFE?

Ary Manzana ary at esperanto.org.ar
Tue Jul 5 12:10:14 PDT 2011


On 7/4/11 11:39 PM, Daniel Murphy wrote:
> "bearophile"<bearophileHUGS at lycos.com>  wrote in message
> news:iut093$1bjg$1 at digitalmars.com...
>> Daniel Murphy:
>>
>>> Same thing happens with pointers.  Reduced:
>>
>> Pointers to structs in CTFE will work in DMD 2.054 :-)
>
> When they don't crash the compiler, that is.
> http://d.puremagic.com/issues/show_bug.cgi?id=6250

Is there any point in implementing CTFE in the compiler when LLVM 
already allows you to define functions and JIT compile them? Why write 
yet another "JIT compiler" that in fact doesn't optimize anything and 
just interprets everything as it comes? I'm sure with LLVM you can do 
all of what DMD currently does and more.



More information about the Digitalmars-d-learn mailing list