Class DupInstruction

java.lang.Object
com.ibm.wala.shrike.shrikeBT.Instruction
com.ibm.wala.shrike.shrikeBT.DupInstruction
All Implemented Interfaces:
Constants, IInstruction, Cloneable

public final class DupInstruction extends Instruction
This class represents dup instructions. There are two kinds of dup instructions, dup and dup_x1:

dup: a::rest => a::a::rest dup_x1: a::b::rest => a::b::a::rest

  • Method Details

    • make

      public static DupInstruction make(int delta)
      Parameters:
      delta - 0 for dup, 1 for dup_x1
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getSize

      public int getSize()
    • getDelta

      public int getDelta()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getPoppedCount

      public int getPoppedCount()
      Specified by:
      getPoppedCount in interface IInstruction
      Overrides:
      getPoppedCount in class Instruction
      Returns:
      the number of values this instruction pops off the working stack
    • toString

      public String toString()
      Description copied from class: Instruction
      Subclasses must implement toString.
      Specified by:
      toString in interface IInstruction
      Specified by:
      toString in class Instruction
    • visit

      public void visit(IInstruction.Visitor v)
      Description copied from class: Instruction
      Apply a Visitor to this instruction. We invoke the appropriate Visitor method according to the type of this instruction.
      Specified by:
      visit in interface IInstruction
      Specified by:
      visit in class Instruction
    • isPEI

      public boolean isPEI()
      Description copied from interface: IInstruction
      PEI == "Potentially excepting instruction"
      Returns:
      true iff this instruction might throw an exception