Skip to main content

Questions tagged [calling-conventions]

Calling conventions are specifications for how arguments are passed, other data preserved, and operations identified when calling a function in compiled machine- or byte-code. Use this tag for questions about choosing or designing a calling convention. Do not use it for questions about function call syntax within a language, unless that is exposing an underlying calling convention.

Filter by
Sorted by
Tagged with
4 votes
2 answers
447 views

In languages with well defined object lifetimes the destructors of by-value parameters have to be called at some point. This can be the responsibility of the caller or of the callee. GCC and Clang ...
chrysante's user avatar
  • 848
15 votes
6 answers
7k views

I'm reading Appel's book Modern Compiler Implementation in C. I just read the following statement in chapter 6, and I wonder if it is accurate. It says that on modern machines, the calling conventions ...
Rob N's user avatar
  • 1,195
13 votes
0 answers
352 views

In Guy Steele’s famous paper Debunking the “expensive procedure call” myth or, procedure call implementations considered harmful or, LAMBDA: The Ultimate GOTO, he describes the poor performance of ...
Alexis King's user avatar
  • 12.8k
17 votes
2 answers
2k views

This is more a question about compiler design than language design, but in low level languages, when a function is called, the parameters are pushed onto the stack, and when the function returns, the ...
CPlus's user avatar
  • 10.5k
9 votes
6 answers
2k views

In C, calling a variadic functions are 'special' and not to be treated as regular functions or vice versa. Calling a variadic function through a regular function pointer, or vice-versa invokes ...
CPlus's user avatar
  • 10.5k
10 votes
5 answers
2k views

In original implementations of the B language, the caller was responsible for saving and restoring any registers it cares about before calling a function. But in the C language, the called function is ...
Ray Butterworth's user avatar
13 votes
2 answers
1k views

The LLVM-IR Reference Manual's section on Calling Conventions lists as many as 15 supported calling conventions. These vary in ways including whether they support tail call optimization, how many and ...
rydwolf's user avatar
  • 4,870