newCTFE Status August 2019

Stefan Koch uplink.coder at googlemail.com
Thu Aug 15 21:42:47 UTC 2019


Hi Guys,

I had 2 weeks of vacation recently, and I used them to work on 
newCTFE again.

The main addition was enriched internal debug data.
Now newCTFE can emit proper dwarf source_locations which used 
with the gccjit backend.
This means given you use the gccjit-backend for newCTFE you can 
(step through!) ctfe-code.
At least in theory ... in reality some of the time there will not 
be source code for you to step through, (think mixins).

Another rather important bugfix was done the handling of for 
loops, it turned out that for loops without increment statement 
would not properly behave when `continue` was encountered (they'd 
jump to the end of the loop instead of the beginning).

There are currently 2 main bugs still to be fixed:
-  1. floating point corner cases
-  2. wrong code on indirections inside closures.

It should be noted that I just spent the better part of a week 
working on the aforementioned 2 issues, and it does not look like 
they'll be fixed soon.

That said, I am hopeful to be able to release newCTFE in 2020!

My Thanks to everyone in this forum who encouraged me.

Also a special thanks to Johnathan Blow, who's occasional streams 
on Jai's progress led me to pick up the newCTFE torch again!

Cheers,

Stefan

P.S. the current newCTFE patch has about 17000 additional lines.
10700 of which are actual interpreter and test-code, and the rest 
are internal testcases, alternative back-ends 
(LLVM/GCCJIT/C/IR-Printer).

Re-basing to newer versions of the compiler will be done once the 
dmd/druntime/phobos test-suites and my internal tests are passing.



More information about the Digitalmars-d mailing list