Package org.ow2.easybeans.asm.util

Examples of org.ow2.easybeans.asm.util.TraceMethodVisitor.visitMaxs()


                null);
        mv.visitCode();
        mv.visitInsn(ICONST_1);
        mv.visitFieldInsn(PUTSTATIC, "pkg/Insns", "s", "S");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }
}
View Full Code Here


        for (int i = 0; i < 256; ++i) {
            mv.visitLdcInsn(Integer.toString(i)); // wide form
            mv.visitInsn(POP);
        }
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        mv = cw.visitMethod(ACC_PUBLIC, "wideLocals", "(I)I", null, null);
        mv.visitCode();
        Label l0 = new Label();
View Full Code Here

        }
        mv.visitInsn(ICONST_0);
        mv.visitJumpInsn(IFEQ, l0); // will give long backward jump
        mv.visitJumpInsn(GOTO, l0); // will give long backward goto

        mv.visitMaxs(0, 0);
        mv.visitEnd();

        cw.visitEnd();

        return cw.toByteArray();
View Full Code Here

                new EmptyVisitor(),
                new HashMap<Label, Integer>());
        mv.visitCode();
        mv.visitVarInsn(ILOAD, 1);
        mv.visitInsn(IRETURN);
        mv.visitMaxs(1, 2);
        try {
            mv.visitEnd();
            fail();
        } catch (Exception e) {
        }
View Full Code Here

                "(I)I",
                new EmptyVisitor(),
                new HashMap<Label, Integer>());
        mv.visitCode();
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 2);
        try {
            mv.visitEnd();
            fail();
        } catch (Exception e) {
        }
View Full Code Here

    }

    public void testIllegalInsnVisitAfterEnd() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        mv.visitMaxs(0, 0);
        try {
            mv.visitInsn(NOP);
            fail();
        } catch (Exception e) {
        }
View Full Code Here

        mv.visitLabel(l1);
        mv.visitLineNumber(3, l1);
        mv.visitInsn(RETURN);
        mv.visitLabel(l2);
        mv.visitLocalVariable("this", "Lpkg/Debug;", "Lpkg/Debug;", l0, l2, 0);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        cw.visitEnd();

        return cw.toByteArray();
View Full Code Here

        mv.visitInsn(DCONST_0);
        mv.visitVarInsn(DSTORE, 4);
        mv.visitVarInsn(RET, 3);
        mv.visitLabel(l5);
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        cw.visitEnd();

        return cw.toByteArray();
View Full Code Here

        mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        mv = cw.visitMethod(ACC_PUBLIC, "backwardJSR", "([I)V", null, null);
        mv.visitCode();
        Label l0 = new Label();
View Full Code Here

        mv.visitLabel(l3);
        mv.visitVarInsn(ALOAD, 2);
        mv.visitInsn(ATHROW);
        mv.visitLabel(l5);
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        cw.visitEnd();

        return cw.toByteArray();
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.