This took awhile to find.

This commit is contained in:
Adam
2016-02-14 15:21:05 -05:00
parent d9fc79bba5
commit 3294e1add0
3 changed files with 24 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ import net.runelite.deob.pool.NameAndType;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.runelite.deob.Method;
import net.runelite.deob.execution.Value;
public class GetField extends Instruction implements GetFieldInstruction
@@ -29,6 +30,13 @@ public class GetField extends Instruction implements GetFieldInstruction
super(instructions, type, pc);
}
@Override
public String toString()
{
Method m = this.getInstructions().getCode().getAttributes().getMethod();
return "getfield " + myField + " in " + m;
}
@Override
public void load(DataInputStream is) throws IOException
{

View File

@@ -17,6 +17,7 @@ import net.runelite.deob.pool.NameAndType;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.runelite.deob.Method;
import net.runelite.deob.execution.Value;
public class GetStatic extends Instruction implements GetFieldInstruction
@@ -36,6 +37,13 @@ public class GetStatic extends Instruction implements GetFieldInstruction
this.field = field;
}
@Override
public String toString()
{
Method m = this.getInstructions().getCode().getAttributes().getMethod();
return "getstatic " + myField + " in " + m;
}
@Override
public void load(DataInputStream is) throws IOException
{

View File

@@ -142,8 +142,14 @@ public class PutField extends Instruction implements SetFieldInstruction
PutField thisPf = (PutField) thisIc.getInstruction(),
otherPf = (PutField) otherIc.getInstruction();
return thisPf.getField().getClassEntry().equals(otherPf.getField().getClassEntry())
&& thisPf.getField().getNameAndType().getDescriptorType().equals(otherPf.getField().getNameAndType().getDescriptorType());
net.runelite.deob.Field f1 = thisPf.getMyField(),
f2 = otherPf.getMyField();
if ((f1 != null) != (f2 != null))
return false;
return f1.getFields().getClassFile().getPoolClass().equals(f2.getFields().getClassFile().getPoolClass())
&& f1.getType().equals(f2.getType());
}
@Override