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