1 write to IsRef
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
1833this.IsRef = isRef;
65 references to IsRef
Microsoft.CodeAnalysis.CSharp (65)
Binder\Binder.ValueChecks.cs (5)
1483if (assignment.IsRef) 3596if (!assignment.IsRef) 3956if (!assignment.IsRef) 4622var rightEscape = assignment.IsRef 5790if (!assignment.IsRef)
Binder\RefSafetyAnalysis.cs (1)
543ValidateAssignment(node.Syntax, node.Left, node.Right, node.IsRef, _diagnostics);
CodeGen\EmitAddress.cs (1)
156if (!assignment.IsRef || !HasHome(assignment, addressKind))
CodeGen\EmitExpression.cs (14)
2577if (assignmentOperator.IsRef) 2783!assignmentOperator.IsRef) 2801!assignmentOperator.IsRef) 2832if (left.LocalSymbol.RefKind != RefKind.None && !assignmentOperator.IsRef) 2922lhsUsesStack = EmitAssignmentPreamble(assignmentOperator.Update(sequence.Value, assignmentOperator.Right, assignmentOperator.IsRef, assignmentOperator.Type)); 2967if (!assignment.IsRef) 2983if (!assignmentOperator.IsRef) 3052assignmentOperator.IsRef ? LocalSlotConstraints.ByRef : LocalSlotConstraints.None); 3065EmitFieldStore((BoundFieldAccess)expression, assignment.IsRef); 3077if (local.LocalSymbol.RefKind != RefKind.None && !assignment.IsRef) 3106EmitParameterStore((BoundParameter)expression, assignment.IsRef); 3128EmitStore(assignment.Update(sequence.Value, assignment.Right, assignment.IsRef, assignment.Type)); 3152if (!nested.IsRef) 3181if (useKind == UseKind.UsedAsValue && assignment.IsRef)
CodeGen\Optimizer.cs (12)
908node.Update(sequence.Value, node.Right, node.IsRef, node.Type), 932if (node.IsRef || _context == ExprContext.Address) 975IsFixedBufferAssignmentToRefLocal(node.Left, node.Right, node.IsRef), 1006return node.Update(left, right, node.IsRef, node.Type); 1030Debug.Assert(!node.IsRef || 1043return !node.IsRef; 1051return !node.IsRef; 1069Debug.Assert(((BoundAssignmentOperator)lhs).IsRef, "only ref assignments are assignable"); 1073Debug.Assert(!IsIndirectAssignment(node.Update(((BoundSequence)node.Left).Value, node.Right, node.IsRef, node.Type)), 2162var isIndirectLocalStore = left.LocalSymbol.RefKind != RefKind.None && !node.IsRef; 2189if (node.IsRef && 2206return node.Update(left, right, node.IsRef, node.Type);
FlowAnalysis\AbstractFlowPass.cs (2)
2150VisitRvalue(node.Right, isKnownToBeAnLvalue: node.IsRef); 2153if (node.IsRef)
FlowAnalysis\DefiniteAssignment.cs (1)
2492Assign(node.Left, node.Right, isRef: node.IsRef);
FlowAnalysis\NullableWalker.cs (1)
9959if (!node.IsRef)
Generated\BoundNodes.xml.Generated.cs (5)
1846if (left != this.Left || right != this.Right || isRef != this.IsRef || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything)) 11054return node.Update(left, right, node.IsRef, type); 12794updatedNode = node.Update(left, right, node.IsRef, infoAndType.Type!); 12799updatedNode = node.Update(left, right, node.IsRef, node.Type); 15349new TreeDumperNode("isRef", node.IsRef, null),
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
364if (original.IsRef)
Lowering\LocalRewriter\LocalRewriter.cs (1)
1081return ((BoundAssignmentOperator)expr).IsRef;
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (2)
48Debug.Assert(!node.IsRef); 84return MakeStaticAssignmentOperator(node.Syntax, loweredLeft, loweredRight, node.IsRef, used);
Lowering\LocalRewriter\LocalRewriter_Call.cs (4)
933Debug.Assert(assignmentToTemp.IsRef); 954extraRefInitialization = assignmentToTemp.Update(intermediateRef, assignmentToTemp.Right, assignmentToTemp.IsRef, assignmentToTemp.Type); 968assignmentToTemp.IsRef, 984assignmentToTemp.IsRef,
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (1)
711Debug.Assert(((BoundAssignmentOperator)originalLHS).IsRef);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
368result.Add(MakeStaticAssignmentOperator(assignment.Syntax, rewrittenAccess, rewrittenRight, isRef: assignment.IsRef, used: false));
Lowering\MethodToClassRewriter.cs (4)
494node.IsRef && 531Debug.Assert(!node.IsRef); 532BoundAssignmentOperator rewrittenAssignment = node.Update(rewrittenLeft, tempLocal, node.IsRef, rewrittenType); 542return node.Update(rewrittenLeft, rewrittenRight, node.IsRef, rewrittenType);
Lowering\SpillSequenceSpiller.cs (5)
351if (assignment.IsRef && 372expression = assignment.Update(left, right, assignment.IsRef, assignment.Type); 537IsRef: true, 549IsRef: false, 915return UpdateExpression(builder, node.Update(left, right, node.IsRef, node.Type));
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
341if (node is { IsRef: true, Left: BoundLocal { LocalSymbol: LocalSymbol { IsCompilerGenerated: true } local } })
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (2)
824Debug.Assert(!node.IsRef); 837Debug.Assert(node.IsRef);
Operations\CSharpOperationFactory.cs (1)
1336bool isRef = boundAssignmentOperator.IsRef;