Preventing duplicate field access

This commit is contained in:
upnotes
2018-10-03 17:19:32 +02:00
parent 5650f57ad2
commit c3ff7141ab
7 changed files with 159 additions and 11 deletions

View File

@@ -0,0 +1,40 @@
package pkg;
public final class TestFieldSingleAccess {
public Integer field;
public final void test() {
Integer var10000 = this.field;
if (var10000 != null) {
System.out.println(var10000);
}
}
public final void test1() {
synchronized(this.field) {
System.out.println('1');
}
}
}
class 'pkg/TestFieldSingleAccess' {
method 'test ()V' {
1 6
5 7
8 8
c 8
f 11
}
method 'test1 ()V' {
1 14
6 14
7 15
a 15
c 15
19 17
}
}
Lines mapping:

View File

@@ -3,7 +3,6 @@ public class TestMethodReferenceSameName {
private void foo() {
TestMethodReferenceSameName.R1 var10000 = this.r;// 5
this.r.getClass();
(var10000::foo).run();
}// 6
@@ -16,19 +15,18 @@ public class TestMethodReferenceSameName {
class 'TestMethodReferenceSameName' {
method 'foo ()V' {
1 4
5 5
e 6
13 7
e 5
13 6
}
}
class 'TestMethodReferenceSameName$R1' {
method 'foo ()V' {
0 11
0 10
}
}
Lines mapping:
5 <-> 5
6 <-> 8
9 <-> 12
6 <-> 7
9 <-> 11