Examples of loadArgs()


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

        mv.visitVarInsn(ALOAD, 0);
        mv.visitFieldInsn(GETFIELD, m_owner, generateMethodFlag(name, desc), "Z");
        mv.visitJumpInsn(IFNE, l0);

        mv.visitVarInsn(ALOAD, 0);
        mv.loadArgs();
        mv.visitMethodInsn(INVOKESPECIAL, m_owner, PREFIX + name, desc, false);
        mv.visitInsn(returnType.getOpcode(IRETURN));

        // end of the non intercepted method invocation.
View Full Code Here

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

                "(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V", false);

        mv.visitVarInsn(ALOAD, 0);

        // Do not allow argument modification : just reload arguments.
        mv.loadArgs();
        mv.visitMethodInsn(INVOKESPECIAL, m_owner, PREFIX + name, desc, false);

        if (returnType.getSort() != Type.VOID) {
            mv.visitVarInsn(returnType.getOpcode(ISTORE), result);
        }
View Full Code Here

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

    public void emitDEF_INST_METH(DefineInstanceMethodInstr instr) {
        IRMethod irMethod = instr.method;
        GeneratorAdapter adapter = new GeneratorAdapter(ACC_PUBLIC, Method.getMethod("void " + irMethod.getName() + " ()"), null, null, cls());
        adapter.loadThis();
        adapter.loadArgs();
        adapter.invokeStatic(Type.getType(Object.class), Method.getMethod("Object __ruby__" + irMethod.getName() + " (Object)"));
        adapter.returnValue();
        adapter.endMethod();
    }
View Full Code Here

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

    public void emitDEF_INST_METH(DefineInstanceMethodInstr instr) {
        IRMethod irMethod = instr.method;
        GeneratorAdapter adapter = new GeneratorAdapter(ACC_PUBLIC, Method.getMethod("void " + irMethod.getName() + " ()"), null, null, cls());
        adapter.loadThis();
        adapter.loadArgs();
        adapter.invokeStatic(Type.getType(Object.class), Method.getMethod("Object __ruby__" + irMethod.getName() + " (Object)"));
        adapter.returnValue();
        adapter.endMethod();
    }
View Full Code Here

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

            ga.dup();
            Label ok = ga.newLabel();
            ga.ifNonNull(ok);

            ga.loadThis();
            ga.loadArgs();
            ga.invokeConstructor(superType, m);
            ga.returnValue();
            ga.mark(ok);
        }
View Full Code Here

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

            GeneratorAdapter ga2 = new GeneratorAdapter(Opcodes.ACC_PUBLIC, sm,
                    null, ex, cw);

            ga2.loadThis();
            ga2.loadArgs();
            ga2.invokeConstructor(superType, m);
            ga2.returnValue();
            ga2.endMethod();
        }
    }
View Full Code Here

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

        GeneratorAdapter ga = new GeneratorAdapter(access, m, signature,
                toType(superConstructorExceptions), cw);

        ga.loadThis();
        ga.loadArgs(0, superConstructorParameterTypes.length);
        ga.invokeConstructor(Type.getType(constructor.getDeclaringClass()),
                super_m);

        ga.loadThis();
        ga.loadArg(superConstructorParameterTypes.length);
View Full Code Here

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

            helper, impl);
        final GeneratorAdapter mgen =
            new GeneratorAdapter(Opcodes.ACC_STATIC | Opcodes.ACC_SYNTHETIC, helper, null, exceptions, owner);

        mgen.visitCode();
        mgen.loadArgs();
        if (implIsStatic) {
            mgen.invokeStatic(owner.target, impl);
        } else {
            mgen.invokeVirtual(owner.target, impl);
        }
View Full Code Here

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

    // call from the constructor to setInvocationHandler
    Method setter = new Method("setInvocationHandler", Type.VOID_TYPE, new Type[] { IH_TYPE });
    // load this
    methodAdapter.loadThis();
    // load the supplied invocation handler arg
    methodAdapter.loadArgs();
    // invoke the setter method
    methodAdapter.invokeVirtual(newClassType, setter);
    methodAdapter.returnValue();
    methodAdapter.endMethod();
View Full Code Here

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

    // add a method for setting the invocation handler
    methodAdapter = new GeneratorAdapter(ACC_PUBLIC | ACC_FINAL, setter, null, null, cv);
    // load this to put the field
    methodAdapter.loadThis();
    // load the method arguments (i.e. the invocation handler) to the stack
    methodAdapter.loadArgs();
    // set the ih field using the method argument
    methodAdapter.putField(newClassType, IH_FIELD, IH_TYPE);
    methodAdapter.returnValue();
    methodAdapter.endMethod();
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.