78 references to AddressKind
Microsoft.CodeAnalysis.CSharp (78)
CodeGen\CodeGenerator_HasHome.cs (8)
33
internal static bool IsAnyReadOnly(
AddressKind
addressKind) => addressKind >=
AddressKind
.ReadOnly;
44
AddressKind
addressKind,
54
if (addressKind ==
AddressKind
.ReadOnly && !expression.Type.IsValueType && peVerifyCompatEnabled)
173
AddressKind
addressKind,
194
if (addressKind ==
AddressKind
.ReadOnlyStrict)
200
if (addressKind ==
AddressKind
.ReadOnly && !peVerifyCompatEnabled)
237
|| !HasHome(receiver,
AddressKind
.ReadOnly, containingSymbol, peVerifyCompatEnabled, stackLocalsOpt);
CodeGen\EmitAddress.cs (23)
24
private LocalDefinition EmitAddress(BoundExpression expression,
AddressKind
addressKind)
177
private static bool UseCallResultAsAddress(BoundCall call,
AddressKind
addressKind)
184
private LocalDefinition EmitPassByCopyAddress(BoundPassByCopy passByCopyExpr,
AddressKind
addressKind)
213
private void EmitConditionalOperatorAddress(BoundConditionalOperator expr,
AddressKind
addressKind)
248
var receiverTemp = EmitAddress(expression.ReferenceTypeReceiver,
AddressKind
.ReadOnly);
255
EmitReceiverRef(expression.ValueTypeReceiver,
AddressKind
.Constrained);
263
private LocalDefinition EmitLocalAddress(BoundLocal localAccess,
AddressKind
addressKind)
296
private LocalDefinition EmitDupAddress(BoundDup dup,
AddressKind
addressKind)
341
private LocalDefinition EmitSequenceAddress(BoundSequence sequence,
AddressKind
addressKind)
393
private void EmitArrayElementAddress(BoundArrayAccess arrayAccess,
AddressKind
addressKind)
416
private bool ShouldEmitReadOnlyPrefix(BoundArrayAccess arrayAccess,
AddressKind
addressKind)
418
if (addressKind ==
AddressKind
.Constrained)
436
private LocalDefinition EmitFieldAddress(BoundFieldAccess fieldAccess,
AddressKind
addressKind)
466
private bool HasHome(BoundExpression expression,
AddressKind
addressKind)
469
private LocalDefinition EmitParameterAddress(BoundParameter parameter,
AddressKind
addressKind)
502
private LocalDefinition EmitReceiverRef(BoundExpression receiver,
AddressKind
addressKind)
534
private static bool BoxNonVerifierReferenceReceiver(TypeSymbol receiverType,
AddressKind
addressKind)
537
return receiverType.TypeKind == TypeKind.TypeParameter && addressKind !=
AddressKind
.Constrained;
543
private LocalDefinition EmitInstanceFieldAddress(BoundFieldAccess fieldAccess,
AddressKind
addressKind)
555
(addressKind ==
AddressKind
.Constrained ?
AddressKind
.Writeable : addressKind) :
556
(addressKind !=
AddressKind
.ReadOnlyStrict ?
AddressKind
.ReadOnly : addressKind));
CodeGen\EmitArrayInitializer.cs (3)
553
EmitAddress(inPlaceTarget,
AddressKind
.Writeable);
705
EmitAddress(inPlaceTarget,
AddressKind
.Writeable);
761
EmitAddress(inPlaceTarget,
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)
290
thisRefKind == RefKind.Ref ? CodeGenerator.
AddressKind
.Writeable : CodeGenerator.
AddressKind
.ReadOnlyStrict,
705
CodeGenerator.
AddressKind
.Constrained,
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
551
CodeGenerator.
AddressKind
.Writeable,
Lowering\SyntheticBoundNodeFactory.cs (1)
1656
CodeGenerator.
AddressKind
.ReadOnly,