compilers-owner@lists.iecc.com wrote:> [The calling procedure passes in pointers to the stack frames of all> of the lexically enclosing procedures, a structure known as a display.> The code to create the display at each call point is tedious but not> complex, and the techniques have been known since Algol 60, if not> longer. This used to be a standard topic in compiler texts, at least> until the academic world switched from Pascal to C. Take a look at the> x86 ENTER instruction, which is specifically designed to create stack> frames with displays. -John]

Instead of the explicit display which is usually a sequence of
registers you can use its equivalent which is the static chain of
pointers on the stack. This chain is necessary anyway because of other
implementation issues like procedure parameters.