<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi all,</div><div class=""><br class=""></div>I am using soot to generate bytecode, and from there I generate Java code using a decompiler.<div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">My question is:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>I generate an assign stmt in which I capture the return value of a call, this includes defining the proper Local (named returnValue)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>and adding it into the locals of the method. </div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><b class="">The local at this point is not used anymore</b> (*)</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>After generating the byte code and decompiling it, there’s no variable returnValue. I suspect soot is optimizing the bytecode</div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>and removes away the return value, since it is not used.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>If I am correct, is there a way to change this behavior?</div><div class=""><br class=""></div><div class="">Best</div><div class=""><br class=""></div><div class="">— Alessio<br class=""><div class=""><br class=""></div><div class=""><div apple-content-edited="true" class=""><br class="">

</div>(*) This is part of a large pipeline, and later stages will elaborate on this local variable, so it cannot be freely modified.</div></div></body></html>