Example #1
0
 internal bool AddTypes(Node node, AnalysisUnit unit, IAnalysisSet key, IAnalysisSet value, bool enqueue = true)
 {
     if (_keysAndValues.AddTypes(unit, key, value, enqueue))
     {
         if (_keysVariable != null)
         {
             _keysVariable.MakeUnionStrongerIfMoreThan(ProjectState.Limits.DictKeyTypes, value);
             if (_keysVariable.AddTypes(unit, key, enqueue, DeclaringModule))
             {
                 if (_keysList != null)
                 {
                     _keysList.UnionType = null;
                 }
             }
         }
         if (_valuesVariable != null)
         {
             _valuesVariable.MakeUnionStrongerIfMoreThan(ProjectState.Limits.DictValueTypes, value);
             if (_valuesVariable.AddTypes(unit, value, enqueue, DeclaringModule))
             {
                 if (_valuesList != null)
                 {
                     _valuesList.UnionType = null;
                 }
             }
         }
         if (_keyValueTuple != null)
         {
             _keyValueTuple.IndexTypes[0].MakeUnionStrongerIfMoreThan(ProjectState.Limits.DictKeyTypes, key);
             _keyValueTuple.IndexTypes[1].MakeUnionStrongerIfMoreThan(ProjectState.Limits.DictValueTypes, value);
             _keyValueTuple.IndexTypes[0].AddTypes(unit, key, enqueue, DeclaringModule);
             _keyValueTuple.IndexTypes[1].AddTypes(unit, value, enqueue, DeclaringModule);
         }
         return(true);
     }
     return(false);
 }
Example #2
0
 public void AddReturn(Node node, AnalysisUnit unit, IAnalysisSet returnValue, bool enqueue = true)
 {
     Returns.MakeUnionStrongerIfMoreThan(ProjectState.Limits.ReturnTypes, returnValue);
     Returns.AddTypes(unit, returnValue, enqueue, DeclaringModule);
 }
Example #3
0
 public void AddYield(Node node, AnalysisUnit unit, IAnalysisSet yieldValue, bool enqueue = true)
 {
     Yields.MakeUnionStrongerIfMoreThan(ProjectState.Limits.YieldTypes, yieldValue);
     Yields.AddTypes(unit, yieldValue, enqueue, DeclaringModule);
 }