Seebs said:
Probably sometimes but not always, depending on the arguments. (Consider
the case where an argument is a structure which is larger than any register.)
Why do you care? There are two possibilities:
1. You're doing compiler maintenance, and actually need to know this.
2. You don't really need to know it, and as a result, you're not going to
learn all the special cases and boundary conditions. You will mistakenly
think you know what's happening, and you will rely on that information, and
when you are wrong, you will be totally screwed because you're relying on
something which isn't true.
Or, when your first model fails, instead of being total screwed you expand your
thinking to include other scenarios that you weren't aware of before, developing
a deeper understanding.
3. You're learning to program and want to understand how things work, perhaps
knowing that different techniques are used on different implementations.
4. You're learning to program and are curious how some of the problems are
solved, perhaps how large structures are passed as parameters.
5. You find looking at solutions inspirational.
6. You want to improve the way things work and study implementations to find
weaknesses that could be improved.
7. You want to prevent security flaws and study implementations to find
weaknesses that could be exploited.
8. You do debugging and find that understanding the underlying mechanisms make
complex debugging easier.
Personally, I have learned useful information looking at the design of real-time
operating systems, the output of compilers, the run-time support for page
switching on small systems. I enjoyed the challenge of improving on existing
implementations.
Why do _you_ study system implementations?