Package org.objectweb.asm

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


            "(Ljava/lang/String;)Ljava/lang/Class;");
          final Label l1 = new Label();
          c.visitLabel(l1);
          c.visitInsn(ARETURN);
                final Label l2 = new Label();
          c.visitLabel(l2);
          c.visitVarInsn(ASTORE, 1);
          c.visitTypeInsn(NEW, "java/lang/NoClassDefFoundError");
          c.visitInsn(DUP);
          c.visitVarInsn(ALOAD, 1);
          c.visitMethodInsn(INVOKEVIRTUAL, "java/lang/ClassNotFoundException",
View Full Code Here


                mv.visitInsn(DUP);
                mv.visitLdcInsn("Field " + f.getName() + " cannot be accessed: not loaded when the object has been detached");
                mv.visitMethodInsn(INVOKESPECIAL, personality.getDetachedFieldAccessExceptionClassNameSlash(), "<init>", "(Ljava/lang/String;)V");
                mv.visitInsn(ATHROW);
            }
            mv.visitLabel(l1);
        }
       
        //StateItf sa = this.speedoReadIntention(new long[] { ... });
        mv.visitVarInsn(ALOAD, 0);
        generateFieldIdAsLongArray(f, nbField, mv);
View Full Code Here

                    mv.visitLdcInsn("Field " + f.getName()
                            + " cannot be accessed: not loaded when the object has been detached");
                    mv.visitMethodInsn(INVOKESPECIAL, personality.getDetachedFieldAccessExceptionClassNameSlash(), "<init>", "(Ljava/lang/String;)V");
                    mv.visitInsn(ATHROW);
                }
                mv.visitLabel(l5);
                //mark the detached copy as dirty
                //speedoReferenceState.setDetachedStatus(DetachedLifeCycle.DETACHED_DIRTY);
                generateGetRefState(mv, false);
                Util.visitIntConstant(mv, DetachedLifeCycle.DETACHED_DIRTY);
                mv.visitInsn(I2B);
View Full Code Here

                generateGetRefState(mv, false);
                Util.visitIntConstant(mv, DetachedLifeCycle.DETACHED_DIRTY);
                mv.visitInsn(I2B);
                mv.visitMethodInsn(INVOKEVIRTUAL, xfieldsAncestorJCN, "setDetachedStatus", "(B)V");
            }
            mv.visitLabel(l3);
            //(($classNameFields) speedoReferenceState).${f.name} = val;
            generateGetRefState(mv, true);
            mv.visitVarInsn(ft.getOpcode(ILOAD), 1);
            mv.visitFieldInsn(PUTFIELD, xfieldsJCN, f.getName(), ftd);
View Full Code Here

            //return
            mv.visitInsn(RETURN);
        }

        mv.visitLabel(l1);
        //The po is activated
        //Logger logger = ((org.objectweb.jorm.util.api.Loggable) getPClassMapping()).getLogger();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEVIRTUAL, classToWrite, "getPClassMapping",
                "()Lorg/objectweb/jorm/api/PClassMapping;");
View Full Code Here

            cv.visitMethodInsn(INVOKESPECIAL, gc.xJCN, "<init>", "()V");
//            cv.visitVarInsn(ASTORE, 2);
//            cv.visitVarInsn(ALOAD, 2);
            cv.visitTypeInsn(CHECKCAST, "org/objectweb/speedo/mim/api/PersistentObjectItf");
            Label l1 = new Label();
            cv.visitLabel(l1);
            cv.visitInsn(ARETURN);
            Label l2 = new Label();
            cv.visitLabel(l2);
            cv.visitVarInsn(ASTORE, 2);
            cv.visitTypeInsn(NEW, personality.getUserRuntimeExceptionClassNameSlash());
View Full Code Here

            cv.visitTypeInsn(CHECKCAST, "org/objectweb/speedo/mim/api/PersistentObjectItf");
            Label l1 = new Label();
            cv.visitLabel(l1);
            cv.visitInsn(ARETURN);
            Label l2 = new Label();
            cv.visitLabel(l2);
            cv.visitVarInsn(ASTORE, 2);
            cv.visitTypeInsn(NEW, personality.getUserRuntimeExceptionClassNameSlash());
            cv.visitInsn(DUP);
            cv.visitLdcInsn("Impossible to instanciate the class " + gc.classToWriteJCN + ": ");
            cv.visitVarInsn(ALOAD, 2);
View Full Code Here

        mv.visitMethodInsn(INVOKEINTERFACE, JCN_HOME, "getPOManagerFactory",
                "()" + JT_POMF);
        mv.visitMethodInsn(INVOKEINTERFACE, JCN_POMF, "lookup", "()" + JT_POM);
        Label l2 = new Label();
        mv.visitJumpInsn(GOTO, l2);
        mv.visitLabel(l1);
        mv.visitInsn(ACONST_NULL);
        mv.visitLabel(l2);
        mv.visitInsn(ARETURN);
        mv.visitMaxs(0, 0);
    }
View Full Code Here

        mv.visitMethodInsn(INVOKEINTERFACE, JCN_POMF, "lookup", "()" + JT_POM);
        Label l2 = new Label();
        mv.visitJumpInsn(GOTO, l2);
        mv.visitLabel(l1);
        mv.visitInsn(ACONST_NULL);
        mv.visitLabel(l2);
        mv.visitInsn(ARETURN);
        mv.visitMaxs(0, 0);
    }
    private String getJavaWrapper(PType pt) {
        switch (pt.getTypeCode()) {
View Full Code Here

            cv.visitMethodInsn(INVOKEINTERFACE,
                    getJVMClassName(StateItf.class),
                    "indexFieldModified", "(IZ)V");
            cv.visitJumpInsn(GOTO, labelEnd);
        }
        cv.visitLabel(labelElse);
        {
            for (int ucIdx = 0; ucIdx < gc.userCacheNames.length; ucIdx++) {
                String ucn = gc.userCacheNames[ucIdx];
                List fields = (List) gc.ucn2sfs.get(ucn);
                for(Iterator itf = fields.iterator(); itf.hasNext();) {
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.