On Sunday, 16 April 2023 09:20:24 -03 Thiago Macieira via Std-Proposals wrote:
> JIT is a reliable solution for all applications, because in hardened systems
> it's completely prohibited: the system calls that would allow you to change
> a page's attributes are denied.
I meant: "JIT is unreliable for all".
By that, I mean that it works for a lot of applications, but not the totality,
even in the same system. The same hardened server may be running Node.js
applications hardened by SELinux that prohibits JIT. So the problem is not the
OS or the CPU, it's individual installations. JIT is something that
*applications* may choose to do, not libraries. C and C++ Libraries must see
JIT as an optimisation they have a graceful fail-over for, at runtime.
There are also platforms where JIT is completely impossible - libffi says m32r is one such.
I don't see how your proposal or _Wide can have a fail-over, because if they
did, they wouldn't be necessary in the first place. Therefore, DOA.
I think you misunderstand _Wide; it looks to me like it's a fat pointer, essentially passing pair<R(*)(A...), void*>.