Live data from Hacker News

C++ Language Interface Foundation (CLIF)

github.com

71–72 of 72 posts

Re: C++ Language Interface Foundation (CLIF)

#71
post #69

Earlier quoted context omitted.

there are no trampoline slots required. it's a function pointer that's provided as an argument (user data). Can you point to an FFI that doesn't support callbacks in this way? This would be a major problen in the FFI implementation.

LuaJIT limits both the number of registered callbacks [1], and re-entering the interpreter from a JIT'd callback [2] (it will try to detect and prevent JIT for such functions, but if that fails you get a panic). [1] http://stackoverflow.com/questions/31042530/why-does-luajit-... [2] http://stackoverflow.com/questions/25924755/c-and-lua-unprot...

that's a limitation of a specific FFI, which is apparently a deisgn choice motivated by limited memory systems.

Re: C++ Language Interface Foundation (CLIF)

#72
post #71

Earlier quoted context omitted.

LuaJIT limits both the number of registered callbacks [1], and re-entering the interpreter from a JIT'd callback [2] (it will try to detect and prevent JIT for such functions, but if that fails you get a panic). [1] http://stackoverflow.com/questions/31042530/why-does-luajit-... [2] http://stackoverflow.com/questions/25924755/c-and-lua-unprot...

that's a limitation of a specific FFI, which is apparently a deisgn choice motivated by limited memory systems.

Yes, sorry - I'm simply speaking as an user of a given language runtime connecting to "C" exported functions. I understand that given a different implementation this would've not be needed.
Post reply on HN