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

public Class UnboxableOpsAnalysisNode

extends FlowGraphNode<UnboxableOpsAnalysisProblem, UnboxableOpsAnalysisNode>
Class Inheritance
Imports
org.jruby.dirgra.Edge, org.jruby.ir.IRClosure, .Operation, org.jruby.ir.dataflow.FlowGraphNode, org.jruby.ir.instructions.*, org.jruby.ir.instructions.boxing.*, org.jruby.ir.interpreter.FullInterpreterContext, org.jruby.ir.operands.*, .Boolean, .Float, org.jruby.ir.representations.BasicBlock, .CFG, java.util.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
pack-priv UnboxableOpsAnalysisNode.UnboxState
pack-priv UnboxableOpsAnalysisNode.UnboxState
pack-priv UnboxableOpsAnalysisNode.UnboxState
Inherited from org.jruby.ir.dataflow.FlowGraphNode:
basicBlockproblem

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
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

private void
boxRequiredVars(Instr i, UnboxableOpsAnalysisNode.UnboxState state, Map<Variable, TemporaryLocalVariable> unboxMap, Variable dst, boolean hasRescuer, boolean isDFBarrier, List<Instr> newInstrs)

public void
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, UnboxableOpsAnalysisNode 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

private Class<T>
private Operand
private TemporaryLocalVariable
getUnboxedVar(Class<T> reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v, boolean createNew)

private TemporaryLocalVariable
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
private boolean
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.

public void
private Operand
public void
private void
updateUnboxedVarsInfoForBoxedInstr(Instr i, UnboxableOpsAnalysisNode.UnboxState state, Variable dst, boolean hasRescuer, boolean isDFBarrier)

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

Field Detail

inStateback to summary
pack-priv UnboxableOpsAnalysisNode.UnboxState inState
outStateback to summary
pack-priv UnboxableOpsAnalysisNode.UnboxState outState
tmpStateback to summary
pack-priv UnboxableOpsAnalysisNode.UnboxState tmpState

Constructor Detail

UnboxableOpsAnalysisNodeback to summary
public UnboxableOpsAnalysisNode(UnboxableOpsAnalysisProblem prob, BasicBlock n)

Method Detail

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
boxRequiredVarsback to summary
private void boxRequiredVars(Instr i, UnboxableOpsAnalysisNode.UnboxState state, Map<Variable, TemporaryLocalVariable> unboxMap, Variable dst, boolean hasRescuer, boolean isDFBarrier, List<Instr> newInstrs)
boxVarback to summary
public void boxVar(UnboxableOpsAnalysisNode.UnboxState state, Class<T> reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v, List<Instr> newInstrs)
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, UnboxableOpsAnalysisNode 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
getOperandTypeback to summary
private Class<T> getOperandType(UnboxableOpsAnalysisNode.UnboxState state, Operand o)
getUnboxedOperandback to summary
private Operand getUnboxedOperand(UnboxableOpsAnalysisNode.UnboxState state, Map<Variable, TemporaryLocalVariable> unboxMap, Operand arg)
getUnboxedVarback to summary
private TemporaryLocalVariable getUnboxedVar(Class<T> reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v, boolean createNew)
getUnboxedVarback to summary
private TemporaryLocalVariable getUnboxedVar(Class<T> reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v)
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
markLocalVariablesback to summary
private void markLocalVariables(Collection<Variable> varsToBox, Set<Variable> varsToCheck)
matchingTypesback to summary
private boolean matchingTypes(Class<T> c, TemporaryVariableType t)
setOperandTypeback to summary
private void setOperandType(UnboxableOpsAnalysisNode.UnboxState state, Variable v, Class<T> newType)
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
unboxback to summary
public void unbox(Map<Variable, TemporaryLocalVariable> unboxMap)
unboxOperandback to summary
private Operand unboxOperand(UnboxableOpsAnalysisNode.UnboxState state, Class<T> reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Operand arg, List<Instr> newInstrs)
unboxVarback to summary
public void unboxVar(UnboxableOpsAnalysisNode.UnboxState state, Class<T> reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v, List<Instr> newInstrs)
updateUnboxedVarsInfoForBoxedInstrback to summary
private void updateUnboxedVarsInfoForBoxedInstr(Instr i, UnboxableOpsAnalysisNode.UnboxState state, Variable dst, boolean hasRescuer, boolean isDFBarrier)
org.jruby.ir.dataflow.analyses back to summary

private Class UnboxableOpsAnalysisNode.UnboxState

extends Object
Class Inheritance
  • java.lang.Object
  • org.jruby.ir.dataflow.analyses.UnboxableOpsAnalysisNode.UnboxState

Field Summary

Modifier and TypeField and Description
pack-priv final Map<Variable, Class<T>>
pack-priv final Set<Variable>
pack-priv final Map<Variable, Class<T>>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
public void
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

typesback to summary
pack-priv final Map<Variable, Class<T>> types
unboxedDirtyVarsback to summary
pack-priv final Set<Variable> unboxedDirtyVars
unboxedVarsback to summary
pack-priv final Map<Variable, Class<T>> unboxedVars

Constructor Detail

UnboxStateback to summary
public UnboxState()
UnboxStateback to summary
public UnboxState(UnboxableOpsAnalysisNode.UnboxState init)

Method Detail

computeMEETback to summary
public void computeMEET(UnboxableOpsAnalysisNode.UnboxState other)
computeMEETForTypesback to summary
public void computeMEETForTypes(UnboxableOpsAnalysisNode.UnboxState other, boolean localVarsOnly)
computeMEETForUnboxedVarsback to summary
public void computeMEETForUnboxedVars(UnboxableOpsAnalysisNode.UnboxState other)
debugOutback to summary
public void debugOut()
equalsback to summary
public boolean equals(UnboxableOpsAnalysisNode.UnboxState other)