Class AbstractJitVal

java.lang.Object
ghidra.pcode.emu.jit.var.AbstractJitVal
All Implemented Interfaces:
JitVal
Direct Known Subclasses:
AbstractJitVar, JitConstVal

public abstract class AbstractJitVal extends Object implements JitVal
An abstract implementation of JitVal.
  • Field Details

  • Constructor Details

    • AbstractJitVal

      public AbstractJitVal(int size)
      Construct a value of the given size.
      Parameters:
      size - the size in bytes
  • Method Details

    • size

      public int size()
      Description copied from interface: JitVal
      The size in bytes.
      Specified by:
      size in interface JitVal
      Returns:
      the size
    • uses

      public List<JitVal.ValUse> uses()
      Description copied from interface: JitVal
      The list of uses.
      Specified by:
      uses in interface JitVal
      Returns:
      the uses
    • addUse

      public void addUse(JitOp op, int position)
      Description copied from interface: JitVal
      Add a use.

      In most cases, uses should be final, once this value node has been entered into the use-def graph. An exception deals with phi nodes, as this analysis occurs after each intra-block portion of the graph has been constructed. During inter-block analysis, additional uses will get recorded. Even further uses may be recorded uding op-use analysis, since it may generate more phi nodes.

      Specified by:
      addUse in interface JitVal
      Parameters:
      op - the operator node using this one
      position - the position of this value in the operator's input operands
    • removeUse

      public void removeUse(JitOp op, int position)
      Description copied from interface: JitVal
      Remove a use.
      Specified by:
      removeUse in interface JitVal
      Parameters:
      op - as in JitVal.addUse(JitOp, int)
      position - as in JitVal.addUse(JitOp, int)
      See Also: