1 instantiation of LocalRewriter
Microsoft.CodeAnalysis.CSharp (1)
Lowering\LocalRewriter\LocalRewriter.cs (1)
123var localRewriter = new LocalRewriter(compilation, method, methodOrdinal, statement, containingType, factory, previousSubmissionFields, allowOmissionOfConditionalCalls, diagnostics);
40 references to LocalRewriter
Microsoft.CodeAnalysis.CSharp (39)
CodeGen\EmitExpression.cs (1)
427LocalRewriter.CanChangeValueBetweenReads(receiver, localsMayBeAssignedOrCaptured: false) ||
CodeGen\EmitStatement.cs (1)
535LocalRewriter.CanChangeValueBetweenReads(receiver, localsMayBeAssignedOrCaptured: false) ||
Compiler\MethodCompiler.cs (1)
1428var loweredBody = LocalRewriter.Rewrite(
Lowering\InitializerRewriter.cs (1)
115Debug.Assert(LocalRewriter.IsFieldOrPropertyInitializer(boundStatement));
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
237public override void InstrumentBlock(BoundBlock original, LocalRewriter rewriter, ref TemporaryArray<LocalSymbol> additionalLocals, out BoundStatement? prologue, out BoundStatement? epilogue, out BoundBlockInstrumentation? instrumentation)
Lowering\Instrumentation\CompoundInstrumenter.cs (2)
82public override void PreInstrumentBlock(BoundBlock original, LocalRewriter rewriter) 87public override void InstrumentBlock(BoundBlock original, LocalRewriter rewriter, ref TemporaryArray<LocalSymbol> additionalLocals, out BoundStatement? prologue, out BoundStatement? epilogue, out BoundBlockInstrumentation? instrumentation)
Lowering\Instrumentation\DebugInfoInjector.cs (1)
145public override void InstrumentBlock(BoundBlock original, LocalRewriter rewriter, ref TemporaryArray<LocalSymbol> additionalLocals, out BoundStatement? prologue, out BoundStatement? epilogue, out BoundBlockInstrumentation? instrumentation)
Lowering\Instrumentation\Instrumenter.cs (5)
16/// It provides a set of APIs that are called by <see cref="LocalRewriter"/> to instrument 19/// - rewritten bound node created by the <see cref="LocalRewriter"/> for the original node. 61public virtual void PreInstrumentBlock(BoundBlock original, LocalRewriter rewriter) 73public virtual void InstrumentBlock(BoundBlock original, LocalRewriter rewriter, ref TemporaryArray<LocalSymbol> additionalLocals, out BoundStatement? prologue, out BoundStatement? epilogue, out BoundBlockInstrumentation? instrumentation) 102Debug.Assert(LocalRewriter.IsFieldOrPropertyInitializer(original));
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (2)
269public override void PreInstrumentBlock(BoundBlock original, LocalRewriter rewriter) 279public override void InstrumentBlock(BoundBlock original, LocalRewriter rewriter, ref TemporaryArray<LocalSymbol> additionalLocals, out BoundStatement? prologue, out BoundStatement? epilogue, out BoundBlockInstrumentation? instrumentation)
Lowering\LocalRewriter\LocalRewriter.cs (1)
123var localRewriter = new LocalRewriter(compilation, method, methodOrdinal, statement, containingType, factory, previousSubmissionFields, allowOmissionOfConditionalCalls, diagnostics);
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
56LocalRewriter localRewriter,
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
26protected readonly LocalRewriter _localRewriter; 30public PatternLocalRewriter(SyntaxNode node, LocalRewriter localRewriter, bool generateInstrumentation)
Lowering\LocalRewriter\LocalRewriter_BasePatternSwitchLocalRewriter.cs (1)
41LocalRewriter localRewriter,
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
1317LocalRewriter? localRewriter) 1334private static BoundExpression MakeLiteral(SyntaxNode syntax, ConstantValue constantValue, TypeSymbol type, LocalRewriter? localRewriter)
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (2)
97LocalRewriter localRewriter) : base(node, localRewriter, generateInstrumentation: false) 158public IsPatternExpressionLinearLocalRewriter(BoundIsPatternExpression node, LocalRewriter localRewriter)
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (2)
28public static BoundStatement Rewrite(LocalRewriter localRewriter, BoundSwitchStatement node) 64private SwitchStatementLocalRewriter(BoundSwitchStatement node, LocalRewriter localRewriter)
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (3)
408private readonly LocalRewriter _rewriter; 413public InterpolationHandlerResult(ImmutableArray<BoundStatement> statements, BoundLocal handlerTemp, LocalSymbol outTemp, LocalRewriter rewriter) 422public InterpolationHandlerResult(ImmutableArray<BoundExpression> expressions, BoundLocal handlerTemp, LocalSymbol? outTemp, LocalRewriter rewriter)
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (2)
29private SwitchExpressionLocalRewriter(BoundConvertedSwitchExpression node, LocalRewriter localRewriter) 35public static BoundExpression Rewrite(LocalRewriter localRewriter, BoundConvertedSwitchExpression node)
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
553Debug.Assert(!LocalRewriter.IsCapturedPrimaryConstructorParameter(loweredReceiver));
Lowering\SpillSequenceSpiller.cs (2)
1003if (!receiver.Type.IsReferenceType && LocalRewriter.CanBePassedByReference(receiver)) 1236Debug.Assert(whenNullOpt == null || !LocalRewriter.ReadIsSideeffecting(whenNullOpt));
Lowering\SyntheticBoundNodeFactory.cs (4)
938if (LocalRewriter.ReadIsSideeffecting(part)) 1672return BoundCall.Synthesized(syntax, expression, LocalRewriter.UnsafeGetNullableMethod(syntax, expression.Type, CodeAnalysis.SpecialMember.System_Nullable_T_get_HasValue, Compilation, Diagnostics)); 1701if (LocalRewriter.NullableNeverHasValue(nullable)) 1706BoundExpression nonNullValue = LocalRewriter.NullableAlwaysHasValue(nullable);
Operations\CSharpOperationFactory_Methods.cs (1)
295return LocalRewriter.MakeArgumentsInEvaluationOrder(
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
Symbols\EEMethodSymbol.cs (1)
579body = LocalRewriter.Rewrite(