<div dir="ltr">I try to initialize, and after this I have:<div><br><div><div>iconst_0 </div><div>istore_1 </div><div>iinc_w #1, 1 </div></div></div><div><br></div><div>So, it isn't help.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-04 2:08 GMT+03:00 Elena Sherman <span dir="ltr"><<a href="mailto:elenasherman@boisestate.edu" target="_blank">elenasherman@boisestate.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Roman,<div><br></div><div>Shouldn't you first initialize intLocal before using it in the addition expression? </div><div>For example to 0 :</div><div><br></div><div>AssignStmt as1 = Jimple.v().newAssignStmt(intLocal, IntConstant.v(0));<br>units.add(as1);<span class=""><br>AssignStmt as2 = Jimple.v().newAssignStmt(intLocal, Jimple.v().newAddExpr(intLocal, IntConstant.v(500)));<br>units.add(as2);</span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Feb 3, 2015 at 2:38 PM, Roman Petriev <span dir="ltr"><<a href="mailto:vvpiroman@gmail.com" target="_blank">vvpiroman@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hello everybody!<div>I have code:</div><div><br></div><div><div>Local intLocal = Jimple.v().newLocal("myInt", IntType.v());</div><div>body.getLocals().add(intLocal);</div></div><div><div>AssignStmt as2 = Jimple.v().newAssignStmt(intLocal, Jimple.v().newAddExpr(intLocal, IntConstant.v(500)));</div><div>units.add(as2);</div></div><div><br></div><div>So I want to increase local variable on 500. </div><div>In byte code after transformation I see:</div><div><br></div><div>iinc_w #5, 1<br></div><div><br></div><div>Why 1 instead of 500? Where I mistake?</div><div><br></div><div>Thanks for any help.</div><div><br></div><div>Best regards, </div><span><font color="#888888"><div>Roman.</div></font></span></div>
<br></div></div>_______________________________________________<br>
Soot-list mailing list<br>
<a href="mailto:Soot-list@CS.McGill.CA" target="_blank">Soot-list@CS.McGill.CA</a><br>
<a href="https://mailman.CS.McGill.CA/mailman/listinfo/soot-list" target="_blank">https://mailman.CS.McGill.CA/mailman/listinfo/soot-list</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>