Top Fields Constructors Methods
org.jruby.ir.representations

public Class BasicBlock

extends Object
implements ExplicitVertexID, Comparable<BasicBlock>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable, org.jruby.dirgra.ExplicitVertexID
Imports
org.jruby.RubyInstanceConfig, org.jruby.dirgra.Edge, .ExplicitVertexID, org.jruby.ir.IRManager, org.jruby.ir.instructions.CallBase, .CopyInstr, .Instr, .JumpInstr, .NonlocalReturnInstr, .Site, .YieldInstr, org.jruby.ir.listeners.InstructionsListener, .InstructionsListenerDecorator, org.jruby.ir.operands.Label, org.jruby.ir.runtime.IRRuntimeHelpers, org.jruby.ir.transformations.inlining.CloneInfo, .InlineCloneInfo, .SimpleCloneInfo, java.util.ArrayList, .Collection, .List

Field Summary

Modifier and TypeField and Description
private final CFG
private final int
private List<Instr>
private boolean
private Label

Constructor Summary

AccessConstructor and Description
public
BasicBlock(CFG cfg, Label label)

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
public BasicBlock
clone(CloneInfo info, CFG newCFG)

public BasicBlock
public void
public int
compareTo(final BasicBlock
the object to be compared.
other
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public BasicBlock

Returns:

BB of exception handling or null if none.
exceptionBB
()

On an exception occurring in this block which BB should we go to?

public int
public List<Instr>
public Label
public Instr
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

private void
public void
public void
insertInstr(int index, Instr i)

public boolean
public boolean
public boolean
public boolean
public void
public boolean
public void
public Site

Returns:

the Site instance (CallBase or YieldInstr)
siteOf
(long
to be found
callsiteId
)

What site object contains this callsiteId or die trying.

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

public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

cfgback to summary
private final CFG cfg
idback to summary
private final int id
instrsback to summary
private List<Instr> instrs
isRescueEntryback to summary
private boolean isRescueEntry
labelback to summary
private Label label

Constructor Detail

BasicBlockback to summary
public BasicBlock(CFG cfg, Label label)

Method Detail

addInstrback to summary
public void addInstr(Instr i)
canRaiseExceptionsback to summary
public boolean canRaiseExceptions()
cloneback to summary
public BasicBlock clone(CloneInfo info, CFG newCFG)
cloneForInliningback to summary
public BasicBlock cloneForInlining(InlineCloneInfo ii)
cloneInstrsback to summary
public void cloneInstrs(SimpleCloneInfo ii)
compareToback to summary
public int compareTo(final BasicBlock other)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
other:BasicBlock

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
exceptionBBback to summary
public BasicBlock exceptionBB()

On an exception occurring in this block which BB should we go to?

Returns:BasicBlock

BB of exception handling or null if none.

getIDback to summary
public int getID()

Implements org.jruby.dirgra.ExplicitVertexID.getID.

Annotations
@Override
getInstrsback to summary
public List<Instr> getInstrs()
getLabelback to summary
public Label getLabel()
getLastInstrback to summary
public Instr getLastInstr()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
initInstrsback to summary
private void initInstrs()
insertInstrback to summary
public void insertInstr(Instr i)
insertInstrback to summary
public void insertInstr(int index, Instr i)
isEmptyback to summary
public boolean isEmpty()
isEntryBBback to summary
public boolean isEntryBB()
isExitBBback to summary
public boolean isExitBB()
isRescueEntryback to summary
public boolean isRescueEntry()
markRescueEntryBBback to summary
public void markRescueEntryBB()
removeInstrback to summary
public boolean removeInstr(Instr i)
replaceInstrsback to summary
public void replaceInstrs(List<Instr> instrs)
siteOfback to summary
public Site siteOf(long callsiteId)

What site object contains this callsiteId or die trying.

Parameters
callsiteId:long

to be found

Returns:Site

the Site instance (CallBase or YieldInstr)

splitAtInstructionback to summary
public BasicBlock splitAtInstruction(Site splitPoint, Label newLabel, boolean includeSplitPointInstr)
swallowBBback to summary
public void swallowBB(BasicBlock foodBB)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
toStringInstrsback to summary
public String toStringInstrs()