21 references to RefKindExtensions
Microsoft.CodeAnalysis.CSharp (21)
BoundTree\Constructors.cs (3)
194
Debug.Assert(argumentRefKind is RefKind.None or RefKind.Ref or RefKind.In or RefKind.Out or
RefKindExtensions
.StrictIn &&
198
RefKind.In => argumentRefKind ==
RefKindExtensions
.StrictIn,
199
RefKind.RefReadOnlyParameter => argumentRefKind is RefKind.In or
RefKindExtensions
.StrictIn,
CodeGen\EmitExpression.cs (5)
729
Debug.Assert(refKind is RefKind.Ref or RefKind.Out or
RefKindExtensions
.StrictIn);
732
var unexpectedTemp = EmitAddress(argument, refKind ==
RefKindExtensions
.StrictIn ? AddressKind.ReadOnlyStrict : AddressKind.Writeable);
980
RefKind.In => argRefKind ==
RefKindExtensions
.StrictIn,
981
RefKind.RefReadOnlyParameter => argRefKind is RefKind.In or
RefKindExtensions
.StrictIn,
2994
LocalDefinition temp = EmitAddress(assignmentOperator.Right, lhs.GetRefKind() is RefKind.RefReadOnly or
RefKindExtensions
.StrictIn or RefKind.RefReadOnlyParameter ? AddressKind.ReadOnlyStrict : AddressKind.Writeable);
CodeGen\Optimizer.cs (1)
986
if (localSymbol.RefKind is RefKind.RefReadOnly or
RefKindExtensions
.StrictIn &&
FlowAnalysis\AbstractFlowPass.cs (1)
1553
case
RefKindExtensions
.StrictIn:
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
1166
refKindsBuilder[i] = argRefKind == RefKind.None ? RefKind.In :
RefKindExtensions
.StrictIn;
1367
argRefKind = argRefKind == RefKind.None ? RefKind.In :
RefKindExtensions
.StrictIn;
1389
? (argRefKind == RefKind.None ? RefKind.In :
RefKindExtensions
.StrictIn)
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
552
var call = _factory.New(constructor, arguments: [temp], argumentRefKinds: [asReadOnlySpan ?
RefKindExtensions
.StrictIn : RefKind.Ref]);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
760
collectionTempRefKind = enumeratorInfo.InlineArraySpanType == WellKnownType.System_Span_T ? RefKind.Ref :
RefKindExtensions
.StrictIn;
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (1)
273
possiblyRefCapturedReceiver = _factory.StoreToTemp(possiblyRefCapturedReceiver, out var refCapture, createSpan.Parameters[0].RefKind == RefKind.In ?
RefKindExtensions
.StrictIn : RefKind.Ref);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
551
argumentRefKindsOpt: [readOnlySpanCtorRefParamChar.Parameters[0].RefKind == RefKind.Ref ? RefKind.Ref :
RefKindExtensions
.StrictIn],
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
624
Debug.Assert(refKind is
RefKindExtensions
.StrictIn or RefKind.Ref or RefKind.Out);
642
Debug.Assert(refKind is
RefKindExtensions
.StrictIn or RefKind.Ref or RefKind.In);
Lowering\SyntheticBoundNodeFactory.cs (2)
871
RefKind.In or RefKind.RefReadOnlyParameter when useStrictArgumentRefKinds =>
RefKindExtensions
.StrictIn,
1667
case
RefKindExtensions
.StrictIn: