public static StaticScope decodeScopeAndDetermineModule(ThreadContext context, StaticScope parent, String scopeString) { StaticScope scope = decodeScope(context, parent, scopeString); scope.determineModule(); return scope; }
public static StaticScope decodeScopeAndDetermineModule(ThreadContext context, StaticScope parent, String scopeString) { StaticScope scope = decodeScope(context, parent, scopeString); scope.determineModule(); return scope; }
public static StaticScope decodeScopeAndDetermineModule(ThreadContext context, StaticScope parent, String scopeString) { StaticScope scope = decodeScope(context, parent, scopeString); scope.determineModule(); return scope; }
public static StaticScope decodeScopeAndDetermineModule(ThreadContext context, StaticScope parent, String scopeString) { StaticScope scope = decodeScope(context, parent, scopeString); scope.determineModule(); return scope; }
public InterpretedIRMethod(IRScope method, Visibility visibility, RubyModule implementationClass) { super(implementationClass, visibility, CallConfiguration.FrameNoneScopeNone); this.method = method; this.method.getStaticScope().determineModule(); this.arity = calculateArity(); }
public InterpretedIRMethod(IRScope method, Visibility visibility, RubyModule implementationClass) { super(implementationClass, visibility, CallConfiguration.FrameNoneScopeNone); this.method = method; this.method.getStaticScope().determineModule(); this.arity = calculateArity(); }
private static Block getIterNodeBlock(Node blockNode, ThreadContext context, IRubyObject self) { IterNode iterNode = (IterNode) blockNode; StaticScope scope = iterNode.getScope(); scope.determineModule(); // Create block for this iter node // FIXME: We shouldn't use the current scope if it's not actually from the same hierarchy of static scopes return InterpretedBlock.newInterpretedClosure(context, iterNode.getBlockBody(), self); }
private static Block getIterNodeBlock(Node blockNode, ThreadContext context, IRubyObject self) { IterNode iterNode = (IterNode) blockNode; StaticScope scope = iterNode.getScope(); scope.determineModule(); // Create block for this iter node // FIXME: We shouldn't use the current scope if it's not actually from the same hierarchy of static scopes return InterpretedBlock.newInterpretedClosure(context, iterNode.getBlockBody(), self); }
public CompiledIRMethod(MethodHandle variable, MethodHandle specific, int specificArity, IRScope method, Visibility visibility, RubyModule implementationClass) { super(method, visibility, implementationClass); this.variable = variable; this.specific = specific; // deopt unboxing if we have to process kwargs hash (although this really has nothing to do with arg // unboxing -- it was a simple path to hacking this in). this.specificArity = method.receivesKeywordArgs() ? -1 : specificArity; this.method.getStaticScope().determineModule(); assert method.hasExplicitCallProtocol(); setHandle(variable); method.compilable = this; }
@Override public Object retrieve(ThreadContext context, IRubyObject self, DynamicScope currDynScope, Object[] temp) { BlockBody body = closure.getBlockBody(); closure.getStaticScope().determineModule(); Binding binding = context.currentBinding(self, currDynScope); return new Block(body, binding); }
@Override public Object retrieve(ThreadContext context, IRubyObject self, DynamicScope currDynScope, Object[] temp) { BlockBody body = closure.getBlockBody(); closure.getStaticScope().determineModule(); Binding binding = context.currentBinding(self, currDynScope); return new Block(body, binding); }
public CompiledIRMethod(MethodHandle variable, MethodHandle specific, int specificArity, IRScope method, Visibility visibility, RubyModule implementationClass) { super(method, visibility, implementationClass); this.variable = variable; this.specific = specific; // deopt unboxing if we have to process kwargs hash (although this really has nothing to do with arg // unboxing -- it was a simple path to hacking this in). this.specificArity = method.receivesKeywordArgs() ? -1 : specificArity; this.method.getStaticScope().determineModule(); assert method.hasExplicitCallProtocol(); setHandle(variable); method.compilable = this; }
@Override public IRubyObject interpret(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) { // JRUBY-5686: do this before executing so first time sets cref module getScope().determineModule(); return RubyProc.newProc(runtime, Interpreted19Block.newInterpretedClosure(context, getBlockBody(), self), Block.Type.LAMBDA, getPosition()); } }
@Override public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) { BlockBody body = closure.getBlockBody(); closure.getStaticScope().determineModule(); // In non-inlining scenarios, this.self will always be %self. // However, in inlined scenarios, this.self will be the self in the original scope where the closure // was present before inlining. IRubyObject selfVal = (this.self instanceof Self) ? self : (IRubyObject)this.self.retrieve(context, self, currScope, currDynScope, temp); Binding binding = context.currentBinding(selfVal, currDynScope); return new Block(body, binding); }
@Override public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) { BlockBody body = closure.getBlockBody(); closure.getStaticScope().determineModule(); // In non-inlining scenarios, this.self will always be %self. // However, in inlined scenarios, this.self will be the self in the original scope where the closure // was present before inlining. IRubyObject selfVal = (this.self instanceof Self) ? self : (IRubyObject)this.self.retrieve(context, self, currScope, currDynScope, temp); Binding binding = context.currentBinding(selfVal, currDynScope); return new Block(body, binding); }
@Override public IRubyObject interpret(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) { // JRUBY-5686: do this before executing so first time sets cref module getScope().determineModule(); return RubyProc.newProc(runtime, Interpreted19Block.newInterpretedClosure(context, getBlockBody(), self), Block.Type.LAMBDA, getPosition()); } }
public static Block getBlock(ThreadContext context, IRubyObject self, Node node) { IterNode iter = (IterNode)node; iter.getScope().determineModule(); // Create block for this iter node // FIXME: We shouldn't use the current scope if it's not actually from the same hierarchy of static scopes if (iter.getBlockBody() instanceof InterpretedBlock) { return InterpretedBlock.newInterpretedClosure(context, iter.getBlockBody(), self); } else { return Interpreted19Block.newInterpretedClosure(context, iter.getBlockBody(), self); } }
public static Block getBlock(ThreadContext context, IRubyObject self, Node node) { IterNode iter = (IterNode)node; iter.getScope().determineModule(); // Create block for this iter node // FIXME: We shouldn't use the current scope if it's not actually from the same hierarchy of static scopes if (iter.getBlockBody() instanceof InterpretedBlock) { return InterpretedBlock.newInterpretedClosure(context, iter.getBlockBody(), self); } else { return Interpreted19Block.newInterpretedClosure(context, iter.getBlockBody(), self); } }
@Override public Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block aBlock) { // SSS FIXME: Copied this from ast/LambdaNode ... Is this required here as well? // // JRUBY-5686: do this before executing so first time sets cref module getLambdaBody().getStaticScope().determineModule(); IRClosure body = getLambdaBody(); // ENEBO: Now can live nil be passed as block reference? return RubyProc.newProc(context.runtime, (Block) (body == null ? context.runtime.getIRManager().getNil() : operands[0]).retrieve(context, self, currDynScope, temp), Block.Type.LAMBDA, position); }
@Override public Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block aBlock) { // SSS FIXME: Copied this from ast/LambdaNode ... Is this required here as well? // // JRUBY-5686: do this before executing so first time sets cref module getLambdaBody().getStaticScope().determineModule(); IRClosure body = getLambdaBody(); // ENEBO: Now can live nil be passed as block reference? return RubyProc.newProc(context.runtime, (Block) (body == null ? context.runtime.getIRManager().getNil() : operands[0]).retrieve(context, self, currDynScope, temp), Block.Type.LAMBDA, position); }