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

public Class DefinedVariableNode

extends FlowGraphNode<DefinedVariablesProblem, DefinedVariableNode>
Class Inheritance
Imports
org.jruby.dirgra.Edge, org.jruby.ir.dataflow.FlowGraphNode, org.jruby.ir.instructions.ClosureAcceptingInstr, .Instr, .ResultInstr, org.jruby.ir.interpreter.FullInterpreterContext, org.jruby.ir.operands.LocalVariable, .Operand, .TemporaryLocalVariable, .Variable, .WrappedIRClosure, org.jruby.ir.IRClosure, org.jruby.ir.representations.BasicBlock, java.util.*

Field Summary

Modifier and TypeField and Description
private BitSet
private BitSet
private int
private BitSet
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, DefinedVariableNode 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

public void
identifyInits(Set<Variable> undefinedVars)

private void
identifyUndefinedVarsInClosure(Set<Variable> undefinedVars, IRClosure cl, int nestingLevel)

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 String
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
outback to summary
private BitSet out
setSizeback to summary
private int setSize
tmpback to summary
private BitSet tmp

Constructor Detail

DefinedVariableNodeback to summary
public DefinedVariableNode(DefinedVariablesProblem 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, DefinedVariableNode 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
identifyInitsback to summary
public void identifyInits(Set<Variable> undefinedVars)
identifyUndefinedVarsInClosureback to summary
private void identifyUndefinedVarsInClosure(Set<Variable> undefinedVars, IRClosure cl, int nestingLevel)
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
printSetback to summary
private String printSet(BitSet set)
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