Package org.jruby.compiler.impl

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


                    // store it
                    mv.dup();
                    mv.putstatic(pathName, simpleName, ci(DynamicMethod.class));

                    // all done with lookup attempts, pop any result and release monitor
                    mv.label(noStore);
                    mv.pop();
                    mv.getstatic(pathName, "rubyClass", ci(RubyClass.class));
                    mv.monitorexit();
                    mv.go_to(recheckMethod);
View Full Code Here


                    mv.getstatic(pathName, "rubyClass", ci(RubyClass.class));
                    mv.monitorexit();
                    mv.go_to(recheckMethod);

                    // end of try block
                    mv.label(tryEnd);

                    // finally block to release monitor
                    mv.label(finallyStart);
                    mv.getstatic(pathName, "rubyClass", ci(RubyClass.class));
                    mv.monitorexit();
View Full Code Here

                    // end of try block
                    mv.label(tryEnd);

                    // finally block to release monitor
                    mv.label(finallyStart);
                    mv.getstatic(pathName, "rubyClass", ci(RubyClass.class));
                    mv.monitorexit();
                    mv.label(finallyEnd);
                    mv.athrow();
View Full Code Here

                    // finally block to release monitor
                    mv.label(finallyStart);
                    mv.getstatic(pathName, "rubyClass", ci(RubyClass.class));
                    mv.monitorexit();
                    mv.label(finallyEnd);
                    mv.athrow();

                    // exception handling for monitor release
                    mv.trycatch(tryStart, tryEnd, finallyStart, null);
                    mv.trycatch(finallyStart, finallyEnd, finallyStart, null);
View Full Code Here

                    // exception handling for monitor release
                    mv.trycatch(tryStart, tryEnd, finallyStart, null);
                    mv.trycatch(finallyStart, finallyEnd, finallyStart, null);

                    // 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
View Full Code Here

                    coerceArgumentsToRuby(mv, paramTypes, pathName);
                    mv.invokestatic(p(RuntimeHelpers.class), "invokeMethodMissing", sig(IRubyObject.class, IRubyObject.class, String.class, IRubyObject[].class));
                    mv.go_to(end);
               
                    // perform the dispatch
                    mv.label(dispatch);
                    // get current context
                    mv.getstatic(pathName, "ruby", ci(Ruby.class));
                    mv.invokevirtual(p(Ruby.class), "getCurrentContext", sig(ThreadContext.class));
               
                    // load self, class, and name
View Full Code Here

                    mv.getstatic(p(Block.class), "NULL_BLOCK", ci(Block.class));
               
                    // invoke method
                    mv.invokevirtual(p(DynamicMethod.class), "call", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class, RubyModule.class, String.class, IRubyObject[].class, Block.class));
               
                    mv.label(end);
                    coerceResultAndReturn(method, mv, returnType);
                }               
                mv.end();
            }
        }
View Full Code Here

                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);
               
                // get current context
                mv.getstatic(name, "ruby", ci(Ruby.class));
                mv.invokevirtual(p(Ruby.class), "getCurrentContext", sig(ThreadContext.class));
               
View Full Code Here

                    // try/finally block to ensure unlock
                    Label tryStart = new Label();
                    Label tryEnd = new Label();
                    Label finallyStart = new Label();
                    Label finallyEnd = new Label();
                    mv.label(tryStart);

                    mv.aload(0);
                    mv.getfield(pathName, "self", ci(IRubyObject.class));
                    for (String eachName : nameSet) {
                        mv.ldc(eachName);
View Full Code Here

                    mv.trycatch(tryBegin, tryEnd, doFinally, null);
                    if (callConfig != CallConfiguration.FRAME_AND_DUMMY_SCOPE) {
                        mv.trycatch(catchReturnJump, doReturnFinally, doFinally, null);
                    }
                    mv.trycatch(catchRedoJump, doRedoFinally, doFinally, null);
                    mv.label(tryBegin);
                    {
                        mv.aload(0);
                        // FIXME we want to eliminate these type casts when possible
                        mv.getfield(mnamePath, "$scriptObject", ci(Object.class));
                        mv.checkcast(typePath);
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.