lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 26/01/11 14:51, Mike Pall wrote:
> The LuaJIT interpreter employs an assembler helper to call
> C functions via the FFI. It remembers the stack pointer before the
> call and simply restores it after the call. This allows calling
> both __cdecl and __stdcall functions from the same code.

Yes, of course --- obvious in hindsight. I initially thought you were
doing it by code inspection. (I was also rather hoping you'd have a
cunning way of detecting fastcall. I hate x86.)

┌─── ───── ─────
│ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ }
│ --- Conway's Game Of Life, in one line of APL

Attachment: signature.asc
Description: OpenPGP digital signature