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)
24using PropertySetAnalysisData = DictionaryAnalysisData<AbstractLocation, PropertySetAbstractValue>; 32AbstractLocationDataFlowOperationVisitor<PropertySetAnalysisData, PropertySetAnalysisContext, PropertySetAnalysisResult, PropertySetAbstractValue> 92protected override PropertySetAbstractValue GetAbstractDefaultValue(ITypeSymbol? type) => ValueDomain.Bottom; 96protected override PropertySetAbstractValue GetAbstractValue(AbstractLocation location) 97=> this.CurrentAnalysisData.TryGetValue(location, out var value) ? value : ValueDomain.Bottom; 103protected override void SetAbstractValue(AbstractLocation location, PropertySetAbstractValue value) 105if (value != PropertySetAbstractValue.Unknown 135protected override void SetAbstractValueForArrayElementInitializer(IArrayCreationOperation arrayCreation, ImmutableArray<AbstractIndex> indices, ITypeSymbol elementType, IOperation initializer, PropertySetAbstractValue value) 139protected override void SetAbstractValueForAssignment(IOperation target, IOperation? assignedValueOperation, PropertySetAbstractValue assignedValue, bool mayBeAssignment = false) 143protected override void SetAbstractValueForTupleElementAssignment(AnalysisEntity tupleElementEntity, IOperation assignedValueOperation, PropertySetAbstractValue assignedValue) 147public override PropertySetAbstractValue VisitObjectCreation(IObjectCreationOperation operation, object? argument) 149PropertySetAbstractValue abstractValue = base.VisitObjectCreation(operation, argument); 158abstractValue = PropertySetAbstractValue.GetInstance(constructorMapper.PropertyAbstractValues); 206(PropertySetAbstractValue abstractValue) => hazardousUsageEvaluator.InvocationEvaluator!( 215protected override PropertySetAbstractValue VisitAssignmentOperation(IAssignmentOperation operation, object? argument) 217PropertySetAbstractValue? baseValue = base.VisitAssignmentOperation(operation, argument); 314PropertySetAbstractValue propertySetAbstractValue = this.GetAbstractValue(location); 329return baseValue ?? PropertySetAbstractValue.Unknown.ReplaceAt(index, propertySetAbstractValueKind); 387out var propertySetAbstractValue)) 389propertySetAbstractValue = PropertySetAbstractValue.Unknown; 417initializationHazardousUsageEvaluator?.ValueEvaluator!(PropertySetAbstractValue.Unknown); 456public override PropertySetAbstractValue VisitInvocation_NonLambdaOrDelegateOrLocalFunction(IMethodSymbol method, IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments, bool invokedAsDelegate, IOperation originalOperation, PropertySetAbstractValue defaultValue) 458PropertySetAbstractValue baseValue = base.VisitInvocation_NonLambdaOrDelegateOrLocalFunction(method, visitedInstance, visitedArguments, invokedAsDelegate, originalOperation, defaultValue); 471(PropertySetAbstractValue abstractValue) => argumentHazardousUsageEvaluator.ValueEvaluator!(abstractValue)); 495(PropertySetAbstractValue abstractValue) => hazardousUsageEvaluator!.InvocationEvaluator!(method, abstractValue)); 598Func<PropertySetAbstractValue, HazardousUsageEvaluationResult> evaluationFunction, 599Func<AbstractLocation, PropertySetAbstractValue>? locationToAbstractValueMapping = null) 607PropertySetAbstractValue locationAbstractValue = locationToAbstractValueMapping(location); 635public override PropertySetAbstractValue VisitInvocation_LocalFunction(IMethodSymbol localFunction, ImmutableArray<IArgumentOperation> visitedArguments, IOperation originalOperation, PropertySetAbstractValue defaultValue) 637PropertySetAbstractValue baseValue = base.VisitInvocation_LocalFunction(localFunction, visitedArguments, originalOperation, defaultValue); 643public override PropertySetAbstractValue VisitInvocation_Lambda(IFlowAnonymousFunctionOperation lambda, ImmutableArray<IArgumentOperation> visitedArguments, IOperation originalOperation, PropertySetAbstractValue defaultValue) 645PropertySetAbstractValue baseValue = base.VisitInvocation_Lambda(lambda, visitedArguments, originalOperation, defaultValue); 664(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,