5 instantiations of PropertySetAbstractValue
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAbstractValue.cs (3)
30public static readonly PropertySetAbstractValue Unknown = new(); 52return new PropertySetAbstractValue(propertyAbstractValues.ToImmutable()); 64return new PropertySetAbstractValue(propertyAbstractValues);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAbstractValue.ValuePool.cs (2)
45this.OneDimensionalPool[i] = new PropertySetAbstractValue( 64this.TwoDimensionalPool[i, j] = new PropertySetAbstractValue(
98 references to PropertySetAbstractValue
Microsoft.CodeAnalysis.AnalyzerUtilities (98)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\ConstructorMapper.cs (4)
22/// Mapping a constructor's arguments to a <see cref="PropertySetAbstractValue"/>. 28public delegate PropertySetAbstractValue ValueContentAbstractValueCallback( 34/// Mapping a constructor's arguments to a <see cref="PropertySetAbstractValue"/>. 39public delegate PropertySetAbstractValue PointsToAbstractValueCallback(
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\HazardousUsageEvaluator.cs (7)
11/// Determines if usage of a <see cref="PropertySetAbstractValue"/> is hazardous or not. 18/// Evaluates if the method invocation with a given <see cref="PropertySetAbstractValue"/> is hazardous or not. 23public delegate HazardousUsageEvaluationResult InvocationEvaluationCallback(IMethodSymbol methodSymbol, PropertySetAbstractValue propertySetAbstractValue); 26/// Evaluates if a given <see cref="PropertySetAbstractValue"/> is hazardous or not. 30public delegate HazardousUsageEvaluationResult EvaluationCallback(PropertySetAbstractValue propertySetAbstractValue); 105/// Evaluates if the method invocation with a given <see cref="PropertySetAbstractValue"/> is hazardous or not. 115/// Evaluates if the return statement or initialization value with a given <see cref="PropertySetAbstractValue"/> is hazardous or not.
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAbstractValue.cs (9)
30public static readonly PropertySetAbstractValue Unknown = new(); 34public static PropertySetAbstractValue GetInstance(PropertySetAbstractValueKind v1) 39public static PropertySetAbstractValue GetInstance(PropertySetAbstractValueKind v1, PropertySetAbstractValueKind v2) 44public static PropertySetAbstractValue GetInstance(ArrayBuilder<PropertySetAbstractValueKind> propertyAbstractValues) 46if (TryGetPooledInstance(propertyAbstractValues, out PropertySetAbstractValue? instance)) 56public static PropertySetAbstractValue GetInstance(ImmutableArray<PropertySetAbstractValueKind> propertyAbstractValues) 58if (TryGetPooledInstance(propertyAbstractValues, out PropertySetAbstractValue? instance)) 68private static bool TryGetPooledInstance(IReadOnlyList<PropertySetAbstractValueKind> values, [NotNullWhen(returnValue: true)] out PropertySetAbstractValue? instance) 152internal PropertySetAbstractValue ReplaceAt(int index, PropertySetAbstractValueKind kind)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAbstractValue.ValuePool.cs (7)
20private readonly PropertySetAbstractValue[] OneDimensionalPool; 25private readonly PropertySetAbstractValue[,] TwoDimensionalPool; 36this.OneDimensionalPool = new PropertySetAbstractValue[values.Length]; 41this.OneDimensionalPool[i] = PropertySetAbstractValue.Unknown; 50this.TwoDimensionalPool = new PropertySetAbstractValue[values.Length, values.Length]; 73public PropertySetAbstractValue GetInstance(PropertySetAbstractValueKind v1) 78public PropertySetAbstractValue GetInstance(PropertySetAbstractValueKind v1, PropertySetAbstractValueKind v2)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.cs (5)
20using PropertySetAnalysisData = DictionaryAnalysisData<AbstractLocation, PropertySetAbstractValue>; 21using PropertySetAnalysisDomain = MapAbstractDomain<AbstractLocation, PropertySetAbstractValue>; 25/// Dataflow analysis to track <see cref="PropertySetAbstractValue"/> of <see cref="AbstractLocation"/>/<see cref="IOperation"/> instances. 27internal partial class PropertySetAnalysis : ForwardDataFlowAnalysis<PropertySetAnalysisData, PropertySetAnalysisContext, PropertySetAnalysisResult, PropertySetBlockAnalysisResult, PropertySetAbstractValue> 314DataFlowAnalysisResult<PropertySetBlockAnalysisResult, PropertySetAbstractValue> dataFlowAnalysisResult)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.PropertySetAbstractValueDomain.cs (12)
14/// Abstract value domain for <see cref="PropertySetAnalysis"/> to merge and compare <see cref="PropertySetAbstractValue"/> values. 16private class PropertySetAbstractValueDomain : AbstractValueDomain<PropertySetAbstractValue> 22public override PropertySetAbstractValue Bottom => PropertySetAbstractValue.Unknown; 24public override PropertySetAbstractValue UnknownOrMayBeValue => PropertySetAbstractValue.Unknown; 26public override int Compare(PropertySetAbstractValue oldValue, PropertySetAbstractValue newValue, bool assertMonotonicity) 57public override PropertySetAbstractValue Merge(PropertySetAbstractValue value1, PropertySetAbstractValue value2) 69return PropertySetAbstractValue.GetInstance(builder);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (36)
22using PropertySetAnalysisData = DictionaryAnalysisData<AbstractLocation, PropertySetAbstractValue>; 30AbstractLocationDataFlowOperationVisitor<PropertySetAnalysisData, PropertySetAnalysisContext, PropertySetAnalysisResult, PropertySetAbstractValue> 90protected override PropertySetAbstractValue GetAbstractDefaultValue(ITypeSymbol? type) => ValueDomain.Bottom; 94protected override PropertySetAbstractValue GetAbstractValue(AbstractLocation location) 95=> this.CurrentAnalysisData.TryGetValue(location, out var value) ? value : ValueDomain.Bottom; 101protected override void SetAbstractValue(AbstractLocation location, PropertySetAbstractValue value) 103if (value != PropertySetAbstractValue.Unknown 133protected override void SetAbstractValueForArrayElementInitializer(IArrayCreationOperation arrayCreation, ImmutableArray<AbstractIndex> indices, ITypeSymbol elementType, IOperation initializer, PropertySetAbstractValue value) 137protected override void SetAbstractValueForAssignment(IOperation target, IOperation? assignedValueOperation, PropertySetAbstractValue assignedValue, bool mayBeAssignment = false) 141protected override void SetAbstractValueForTupleElementAssignment(AnalysisEntity tupleElementEntity, IOperation assignedValueOperation, PropertySetAbstractValue assignedValue) 145public override PropertySetAbstractValue VisitObjectCreation(IObjectCreationOperation operation, object? argument) 147PropertySetAbstractValue abstractValue = base.VisitObjectCreation(operation, argument); 156abstractValue = PropertySetAbstractValue.GetInstance(constructorMapper.PropertyAbstractValues); 204(PropertySetAbstractValue abstractValue) => hazardousUsageEvaluator.InvocationEvaluator!( 213protected override PropertySetAbstractValue VisitAssignmentOperation(IAssignmentOperation operation, object? argument) 215PropertySetAbstractValue? baseValue = base.VisitAssignmentOperation(operation, argument); 312PropertySetAbstractValue propertySetAbstractValue = this.GetAbstractValue(location); 327return baseValue ?? PropertySetAbstractValue.Unknown.ReplaceAt(index, propertySetAbstractValueKind); 385out var propertySetAbstractValue)) 387propertySetAbstractValue = PropertySetAbstractValue.Unknown; 415initializationHazardousUsageEvaluator?.ValueEvaluator!(PropertySetAbstractValue.Unknown); 454public override PropertySetAbstractValue VisitInvocation_NonLambdaOrDelegateOrLocalFunction(IMethodSymbol method, IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments, bool invokedAsDelegate, IOperation originalOperation, PropertySetAbstractValue defaultValue) 456PropertySetAbstractValue baseValue = base.VisitInvocation_NonLambdaOrDelegateOrLocalFunction(method, visitedInstance, visitedArguments, invokedAsDelegate, originalOperation, defaultValue); 469(PropertySetAbstractValue abstractValue) => argumentHazardousUsageEvaluator.ValueEvaluator!(abstractValue)); 493(PropertySetAbstractValue abstractValue) => hazardousUsageEvaluator!.InvocationEvaluator!(method, abstractValue)); 596Func<PropertySetAbstractValue, HazardousUsageEvaluationResult> evaluationFunction, 597Func<AbstractLocation, PropertySetAbstractValue>? locationToAbstractValueMapping = null) 605PropertySetAbstractValue locationAbstractValue = locationToAbstractValueMapping(location); 633public override PropertySetAbstractValue VisitInvocation_LocalFunction(IMethodSymbol localFunction, ImmutableArray<IArgumentOperation> visitedArguments, IOperation originalOperation, PropertySetAbstractValue defaultValue) 635PropertySetAbstractValue baseValue = base.VisitInvocation_LocalFunction(localFunction, visitedArguments, originalOperation, defaultValue); 641public override PropertySetAbstractValue VisitInvocation_Lambda(IFlowAnonymousFunctionOperation lambda, ImmutableArray<IArgumentOperation> visitedArguments, IOperation originalOperation, PropertySetAbstractValue defaultValue) 643PropertySetAbstractValue baseValue = base.VisitInvocation_Lambda(lambda, visitedArguments, originalOperation, defaultValue); 662(PropertySetAbstractValue abstractValue) => hazardousUsageEvaluator.ValueEvaluator!(abstractValue));
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisContext.cs (7)
19using InterproceduralPropertySetAnalysisData = InterproceduralAnalysisData<DictionaryAnalysisData<AbstractLocation, PropertySetAbstractValue>, PropertySetAnalysisContext, PropertySetAbstractValue>; 20using PropertySetAnalysisData = DictionaryAnalysisData<AbstractLocation, PropertySetAbstractValue>; 26internal sealed class PropertySetAnalysisContext : AbstractDataFlowAnalysisContext<PropertySetAnalysisData, PropertySetAnalysisContext, PropertySetAnalysisResult, PropertySetAbstractValue> 29AbstractValueDomain<PropertySetAbstractValue> valueDomain, 72AbstractValueDomain<PropertySetAbstractValue> valueDomain, 168protected override bool ComputeEqualsByHashCodeParts(AbstractDataFlowAnalysisContext<PropertySetAnalysisData, PropertySetAnalysisContext, PropertySetAnalysisResult, PropertySetAbstractValue> obj)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisResult.cs (2)
15internal sealed class PropertySetAnalysisResult : DataFlowAnalysisResult<PropertySetBlockAnalysisResult, PropertySetAbstractValue> 18DataFlowAnalysisResult<PropertySetBlockAnalysisResult, PropertySetAbstractValue> propertySetAnalysisResult,
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetBlockAnalysisResult.cs (4)
11using PropertySetAnalysisData = DictionaryAnalysisData<AbstractLocation, PropertySetAbstractValue>; 15/// It stores <see cref="PropertySetAbstractValue"/>s for each <see cref="AbstractLocation"/> at the start and end of the basic block. 22Data = blockAnalysisData?.ToImmutableDictionary() ?? ImmutableDictionary<AbstractLocation, PropertySetAbstractValue>.Empty; 25public ImmutableDictionary<AbstractLocation, PropertySetAbstractValue> Data { get; }
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetCallbacks.cs (5)
122PropertySetAbstractValue propertySetAbstractValue) 135PropertySetAbstractValue propertySetAbstractValue) 152PropertySetAbstractValue propertySetAbstractValue) 169PropertySetAbstractValue propertySetAbstractValue) 180PropertySetAbstractValue propertySetAbstractValue,