|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--harpoon.Analysis.Transactions.CloneImplementer
CloneImplementer
adds synthetic specialized implementations
for all clone methods. This works around the incomplete field type
information available to the runtime, as well as making clone() methods
a little more amenable to standard analysis. (OK, the field type
information isn't really *incomplete* as much as it is *inefficient to
access* in the way we'd like to.)
Arguably, this class should belong in the
harpoon.Analysis.Quads
package, but we'll leave it
here until someone other than the Transactions transformation
needs it.
Implementation details: a specialized method called
$clone$()
is created in all known classes. The
existing native clone()
methods are made non-native
and given implementations which redirect to the virtual
$clone$()
method.
CloneSynthesizer
,
Serialized FormConstructor Summary | |
CloneImplementer(HCodeFactory parent,
Linker l,
Set knownClasses)
Creates a CloneImplementer based on the
given HCodeFactory , which must produce
some QuadSSI form. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CloneImplementer(HCodeFactory parent, Linker l, Set knownClasses)
CloneImplementer
based on the
given HCodeFactory
, which must produce
some QuadSSI form.
Method Detail |
public String getCodeName()
HCodeFactory
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)
HCodeFactory
m
from all caches
in this factory and its parents.
clear
in interface HCodeFactory
public HCode convert(HMethod m)
HCodeFactory
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.
convert
in interface HCodeFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |