C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Function Pointer from Lambda with Captures

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sun, 16 Apr 2023 11:58:44 -0300
On Sunday, 16 April 2023 09:50:09 -03 Edward Catmur wrote:
> There are also platforms where JIT is completely impossible - libffi says
> m32r is one such.

Sure, any Harvard Architecture machine, as well as hybrid ones where code must
be ROM. I didn't go to those because one could argue whether C++ is relevant
for them in the first place; instead, I wanted to show that this solution
wouldn't work for Linux/x86-64.

> > 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*>.

Kinda. I only skimmed through the paper, but it's more than just a struct with
two pointers. It does have that, but it also talks about the "static chain
register", which is a feature that I don't think should even be looked at. The
fact that it is attempting to solve that thing in the first place is a
misguided idea, IMO.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-04-16 14:58:47