|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectharpoon.Analysis.Transformation.MethodSplitter
harpoon.Analysis.Transactions.SyncTransformer
public class SyncTransformer
SyncTransformer transforms synchronized code to
atomic transactions. Works on QuadSSI form
(via an internal conversion to SSA). Outputs QuadRSSx.
Use the SyncTransformer.treeCodeFactory() to clean
up the transformed code by doing low-level tree form optimizations.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class harpoon.Analysis.Transformation.MethodSplitter |
|---|
MethodSplitter.Token |
| Field Summary |
|---|
| Fields inherited from class harpoon.Analysis.Transformation.MethodSplitter |
|---|
ORIGINAL |
| Constructor Summary | |
|---|---|
SyncTransformer(HCodeFactory hcf,
ClassHierarchy ch,
Linker l,
boolean pointersAreLong,
HMethod mainM,
Set roots)
Creates a SyncTransformer with no transaction root
methods. |
|
SyncTransformer(HCodeFactory hcf,
ClassHierarchy ch,
Linker l,
boolean pointersAreLong,
HMethod mainM,
Set roots,
Set<HMethod> transRoots)
Creates a SyncTransformer with the specified transaction
root method set. |
|
SyncTransformer(HCodeFactory hcf,
ClassHierarchy ch,
Linker l,
boolean pointersAreLong,
HMethod mainM,
Set roots,
String resourceName)
Creates a SyncTransformer with a transaction root method
set loaded from the specified resource name. |
|
| Method Summary | |
|---|---|
protected harpoon.Analysis.Transactions.SyncTransformer.MyHCodeAndMaps |
cloneHCode(HCode hc,
HMethod newmethod)
Override this method if you do not want the mutatable HCode to be a straight clone of the original HCode: for example, if the input HCodes were QuadSSI and you wanted to
clone them into QuadRSSIs before mutating. |
HCodeFactory |
codeFactory()
Returns a HCodeFactory containing representations for
the methods split by the MethodSplitter. |
Iterator<HData> |
filterData(Frame f,
Iterator<HData> it)
Munge HDatas to insert bit-field numbering information. |
protected boolean |
isValidToken(MethodSplitter.Token which)
Check the validity of a given MethodSplitter.Token. |
protected String |
mutateCodeName(String codeName)
Override this method to change the codename which this MethodMutator's codefactory reports. |
protected String |
mutateDescriptor(HMethod hm,
MethodSplitter.Token which)
Override this method if you want to create mutated methods with descriptors differing from that of the original method. |
protected HCode |
mutateHCode(HCodeAndMaps input,
MethodSplitter.Token which)
Override this method to effect transformations on split methods. |
Set<HMethod> |
transRoots()
Export additional method roots after transactions transformation. |
HCodeFactory |
treeCodeFactory(Frame f,
HCodeFactory hcf)
Return an HCodeFactory that will clean up the
tree form of the transformed code by performing some optimizations
which can't be represented in quad form. |
| Methods inherited from class harpoon.Analysis.Transformation.MethodSplitter |
|---|
isVirtual, select |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SyncTransformer(HCodeFactory hcf,
ClassHierarchy ch,
Linker l,
boolean pointersAreLong,
HMethod mainM,
Set roots)
SyncTransformer with no transaction root
methods.
public SyncTransformer(HCodeFactory hcf,
ClassHierarchy ch,
Linker l,
boolean pointersAreLong,
HMethod mainM,
Set roots,
String resourceName)
SyncTransformer with a transaction root method
set loaded from the specified resource name.
public SyncTransformer(HCodeFactory hcf,
ClassHierarchy ch,
Linker l,
boolean pointersAreLong,
HMethod mainM,
Set roots,
Set<HMethod> transRoots)
SyncTransformer with the specified transaction
root method set.
| Method Detail |
|---|
protected boolean isValidToken(MethodSplitter.Token which)
MethodSplitterMethodSplitter.Token.
Override if (when) your subclass defines new tokens.
isValidToken in class MethodSplitterpublic HCodeFactory codeFactory()
MethodSplitterHCodeFactory containing representations for
the methods split by the MethodSplitter.
codeFactory in class MethodSplitterpublic Set<HMethod> transRoots()
protected String mutateDescriptor(HMethod hm,
MethodSplitter.Token which)
MethodSplitter
mutateDescriptor in class MethodSplitter
protected harpoon.Analysis.Transactions.SyncTransformer.MyHCodeAndMaps cloneHCode(HCode hc,
HMethod newmethod)
MethodSplitterQuadSSI and you wanted to
clone them into QuadRSSIs before mutating.
By default, this method returns hc.clone(newmethod).
cloneHCode in class MethodSplitterprotected String mutateCodeName(String codeName)
MethodSplitterMethodMutator's codefactory reports.
mutateCodeName in class MethodSplitter
protected HCode mutateHCode(HCodeAndMaps input,
MethodSplitter.Token which)
MethodSplitter
mutateHCode in class MethodSplitter
public HCodeFactory treeCodeFactory(Frame f,
HCodeFactory hcf)
HCodeFactory that will clean up the
tree form of the transformed code by performing some optimizations
which can't be represented in quad form.
public Iterator<HData> filterData(Frame f,
Iterator<HData> it)
HDatas to insert bit-field numbering information.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||