
186 An Introduction to Compiler Construction in a Java World
The dup duplicates the r-value for y on top of the stack so there are two copies. Each of the
istore operations pops a value and stores it in the appropriate variable.
In parsing, when an expression is used as a statement, Parser’s statementExpression
() method sets a flag isStatementExpression in the expression node to true. The code
generation phase can make use of this flag in deciding when code must be produced for
duplicating r-values on the run-time stack.
Additional Assignment-Like Operations
The most important property of the assignment is its side effect. One uses the assignment
operation ...