public class SPatchingChain extends UnitPatchingChain
PatchingChain,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
protected class |
SPatchingChain.SPatchingIterator |
PatchingChain.PatchingIterator| Modifier and Type | Field and Description |
|---|---|
protected Body |
body
Needed to find non-trapped Units of the body.
|
protected Map<SUnitBox,Boolean> |
boxToNeedsPatching
Flag that indicates whether control flow falls through from the unit referenced in the SUnitBox to the Phi node that
owns the SUnitBox.
|
protected Map<UnitBox,Unit> |
boxToPhiNode
Map from UnitBox to the Phi node owning it.
|
protected boolean |
debug |
protected Set<Unit> |
phiNodeSet
Set of the values of boxToPhiNode.
|
innerChain| Constructor and Description |
|---|
SPatchingChain(Body aBody,
Chain<Unit> aChain) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Unit o)
Adds the given object to this Chain.
|
void |
addFirst(Unit u)
Adds the given object at the beginning of the Chain.
|
void |
addLast(Unit u)
Adds the given object at the end of the Chain.
|
protected void |
computeNeedsPatching()
Computes
boxToNeedsPatching which maps each UnitBox from a PhiExpr to true if the referenced Unit falls-through
to the statement containing the PhiExpr, false otherwise. |
protected SUnitBox |
getSBox(UnitBox box) |
void |
insertAfter(Chain<Unit> toInsert,
Unit point)
Inserts
toInsert in the Chain after point. |
void |
insertAfter(Collection<? extends Unit> toInsert,
Unit point)
Inserts
toInsert in the Chain after point. |
void |
insertAfter(List<Unit> toInsert,
Unit point)
Inserts
toInsert in the Chain after point. |
void |
insertAfter(Unit toInsert,
Unit point)
Inserts
toInsert in the Chain after point. |
void |
insertBefore(Chain<Unit> toInsert,
Unit point)
Inserts
toInsert in the Chain before point. |
void |
insertBefore(Collection<? extends Unit> toInsert,
Unit point)
Inserts
toInsert in the Chain before point. |
void |
insertBefore(List<Unit> toInsert,
Unit point)
Inserts
toInsert in the Chain before point. |
void |
insertBefore(Unit toInsert,
Unit point)
Inserts
toInsert in the Chain before point. |
Iterator<Unit> |
iterator()
Returns an iterator over this Chain.
|
Iterator<Unit> |
iterator(Unit u)
Returns an iterator over this Chain, starting at the given object.
|
Iterator<Unit> |
iterator(Unit head,
Unit tail)
Returns an iterator over this Chain, starting at head and reaching tail (inclusive).
|
protected static void |
patchAfterRemoval(Unit removing) |
protected void |
processPhiNode(Unit phiNode) |
boolean |
remove(Object obj)
Removes the given object from this Chain.
|
boolean |
remove(Unit u) |
protected void |
reprocessPhiNodes() |
void |
swapWith(Unit out,
Unit in)
Replaces
out in the Chain by in. |
insertOnEdge, insertOnEdge, insertOnEdge, insertOnEdgecontains, follows, getElementsUnsorted, getFirst, getLast, getModificationCount, getNonPatchingChain, getPredOf, getSuccOf, insertBeforeNoRedirect, insertBeforeNoRedirect, patchBeforeRemoval, removeFirst, removeLast, size, snapshotIteratoraddAll, clear, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArrayprotected final Body body
protected final boolean debug
protected Set<Unit> phiNodeSet
public boolean add(Unit o)
PatchingChainadd in interface Collection<Unit>add in class PatchingChain<Unit>public void swapWith(Unit out, Unit in)
PatchingChainout in the Chain by in.public void insertAfter(Unit toInsert, Unit point)
PatchingChaintoInsert in the Chain after point.insertAfter in interface Chain<Unit>insertAfter in class PatchingChain<Unit>public void insertAfter(List<Unit> toInsert, Unit point)
PatchingChaintoInsert in the Chain after point.insertAfter in interface Chain<Unit>insertAfter in class PatchingChain<Unit>public void insertAfter(Chain<Unit> toInsert, Unit point)
ChaintoInsert in the Chain after point.insertAfter in interface Chain<Unit>insertAfter in class PatchingChain<Unit>public void insertAfter(Collection<? extends Unit> toInsert, Unit point)
ChaintoInsert in the Chain after point.insertAfter in interface Chain<Unit>insertAfter in class PatchingChain<Unit>public void insertBefore(Unit toInsert, Unit point)
PatchingChaintoInsert in the Chain before point.insertBefore in interface Chain<Unit>insertBefore in class PatchingChain<Unit>public void insertBefore(List<Unit> toInsert, Unit point)
PatchingChaintoInsert in the Chain before point.insertBefore in interface Chain<Unit>insertBefore in class PatchingChain<Unit>public void insertBefore(Chain<Unit> toInsert, Unit point)
PatchingChaintoInsert in the Chain before point.insertBefore in interface Chain<Unit>insertBefore in class PatchingChain<Unit>public void insertBefore(Collection<? extends Unit> toInsert, Unit point)
ChaintoInsert in the Chain before point.insertBefore in interface Chain<Unit>insertBefore in class PatchingChain<Unit>public void addFirst(Unit u)
PatchingChainpublic void addLast(Unit u)
PatchingChainpublic boolean remove(Unit u)
public boolean remove(Object obj)
PatchingChainremove in interface Collection<Unit>remove in interface Chain<Unit>remove in class PatchingChain<Unit>protected static void patchAfterRemoval(Unit removing)
protected void processPhiNode(Unit phiNode)
protected void reprocessPhiNodes()
protected void computeNeedsPatching()
boxToNeedsPatching which maps each UnitBox from a PhiExpr to true if the referenced Unit falls-through
to the statement containing the PhiExpr, false otherwise.
NOTE: This will *miss* all the Phi nodes outside a chain. So make sure you know what you are doing if you remove a Phi
node from a chain and don't put it back or call clearUnitBoxes() on it.public Iterator<Unit> iterator()
PatchingChainpublic Iterator<Unit> iterator(Unit u)
PatchingChainCopyright © 2024 Soot OSS. All rights reserved.