1 write to ModuleBuilderOpt
Microsoft.CodeAnalysis.CSharp (1)
Compiler\TypeCompilationState.cs (1)
86
this.
ModuleBuilderOpt
= moduleBuilderOpt;
35 references to ModuleBuilderOpt
Microsoft.CodeAnalysis.CSharp (35)
Compiler\MethodCompiler.cs (6)
571
TypeSymbol discarded = fieldSymbol.FixedImplementationType(compilationState.
ModuleBuilderOpt
);
642
synthesizedSubmissionFields.AddToType(containingType, compilationState.
ModuleBuilderOpt
);
709
Debug.Assert(compilationState.
ModuleBuilderOpt
== _moduleBeingBuiltOpt);
953
var instrumentation = compilationState.
ModuleBuilderOpt
?.GetMethodBodyInstrumentations(methodSymbol) ?? MethodInstrumentation.Empty;
1382
Debug.Assert(compilationState.
ModuleBuilderOpt
!= null);
1435
lazyVariableSlotAllocator ??= compilationState.
ModuleBuilderOpt
.TryCreateVariableSlotAllocator(method, method, diagnostics.DiagnosticBag);
Compiler\TypeCompilationState.cs (3)
110
return this.
ModuleBuilderOpt
?.GetDynamicOperationContextType(this.Type);
114
[MemberNotNullWhen(true, nameof(
ModuleBuilderOpt
))]
117
get { return
ModuleBuilderOpt
!= null; }
Lowering\AsyncRewriter\AsyncRewriter.cs (2)
51
Debug.Assert(compilationState.
ModuleBuilderOpt
!= null);
77
compilationState.
ModuleBuilderOpt
.CompilationState.SetStateMachineType(method, stateMachineType);
Lowering\ClosureConversion\ClosureConversion.Analysis.cs (2)
524
return _slotAllocator?.MethodId ?? new DebugId(_topLevelMethodOrdinal, _compilationState.
ModuleBuilderOpt
.CurrentGenerationOrdinal);
554
closureId = new DebugId(closureDebugInfo.Count, _compilationState.
ModuleBuilderOpt
.CurrentGenerationOrdinal);
Lowering\ClosureConversion\ClosureConversion.cs (10)
243
Debug.Assert(compilationState.
ModuleBuilderOpt
!= null);
349
CompilationState.
ModuleBuilderOpt
.AddSynthesizedDefinition(ContainingType, frame.GetCciAdapter());
395
CompilationState.
ModuleBuilderOpt
.AddSynthesizedDefinition(synthesizedEnv, hoistedField.GetCciAdapter());
519
methodId = new DebugId(DebugId.UndefinedOrdinal, CompilationState.
ModuleBuilderOpt
.CurrentGenerationOrdinal);
546
CompilationState.
ModuleBuilderOpt
.AddSynthesizedDefinition(this.ContainingType, frame.GetCciAdapter());
702
CompilationState.
ModuleBuilderOpt
.AddSynthesizedDefinition(frame, capturedFrame.GetCciAdapter());
1442
Debug.Assert(CompilationState.
ModuleBuilderOpt
!= null);
1497
lambdaId = new DebugId(_lambdaDebugInfoBuilder.Count, CompilationState.
ModuleBuilderOpt
.CurrentGenerationOrdinal);
1549
CompilationState.
ModuleBuilderOpt
.AddSynthesizedDefinition(translatedLambdaContainer, synthesizedMethod.GetCciAdapter());
1711
CompilationState.
ModuleBuilderOpt
.AddSynthesizedDefinition(translatedLambdaContainer, cacheField.GetCciAdapter());
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (1)
115
var moduleBuilder = compilationState.
ModuleBuilderOpt
;
Lowering\IteratorRewriter\IteratorRewriter.cs (1)
85
compilationState.
ModuleBuilderOpt
.CompilationState.SetStateMachineType(method, stateMachineType);
Lowering\LocalRewriter\LocalRewriter.cs (3)
197
get { return _factory.CompilationState.
ModuleBuilderOpt
; }
387
if (_factory.CompilationState.
ModuleBuilderOpt
is { } moduleBuilder)
1130
_factory.CompilationState.
ModuleBuilderOpt
?.EnsureIsReadOnlyAttributeExists();
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (4)
686
Debug.Assert(factory.CompilationState.
ModuleBuilderOpt
is { });
691
int generation = factory.CompilationState.
ModuleBuilderOpt
.CurrentGenerationOrdinal;
785
Debug.Assert(_factory.CompilationState.
ModuleBuilderOpt
is { });
786
int generation = _factory.CompilationState.
ModuleBuilderOpt
.CurrentGenerationOrdinal;
Lowering\MethodToClassRewriter.cs (1)
364
this.CompilationState.
ModuleBuilderOpt
.AddSynthesizedDefinition(containingType, wrapper.GetCciAdapter());
Lowering\StateMachineRewriter\StateMachineTypeSymbol.cs (1)
31
GeneratedNames.MakeStateMachineTypeName(kickoffMethod.Name, kickoffMethodOrdinal, compilationState.
ModuleBuilderOpt
.CurrentGenerationOrdinal);
Lowering\SyntheticBoundNodeFactory.cs (1)
46
public PEModuleBuilder? ModuleBuilderOpt { get { return CompilationState.
ModuleBuilderOpt
; } }