Chapter 6: Runtime System

Displays

. Faster access to non locals
. Uses an array of pointers to activation records
. Non locals at depth i is in the activation record pointed to by d[i]
 
 
 

Faster access to non locals than with access links can be obtained using an array d of pointers to activation records, called a display. We maintain display so that storage for a non local a at nesting depth i is in the activation record pointed to by display element d[i].

The display changes when a new activation occurs, and it must be reset when control returns from the new activation. When a new activation record for a procedure at nesting depth i is set up, we first save the value of d[i] in the new activation record and then set d[i] to point to the new activation record. Just before an activation ends , d[i] is reset to the saved value.