use of net.runelite.asm.execution.StackContext 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.StackContext 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.StackContext 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;
}
use of net.runelite.asm.execution.StackContext in project runelite by runelite.
the class FCmpL 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();
if (f1 > f2)
result = new Value(1);
else if (f1 == f2)
result = new Value(0);
else if (f1 < f2)
result = new Value(-1);
}
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 FRem 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();
if (f2 != 0.0f)
result = new Value(f1 % f2);
}
StackContext ctx = new StackContext(ins, Type.FLOAT, result);
stack.push(ctx);
ins.push(ctx);
return ins;
}
Aggregations