public AnalysisEntityFactory( Func <IOperation, PointsToAbstractValue> getPointsToAbstractValueOpt, INamedTypeSymbol containingTypeSymbol) { _getPointsToAbstractValueOpt = getPointsToAbstractValueOpt; _analysisEntityMap = new Dictionary <IOperation, AnalysisEntity>(); _instanceLocationsForSymbols = new Dictionary <ISymbol, PointsToAbstractValue>(); var thisOrMeInstanceLocation = AbstractLocation.CreateThisOrMeLocation(containingTypeSymbol); var instanceLocation = new PointsToAbstractValue(thisOrMeInstanceLocation); ThisOrMeInstance = AnalysisEntity.CreateThisOrMeInstance(containingTypeSymbol, instanceLocation); }
private static PointsToAbstractValue GetThisOrMeInstancePointsToValue(INamedTypeSymbol containingTypeSymbol) { if (!containingTypeSymbol.HasValueCopySemantics()) { var thisOrMeLocation = AbstractLocation.CreateThisOrMeLocation(containingTypeSymbol); return(new PointsToAbstractValue(thisOrMeLocation)); } else { return(PointsToAbstractValue.NoLocation); } }
public AnalysisEntityFactory( Func <IOperation, PointsToAbstractValue> getPointsToAbstractValueOpt, INamedTypeSymbol containingTypeSymbol) { _getPointsToAbstractValueOpt = getPointsToAbstractValueOpt; _analysisEntitiesPerInstance = ImmutableDictionary.CreateBuilder <PointsToAbstractValue, ImmutableHashSet <AnalysisEntity> .Builder>(); _analysisEntityMap = new Dictionary <IOperation, AnalysisEntity>(); _instanceLocationsForSymbols = new Dictionary <ISymbol, PointsToAbstractValue>(); var thisOrMeInstanceLocation = AbstractLocation.CreateThisOrMeLocation(containingTypeSymbol); var instanceLocation = new PointsToAbstractValue(thisOrMeInstanceLocation); ThisOrMeInstance = AnalysisEntity.CreateThisOrMeInstance(containingTypeSymbol, instanceLocation); AddToMap(instanceLocation, ThisOrMeInstance); }
public AnalysisEntityFactory( Func <IOperation, PointsToAbstractValue> getPointsToAbstractValueOpt, Func <bool> getIsInsideObjectInitializer, INamedTypeSymbol containingTypeSymbol) { _getPointsToAbstractValueOpt = getPointsToAbstractValueOpt; _getIsInsideObjectInitializer = getIsInsideObjectInitializer; _analysisEntityMap = new Dictionary <IOperation, AnalysisEntity>(); _instanceLocationsForSymbols = new Dictionary <ISymbol, PointsToAbstractValue>(); var thisOrMeInstanceLocation = AbstractLocation.CreateThisOrMeLocation(containingTypeSymbol); var instanceLocation = PointsToAbstractValue.Create(thisOrMeInstanceLocation, mayBeNull: false); ThisOrMeInstance = AnalysisEntity.CreateThisOrMeInstance(containingTypeSymbol, instanceLocation); }