26 instantiations of DebugId
Microsoft.CodeAnalysis (5)
Emit\EditAndContinue\DefinitionMap.cs (2)
315methodId = new DebugId(debugInfo.MethodOrdinal, 0); 706GetMetadataLambdaAndClosureMap(peMethod.ContainingType, methodId: new DebugId(provider.MethodOrdinal, generation: 0)),
Emit\EditAndContinueMethodDebugInformation.cs (2)
233var closureId = new DebugId(closuresBuilder.Count, generation: 0); 247var lambdaId = new DebugId(lambdasBuilder.Count, generation: 0);
Symbols\CommonGeneratedNameParser.cs (1)
66var id = new DebugId((int)value, (generation >= 0) ? generation : 0);
Microsoft.CodeAnalysis.CSharp (6)
Compiler\MethodCompiler.cs (2)
1422new DebugId(ordinal: -1, _moduleBeingBuiltOpt.CurrentGenerationOrdinal), 1726variableSlotAllocatorOpt?.MethodId ?? new DebugId(methodOrdinal, moduleBuilder.CurrentGenerationOrdinal),
Lowering\ClosureConversion\ClosureConversion.Analysis.cs (2)
525return _slotAllocator?.MethodId ?? new DebugId(_topLevelMethodOrdinal, _compilationState.ModuleBuilderOpt.CurrentGenerationOrdinal); 555closureId = new DebugId(closureDebugInfo.Count, _compilationState.ModuleBuilderOpt.CurrentGenerationOrdinal);
Lowering\ClosureConversion\ClosureConversion.cs (2)
524methodId = new DebugId(DebugId.UndefinedOrdinal, CompilationState.ModuleBuilderOpt.CurrentGenerationOrdinal); 1500lambdaId = new DebugId(_lambdaDebugInfoBuilder.Count, CompilationState.ModuleBuilderOpt.CurrentGenerationOrdinal);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Emit\GeneratedNamesTests.cs (2)
72Assert.Equal(new DebugId(methodIdOrdinal, methodIdGeneration), actualMethodId); 73Assert.Equal(new DebugId(entityIdOrdinal, entityIdGeneration), actualEntityId);
Microsoft.CodeAnalysis.UnitTests (13)
Emit\CustomDebugInfoTests.cs (13)
222new ClosureDebugInfo(-100, new DebugId(0, 0)), 223new ClosureDebugInfo(10, new DebugId(1, 0)), 224new ClosureDebugInfo(-200, new DebugId(2, 0))); 227new LambdaDebugInfo(20, new DebugId(0, 0), 1), 228new LambdaDebugInfo(-50, new DebugId(1, 0), 0), 229new LambdaDebugInfo(-180, new DebugId(2, 0), LambdaDebugInfo.StaticClosureOrdinal)); 252var lambdas = ImmutableArray.Create(new LambdaDebugInfo(20, new DebugId(0, 0), LambdaDebugInfo.StaticClosureOrdinal)); 351new ClosureDebugInfo(-100, new DebugId(0, 0)), 352new ClosureDebugInfo(10, new DebugId(1, 0)), 353new ClosureDebugInfo(-200, new DebugId(2, 0))); 356new LambdaDebugInfo(20, new DebugId(0, 0), 1), 357new LambdaDebugInfo(-50, new DebugId(1, 0), 0), 358new LambdaDebugInfo(-180, new DebugId(2, 0), LambdaDebugInfo.StaticClosureOrdinal));
116 references to DebugId
Microsoft.CodeAnalysis (82)
CodeGen\ClosureDebugInfo.cs (1)
16internal readonly record struct ClosureDebugInfo(int SyntaxOffset, DebugId ClosureId)
CodeGen\DebugId.cs (2)
19internal readonly record struct DebugId : IComparable<DebugId> 42public int CompareTo(DebugId other)
CodeGen\LambdaDebugInfo.cs (2)
29public readonly DebugId LambdaId; 35public LambdaDebugInfo(int syntaxOffset, DebugId lambdaId, int closureOrdinal)
CodeGen\LambdaRuntimeRudeEditInfo.cs (2)
9internal readonly struct LambdaRuntimeRudeEditInfo(DebugId lambdaId, RuntimeRudeEdit rudeEdit) 11public DebugId LambdaId { get; } = lambdaId;
CodeGen\MethodBody.cs (3)
36private readonly DebugId _methodId; 55DebugId methodId, 158public DebugId MethodId => _methodId;
CodeGen\VariableSlotAllocator.cs (5)
68public abstract DebugId? MethodId { get; } 85public abstract bool TryGetPreviousClosure(SyntaxNode closureSyntax, DebugId? parentClosureId, ImmutableArray<string> structCaptures, out DebugId closureId, out RuntimeRudeEdit? runtimeRudeEdit); 99public abstract bool TryGetPreviousLambda(SyntaxNode lambdaOrLambdaBodySyntax, bool isLambdaBody, int closureOrdinal, ImmutableArray<DebugId> structClosureIds, out DebugId lambdaId, out RuntimeRudeEdit? runtimeRudeEdit);
Emit\EditAndContinue\AddedOrChangedMethodInfo.cs (2)
14public readonly DebugId MethodId; 30DebugId methodId,
Emit\EditAndContinue\DefinitionMap.cs (32)
24ImmutableArray<(DebugId id, IMethodSymbolInternal symbol)> lambdaSymbols, 25IReadOnlyDictionary<DebugId, (DebugId? parentId, ImmutableArray<string> structCaptures)> closureTree) 30public ImmutableArray<(DebugId id, IMethodSymbolInternal symbol)> LambdaSymbols { get; } = lambdaSymbols; 32public IReadOnlyDictionary<DebugId, (DebugId? parentId, ImmutableArray<string> structCaptures)> ClosureTree { get; } = closureTree; 34public IMethodSymbolInternal? GetLambdaSymbol(DebugId lambdaId) 37public (DebugId? parentId, ImmutableArray<string>) TryGetClosureInfo(DebugId closureId) 242DebugId? methodId; 442DebugId methodId, 460ImmutableArray<DebugId> getLambdaStructClosureIdsFromMetadata(IMethodSymbolInternal? lambda, DebugId methodId) 464return ImmutableArray<DebugId>.Empty; 467var builder = ArrayBuilder<DebugId>.GetInstance(lambda.Parameters.Length); 475CommonGeneratedNames.TryParseDebugIds(displayClassName.AsSpan(suffixIndex), idSeparator, isMethodIdOptional: false, out var parsedMethodId, out var parsedEntityId) && 538private MetadataLambdasAndClosures GetMetadataLambdaAndClosureMap(INamedTypeSymbolInternal peType, DebugId methodId) 548DebugId methodId) 550var lambdasBuilder = ArrayBuilder<(DebugId id, IMethodSymbolInternal symbol)>.GetInstance(); 551var closureTreeBuilder = ImmutableSegmentedDictionary.CreateBuilder<DebugId, (DebugId? parentId, ImmutableArray<string> structCaptures)>(); 559void recurse(ImmutableArray<ISymbolInternal> members, DebugId? containingDisplayClassId) 570DebugId parsedMethodId = default; 571DebugId parsedEntityId = default; 616if (member is IFieldSymbolInternal field && tryParseDisplayClassDebugId(field.Type.Name, out var parentClosureDebugId)) 631bool tryParseDisplayClassDebugId(string displayClassName, out DebugId id) 636CommonGeneratedNames.TryParseDebugIds(displayClassName.AsSpan(suffixIndex), idSeparator, isMethodIdOptional: false, out var parsedMethodId, out var parsedEntityId) && 668public IEnumerable<(DebugId id, IMethodSymbolInternal symbol)> GetDeletedSynthesizedMethods(IMethodSymbolInternal oldMethod, ImmutableArray<EncLambdaInfo> currentLambdas) 709IEnumerable<(DebugId id, IMethodSymbolInternal symbol)> getDeletedLambdas( 714var lambdaIdSet = PooledHashSet<DebugId>.GetInstance();
Emit\EditAndContinue\DeletedMethodBody.cs (1)
44public DebugId MethodId => default;
Emit\EditAndContinue\EncClosureInfo.cs (2)
10internal readonly struct EncClosureInfo(ClosureDebugInfo debugInfo, DebugId? parentDebugId, ImmutableArray<string> structCaptures) 20public readonly DebugId? ParentDebugId = parentDebugId;
Emit\EditAndContinue\EncClosureMapValue.cs (5)
10internal readonly struct EncClosureMapValue(DebugId id, DebugId? parentId, ImmutableArray<string> structCaptures) 12public DebugId Id { get; } = id; 13public DebugId? ParentId { get; } = parentId; 30public bool IsCompatibleWith(DebugId? parentClosureId, ImmutableArray<string> structCaptures)
Emit\EditAndContinue\EncLambdaInfo.cs (2)
10internal readonly struct EncLambdaInfo(LambdaDebugInfo debugInfo, ImmutableArray<DebugId> structClosureIds) 13public readonly ImmutableArray<DebugId> StructClosureIds = structClosureIds;
Emit\EditAndContinue\EncLambdaMapValue.cs (5)
11internal readonly struct EncLambdaMapValue(DebugId id, int closureOrdinal, ImmutableArray<DebugId> structClosureIds) 13public readonly DebugId Id = id; 15public readonly ImmutableArray<DebugId> StructClosureIds = structClosureIds; 35public bool IsCompatibleWith(int closureOrdinal, ImmutableArray<DebugId> structClosureIds)
Emit\EditAndContinue\EncVariableSlotAllocator.cs (7)
25private readonly DebugId? _methodId; 50DebugId? methodId, 100public override DebugId? MethodId => _methodId; 304DebugId? parentClosureId, 306out DebugId closureId, 331public override bool TryGetPreviousLambda(SyntaxNode lambdaOrLambdaBodySyntax, bool isLambdaBody, int closureOrdinal, ImmutableArray<DebugId> structClosureIds, out DebugId lambdaId, out RuntimeRudeEdit? runtimeRudeEdit)
Emit\EditAndContinueMethodDebugInformation.cs (3)
203methodOrdinal = DebugId.UndefinedOrdinal; 233var closureId = new DebugId(closuresBuilder.Count, generation: 0); 247var lambdaId = new DebugId(lambdasBuilder.Count, generation: 0);
Emit\NoPia\CommonEmbeddedMethod.cs (2)
174public DebugId MethodId => default(DebugId);
PEWriter\Members.cs (1)
451DebugId MethodId { get; }
PEWriter\MethodDefinitionBase.cs (1)
151public DebugId MethodId => default;
Symbols\CommonGeneratedNameParser.cs (4)
22public static bool TryParseDebugIds(ReadOnlySpan<char> metadataNameSuffix, char idSeparator, bool isMethodIdOptional, out DebugId methodId, out DebugId entityId) 30DebugId? seenId = null; 66var id = new DebugId((int)value, (generation >= 0) ? generation : 0);
Microsoft.CodeAnalysis.CSharp (32)
Lowering\ClosureConversion\ClosureConversion.Analysis.cs (4)
523internal DebugId GetTopLevelMethodId() 528internal DebugId GetClosureId(ClosureEnvironment environment, SyntaxNode syntax, ArrayBuilder<EncClosureInfo> closureDebugInfo, out RuntimeRudeEdit? rudeEdit) 545DebugId closureId; 548_slotAllocator.TryGetPreviousClosure(syntax, parentClosureId, structCaptures, out var previousClosureId, out rudeEdit) &&
Lowering\ClosureConversion\ClosureConversion.cs (16)
375DebugId methodId = _analysis.GetTopLevelMethodId(); 376DebugId closureId = _analysis.GetClosureId(env, syntax, closureDebugInfo, out var rudeEdit); 421DebugId topLevelMethodId; 422DebugId lambdaId; 521DebugId methodId; 524methodId = new DebugId(DebugId.UndefinedOrdinal, CompilationState.ModuleBuilderOpt.CurrentGenerationOrdinal); 1428DebugId topLevelMethodId; 1429DebugId lambdaId; 1442private DebugId GetLambdaId(SyntaxNode syntax, ClosureKind closureKind, int closureOrdinal, ImmutableArray<DebugId> structClosureIds, RuntimeRudeEdit? closureRudeEdit) 1488DebugId lambdaId; 1489DebugId previousLambdaId = default; 1520out DebugId topLevelMethodId, 1521out DebugId lambdaId) 1640DebugId topLevelMethodId; 1641DebugId lambdaId;
Lowering\ClosureConversion\SynthesizedClosureEnvironment.cs (5)
43public readonly DebugId ClosureId; 51DebugId methodId, 52DebugId closureId, 78private static string MakeName(SyntaxNode scopeSyntaxOpt, DebugId methodId, DebugId closureId)
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (7)
23internal readonly DebugId LambdaId; 30DebugId topLevelMethodId, 33DebugId lambdaId, 175private static string MakeName(string topLevelMethodName, string localFunctionName, DebugId topLevelMethodId, ClosureKind closureKind, DebugId lambdaId) 186private static string MakeName(string topLevelMethodName, DebugId topLevelMethodId, ClosureKind closureKind, DebugId lambdaId)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Emit\GeneratedNamesTests.cs (2)
71Assert.True(CommonGeneratedNames.TryParseDebugIds(metadataName.AsSpan(), GeneratedNameConstants.IdSeparator, isMethodIdOptional, out var actualMethodId, out var actualEntityId));