|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.Quads.MethodInliningCodeFactory
public class MethodInliningCodeFactory
MethodInliningCodeFactory
makes an HCode
from an HMethod
, and inlines methods at call sites
registered with the inline(CALL)
function.
Recursive functions are legal, but this factory does not provide facilities for specifying number of recursive inlinings.
Constructor Summary | |
---|---|
MethodInliningCodeFactory(HCodeFactory parentFactory)
Creates a MethodInliningCodeFactory , using
parentFactory . |
Method Summary | |
---|---|
void |
clear(HMethod m)
Removes representation of method m from all caches
in this factory and its parents. |
HCode |
convert(HMethod m)
Make an HCode from an HMethod . |
String |
getCodeName()
Returns a string naming the type of the HCode
that this factory produces. |
void |
inline(CALL site)
Marks a call site to be inlined when code is generated. |
void |
uninline(CALL site)
Marks a call site to not be inlined when code is generated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MethodInliningCodeFactory(HCodeFactory parentFactory)
MethodInliningCodeFactory
, using
parentFactory
.
parentFactory
produces
"quad-ssi" code.
Method Detail |
---|
public String getCodeName()
HCode
that this factory produces.
this.getCodeName()
should equal
this.convert(m).getName()
for every
HMethod m
.
getCodeName
in interface HCodeFactory
public void clear(HMethod m)
m
from all caches
in this factory and its parents.
clear
in interface HCodeFactory
public HCode convert(HMethod m)
HCode
from an HMethod
.
convert
is allowed to return null if the requested
conversion is impossible; typically this is because it's attempt
to convert a source representation failed -- for
example, because m
is a native method.
MethodInliningCodeFactory also inlines any call sites within
m
marked by the this.inline(CALL)
method.
convert
in interface HCodeFactory
public void inline(CALL site)
this
site
as a location to
inline if this
is ever asked
to generate code for the
HMethod
containing
site
.
public void uninline(CALL site)
this
site
is in the set of
call sites to be inlined, takes
site
out of the set. Else
does nothing.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |