Examples of ifNonNull()


Examples of net.sf.cglib.core.CodeEmitter.ifnonnull()

/*  92 */     e.load_this();
/*  93 */     e.getfield(name);
/*  94 */     e.load_this();
/*  95 */     e.invoke_interface(ENABLED, ENABLED_GET);
/*  96 */     Label intercept = e.make_label();
/*  97 */     e.ifnonnull(intercept);
/*  98 */     e.return_value();
/*     */
/* 100 */     e.mark(intercept);
/* 101 */     Local result = e.make_local(type);
/* 102 */     e.store_local(result);
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.ifnonnull()

                    // re-get, re-check method; if not null now, go to dispatch
                    mv.label(recheckMethod);
                    mv.getstatic(pathName, simpleName, ci(DynamicMethod.class));
                    mv.dup();
                    mv.ifnonnull(dispatch);

                    // method still not available, call method_missing
                    mv.pop();
                    // exit monitor before making call
                    // FIXME: this not being in a finally is a little worrisome
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.ifnonnull()

                // try specific name first, falling back on simple name
                Label dispatch = new Label();
                cw.visitField(ACC_STATIC | ACC_PUBLIC | ACC_VOLATILE, fieldName, ci(DynamicMethod.class), null, null).visitEnd();
                mv.getstatic(name, fieldName, ci(DynamicMethod.class));
                mv.dup();
                mv.ifnonnull(dispatch);
                mv.pop();
                mv.getstatic(name, simpleName, ci(DynamicMethod.class));
                mv.dup();
                mv.ifnonnull(dispatch);
                mv.pop();
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.ifnonnull()

                mv.dup();
                mv.ifnonnull(dispatch);
                mv.pop();
                mv.getstatic(name, simpleName, ci(DynamicMethod.class));
                mv.dup();
                mv.ifnonnull(dispatch);
                mv.pop();
                mv.getstatic(name, "rubyClass", ci(RubyClass.class));
                mv.ldc("method_missing");
                mv.invokevirtual(p(RubyClass.class), "searchMethod", sig(DynamicMethod.class, String.class));
                mv.label(dispatch);
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.ifnonnull()

                    // Try to look up field for simple name

                    // get field; if nonnull, go straight to dispatch
                    mv.getstatic(pathName, simpleName, ci(DynamicMethod.class));
                    mv.dup();
                    mv.ifnonnull(dispatch);

                    // field is null, lock class and try to populate
                    mv.pop();
                    mv.getstatic(pathName, "rubyClass", ci(RubyClass.class));
                    mv.monitorenter();
View Full Code Here

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

        // to test if the handler is initialized...

        if (md.isImplemented()) {
            ga.dup();
            Label ok = ga.newLabel();
            ga.ifNonNull(ok);

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

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

    // make a label for return true
    Label returnTrueLabel = methodAdapter.newLabel();
    // get the dispatcher field for the stack
    methodAdapter.getField(typeBeingWoven, DISPATCHER_FIELD, DISPATCHER_TYPE);
    // check if the dispatcher was non-null and goto return true if it was
    methodAdapter.ifNonNull(returnTrueLabel);
    methodAdapter.loadThis();
    // get the listener field for the stack
    methodAdapter.getField(typeBeingWoven, LISTENER_FIELD, LISTENER_TYPE);
    // check if the listener field was non-null and goto return true if it was
    methodAdapter.ifNonNull(returnTrueLabel);
View Full Code Here

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

    methodAdapter.ifNonNull(returnTrueLabel);
    methodAdapter.loadThis();
    // get the listener field for the stack
    methodAdapter.getField(typeBeingWoven, LISTENER_FIELD, LISTENER_TYPE);
    // check if the listener field was non-null and goto return true if it was
    methodAdapter.ifNonNull(returnTrueLabel);
    // return false if we haven't jumped anywhere
    methodAdapter.push(false);
    methodAdapter.returnValue();
    // mark the returnTrueLable
    methodAdapter.mark(returnTrueLabel);
View Full Code Here

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

    }
   
    //Throw an NPE if the dispatcher is null, return otherwise
    methodAdapter.loadArg(0);
    Label returnValue = methodAdapter.newLabel();
    methodAdapter.ifNonNull(returnValue);
    methodAdapter.newInstance(NPE_TYPE);
    methodAdapter.dup();
    methodAdapter.push("The dispatcher must never be null!");
    methodAdapter.invokeConstructor(NPE_TYPE, NPE_CONSTRUCTOR);
    methodAdapter.throwException();
View Full Code Here

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

        ga.invokeVirtual(Type.getType(IndyWrapper.class),
                org.objectweb.asm.commons.Method.getMethod("Object unwrap(Object[])"));
        ga.visitVarInsn(ASTORE, 2);
        ga.visitVarInsn(ALOAD, 2);
        Label l0 = new Label();
        ga.ifNonNull(l0);
        ga.visitInsn(ACONST_NULL);
        ga.returnValue();
        ga.visitLabel(l0);
        ga.visitVarInsn(ALOAD, 0);
        ga.visitVarInsn(ALOAD, 2);
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.