5.0.0-beta.1
Pre-release
Pre-release
Washi1337
released this
18 Oct 19:22
·
470 commits
to master
since this release
This marks the first major version bump since the rewrite of AsmResolver. Note that, this is still a pre-release. last-minute breaking API changes may still happen before the full release.
New Features
- Read / Write support for PortablePDB metadata streams and tables (#348)
- A new WIP package called
AsmResolver.Symbols.Pdb
for reading and writing Windows PDB files using only managed code (#324, #326, #342) - Add
SignatureComparer::Default
(#366, thanks @ds5678) - Add
TypeDefinition::IsByRefLike
(#358, #362) - Add the notion of
IMemberClonerListener
s, allowing for automatically post-processing cloned metadata (e.g., automatically injecting it into the target module) as the cloner is cloning metadata (#333, #337, #354, thanks @CursedLand) - AsmResolver.DotNet is now trimmable (#304, thanks @ds5678)
- Add
DotNetRuntimeInfo::IsNetCoreApp
,IsNetFramework
andIsNetStandard
properties for easily identifying whether a module targets .NET Core, .NET Framework or .NET Standard (505da7a). - Add
MetadataTable::IsSorted
property (#348) DynamicMethodDefinition
now supports dynamic methods that are initialized viaDynamicILInfo
(b0b13c8)- Add convenience constructors for
BinaryStreamReader
that take abyte[]
or aIDataSource
alone (54c65ee). - Add
OriginalMetadataTokenProvider
(#361)
Breaking Changes
- Make
SignatureComparer
immutable (#366, thanks @ds5678) - Make
BlobReadContext
a struct (#356). - Change
ISegment::UpdateOffsets
's method signature (#236, #346) - Remove
ITlsDirectory::ImageBase
andCodeSegment::ImageBase
(#346) - Remove
SegmentReference::CanUpdateOffsets
andSegmentReference::UpdateOffsets
(#346) - Add setter for
TypeDefOrRefSignature::Type
andGenericInstanceTypeSignature::Type
(#338, thanks @JPaja) - Move
AsmResolver.DotNet.Dynamic
into a separate nuget package (#304). - Rename
Entrypoint
toEntryPoint
(b6fa3ed). - Rename
OptionalHeaderMagic::Pe32
andPe32Plus
toPE32
andPE32Plus
(d954be0). - Let
LazyVariable
lock on itself (16367c1) - Consolidate
ContinuousMetadataRange
andRedirectedMetadataRange
to a single structMetadataRange
(3bb6b6a) - Let
OneToManyRelation
return aValueSet
with a struct enumerator instead of a genericICollection
(07b09c3) - Change type of
MemberClonerContext::Importer
toCloneContextAwareReferenceImporter
.
Performance Improvements
- Precomputing capacity properties for lists containing read metadata reduced memory consumption by roughly 5%-10% (#316)
- Many small buffers and temporary memory streams are being reused during the writing process where possible. This reduces the number of allocations by up to 20% (#317).
- Various reader context types are now stack allocated (#356).
- Custom attribute signatures are now only read when absolutely necessary, preventing many unnecessary expensive type resolutions and thus many allocations (#336, #351).
MethodImplementation
now implementsIEquatable<MethodImplementation>
, drastically reducing allocations and increasing performance for large binaries with lots of interface implementations (d10cf47).- Replace PE section lookup LINQ code with expanded for loop, drastically reducing allocations in general (1ff0a0f)
OneToManyRelation
now returns aValueSet
with a struct enumerator instead of an interface (07b09c3)
Bug Fixes
- Modifications to a LazyList (and all its derivatives) are now guarded with locks to prevent concurrency issues (#364).
- Importing a nested type via
System.Reflection
now correctly imports the declaring type. This was especially a problem when convertingDynamicMethod
s to aDynamicMethodDefinition
. (#365) - Various CIL body parsing improvements, allowing for better recovery of invalid method body code / data (#361)
- Metadata stream selection is now properly reflecting the behavior of the runtime for both compressed and EnC metadata (#352)
- ExpandMacros correctly expands
ldarga.s
andbge.un.s
to their correct expanded forms (#322, thanks @N78750469)