Add SkipLocalsInitAttribute (#454)
authorAndy Gocke <angocke@microsoft.com>
Sun, 15 Dec 2019 23:13:46 +0000 (15:13 -0800)
committerJan Kotas <jkotas@microsoft.com>
Sun, 15 Dec 2019 23:13:46 +0000 (15:13 -0800)
commit4359ebfc9943608b34f411366b1e544ac45702b7
treebc5a955fcdb101bb68ce10235a79c89881754830
parentaedf8f52006619ef5d4eca65d79f42cc4b7bc402
Add SkipLocalsInitAttribute (#454)

This attribute supports a new compiler feature that allows a user to
specify that they don't want to emit the CLR `.locals init` portion of
the header in methods. This can sometimes produce a performance
improvement but, in some cases, can reveal uninitialized memory to the
application.

Fixes https://github.com/dotnet/corefx/issues/29026
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/SkipLocalsInitAttribute.cs [new file with mode: 0644]
src/libraries/System.Runtime/ref/System.Runtime.cs
src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/AttributesTests.cs