VM II Discussion
-
When a function is called, how are arguments passed? At least two parts of VM code share the responsibility. Illustrate your explanation using a specific example.
-
Suppose that a function
kencalls a functionbar. After the functionbarfinishes, execution needs to return to the place inkenthat called it.- What does the caller (
ken) do to make it possible for control to go to the call site afterbarfinishes? - What does the callee (
bar) do in order to get the execution to continue inken? Do not include any extraneous details! Just stick with the basics. - Why is this necessary? Why not take the code that needs to
happen next and just put it after the assembly for the function
bar?
- What does the caller (