Consume Roslyn with `ref` fields support (#71498)
authorAaron Robinson <arobins@microsoft.com>
Sat, 2 Jul 2022 21:07:27 +0000 (14:07 -0700)
committerGitHub <noreply@github.com>
Sat, 2 Jul 2022 21:07:27 +0000 (14:07 -0700)
commit912ef01e92b70781ba5c0f0c3bf8ca0e017c7259
tree92373be1daca405139120af2a5ac6b89823e4a14
parentc9140d621a97fbb0d74028522b3a048d51ed191a
Consume Roslyn with `ref` fields support (#71498)

* Use C# ref field support
Update public APIs

* Create new ByReference to be used in Reflection and tailcall slow paths

* Limit net6.0 TFM in DiagnosticsSource to C# 10.

* Remove temporary LifetimeAnnotationAttribute
This is supplied by Roslyn.

* Update to Roslyn compiler with ref field support.

* Update comments with those approved in official docs.

* Handle byref field in interpreter

* Fix build break when DEBUG_INTERP defined.
60 files changed:
eng/Versions.props
src/coreclr/System.Private.CoreLib/src/System/TypedReference.CoreCLR.cs
src/coreclr/inc/dacvars.h
src/coreclr/jit/importer.cpp
src/coreclr/jit/namedintrinsiclist.h
src/coreclr/nativeaot/System.Private.CoreLib/src/System/TypedReference.cs
src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
src/coreclr/tools/Common/JitInterface/SystemVStructClassificator.cs
src/coreclr/tools/Common/TypeSystem/Common/ExplicitLayoutValidator.cs
src/coreclr/tools/Common/TypeSystem/Common/MetadataTypeSystemContext.cs
src/coreclr/tools/Common/TypeSystem/Common/TypeDesc.cs
src/coreclr/tools/Common/TypeSystem/Common/WellKnownType.cs
src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs
src/coreclr/tools/Common/TypeSystem/Interop/InteropTypes.cs
src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GCRefMapBuilder.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunMetadataFieldLayoutAlgorithm.cs
src/coreclr/tools/aot/ILCompiler.ReadyToRun/IBC/IBCProfileData.cs
src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/CoreTestAssembly/InstanceFieldLayout.cs
src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/CoreTestAssembly/Platform.cs
src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/ILTestAssembly/InstanceFieldLayout.il
src/coreclr/tools/aot/ILCompiler.TypeSystem.Tests/InstanceFieldLayoutTests.cs
src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj
src/coreclr/vm/appdomain.cpp
src/coreclr/vm/classnames.h
src/coreclr/vm/corelib.h
src/coreclr/vm/interpreter.cpp
src/coreclr/vm/interpreter.h
src/coreclr/vm/jitinterface.cpp
src/coreclr/vm/methodtable.cpp
src/coreclr/vm/methodtablebuilder.cpp
src/coreclr/vm/mlinfo.cpp
src/coreclr/vm/siginfo.cpp
src/coreclr/vm/tailcallhelp.cpp
src/coreclr/vm/vars.cpp
src/coreclr/vm/vars.hpp
src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj
src/libraries/System.Memory/ref/System.Memory.cs
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
src/libraries/System.Private.CoreLib/src/System/ByReference.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeFormat.cs
src/libraries/System.Private.CoreLib/src/System/Globalization/TimeSpanFormat.cs
src/libraries/System.Private.CoreLib/src/System/ReadOnlySpan.cs
src/libraries/System.Private.CoreLib/src/System/Reflection/InvokerEmitUtil.cs
src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBase.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/LifetimeAnnotationAttribute.cs [deleted file]
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/Unsafe.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MemoryMarshal.cs
src/libraries/System.Private.CoreLib/src/System/Span.cs
src/libraries/System.Private.CoreLib/src/System/String.cs
src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs
src/libraries/System.Private.CoreLib/src/System/TypedReference.cs
src/libraries/System.Runtime.Serialization.Formatters/tests/FormatterServicesTests.cs
src/libraries/System.Runtime/ref/System.Runtime.cs
src/mono/System.Private.CoreLib/src/System/TypedReference.Mono.cs
src/mono/mono/metadata/class-init.c
src/mono/mono/metadata/marshal-shared.c
src/mono/mono/mini/interp/interp.c
src/mono/mono/mini/interp/transform.c
src/mono/mono/mini/intrinsics.c