Package org.objectweb.asm

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


    Label[] labels = new Label[n_cells];
    for (int i = 0; i < n_cells; i++) {
      labels[i] = new Label();
    }

    mv.visitVarInsn(Opcodes.ILOAD, 1);
    mv.visitTableSwitchInsn(1, n_cells, dflt, labels);

    for (int zbase = 0; zbase < n_cells; zbase++) {

      mv.visitLabel(labels[zbase]);
View Full Code Here


    for (int zbase = 0; zbase < n_cells; zbase++) {

      mv.visitLabel(labels[zbase]);

      mv.visitVarInsn(Opcodes.ALOAD, 0); // load this
      String field = "elem" + (zbase + 1);

      mv.visitFieldInsn(Opcodes.GETFIELD, this_class_name, field,
          ETERM_TYPE.getDescriptor());
      mv.visitInsn(Opcodes.ARETURN);
View Full Code Here

      mv.visitInsn(Opcodes.ARETURN);
    }

    mv.visitLabel(dflt);

    mv.visitVarInsn(Opcodes.ALOAD, 0);
    mv.visitVarInsn(Opcodes.ILOAD, 1);
    mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, ETUPLE_NAME, "bad_nth", "(I)"
        + ETERM_TYPE.getDescriptor());
    mv.visitInsn(Opcodes.ARETURN); // make compiler happy
View Full Code Here

    }

    mv.visitLabel(dflt);

    mv.visitVarInsn(Opcodes.ALOAD, 0);
    mv.visitVarInsn(Opcodes.ILOAD, 1);
    mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, ETUPLE_NAME, "bad_nth", "(I)"
        + ETERM_TYPE.getDescriptor());
    mv.visitInsn(Opcodes.ARETURN); // make compiler happy

    mv.visitMaxs(3, 2);
View Full Code Here

    Label[] labels = new Label[n_cells];
    for (int i = 0; i < n_cells; i++) {
      labels[i] = new Label();
    }

    mv.visitVarInsn(Opcodes.ILOAD, 1);
    mv.visitTableSwitchInsn(1, n_cells, dflt, labels);

    for (int zbase = 0; zbase < n_cells; zbase++) {

      mv.visitLabel(labels[zbase]);
View Full Code Here

    for (int zbase = 0; zbase < n_cells; zbase++) {

      mv.visitLabel(labels[zbase]);

      mv.visitVarInsn(Opcodes.ALOAD, 0); // load this
      mv.visitVarInsn(Opcodes.ALOAD, 2); // load term

      String field = "elem" + (zbase + 1);

      mv.visitFieldInsn(Opcodes.PUTFIELD, this_class_name, field,
View Full Code Here

    for (int zbase = 0; zbase < n_cells; zbase++) {

      mv.visitLabel(labels[zbase]);

      mv.visitVarInsn(Opcodes.ALOAD, 0); // load this
      mv.visitVarInsn(Opcodes.ALOAD, 2); // load term

      String field = "elem" + (zbase + 1);

      mv.visitFieldInsn(Opcodes.PUTFIELD, this_class_name, field,
          ETERM_TYPE.getDescriptor());
View Full Code Here

      mv.visitInsn(Opcodes.RETURN);
    }

    mv.visitLabel(dflt);

    mv.visitVarInsn(Opcodes.ALOAD, 0);
    mv.visitVarInsn(Opcodes.ILOAD, 1);
    mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, ETUPLE_NAME, "bad_nth", "(I)"
        + ETERM_TYPE.getDescriptor());
    mv.visitInsn(Opcodes.POP);
    mv.visitInsn(Opcodes.RETURN); // make compiler happy
View Full Code Here

    }

    mv.visitLabel(dflt);

    mv.visitVarInsn(Opcodes.ALOAD, 0);
    mv.visitVarInsn(Opcodes.ILOAD, 1);
    mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, ETUPLE_NAME, "bad_nth", "(I)"
        + ETERM_TYPE.getDescriptor());
    mv.visitInsn(Opcodes.POP);
    mv.visitInsn(Opcodes.RETURN); // make compiler happy
View Full Code Here

    MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC
        | Opcodes.ACC_STATIC, "cast", "(L" + ETUPLE_NAME + ";)L"
        + ETUPLE_NAME + n + ";", null, null);
    mv.visitCode();

    mv.visitVarInsn(Opcodes.ALOAD, 0);
    mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, ETUPLE_NAME, "arity", "()I");

    if (n <= 5) {
      mv.visitInsn(Opcodes.ICONST_0 + n);
    } else {
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.