hasSideEffect

open override fun hasSideEffect(instruction: L2Instruction): Boolean

Answer whether the given L2Instruction (whose operation must be the receiver) changes the state of the interpreter in any way other than by writing to its destination registers. Most operations are computational and don't have side effects.

Most enum instances can override hasSideEffect if false isn't good enough, but some might need to know details of the actual L2Instruction – in which case they should override this method instead.

Return

Whether that L2Instruction has any side effect.

Parameters

instruction

The L2Instruction for which a side effect test is being performed.