Following what's been suggested on IRC libera.chat #mesonbuild,
this is so that the -march=generic+crc option only applies to
the code it should apply to and not to the entire code base.
It's only available when users define WRENPP_WITH_NAME_GUESSING
and it automatically retrieves the class name of T using
new code in guess_class_name.hpp. Only tested on gcc so far.
Microsoft compiler doesn't seem to understand consteval keyword.
Wren expects this function to return a pointer to a function
that takes a WrenVM*. This is bad news because that type is
wrapped inside wren::VM and client code doesn't know about it.
It would be better for client code to return a pointer to a
function that takes a VM* instead. In order to do the VM* to
WrenVM* translation I make a "handmade" closure, that is I
generate a function at runtime that contains the VM* hardcoded
into it. The same function also contains the hardcoded
address of the callback function client code wanted to use.
By doing this I can pass a different function pointer to Wren
for each foreign method, and that function knows how to forward
the call to the real client callback.
Currently only implemented for amd64 gnu/linux.