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