Package org.jruby.compiler.impl

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


                // 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

                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

                    // 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

        // lazily construct it
        adapter2.getstatic(getClassData().clsName, methodName, ci(CachingCallSite.class));
        adapter2.dup();
        Label doCall = new Label();
        adapter2.ifnonnull(doCall);
        adapter2.pop();
        adapter2.newobj(p(FunctionalCachingCallSite.class));
        adapter2.dup();
        adapter2.ldc(name);
        adapter2.invokespecial(p(FunctionalCachingCallSite.class), "<init>", sig(void.class, String.class));
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.