illegal state exception deob, ff doesnt fully like it yet though

This commit is contained in:
Adam
2015-06-19 23:30:03 -04:00
parent d3142d83ce
commit 98d85c646b
7 changed files with 114 additions and 3 deletions

View File

@@ -98,9 +98,7 @@ public class Instructions
public void buildBlocks()
{
for (Instruction i : instructions)
i.block = null;
blocks.clear();
clearBlockGraph();
Block current = null;
for (Instruction i : instructions)
@@ -122,6 +120,13 @@ public class Instructions
}
}
public void clearBlockGraph()
{
for (Instruction i : instructions)
i.block = null;
blocks.clear();
}
public void write(DataOutputStream out) throws IOException
{
// generate pool indexes

View File

@@ -24,6 +24,13 @@ public class Goto extends Instruction implements JumpingInstruction
length += 2;
}
public Goto(Instructions instructions, Instruction to)
{
super(instructions, InstructionType.GOTO, 0);
this.to = to;
length += 2;
}
@Override
public void resolve()
{

View File

@@ -67,4 +67,9 @@ public class If extends Instruction implements JumpingInstruction
if (to == oldi)
to = newi;
}
public Instruction getTo()
{
return to;
}
}

View File

@@ -68,4 +68,9 @@ public class If0 extends Instruction implements JumpingInstruction
if (to == oldi)
to = newi;
}
public Instruction getTo()
{
return to;
}
}

View File

@@ -45,4 +45,9 @@ public class New extends Instruction
frame.addInstructionContext(ins);
}
public Class getNewClass()
{
return clazz;
}
}