public static NoResultCallInstr create(IRScope scope, CallType callType, RubySymbol name, Operand receiver, Operand[] args, Operand closure, boolean isPotentiallyRefined) { if (closure == null && !containsArgSplat(args) && args.length == 1) { return new OneOperandArgNoBlockNoResultCallInstr(scope, callType, name, receiver, args, null, isPotentiallyRefined); } return new NoResultCallInstr(scope, Operation.NORESULT_CALL, callType, name, receiver, args, closure, isPotentiallyRefined); }
public static NoResultCallInstr create(IRScope scope, CallType callType, RubySymbol name, Operand receiver, Operand[] args, Operand closure, boolean isPotentiallyRefined) { if (closure == null && !containsArgSplat(args) && args.length == 1) { return new OneOperandArgNoBlockNoResultCallInstr(scope, callType, name, receiver, args, null, isPotentiallyRefined); } return new NoResultCallInstr(scope, Operation.NORESULT_CALL, callType, name, receiver, args, closure, isPotentiallyRefined); }
@Override public CallBase specializeForInterpretation() { Operand[] callArgs = getCallArgs(); if (hasClosure() || containsSplat(callArgs)) return this; switch (callArgs.length) { // case 0: // return new ZeroOperandArgNoBlockNoResultCallInstr(this); case 1: // if (isAllFixnums()) return new OneFixnumArgNoBlockNoResultCallInstr(this); return new OneOperandArgNoBlockNoResultCallInstr(this); } return this; }
@Override public CallBase specializeForInterpretation() { Operand[] callArgs = getCallArgs(); if (hasClosure() || containsSplat(callArgs)) return this; switch (callArgs.length) { // case 0: // return new ZeroOperandArgNoBlockNoResultCallInstr(this); case 1: // if (isAllFixnums()) return new OneFixnumArgNoBlockNoResultCallInstr(this); return new OneOperandArgNoBlockNoResultCallInstr(this); } return this; }
@Override public Instr clone(CloneInfo ii) { return new OneOperandArgNoBlockNoResultCallInstr(ii.getScope(), getCallType(), getName(), getReceiver().cloneForInlining(ii), cloneCallArgs(ii), getClosureArg() == null ? null : getClosureArg().cloneForInlining(ii), isPotentiallyRefined(), getCallSite(), getCallSiteId()); }
@Override public Instr clone(CloneInfo ii) { return new OneOperandArgNoBlockNoResultCallInstr(ii.getScope(), getCallType(), getName(), getReceiver().cloneForInlining(ii), cloneCallArgs(ii), getClosureArg() == null ? null : getClosureArg().cloneForInlining(ii), isPotentiallyRefined(), getCallSite(), getCallSiteId()); }