More instructions

This commit is contained in:
Adam
2014-12-03 14:50:21 -05:00
parent 81095be5da
commit 98b4025a81
38 changed files with 960 additions and 39 deletions

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class DAdd extends Instruction
{
public DAdd(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double two = (Double) stack.pop();
Double one = (Double) stack.pop();
stack.push(one + two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class DDiv extends Instruction
{
public DDiv(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double two = (Double) stack.pop();
Double one = (Double) stack.pop();
stack.push(one / two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class DMul extends Instruction
{
public DMul(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double two = (Double) stack.pop();
Double one = (Double) stack.pop();
stack.push(one * two);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class DNeg extends Instruction
{
public DNeg(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double value = (Double) stack.pop();
stack.push(-value);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class DRem extends Instruction
{
public DRem(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double two = (Double) stack.pop();
Double one = (Double) stack.pop();
stack.push(one % two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class DSub extends Instruction
{
public DSub(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double two = (Double) stack.pop();
Double one = (Double) stack.pop();
stack.push(one - two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class FAdd extends Instruction
{
public FAdd(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Float one = (Float) stack.pop();
Float two = (Float) stack.pop();
stack.push(one + two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class FDiv extends Instruction
{
public FDiv(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Float two = (Float) stack.pop();
Float one = (Float) stack.pop();
stack.push(one / two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class FMul extends Instruction
{
public FMul(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Float two = (Float) stack.pop();
Float one = (Float) stack.pop();
stack.push(one * two);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class FNeg extends Instruction
{
public FNeg(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Float value = (Float) stack.pop();
stack.push(-value);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class FRem extends Instruction
{
public FRem(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Float two = (Float) stack.pop();
Float one = (Float) stack.pop();
stack.push(one % two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class FSub extends Instruction
{
public FSub(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Float two = (Float) stack.pop();
Float one = (Float) stack.pop();
stack.push(one - two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IAdd extends Instruction
{
public IAdd(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one + two);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IAnd extends Instruction
{
public IAnd(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one & two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IDiv extends Instruction
{
public IDiv(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double two = (Double) stack.pop();
Double one = (Double) stack.pop();
stack.push(one / two);
}
}

View File

@@ -4,6 +4,7 @@ import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IMul extends Instruction
{
@@ -15,8 +16,11 @@ public class IMul extends Instruction
@Override
public void execute(Frame frame)
{
Integer one = (Integer) frame.getStack().pop(), two = (Integer) frame.getStack().pop();
int result = one.intValue() * two.intValue();
frame.getStack().push(result);
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one * two);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class INeg extends Instruction
{
public INeg(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer value = (Integer) stack.pop();
stack.push(-value);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IOr extends Instruction
{
public IOr(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one | two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IRem extends Instruction
{
public IRem(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one % two);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IShL extends Instruction
{
public IShL(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one << (two & 0x1F));
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IShR extends Instruction
{
public IShR(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one >> (two & 0x1F));
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class ISub extends Instruction
{
public ISub(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one - two);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IUShR extends Instruction
{
public IUShR(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one >>> (two & 0x1F));
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IXor extends Instruction
{
public IXor(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one ^ two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LAdd extends Instruction
{
public LAdd(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one + two);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LAnd extends Instruction
{
public LAnd(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one & two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LDiv extends Instruction
{
public LDiv(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one / two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LMul extends Instruction
{
public LMul(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one * two);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LNeg extends Instruction
{
public LNeg(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long value = (Long) stack.pop();
stack.push(-value);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LOr extends Instruction
{
public LOr(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one | two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LRem extends Instruction
{
public LRem(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one % two);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LShL extends Instruction
{
public LShL(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one << (two & 0x3F));
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LShR extends Instruction
{
public LShR(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one >> (two & 0x3F));
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LSub extends Instruction
{
public LSub(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one - two);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LUShR extends Instruction
{
public LUShR(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one >>> (two & 0x3F));
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LXor extends Instruction
{
public LXor(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one ^ two);
}
}

View File

@@ -0,0 +1,27 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class Swap extends Instruction
{
public Swap(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Object one = stack.pop();
Object two = stack.pop();
stack.push(one);
stack.push(two);
}
}