Reading Exercise #3
Due 8:00 AM, Monday Jan. 25, 2015
Content of reading exercise #3
- Explain how can we be sure that a subroutines lexically surrounding routine is active even if the subroutine was not called directly by the surrounding routine.
- During a subroutine call and execution, which tasks are handled by the caller and which are handled by the callee? Why do you think these tasks are divided in this way?
- In the calling conventions for MIPS and x86 processors, what kinds of things are typically stored in caller-saves and callee-saves registers?
- Compare and contrast the differences in the RISC and CISC calling conventions. What do you think the reasons are for these differences?
- How does in-line expansion work and what are its advantages/disadvantages?
- Explain how the call-by-reference, call-by-value, call-by-value/result, and call-by-sharing work. Why might each of these conventions be used?
- When and why is it necessary to pass a closure as a parameter?
- What are the three types of operations that exception handlers tend to perform?
- How do exception handlers in imperative and functional languages differ?