23 references to RefKindExtensions
Microsoft.CodeAnalysis.CSharp (23)
BoundTree\Constructors.cs (3)
194Debug.Assert(argumentRefKind is RefKind.None or RefKind.Ref or RefKind.In or RefKind.Out or RefKindExtensions.StrictIn && 198RefKind.In => argumentRefKind == RefKindExtensions.StrictIn, 199RefKind.RefReadOnlyParameter => argumentRefKind is RefKind.In or RefKindExtensions.StrictIn,
CodeGen\EmitExpression.cs (6)
724Debug.Assert(refKind is RefKind.In or RefKind.Ref or RefKind.Out or RefKindExtensions.StrictIn); 749Debug.Assert(refKind is RefKind.Ref or RefKind.Out or RefKindExtensions.StrictIn); 752return refKind == RefKindExtensions.StrictIn ? AddressKind.ReadOnlyStrict : AddressKind.Writeable; 991RefKind.In => argRefKind == RefKindExtensions.StrictIn, 992RefKind.RefReadOnlyParameter => argRefKind is RefKind.In or RefKindExtensions.StrictIn, 3033LocalDefinition temp = EmitAddress(assignmentOperator.Right, lhs.GetRefKind() is RefKind.RefReadOnly or RefKindExtensions.StrictIn or RefKind.RefReadOnlyParameter ? AddressKind.ReadOnlyStrict : AddressKind.Writeable);
CodeGen\Optimizer.cs (1)
985if (localSymbol.RefKind is RefKind.RefReadOnly or RefKindExtensions.StrictIn &&
FlowAnalysis\AbstractFlowPass.cs (1)
1553case RefKindExtensions.StrictIn:
Lowering\LocalRewriter\LocalRewriter_Call.cs (4)
971return RefKindExtensions.StrictIn; 1226refKindsBuilder[i] = argRefKind == RefKind.None ? RefKind.In : RefKindExtensions.StrictIn; 1441argRefKind = argRefKind == RefKind.None ? RefKind.In : RefKindExtensions.StrictIn; 1463? (argRefKind == RefKind.None ? RefKind.In : RefKindExtensions.StrictIn)
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
566var call = _factory.New(constructor, arguments: [temp], argumentRefKinds: [asReadOnlySpan ? RefKindExtensions.StrictIn : RefKind.Ref]);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
747collectionTempRefKind = enumeratorInfo.InlineArraySpanType == WellKnownType.System_Span_T ? RefKind.Ref : RefKindExtensions.StrictIn;
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (1)
312possiblyRefCapturedReceiver = _factory.StoreToTemp(possiblyRefCapturedReceiver, out var refCapture, createSpan.Parameters[0].RefKind == RefKind.In ? RefKindExtensions.StrictIn : RefKind.Ref);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
488argumentRefKindsOpt: [readOnlySpanCtorRefParamChar.Parameters[0].RefKind == RefKind.Ref ? RefKind.Ref : RefKindExtensions.StrictIn],
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
648Debug.Assert(refKind is RefKindExtensions.StrictIn or RefKind.Ref or RefKind.Out); 666Debug.Assert(refKind is RefKindExtensions.StrictIn or RefKind.Ref or RefKind.In);
Lowering\SyntheticBoundNodeFactory.cs (2)
896RefKind.In or RefKind.RefReadOnlyParameter when useStrictArgumentRefKinds => RefKindExtensions.StrictIn, 1685case RefKindExtensions.StrictIn: