Examples of ldc()


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

                m.getstatic(javaPath, "ruby", ci(Ruby.class));
                m.astore(rubyIndex);

                m.aload(0); // self
                m.ldc(methodName); // method name
                RealClassGenerator.coerceArgumentsToRuby(m, params, rubyIndex);
                m.invokevirtual(javaPath, "callMethod", sig(IRubyObject.class, String.class, IRubyObject[].class));

                RealClassGenerator.coerceResultAndReturn(m, methodSignature[0]);
            }
View Full Code Here

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

                    m = new SkinnyMethodAdapter(cw, ACC_PUBLIC | ACC_VARARGS | ACC_STATIC, javaMethodName, signature, null, null);
                    generateMethodAnnotations(methodAnnos, m, parameterAnnos);

                    m.getstatic(javaPath, "rubyClass", ci(RubyClass.class));
                    //m.invokevirtual("org/jruby/RubyClass", "getMetaClass", sig(RubyClass.class) );
                    m.ldc(methodName); // Method name
                    m.invokevirtual("org/jruby/RubyClass", "callMethod", sig(IRubyObject.class, String.class) );
                    break;
                default:
                    signature = sig(IRubyObject.class, IRubyObject[].class);
                    if (instanceMethods.contains(javaMethodName + signature)) continue;
View Full Code Here

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

        mv.areturn();
        mv.end();

        mv = new SkinnyMethodAdapter(cw, ACC_PUBLIC, "getFile", sig(String.class), null, null);
        mv.start();
        mv.ldc(file);
        mv.areturn();
        mv.end();

        mv = new SkinnyMethodAdapter(cw, ACC_PUBLIC, "getLine", sig(int.class), null, null);
        mv.start();
View Full Code Here

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

        mv.areturn();
        mv.end();

        mv = new SkinnyMethodAdapter(cw, ACC_PUBLIC, "getLine", sig(int.class), null, null);
        mv.start();
        mv.ldc(line);
        mv.ireturn();
        mv.end();

        return endCallOffline(cw);
    }
View Full Code Here

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

        mv.areturn();
        mv.end();

        mv = new SkinnyMethodAdapter(cw, ACC_PUBLIC, "getFile", sig(String.class), null, null);
        mv.start();
        mv.ldc(file);
        mv.areturn();
        mv.end();

        mv = new SkinnyMethodAdapter(cw, ACC_PUBLIC, "getLine", sig(int.class), null, null);
        mv.start();
View Full Code Here

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

        mv.areturn();
        mv.end();

        mv = new SkinnyMethodAdapter(cw, ACC_PUBLIC, "getLine", sig(int.class), null, null);
        mv.start();
        mv.ldc(line);
        mv.ireturn();
        mv.end();
       
        return endCallOffline(cw);
    }
View Full Code Here

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

                    mv.astore(rubyIndex);

                    // get method from cache
                    mv.getstatic(pathName, "$runtimeCache", ci(RuntimeCache.class));
                    mv.aload(0);
                    mv.ldc(cacheIndex);
                    for (String eachName : nameSet) {
                        mv.ldc(eachName);
                    }
                    mv.invokevirtual(p(RuntimeCache.class), "searchWithCache",
                            sig(DynamicMethod.class, params(IRubyObject.class, int.class, String.class, nameSet.size())));
View Full Code Here

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

                    // get method from cache
                    mv.getstatic(pathName, "$runtimeCache", ci(RuntimeCache.class));
                    mv.aload(0);
                    mv.ldc(cacheIndex);
                    for (String eachName : nameSet) {
                        mv.ldc(eachName);
                    }
                    mv.invokevirtual(p(RuntimeCache.class), "searchWithCache",
                            sig(DynamicMethod.class, params(IRubyObject.class, int.class, String.class, nameSet.size())));
                   
                    // get current context
View Full Code Here

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

                    mv.invokevirtual(p(Ruby.class), "getCurrentContext", sig(ThreadContext.class));

                    // load self, class, and name
                    mv.aloadMany(0, 0);
                    mv.invokeinterface(p(IRubyObject.class), "getMetaClass", sig(RubyClass.class));
                    mv.ldc(simpleName);

                    // coerce arguments
                    coerceArgumentsToRuby(mv, paramTypes, rubyIndex);

                    // load null block
View Full Code Here

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

                    mv.astore(rubyIndex);

                    // get method from cache
                    mv.getstatic(pathName, "$runtimeCache", ci(RuntimeCache.class));
                    mv.aload(selfIndex);
                    mv.ldc(cacheIndex);
                    for (String eachName : nameSet) {
                        mv.ldc(eachName);
                    }
                    mv.invokevirtual(p(RuntimeCache.class), "searchWithCache",
                            sig(DynamicMethod.class, params(IRubyObject.class, int.class, String.class, nameSet.size())));
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.