ldc icon indicating copy to clipboard operation
ldc copied to clipboard

Add --template-codegen-depth to stop very deep template instantiations.

Open JohanEngelen opened this issue 1 year ago • 2 comments

We've had this at Weka for a long time. It is an escape hatch in case very very deep template instantiation leads to stack exhaustion in the recursive needsCodegen function.

JohanEngelen avatar Apr 29 '24 19:04 JohanEngelen

Is this hack still required at Weka? The needsCodegen() stack pressure should have been improved significantly for a while now, in https://github.com/dlang/dmd/pull/14787.

kinke avatar Apr 29 '24 20:04 kinke

I'll check whether it is needed with newer compilers (weka is currently still at 1.30)

JohanEngelen avatar Apr 29 '24 20:04 JohanEngelen