Search in sources :

Example 6 with MultiANewArrayInsnNode

use of org.objectweb.asm.tree.MultiANewArrayInsnNode in project spring-loaded by spring-projects.

the class TypeDiffComputer method sameMultiANewArrayInsn.

private static boolean sameMultiANewArrayInsn(AbstractInsnNode o, AbstractInsnNode n) {
    if (!(n instanceof MultiANewArrayInsnNode)) {
        return false;
    }
    MultiANewArrayInsnNode mnao = (MultiANewArrayInsnNode) o;
    MultiANewArrayInsnNode mnan = (MultiANewArrayInsnNode) n;
    if (!mnao.desc.equals(mnan.desc)) {
        return false;
    }
    if (mnao.dims != mnan.dims) {
        return false;
    }
    return true;
}
Also used : MultiANewArrayInsnNode(org.objectweb.asm.tree.MultiANewArrayInsnNode)

Example 7 with MultiANewArrayInsnNode

use of org.objectweb.asm.tree.MultiANewArrayInsnNode in project maple-ir by LLVM-but-worse.

the class MultiANewArrayInsnNodeSerializer method deserialize.

@Override
public MultiANewArrayInsnNode deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
    JsonObject jsonObject = (JsonObject) json;
    String desc = jsonObject.get("desc").getAsString();
    int dims = jsonObject.get("dims").getAsInt();
    return new MultiANewArrayInsnNode(desc, dims);
}
Also used : MultiANewArrayInsnNode(org.objectweb.asm.tree.MultiANewArrayInsnNode) JsonObject(com.google.gson.JsonObject)

Aggregations

MultiANewArrayInsnNode (org.objectweb.asm.tree.MultiANewArrayInsnNode)7 MethodInsnNode (org.objectweb.asm.tree.MethodInsnNode)4 AbstractInsnNode (org.objectweb.asm.tree.AbstractInsnNode)3 FieldInsnNode (org.objectweb.asm.tree.FieldInsnNode)3 IincInsnNode (org.objectweb.asm.tree.IincInsnNode)3 IntInsnNode (org.objectweb.asm.tree.IntInsnNode)3 TypeInsnNode (org.objectweb.asm.tree.TypeInsnNode)3 VarInsnNode (org.objectweb.asm.tree.VarInsnNode)3 ArrayList (java.util.ArrayList)2 JumpInsnNode (org.objectweb.asm.tree.JumpInsnNode)2 LabelNode (org.objectweb.asm.tree.LabelNode)2 LdcInsnNode (org.objectweb.asm.tree.LdcInsnNode)2 LookupSwitchInsnNode (org.objectweb.asm.tree.LookupSwitchInsnNode)2 TableSwitchInsnNode (org.objectweb.asm.tree.TableSwitchInsnNode)2 JsonObject (com.google.gson.JsonObject)1 ArrayDeque (java.util.ArrayDeque)1 HashSet (java.util.HashSet)1 FrameNode (org.objectweb.asm.tree.FrameNode)1 InsnNode (org.objectweb.asm.tree.InsnNode)1 LineNumberNode (org.objectweb.asm.tree.LineNumberNode)1