public static IRubyObject initiateNonLocalReturn(ThreadContext context, DynamicScope dynScope, Block block, IRubyObject returnValue) { if (block != null && IRRuntimeHelpers.inLambda(block.type)) throw new IRWrappedLambdaReturnValue(returnValue); throw IRReturnJump.create(getContainingMethodOrLambdasDynamicScope(dynScope), returnValue); }
@Override public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) { IRRuntimeHelpers.defInterpretedInstanceMethod(context, method, currDynScope, self); return null; // unused; symbol is propagated }
public IRubyObject construct(ThreadContext context, ByteList pattern) { RubyRegexp regexp = IRRuntimeHelpers.newLiteralRegexp(context, pattern, options); return regexp; } }
public SuperInvokeSite(MethodType type, String superName, String splatmapString, String file, int line) { super(type, superName, CallType.SUPER, file, line); this.superName = superName; this.splatMap = IRRuntimeHelpers.decodeSplatmap(splatmapString); }
public IRubyObject invoke(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass definingModule, IRubyObject[] args, Block block) throws Throwable { // TODO: get rid of caller // TODO: caching return IRRuntimeHelpers.unresolvedSuperSplatArgs(context, self, args, block, splatMap); }
public IRubyObject invoke(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass definingModule, IRubyObject[] args, Block block) throws Throwable { // TODO: get rid of caller // TODO: caching return IRRuntimeHelpers.classSuperSplatArgs(context, self, superName, definingModule, args, block, splatMap); } }
public static RubyHash extractKwargsHash(ThreadContext context, Object[] args, int requiredArgsCount, boolean receivesKwargs) { if (!receivesKwargs) return null; if (args.length <= requiredArgsCount) return null; // No kwarg because required args slurp them up. Object lastArg = args[args.length - 1]; if (lastArg instanceof IRubyObject) { IRubyObject returnValue = toHash(context, (IRubyObject) lastArg); if (returnValue instanceof RubyHash) return (RubyHash) returnValue; } return null; }
public IRubyObject invoke(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass definingModule, IRubyObject[] args, Block block) throws Throwable { // TODO: get rid of caller // TODO: caching return IRRuntimeHelpers.instanceSuperSplatArgs(context, self, superName, definingModule, args, block, splatMap); } }
@Override public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) { return IRRuntimeHelpers.nthMatch(context, matchNumber); }
public IRubyObject receivePostReqdArg(ThreadContext context, IRubyObject[] args, boolean acceptsKeywordArgument) { return IRRuntimeHelpers.receivePostReqdArg(context, args, preReqdArgsCount, optArgsCount, restArg, postReqdArgsCount, argIndex, acceptsKeywordArgument); }
@Override public IRubyObject receiveArg(ThreadContext context, IRubyObject[] args, boolean acceptsKeywordArgument) { return IRRuntimeHelpers.receiveOptArg(context, args, requiredArgs, preArgs, argIndex, acceptsKeywordArgument); }
@Override public IRubyObject receiveArg(ThreadContext context, IRubyObject[] args, boolean keywordArgumentSupplied) { return IRRuntimeHelpers.receiveKeywordRestArg(context, args, required, keywordArgumentSupplied); }
public static IRubyObject initiateNonLocalReturn(ThreadContext context, DynamicScope dynScope, Block block, IRubyObject returnValue) { if (block != null && IRRuntimeHelpers.inLambda(block.type)) throw new IRWrappedLambdaReturnValue(returnValue); throw IRReturnJump.create(getContainingMethodOrLambdasDynamicScope(dynScope), returnValue); }
public ResolvedSuperInvokeSite(MethodType type, String superName, String splatmapString, String file, int line) { super(type, superName, CallType.SUPER, file, line); this.superName = superName; this.splatMap = IRRuntimeHelpers.decodeSplatmap(splatmapString); }
@Override public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) { IRRuntimeHelpers.defInterpretedInstanceMethod(context, method, currDynScope, self); return null; // unused; symbol is propagated }
public IRubyObject invoke(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass definingModule, IRubyObject[] args, Block block) throws Throwable { // TODO: get rid of caller // TODO: caching return IRRuntimeHelpers.unresolvedSuperSplatArgs(context, self, args, block, splatMap); }
public IRubyObject invoke(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass definingModule, IRubyObject[] args, Block block) throws Throwable { // TODO: get rid of caller // TODO: caching return IRRuntimeHelpers.classSuperSplatArgs(context, self, superName, definingModule, args, block, splatMap); } }
public static RubyHash extractKwargsHash(ThreadContext context, Object[] args, int requiredArgsCount, boolean receivesKwargs) { if (!receivesKwargs) return null; if (args.length <= requiredArgsCount) return null; // No kwarg because required args slurp them up. Object lastArg = args[args.length - 1]; if (lastArg instanceof IRubyObject) { IRubyObject returnValue = toHash(context, (IRubyObject) lastArg); if (returnValue instanceof RubyHash) return (RubyHash) returnValue; } return null; }
public IRubyObject invoke(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass definingModule, IRubyObject[] args, Block block) throws Throwable { // TODO: get rid of caller // TODO: caching return IRRuntimeHelpers.instanceSuperSplatArgs(context, self, superName, definingModule, args, block, splatMap); } }
public ResolvedSuperInvokeSite(MethodType type, String superName, String splatmapString, String file, int line) { super(type, superName, CallType.SUPER, file, line); this.superName = superName; this.splatMap = IRRuntimeHelpers.decodeSplatmap(splatmapString); }