20 references to RefKindExtensions
Microsoft.CodeAnalysis.CSharp (20)
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 (5)
729Debug.Assert(refKind is RefKind.Ref or RefKind.Out or RefKindExtensions.StrictIn); 732var unexpectedTemp = EmitAddress(argument, refKind == RefKindExtensions.StrictIn ? AddressKind.ReadOnlyStrict : AddressKind.Writeable); 980RefKind.In => argRefKind == RefKindExtensions.StrictIn, 981RefKind.RefReadOnlyParameter => argRefKind is RefKind.In or RefKindExtensions.StrictIn, 2994LocalDefinition temp = EmitAddress(assignmentOperator.Right, lhs.GetRefKind() is RefKind.RefReadOnly or RefKindExtensions.StrictIn or RefKind.RefReadOnlyParameter ? AddressKind.ReadOnlyStrict : AddressKind.Writeable);
CodeGen\Optimizer.cs (1)
986if (localSymbol.RefKind is RefKind.RefReadOnly or RefKindExtensions.StrictIn &&
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
1166refKindsBuilder[i] = argRefKind == RefKind.None ? RefKind.In : RefKindExtensions.StrictIn; 1367argRefKind = argRefKind == RefKind.None ? RefKind.In : RefKindExtensions.StrictIn; 1389? (argRefKind == RefKind.None ? RefKind.In : RefKindExtensions.StrictIn)
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
552var call = _factory.New(constructor, arguments: [temp], argumentRefKinds: [asReadOnlySpan ? RefKindExtensions.StrictIn : RefKind.Ref]);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
762collectionTempRefKind = enumeratorInfo.InlineArraySpanType == WellKnownType.System_Span_T ? RefKind.Ref : RefKindExtensions.StrictIn;
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (1)
273possiblyRefCapturedReceiver = _factory.StoreToTemp(possiblyRefCapturedReceiver, out var refCapture, createSpan.Parameters[0].RefKind == RefKind.In ? RefKindExtensions.StrictIn : RefKind.Ref);
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
551argumentRefKindsOpt: [readOnlySpanCtorRefParamChar.Parameters[0].RefKind == RefKind.Ref ? RefKind.Ref : RefKindExtensions.StrictIn],
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
623Debug.Assert(refKind is RefKindExtensions.StrictIn or RefKind.Ref or RefKind.Out); 641Debug.Assert(refKind is RefKindExtensions.StrictIn or RefKind.Ref or RefKind.In);
Lowering\SyntheticBoundNodeFactory.cs (2)
927RefKind.In or RefKind.RefReadOnlyParameter when useStrictArgumentRefKinds => RefKindExtensions.StrictIn, 1723case RefKindExtensions.StrictIn: