Top Fields Constructors Methods
org.jruby.ir.dataflow.analyses

public Class LiveVariableNode

extends FlowGraphNode<LiveVariablesProblem, LiveVariableNode>
Class Inheritance
Imports
org.jruby.dirgra.Edge, org.jruby.ir.dataflow.FlowGraphNode, org.jruby.ir.instructions.ClosureAcceptingInstr, .Instr, .ResultInstr, org.jruby.ir.operands.LocalVariable, .Operand, .Variable, .WrappedIRClosure, org.jruby.ir.representations.BasicBlock, java.util.*

Field Summary

Modifier and TypeField and Description
private BitSet
private BitSet
private BitSet
private int
Inherited from org.jruby.ir.dataflow.FlowGraphNode:
basicBlockproblem

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
public void
applyPreMeetHandler()

Implements abstract org.jruby.ir.dataflow.FlowGraphNode.applyPreMeetHandler.

Initialize this data flow node to compute the new solution This is done before iteratively calling the MEET operator.

public void
applyTransferFunction(Instr i)

Implements abstract org.jruby.ir.dataflow.FlowGraphNode.applyTransferFunction.

Apply transfer function to the instruction

public void
buildDataFlowVars(Instr i)

Implements abstract org.jruby.ir.dataflow.FlowGraphNode.buildDataFlowVars.

Builds the data-flow variables (or facts) for a particular instruction.

public void
compute_MEET(Edge<T extends ExplicitVertexID, U> e, LiveVariableNode pred)

Implements abstract org.jruby.ir.dataflow.FlowGraphNode.compute_MEET.

"MEET" current solution of "IN/OUT" with "OUT/IN(pred)", where "pred" is a predecessor of the current node!

public void
finalizeSolution()

Overrides org.jruby.ir.dataflow.FlowGraphNode.finalizeSolution.

Any required cleanup of state after applying transfer function

pack-priv BitSet
pack-priv BitSet
public void
init()

Overrides org.jruby.ir.dataflow.FlowGraphNode.init.

Initialize this data flow node for solving the current problem This is done after building dataflow variables for the problem.

public void
initSolution()

Overrides org.jruby.ir.dataflow.FlowGraphNode.initSolution.

Any setting up of state/initialization before applying transfer function

private void
makeOutExceptionVariablesLiving()

Collect variables live out of the exception target node.

private void
pack-priv void
private void
public boolean
solutionChanged()

Implements abstract org.jruby.ir.dataflow.FlowGraphNode.solutionChanged.

Did dataflow solution for this node change from last time?

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.jruby.ir.dataflow.FlowGraphNode:
buildDataFlowVarscomputeDataFlowInfocomputeDataFlowInfoBackwardcomputeDataFlowInfoForwardgetBBgetCFGgetExceptionTargetNodehasExceptionsRescued

Field Detail

inback to summary
private BitSet in
livingback to summary
private BitSet living
outback to summary
private BitSet out
setSizeback to summary
private int setSize

Constructor Detail

LiveVariableNodeback to summary
public LiveVariableNode(LiveVariablesProblem prob, BasicBlock n)

Method Detail

addDFVarback to summary
private void addDFVar(Variable v)
applyPreMeetHandlerback to summary
public void applyPreMeetHandler()

Implements abstract org.jruby.ir.dataflow.FlowGraphNode.applyPreMeetHandler.

Doc from org.jruby.ir.dataflow.FlowGraphNode.applyPreMeetHandler.

Initialize this data flow node to compute the new solution This is done before iteratively calling the MEET operator.

Annotations
@Override
applyTransferFunctionback to summary
public void applyTransferFunction(Instr i)

Implements abstract org.jruby.ir.dataflow.FlowGraphNode.applyTransferFunction.

Doc from org.jruby.ir.dataflow.FlowGraphNode.applyTransferFunction.

Apply transfer function to the instruction

Annotations
@Override
buildDataFlowVarsback to summary
public void buildDataFlowVars(Instr i)

Implements abstract org.jruby.ir.dataflow.FlowGraphNode.buildDataFlowVars.

Doc from org.jruby.ir.dataflow.FlowGraphNode.buildDataFlowVars.

Builds the data-flow variables (or facts) for a particular instruction.

Annotations
@Override
compute_MEETback to summary
public void compute_MEET(Edge<T extends ExplicitVertexID, U> e, LiveVariableNode pred)

Implements abstract org.jruby.ir.dataflow.FlowGraphNode.compute_MEET.

Doc from org.jruby.ir.dataflow.FlowGraphNode.compute_MEET.

"MEET" current solution of "IN/OUT" with "OUT/IN(pred)", where "pred" is a predecessor of the current node! The choice of "IN/OUT" is determined by the direction of data flow.

Annotations
@Override
finalizeSolutionback to summary
public void finalizeSolution()

Overrides org.jruby.ir.dataflow.FlowGraphNode.finalizeSolution.

Doc from org.jruby.ir.dataflow.FlowGraphNode.finalizeSolution.

Any required cleanup of state after applying transfer function

Annotations
@Override
getLiveInBitSetback to summary
pack-priv BitSet getLiveInBitSet()
getLiveOutBitSetback to summary
pack-priv BitSet getLiveOutBitSet()
initback to summary
public void init()

Overrides org.jruby.ir.dataflow.FlowGraphNode.init.

Doc from org.jruby.ir.dataflow.FlowGraphNode.init.

Initialize this data flow node for solving the current problem This is done after building dataflow variables for the problem.

Annotations
@Override
initSolutionback to summary
public void initSolution()

Overrides org.jruby.ir.dataflow.FlowGraphNode.initSolution.

Doc from org.jruby.ir.dataflow.FlowGraphNode.initSolution.

Any setting up of state/initialization before applying transfer function

Annotations
@Override
makeOutExceptionVariablesLivingback to summary
private void makeOutExceptionVariablesLiving()

Collect variables live out of the exception target node. Since this instr. can directly jump to the rescue block (or scope exit) without executing the rest of the instructions in this bb, we have a control-flow edge from this instr. to that block. Since we dont want to add a control-flow edge from pretty much every instr. to the rescuer/exit BB, we are handling it implicitly here.

markAllVariablesLiveback to summary
private void markAllVariablesLive(LiveVariablesProblem lvp, Collection<? extends Variable> variableList)
markDeadInstructionsback to summary
pack-priv void markDeadInstructions()
markVariableLiveback to summary
private void markVariableLive(LiveVariablesProblem lvp, Variable x)
solutionChangedback to summary
public boolean solutionChanged()

Implements abstract org.jruby.ir.dataflow.FlowGraphNode.solutionChanged.

Doc from org.jruby.ir.dataflow.FlowGraphNode.solutionChanged.

Did dataflow solution for this node change from last time?

Annotations
@Override
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