Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata writer refactoring (3) #9459

Closed
wants to merge 85 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
eecc516
Dedup import scopes based on value equality instead of reference equa…
tmat Mar 7, 2016
ca81b26
Change IFieldDefinition.Offset type from uint to int
tmat Nov 6, 2015
c254c15
Use System.Reflection.Metadata.AssemblyFlags enum
tmat Nov 6, 2015
633cb11
Return ImmutableArray from IModule.GetResources
tmat Nov 6, 2015
68ebec4
Move tables and rows to a partial class
tmat Nov 7, 2015
60c19ec
Merge fixup
tmat Mar 3, 2016
69a98d5
Cleanup
tmat Nov 7, 2015
5a00120
Move serialization methods
tmat Nov 8, 2015
91a57d0
Factor PE specific info out of MetadataSizes to PESizes
tmat Nov 8, 2015
41c36ed
CodedIndex helpers
tmat Nov 8, 2015
169abb7
Move Populate methods around
tmat Nov 8, 2015
90a35c8
Add*
tmat Nov 9, 2015
535f648
Merge fixup
tmat Mar 3, 2016
8213a10
Generic Parameters
tmat Nov 9, 2015
eaffb24
Sorting
tmat Nov 9, 2015
eb5566c
EncTables and Capacity
tmat Nov 10, 2015
7cd0d02
DebugTables and GuidIdx
tmat Nov 10, 2015
28595ba
Separate MetadataTablesBuilder from MetadataWriter
tmat Nov 10, 2015
1b5f857
Improve representation of sequence point in MDV
tmat Nov 12, 2015
d98e8e6
Separate type-system and debug table builds
tmat Nov 14, 2015
673d924
Clean up member flags
tmat Dec 3, 2015
e5b61fd
Merge table and heap builders into MetadataBuilder
tmat Dec 3, 2015
7b9c4d1
Move metadata builder to System.Reflection.Metadata.Ecma335 namespace
tmat Dec 3, 2015
5ced1a0
Extract ManagedTextSection
tmat Dec 4, 2015
6751b2c
Switch .text section serialization to BlobBuilder
tmat Dec 4, 2015
45d05ce
Remove CorHeader class
tmat Dec 4, 2015
85e0ad0
PEBuilder
tmat Dec 8, 2015
5cbd867
PeWriter cleanup
tmat Dec 8, 2015
536cb95
Extract NativeResourceWriter
tmat Dec 8, 2015
21f3f68
Eliminate EncFuncCode in favor of EditAndContinueOperation
tmat Dec 16, 2015
1ee3898
Use LocalVariableAttributes enum instead of uint
tmat Dec 16, 2015
13010b1
Use 'body offset' rather than 'rva' for offsets in IL stream, since t…
tmat Dec 16, 2015
4fa1b07
Custom modifiers in signatures are not allowed in general Type reference
tmat Dec 23, 2015
8efdca1
Attribute signature cleanup
tmat Dec 23, 2015
9e0e6c7
Extract primitive types to a method
tmat Dec 24, 2015
1c14f90
Custom attribute signatures
tmat Dec 24, 2015
4d26356
Handling of arrays in CAs
tmat Dec 25, 2015
40c2704
Cleanup IArrayTypeReference
tmat Dec 26, 2015
10da4b2
Remove treatRefAsPotentialTypeSpec parameter
tmat Dec 26, 2015
dd5d685
Restrict TypedReference
tmat Dec 27, 2015
2454371
Method signature serialization cleanup
tmat Dec 29, 2015
e5d9b8b
Blob encoders
tmat Jan 6, 2016
05e754d
Renabe fields on MetadataWriter to avoid naming conflicts
tmat Jan 6, 2016
859e4e4
Change file layout to match S.R.M.
tmat Jan 7, 2016
fb5f57a
Split SerializeMetadataAndIL
tmat Jan 8, 2016
e625667
Split delta metadata, debug metadata and full metadata serialization
tmat Jan 8, 2016
e34a937
Factor machine related properties out from ModulePropertiesForSeriali…
tmat Jan 8, 2016
dd8ffc2
Inline MachineExtensions
tmat Jan 9, 2016
5964554
CorFlags and DllCharacteristics
tmat Jan 9, 2016
b69e53d
Callback-based PE section serialization
tmat Jan 10, 2016
a4134b9
Change BlobBuilder.ReserveBytes to return Blob instead of BlobWriter
tmat Jan 11, 2016
ee3b281
Factor hashing of BlobBuilder content to a separate helper
tmat Jan 11, 2016
ae02b84
Use Blobs for fixups
tmat Jan 11, 2016
c1c094d
Inline SerializeManagedTextSection and SerializeStandaloneDebugMetadata.
tmat Jan 12, 2016
53ab3a7
Move ContentId to System.Reflection.PortableExecutable namespace
tmat Jan 12, 2016
c74a417
Move managed PE section creation to ManagedPEBuilder
tmat Jan 12, 2016
4ad9f0c
PEBuilder test
tmat Jan 12, 2016
00dc7e3
Rename ImmutableArrayInterop type and methods to match names used in SRM
tmat Jan 12, 2016
e39e25d
Temporarily change namespaces for code that's transitioning to CoreFx
tmat Jan 13, 2016
74a6b30
Use 1-based indices in GetTypeDef and GetMethodDef to be consistent w…
tmat Jan 13, 2016
3f35c09
Eliminated unreachable code branch in GetExportedTypeIndex -- the met…
tmat Jan 13, 2016
afdcacb
Replace ints with Handles
tmat Jan 14, 2016
3cdc2d5
Replace XxxIdx with XxxHandle
tmat Jan 14, 2016
b7b5120
API renames
tmat Jan 14, 2016
75a9471
Move method body encoding to MethodBodyEncoder
tmat Jan 15, 2016
69479c9
Introduce MethodBodyEncoder, ExceptionRegionEnconder and InstructionE…
tmat Jan 21, 2016
dee980b
Reflect ECMA spec signature fixes
tmat Jan 21, 2016
c1e9213
GetTypeHandle: remove duplicate code
tmat Jan 25, 2016
5389965
Remove usage of tokens in favor of handles
tmat Mar 3, 2016
f58ae77
Rename methods
tmat Jan 26, 2016
781812b
Fix namespace imports to avoid ambiguity between SRM types
tmat Jan 26, 2016
65cd7fa
Merge fixup
tmat Mar 3, 2016
bfbf506
WriteCompressedInteger cleanup
tmat Jan 26, 2016
9485bfb
Return handles from MetadataBuilder.Add- methods
tmat Jan 26, 2016
418b6a2
Simplify NamedArgumentsEncoder
tmat Jan 31, 2016
cb6a056
Make blob encoders non-generic
tmat Jan 31, 2016
75ae328
More tests
tmat Mar 3, 2016
887d5cf
Handle IOException from StrongNameProvider
tmat Mar 4, 2016
ec5a2bf
Merge fixup
tmat Mar 8, 2016
65d20ec
Imports merge fixup
tmat Mar 8, 2016
a378285
Emit test merge fixup
tmat Mar 8, 2016
b2db64f
Merge fixup
tmat Mar 10, 2016
5bf79ca
ImageFormatLimitationException
tmat Mar 11, 2016
dee4be8
Rename heap building GetXxx methods to GetOrAddXxx
tmat Mar 11, 2016
a1fbf0a
Implement BranchBuilder
tmat Mar 14, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/Compilers/CSharp/Portable/CodeGen/EmitArrayInitializer.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Reflection.Metadata;
using System.Reflection.Metadata.Ecma335;
using Microsoft.CodeAnalysis.CodeGen;
using Microsoft.CodeAnalysis.CSharp.Symbols;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Text;

namespace Microsoft.CodeAnalysis.CSharp.CodeGen
{
using Roslyn.Reflection;

internal partial class CodeGenerator
{
private enum ArrayInitializerStyle
Expand Down Expand Up @@ -311,14 +312,14 @@ private ImmutableArray<byte> GetRawData(ImmutableArray<BoundExpression> initiali
// the initial size is a guess.
// there is no point to be precise here as MemoryStream always has N + 1 storage
// and will need to be trimmed regardless
var writer = new Cci.BlobBuilder(initializers.Length * 4);
var writer = new BlobBuilder(initializers.Length * 4);

SerializeArrayRecursive(writer, initializers);

return writer.ToImmutableArray();
}

private void SerializeArrayRecursive(Cci.BlobBuilder bw, ImmutableArray<BoundExpression> inits)
private void SerializeArrayRecursive(BlobBuilder bw, ImmutableArray<BoundExpression> inits)
{
if (inits.Length != 0)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Linq;
using System.Collections.Immutable;
using System.Reflection.Metadata;
using Microsoft.CodeAnalysis.CSharp.Emit;
using Microsoft.CodeAnalysis.Emit;
Expand Down Expand Up @@ -36,51 +36,9 @@ bool Cci.IArrayTypeReference.IsSZArray
}
}

IEnumerable<int> Cci.IArrayTypeReference.LowerBounds
{
get
{
var lowerBounds = this.LowerBounds;

if (lowerBounds.IsDefault)
{
return Enumerable.Repeat(0, Rank);
}
else
{
return lowerBounds;
}
}
}

uint Cci.IArrayTypeReference.Rank
{
get
{
return (uint)this.Rank;
}
}

IEnumerable<ulong> Cci.IArrayTypeReference.Sizes
{
get
{
if (this.Sizes.IsEmpty)
{
return SpecializedCollections.EmptyEnumerable<ulong>();
}

return GetSizes();
}
}

private IEnumerable<ulong> GetSizes()
{
foreach (var size in this.Sizes)
{
yield return (ulong)size;
}
}
ImmutableArray<int> Cci.IArrayTypeReference.LowerBounds => LowerBounds;
int Cci.IArrayTypeReference.Rank => Rank;
ImmutableArray<int> Cci.IArrayTypeReference.Sizes => Sizes;

void Cci.IReference.Dispatch(Cci.MetadataVisitor visitor)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,12 @@ internal virtual ImmutableArray<byte> MarshallingDescriptor
}
}

uint Cci.IFieldDefinition.Offset
int Cci.IFieldDefinition.Offset
{
get
{
CheckDefinitionInvariant();
var offset = this.TypeLayoutOffset;
return (uint)(offset ?? 0);
return TypeLayoutOffset ?? 0;
}
}

Expand Down
10 changes: 6 additions & 4 deletions src/Compilers/CSharp/Portable/Emitter/Model/PEAssemblyBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,18 @@ internal override ImmutableArray<NamedTypeSymbol> GetAdditionalTopLevelTypes()
return _lazyFiles;
}

uint Cci.IAssembly.Flags
AssemblyFlags Cci.IAssembly.Flags
{
get
{
AssemblyNameFlags result = _sourceAssembly.Flags & ~AssemblyNameFlags.PublicKey;
AssemblyFlags result = _sourceAssembly.Flags & ~AssemblyFlags.PublicKey;

if (!_sourceAssembly.PublicKey.IsDefaultOrEmpty)
result |= AssemblyNameFlags.PublicKey;
{
result |= AssemblyFlags.PublicKey;
}

return (uint)result;
return result;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,11 @@ internal AssemblyHashAlgorithm? AssemblyAlgorithmIdAttributeSetting
/// This represents what the user claimed in source through the AssemblyFlagsAttribute.
/// It may be modified as emitted due to presence or absence of the public key.
/// </summary>
internal AssemblyNameFlags Flags
internal AssemblyFlags Flags
{
get
{
var defaultValue = default(AssemblyNameFlags);
var defaultValue = default(AssemblyFlags);
var fieldValue = defaultValue;

var data = GetSourceDecodedWellKnownAttributeData();
Expand Down Expand Up @@ -2206,15 +2206,15 @@ private void DecodeWellKnownAttribute(ref DecodeWellKnownAttributeArguments<Attr
else if ((signature = attribute.GetTargetAttributeSignatureIndex(this, AttributeDescription.AssemblyFlagsAttribute)) != -1)
{
object value = attribute.CommonConstructorArguments[0].Value;
System.Reflection.AssemblyNameFlags nameFlags;
AssemblyFlags nameFlags;

if (signature == 0 || signature == 1)
{
nameFlags = (System.Reflection.AssemblyNameFlags)value;
nameFlags = (AssemblyFlags)(AssemblyNameFlags)value;
}
else
{
nameFlags = (System.Reflection.AssemblyNameFlags)(uint)value;
nameFlags = (AssemblyFlags)(uint)value;
}

arguments.GetOrCreateData<CommonAssemblyWellKnownAttributeData>().AssemblyFlagsAttributeSetting = nameFlags;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2207,12 +2207,12 @@ public class C
Assert.Equal(true, info.ThrowOnUnmappableCharacter);

Assert.Equal(
Cci.PInvokeAttributes.NoMangle |
Cci.PInvokeAttributes.CharSetUnicode |
Cci.PInvokeAttributes.SupportsLastError |
Cci.PInvokeAttributes.CallConvCdecl |
Cci.PInvokeAttributes.BestFitEnabled |
Cci.PInvokeAttributes.ThrowOnUnmappableCharEnabled, ((Cci.IPlatformInvokeInformation)info).Flags);
MethodImportAttributes.ExactSpelling |
MethodImportAttributes.CharSetUnicode |
MethodImportAttributes.SetLastError |
MethodImportAttributes.CallingConventionCDecl |
MethodImportAttributes.BestFitMappingEnable |
MethodImportAttributes.ThrowOnUnmappableCharEnable, ((Cci.IPlatformInvokeInformation)info).Flags);
});
}

Expand Down
10 changes: 6 additions & 4 deletions src/Compilers/CSharp/Test/Emit/Emit/CompilationEmitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2559,6 +2559,7 @@ public interface ITestPlatform
var refCompilation = CreateCompilation(refSource, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch");

refCompilation.VerifyEmitDiagnostics(emitOptions);

var imageRef = refCompilation.EmitToImageReference();

string useSource = @"
Expand Down Expand Up @@ -2698,16 +2699,17 @@ public void BrokenOutStream()
var compilation = CreateCompilationWithMscorlib(source);

var output = new BrokenStream();

output.BreakHow = BrokenStream.BreakHowType.ThrowOnWrite;
var result = compilation.Emit(output);
result.Diagnostics.Verify(
// error CS8104: An error occurred while writing the Portable Executable file.
Diagnostic(ErrorCode.ERR_PeWritingFailure).WithArguments(output.ThrownException.ToString()).WithLocation(1, 1));


// Stream.Position is not called:
output.BreakHow = BrokenStream.BreakHowType.ThrowOnSetPosition;
result = compilation.Emit(output);
result.Diagnostics.Verify(
// error CS8104: An error occurred while writing the Portable Executable file.
Diagnostic(ErrorCode.ERR_PeWritingFailure).WithArguments(output.ThrownException.ToString()).WithLocation(1, 1));
result.Diagnostics.Verify();

// disposed stream is not writable
var outReal = new MemoryStream();
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Test/Emit/Emit/EmitMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2172,7 +2172,7 @@ private void VerifyEmitWithNoResources(CSharpCompilation comp, Platform platform
[Fact]
public unsafe void PEHeaders1()
{
var options = EmitOptions.Default.WithFileAlignment(8192);
var options = EmitOptions.Default.WithFileAlignment(0x2000);
var syntax = SyntaxFactory.ParseSyntaxTree(@"class C {}", TestOptions.Regular);

var peStream = CreateCompilationWithMscorlib(
Expand Down
4 changes: 4 additions & 0 deletions src/Compilers/Core/CodeAnalysisTest/CodeAnalysisTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
<Compile Include="MetadataReferences\AssemblyIdentityMapTests.cs" />
<Compile Include="PEWriter\BlobUtilitiesTests.cs" />
<Compile Include="PEWriter\BlobTests.cs" />
<Compile Include="PEWriter\LabelHandleTests.cs" />
<Compile Include="PEWriter\MethodBodyEncoderTests.cs" />
<Compile Include="PEWriter\MetadataBuilderTests.cs" />
<Compile Include="PEWriter\PEBuilderTests.cs" />
<Compile Include="PEWriter\UsedNamespaceOrTypeTests.cs" />
<Compile Include="RealParserTests.cs" />
<Compile Include="SimpleAnalyzerAssemblyLoaderTests.cs" />
Expand Down
13 changes: 8 additions & 5 deletions src/Compilers/Core/CodeAnalysisTest/Emit/CustomDebugInfoTests.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
extern alias PDB;


using System;
using System.Collections.Immutable;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Metadata.Ecma335;
using Microsoft.CodeAnalysis.CodeGen;
using Microsoft.CodeAnalysis.Emit;
using PDB::Microsoft.CodeAnalysis;
Expand All @@ -14,6 +15,8 @@

namespace Microsoft.CodeAnalysis.UnitTests.Emit
{
using Roslyn.Reflection;

public class CustomDebugInfoTests
{
[Fact]
Expand Down Expand Up @@ -196,7 +199,7 @@ public void EditAndContinueLocalSlotMap_NegativeSyntaxOffsets()
var closures = ImmutableArray<ClosureDebugInfo>.Empty;
var lambdas = ImmutableArray<LambdaDebugInfo>.Empty;

var cmw = new Cci.BlobBuilder();
var cmw = new BlobBuilder();

new EditAndContinueMethodDebugInformation(123, slots, closures, lambdas).SerializeLocalSlots(cmw);

Expand All @@ -223,7 +226,7 @@ public void EditAndContinueLambdaAndClosureMap_NegativeSyntaxOffsets()
new LambdaDebugInfo(-50, new DebugId(1, 0), 0),
new LambdaDebugInfo(-180, new DebugId(2, 0), LambdaDebugInfo.StaticClosureOrdinal));

var cmw = new Cci.BlobBuilder();
var cmw = new BlobBuilder();

new EditAndContinueMethodDebugInformation(0x7b, slots, closures, lambdas).SerializeLambdaMap(cmw);

Expand All @@ -245,7 +248,7 @@ public void EditAndContinueLambdaAndClosureMap_NoClosures()
var closures = ImmutableArray<ClosureDebugInfo>.Empty;
var lambdas = ImmutableArray.Create(new LambdaDebugInfo(20, new DebugId(0, 0), LambdaDebugInfo.StaticClosureOrdinal));

var cmw = new Cci.BlobBuilder();
var cmw = new BlobBuilder();

new EditAndContinueMethodDebugInformation(-1, slots, closures, lambdas).SerializeLambdaMap(cmw);

Expand All @@ -268,7 +271,7 @@ public void EditAndContinueLambdaAndClosureMap_NoLambdas()
var closures = ImmutableArray<ClosureDebugInfo>.Empty;
var lambdas = ImmutableArray<LambdaDebugInfo>.Empty;

var cmw = new Cci.BlobBuilder();
var cmw = new BlobBuilder();

new EditAndContinueMethodDebugInformation(10, slots, closures, lambdas).SerializeLambdaMap(cmw);

Expand Down
26 changes: 15 additions & 11 deletions src/Compilers/Core/CodeAnalysisTest/PEWriter/BlobTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
using System.Collections.Immutable;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Metadata.Ecma335;
using System.Text;
using Microsoft.Cci;
using Microsoft.CodeAnalysis.Collections;
Expand All @@ -13,6 +15,8 @@

namespace Microsoft.CodeAnalysis.UnitTests.PEWriter
{
using Roslyn.Reflection;

public class BlobTests
{
[Fact]
Expand Down Expand Up @@ -136,11 +140,11 @@ public void GetBlobs()
blobs = builder.GetBlobs().ToArray();
Assert.Equal(3, blobs.Length);
Assert.Equal(16, blobs[0].Length);
Assert.Equal(16, blobs[0].GetUnderlyingBuffer().Array.Length);
Assert.Equal(16, blobs[0].GetBytes().Array.Length);
Assert.Equal(100 - 16, blobs[1].Length);
Assert.Equal(100 - 16, blobs[1].GetUnderlyingBuffer().Array.Length);
Assert.Equal(100 - 16, blobs[1].GetBytes().Array.Length);
Assert.Equal(1, blobs[2].Length);
Assert.Equal(100 - 16, blobs[2].GetUnderlyingBuffer().Array.Length);
Assert.Equal(100 - 16, blobs[2].GetBytes().Array.Length);

builder.Clear();

Expand All @@ -149,7 +153,7 @@ public void GetBlobs()
Assert.Equal(0, blobs[0].Length);

// Clear uses the first buffer:
Assert.Equal(16, blobs[0].GetUnderlyingBuffer().Array.Length);
Assert.Equal(16, blobs[0].GetBytes().Array.Length);
}

[Fact]
Expand Down Expand Up @@ -485,9 +489,9 @@ public unsafe void Write_Errors()
public void ReserveBytes1()
{
var builder = new BlobBuilder(16);
var writer0 = builder.ReserveBytes(0);
var writer1 = builder.ReserveBytes(1);
var writer2 = builder.ReserveBytes(2);
var writer0 = new BlobWriter(builder.ReserveBytes(0));
var writer1 = new BlobWriter(builder.ReserveBytes(1));
var writer2 = new BlobWriter(builder.ReserveBytes(2));
Assert.Equal(3, builder.Count);
AssertEx.Equal(new byte[] { 0, 0, 0 }, builder.ToArray());

Expand All @@ -507,7 +511,7 @@ public void ReserveBytes1()
public void ReserveBytes2()
{
var builder = new BlobBuilder(16);
var writer = builder.ReserveBytes(17);
var writer = new BlobWriter(builder.ReserveBytes(17));
writer.WriteBytes(1, 17);

var blobs = builder.GetBlobs().ToArray();
Expand All @@ -517,7 +521,7 @@ public void ReserveBytes2()
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01
}, blobs[0].GetUnderlyingBuffer().ToArray());
}, blobs[0].GetBytes().ToArray());
}

// TODO:
Expand All @@ -530,11 +534,11 @@ public void ReserveBytes2()
private static void TestCompressedUnsignedInteger(byte[] expected, int value)
{
var writer = new BlobWriter(4);
writer.WriteCompressedInteger((uint)value);
writer.WriteCompressedInteger(value);
AssertEx.Equal(expected, writer.ToArray());

var builder = new BlobBuilder();
builder.WriteCompressedInteger((uint)value);
builder.WriteCompressedInteger(value);
AssertEx.Equal(expected, builder.ToArray());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.Cci;
using System.Reflection;
using Roslyn.Reflection;
using Xunit;

namespace Microsoft.CodeAnalysis.UnitTests.PEWriter
Expand Down
Loading