@Override public Instr cloneForInlining(InlinerInfo inlinerInfo) { return new MethodDefinedInstr((Variable) getResult().cloneForInlining(inlinerInfo), getObject().cloneForInlining(inlinerInfo), (StringLiteral) getName().cloneForInlining(inlinerInfo)); }
@Override public Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block block) { Ruby runtime = context.runtime; IRubyObject receiver = (IRubyObject) getObject().retrieve(context, self, currDynScope, temp); RubyString boundValue = Helpers.getDefinedCall(context, self, receiver, getName().string); return boundValue == null ? context.nil : boundValue; }
public Operand run(Object[] args) { IRScope s = (IRScope)args[0]; CallNode iVisited = (CallNode)args[1]; String methodName = iVisited.getName(); Variable tmpVar = s.getNewTemporaryVariable(); Operand receiver = build(iVisited.getReceiverNode(), s); s.addInstr(new MethodDefinedInstr(tmpVar, receiver, new StringLiteral(methodName))); return buildDefnCheckIfThenPaths(s, (Label)args[2], tmpVar); } };
@Override public Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block block) { Ruby runtime = context.runtime; IRubyObject receiver = (IRubyObject) getObject().retrieve(context, self, currDynScope, temp); RubyString boundValue = Helpers.getDefinedCall(context, self, receiver, getName().string); return boundValue == null ? context.nil : boundValue; }
public Operand run(Object[] args) { IRScope s = (IRScope)args[0]; CallNode iVisited = (CallNode)args[1]; String methodName = iVisited.getName(); Variable tmpVar = s.getNewTemporaryVariable(); Operand receiver = build(iVisited.getReceiverNode(), s); s.addInstr(new MethodDefinedInstr(tmpVar, receiver, new StringLiteral(methodName))); return buildDefnCheckIfThenPaths(s, (Label)args[2], tmpVar); } };
@Override public Instr cloneForInlining(InlinerInfo inlinerInfo) { return new MethodDefinedInstr((Variable) getResult().cloneForInlining(inlinerInfo), getObject().cloneForInlining(inlinerInfo), (StringLiteral) getName().cloneForInlining(inlinerInfo)); }