All you need to know about calling conventions in programming
jjinux.blogspot.com
All you need to know about calling conventions in programming
1–7 of 7 posts
Re: All you need to know about calling conventions in programming
#2http://repository.readscheme.org/ftp/papers/ai-lab-pubs/AIM-...
Re: All you need to know about calling conventions in programming
#3Re: All you need to know about calling conventions in programming
#4Re: All you need to know about calling conventions in programming
#5Tail-call optimization makes function calls more expressive. THAT's why they matter.
Any complaining that they lose debugging info strikes me as a bit weird. So do for / while loops, and leaf calls in procedures. So what? If you need logging, add logging.
Re: All you need to know about calling conventions in programming
#6As a grad student, in the dark days of the mid-90s we found a obscure and nasty hole in the MIPS calling conventions as they existed then, where IIRC you could actually lose a floating point parameter when making a variadic call.
It required a particular combination of not having ANSI headers and using a float vs. double in just the wrong place, and was more of a theoretical curiosity (again, if I remember correctly, you needed to be the float or double as the first arg to a variadic function, which is unlikely, as typically variadic functions take structs or pointers telling them what they'll be doing as their first arg).
Shortly after Bailey and Davidson published a paper that found the one we found, and a bunch of others, although these also included a lot of implementation flaws that weren't inherently holes in the convention per se:
Re: All you need to know about calling conventions in programming
#7The first comment is right though that he missed much of the nuances of C calling conventions, which I first thought this article was about. Still, it's much more interesting the way it turned out, a very good introduction to many interesting techniques that I wasn't aware of (and of which I'm not convinced of their usefulness, but still...)