49 references to ModuleBuilderOpt
Microsoft.CodeAnalysis.CSharp (49)
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
114if (slotAllocator == null || !slotAllocator.TryGetPreviousAwaiterSlotIndex(F.ModuleBuilderOpt.Translate(awaiterType, F.Syntax, F.Diagnostics.DiagnosticBag), F.Diagnostics.DiagnosticBag, out slotIndex))
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
144var instrumentations = F.ModuleBuilderOpt.GetMethodBodyInstrumentations(method);
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (1)
497F.ModuleBuilderOpt.AddSynthesizedDefinition(stateMachineType, finallyMethod.GetCciAdapter());
Lowering\IteratorRewriter\IteratorRewriter.cs (2)
175Debug.Assert(F.ModuleBuilderOpt is not null); 179var instrumentations = F.ModuleBuilderOpt.GetMethodBodyInstrumentations(method);
Lowering\LocalRewriter\DelegateCacheRewriter.cs (2)
64Debug.Assert(_factory.ModuleBuilderOpt is { }); 67var generation = _factory.ModuleBuilderOpt.CurrentGenerationOrdinal;
Lowering\LocalRewriter\LocalRewriter.cs (2)
328Debug.Assert(_factory.ModuleBuilderOpt is { }); 346_factory.ModuleBuilderOpt.EnsureParamCollectionAttributeExists(_diagnostics, location);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (7)
397Debug.Assert(_factory.ModuleBuilderOpt is { }); 431var synthesizedType = _factory.ModuleBuilderOpt.EnsureReadOnlyListTypeExists(syntax, kind: kind, _diagnostics.DiagnosticBag).Construct(typeArgs); 548Debug.Assert(_factory.ModuleBuilderOpt is { }); 571var inlineArrayType = _factory.ModuleBuilderOpt.EnsureInlineArrayTypeExists(syntax, _factory, arrayLength, _diagnostics.DiagnosticBag).Construct(ImmutableArray.Create(elementType)); 575MethodSymbol elementRef = _factory.ModuleBuilderOpt.EnsureInlineArrayElementRefExists(syntax, intType, _diagnostics.DiagnosticBag). 603_factory.ModuleBuilderOpt.EnsureInlineArrayAsReadOnlySpanExists(syntax, _factory.WellKnownType(WellKnownType.System_ReadOnlySpan_T), intType, _diagnostics.DiagnosticBag) : 604_factory.ModuleBuilderOpt.EnsureInlineArrayAsSpanExists(syntax, _factory.WellKnownType(WellKnownType.System_Span_T), intType, _diagnostics.DiagnosticBag);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (5)
309Debug.Assert(_factory.ModuleBuilderOpt is { }); 603createSpan = _factory.ModuleBuilderOpt.EnsureInlineArrayAsReadOnlySpanExists(syntax, spanType.OriginalDefinition, _factory.SpecialType(SpecialType.System_Int32), _diagnostics.DiagnosticBag); 608createSpan = _factory.ModuleBuilderOpt.EnsureInlineArrayAsSpanExists(syntax, spanType.OriginalDefinition, _factory.SpecialType(SpecialType.System_Int32), _diagnostics.DiagnosticBag); 742Debug.Assert(_factory.ModuleBuilderOpt is { }); 748_factory.ModuleBuilderOpt.EnsureParamCollectionAttributeExists(_diagnostics, node.Location);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (3)
770Debug.Assert(rewriter._factory.ModuleBuilderOpt is { }); 776elementRef = rewriter._factory.ModuleBuilderOpt.EnsureInlineArrayElementRefExists(syntax, intType, rewriter._diagnostics.DiagnosticBag); 781elementRef = rewriter._factory.ModuleBuilderOpt.EnsureInlineArrayElementRefReadOnlyExists(syntax, intType, rewriter._diagnostics.DiagnosticBag);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (7)
201Debug.Assert(_factory.ModuleBuilderOpt is { }); 328createSpan = _factory.ModuleBuilderOpt.EnsureInlineArrayAsReadOnlySpanExists(node.Syntax, spanType, intType, _diagnostics.DiagnosticBag); 332createSpan = _factory.ModuleBuilderOpt.EnsureInlineArrayAsSpanExists(node.Syntax, spanType, intType, _diagnostics.DiagnosticBag); 354elementRef = _factory.ModuleBuilderOpt.EnsureInlineArrayFirstElementRefExists(node.Syntax, _diagnostics.DiagnosticBag); 359elementRef = _factory.ModuleBuilderOpt.EnsureInlineArrayFirstElementRefReadOnlyExists(node.Syntax, _diagnostics.DiagnosticBag); 373elementRef = _factory.ModuleBuilderOpt.EnsureInlineArrayElementRefExists(node.Syntax, intType, _diagnostics.DiagnosticBag); 378elementRef = _factory.ModuleBuilderOpt.EnsureInlineArrayElementRefReadOnlyExists(node.Syntax, intType, _diagnostics.DiagnosticBag);
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (6)
158Debug.Assert(factory.ModuleBuilderOpt is not null); 159var module = factory.ModuleBuilderOpt; 173Debug.Assert(factory.ModuleBuilderOpt is not null); 174var module = factory.ModuleBuilderOpt!; 187Debug.Assert(factory.ModuleBuilderOpt is not null); 188var module = factory.ModuleBuilderOpt!;
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
695F.ModuleBuilderOpt.Translate(fieldType, awaitSyntaxOpt, Diagnostics.DiagnosticBag),
Lowering\StateMachineRewriter\ResumableStateMachineStateAllocator.cs (2)
82Debug.Assert(f.ModuleBuilderOpt != null); 97(MethodSymbol)f.ModuleBuilderOpt.GetOrCreateHotReloadExceptionConstructorDefinition(),
Lowering\StateMachineRewriter\StateMachineRewriter.cs (5)
205F.ModuleBuilderOpt.Translate(fieldType, declaratorSyntax, diagnostics.DiagnosticBag), 351F.ModuleBuilderOpt.AddSynthesizedDefinition(F.CurrentType, result.GetCciAdapter()); 359F.ModuleBuilderOpt.AddSynthesizedDefinition(F.CurrentType, prop.GetCciAdapter()); 362F.ModuleBuilderOpt.AddSynthesizedDefinition(F.CurrentType, getter.GetCciAdapter()); 371F.ModuleBuilderOpt.AddSynthesizedDefinition(F.CurrentType, result.GetCciAdapter());
Lowering\SyntheticBoundNodeFactory.cs (4)
150Debug.Assert(ModuleBuilderOpt is { }); 151ModuleBuilderOpt.AddSynthesizedDefinition(CurrentType, nestedType.GetCciAdapter()); 205Debug.Assert(ModuleBuilderOpt is { }); 206ModuleBuilderOpt.AddSynthesizedDefinition(containingType, field.GetCciAdapter());