Search in sources :

Example 16 with Frame

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

the class If0 method map.

// duplicated from If
@Override
public void map(ParallelExecutorMapping mapping, InstructionContext ctx, InstructionContext other) {
    Frame branch1 = ctx.getBranches().get(0), branch2 = other.getBranches().get(0);
    assert branch1.other == null;
    assert branch2.other == null;
    branch1.setOther(branch2);
    branch2.setOther(branch1);
    this.mapArguments(mapping, ctx, other);
}
Also used : Frame(net.runelite.asm.execution.Frame)

Example 17 with Frame

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

the class If0 method mapOtherBranch.

// duplicated from If
protected void mapOtherBranch(ParallelExecutorMapping mapping, InstructionContext ctx, InstructionContext other) {
    Frame f1 = ctx.getFrame(), f2 = other.getFrame(), branch1 = ctx.getBranches().get(0), branch2 = other.getBranches().get(0);
    assert branch1.other == null;
    assert branch2.other == null;
    // currently f1 <-> f2
    assert f1.other == f2;
    assert f2.other == f1;
    // change to f1 <-> branch2, f2 <-> branch1
    f1.other = branch2;
    branch2.other = f1;
    f2.other = branch1;
    branch1.other = f2;
    this.mapArguments(mapping, ctx, other);
}
Also used : Frame(net.runelite.asm.execution.Frame)

Aggregations

Frame (net.runelite.asm.execution.Frame)17 InstructionContext (net.runelite.asm.execution.InstructionContext)12 Stack (net.runelite.asm.execution.Stack)8 StackContext (net.runelite.asm.execution.StackContext)7 Instructions (net.runelite.asm.attributes.code.Instructions)5 Label (net.runelite.asm.attributes.code.Label)4 Execution (net.runelite.asm.execution.Execution)4 ClassGroup (net.runelite.asm.ClassGroup)3 Instruction (net.runelite.asm.attributes.code.Instruction)3 Variables (net.runelite.asm.execution.Variables)3 Test (org.junit.Test)3 ArrayList (java.util.ArrayList)2 Collections (java.util.Collections)2 List (java.util.List)2 Collectors (java.util.stream.Collectors)2 ClassFile (net.runelite.asm.ClassFile)2 Method (net.runelite.asm.Method)2 InstructionType (net.runelite.asm.attributes.code.InstructionType)2 LVTInstruction (net.runelite.asm.attributes.code.instruction.types.LVTInstruction)2 MappableInstruction (net.runelite.asm.attributes.code.instruction.types.MappableInstruction)2