Package org.objectweb.asm

Examples of org.objectweb.asm.CodeVisitor.visitVarInsn()


        mv.visitMethodInsn(INVOKEVIRTUAL, classToWrite, "speedoWriteIntention",
                "([J)" + JT_STATE);
        mv.visitTypeInsn(CHECKCAST, xfieldsJCN);
        final int stateIdx = nextLocalVarIdx;
        nextLocalVarIdx++;
        mv.visitVarInsn(ASTORE, stateIdx);

        if (f.getIsReference()) {
            generateReferenceSetter(f, ft, nbField, loggerIdx, stateIdx, nextLocalVarIdx, mv);
        } else {
            mv.visitVarInsn(ALOAD, stateIdx);
View Full Code Here


        mv.visitVarInsn(ASTORE, stateIdx);

        if (f.getIsReference()) {
            generateReferenceSetter(f, ft, nbField, loggerIdx, stateIdx, nextLocalVarIdx, mv);
        } else {
            mv.visitVarInsn(ALOAD, stateIdx);
            mv.visitVarInsn(ft.getOpcode(ILOAD), 1);
            mv.visitFieldInsn(PUTFIELD, xfieldsJCN, f.getName(), ftd);
        }
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
View Full Code Here

        if (f.getIsReference()) {
            generateReferenceSetter(f, ft, nbField, loggerIdx, stateIdx, nextLocalVarIdx, mv);
        } else {
            mv.visitVarInsn(ALOAD, stateIdx);
            mv.visitVarInsn(ft.getOpcode(ILOAD), 1);
            mv.visitFieldInsn(PUTFIELD, xfieldsJCN, f.getName(), ftd);
        }
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
    }
View Full Code Here

        } else if (f.getIsxMRelation()) {
            //The coherency management is done on the GenClass implementation
            // by the setElements method (see the normal setter)
           
            //${f.setter}(val);
            mv.visitVarInsn(ALOAD, 0);
            mv.visitVarInsn(ft.getOpcode(ILOAD), 1);
            mv.visitMethodInsn(INVOKEVIRTUAL, classToWrite, f.getSetter(),
                    "(" + ftd + ")V");
        }
        mv.visitInsn(RETURN);
View Full Code Here

            //The coherency management is done on the GenClass implementation
            // by the setElements method (see the normal setter)
           
            //${f.setter}(val);
            mv.visitVarInsn(ALOAD, 0);
            mv.visitVarInsn(ft.getOpcode(ILOAD), 1);
            mv.visitMethodInsn(INVOKEVIRTUAL, classToWrite, f.getSetter(),
                    "(" + ftd + ")V");
        }
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
View Full Code Here

    private void generateSpeedoElementAddedMethod() {
        CodeVisitor mv;
        mv = cv.visitMethod(ACC_PUBLIC, "speedoElementAdded",
                "(Ljava/lang/Object;I)V", null, null);
        //${classNameFields}.speedoElementAdded(elem, gcid, this);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitVarInsn(ILOAD, 2);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESTATIC, xfieldsJCN, "speedoElementAdded",
                "(Ljava/lang/Object;I" + JT_PO + ")V");
        mv.visitInsn(RETURN);
View Full Code Here

        CodeVisitor mv;
        mv = cv.visitMethod(ACC_PUBLIC, "speedoElementAdded",
                "(Ljava/lang/Object;I)V", null, null);
        //${classNameFields}.speedoElementAdded(elem, gcid, this);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitVarInsn(ILOAD, 2);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESTATIC, xfieldsJCN, "speedoElementAdded",
                "(Ljava/lang/Object;I" + JT_PO + ")V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
View Full Code Here

        mv = cv.visitMethod(ACC_PUBLIC, "speedoElementAdded",
                "(Ljava/lang/Object;I)V", null, null);
        //${classNameFields}.speedoElementAdded(elem, gcid, this);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitVarInsn(ILOAD, 2);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESTATIC, xfieldsJCN, "speedoElementAdded",
                "(Ljava/lang/Object;I" + JT_PO + ")V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
    }
View Full Code Here

    private void generateSpeedoElementRemovedMethod() {
        CodeVisitor mv;
        mv = cv.visitMethod(ACC_PUBLIC, "speedoElementRemoved",
                "(Ljava/lang/Object;I)V", null, null);
        //${classNameFields}.speedoElementRemoved(elem, gcid, this);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitVarInsn(ILOAD, 2);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESTATIC, xfieldsJCN, "speedoElementRemoved",
                "(Ljava/lang/Object;I" + JT_PO + ")V");
        mv.visitInsn(RETURN);
View Full Code Here

        CodeVisitor mv;
        mv = cv.visitMethod(ACC_PUBLIC, "speedoElementRemoved",
                "(Ljava/lang/Object;I)V", null, null);
        //${classNameFields}.speedoElementRemoved(elem, gcid, this);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitVarInsn(ILOAD, 2);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESTATIC, xfieldsJCN, "speedoElementRemoved",
                "(Ljava/lang/Object;I" + JT_PO + ")V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
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.