Search in sources :

Example 11 with VariableContext

use of net.runelite.asm.execution.VariableContext in project runelite by runelite.

the class ILoad method execute.

@Override
public InstructionContext execute(Frame frame) {
    InstructionContext ins = new InstructionContext(this, frame);
    Stack stack = frame.getStack();
    Variables variables = frame.getVariables();
    VariableContext vctx = variables.get(index);
    assert vctx.getType().isStackInt();
    ins.read(vctx);
    StackContext ctx = new StackContext(ins, vctx);
    stack.push(ctx);
    ins.push(ctx);
    return ins;
}
Also used : Variables(net.runelite.asm.execution.Variables) InstructionContext(net.runelite.asm.execution.InstructionContext) StackContext(net.runelite.asm.execution.StackContext) VariableContext(net.runelite.asm.execution.VariableContext) Stack(net.runelite.asm.execution.Stack)

Example 12 with VariableContext

use of net.runelite.asm.execution.VariableContext in project runelite by runelite.

the class IStore method execute.

@Override
public InstructionContext execute(Frame frame) {
    InstructionContext ins = new InstructionContext(this, frame);
    Stack stack = frame.getStack();
    Variables variables = frame.getVariables();
    StackContext value = stack.pop();
    assert value.getType().isStackInt();
    ins.pop(value);
    variables.set(index, new VariableContext(ins, value));
    return ins;
}
Also used : Variables(net.runelite.asm.execution.Variables) InstructionContext(net.runelite.asm.execution.InstructionContext) StackContext(net.runelite.asm.execution.StackContext) VariableContext(net.runelite.asm.execution.VariableContext) Stack(net.runelite.asm.execution.Stack)

Example 13 with VariableContext

use of net.runelite.asm.execution.VariableContext in project runelite by runelite.

the class FLoad method execute.

@Override
public InstructionContext execute(Frame frame) {
    InstructionContext ins = new InstructionContext(this, frame);
    Stack stack = frame.getStack();
    Variables variables = frame.getVariables();
    VariableContext vctx = variables.get(index);
    assert vctx.getType().equals(Type.FLOAT);
    ins.read(vctx);
    StackContext ctx = new StackContext(ins, vctx);
    stack.push(ctx);
    ins.push(ctx);
    return ins;
}
Also used : Variables(net.runelite.asm.execution.Variables) InstructionContext(net.runelite.asm.execution.InstructionContext) StackContext(net.runelite.asm.execution.StackContext) VariableContext(net.runelite.asm.execution.VariableContext) Stack(net.runelite.asm.execution.Stack)

Example 14 with VariableContext

use of net.runelite.asm.execution.VariableContext in project runelite by runelite.

the class FStore method execute.

@Override
public InstructionContext execute(Frame frame) {
    InstructionContext ins = new InstructionContext(this, frame);
    Stack stack = frame.getStack();
    Variables variables = frame.getVariables();
    StackContext value = stack.pop();
    ins.pop(value);
    variables.set(index, new VariableContext(ins, value));
    return ins;
}
Also used : Variables(net.runelite.asm.execution.Variables) InstructionContext(net.runelite.asm.execution.InstructionContext) StackContext(net.runelite.asm.execution.StackContext) VariableContext(net.runelite.asm.execution.VariableContext) Stack(net.runelite.asm.execution.Stack)

Aggregations

InstructionContext (net.runelite.asm.execution.InstructionContext)14 VariableContext (net.runelite.asm.execution.VariableContext)14 Variables (net.runelite.asm.execution.Variables)14 StackContext (net.runelite.asm.execution.StackContext)13 Stack (net.runelite.asm.execution.Stack)11 DupInstruction (net.runelite.asm.attributes.code.instruction.types.DupInstruction)2 LVTInstruction (net.runelite.asm.attributes.code.instruction.types.LVTInstruction)2 Value (net.runelite.asm.execution.Value)2 Instruction (net.runelite.asm.attributes.code.Instruction)1 Instructions (net.runelite.asm.attributes.code.Instructions)1 ArrayLoad (net.runelite.asm.attributes.code.instruction.types.ArrayLoad)1 ConversionInstruction (net.runelite.asm.attributes.code.instruction.types.ConversionInstruction)1 GetFieldInstruction (net.runelite.asm.attributes.code.instruction.types.GetFieldInstruction)1 InvokeInstruction (net.runelite.asm.attributes.code.instruction.types.InvokeInstruction)1 PushConstantInstruction (net.runelite.asm.attributes.code.instruction.types.PushConstantInstruction)1 SetFieldInstruction (net.runelite.asm.attributes.code.instruction.types.SetFieldInstruction)1 BiPush (net.runelite.asm.attributes.code.instructions.BiPush)1 IAdd (net.runelite.asm.attributes.code.instructions.IAdd)1 IInc (net.runelite.asm.attributes.code.instructions.IInc)1 ISub (net.runelite.asm.attributes.code.instructions.ISub)1