public void returnValue() { adapter.areturn(); }
public void returnValue() { adapter.areturn(); }
public void returnValue() { adapter.areturn(); }
public void returnValue() { adapter.areturn(); }
@Override public void endBody() { // return last value from execution method.areturn(); Label end = new Label(); method.label(end); method.end(); }
@Override public void endBody() { // return last value from execution method.areturn(); Label end = new Label(); method.label(end); method.end(); }
@Override public void endBody() { // return last value from execution method.areturn(); Label end = new Label(); method.label(end); method.end(); }
@Override public void endBody() { // return last value from execution method.areturn(); Label end = new Label(); method.label(end); method.end(); }
public void performReturn() { if (inRescue) { // returning from rescue, clear $! clearErrorInfo(); } // normal return for method body. return jump for within a begin/rescue/ensure if (inNestedMethod) { loadThreadContext(); invokeUtilityMethod("throwReturnJump", sig(IRubyObject.class, IRubyObject.class, ThreadContext.class)); } else { method.areturn(); } }
public void performReturn() { if (inRescue) { // returning from rescue, clear $! clearErrorInfo(); } // normal return for method body. return jump for within a begin/rescue/ensure if (inNestedMethod) { loadThreadContext(); invokeUtilityMethod("throwReturnJump", sig(IRubyObject.class, IRubyObject.class, ThreadContext.class)); } else { method.areturn(); } }
@Override public void performReturn() { if (inRescue) { // returning from rescue, clear $! clearErrorInfo(); } // normal return for method body. return jump for within a begin/rescue/ensure if (inNestedMethod) { loadThreadContext(); invokeUtilityMethod("throwReturnJump", sig(IRubyObject.class, IRubyObject.class, ThreadContext.class)); } else { method.areturn(); } }
@Override public void performReturn() { if (inRescue) { // returning from rescue, clear $! clearErrorInfo(); } // normal return for method body. return jump for within a begin/rescue/ensure if (inNestedMethod) { loadThreadContext(); invokeUtilityMethod("throwReturnJump", sig(IRubyObject.class, IRubyObject.class, ThreadContext.class)); } else { method.areturn(); } }
private static void objectToString(final int line, SkinnyMethodAdapter mv) { if ( line > 0 ) mv.line(line); mv.aload(0); mv.invokespecial(p(Object.class), "toString", sig(String.class)); mv.areturn(); }
private static void objectToString(final int line, SkinnyMethodAdapter mv) { if ( line > 0 ) mv.line(line); mv.aload(0); mv.invokespecial(p(Object.class), "toString", sig(String.class)); mv.areturn(); }
public void endBody() { // end of scoping for closure's vars method.areturn(); method.label(scopeEnd); // we only need full-on redo exception handling if there's logic that might produce it if (inspector == null || inspector.hasScopeAwareMethods()) { // handle redos by restarting the block method.pop(); method.go_to(scopeStart); method.trycatch(scopeStart, scopeEnd, scopeEnd, p(JumpException.RedoJump.class)); } // method is done, declare all variables variableCompiler.declareLocals(scope, scopeStart, scopeEnd); method.end(); }
public void endBody() { // end of scoping for closure's vars method.areturn(); method.label(scopeEnd); // we only need full-on redo exception handling if there's logic that might produce it if (inspector == null || inspector.hasScopeAwareMethods()) { // handle redos by restarting the block method.pop(); method.go_to(scopeStart); method.trycatch(scopeStart, scopeEnd, scopeEnd, p(JumpException.RedoJump.class)); } // method is done, declare all variables variableCompiler.declareLocals(scope, scopeStart, scopeEnd); method.end(); }
@Override public void invokeArrayDeref(String file, int line, CallBase call) { String incomingSig = sig(JVM.OBJECT, params(ThreadContext.class, JVM.OBJECT, JVM.OBJECT, RubyString.class)); String methodName = getUniqueSiteName(call.getId()); SkinnyMethodAdapter adapter2 = new SkinnyMethodAdapter( adapter.getClassVisitor(), Opcodes.ACC_PRIVATE | Opcodes.ACC_STATIC | Opcodes.ACC_SYNTHETIC, methodName, incomingSig, null, null); adapter2.aloadMany(0, 1, 2, 3); cacheCallSite(adapter2, getClassData().clsName, methodName, call.getId(), call); adapter2.invokestatic(p(IRRuntimeHelpers.class), "callOptimizedAref", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class, IRubyObject.class, RubyString.class, CallSite.class)); adapter2.areturn(); adapter2.end(); // now call it adapter.invokestatic(getClassData().clsName, methodName, incomingSig); }
@Override public void invokeArrayDeref(String file, int line, CallBase call) { String incomingSig = sig(JVM.OBJECT, params(ThreadContext.class, JVM.OBJECT, JVM.OBJECT, RubyString.class)); String methodName = getUniqueSiteName(call.getId()); SkinnyMethodAdapter adapter2 = new SkinnyMethodAdapter( adapter.getClassVisitor(), Opcodes.ACC_PRIVATE | Opcodes.ACC_STATIC | Opcodes.ACC_SYNTHETIC, methodName, incomingSig, null, null); adapter2.aloadMany(0, 1, 2, 3); cacheCallSite(adapter2, getClassData().clsName, methodName, call.getId(), call); adapter2.invokestatic(p(IRRuntimeHelpers.class), "callOptimizedAref", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class, IRubyObject.class, RubyString.class, CallSite.class)); adapter2.areturn(); adapter2.end(); // now call it adapter.invokestatic(getClassData().clsName, methodName, incomingSig); }
private void performEnsureInner(BranchCallback regularCode, BranchCallback protectedCode) { Label codeBegin = new Label(); Label codeEnd = new Label(); Label ensureBegin = new Label(); Label ensureEnd = new Label(); method.label(codeBegin); regularCode.branch(this); method.label(codeEnd); protectedCode.branch(this); method.areturn(); method.label(ensureBegin); method.astore(getExceptionIndex()); method.label(ensureEnd); protectedCode.branch(this); method.aload(getExceptionIndex()); method.athrow(); method.trycatch(codeBegin, codeEnd, ensureBegin, null); method.trycatch(ensureBegin, ensureEnd, ensureBegin, null); loadNil(); endBody(); }
private void performEnsureInner(BranchCallback regularCode, BranchCallback protectedCode) { Label codeBegin = new Label(); Label codeEnd = new Label(); Label ensureBegin = new Label(); Label ensureEnd = new Label(); method.label(codeBegin); regularCode.branch(this); method.label(codeEnd); protectedCode.branch(this); method.areturn(); method.label(ensureBegin); method.astore(getExceptionIndex()); method.label(ensureEnd); protectedCode.branch(this); method.aload(getExceptionIndex()); method.athrow(); method.trycatch(codeBegin, codeEnd, ensureBegin, null); method.trycatch(ensureBegin, ensureEnd, ensureBegin, null); loadNil(); endBody(); }