Jump to content

Stack-based

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by PierreAbbat (talk | contribs) at 23:53, 17 September 2002 (PostScript). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Stack-based is a term referring to a system being based on the use of stacks, in contrast to being register based.

The Forth language uses two stacks, one for argument passing and one for subroutine return addresses. The use of a return stack is extremely commonplace, but the somewhat unusual use of an argument stack for a human-readable programming language is the reason Forth is referred to as a stack-based language.

PostScript has a return stack and an operand stack, as does Forth, and also has a graphics state stack and a dictionary stack.

Many Virtual Machines are stack-based, such as the Java virtual machine and the Python virtual machine.