Package org.objectweb.asm

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


        mv.visitVarInsn(Opcodes.ALOAD, 2);
        mv.visitVarInsn(Opcodes.ALOAD, 3);
        mv.visitVarInsn(Opcodes.ALOAD, 4);
        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, superClass, "<init>", "(Lorg/codehaus/groovy/runtime/callsite/CallSite;Lgroovy/lang/MetaClassImpl;Lgroovy/lang/MetaMethod;[Ljava/lang/Class;)V");

        mv.visitVarInsn(Opcodes.ALOAD, 5);
        mv.visitFieldInsn(Opcodes.PUTSTATIC, internalName, "__constructor__", "Ljava/lang/reflect/Constructor;");

        mv.visitInsn(Opcodes.RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
View Full Code Here


  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodVisitor mv = new RemoveAddZeroAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(ICONST_0);
    mv.visitInsn(IADD);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
View Full Code Here

  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodVisitor mv = new RemoveLoadStoreAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitVarInsn(ISTORE, 1);
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
View Full Code Here

  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodVisitor mv = new RemoveLoadStoreAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitVarInsn(ISTORE, 1);
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
    checkMethod(tmv);
View Full Code Here

    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodVisitor mv = new RemoveLoadStoreAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitVarInsn(ISTORE, 1);
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
    checkMethod(tmv);
  }
View Full Code Here

  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodVisitor mv = new RemoveGetFieldPutFieldAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ALOAD, 0);
    mv.visitVarInsn(ALOAD, 0);
    mv.visitVarInsn(ALOAD, 0);
    mv.visitFieldInsn(GETFIELD, "C", "f", "I");
    mv.visitFieldInsn(PUTFIELD, "C", "f", "I");
    mv.visitFieldInsn(GETFIELD, "C", "f", "I");
View Full Code Here

  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodVisitor mv = new RemoveGetFieldPutFieldAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ALOAD, 0);
    mv.visitVarInsn(ALOAD, 0);
    mv.visitVarInsn(ALOAD, 0);
    mv.visitFieldInsn(GETFIELD, "C", "f", "I");
    mv.visitFieldInsn(PUTFIELD, "C", "f", "I");
    mv.visitFieldInsn(GETFIELD, "C", "f", "I");
    mv.visitInsn(IRETURN);
View Full Code Here

    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodVisitor mv = new RemoveGetFieldPutFieldAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ALOAD, 0);
    mv.visitVarInsn(ALOAD, 0);
    mv.visitVarInsn(ALOAD, 0);
    mv.visitFieldInsn(GETFIELD, "C", "f", "I");
    mv.visitFieldInsn(PUTFIELD, "C", "f", "I");
    mv.visitFieldInsn(GETFIELD, "C", "f", "I");
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
View Full Code Here

  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodVisitor mv;
    mv = new RemoveNopClassAdapter(null).new RemoveNopAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(ICONST_0);
    mv.visitInsn(IADD);
    mv.visitInsn(NOP);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
View Full Code Here

  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodVisitor mv = new BasicVerifierAdapter("C", ACC_PUBLIC, "m",
        "(I)I", tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(ICONST_0);
    mv.visitInsn(IADD);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(2, 2);
    mv.visitEnd();
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.