fixed line numbers when replacing nested access

This commit is contained in:
Egor Ushakov
2018-02-16 20:00:30 +03:00
parent 4a790b1c7c
commit 7310e9e989
4 changed files with 34 additions and 27 deletions

View File

@@ -15,8 +15,8 @@ public class TestAccessReplace {
public class Inner {
public Inner(String b) {
TestAccessReplace.fooS();// 25
TestAccessReplace.this.foo();
TestAccessReplace.fooS();// 26
TestAccessReplace.this.foo();// 27
TestAccessReplace.fooSParams(1L, 2L);// 28
TestAccessReplace.this.fooParams(1L, 2L);// 29
}// 30
@@ -43,14 +43,14 @@ class 'pkg/TestAccessReplace' {
class 'pkg/TestAccessReplace$Inner' {
method '<init> (Lpkg/TestAccessReplace;Ljava/lang/String;)V' {
0 17
1 18
2 19
3 20
9 17
d 18
10 19
11 19
14 19
18 20
19 20
1c 20
1f 21
}
}
@@ -60,10 +60,10 @@ Lines mapping:
20 <-> 8
21 <-> 11
22 <-> 14
25 <-> 18
26 <-> 18
27 <-> 19
28 <-> 20
29 <-> 21
30 <-> 22
Not mapped:
26
27
25

View File

@@ -8,7 +8,7 @@ public class TestClassFields {
static {
sizes = new int[names.length];// 15
TestClassFields.Inner.staticMutable = 3;// 17
SIZE = TestClassFields.Inner.staticMutable;// 14 18
SIZE = TestClassFields.Inner.staticMutable;// 18
}// 19
private static class Inner {
@@ -18,20 +18,20 @@ public class TestClassFields {
class 'pkg/TestClassFields' {
method '<clinit> ()V' {
0 10
2 9
11 8
14 8
17 8
1a 9
1b 9
1f 10
22 10
25 11
}
}
Lines mapping:
14 <-> 11
15 <-> 9
17 <-> 10
18 <-> 11
19 <-> 12
Not mapped:
14

View File

@@ -28,8 +28,8 @@ class TestSyntheticAccess {
}// 19
void incrementS() {
++TestSyntheticAccess.s;// 22 23
}
++TestSyntheticAccess.s;// 22
}// 23
void decrementS() {
TestSyntheticAccess.s--;// 26
@@ -39,46 +39,44 @@ class TestSyntheticAccess {
class 'pkg/TestSyntheticAccess$Assigner' {
method 'assignI (I)V' {
3 8
5 8
9 9
}
method 'assignS (I)V' {
2 12
1 12
5 13
}
}
class 'pkg/TestSyntheticAccess$Incrementer' {
method 'orI ()V' {
1 18
3 18
8 18
b 18
c 18
d 18
11 19
}
method 'incrementI ()V' {
2 22
7 22
4 22
8 23
}
method 'decrementI ()V' {
2 26
6 26
4 26
8 27
}
method 'incrementS ()V' {
0 30
4 30
4 31
}
method 'decrementS ()V' {
0 34
4 35
5 34
}
}
@@ -90,7 +88,7 @@ Lines mapping:
18 <-> 27
19 <-> 28
22 <-> 31
23 <-> 31
23 <-> 32
26 <-> 35
27 <-> 36
32 <-> 9