CTFE Status

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 9 23:24:10 PST 2016


On Monday, 31 October 2016 at 13:29:01 UTC, Stefan Koch wrote:
> Hi Guys, since I got a few complaints about giving minor status 
> updates in the announce group, I am opening this thread.
>
> I will start with giving an overview of what works and what 
> does not work.
>
> Currently the only basic type you can do arithmetic on is int.
> Altough you can compare longs since a few days.
>
> These are the constructs that will work.
>
> - foreach on static arrays strings and range-foreach  (those 
> kinds (0 .. 64)).
> - switches (even deeply nested ones)
> - for and while loops
> - ternary expressions (? :)
> - if and else statements (as long as you don't use && and || )
> - lables and gotos
> - arithmetic expressions as well as post and pre increment and 
> decrement
>
> Constructs that will not work (but are actively worked on)
>
> - assignment to static array cells
> - long ulong arithmetic.
> - function calls
> - dynamic arrays and slices
> - pointers
> - structs
> - && and ||
> - sliceing
>
> Constructs that will not work and are futher down the list.
>
> - classes
> - closures
> - boundschecks
> - asserts
>
> Please note that there will probably be bugs all over the place.
> So even the working features might not be working completely.

FunctionPointers and plain function calls are currently in 
progress!
Also I made further performance improvements to the 
Bytecode-generator.
As of now it needs around 50 nano-seconds per generated 
instruction.
Generation + Interpretation execution of trivial functions now 
takes LESS then a microsecond on contemporary machines!



More information about the Digitalmars-d mailing list