converting MethodVisitor.visitVarInsn(int opCode, int var) into NOOP?
"gl" (via asm Mailing List) <[email protected]> Fri, 29 Jan 2021 23:39:52 +0100 (CET)
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format...
------------=_1611960458-9996-4
Content-Type: multipart/alternative;
boundary="----=_Part_2391_185537103.1611958480928"
------=_Part_2391_185537103.1611958480928
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
I might have missed pointers in the documentation. With following code:
@Override
public void visitVarInsn(int opCode, int var) {<!-- -->
=C2=A0 newOpCode =3D ???
=C2=A0 newVar =3D ???
=C2=A0 super.visitVarInsn(newOpCode, newVar);
}
What should be the value of newOpCode/newVar call to make the current instr=
uction a NOOP (and still POP the corresponding value)? Using Opcodes.POP fa=
ils with java.lang.VerifyError which is probably expected as POP doesn't ta=
ke an argument. Not making the super call also throws java.lang.VerifyError=
and so does calling super.visitInsn(Opcodes.POP);=
------=_Part_2391_185537103.1611958480928
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
I might have missed pointers in the documentation. With following code:<br />
<br />
@Override<br />
public void visitVarInsn(int opCode, int var) {<br />
  newOpCode = ???<br />
  newVar = ???<br />
  super.visitVarInsn(newOpCode, newVar);<br />
}<br />
<br />
What should be the value of newOpCode/newVar call to make the current instruction a NOOP (and still POP the corresponding value)? Using Opcodes.POP fails with java.lang.VerifyError which is probably expected as POP doesn't take an argument. Not making the super call also throws java.lang.VerifyError and so does calling super.visitInsn(Opcodes.POP);
------=_Part_2391_185537103.1611958480928--
------------=_1611960458-9996-4
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
------------=_1611960458-9996-4--