search for: thunkidtofuncptr

Displaying 1 result from an estimated 1 matches for "thunkidtofuncptr".

2014 Nov 29
3
[LLVMdev] Frontend: How to use Member to Function Pointer as callbacks
...also not have to embed/use LLVM at runtime, just like a plain C/C++ executable). One (rather complicated) option I was thinking is: - Define a maximum number of those callback alive (let's say 4096) -- it's not per function signature, but global - Define i8* thunkTargets[4096] - Define i8* ThunkIdToFuncPtr[4096] - Define 4096 funcs (not even sure how to do that with LLVM, might need to emit assembly?) Thunk0: jmp thunkTargets[0]; Thunk1: jmp thunkTargets[1]; ... Thunk4095: jmp thunkTargets[4095]; - When I call a C function from C# with a callback, what happens is: - Find an unused...