@Override public Instr cloneForInlining(InlinerInfo ii) { return new UndefMethodInstr((Variable) result.cloneForInlining(ii), methodName.cloneForInlining(ii)); }
@Override public Instr clone(CloneInfo ii) { return new UndefMethodInstr((Variable)result.cloneForInlining(ii), getMethodName().cloneForInlining(ii)); }
public Operand getMethodName() { return getOperand1(); }
@Override public void UndefMethodInstr(UndefMethodInstr undefmethodinstr) { jvmMethod().loadContext(); visit(undefmethodinstr.getMethodName()); jvmLoadLocal(DYNAMIC_SCOPE); jvmMethod().loadSelf(); jvmMethod().invokeIRHelper("undefMethod", sig(IRubyObject.class, ThreadContext.class, Object.class, DynamicScope.class, IRubyObject.class)); jvmStoreLocal(undefmethodinstr.getResult()); }
@Override public void encode(IRWriterEncoder e) { super.encode(e); e.encode(getMethodName()); }
case TO_ARY: return ToAryInstr.decode(this); case TOGGLE_BACKTRACE: return ToggleBacktraceInstr.decode(this); case UNDEF_METHOD: return UndefMethodInstr.decode(this); case UNRESOLVED_SUPER: return UnresolvedSuperInstr.decode(this); case YIELD: return YieldInstr.decode(this);
@Override public void UndefMethodInstr(UndefMethodInstr undefmethodinstr) { jvmMethod().loadContext(); visit(undefmethodinstr.getMethodName()); jvmLoadLocal(DYNAMIC_SCOPE); jvmMethod().loadSelf(); jvmMethod().invokeIRHelper("undefMethod", sig(IRubyObject.class, ThreadContext.class, Object.class, DynamicScope.class, IRubyObject.class)); jvmStoreLocal(undefmethodinstr.getResult()); }
@Override public void encode(IRWriterEncoder e) { super.encode(e); e.encode(getMethodName()); }
case TO_ARY: return ToAryInstr.decode(this); case TOGGLE_BACKTRACE: return ToggleBacktraceInstr.decode(this); case UNDEF_METHOD: return UndefMethodInstr.decode(this); case UNRESOLVED_SUPER: return UnresolvedSuperInstr.decode(this); case YIELD: return YieldInstr.decode(this);
@Override public Instr cloneForInlining(InlinerInfo ii) { return new UndefMethodInstr((Variable) result.cloneForInlining(ii), methodName.cloneForInlining(ii)); }
@Override public Instr clone(CloneInfo ii) { return new UndefMethodInstr((Variable)result.cloneForInlining(ii), getMethodName().cloneForInlining(ii)); }
@Override public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) { RubyModule module = IRRuntimeHelpers.findInstanceMethodContainer(context, currDynScope, self); Object nameArg = getMethodName().retrieve(context, self, currScope, currDynScope, temp); String name = (nameArg instanceof String) ? (String) nameArg : nameArg.toString(); module.undef(context, name); return context.nil; }
public Operand getMethodName() { return getOperand1(); }
public static UndefMethodInstr decode(IRReaderDecoder d) { return new UndefMethodInstr(d.decodeVariable(), d.decodeOperand()); }
@Override public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) { RubyModule module = IRRuntimeHelpers.findInstanceMethodContainer(context, currDynScope, self); Object nameArg = getMethodName().retrieve(context, self, currScope, currDynScope, temp); String name = (nameArg instanceof String) ? (String) nameArg : nameArg.toString(); module.undef(context, name); return context.nil; }
public static UndefMethodInstr decode(IRReaderDecoder d) { return new UndefMethodInstr(d.decodeVariable(), d.decodeOperand()); }
public Operand buildUndef(Node node, IRScope s) { Operand methName = build(((UndefNode) node).getName(), s); Variable result = s.getNewTemporaryVariable(); s.addInstr(new UndefMethodInstr(result, methName)); return result; }
public Operand buildUndef(Node node) { Operand methName = build(((UndefNode) node).getName()); return addResultInstr(new UndefMethodInstr(createTemporaryVariable(), methName)); }
public Operand buildUndef(Node node, IRScope s) { Operand methName = build(((UndefNode) node).getName(), s); Variable result = s.getNewTemporaryVariable(); s.addInstr(new UndefMethodInstr(result, methName)); return result; }
public Operand buildUndef(Node node) { Operand methName = build(((UndefNode) node).getName()); return addResultInstr(new UndefMethodInstr(createTemporaryVariable(), methName)); }