public object CallReflected(CodeContext context, CallType callType, params object[] args) { TargetSet ts = GetTargetSet(args.Length); if (ts != null) { return(ts.CallReflected(context, callType, args, _kwArgs)); } throw BadArgumentCount(callType, args.Length); }
public MethodCandidate MakeBindingTarget(CallType callType, Type[] types, out Type[] argumentTests) { TargetSet ts = GetTargetSet(types.Length); if (ts != null) { return(ts.MakeBindingTarget(callType, types, _kwArgs, out argumentTests)); } argumentTests = null; return(null); }
private void AddTarget(MethodCandidate target) { int count = target.Target.ParameterCount; TargetSet set; if (!_targetSets.TryGetValue(count, out set)) { set = new TargetSet(this, count); _targetSets[count] = set; } set.Add(target); }
public AbstractValue AbstractCall(CallType callType, IList <AbstractValue> args) { TargetSet ts = this.GetTargetSet(args.Count); if (ts != null) { return(ts.AbstractCall(callType, args)); } else { return(AbstractValue.TypeError(BadArgumentCount(callType, args.Count).Message)); } }
private TargetSet BuildTargetSet(int count) { TargetSet ts = new TargetSet(this, count); if (_paramsCandidates != null) { foreach (MethodCandidate maker in _paramsCandidates) { MethodCandidate target = maker.MakeParamsExtended(_binder, count, _kwArgs); if (target != null) { ts.Add(target); } } } return(ts); }
private void AddTarget(MethodCandidate target) { int count = target.Target.ParameterCount; TargetSet set; if (!_targetSets.TryGetValue(count, out set)) { set = new TargetSet(this, count); _targetSets[count] = set; } set.Add(target); }
private TargetSet BuildTargetSet(int count) { TargetSet ts = new TargetSet(this, count); if (_paramsCandidates != null) { foreach (MethodCandidate maker in _paramsCandidates) { MethodCandidate target = maker.MakeParamsExtended(_binder, count, _kwArgs); if (target != null) ts.Add(target); } } return ts; }