| 类 | 说明 |
|---|---|
| ArrayElementTransformer |
require SSA, element index are const
transformer
...
|
| ArrayNullPointerTransformer |
run after
ConstTransformer, to deal with following code
int[] a = null;
int b = a[1];
replace int b = a[1]; to throw new NullPointException(), and we get
int[] a = null;
throw new NullPointException();
|
| FillArrayTransformer |
require SSA, usually run after ConstTransformer 1. array is fixed size. 2. array object init and use once, (exclude
the element assignment) 3. all elements are init with fixed index before use. 4. the array is not in PhiExpr 5. and
for array object init at A, use at B; A and B must in same loop/path, so G(A->B), G(A->C->B), G(A->C,A->D,C->B,D->B),
G(A->C,C->D,D->C,C->B) and G(A->C,C->A,C->B) is ok to transform, but for G(A->C,C->B,B->D,D->C), B is in a loop
(B->D->C->B), should not transformed.
|