Concepts of Programming Languages Chapter 10 – Implementing Subprograms – Review

What is the definition used in this chapter for simple subprogram?

The subprograms cannot be nested and all local variables are statics.

Does the caller or callee save execution status information?

The caller

What is the difference between the activation record and an activation record instance?

Activation record : the data it describes are relevant only during the activation, or the execution of the subprogram. Activation record instance: a concrete example of an activation record, a collection of data in the form of an activation record.

What is an EP and what is its purpose?

EP points at the base, or the first address of the activation record instance of the main program. EP is used to access parameters and local variables during the execution of subprograms

Explain the two method of implementing blocks.

1. Using the static-chain process: blocks are treated as parameterless subprograms that are always called from the same place in the program.

2. Using different and somewhat simpler and more efficient way: the maximum amount of storage required for block variables at any time during the execution of a program can be statistically determined, because blocks are entered and exited in strictly textual order.