use of net.runelite.asm.execution.StackContext in project runelite by runelite.
the class I2L method execute.
@Override
public InstructionContext execute(Frame frame) {
InstructionContext ins = new InstructionContext(this, frame);
Stack stack = frame.getStack();
StackContext object = stack.pop();
ins.pop(object);
StackContext ctx = new StackContext(ins, Type.LONG, object.getValue().cast(long.class));
stack.push(ctx);
ins.push(ctx);
return ins;
}
use of net.runelite.asm.execution.StackContext in project runelite by runelite.
the class IALoad 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);
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 IUShR method execute.
@Override
public InstructionContext execute(Frame frame) {
InstructionContext ins = new InstructionContext(this, frame);
Stack stack = frame.getStack();
StackContext two = stack.pop();
StackContext one = stack.pop();
ins.pop(two, one);
Value result = Value.UNKNOWN;
if (!two.getValue().isUnknownOrNull() && !one.getValue().isUnknownOrNull()) {
int i2 = (int) two.getValue().getValue(), i1 = (int) one.getValue().getValue();
result = new Value(i1 >>> i2);
}
StackContext ctx = new StackContext(ins, Type.INT, result);
stack.push(ctx);
ins.push(ctx);
return ins;
}
use of net.runelite.asm.execution.StackContext in project runelite by runelite.
the class LXor method execute.
@Override
public InstructionContext execute(Frame frame) {
InstructionContext ins = new InstructionContext(this, frame);
Stack stack = frame.getStack();
StackContext two = stack.pop();
StackContext one = stack.pop();
ins.pop(two, one);
Value result = Value.UNKNOWN;
if (!two.getValue().isUnknownOrNull() && !one.getValue().isUnknownOrNull()) {
long l2 = (long) two.getValue().getValue(), l1 = (long) one.getValue().getValue();
result = new Value(l1 ^ l2);
}
StackContext ctx = new StackContext(ins, Type.LONG, result);
stack.push(ctx);
ins.push(ctx);
return ins;
}
use of net.runelite.asm.execution.StackContext in project runelite by runelite.
the class LookupSwitch 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);
// from the non-default branch
for (Label i : branchi) {
Frame other = frame.dup();
other.jump(ins, i);
ins.branch(other);
}
frame.jump(ins, defi);
return ins;
}
Aggregations