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