
public class FullOptimizerContext extends Object implements OptimizerContext
Is updated incrementally.
NULL_OPTIMIZATION_CONTEXT| Constructor and Description |
|---|
FullOptimizerContext(JProgram program) |
| Modifier and Type | Method and Description |
|---|---|
Set<JMethod> |
getCallees(Collection<JMethod> callerMethods)
Return callee methods of
callerMethods. |
Set<JMethod> |
getCallers(Collection<JMethod> calleeMethods)
Return caller methods of
calleeMethods. |
int |
getLastStepFor(String optimizerName)
Return the last modification step for a given optimizer.
|
Set<JMethod> |
getMethodsByReferencedFields(Collection<JField> fields)
Return methods that reference
fields. |
Set<JField> |
getModifiedFieldsSince(int stepSince)
Return all the effective modified fields since a given step.
|
Set<JMethod> |
getModifiedMethodsSince(int stepSince)
Return all the effective modified methods since a given step.
|
int |
getOptimizationStep()
Return the current optimization step number.
|
Set<JField> |
getReferencedFieldsByMethods(Collection<JMethod> methods)
Return fields that are referenced by
methods. |
Set<JMethod> |
getRemovedCalleeMethodsSince(int stepSince)
Get the removed callee methods since a given step.
|
void |
incOptimizationStep()
Increase the optimization step by 1, create a new set to record modifications in this step.
|
void |
markModified(JField modifiedField)
Add modified field to the modification information.
|
void |
markModified(JMethod modifiedMethod)
Add modified method to both the modification and dependence information.
|
void |
remove(JField field)
Remove field from the modification information.
|
void |
remove(JMethod method)
Remove method from both the dependence and modification information.
|
void |
removeFields(Collection<JField> fields)
Remove fields from the modification information.
|
void |
removeMethods(Collection<JMethod> methods)
Remove methods from the modification information.
|
void |
setLastStepFor(String optimizerName,
int step)
Set the last modification step of a given optimizer.
|
void |
syncDeletedSubCallGraphsSince(int step,
Collection<JMethod> prunedMethods)
Remove the pruned methods from the deleted sub call graphs since a given step.
|
void |
traverse(JVisitor visitor,
Set<? extends JNode> nodes)
Traverse the affected methods and fields.
|
public FullOptimizerContext(JProgram program)
public Set<JMethod> getCallees(Collection<JMethod> callerMethods)
OptimizerContextcallerMethods.getCallees in interface OptimizerContextpublic Set<JMethod> getCallers(Collection<JMethod> calleeMethods)
OptimizerContextcalleeMethods.getCallers in interface OptimizerContextpublic int getLastStepFor(String optimizerName)
OptimizerContextgetLastStepFor in interface OptimizerContextpublic Set<JMethod> getMethodsByReferencedFields(Collection<JField> fields)
OptimizerContextfields.getMethodsByReferencedFields in interface OptimizerContextpublic Set<JField> getModifiedFieldsSince(int stepSince)
OptimizerContextgetModifiedFieldsSince in interface OptimizerContextpublic Set<JMethod> getModifiedMethodsSince(int stepSince)
OptimizerContextgetModifiedMethodsSince in interface OptimizerContextpublic int getOptimizationStep()
OptimizerContextgetOptimizationStep in interface OptimizerContextpublic Set<JField> getReferencedFieldsByMethods(Collection<JMethod> methods)
OptimizerContextmethods.getReferencedFieldsByMethods in interface OptimizerContextpublic Set<JMethod> getRemovedCalleeMethodsSince(int stepSince)
OptimizerContextgetRemovedCalleeMethodsSince in interface OptimizerContextpublic void incOptimizationStep()
OptimizerContextincOptimizationStep in interface OptimizerContextpublic void markModified(JField modifiedField)
OptimizerContextmarkModified in interface OptimizerContextpublic void markModified(JMethod modifiedMethod)
OptimizerContextmarkModified in interface OptimizerContextpublic void remove(JField field)
OptimizerContextremove in interface OptimizerContextpublic void remove(JMethod method)
OptimizerContextremove in interface OptimizerContextpublic void removeFields(Collection<JField> fields)
OptimizerContextremoveFields in interface OptimizerContextpublic void removeMethods(Collection<JMethod> methods)
OptimizerContextremoveMethods in interface OptimizerContextpublic void setLastStepFor(String optimizerName, int step)
OptimizerContextsetLastStepFor in interface OptimizerContextpublic void syncDeletedSubCallGraphsSince(int step,
Collection<JMethod> prunedMethods)
OptimizerContextsyncDeletedSubCallGraphsSince in interface OptimizerContextpublic void traverse(JVisitor visitor, Set<? extends JNode> nodes)
OptimizerContexttraverse in interface OptimizerContextCopyright © 2018. All rights reserved.