use of net.runelite.asm.execution.InstructionContext 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.InstructionContext 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;
}
use of net.runelite.asm.execution.InstructionContext in project runelite by runelite.
the class MultiANewArray method execute.
@Override
public InstructionContext execute(Frame frame) {
InstructionContext ins = new InstructionContext(this, frame);
Stack stack = frame.getStack();
Value[] lenghts = new Value[dimensions];
for (int i = 0; i < dimensions; ++i) {
StackContext ctx = stack.pop();
ins.pop(ctx);
lenghts[i] = ctx.getValue();
}
StackContext ctx = new StackContext(ins, type, Value.newArray(lenghts));
stack.push(ctx);
ins.push(ctx);
return ins;
}
use of net.runelite.asm.execution.InstructionContext in project runelite by runelite.
the class New method execute.
@Override
public InstructionContext execute(Frame frame) {
InstructionContext ins = new InstructionContext(this, frame);
Stack stack = frame.getStack();
StackContext ctx = new StackContext(ins, Type.getType(clazz), Value.UNKNOWN);
stack.push(ctx);
ins.push(ctx);
return ins;
}
use of net.runelite.asm.execution.InstructionContext in project runelite by runelite.
the class FAStore 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;
}
Aggregations