|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--harpoon.Analysis.Quads.CachingCallGraph
CachingCallGraph
is a caching wrapper for a call
graph. In general, multiple stages in the compiler will use the
call graph so it is good to cache it. You should manually take
care of constructing a new call graph when you modify the code in
some way that might invalidate the old call graph.
Constructor Summary | |
CachingCallGraph(CallGraph cg)
Convenient to use constructor. |
|
CachingCallGraph(CallGraph cg,
boolean m_cache,
boolean cs_cache)
Creates a CachingCallGraph that caches the results
of cg . |
Method Summary | |
Set |
callableMethods()
Returns the set of all the methods that can be called in the execution of the program. |
HMethod[] |
calls(HMethod hm)
Returns an array containing all possible methods called by method m . |
HMethod[] |
calls(HMethod hm,
CALL cs)
Returns an array containing all possible methods called by method m at the call site cs . |
CALL[] |
getCallSites(HMethod hm)
Returns a list of all the CALL s quads in the code
of hm . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CachingCallGraph(CallGraph cg, boolean m_cache, boolean cs_cache)
CachingCallGraph
that caches the results
of cg
.
cg
- underlying call graph (the one actually doing the job)m_cache
- specifies whether to cache the results of
calls(HMethod hm)
cs_cache
- specifies whether to cache the results of
calls(HMethod hm, CALL cs)
public CachingCallGraph(CallGraph cg)
cg
is a
subclass of CallGraphImpl
, it is equivalent to
CallGraphImpl(cg, false, true)
(CallGraphImpl
already caches the callees of a method.
Otherwise, it is equivalent to
CallGraphImpl(cg, true, true)
(full caching).
cg
- underlying call graphMethod Detail |
public HMethod[] calls(HMethod hm)
CallGraph
m
. If hm
doesn't call any
method, return an array of length 0
.
calls
in interface CallGraph
public HMethod[] calls(HMethod hm, CALL cs)
CallGraph
m
at the call site cs
.
If there is no known callee for the call site cs
, or if
cs
doesn't belong to the code of hm
,
return an array of length 0
.
calls
in interface CallGraph
public CALL[] getCallSites(HMethod hm)
CallGraph
CALL
s quads in the code
of hm
.
getCallSites
in interface CallGraph
public Set callableMethods()
CallGraph
callableMethods
in interface CallGraph
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |