Klasse InstructionSelect

Alle implementierten Schnittstellen:
Serializable, Cloneable, Constants, InstructionTargeter
Bekannte direkte Unterklassen:
LOOKUPSWITCH, TABLESWITCH

public abstract class InstructionSelect extends InstructionBranch
Select - Abstract super class for LOOKUPSWITCH and TABLESWITCH instructions.
Version:
$Id: InstructionSelect.java,v 1.4 2009/10/05 17:35:36 aclement Exp $
Autor:
M. Dahm
Siehe auch:
  • Felddetails

    • match

      protected int[] match
    • indices

      protected int[] indices
    • targets

      protected InstructionHandle[] targets
    • fixedLength

      protected int fixedLength
    • matchLength

      protected int matchLength
    • padding

      protected int padding
    • length

      protected short length
  • Konstruktordetails

  • Methodendetails

    • getTargetOffset

      protected int getTargetOffset(InstructionHandle target)
    • updatePosition

      protected int updatePosition(int offset, int max_offset)
      Since this is a variable length instruction, it may shift the following instructions which then need to update their position. Called by InstructionList.setPositions when setting the position for every instruction. In the presence of variable length instructions `setPositions' performs multiple passes over the instruction list to calculate the correct (byte) positions and offsets by calling this function.
      Setzt außer Kraft:
      updatePosition in Klasse InstructionBranch
      Parameter:
      offset - additional offset caused by preceding (variable length) instructions
      max_offset - the maximum offset that may be caused by these instructions
      Gibt zurück:
      additional offset caused by possible change of this instruction's length
    • dump

      public void dump(DataOutputStream out) throws IOException
      Dump instruction as byte code to stream out.
      Setzt außer Kraft:
      dump in Klasse InstructionBranch
      Parameter:
      out - Output stream
      Löst aus:
      IOException
    • toString

      public String toString(boolean verbose)
      Beschreibung aus Klasse kopiert: InstructionBranch
      Long output format:
      Setzt außer Kraft:
      toString in Klasse InstructionBranch
      Parameter:
      verbose - long/short format switch
      Gibt zurück:
      mnemonic for instruction
    • setTarget

      public void setTarget(int i, InstructionHandle target)
      Set branch target for `i'th case
    • updateTarget

      public void updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)
      Beschreibung aus Klasse kopiert: InstructionBranch
      Update the target destination for this instruction. If an oldHandle is provided it is checked to verify that is where the target currently points to before changing it.
      Angegeben von:
      updateTarget in Schnittstelle InstructionTargeter
      Setzt außer Kraft:
      updateTarget in Klasse InstructionBranch
      Parameter:
      old_ih - old target
      new_ih - new target
    • containsTarget

      public boolean containsTarget(InstructionHandle ih)
      Angegeben von:
      containsTarget in Schnittstelle InstructionTargeter
      Setzt außer Kraft:
      containsTarget in Klasse InstructionBranch
      Gibt zurück:
      true, if ih is target of this instruction
    • getMatchs

      public int[] getMatchs()
      Gibt zurück:
      array of match indices
    • getIndices

      public int[] getIndices()
      Gibt zurück:
      array of match target offsets
    • equals

      public boolean equals(Object other)
      Beschreibung aus Klasse kopiert: InstructionBranch
      Only equal if they are the same branch instruction - otherwise too risky as the targets may only temporarily be pointing at the same destination.
      Setzt außer Kraft:
      equals in Klasse InstructionBranch
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse InstructionBranch
    • getTargets

      public InstructionHandle[] getTargets()
      Gibt zurück:
      array of match targets
    • getLength

      public int getLength()
      Setzt außer Kraft:
      getLength in Klasse Instruction