Class BasicBlock

java.lang.Object
org.jruby.ir.representations.BasicBlock
All Implemented Interfaces:
Comparable<BasicBlock>, org.jruby.dirgra.ExplicitVertexID

public class BasicBlock extends Object implements org.jruby.dirgra.ExplicitVertexID, Comparable<BasicBlock>
  • Constructor Details

    • BasicBlock

      public BasicBlock(CFG cfg, Label label)
  • Method Details

    • getID

      public int getID()
      Specified by:
      getID in interface org.jruby.dirgra.ExplicitVertexID
    • getLabel

      public Label getLabel()
    • hashCode

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

      public boolean canRaiseExceptions()
    • exceptionBB

      public BasicBlock exceptionBB()
      On an exception occurring in this block which BB should we go to?
      Returns:
      BB of exception handling or null if none.
    • isEntryBB

      public boolean isEntryBB()
    • isExitBB

      public boolean isExitBB()
    • markRescueEntryBB

      public void markRescueEntryBB()
    • isRescueEntry

      public boolean isRescueEntry()
    • replaceInstrs

      public void replaceInstrs(List<Instr> instrs)
    • addInstr

      public void addInstr(Instr i)
    • insertInstr

      public void insertInstr(Instr i)
    • insertInstr

      public void insertInstr(int index, Instr i)
    • getInstrs

      public List<Instr> getInstrs()
    • getLastInstr

      public Instr getLastInstr()
    • removeInstr

      public boolean removeInstr(Instr i)
    • isEmpty

      public boolean isEmpty()
    • siteOf

      public Site siteOf(long callsiteId)
      What site object contains this callsiteId or die trying.
      Parameters:
      callsiteId - to be found
      Returns:
      the Site instance (CallBase or YieldInstr)
    • splitAtInstruction

      public BasicBlock splitAtInstruction(Site splitPoint, Label newLabel, boolean includeSplitPointInstr)
    • swallowBB

      public void swallowBB(BasicBlock foodBB)
    • clone

      public BasicBlock clone(CloneInfo info, CFG newCFG)
    • cloneInstrs

      public void cloneInstrs(SimpleCloneInfo ii)
    • cloneForInlining

      public BasicBlock cloneForInlining(InlineCloneInfo ii)
    • compareTo

      public int compareTo(BasicBlock other)
      Specified by:
      compareTo in interface Comparable<BasicBlock>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringInstrs

      public String toStringInstrs()