Package org.objectweb.asm

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


            // bind();
            rule.getEvent().compile(mv, compileContext);
            // if (test())
            rule.getCondition().compile(mv, compileContext);
            Label l0 = new Label();
            mv.visitJumpInsn(IFEQ, l0);
            compileContext.addStackCount(-1);
            // then
            rule.getAction().compile(mv, compileContext);
            // fire();
            // end if
View Full Code Here


            mv.visitMethodInsn(INVOKESPECIAL, compiledHelperName, "bind", "()V");
            // if (test())
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESPECIAL, compiledHelperName, "test", "()Z");
            Label l0 = new Label();
            mv.visitJumpInsn(IFEQ, l0);
            // then
            // fire();
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESPECIAL, compiledHelperName, "fire", "()V");
            // end if
View Full Code Here

            mv = cw.visitMethod(ACC_PUBLIC, "execute", "(Ljava/lang/Object;[Ljava/lang/Object;)V", null, new String[] { "org/jboss/byteman/rule/exception/ExecuteException" });
            mv.visitCode();
            // if (Transformer.isVerbose())
            mv.visitMethodInsn(INVOKESTATIC, "org/jboss/byteman/agent/Transformer", "isVerbose", "()Z");
            Label l0 = new Label();
            mv.visitJumpInsn(IFEQ, l0);
            // then
            // System.out.println(rule.getName() + " execute");
            mv.visitFieldInsn(GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;");
            mv.visitTypeInsn(NEW, "java/lang/StringBuilder");
            mv.visitInsn(DUP);
View Full Code Here

    mv.visitVarInsn(ASTORE, 2);
    Label l4 = new Label();
    mv.visitLabel(l4);
    mv.visitVarInsn(ALOAD, 2);
    Label l5 = new Label();
    mv.visitJumpInsn(IFNULL, l5);
    Label l6 = new Label();
    mv.visitLabel(l6);
    mv.visitVarInsn(ALOAD, 0);
    mv.visitVarInsn(ALOAD, 2);
    mv.visitInsn(ICONST_0);
View Full Code Here

    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();
    mv.visitJumpInsn(GOTO, l8);
    mv.visitLabel(l5);
    mv.visitFrame(Opcodes.F_FULL, 3, new Object[] {typeName, "com/artemis/World", "com/artemis/utils/Bag"}, 0, new Object[] {});
    mv.visitVarInsn(ALOAD, 0);
    mv.visitIntInsn(SIPUSH, ClassMetadataUtil.sizeOf(meta) * 128);
    mv.visitMethodInsn(INVOKESTATIC, "java/nio/ByteBuffer", "allocateDirect", "(I)Ljava/nio/ByteBuffer;");
View Full Code Here

      mv.visitVarInsn(ALOAD, 0);
      mv.visitFieldInsn(GETFIELD, owner, "$data", "Ljava/nio/ByteBuffer;");
      mv.visitMethodInsn(INVOKEVIRTUAL, "java/nio/ByteBuffer", "capacity", "()I");
      mv.visitVarInsn(ILOAD, 2);
      Label l2 = new Label();
      mv.visitJumpInsn(IF_ICMPGE, l2);
      Label l3 = new Label();
      mv.visitLabel(l3);
      mv.visitVarInsn(ALOAD, 0);
      mv.visitInsn(ICONST_2);
      mv.visitVarInsn(ALOAD, 0);
View Full Code Here

    mv.visitMethodInsn(INVOKEINTERFACE, "com/artemis/utils/ImmutableBag", "size", "()I");
    mv.visitVarInsn(ISTORE, 4);
    Label l3 = new Label();
    mv.visitLabel(l3);
    Label l4 = new Label();
    mv.visitJumpInsn(GOTO, l4);
    Label l5 = new Label();
    mv.visitLabel(l5);

    mv.visitFrame(Opcodes.F_APPEND,3, new Object[] {"[Ljava/lang/Object;", Opcodes.INTEGER, Opcodes.INTEGER}, 0, null);
    mv.visitVarInsn(ALOAD, 0);
View Full Code Here

    mv.visitIincInsn(3, 1);
    mv.visitLabel(l4);
    mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
    mv.visitVarInsn(ILOAD, 4);
    mv.visitVarInsn(ILOAD, 3);
    mv.visitJumpInsn(IF_ICMPGT, l5);
    Label l7 = new Label();
    mv.visitLabel(l7);

    mv.visitInsn(RETURN);
    Label l8 = new Label();
View Full Code Here

    mv.visitMethodInsn(INVOKEVIRTUAL, "java/nio/ByteBuffer", "capacity", "()I");
    mv.visitVarInsn(ISTORE, 4);
    Label l3 = new Label();
    mv.visitLabel(l3);
    Label l4 = new Label();
    mv.visitJumpInsn(GOTO, l4);
    Label l5 = new Label();
    mv.visitLabel(l5);
    mv.visitFrame(Opcodes.F_APPEND,3, new Object[] {"java/nio/ByteBuffer", Opcodes.INTEGER, Opcodes.INTEGER}, 0, null);
    mv.visitVarInsn(ALOAD, 2);
    mv.visitVarInsn(ILOAD, 3);
View Full Code Here

    mv.visitIincInsn(3, 1);
    mv.visitLabel(l4);
    mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
    mv.visitVarInsn(ILOAD, 4);
    mv.visitVarInsn(ILOAD, 3);
    mv.visitJumpInsn(IF_ICMPGT, l5);
    Label l7 = new Label();
    mv.visitLabel(l7);
    mv.visitFieldInsn(GETSTATIC, owner, "$store", "Ljava/util/Map;");
    mv.visitVarInsn(ALOAD, 0);
    mv.visitFieldInsn(GETFIELD, owner, "$world", "Lcom/artemis/World;");
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.