Examples of visitIntInsn()


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

        "java/lang/System", "err", "Ljava/io/PrintStream;");
      sv.visitLdcInsn("_set" + name + " called");
      sv.visitMethodInsn(INVOKEVIRTUAL,
        "java/io/PrintStream", "println", "(Ljava/lang/String;)V");
      sv.visitVarInsn(ALOAD, 0);
      sv.visitIntInsn(t.getOpcode(ILOAD), 1);
      sv.visitFieldInsn(PUTFIELD, owner, name, desc);
      sv.visitInsn(RETURN);
      sv.visitMaxs(1 + size, 1 + size);
    }
  }
View Full Code Here

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

                receiver.visit(controller.getAcg());
                operandStack.doGroovyCast(target.getDeclaringClass());
                compileStack.popImplicitThis();
                argumentsToRemove++;
            } else {
                mv.visitIntInsn(ALOAD,0);
            }
        }
       
        // load arguments
        Parameter[] para = target.getParameters();
View Full Code Here

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

      Label l1 = new Label();
      mv.visitLabel(l1);
      mv.visitTypeInsn(NEW, "org/renjin/eval/DoubleVector");
      mv.visitInsn(DUP);
      mv.visitInsn(ICONST_1);
      mv.visitIntInsn(NEWARRAY, T_DOUBLE);
      mv.visitInsn(DUP);
      mv.visitInsn(ICONST_0);
      mv.visitLdcInsn(new Double("42.0"));
      mv.visitInsn(DASTORE);
      mv.visitMethodInsn(INVOKESPECIAL, "org/renjin/eval/DoubleVector", "<init>", "([D)V");
View Full Code Here

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

      mv.visitInsn(DASTORE);
      mv.visitMethodInsn(INVOKESPECIAL, "org/renjin/eval/DoubleVector", "<init>", "([D)V");
      mv.visitTypeInsn(NEW, "org/renjin/eval/DoubleVector");
      mv.visitInsn(DUP);
      mv.visitInsn(ICONST_1);
      mv.visitIntInsn(NEWARRAY, T_DOUBLE);
      mv.visitInsn(DUP);
      mv.visitInsn(ICONST_0);
      mv.visitInsn(DCONST_1);
      mv.visitInsn(DASTORE);
      mv.visitMethodInsn(INVOKESPECIAL, "org/renjin/eval/DoubleVector", "<init>", "([D)V");
View Full Code Here

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

    mv.visitJumpInsn(GOTO, l3);
    mv.visitLabel(l4);

    // return result
    mv.visitInsn(ICONST_1);
    mv.visitIntInsn(NEWARRAY, T_DOUBLE);
    mv.visitInsn(DUP);
    mv.visitInsn(ICONST_0);
    mv.visitVarInsn(DLOAD, sumLocal);
    mv.visitVarInsn(ILOAD, lengthLocal);
    mv.visitInsn(I2D);
View Full Code Here

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

    numRows.pushInt(method);
    mv.visitInsn(DUP);
    mv.visitVarInsn(ISTORE, numRowsLocal);

    // create array (size still on stack)
    mv.visitIntInsn(NEWARRAY, T_DOUBLE);
    mv.visitVarInsn(ASTORE, meansLocal);

    // initialize counter
    mv.visitInsn(ICONST_0);
    mv.visitVarInsn(ISTORE, rowLocal);
View Full Code Here

Examples of org.objectweb.asm.commons.GeneratorAdapter.visitIntInsn()

    section().getArrayAccessorForConstDataOnly( this.arrayNode ).compileCall( mv );
    int i = 0;
    for (ExpressionNode elt : this.arrayNode.arguments()) {
      if (!(elt instanceof ExpressionNodeForConstantValue)) {
        mv.visitInsn( Opcodes.DUP );
        mv.visitIntInsn( Opcodes.BIPUSH, i );
        eltCompiler.compile( elt );
        mv.arrayStore( eltType );
      }
      i++;
    }
View Full Code Here

Examples of org.ow2.asm.MethodVisitor.visitIntInsn()

    public void testIllegalByteInsnOperand() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitIntInsn(BIPUSH, Integer.MAX_VALUE);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

Examples of org.ow2.asm.MethodVisitor.visitIntInsn()

    public void testIllegalShortInsnOperand() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitIntInsn(SIPUSH, Integer.MAX_VALUE);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

Examples of org.ow2.asm.MethodVisitor.visitIntInsn()

    public void testIllegalIntInsnOperand() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitIntInsn(NEWARRAY, 0);
            fail();
        } catch (Exception e) {
        }
    }
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.