Stack Machine

Noun · Development

Definitions

  1. A computation model (or virtual machine) where instructions operate on values at the top of an implicit stack rather than named registers. Operands are pushed, operations pop their inputs and push results. The JVM, CPython, WebAssembly, and the Forth language all use stack-based execution, which produces compact bytecode at the cost of more memory traffic compared to register machines.

    In plain English: A type of computer or virtual machine where all operations work by pushing and popping values from a stack, like a stack of plates.

    Example: "The JVM is a stack machine — `iadd` pops two ints off the operand stack and pushes their sum."

Related Terms