This article describes the calling conventions with respect to js-ctypes while programming x86 and x86-64/x64/AMD64 architectures. A calling convention is an implementation-level (low-level) scheme regarding how subroutines receive parameters from their caller and how they revert.
ABI stands for "Application Binary Interface".
Details with Respect to js-ctypes
This explains how to use it in the js-ctypes scope.
Three different ABIs exist:
cdecl; standard libraries use this ABI. You can also use this for various system calls,including those on Mac OS X and Linux.
More information is available at Bugzilla :: 552533.
Used for calling functions declared with
stdcall on Windows. These functions' names are automatically mangled for you by js-ctypes.
Used for calling Windows system functions. These are declared as
stdcall on Windows, but do not have mangled names like those used by
WIN32 and OS2
Callbacks in js-ctypes under these opearting systems use a different ABI then declare regular functions.
If you just use any of the three ABI's ctypes.default_abi/ctypes.winapi_abi/ctypes.stdcall_abi everywhere, since Firefox XX, js-ctypes will implicity convert it to what it should be https://dxr.mozilla.org/mozilla-central/source/js/src/ctypes/CTypes.cpp#6091
All other operating systems, including 64-bit Windows (WIN64), use
ctypes.default_abi as it's calling convention for all things, callbacks and function declaration.
Returns the string "ctypes.***_abi".
Returns a string identifying the ABI.
A string identifying the ABI.