Chat with Stefan Koch about CTFE reimplementation
rikki cattermole via Digitalmars-d
digitalmars-d at puremagic.com
Mon May 23 08:57:42 PDT 2016
Hello!
So on today's stream[0] I had a chat with Stefan and worked through a
few problems regarding reimplementation of dmd's CTFE.
So a TLDR for those who do not wish to watch the video.
- ddmd.dinterpret will have only two public free-functions
(ctfeInterpret and ctfeInterpretForpragmaMsg).
- For this, CompiledCtfeFunction struct will be removed from
FuncDeclaration (.ctfeCode). The suggested fix is by using a hash table
in dinterpret.
- extern (C++) Expression getValue(VarDeclaration vd).
Will no longer be used as is in ddmd.ctfeexpr.
- printCtfePerformanceStats will be deleted altogether.
- Everything else is essentially (or will be) private.
Please note that these are not final, it is just the solutions we found
during the stream in isolating dinterpret to itself.
The benefits to this is of course, the implementation of CTFE will not
publically expose its inner workings. Meaning if it is desired, it can
be concurrent or JIT'd.
Finally a question from Stefan, how much does dinterpret actually need
the backend for transiently? We know from looking that it doesn't appear
to use it in at least 2 degrees of separation.
Please note that I do not intend for this video to get posted on Reddit
since its about dmds internals (and not very important).
[0]
https://www.livecoding.tv/alphaglosined/videos/radD5-talking-with-stefan-koch-about-dmd
More information about the Digitalmars-d
mailing list