class SyntaxTree::YARV::Instruction

convenience methods for working with instructions.
This is a base class for all YARV instructions. It provides a few

def branch_targets

This returns an array of labels.
def branch_targets
  []
end

def canonical

a specialized instruction, then this method returns `self`.
(non-specialized) form of this instruction. If this instruction is not
This method creates an instruction that represents the canonical
def canonical
  self
end

def falls_through?

its branching fails.
Whether or not this instruction falls through to the next instruction if
def falls_through?
  false
end

def leaves?

Whether or not this instruction leaves the current frame.
def leaves?
  false
end

def length

number of operands.
it occupies in the instruction sequence. Effectively this is 1 plus the
This returns the size of the instruction in terms of the number of slots
def length
  1
end

def pops

This returns the number of values that are popped off the stack.
def pops
  0
end

def pushes

This returns the number of values that are pushed onto the stack.
def pushes
  0
end

def side_effects?

every instruction is marked as having side effects.
side-effect, as do some special-case instructions like Leave. By default
Does the instruction have side effects? Control-flow counts as a
def side_effects?
  true
end