CTFE Status

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Sat Dec 3 10:00:10 PST 2016


On Saturday, 3 December 2016 at 02:07:06 UTC, Stefan Koch wrote:
> Currently I am working on the ability of returning structs.
>
> I will keep you updated,

This is coming along rather nicely.
StructLiterals as Arguments regressed.
But they did rather dubious stuff in the first place.

So supported types are.

StringLiterals.
Integral Array Literals.
Dynamic int[] and uint[] Arrays.
Structs with int or uint members.
and
StructLiterals with int/uint members (regressed currently.)

64bit integrals (long) do work but only if the interpreter 
backend is used.

Supported operations.
All basic math. (+ - * / %)
...++ ...-- +++... --...
while(...) {...}
do ... while(...)
label :
goto label;
break;
break label;
continue;
continue label;
for(...;...;...)
... ? ... : ...
switch (...) { case ... , ... } (unreliable due to differences in 
case-sorting :( )
for-each on strings and arrays.
Assigning to array length. (currently without copying on 
reallocation :( )
Bounds-Checked :
Array-Indexing
Left-Shift Right-Shift. (always unsigned! :( )

Unsupported :
&& ||
classes (unlikely to be added in the near future)
function calls (plain and closure)
slices
pointers
static arrays.

floating point math (unlikely to be added in the near future)


More information about the Digitalmars-d mailing list