Class TrivialMethodEscape
java.lang.Object
com.ibm.wala.escape.TrivialMethodEscape
- All Implemented Interfaces:
IMethodEscapeAnalysis
,INodeEscapeAnalysis
public class TrivialMethodEscape
extends Object
implements IMethodEscapeAnalysis, INodeEscapeAnalysis
Trivial method-level escape analysis.
An instance does not escape from method m if the following hold:
- the instance is only ever pointed to by locals (it is never stored in the heap)
- the method m does NOT return (either normally or exceptionally) a pointer to the instance
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
mayEscape
(MethodReference allocMethod, int allocPC, MethodReference m)
-
Constructor Details
-
TrivialMethodEscape
- Parameters:
cg
- governing call graphhg
- Heap graph representation of pointer analysis
-
-
Method Details
-
mayEscape
public boolean mayEscape(MethodReference allocMethod, int allocPC, MethodReference m) throws WalaException - Specified by:
mayEscape
in interfaceIMethodEscapeAnalysis
- Parameters:
allocMethod
- a method which holds an allocation siteallocPC
- bytecode index of allocation sitem
- method in question- Returns:
- true if an object allocated at the allocation site <allocMethod,allocPC> may escape from an activation of method m, false otherwise
- Throws:
WalaException
-
mayEscape
- Specified by:
mayEscape
in interfaceINodeEscapeAnalysis
- Parameters:
allocNode
- a CGNode which holds an allocation siteallocPC
- bytecode index of allocation sitenode
- method in question- Returns:
- true if an object allocated at the allocation site <allocMethod,allocPC> may escape from an activation of node m, false otherwise
- Throws:
WalaException
-