| 接口 | 说明 |
|---|---|
| Cfg.DfsVisitor | |
| Cfg.FrameVisitor<T> | |
| Cfg.OnAssignCallBack | |
| Cfg.OnUseCallBack | |
| Cfg.TravelCallBack | |
| Transformer |
TODO DOC
|
| 类 | 说明 |
|---|---|
| AggTransformer | |
| Cfg |
TODO DOC
|
| CleanLabel |
Clean unused
LabelStmt |
| ConstTransformer |
Replace must-be-constant local to constant
Require a SSA form, usually run after
SSATransformer |
| DeadCodeTransformer | |
| EndRemover | |
| ExceptionHandlerTrim |
Trim Exception handler.
|
| FixVar | |
| Ir2JRegAssignTransformer |
Share same reg between locals with same type.
|
| Ir2JRegAssignTransformer.Reg | |
| JimpleTransformer |
transforme IR to simple 3-addr format
a=b+c+d; => e=b+c; a=e+d;
|
| MultiArrayTransformer |
dex does have the instruction to create a multi-array. the implement is to
using the Array.newInstance().
|
| NewTransformer |
simply merge
a=NEW Labc;
a.
|
| NpeTransformer |
Replace MUST be NullPointerException stmt to 'throw new NullPointerException()'
Replace MUST be 'divide by zero' stmt to 'throw new ArithmeticException("divide by zero")'
|
| RemoveConstantFromSSA |
1.
|
| RemoveLocalFromSSA | |
| SSATransformer |
Transform Stmt to SSA form and count local read
|
| StatedTransformer | |
| TypeTransformer |
Type and correct Exprs
|
| TypeTransformer.TypeRef | |
| UniqueQueue<T> | |
| UnSSATransformer |
Remove
PhiExprs, add a=x to each CFG from. |
| UnSSATransformer.LiveA | |
| UnSSATransformer.RegAssign |
designed for assign index to Local, each Object is related to a Local
|
| VoidInvokeTransformer |
convert
a = b.get();
to
b.get();
if a is not used in other place.
|
| ZeroTransformer |
dex mix use as integer 0 and object null. the following code is validate in dex, but invalidate in .class
a=0
if x>0 goto L1
L2: [b=phi(a,c)]
useAsObject(b);
c=getAnotherObject();
goto L2:
L1: [d=phi(a,e)]
useAsInt(d);
e=123
goto L1:
we transform the code to
a1=0
a=0
if x>0 goto L1
a2=0
L2: [b=phi(a1,c)]
useAsObject(b);
c=getAnotherObject();
goto L2:
L1: [d=phi(a,e)]
useAsInt(d);
e=123
goto L1:
|