Recall that some languages allow nested functions and allow a nested function to access the variables that are declared in enclosing functions. Recall also that there are two approaches to implementing run-time access to non-local variables in that case: using access links or using a display.
Below is a link to a file that contains a partially filled-in table. Complete the table so that each row of the table shows three consistent pictures (one in each column).
The picture in the first column shows the nesting structure of a program with its call statements (a different program for each row).
The picture in the second column shows the stack at a moment during the execution of that program, assuming that access links are used (only the access-link fields of the Activation Records are shown).
The picture in the third column shows the stack at the same moment, assuming that a display is used (only the save-display fields of the Activation Records are shown).
The first row has been completed as an example.
Last Updated: 4/9/2024 © 2024 CS 536