oracle.toplink.libraries.asm.tree.analysis
Interface Interpreter

A semantic bytecode interpreter. More precisely, this interpreter only
manages the computation of values from other values: it does not manage the
transfer of values to or from the stack, and to or from the local variables.
This separation allows a generic bytecode Analyzer to work with
various semantic interpreters, without needing to duplicate the code to
simulate the transfer of values.

copyOperation

Interprets a bytecode instruction that moves a value on the stack or to or
from local variables. This method is called for the following opcodes:
ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE,
DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2,
SWAP

Parameters:

insn - the bytecode instruction to be interpreted.

value - the value that must be moved by the instruction.

Returns:

the result of the interpretation of the given instruction. The
returned value must be equal to the given
value.

merge

Merges two values. The merge operation must return a value that represents
both values (for instance, if the two values are two types, the merged
value must be a common super type of the two types. If the two values are
integer intervals, the merged value must be an interval that contains the
previous ones. Likewise for other types of values).

Parameters:

v - a value.

w - another value.

Returns:

the merged value. If the merged value is equal to v, this
method must return v.