Package org.jruby.compiler.impl

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


        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

        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

        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));
        adapter2.dup();
        adapter2.putstatic(getClassData().clsName, methodName, ci(CachingCallSite.class));

        // use call site to invoke
View Full Code Here

                null);

        // CON FIXME: make these offsets programmatically determined
        adapter2.aload(0);
        adapter2.aload(2);
        if (!unresolved) adapter2.ldc(name);
        if (!unresolved) adapter2.aload(3);

        buildArrayFromLocals(adapter2, 4, arity);

        if (hasClosure) {
View Full Code Here

            adapter2.getstatic(p(Block.class), "NULL_BLOCK", ci(Block.class));
        }

        if (splatmap != null || splatmap.length > 0 || anyTrue(splatmap)) {
            String splatmapString = IRRuntimeHelpers.encodeSplatmap(splatmap);
            adapter2.ldc(splatmapString);
            adapter2.invokestatic(p(IRRuntimeHelpers.class), "decodeSplatmap", sig(boolean[].class, String.class));
        } else {
            adapter2.getstatic(p(IRRuntimeHelpers.class), "EMPTY_BOOLEAN_ARRAY", ci(boolean[].class));
        }
View Full Code Here

                            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

                            // 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())));

                            // get current context
View Full Code Here

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

                            // load self, class, and name
                            mv.aloadMany(selfIndex, selfIndex);
                            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

                    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

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.