https://issues.dlang.org/show_bug.cgi?id=16098

--- Comment #8 from Walter Bright <bugzi...@digitalmars.com> ---
Increasing the alignment has some problems:

1. won't fit with the C ABI. I.e. if other functions are not following those
alignments, and you call them from D and pass a callback, the callback won't be
aligned. Or if the C functions call D functions, no alignment.

2. alignment requirements for some SIMD instructions keeps getting bigger and
bigger. Increasing the alignment for functions is not very future proof.

3. larger alignments are rare. But increasing the alignment means it is done
for every function making for a lot more stack space being used.

But, it turns out that the code in DMD to do closures is almost exactly what we
need for implementing an "aligned closure" allocated on the stack.

The code generator doesn't need to be touched.

--

Reply via email to