Fix for rubish labels inside captured field access chains
This commit is contained in:
@@ -83,10 +83,13 @@ public class FieldRemapper {
|
||||
insnNode.name = "$$$" + insnNode.name;
|
||||
insnNode.setOpcode(Opcodes.GETSTATIC);
|
||||
|
||||
for (int i = 0; i < currentInstruction; i++) {
|
||||
AbstractInsnNode toRemove = capturedFieldAccess.get(i);
|
||||
node.instructions.remove(toRemove);
|
||||
AbstractInsnNode next = capturedFieldAccess.get(0);
|
||||
while (next != insnNode) {
|
||||
AbstractInsnNode toDelete = next;
|
||||
next = next.getNext();
|
||||
node.instructions.remove(toDelete);
|
||||
}
|
||||
|
||||
transformed = capturedFieldAccess.get(capturedFieldAccess.size() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,7 +429,11 @@ public class MethodInliner {
|
||||
List<AbstractInsnNode> fieldAccessChain = new ArrayList<AbstractInsnNode>();
|
||||
fieldAccessChain.add(aload0);
|
||||
AbstractInsnNode next = aload0.getNext();
|
||||
while (next != null && next instanceof FieldInsnNode) {
|
||||
while (next != null && next instanceof FieldInsnNode || next instanceof LabelNode) {
|
||||
if (next instanceof LabelNode) {
|
||||
next = next.getNext();
|
||||
continue; //it will be delete on transformation
|
||||
}
|
||||
fieldAccessChain.add(next);
|
||||
if ("this$0".equals(((FieldInsnNode) next).name)) {
|
||||
next = next.getNext();
|
||||
|
||||
Reference in New Issue
Block a user