use of net.runelite.asm.execution.Stack 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.Stack 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.Stack in project runelite by runelite.
the class InvokeVirtual method execute.
@Override
public InstructionContext execute(Frame frame) {
InstructionContext ins = new InstructionContext(this, frame);
Stack stack = frame.getStack();
int count = method.getType().size();
for (int i = 0; i < count; ++i) {
StackContext arg = stack.pop();
ins.pop(arg);
}
StackContext object = stack.pop();
ins.pop(object);
if (!method.getType().isVoid()) {
StackContext ctx = new StackContext(ins, method.getType().getReturnValue(), Value.UNKNOWN);
stack.push(ctx);
ins.push(ctx);
}
for (net.runelite.asm.Method method : getMethods()) {
ins.invoke(method);
if (method.getCode() == null) {
continue;
}
// add possible method call to execution
Execution execution = frame.getExecution();
execution.invoke(ins, method);
}
if (myMethods != null) {
for (net.runelite.asm.Method method : myMethods) {
frame.getExecution().order(frame, method);
}
}
return ins;
}
use of net.runelite.asm.execution.Stack in project runelite by runelite.
the class L2F 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 LAStore 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