Package org.objectweb.asm

Examples of org.objectweb.asm.MethodVisitor.visitTypeInsn()


    mv.visitLabel(l6);
    mv.visitVarInsn(ALOAD, 0);
    mv.visitVarInsn(ALOAD, 2);
    mv.visitInsn(ICONST_0);
    mv.visitMethodInsn(INVOKEVIRTUAL, "com/artemis/utils/Bag", "get", "(I)Ljava/lang/Object;");
    mv.visitTypeInsn(CHECKCAST, typeName);
    mv.visitFieldInsn(GETFIELD, typeName, "$data", "Ljava/nio/ByteBuffer;");
    mv.visitFieldInsn(PUTFIELD, typeName, "$data", "Ljava/nio/ByteBuffer;");
    Label l7 = new Label();
    mv.visitLabel(l7);
    Label l8 = new Label();
View Full Code Here


    mv.visitIntInsn(SIPUSH, ClassMetadataUtil.sizeOf(meta) * 128);
    mv.visitMethodInsn(INVOKESTATIC, "java/nio/ByteBuffer", "allocateDirect", "(I)Ljava/nio/ByteBuffer;");
    mv.visitFieldInsn(PUTFIELD, typeName, "$data", "Ljava/nio/ByteBuffer;");
    Label l9 = new Label();
    mv.visitLabel(l9);
    mv.visitTypeInsn(NEW, "com/artemis/utils/Bag");
    mv.visitInsn(DUP);
    mv.visitMethodInsn(INVOKESPECIAL, "com/artemis/utils/Bag", "<init>", "()V");
    mv.visitVarInsn(ASTORE, 2);
    Label l10 = new Label();
    mv.visitLabel(l10);
View Full Code Here

    mv.visitCode();
    Label l0 = new Label();
    mv.visitLabel(l0);

    mv.visitVarInsn(ALOAD, 1);
    mv.visitTypeInsn(CHECKCAST, "com/artemis/utils/Bag");
    mv.visitMethodInsn(INVOKEVIRTUAL, "com/artemis/utils/Bag", "getData", "()[Ljava/lang/Object;");
    mv.visitVarInsn(ASTORE, 2);
    Label l1 = new Label();
    mv.visitLabel(l1);
View Full Code Here

    mv.visitFrame(Opcodes.F_APPEND,3, new Object[] {"[Ljava/lang/Object;", Opcodes.INTEGER, Opcodes.INTEGER}, 0, null);
    mv.visitVarInsn(ALOAD, 0);
    mv.visitVarInsn(ALOAD, 2);
    mv.visitVarInsn(ILOAD, 3);
    mv.visitInsn(AALOAD);
    mv.visitTypeInsn(CHECKCAST, "com/artemis/Entity");
//    mv.visitMethodInsn(INVOKEVIRTUAL, owner, "process", "(Lcom/artemis/Entity;)V");
    mv.visitMethodInsn(invocation(meta.sysetemOptimizable), owner, "process", "(Lcom/artemis/Entity;)V");
    Label l6 = new Label();
    mv.visitLabel(l6);
View Full Code Here

    mv.visitLabel(l7);
    mv.visitFieldInsn(GETSTATIC, owner, "$store", "Ljava/util/Map;");
    mv.visitVarInsn(ALOAD, 0);
    mv.visitFieldInsn(GETFIELD, owner, "$world", "Lcom/artemis/World;");
    mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;");
    mv.visitTypeInsn(CHECKCAST, "com/artemis/utils/Bag");
    mv.visitMethodInsn(INVOKEVIRTUAL, "com/artemis/utils/Bag", "iterator", "()Ljava/util/Iterator;");
    mv.visitVarInsn(ASTORE, 4);
    Label l8 = new Label();
    mv.visitJumpInsn(GOTO, l8);
    Label l9 = new Label();
View Full Code Here

    Label l9 = new Label();
    mv.visitLabel(l9);
    mv.visitFrame(Opcodes.F_FULL, 5, new Object[] {owner, Opcodes.INTEGER, "java/nio/ByteBuffer", Opcodes.TOP, "java/util/Iterator"}, 0, new Object[] {});
    mv.visitVarInsn(ALOAD, 4);
    mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;");
    mv.visitTypeInsn(CHECKCAST, owner);
    mv.visitVarInsn(ASTORE, 3);
    Label l10 = new Label();
    mv.visitLabel(l10);
    mv.visitVarInsn(ALOAD, 3);
    mv.visitVarInsn(ALOAD, 2);
View Full Code Here

                + ")V", null, null);
        mv2.visitCode();
        Label l3 = new Label();
        mv2.visitLabel(l3);
        mv2.visitVarInsn(ALOAD, 1);
        mv2.visitTypeInsn(CHECKCAST, Type.getInternalName(targetClass));
        mv2.visitVarInsn(ASTORE, 3);
        boolean first = true;
        Label aroundLabel = new Label();
        for (Hierarchy hierarchy : eventHierarchies) {
            if (first) {
View Full Code Here

            if (first) {
                Label l4 = new Label();
                mv2.visitLabel(l4);
            }
            mv2.visitVarInsn(ALOAD, 2);
            mv2.visitTypeInsn(INSTANCEOF, Type.getInternalName(hierarchy.getTop()));

            Label l5 = new Label();
            mv2.visitJumpInsn(IFEQ, l5);

            Label l6 = new Label();
View Full Code Here

            Label l6 = new Label();
            mv2.visitLabel(l6);
            mv2.visitVarInsn(ALOAD, 3);
            mv2.visitVarInsn(ALOAD, 2);
            mv2.visitTypeInsn(CHECKCAST, Type.getInternalName(hierarchy.getTop()));
            mv2.visitMethodInsn(INVOKEVIRTUAL, Type.getInternalName(targetClass), processEventMethodName,
                    "(" + Type.getDescriptor(hierarchy.getTop()) + ")V");
            mv2.visitJumpInsn(Opcodes.GOTO, aroundLabel);
            mv2.visitLabel(l5);
View Full Code Here

    mv.visitInsn(Opcodes.DUP);
    mv.visitInsn(Opcodes.DUP);
    mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
    mv.visitVarInsn(Opcodes.ALOAD, 1);
    mv.visitFieldInsn(Opcodes.PUTFIELD, name, names[0], "Lnet/minecraft/world/storage/ISaveHandler;");
    mv.visitTypeInsn(Opcodes.NEW, "net/minecraft/world/storage/WorldInfo");
    mv.visitInsn(Opcodes.DUP);
    mv.visitVarInsn(Opcodes.ALOAD, 4);
    mv.visitVarInsn(Opcodes.ALOAD, 2);
    mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "net/minecraft/world/storage/WorldInfo", "<init>", "(Lnet/minecraft/world/WorldSettings;Ljava/lang/String;)V");
    mv.visitFieldInsn(Opcodes.PUTFIELD, name, names[1], "Lnet/minecraft/world/storage/WorldInfo;");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.