@Override public void encode(IRWriterEncoder e) { super.encode(e); e.encode(getHelperMethod().ordinal()); e.encode(getArgs()); }
@Override public void encode(IRWriterEncoder e) { super.encode(e); e.encode(getHelperMethod().ordinal()); e.encode(getArgs()); }
jvmMethod().loadContext(); jvmLoadLocal(DYNAMIC_SCOPE); visit(runtimehelpercall.getArgs()[0]); jvmAdapter().invokestatic(p(IRRuntimeHelpers.class), "handlePropagatedBreak", sig(IRubyObject.class, ThreadContext.class, DynamicScope.class, Object.class)); jvmStoreLocal(runtimehelpercall.getResult()); case HANDLE_NONLOCAL_RETURN: jvmLoadLocal(DYNAMIC_SCOPE); visit(runtimehelpercall.getArgs()[0]); jvmAdapter().invokestatic(p(IRRuntimeHelpers.class), "handleNonlocalReturn", sig(IRubyObject.class, DynamicScope.class, Object.class)); jvmStoreLocal(runtimehelpercall.getResult()); jvmMethod().loadContext(); jvmLoadLocal(DYNAMIC_SCOPE); visit(runtimehelpercall.getArgs()[0]); jvmMethod().loadSelfBlock(); jvmAdapter().invokestatic(p(IRRuntimeHelpers.class), "handleBreakAndReturnsInLambdas", sig(IRubyObject.class, ThreadContext.class, DynamicScope.class, Object.class, Block.class)); case IS_DEFINED_BACKREF: jvmMethod().loadContext(); visit(runtimehelpercall.getArgs()[0]); jvmAdapter().invokestatic(p(IRRuntimeHelpers.class), "isDefinedBackref", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class)); jvmStoreLocal(runtimehelpercall.getResult()); jvmMethod().loadContext(); jvmMethod().loadSelf(); visit(runtimehelpercall.getArgs()[0]); jvmAdapter().ldc(((Stringable) runtimehelpercall.getArgs()[1]).getString()); visit(runtimehelpercall.getArgs()[2]);
jvmMethod().loadContext(); jvmLoadLocal(DYNAMIC_SCOPE); visit(runtimehelpercall.getArgs()[0]); jvmAdapter().invokestatic(p(IRRuntimeHelpers.class), "handlePropagatedBreak", sig(IRubyObject.class, ThreadContext.class, DynamicScope.class, Object.class)); jvmStoreLocal(runtimehelpercall.getResult()); case HANDLE_NONLOCAL_RETURN: jvmLoadLocal(DYNAMIC_SCOPE); visit(runtimehelpercall.getArgs()[0]); jvmAdapter().invokestatic(p(IRRuntimeHelpers.class), "handleNonlocalReturn", sig(IRubyObject.class, DynamicScope.class, Object.class)); jvmStoreLocal(runtimehelpercall.getResult()); jvmMethod().loadContext(); jvmLoadLocal(DYNAMIC_SCOPE); visit(runtimehelpercall.getArgs()[0]); jvmMethod().loadSelfBlock(); jvmAdapter().invokestatic(p(IRRuntimeHelpers.class), "handleBreakAndReturnsInLambdas", sig(IRubyObject.class, ThreadContext.class, DynamicScope.class, Object.class, Block.class)); case IS_DEFINED_BACKREF: jvmMethod().loadContext(); visit(runtimehelpercall.getArgs()[0]); jvmAdapter().invokestatic(p(IRRuntimeHelpers.class), "isDefinedBackref", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class)); jvmStoreLocal(runtimehelpercall.getResult()); jvmMethod().loadContext(); jvmMethod().loadSelf(); visit(runtimehelpercall.getArgs()[0]); jvmAdapter().ldc(((Stringable) runtimehelpercall.getArgs()[1]).getString()); visit(runtimehelpercall.getArgs()[2]);
case MERGE_KWARGS: return IRRuntimeHelpers.mergeKeywordArguments(context, (IRubyObject) arg1, (IRubyObject) getArgs()[1].retrieve(context, self, currScope, currDynScope, temp));
case MERGE_KWARGS: return IRRuntimeHelpers.mergeKeywordArguments(context, (IRubyObject) arg1, (IRubyObject) getArgs()[1].retrieve(context, self, currScope, currDynScope, temp));