use of net.runelite.asm.execution.Stack in project runelite by runelite.
the class BAStore 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.Stack in project runelite by runelite.
the class AConstNull method execute.
@Override
public InstructionContext execute(Frame frame) {
InstructionContext ins = new InstructionContext(this, frame);
Stack stack = frame.getStack();
StackContext ctx = new StackContext(ins, Type.OBJECT, Value.NULL);
stack.push(ctx);
ins.push(ctx);
return ins;
}
use of net.runelite.asm.execution.Stack in project runelite by runelite.
the class FSub 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()) {
float f2 = (float) two.getValue().getValue(), f1 = (float) one.getValue().getValue();
result = new Value(f1 - f2);
}
StackContext ctx = new StackContext(ins, Type.FLOAT, result);
stack.push(ctx);
ins.push(ctx);
return ins;
}
use of net.runelite.asm.execution.Stack in project runelite by runelite.
the class I2F 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.FLOAT, object.getValue().cast(float.class));
stack.push(ctx);
ins.push(ctx);
return ins;
}
use of net.runelite.asm.execution.Stack in project runelite by runelite.
the class I2S 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);
// sign extended
StackContext ctx = new StackContext(ins, Type.INT, object.getValue().cast(int.class));
stack.push(ctx);
ins.push(ctx);
return ins;
}
Aggregations