Class LocalSplitter

java.lang.Object
sootup.interceptors.LocalSplitter
All Implemented Interfaces:
BodyInterceptor

public class LocalSplitter extends Object implements BodyInterceptor
A BodyInterceptor that attempts to identify and separate uses of a local variable (definition) that are independent of each other. This is necessary as the AsmMethodSource maps usages of the same Local index to the same Local object, which can lead to wrong Jimple e.g. when a primitive type gets merged with a reference-type and augmenting the type of the Local is less precise.

For example the code:

    l0 := @this Test
    l1 = 0
    l2 = 1
    l1 = l1 + 1
    l2 = l2 + 1
    return
 

to:

    l0 := @this Test
    l1#0 = 0
    l2#0 = 1
    l1#1 = l1#0 + 1
    l2#1 = l2#0 + 1
    return