1 write to _module
Microsoft.CodeAnalysis.CSharp (1)
CodeGen\CodeGenerator.cs (1)
102
_module
= moduleBuilder;
78 references to _module
Microsoft.CodeAnalysis.CSharp (78)
CodeGen\CodeGenerator.cs (7)
156
return
_module
.Compilation.Options.DebugPlusMode;
159
private bool IsPeVerifyCompatEnabled() =>
_module
.Compilation.IsPeVerifyCompatEnabled;
180
type:
_module
.Translate(localSymbol.Type, bodySyntax, _diagnostics.DiagnosticBag),
346
EmitTypeReferenceToken(
_module
.Translate(symbol, syntaxNode, _diagnostics.DiagnosticBag), syntaxNode);
351
var methodRef =
_module
.Translate(method, syntaxNode, _diagnostics.DiagnosticBag, optArgList, needDeclaration: encodeAsRawDefinitionToken);
357
var fieldRef =
_module
.Translate(symbol, syntaxNode, _diagnostics.DiagnosticBag);
363
_builder.EmitToken(
_module
.Translate(symbol).Signature, syntaxNode, _diagnostics.DiagnosticBag);
CodeGen\EmitAddress.cs (2)
411
_builder.EmitArrayElementAddress(
_module
.Translate((ArrayTypeSymbol)arrayAccess.Expression.Type),
568
var fixedImpl = field.FixedImplementationType(
_module
);
CodeGen\EmitArrayInitializer.cs (9)
242
return
_module
.Compilation.EnableEnumArrayBlockInitialization;
248
if (
_module
.IsEncDelta)
266
if (
_module
.GetInitArrayHelper() == null)
452
if (
_module
.IsEncDelta)
464
var rosPointerCtor = (MethodSymbol?)Binder.GetWellKnownTypeMember(
_module
.Compilation, WellKnownMember.System_ReadOnlySpan_T__ctor_Pointer, _diagnostics, syntax: wrappedExpression.Syntax, isOptional: true);
610
MethodSymbol? createSpan = (MethodSymbol?)Binder.GetWellKnownTypeMember(
_module
.Compilation, WellKnownMember.System_Runtime_CompilerServices_RuntimeHelpers__CreateSpanRuntimeFieldHandle, _diagnostics, syntax: wrappedExpression.Syntax, isOptional: true);
651
var cachingField = _builder.module.GetArrayCachingFieldForData(data,
_module
.Translate(arrayType), wrappedExpression.Syntax, _diagnostics.DiagnosticBag);
709
Cci.IFieldReference cachingField = _builder.module.GetArrayCachingFieldForConstants(constants,
_module
.Translate(arrayType),
779
rosArrayCtor = (MethodSymbol?)Binder.GetWellKnownTypeMember(
_module
.Compilation, WellKnownMember.System_ReadOnlySpan_T__ctor_Array, _diagnostics, syntax: syntax, isOptional: true);
CodeGen\EmitConversion.cs (1)
74
this.
_module
.Compilation.IsReadOnlySpanType(typeTo),
CodeGen\EmitExpression.cs (24)
1101
_builder.EmitArrayElementLoad(
_module
.Translate((ArrayTypeSymbol)arrayAccess.Expression.Type), arrayAccess.Expression.Syntax, _diagnostics.DiagnosticBag);
1306
if (DiagnosticsPass.IsNonAgileFieldAccess(fieldAccess,
_module
.Compilation))
2195
if ((object)originalMethod == this.
_module
.Compilation.GetSpecialTypeMember(SpecialMember.System_Nullable_T_GetValueOrDefault) ||
2196
(object)originalMethod == this.
_module
.Compilation.GetSpecialTypeMember(SpecialMember.System_Nullable_T_get_Value) ||
2197
(object)originalMethod == this.
_module
.Compilation.GetSpecialTypeMember(SpecialMember.System_Nullable_T_get_HasValue))
2385
_builder.EmitArrayCreation(
_module
.Translate(arrayType), expression.Syntax, _diagnostics.DiagnosticBag);
2467
expression.Constructor.OriginalDefinition == (object)this.
_module
.Compilation.GetWellKnownTypeMember(WellKnownMember.System_ReadOnlySpan_T__ctor_Array)) ||
2469
expression.Constructor.OriginalDefinition == (object)this.
_module
.Compilation.GetWellKnownTypeMember(WellKnownMember.System_ReadOnlySpan_T__ctor_Array_Start_Length))) &&
2481
var compilation =
_module
.Compilation;
2663
DiagnosticsPass.IsNonAgileFieldAccess(fieldAccess,
_module
.Compilation))
3203
_builder.EmitArrayElementStore(
_module
.Translate(arrayType), syntaxNode, _diagnostics.DiagnosticBag);
3576
var fieldRef =
_module
.Translate(field, syntax, _diagnostics.DiagnosticBag, needDeclaration: true);
3604
_module
.GetModuleVersionId(
_module
.Translate(node.Type, node.Syntax, _diagnostics.DiagnosticBag), node.Syntax, _diagnostics.DiagnosticBag),
3611
var cancellationTokenType =
_module
.CommonCompilation.CommonGetWellKnownType(WellKnownType.System_Threading_CancellationToken);
3615
_module
.GetModuleCancellationToken(
_module
.Translate(cancellationTokenType, syntax, _diagnostics.DiagnosticBag), syntax, _diagnostics.DiagnosticBag),
3619
var throwMethod = (MethodSymbol)
_module
.Compilation.GetWellKnownTypeMember(WellKnownMember.System_Threading_CancellationToken__ThrowIfCancellationRequested);
3626
_module
.Translate(throwMethod, syntax, _diagnostics.DiagnosticBag),
3633
var cancellationTokenType =
_module
.CommonCompilation.CommonGetWellKnownType(WellKnownType.System_Threading_CancellationToken);
3637
_module
.GetModuleCancellationToken(
_module
.Translate(cancellationTokenType, syntax, _diagnostics.DiagnosticBag), syntax, _diagnostics.DiagnosticBag),
3662
_builder.EmitToken(
_module
.GetInstrumentationPayloadRoot(node.AnalysisKind,
_module
.Translate(node.Type, node.Syntax, _diagnostics.DiagnosticBag), node.Syntax, _diagnostics.DiagnosticBag), node.Syntax, _diagnostics.DiagnosticBag);
CodeGen\EmitStackAllocInitializer.cs (4)
70
if (Binder.GetWellKnownTypeMember(
_module
.Compilation, WellKnownMember.System_Runtime_CompilerServices_RuntimeHelpers__CreateSpanRuntimeFieldHandle, _diagnostics, syntax: syntaxNode, isOptional: true) is MethodSymbol createSpanHelper &&
71
Binder.GetWellKnownTypeMember(
_module
.Compilation, WellKnownMember.System_ReadOnlySpan_T__get_Item, _diagnostics, syntax: syntaxNode, isOptional: true) is MethodSymbol spanGetItemDefinition)
75
Debug.Assert(TypeSymbol.Equals(readOnlySpan.OriginalDefinition,
_module
.Compilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.ConsiderEverything));
131
if (
_module
.IsEncDelta)
CodeGen\EmitStatement.cs (31)
915
_module
.Translate(expressionOpt.Type, boundReturnStatement.Syntax, _diagnostics.DiagnosticBag);
1049
_module
.Translate(catchBlock.ExceptionTypeOpt, catchBlock.Syntax, _diagnostics.DiagnosticBag) :
1050
_module
.GetSpecialType(SpecialType.System_Object, catchBlock.Syntax, _diagnostics.DiagnosticBag);
1096
var exceptionType =
_module
.Translate(catchBlock.ExceptionTypeOpt, catchBlock.Syntax, _diagnostics.DiagnosticBag);
1393
var int32Type = Binder.GetSpecialType(
_module
.Compilation, SpecialType.System_Int32, syntaxNode, _diagnostics);
1418
var charType = Binder.GetSpecialType(
_module
.Compilation, SpecialType.System_Char, syntaxNode, _diagnostics);
1495
var privateImplClass =
_module
.GetPrivateImplClass(syntaxNode, _diagnostics.DiagnosticBag).PrivateImplementationDetails;
1518
var UInt32Type = Binder.GetSpecialType(
_module
.Compilation, SpecialType.System_UInt32, syntaxNode, _diagnostics);
1533
var sequenceEqualsTMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(
_module
.Compilation,
1539
var sequenceEqualsCharMethod = sequenceEqualsTMethod.Construct(Binder.GetSpecialType(
_module
.Compilation, SpecialType.System_Char, syntaxNode, _diagnostics));
1540
sequenceEqualsMethodRef =
_module
.Translate(sequenceEqualsCharMethod, null, _diagnostics.DiagnosticBag);
1542
var asSpanMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(
_module
.Compilation, WellKnownMember.System_MemoryExtensions__AsSpan_String, _diagnostics, syntax: syntaxNode);
1544
asSpanMethodRef =
_module
.Translate(asSpanMethod, null, _diagnostics.DiagnosticBag);
1548
var stringEqualityMethod =
_module
.Compilation.GetSpecialTypeMember(SpecialMember.System_String__op_Equality) as MethodSymbol;
1550
stringEqualityMethodRef =
_module
.Translate(stringEqualityMethod, syntaxNode, _diagnostics.DiagnosticBag);
1628
var spanTLengthMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(
_module
.Compilation,
1634
return
_module
.Translate(spanCharLengthMethod, syntaxNode, _diagnostics.DiagnosticBag);
1638
var stringLengthMethod =
_module
.Compilation.GetSpecialTypeMember(SpecialMember.System_String__Length) as MethodSymbol;
1641
return
_module
.Translate(stringLengthMethod, syntaxNode, _diagnostics.DiagnosticBag);
1652
var spanTIndexerMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(
_module
.Compilation,
1659
return
_module
.Translate(spanCharLengthMethod, null, _diagnostics.DiagnosticBag);
1664
var stringCharsIndexer =
_module
.Compilation.GetSpecialTypeMember(SpecialMember.System_String__Chars) as MethodSymbol;
1667
return
_module
.Translate(stringCharsIndexer, syntaxNode, _diagnostics.DiagnosticBag);
1694
Debug.Assert(stringEqualityMethodRef ==
_module
.Translate((MethodSymbol)
_module
.Compilation.GetSpecialTypeMember(SpecialMember.System_String__op_Equality), (CSharpSyntaxNode)syntaxNode, assertDiagnostics));
1768
MetadataConstant compileTimeValue =
_module
.CreateConstant(local.Type, local.ConstantValue, syntaxNode, _diagnostics.DiagnosticBag);
1799
?
_module
.GetSpecialType(SpecialType.System_IntPtr, syntaxNode, _diagnostics.DiagnosticBag)
1800
:
_module
.Translate(pointedAtType, syntaxNode, _diagnostics.DiagnosticBag);
1806
translatedType =
_module
.Translate(local.Type, syntaxNode, _diagnostics.DiagnosticBag);
1811
_module
.GetFakeSymbolTokenForIL(translatedType, syntaxNode, _diagnostics.DiagnosticBag);
1903
_module
.Translate(type, syntaxNode, _diagnostics.DiagnosticBag),