78 references to AddressKind
Microsoft.CodeAnalysis.CSharp (78)
Binder\Binder.ValueChecks.cs (8)
5710
internal static bool IsAnyReadOnly(
AddressKind
addressKind) => addressKind >=
AddressKind
.ReadOnly;
5718
AddressKind
addressKind,
5728
if (addressKind ==
AddressKind
.ReadOnly && !expression.Type.IsValueType && peVerifyCompatEnabled)
5847
AddressKind
addressKind,
5868
if (addressKind ==
AddressKind
.ReadOnlyStrict)
5874
if (addressKind ==
AddressKind
.ReadOnly && !peVerifyCompatEnabled)
5911
|| !HasHome(receiver,
AddressKind
.ReadOnly, containingSymbol, peVerifyCompatEnabled, stackLocalsOpt);
CodeGen\EmitAddress.cs (23)
26
private LocalDefinition EmitAddress(BoundExpression expression,
AddressKind
addressKind)
179
private static bool UseCallResultAsAddress(BoundCall call,
AddressKind
addressKind)
186
private LocalDefinition EmitPassByCopyAddress(BoundPassByCopy passByCopyExpr,
AddressKind
addressKind)
215
private void EmitConditionalOperatorAddress(BoundConditionalOperator expr,
AddressKind
addressKind)
250
var receiverTemp = EmitAddress(expression.ReferenceTypeReceiver,
AddressKind
.ReadOnly);
257
EmitReceiverRef(expression.ValueTypeReceiver,
AddressKind
.Constrained);
265
private LocalDefinition EmitLocalAddress(BoundLocal localAccess,
AddressKind
addressKind)
298
private LocalDefinition EmitDupAddress(BoundDup dup,
AddressKind
addressKind)
343
private LocalDefinition EmitSequenceAddress(BoundSequence sequence,
AddressKind
addressKind)
395
private void EmitArrayElementAddress(BoundArrayAccess arrayAccess,
AddressKind
addressKind)
418
private bool ShouldEmitReadOnlyPrefix(BoundArrayAccess arrayAccess,
AddressKind
addressKind)
420
if (addressKind ==
AddressKind
.Constrained)
438
private LocalDefinition EmitFieldAddress(BoundFieldAccess fieldAccess,
AddressKind
addressKind)
468
private bool HasHome(BoundExpression expression,
AddressKind
addressKind)
471
private LocalDefinition EmitParameterAddress(BoundParameter parameter,
AddressKind
addressKind)
504
private LocalDefinition EmitReceiverRef(BoundExpression receiver,
AddressKind
addressKind)
536
private static bool BoxNonVerifierReferenceReceiver(TypeSymbol receiverType,
AddressKind
addressKind)
539
return receiverType.TypeKind == TypeKind.TypeParameter && addressKind !=
AddressKind
.Constrained;
545
private LocalDefinition EmitInstanceFieldAddress(BoundFieldAccess fieldAccess,
AddressKind
addressKind)
557
(addressKind ==
AddressKind
.Constrained ?
AddressKind
.Writeable : addressKind) :
558
(addressKind !=
AddressKind
.ReadOnlyStrict ?
AddressKind
.ReadOnly : addressKind));
CodeGen\EmitArrayInitializer.cs (3)
553
EmitAddress(inPlaceTarget, Binder.
AddressKind
.Writeable);
705
EmitAddress(inPlaceTarget, Binder.
AddressKind
.Writeable);
761
EmitAddress(inPlaceTarget, Binder.
AddressKind
.Writeable);
CodeGen\EmitExpression.cs (34)
420
receiverTemp = EmitReceiverRef(receiver,
AddressKind
.ReadOnly);
453
receiverTemp = EmitReceiverRef(receiver,
AddressKind
.Constrained);
499
var
addressKind =
AddressKind
.ReadOnly;
512
receiverTemp = EmitReceiverRef(receiver,
AddressKind
.ReadOnly);
577
receiverTemp = EmitReceiverRef(receiver,
AddressKind
.Constrained);
676
var temp = EmitAddress(expression.Operand,
AddressKind
.Writeable);
724
var temp = EmitAddress(argument,
AddressKind
.ReadOnly);
732
var unexpectedTemp = EmitAddress(argument, refKind == RefKindExtensions.StrictIn ?
AddressKind
.ReadOnlyStrict :
AddressKind
.Writeable);
749
var temp = EmitAddress(expression.Operand,
AddressKind
.ReadOnlyStrict);
1114
EmitArrayElementAddress(refArrayAccess.ArrayAccess,
AddressKind
.Writeable);
1204
return EmitFieldLoadReceiverAddress(receiver) ? null : EmitReceiverRef(receiver,
AddressKind
.ReadOnly);
1279
if (!HasHome(receiver,
AddressKind
.ReadOnly))
1648
LocalDefinition tempOpt = EmitReceiverRef(receiver,
AddressKind
.Writeable);
1689
AddressKind
? addressKind;
1730
Debug.Assert(addressKind.GetValueOrDefault() !=
AddressKind
.Constrained);
1823
CallKind determineEmitReceiverStrategy(BoundCall call, out
AddressKind
? addressKind, out bool box)
1858
AddressKind
.ReadOnly :
1859
AddressKind
.Writeable;
1883
addressKind =
AddressKind
.Writeable;
1905
addressKind = (callKind == CallKind.ConstrainedCallVirt) ?
AddressKind
.Constrained :
AddressKind
.Writeable;
1908
Debug.Assert((callKind != CallKind.ConstrainedCallVirt) || (addressKind.GetValueOrDefault() ==
AddressKind
.Constrained) || receiverType.IsVerifierValue());
1914
void emitReceiver(BoundCall call, CallKind callKind,
AddressKind
? addressKind, bool box, out LocalDefinition tempOpt)
2647
if (!HasHome(left,
AddressKind
.Writeable))
2674
var temp = EmitAddress(target,
AddressKind
.Writeable);
2703
var temp = EmitAddress(target,
AddressKind
.Writeable);
2790
var temp = EmitReceiverRef(left.ReceiverOpt,
AddressKind
.Writeable);
2874
var temp = EmitAddress(left,
AddressKind
.Writeable);
2885
var temp = EmitAddress(left,
AddressKind
.Writeable);
2897
var temp = EmitAddress(left,
AddressKind
.Writeable);
2994
LocalDefinition temp = EmitAddress(assignmentOperator.Right, lhs.GetRefKind() is RefKind.RefReadOnly or RefKindExtensions.StrictIn or RefKind.RefReadOnlyParameter ?
AddressKind
.ReadOnlyStrict :
AddressKind
.Writeable);
CodeGen\EmitStatement.cs (5)
554
EmitReceiverRef(receiver,
AddressKind
.ReadOnly);
568
EmitReceiverRef(receiver,
AddressKind
.ReadOnly);
873
var unexpectedTemp = this.EmitAddress(expressionOpt, this._method.RefKind == RefKind.RefReadOnly ?
AddressKind
.ReadOnlyStrict :
AddressKind
.Writeable);
1172
var receiverTemp = EmitReceiverRef(left.ReceiverOpt,
AddressKind
.Writeable);
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
291
thisRefKind == RefKind.Ref ? Binder.
AddressKind
.Writeable : Binder.
AddressKind
.ReadOnlyStrict,
706
Binder.
AddressKind
.Constrained,
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
551
Binder.
AddressKind
.Writeable,
Lowering\SyntheticBoundNodeFactory.cs (1)
1656
Binder.
AddressKind
.ReadOnly,