Package sootup.interceptors
Class CastAndReturnInliner
java.lang.Object
sootup.interceptors.CastAndReturnInliner
- All Implemented Interfaces:
BodyInterceptor
Transformers that inlines returns that cast and return an object. We take
a = ...; goto label0; label0: b = (B) a; return b;and transform it into
a = ...; return a;This makes it easier for the local splitter to split distinct uses of the same variable. Imagine that "a" can come from different parts of the code and have different types. To be able to find a valid typing at all, we must break apart the uses of "a".
- Author:
- Steven Arzt, Christian Brüggemann, Marcus Nachtigall, Markus Schmidt
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
interceptBody
(Body.BodyBuilder builder, View view) Takes a BodyBuilder and may apply a transformation to it, for example removing unused local variables.
-
Constructor Details
-
CastAndReturnInliner
public CastAndReturnInliner()
-
-
Method Details
-
interceptBody
Description copied from interface:BodyInterceptor
Takes a BodyBuilder and may apply a transformation to it, for example removing unused local variables.- Specified by:
interceptBody
in interfaceBodyInterceptor
-