use of net.runelite.asm.execution.StackContext in project runelite by runelite.
the class SALoad method execute.
@Override
public InstructionContext execute(Frame frame) {
InstructionContext ins = new InstructionContext(this, frame);
Stack stack = frame.getStack();
StackContext index = stack.pop();
StackContext array = stack.pop();
ins.pop(index, array);
// sign extend
StackContext ctx = new StackContext(ins, Type.INT, array.getValue().arrayGet(index.getValue()).cast(int.class));
stack.push(ctx);
ins.push(ctx);
return ins;
}
use of net.runelite.asm.execution.StackContext in project runelite by runelite.
the class SAStore method execute.
@Override
public InstructionContext execute(Frame frame) {
InstructionContext ins = new InstructionContext(this, frame);
Stack stack = frame.getStack();
StackContext value = stack.pop();
StackContext index = stack.pop();
StackContext array = stack.pop();
ins.pop(value, index, array);
array.getValue().arraySet(index.getValue(), value.getValue());
return ins;
}
use of net.runelite.asm.execution.StackContext in project runelite by runelite.
the class SiPush method execute.
@Override
public InstructionContext execute(Frame frame) {
InstructionContext ins = new InstructionContext(this, frame);
Stack stack = frame.getStack();
// sign extend
StackContext ctx = new StackContext(ins, Type.INT, new Value((int) s));
stack.push(ctx);
ins.push(ctx);
return ins;
}
use of net.runelite.asm.execution.StackContext in project runelite by runelite.
the class TableSwitch method execute.
@Override
public InstructionContext execute(Frame frame) {
InstructionContext ins = new InstructionContext(this, frame);
Stack stack = frame.getStack();
StackContext value = stack.pop();
ins.pop(value);
for (Label i : branchi) {
Frame other = frame.dup();
other.jump(ins, i);
ins.branch(other);
}
frame.jump(ins, defi);
return ins;
}
use of net.runelite.asm.execution.StackContext in project runelite by runelite.
the class CastNull method visit.
private void visit(InstructionContext ictx) {
if (!(ictx.getInstruction() instanceof CheckCast))
return;
if (notInteresting.contains(ictx.getInstruction()) || interesting.contains(ictx.getInstruction()))
return;
StackContext sctx = ictx.getPops().get(0);
if (sctx.getPushed().getInstruction() instanceof AConstNull) {
interesting.add(ictx.getInstruction());
} else {
interesting.remove(ictx.getInstruction());
notInteresting.add(ictx.getInstruction());
}
}
Aggregations