newCTFE Status April 2018

Stefan Koch uplink.coder at googlemail.com
Thu Apr 12 18:59:33 UTC 2018


On Sunday, 8 April 2018 at 09:44:04 UTC, Stefan Koch wrote:
> [ ... ]

And again I find a case which we did not handle for years.
When we directly interpret a function which takes a reference to 
a static immutable global as parameter.

This global will be full of zeros since newCTFE had no function 
body to sneak the initialization code into.

This is a close relative of the problem that we have when using 
functionCalls in the global scope interpretations.

Which I solved via a hack that introduces an invisible wrapping 
function to do the calls for the arguments in.

However I do remember there being corner-cases which this 
approach could not solve.
It's time I look for a proper solution.

Cheers,
Stefan


More information about the Digitalmars-d mailing list