Avoid box allocation in TypeBuilder.DefineDataHelper (dotnet/coreclr#6148)
authorJustin Van Patten <jvp@justinvp.com>
Thu, 7 Jul 2016 05:37:53 +0000 (22:37 -0700)
committerJan Kotas <jkotas@microsoft.com>
Thu, 7 Jul 2016 05:37:53 +0000 (07:37 +0200)
commit3d80cda80a10f52262bf3dbc016b42bf3bc9749e
treede6c298e3b70164f6f3765b8eb2698c560543bdf
parent64a8acfa4959e3527183d5190891fb799bfd8e13
Avoid box allocation in TypeBuilder.DefineDataHelper (dotnet/coreclr#6148)

The current implementation calls `string.Concat(object, object)`, which
results in a box allocation.

Avoid the box allocation by calling `int.ToString()`, allowing
`string.Concat(string, string)` to be used.

Commit migrated from https://github.com/dotnet/coreclr/commit/953d38321f817dffe18261ce77d508947ed4b4fb
src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs