public class CastCheckEliminator extends ForwardBranchedFlowAnalysis
unitToAfterBranchFlow, unitToAfterFallFlowfilterUnitToBeforeFlow, graph, unitToBeforeFlow| Constructor and Description |
|---|
CastCheckEliminator(BriefUnitGraph cfg) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copy(java.lang.Object source,
java.lang.Object dest)
Creates a copy of the
source flow object in dest. |
protected java.lang.Object |
entryInitialFlow()
Returns a new, aggressive (local,type) set.
|
protected void |
flowThrough(java.lang.Object inValue,
Unit unit,
java.util.List outFallValues,
java.util.List outBranchValues)
This is the flow function as described in the assignment write-up.
|
protected void |
makeInitialSet()
Find all the locals of reference type and all the types used in casts
to initialize the mapping from locals and types to bits in the bit vector
in LocalTypeSet.
|
protected void |
merge(java.lang.Object in1,
java.lang.Object in2,
java.lang.Object out)
Compute the merge of the
in1 and in2 sets, putting the result into out. |
protected java.lang.Object |
newInitialFlow()
Returns a new, aggressive (local,type) set.
|
protected void |
tagCasts()
Put the results of the analysis into tags in cast statements.
|
doAnalysis, isForwardgetBranchFlowAfter, getFallFlowAfter, getFlowBeforemerge, mergeInto, treatTrapHandlersAsEntriespublic CastCheckEliminator(BriefUnitGraph cfg)
protected void tagCasts()
protected void makeInitialSet()
protected java.lang.Object newInitialFlow()
newInitialFlow in class AbstractFlowAnalysisprotected void flowThrough(java.lang.Object inValue,
Unit unit,
java.util.List outFallValues,
java.util.List outBranchValues)
flowThrough in class BranchedFlowAnalysisprotected void copy(java.lang.Object source,
java.lang.Object dest)
AbstractFlowAnalysissource flow object in dest.copy in class AbstractFlowAnalysisprotected void merge(java.lang.Object in1,
java.lang.Object in2,
java.lang.Object out)
AbstractFlowAnalysisin1 and in2 sets, putting the result into out.
The behavior of this function depends on the implementation ( it may be necessary to check whether
in1 and in2 are equal or aliased ).
Used by the doAnalysis method.merge in class AbstractFlowAnalysisprotected java.lang.Object entryInitialFlow()
entryInitialFlow in class AbstractFlowAnalysisCopyright © 2012-2019 RoboVM AB. All Rights Reserved.