Stack Machine とは?
stack machine は、命令が名前付きレジスタを参照する代わりに、オペランドをオペランドスタックから取り、結果をそこに push する実行モデルです。たとえば add は 2 つの値を pop し、その和を push します。多くの bytecode の virtual machine は、命令が単純でコンパクトなためこのモデルを使います。
なぜ重要か
スタックベースの設計は命令を小さく生成しやすく保ち、可搬な bytecode に適します。これを理解すると、多くの virtual machine が式をどう評価するかが明確になります。
関連ガイド
What Is a Register Machine?A register machine is an execution model whose instructions read and write a set of named registers instead o…
What Is Bytecode?Bytecode is a compact, platform-independent instruction set produced by a compiler and executed by a virtual…
What Is Three-Address Code?Three-address code is an intermediate representation where each instruction has at most three operands, typic…