Architecture of Stack Machines

Publisher Summary This chapter discusses the use of stack structures in the architecture of computers. The stack or “last in-first out” data structure has been used by systems programmers, especially for the implementation of compilers and interpreters. Although the stack has become an essential tool for constructing overall computer systems, most computers do not have an architecture that has been built to accommodate the stack. When computer architecture is altered to include or facilitate some software device, it is a sign that the device has been accepted as an essential feature of the computer system. In the case of the stack it is not only stack structures that have been accepted but also tree structures. Stacks and trees are closely associated; a stack might be used as an aid when traversing a tree or to hold information belonging to the nodes of the tree. The emergence of stacks as hardware devices implies the recognition of the tree-structured nature of algorithms and data. The chapter discusses different uses made of stacks and how these uses interrelate; these include the use of stacks for the evaluation of expressions, for subroutine linkage, for block-structured storage allocation, and as an execution record of a task.