public override IAnalysisSet Call(Node node, AnalysisUnit unit, IAnalysisSet[] args, NameExpression[] keywordArgNames)
        {
            // TODO: More Type propagation
            IAdvancedPythonType advType = Type as IAdvancedPythonType;

            if (advType != null)
            {
                var types = advType.GetTypesPropagatedOnCall();
                if (types != null)
                {
                    IAnalysisSet[] propagating = new IAnalysisSet[types.Count];
                    for (int i = 0; i < propagating.Length; i++)
                    {
                        propagating[i] = unit.State.GetInstance(types[i]).SelfSet;
                    }
                    foreach (var arg in args)
                    {
                        arg.Call(node, unit, propagating, ExpressionEvaluator.EmptyNames);
                    }
                }
            }

            return(Instance.SelfSet);
        }
Example #2
0
        public override ISet <Namespace> Call(Node node, AnalysisUnit unit, ISet <Namespace>[] args, string[] keywordArgNames)
        {
            // TODO: More Type propagation
            IAdvancedPythonType advType = _type as IAdvancedPythonType;

            if (advType != null)
            {
                var types = advType.GetTypesPropagatedOnCall();
                if (types != null)
                {
                    ISet <Namespace>[] propagating = new ISet <Namespace> [types.Count];
                    for (int i = 0; i < propagating.Length; i++)
                    {
                        propagating[i] = unit.ProjectState.GetInstance(types[i]).SelfSet;
                    }
                    foreach (var arg in args)
                    {
                        arg.Call(node, unit, propagating, EmptyStrings);
                    }
                }
            }

            return(Instance.SelfSet);
        }
Example #3
0
        internal BuiltinClassInfo MakeGenericType(IAdvancedPythonType clrType, params IPythonType[] clrIndexType)
        {
            var res = clrType.MakeGenericType(clrIndexType);

            return((BuiltinClassInfo)GetAnalysisValueFromObjects(res));
        }