61 references to HeapIndex
Microsoft.CodeAnalysis (8)
Emit\EditAndContinue\DeltaMetadataWriter.cs (4)
224
blobStreamLengthAdded: metadataSizes.GetAlignedHeapSize(
HeapIndex
.Blob) + _previousGeneration.BlobStreamLengthAdded,
226
stringStreamLengthAdded: metadataSizes.HeapSizes[(int)
HeapIndex
.String] + _previousGeneration.StringStreamLengthAdded,
228
userStringStreamLengthAdded: metadataSizes.GetAlignedHeapSize(
HeapIndex
.UserString) + _previousGeneration.UserStringStreamLengthAdded,
230
guidStreamLengthAdded: metadataSizes.HeapSizes[(int)
HeapIndex
.Guid],
Emit\EditAndContinue\EmitBaseline.cs (4)
478
=> BlobStreamLengthAdded + MetadataReader.GetHeapSize(
HeapIndex
.Blob);
481
=> StringStreamLengthAdded + MetadataReader.GetHeapSize(
HeapIndex
.String);
484
=> UserStringStreamLengthAdded + MetadataReader.GetHeapSize(
HeapIndex
.UserString);
487
=> GuidStreamLengthAdded + MetadataReader.GetHeapSize(
HeapIndex
.Guid);
Microsoft.CodeAnalysis.Test.Utilities (3)
Metadata\MetadataReaderUtils.cs (1)
92
int length = reader.GetHeapSize(
HeapIndex
.String);
Metadata\MetadataValidation.cs (2)
180
var mvidOffset1 = mdReader1.GetHeapMetadataOffset(
HeapIndex
.Guid) + 16 * (MetadataTokens.GetHeapOffset(mvidIndex1) - 1);
181
var mvidOffset2 = mdReader2.GetHeapMetadataOffset(
HeapIndex
.Guid) + 16 * (MetadataTokens.GetHeapOffset(mvidIndex2) - 1);
SemanticSearch.BuildTask (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
334
var mvidOffset = metadataOffset + metadataReader.GetHeapMetadataOffset(
HeapIndex
.Guid) + (MetadataTokens.GetHeapOffset(moduleDef.Mvid) - 1) * sizeof(Guid);
System.Reflection.Metadata (49)
System\Reflection\Metadata\Ecma335\HeapIndex.cs (1)
16
internal const int Count = (int)
HeapIndex
.Guid + 1;
System\Reflection\Metadata\Ecma335\MetadataAggregator.cs (10)
126
heapSizes[i] = baseReader.GetHeapSize((
HeapIndex
)i);
146
userStringSizes[0] = baseSizes[(int)
HeapIndex
.UserString];
147
stringSizes[0] = baseSizes[(int)
HeapIndex
.String];
148
blobSizes[0] = baseSizes[(int)
HeapIndex
.Blob];
149
guidSizes[0] = baseSizes[(int)
HeapIndex
.Guid] / guidSize;
153
userStringSizes[r + 1] = userStringSizes[r] + deltaReaders[r].GetHeapSize(
HeapIndex
.UserString);
154
stringSizes[r + 1] = stringSizes[r] + deltaReaders[r].GetHeapSize(
HeapIndex
.String);
155
blobSizes[r + 1] = blobSizes[r] + deltaReaders[r].GetHeapSize(
HeapIndex
.Blob);
156
guidSizes[r + 1] = guidSizes[r] + deltaReaders[r].GetHeapSize(
HeapIndex
.Guid) / guidSize;
260
HeapIndex
heapIndex;
System\Reflection\Metadata\Ecma335\MetadataBuilder.cs (8)
17
Debug.Assert(
HeapIndex
.UserString == 0);
18
Debug.Assert((int)
HeapIndex
.String == 1);
19
Debug.Assert((int)
HeapIndex
.Blob == 2);
20
Debug.Assert((int)
HeapIndex
.Guid == 3);
86
SerializeStreamHeader(ref offsetFromStartOfMetadata, sizes.GetAlignedHeapSize(
HeapIndex
.String), "#Strings", builder);
87
SerializeStreamHeader(ref offsetFromStartOfMetadata, sizes.GetAlignedHeapSize(
HeapIndex
.UserString), "#US", builder);
88
SerializeStreamHeader(ref offsetFromStartOfMetadata, sizes.GetAlignedHeapSize(
HeapIndex
.Guid), "#GUID", builder);
89
SerializeStreamHeader(ref offsetFromStartOfMetadata, sizes.GetAlignedHeapSize(
HeapIndex
.Blob), "#Blob", builder);
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (7)
84
Throw.HeapSizeLimitExceeded(
HeapIndex
.UserString);
143
public void SetCapacity(
HeapIndex
heap, int byteCount)
152
case
HeapIndex
.Blob:
157
case
HeapIndex
.Guid:
161
case
HeapIndex
.String:
165
case
HeapIndex
.UserString:
524
Throw.HeapSizeLimitExceeded(
HeapIndex
.UserString);
System\Reflection\Metadata\Ecma335\MetadataReaderExtensions.cs (7)
195
public static int GetHeapSize(this MetadataReader reader,
HeapIndex
heapIndex)
210
public static unsafe int GetHeapMetadataOffset(this MetadataReader reader,
HeapIndex
heapIndex)
225
private static MemoryBlock GetMetadataBlock(this MetadataReader reader,
HeapIndex
heapIndex)
231
HeapIndex
.UserString => reader.UserStringHeap.Block,
232
HeapIndex
.String => reader.StringHeap.Block,
233
HeapIndex
.Blob => reader.BlobHeap.Block,
234
HeapIndex
.Guid => reader.GuidHeap.Block,
System\Reflection\Metadata\Ecma335\MetadataSizes.cs (9)
80
/// <remarks>Use <see cref="GetAlignedHeapSize(
HeapIndex
)"/> to get an aligned heap size.</remarks>
150
BlobReferenceIsSmall = isCompressed && heapSizes[(int)
HeapIndex
.Blob] <= ushort.MaxValue;
151
StringReferenceIsSmall = isCompressed && heapSizes[(int)
HeapIndex
.String] <= ushort.MaxValue;
152
GuidReferenceIsSmall = isCompressed && heapSizes[(int)
HeapIndex
.Guid] <= ushort.MaxValue;
332
size += GetAlignedHeapSize(
HeapIndex
.String);
333
size += GetAlignedHeapSize(
HeapIndex
.UserString);
334
size += GetAlignedHeapSize(
HeapIndex
.Guid);
335
size += GetAlignedHeapSize(
HeapIndex
.Blob);
403
public int GetAlignedHeapSize(
HeapIndex
index)
System\Reflection\Metadata\Ecma335\MetadataTokens.cs (6)
248
/// Gets the <see cref="
HeapIndex
"/> of the heap corresponding to the specified <see cref="HandleKind"/>.
253
public static bool TryGetHeapIndex(HandleKind type, out
HeapIndex
index)
258
index =
HeapIndex
.UserString;
263
index =
HeapIndex
.String;
267
index =
HeapIndex
.Blob;
271
index =
HeapIndex
.Guid;
System\Reflection\Throw.cs (1)
255
internal static void HeapSizeLimitExceeded(
HeapIndex
heap)