Package org.jruby.ir.dataflow.analyses
Class LiveVariablesProblem
java.lang.Object
org.jruby.ir.dataflow.DataFlowProblem<LiveVariablesProblem,LiveVariableNode>
org.jruby.ir.dataflow.analyses.LiveVariablesProblem
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.ir.dataflow.DataFlowProblem
DataFlowProblem.DF_Direction
-
Field Summary
FieldsFields inherited from class org.jruby.ir.dataflow.DataFlowProblem
direction, fic, flowGraphNodes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
Get variables that are live on entry to the cfg.getName()
getVariable
(int id) void
void
Methods inherited from class org.jruby.ir.dataflow.DataFlowProblem
addDataFlowVar, compute_MOP_Solution, generateWorkList, getDFVarsCount, getEntryNode, getExitNode, getFIC, getFlowDirection, getFlowGraphNode, isEmpty, setup, toString
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
LiveVariablesProblem
-
-
Method Details
-
getDFVar
-
dfVarExists
-
getVariable
-
buildFlowGraphNode
- Specified by:
buildFlowGraphNode
in classDataFlowProblem<LiveVariablesProblem,
LiveVariableNode>
-
addDFVar
-
getLocalVarsLiveOnScopeEntry
Get variables that are live on entry to the cfg. This is the case for closures which access variables from the parent scope. sum = 0; a.each { |i| sum += i }; return sum In the code snippet above, 'sum' is live on entry to the closure -
getDataFlowVarsForOutput
- Overrides:
getDataFlowVarsForOutput
in classDataFlowProblem<LiveVariablesProblem,
LiveVariableNode>
-
markDeadInstructions
public void markDeadInstructions() -
setVarsLiveOnScopeExit
-
getVarsLiveOnScopeExit
-
getAllVars
-
getNonSelfLocalVars
-
getName
- Specified by:
getName
in classDataFlowProblem<LiveVariablesProblem,
LiveVariableNode>
-