And what would be the benefit of changing those particular sementics ?
In french we define such article as "fucking a fly".
Managing memory and raw pointers are nothing. Try implementing a recursive function call in x86 assembler to get a real idea of low level.
Isn't that pretty easy? Recursion is just a function calling itself, directly or indirectly.
Here's the simplest possible recursive function in x86 assembler. It simply causes a stack overflow.
recursion:
call recursion
That's it.Tail recursive version would be simply a jump:
recursion:
jmp recursion
Here's the simplest terminating version I could think of: recursion:
dec eax
jz rec_exit
call recursion
rec_exit:
retYou’ll need to manually push that all onto the stack with each call. There’s no compiler to do all that work for you.
A call is a function as long as caller and callee agree on the calling convention. Non-exported functions don't necessarily need to adhere to platform ABI.
Generally you only push registers on stack when you need to modify more variables than what fit in your calling convention "thrashable" register set, or when you save register contents to call other function, or to push function call parameters on the stack.
I do embedded systems & low level drivers as my dayjob. Not a stranger to writing assembler routines.