Overview of Compiling to Stack Machine

Our goal in this lecture is to understand compilation from abstract syntax trees to stack machine code

Examples of this:

Source: Java (subset) abstract syntax tree

Target: file containing sequence of instructions for Java Virtual Machine (we will see it in sequel)

  • invoked by using the 'java' command
  • can inspect it using 'javap -c'