This representation for environments is particularly advantageous because the enviroment stack can be implemented as an elaboration of the control stack included in the architecture of a modern computer to support procedure calls. Algol-like languges are almost always compiled to machine code instead of interpreted like LC and Jam . Nevertheless, during program execution, the compiled machine code must perform all of the same operations on program data structures as interpreted code. The major difference between the two approaches is that a compiler typically has the opportunity to perform far more program analysis enabling it to precompute quantities that are computed by an interpreter during program exeuction. Almost all modern computers provide a control stack to store the return addresses of procedure calls.
Some machines also pass argument values to procedures in the stack.
The argument values are pushed on the stack along with the return address and the saved context information. The result returned by a procedure is typically returned in a register because the stack frame associated with the call is deallocated on return. The length of this list is simply the lexical nesting level of the body of the let form or lambda application being evaluated. In Algol-like languages, the only closures are functions that are passed as arguments to other functions. These closures are represented by a pair of pointers.