Port CoreCLR's TypeNameBuilder to C#, and use it in Mono too (#33701)
authorAlexis Christoforides <alexis@thenull.net>
Fri, 3 Apr 2020 14:28:23 +0000 (10:28 -0400)
committerGitHub <noreply@github.com>
Fri, 3 Apr 2020 14:28:23 +0000 (10:28 -0400)
commit3ab97fc14fa69a7cf03d1f0c5fb009ab9194d235
tree6ebad99b4d9bf91c5b4b1b261479ce2421ca3c11
parent07187e37a974f00d587f70b7b46bbbe5a307b018
Port CoreCLR's TypeNameBuilder to C#, and use it in Mono too (#33701)

* Port CoreCLR's TypeNameBuilder to C#, and use it in Mono too

Mono's System.Reflection.Emit creates type names that fail to be normalized or shaped in all ways that CoreCLR does.

Port CoreCLR's mixed-mode thread-unsafe implementation to thread-safe C#, and start using it in Mono for names in TypeBuilder.

Fixes issues with e.g. null-delimited type names being passed to different Reflection.Emit builders. Contributes to https://github.com/dotnet/runtime/issues/2389.
src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj
src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/AQNBuilder.cs [deleted file]
src/coreclr/src/vm/ecalllist.h
src/coreclr/src/vm/typestring.cpp
src/coreclr/src/vm/typestring.h
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/TypeNameBuilder.cs [new file with mode: 0644]
src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/TypeBuilder.Mono.cs