fix(java-input): fix dup2_x1 stack to regs conversion for wide types (#2755)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package jadx.tests.integration.jbc;
|
||||
|
||||
import jadx.tests.api.IntegrationTest;
|
||||
import jadx.tests.api.extensions.profiles.TestProfile;
|
||||
import jadx.tests.api.extensions.profiles.TestWithProfiles;
|
||||
|
||||
import static jadx.tests.api.utils.assertj.JadxAssertions.assertThat;
|
||||
|
||||
public class TestDup2x1 extends IntegrationTest {
|
||||
|
||||
@SuppressWarnings({ "FieldCanBeLocal", "checkstyle:InnerAssignment", "unused" })
|
||||
public static class TestCls {
|
||||
private long value;
|
||||
|
||||
public long setValue(long v) {
|
||||
return this.value = v;
|
||||
}
|
||||
}
|
||||
|
||||
@TestWithProfiles(TestProfile.JAVA11)
|
||||
public void test() {
|
||||
assertThat(getClassNode(TestCls.class))
|
||||
.code()
|
||||
.containsOne("this.value = v;");
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -310,7 +310,7 @@ public class JavaInsnsRegister {
|
||||
s.peekFrom(4, 8).peekFrom(1, 9);
|
||||
} else {
|
||||
s.insn().setRegsCount(6);
|
||||
s.insert(2, WIDE);
|
||||
s.insert(1, WIDE);
|
||||
s.peekFrom(0, 0).peekFrom(1, 1);
|
||||
s.peekFrom(1, 2).peekFrom(2, 3);
|
||||
s.peekFrom(2, 4).peekFrom(0, 5);
|
||||
|
||||
Reference in New Issue
Block a user