newCTFE Status August 2019

Stefan Koch uplink.coder at googlemail.com
Wed Aug 21 00:38:17 UTC 2019


On Monday, 19 August 2019 at 23:04:23 UTC, Walter Bright wrote:
> On 8/19/2019 7:02 AM, Ethan wrote:
>> Even just a patch to fix array memory handling behind the 
>> scenes would be great.
>
> The memory handling could be fixed if the CTFE's allocated 
> AST's were all allocated from a separate pool, and marked as 
> such. Then, the returned AST from CTFE can be scanned and every 
> marked node replaced. Then, the entire pool can be discarded.
>
> Should be fairly simple to implement.

At least last time I tried that, (which was 2.8 years ago), I ran 
into problems with deciding which nodes to keep. As CTFE can 
trigger semantic() on FunctionDeclarations, and all of the nodes 
created there have to be kept, even though they might not be 
referenced from the ctfe result.




More information about the Digitalmars-d mailing list