In computer science, a calling convention is an implementation-level (low-level) scheme for how subroutines or functions receive parameters from their caller and how they return a result. When some code calls a function, design choices have been taken for where and how parameters are passed to that function, and where and how results are returned from that function, with these transfers typically done via certain registers or within a stack frame on the call stack. There are design choices for how the tasks of preparing for a function call and restoring the environment after the function has completed are divided between the caller and the callee. Some calling convention specifies the way every function should get called. The correct calling convention should be used for every function call, to allow the correct and reliable execution of the whole program using these functions.
Calling conventions are usually considered part of the application binary interface (ABI).
The names or meanings of the parameters and return values are defined in the application programming interface (API, as opposed to ABI), which is a separate though related concept to ABI and calling convention. The names of members within passed structures and objects would also be considered part of the API, and not ABI. Sometimes APIs do include keywords to specify the calling convention for functions.
Calling conventions do not typically include information on handling lifespan of dynamically-allocated structures and objects. Calling conventions are unlikely to specify the layout of items within structures and objects, such as byte ordering or structure packing. For some languages, the calling convention includes details of error or exception handling, (e.g. Go, Java) and for others, it does not (e.g. C++). For Remote procedure calls, there is an analogous concept called Marshalling.
Cette page est générée automatiquement et peut contenir des informations qui ne sont pas correctes, complètes, à jour ou pertinentes par rapport à votre recherche. Il en va de même pour toutes les autres pages de ce site. Veillez à vérifier les informations auprès des sources officielles de l'EPFL.
thumb|Démonstration d'une routine appelant une base de données dans une interface de programmation. En informatique, une interface de programmation d’application ou interface de programmation applicative, souvent désignée par le terme API pour « application programming interface », est un ensemble normalisé de classes, de méthodes, de fonctions et de constantes qui sert de façade par laquelle un logiciel offre des services à d'autres logiciels.
vignette|300px|Exemples pour une interface binaire-programme stable et instable une interface de programmation stable et instable. En informatique, une Application Binary Interface (ABI, interface binaire-programme), décrit une interface de bas niveau entre les applications et le système d'exploitation, entre une application et une bibliothèque ou bien entre différentes parties d’une application. Une ABI diffère d’une API, puisqu'une API définit une interface entre du code source et une bibliothèque, de façon à assurer que le code source fonctionnera (compilera, si applicable) sur tout système supportant cette API.
x86 assembly language is the name for the family of assembly languages which provide some level of backward compatibility with CPUs back to the Intel 8008 microprocessor, which was launched in April 1972. It is used to produce object code for the x86 class of processors. Regarded as a programming language, assembly is machine-specific and low-level. Like all assembly languages, x86 assembly uses mnemonics to represent fundamental CPU instructions, or machine code.
Students learn several implementation techniques for modern functional and object-oriented programming languages. They put some of them into practice by developing key parts of a compiler and run time