Package org.jruby.ir.dataflow.analyses
Class UnboxableOpsAnalysisNode
java.lang.Object
org.jruby.ir.dataflow.FlowGraphNode<UnboxableOpsAnalysisProblem,UnboxableOpsAnalysisNode>
org.jruby.ir.dataflow.analyses.UnboxableOpsAnalysisNode
public class UnboxableOpsAnalysisNode
extends FlowGraphNode<UnboxableOpsAnalysisProblem,UnboxableOpsAnalysisNode>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) UnboxableOpsAnalysisNode.UnboxState(package private) UnboxableOpsAnalysisNode.UnboxState(package private) UnboxableOpsAnalysisNode.UnboxStateFields inherited from class org.jruby.ir.dataflow.FlowGraphNode
basicBlock, problem -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInitialize this data flow node to compute the new solution This is done before iteratively calling the MEET operator.voidApply transfer function to the instructionprivate voidboxRequiredVars(Instr i, UnboxableOpsAnalysisNode.UnboxState state, Map<Variable, TemporaryLocalVariable> unboxMap, Variable dst, boolean hasRescuer, boolean isDFBarrier, List<Instr> newInstrs) voidboxVar(UnboxableOpsAnalysisNode.UnboxState state, Class reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v, List<Instr> newInstrs) voidBuilds the data-flow variables (or facts) for a particular instruction.voidcompute_MEET(org.jruby.dirgra.Edge e, UnboxableOpsAnalysisNode pred) "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.voidAny required cleanup of state after applying transfer functionprivate Classprivate OperandgetUnboxedOperand(UnboxableOpsAnalysisNode.UnboxState state, Map<Variable, TemporaryLocalVariable> unboxMap, Operand arg) private TemporaryLocalVariablegetUnboxedVar(Class reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v) private TemporaryLocalVariablegetUnboxedVar(Class reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v, boolean createNew) voidinit()Initialize this data flow node for solving the current problem This is done after building dataflow variables for the problem.voidAny setting up of state/initialization before applying transfer functionprivate voidmarkLocalVariables(Collection<Variable> varsToBox, Set<Variable> varsToCheck) private booleanprivate voidsetOperandType(UnboxableOpsAnalysisNode.UnboxState state, Variable v, Class newType) booleanDid dataflow solution for this node change from last time?toString()voidunbox(Map<Variable, TemporaryLocalVariable> unboxMap) private OperandunboxOperand(UnboxableOpsAnalysisNode.UnboxState state, Class reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Operand arg, List<Instr> newInstrs) voidunboxVar(UnboxableOpsAnalysisNode.UnboxState state, Class reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v, List<Instr> newInstrs) private voidupdateUnboxedVarsInfoForBoxedInstr(Instr i, UnboxableOpsAnalysisNode.UnboxState state, Variable dst, boolean hasRescuer, boolean isDFBarrier) Methods inherited from class org.jruby.ir.dataflow.FlowGraphNode
buildDataFlowVars, computeDataFlowInfo, computeDataFlowInfoBackward, computeDataFlowInfoForward, getBB, getCFG, getExceptionTargetNode, hasExceptionsRescued
-
Field Details
-
inState
-
outState
UnboxableOpsAnalysisNode.UnboxState outState -
tmpState
UnboxableOpsAnalysisNode.UnboxState tmpState
-
-
Constructor Details
-
UnboxableOpsAnalysisNode
-
-
Method Details
-
init
public void init()Description copied from class:FlowGraphNodeInitialize this data flow node for solving the current problem This is done after building dataflow variables for the problem.- Overrides:
initin classFlowGraphNode<UnboxableOpsAnalysisProblem,UnboxableOpsAnalysisNode>
-
buildDataFlowVars
Description copied from class:FlowGraphNodeBuilds the data-flow variables (or facts) for a particular instruction.- Specified by:
buildDataFlowVarsin classFlowGraphNode<UnboxableOpsAnalysisProblem,UnboxableOpsAnalysisNode>
-
applyPreMeetHandler
public void applyPreMeetHandler()Description copied from class:FlowGraphNodeInitialize this data flow node to compute the new solution This is done before iteratively calling the MEET operator.- Specified by:
applyPreMeetHandlerin classFlowGraphNode<UnboxableOpsAnalysisProblem,UnboxableOpsAnalysisNode>
-
compute_MEET
Description copied from class:FlowGraphNode"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.- Specified by:
compute_MEETin classFlowGraphNode<UnboxableOpsAnalysisProblem,UnboxableOpsAnalysisNode>
-
getOperandType
-
setOperandType
-
markLocalVariables
-
updateUnboxedVarsInfoForBoxedInstr
private void updateUnboxedVarsInfoForBoxedInstr(Instr i, UnboxableOpsAnalysisNode.UnboxState state, Variable dst, boolean hasRescuer, boolean isDFBarrier) -
initSolution
public void initSolution()Description copied from class:FlowGraphNodeAny setting up of state/initialization before applying transfer function- Overrides:
initSolutionin classFlowGraphNode<UnboxableOpsAnalysisProblem,UnboxableOpsAnalysisNode>
-
applyTransferFunction
Description copied from class:FlowGraphNodeApply transfer function to the instruction- Specified by:
applyTransferFunctionin classFlowGraphNode<UnboxableOpsAnalysisProblem,UnboxableOpsAnalysisNode>
-
solutionChanged
public boolean solutionChanged()Description copied from class:FlowGraphNodeDid dataflow solution for this node change from last time?- Specified by:
solutionChangedin classFlowGraphNode<UnboxableOpsAnalysisProblem,UnboxableOpsAnalysisNode>
-
finalizeSolution
public void finalizeSolution()Description copied from class:FlowGraphNodeAny required cleanup of state after applying transfer function- Overrides:
finalizeSolutionin classFlowGraphNode<UnboxableOpsAnalysisProblem,UnboxableOpsAnalysisNode>
-
matchingTypes
-
getUnboxedVar
private TemporaryLocalVariable getUnboxedVar(Class reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v, boolean createNew) -
getUnboxedVar
private TemporaryLocalVariable getUnboxedVar(Class reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v) -
boxVar
public void boxVar(UnboxableOpsAnalysisNode.UnboxState state, Class reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v, List<Instr> newInstrs) -
unboxVar
public void unboxVar(UnboxableOpsAnalysisNode.UnboxState state, Class reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Variable v, List<Instr> newInstrs) -
unboxOperand
private Operand unboxOperand(UnboxableOpsAnalysisNode.UnboxState state, Class reqdType, Map<Variable, TemporaryLocalVariable> unboxMap, Operand arg, List<Instr> newInstrs) -
getUnboxedOperand
private Operand getUnboxedOperand(UnboxableOpsAnalysisNode.UnboxState state, Map<Variable, TemporaryLocalVariable> unboxMap, Operand arg) -
boxRequiredVars
private void boxRequiredVars(Instr i, UnboxableOpsAnalysisNode.UnboxState state, Map<Variable, TemporaryLocalVariable> unboxMap, Variable dst, boolean hasRescuer, boolean isDFBarrier, List<Instr> newInstrs) -
unbox
-
toString
-