@JRubyMethod(name = "initialize", visibility = Visibility.PRIVATE) @Override public IRubyObject initialize(ThreadContext context) { binding = context.currentBinding(); return this; }
@JRubyMethod(name = "initialize", visibility = Visibility.PRIVATE) public IRubyObject initialize(ThreadContext context) { binding = context.currentBinding(); return this; }
public static Block newCallClosure(IRubyObject self, RubyModule imClass, Signature signature, BlockCallback callback, ThreadContext context) { Binding binding = context.currentBinding(self, Visibility.PUBLIC); BlockBody body = new CallBlock(signature, callback, context); return new Block(body, binding); }
public static Block newCallClosure(IRubyObject self, RubyModule imClass, Signature signature, BlockCallback callback, ThreadContext context) { Binding binding = context.currentBinding(self, Visibility.PUBLIC); BlockBody body = new CallBlock19(signature, callback, context); return new Block(body, binding); }
@JRubyMethod(name = "binding", module = true, visibility = PRIVATE, reads = {LASTLINE, BACKREF, VISIBILITY, BLOCK, SELF, METHODNAME, LINE, CLASS, FILENAME, SCOPE}, writes = {LASTLINE, BACKREF, VISIBILITY, BLOCK, SELF, METHODNAME, LINE, CLASS, FILENAME, SCOPE}) public static RubyBinding binding(ThreadContext context, IRubyObject recv, Block block) { return RubyBinding.newBinding(context.runtime, context.currentBinding()); }
@JRubyMethod(name = "binding", module = true, visibility = PRIVATE, reads = {LASTLINE, BACKREF, VISIBILITY, BLOCK, SELF, METHODNAME, LINE, CLASS, FILENAME, SCOPE}, writes = {LASTLINE, BACKREF, VISIBILITY, BLOCK, SELF, METHODNAME, LINE, CLASS, FILENAME, SCOPE}) public static RubyBinding binding(ThreadContext context, IRubyObject recv, Block block) { return RubyBinding.newBinding(context.runtime, context.currentBinding()); }
public static Block newCallClosure(IRubyObject self, RubyModule imClass, Arity arity, BlockCallback callback, ThreadContext context) { Binding binding = context.currentBinding(self, Visibility.PUBLIC); BlockBody body = new CallBlock(arity, callback, context); return new Block(body, binding); }
public static Block newCompiledClosureLight(ThreadContext context, IRubyObject self, Arity arity, StaticScope scope, CompiledBlockCallback callback, boolean hasMultipleArgsHead, int argumentType) { Binding binding = context.currentBinding(self, Visibility.PUBLIC); BlockBody body = new CompiledBlockLight(arity, scope, callback, hasMultipleArgsHead, argumentType); return new Block(body, binding); }
@JIT public static Block prepareBlock(ThreadContext context, IRubyObject self, DynamicScope scope, BlockBody body) { Block block = new Block(body, context.currentBinding(self, scope)); return block; }
public static Block newCallClosure(IRubyObject self, RubyModule imClass, Arity arity, BlockCallback callback, ThreadContext context) { Binding binding = context.currentBinding(self, Visibility.PUBLIC); BlockBody body = new CallBlock(arity, callback, context); return new Block(body, binding); }
public static Block newCompiledSharedScopeClosure(ThreadContext context, IRubyObject self, Arity arity, DynamicScope dynamicScope, CompiledBlockCallback callback, boolean hasMultipleArgsHead, int argumentType) { Binding binding = context.currentBinding(self, Visibility.PUBLIC, dynamicScope); BlockBody body = new CompiledSharedScopeBlock(arity, dynamicScope, callback, hasMultipleArgsHead, argumentType); return new Block(body, binding); }
public static Block newCompiledClosureLight(ThreadContext context, IRubyObject self, Arity arity, StaticScope scope, CompiledBlockCallback callback, boolean hasMultipleArgsHead, int argumentType) { Binding binding = context.currentBinding(self, Visibility.PUBLIC); BlockBody body = new CompiledBlockLight(arity, scope, callback, hasMultipleArgsHead, argumentType); return new Block(body, binding); }
public static Block newCompiledClosure(ThreadContext context, IRubyObject self, Arity arity, StaticScope scope, CompiledBlockCallback19 callback, boolean hasMultipleArgsHead, int argumentType) { Binding binding = context.currentBinding(self, Visibility.PUBLIC); BlockBody body = new CompiledBlock19(arity, scope, callback, hasMultipleArgsHead, argumentType, EMPTY_PARAMETER_LIST); return new Block(body, binding); }
public static Block newCallClosure(IRubyObject self, RubyModule imClass, Arity arity, BlockCallback callback, ThreadContext context) { Binding binding = context.currentBinding(self, Visibility.PUBLIC); BlockBody body = new CallBlock19(arity, callback, context); return new Block(body, binding); }
@Deprecated public static Block newCallClosure(IRubyObject self, RubyModule imClass, Arity arity, BlockCallback callback, ThreadContext context) { Binding binding = context.currentBinding(self, Visibility.PUBLIC); BlockBody body = new CallBlock19(Signature.from(arity), callback, context); 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); }
@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); }
public static Block newInterpretedClosure(ThreadContext context, IterNode iterNode, IRubyObject self) { Binding binding = context.currentBinding(self); NodeType argsNodeId = getArgumentTypeWackyHack(iterNode); BlockBody body = new InterpretedBlock( iterNode, Arity.procArityOf(iterNode.getVarNode()), asArgumentType(argsNodeId)); return new Block(body, binding); }
public Block newCompiledClosure(ThreadContext context, IterNode iterNode, IRubyObject self) { Binding binding = context.currentBinding(self); NodeType argsNodeId = getArgumentTypeWackyHack(iterNode); boolean hasMultipleArgsHead = false; if (iterNode.getVarNode() instanceof MultipleAsgnNode) { hasMultipleArgsHead = ((MultipleAsgnNode) iterNode.getVarNode()).getHeadNode() != null; } BlockBody body = new CompiledBlock(Arity.procArityOf(iterNode.getVarNode()), iterNode.getScope(), compileBlock(context, new StandardASMCompiler("blahfooblah" + System.currentTimeMillis(), "blahfooblah"), iterNode), hasMultipleArgsHead, BlockBody.asArgumentType(argsNodeId)); return new Block(body, binding); }